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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/fermegarat.com/cp-admin/add_category.php
<?php

include_once('includes/header.php');

if(isset($_POST['submit']))
{
 
 $seo = 
 
 $qid = $bdd->prepare("INSERT INTO " . $GLOBALS['db_table']['categories'] . " (name, caption, slideshow, meta_caption, meta_keywords) VALUES (:name, :caption, :slideshow, :meta_caption, :meta_keywords)");

  $qid->execute(array(  'name' => $_POST['name'],
                        'caption' => $_POST['caption'],
                        'slideshow' => $_POST['slideshow'],
                        'meta_caption' => $_POST['meta_caption'],
                        'meta_keywords' => $_POST['meta_keywords']));


  /* récupère l'id du produit créé */
  $id_cat = $bdd->lastInsertId();

  $seo = "" . $id_cat . "-" . text2url($_POST['name']);

  $qid = $bdd->prepare("UPDATE " . $GLOBALS['db_table']['categories'] . " SET seo = :seo WHERE id = :id");
  $qid->execute(array(  'seo' => $seo,
                        'id' =>$id_cat ));



  echo '<script>';
//  echo 'window.location = "./category.php"';
  echo 'window.location = "./edit_category.php?id='.$id_cat.'"';
  
  echo '</script>';
}

?>

<div class="container">
  <div class="row">
    <div class="span12">
      <div class="page-header">
        <h1>Ajouter Catégorie(s)
          <div class="pull-right">
            <a href="category.php" class="btn btn-primary"><i class="icon-arrow-left"></i> Retour</a>
          </div>
        </h1>
      </div>
    </div>
  </div>
  <form action="add_category.php" method="POST" enctype="multipart/form-data">
    <div class="well general" style="margin-top:0">
      <div class="row-fluid">

        <div class="span6">

          <div class="control-group">
            <label class="control-label" for="name">Nom :</label>
            <input required name="name" id="name" required type="text">
          </div>

          <div class="control-group">
            <label class="control-label" for="caption">Description :</label>
            <input name="caption" id="caption" type="text">
          </div>

          <div class="control-group">
            <label class="control-label" for="slideshow">Slideshow :</label>
            <div class="controls">
              <select name="slideshow" data-placeholder="Veuillez sélectionner un slideshow !" class="chosen-select" style="width:300px;">
            
                <option value="0">Aucun</option>

                <?php
                $requete = $bdd->query("SELECT id, name FROM " . $GLOBALS['db_table']['slideshows']); 
                while ($row = $requete->fetch()) {
                  echo '<option value="'.$row['id'].'">'.stripcslashes($row['name']).'</option>';
                }
                ?>

              </select>
            </div>
          </div>

        </div>

        <div class="span6">

          <div class="control-group">
            <label class="control-label" for="meta_caption">meta-description :</label>
            <div class="controls">
              <input style="width:287px" name="meta_caption" type="text">
            </div>
          </div>

          <div class="control-group">
            <label class="control-label" for="meta_keywords">Mots-clés :</label>
            <div class="controls">
              <input style="width:287px" name="meta_keywords" type="text">
            </div>
          </div>

        </div>
 
            </div>
    </div>

    <div class="form-actions">
      <div class="btn-group">
        <button name="submit" type="submit" class="btn btn-success"><i class="icon-ok"></i> Enregistrer</button>
      </div>
    </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