Hacked By AnonymousFox
<?php
include '../lib/init.php';
Tool::verif_connect();
Auth::roleAccesAuth(array(5)); /* limitation de l'accès par rôle */
/* Recherche */
if(isset($_POST['addRecherche'])){
Recherche::postRecherche('commentaire');
}
extract(Recherche::getRecherche('commentaire',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/commentaire.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 commentaires</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">Commentaire</th>
<th width="10%">Abus</th>
<th width="10%">Fichier</th>
<th width="10%" colspan="2">Actions</th>
</tr>
<?php
$requete = "SELECT * FROM formation_commentaire
INNER JOIN utilisateur ON commentaireUtilisateur = utilisateurId ";
if(!empty($recherche))
$requete .= " WHERE commentaireContenu LIKE '%$recherche%' ";
$requete .= " ORDER BY commentaireId DESC
LIMIT $debut, 50 ";
$sql = $bdd->query($requete);
if($sql->rowCount() == 0){
echo'<tr>';
echo '<td colspan="5">Aucun commentaire</td>';
echo'</tr>';
}
while($data = $sql->fetchObject()){
echo'<tr>';
echo'<td class="left">';
echo'<p class="created">Ajoutée le : '.date("d/m/Y",$data->commentaireCreated).' par : '.$data->utilisateurPrenom.' '.$data->utilisateurNom.'</p>';
echo nl2br(Forum::autolink($data->commentaireContenu, array("target" => "_blank")));
echo'</td>';
echo'<td>';
$countAbus = Formation::countAbus($bdd, $data->commentaireId);
if(!$countAbus) echo '0';
else echo $countAbus;
echo'</td>';
if(!empty($data->commentaireFichier))
echo'<td><a href="'.BASEFRONT.'file/commentaire/'.$data->commentaireFichier.'" title="Voir le fichier" target="_blank"><img src="'.BASEADMIN.'img/icones/iconFolder.png"/></a></td>';
else
echo'<td><img src="'.BASEADMIN.'img/icones/iconFolderOff.png" title="Aucun fichier"/></td>';
echo '<td><a href="'.BASEADMIN.'commentaire/editCommentaire.php?commentaire='.$data->commentaireId.'" title="Modifier le commentaire"><img src="'.BASEADMIN.'img/icones/modifier.png"/></a></td>';
echo '<td><a href="'.BASEADMIN.'commentaire/deleteCommentaire.php?commentaire='.$data->commentaireId.'" title="Supprimer le commentaire" 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(commentaireId) AS total FROM formation_commentaire ";
if(!empty($recherche))
$requete .= " WHERE commentaireContenu LIKE '%$recherche%' ";
Tool::pagination($requete,'commentaire/managerCommentaire',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