Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4.   <meta charset="UTF-8">
  5.     <title>Food'In Vaison</title>
  6.     <LINK REL="SHORTCUT ICON" href="img/favicon.png">
  7.  
  8.  <!-- Latest compiled and minified CSS -->
  9. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  10.  
  11. <!-- jQuery library -->
  12. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
  13.  
  14. <!-- Latest compiled JavaScript -->
  15. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
  16.  
  17. <?php
  18. include("header_no_aff.php");
  19. ?>
  20.  
  21.  
  22.  
  23.  
  24. <?PHP
  25.  
  26.  
  27.   if (isset($_GET['numerointer']))
  28.    {
  29.      mysqli_set_charset($connect, "utf8");
  30.      $log = $_COOKIE['cookie_authentification'];
  31.      $victi = $_GET['numerointer'];
  32.      $victi = substr($victi, 10);
  33.      $sql = "INSERT INTO food_pannier (pannier_nom_carte,pannier_id_user ) VALUES ('$victi' , '$log') ";
  34.      $rs_insert = $connect->query($sql)or die($connect->error);
  35.      
  36.  
  37.    exit();
  38.   }
  39.  
  40.    if (isset($_GET['supprimerval']))
  41.     {
  42.       mysqli_set_charset($connect, "utf8");
  43.       $log = $_COOKIE['cookie_authentification'];
  44.       $victi = $_GET['supprimerval'];
  45.       $victi = substr($victi, 10);
  46.      $sql = "DELETE from food_pannier WHERE pannier_nom_carte  = '$victi' AND pannier_id_user = '$log'";
  47.       $rs_insert = $connect->query($sql)or die($connect->error);
  48.      
  49.  
  50.    exit();
  51.   }
  52. ?>
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. <style>
  61.      .navbar-inverse{
  62.         background-color : white ;
  63.     }
  64.     .navbar-inverse .navbar-nav > .active > a{
  65.         background-color: limegreen;
  66.     }
  67.     .navbar{
  68.         border: none;
  69.         font-family: "vaisonRegular";
  70.         font-size: large;
  71.     }
  72.     .navbar-inverse .navbar-nav > li > a:hover{
  73.         background-color: grey;
  74.     }
  75.     .navbar-inverse .navbar-brand:hover{
  76.         color:grey;
  77.     }
  78.     @font-face {
  79.     font-family: "vaisonRegular";
  80.     src: url('police/ .ttf');
  81. }
  82. .foodstyle{
  83.     font-size: large;
  84.     font-family: "vaisonRegular";
  85. }
  86. .tailleicon{
  87.     width: 20px;
  88.     height: 20px;
  89.  
  90. }
  91. .navbar-right {
  92.     float: right !important;
  93.     margin-right: 20px;
  94. }
  95.  
  96. </style>
  97.  
  98. </head>
  99.  
  100. <script>
  101.  
  102.    function supprimer(mabalise)
  103.   {
  104.   // alert($(mabalise).val);
  105.  
  106.    /*
  107.     alert($("#autrevictime").is(':checked')?1:0);
  108.   alert($("#serviceGM").is(':checked')?1:0);
  109.     alert($("#prenomvictime").val());
  110.     alert($("#victimeage").val());
  111.     alert($("#victimemaladie").val());
  112.     alert($("#victimetraitement").val());
  113.     alert($("#victimehospitalisation").val());
  114.     alert($("#victimealergie").val());
  115.     */
  116.     $.ajax(
  117.         {
  118.           // url: "script_ajax.php", // par défaut, c'est la même page qui est appelée
  119.           type: "GET", // GET est le type par défaut. À utiliser si vous voulez travailler en POST.
  120.           data: "supprimerval=" + $(mabalise).val(), // id intervention (this).attr("name");
  121.  
  122.           success: function(result) // fonction qui va traiter la réponse du serveur
  123.           {
  124.             $(mabalise).css("background-color", "grey" );
  125.             $(".spanessais").html(result);  // par exemple, on écrit la réponse du serveur dans une balise div
  126.     }
  127.         });
  128.   }
  129.  
  130.  
  131.    function envoyer(mabalise)
  132.   {
  133.     //alert($(mabalise).val);
  134.  
  135.    /*
  136.     alert($("#autrevictime").is(':checked')?1:0);
  137.   alert($("#serviceGM").is(':checked')?1:0);
  138.     alert($("#prenomvictime").val());
  139.     alert($("#victimeage").val());
  140.     alert($("#victimemaladie").val());
  141.     alert($("#victimetraitement").val());
  142.     alert($("#victimehospitalisation").val());
  143.     alert($("#victimealergie").val());
  144.     */
  145.     $.ajax(
  146.         {
  147.           // url: "script_ajax.php", // par défaut, c'est la même page qui est appelée
  148.           type: "GET", // GET est le type par défaut. À utiliser si vous voulez travailler en POST.
  149.           data: "numerointer=" + $(mabalise).val(), // id intervention (this).attr("name");
  150.  
  151.           success: function(result) // fonction qui va traiter la réponse du serveur
  152.           {
  153.             $(mabalise).css("background-color", "grey" );
  154.             $(".spanessais").html(result);  // par exemple, on écrit la réponse du serveur dans une balise div
  155.     }
  156.         });
  157.   }
  158.  
  159.  
  160. </script>
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  <nav class="navbar navbar-inverse">
  167.   <div class="container-fluid">
  168.     <div class="navbar-header">
  169.        
  170.       <a class="navbar-brand" href="index.php">Food'in Vaison</a>
  171.     </div>
  172.     <ul class="nav navbar-nav">
  173.       <li class="active"><a href="index.php">Accueil</a></li>
  174.       <li><a href="carteonline.php">La Carte</a></li>
  175.       <li><a href="formule.php">Nos formules</a></li>
  176.       <li><a href="#">Notre histoire</a></li>
  177.     </ul>
  178.     <ul class="nav navbar-nav navbar-right decale">
  179.  
  180.  
  181. <?php
  182. if (isset($_COOKIE['cookie_authentification']))
  183. {
  184.    // verification cookies modifié
  185.     if (sha1($_COOKIE['cookie_authentification'].$gds.'cookies') != $_COOKIE['cookie_authentification_hash'])
  186.     {
  187.         echo "Tu m'auras pas ;) ! ";
  188.       }
  189.       else
  190.     {
  191.            $log =  $_COOKIE['cookie_authentification'];
  192.          $sql = "select mail from food_user where id = '$log'";
  193.          $rs_user = $connect->query($sql)or die($connect->error);
  194.          if ($utilisateur = $rs_user->fetch_assoc() )
  195.         {
  196.           $nom = $utilisateur['mail'];
  197.           echo"<li><a href='pannier.php'><span class='glyphicon glyphicon-log-in'></span> Votre pannier</a></li>";
  198.           echo"<li><a href='profil.php'><span class='fi-person'></span>$nom</a></li>";
  199.  
  200.  
  201.  
  202.         }
  203.        
  204.        
  205.        
  206.  
  207.        
  208.      }
  209.    
  210. }
  211. else
  212. {
  213.  
  214. }
  215.  
  216. ?>
  217.       <li><a href='connection.php'><span class='glyphicon glyphicon-log-in'></span> Commandez !</a></li>
  218.     </ul>
  219.   </div>
  220.  </nav>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement