Hacked By AnonymousFox
<?php
include '../lib/init.php';
Tool::verif_connect();
Auth::roleAccesAuth(array()); /* limitation de l'accès par rôle */
/* Recherche */
if(isset($_POST['addRecherche'])){
Recherche::postRecherche('document');
}
extract(Recherche::getRecherche('document',array('recherche')));
/* Pagination variables */
$page = 1;
$debut = 0;
if (isset($_GET['page'])) {
$page = $_GET['page'];
$debut = $page-1;
$debut *=50;
}
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title><?php echo TITLE ?></title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,800italic,400,300,600,700' rel='stylesheet' type='text/css'/>
<link href="<?php echo BASEADMIN ?>css/init.css" rel="stylesheet" type="text/css" />
<link href="<?php echo BASEADMIN ?>css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo BASEADMIN ?>css/forum.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<!-- En tête -->
<?php
include '../include/header.php';
?>
<!-- Menu latéral -->
<?php
include '../include/menu.php';
?>
<div id="conteneur">
<div id="titre">
<h1>Gestion des documents</h1>
<span id="flecheTitre"></span>
</div>
<div class="inner">
<div id="recherche">
<form action="#" method="post">
<input type="text" name="recherche" class="medium" placeholder="Recherche" value="<?php echo $recherche ?>" />
<input type="submit" value="" name="addRecherche" id="btnRecherche"/>
</form>
<div class="clear"></div>
</div>
<?php
echo flash();
?>
<table class="table">
<tr>
<th width="70%" class="left">Document</th>
<th width="5%">Public</th>
<th width="5%">Langue</th>
<th width="10%">Fichier</th>
<th width="10%" colspan="2">Actions</th>
</tr>
<?php
$requete = "SELECT * FROM document ";
if(!empty($recherche))
$requete .= " WHERE CONCAT(documentNom, documentContenu) LIKE '%$recherche%' ";
$requete .= " ORDER BY documentId DESC
LIMIT $debut, 50 ";
$sql = $bdd->query($requete);
if($sql->rowCount() == 0){
echo'<tr>';
echo'<td colspan="6">Aucun document</td>';
echo'</tr>';
}
while($data = $sql->fetchObject()){
echo '<tr>';
echo '<td class="left">';
echo '<p class="created">Ajouté le : '.date("d/m/Y",$data->documentCreated).'</p>';
echo '<p><strong>'.$data->documentNom.'</strong></p>';
echo '<p>'.Tool::tronquer($data->documentContenu,200).'</p>';
echo '</td>';
echo '<td>';
if($data->documentPublic)
echo 'Oui';
else
echo 'Non';
echo '</td>';
echo'<td><img src="'.BASEADMIN.'img/langue/'.$data->documentLangue.'.jpg"/></td>';
echo'<td><a href="'.BASEFRONT.'file/document/'.$data->documentFichier.'" title="Voir le fichier" target="_blank"/><img src="'.BASEADMIN.'img/icones/iconFolder.png"/></a></td>';
echo '<td><a href="'.BASEADMIN.'document/editDocument.php?document='.$data->documentId.'" title="Modifier le document"><img src="'.BASEADMIN.'img/icones/modifier.png"/></a></td>';
echo '<td><a href="'.BASEADMIN.'document/deleteDocument.php?document='.$data->documentId.'" title="Supprimer le document" onclick="return confirm(\'êtes vous sur ?\');"><img src="'.BASEADMIN.'img/icones/supprimer.png"/></a></td>';
echo'</tr>';
}
?>
</table>
<div id="navigation">
<?php
$requete = "SELECT COUNT(documentId) AS total FROM document ";
if(!empty($recherche))
$requete .= " WHERE CONCAT(documentNom, documentContenu) LIKE '%$recherche%' ";
Tool::pagination($requete,'document/managerDocument',50,$page,$bdd);
?>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo BASEADMIN ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo BASEADMIN ?>js/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo BASEADMIN ?>js/script.js"></script>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox