<commit_before><!--
/*  ---------------------------------------------------  */
/*  HYPERMEDIA EXAM PROJECT                              */
/*  Politecnico di Milano - 2016                          */
/*  <NAME> - <NAME> - <NAME>  */
/*  ---------------------------------------------------  */
-->
<html>
<head>
  <meta charset="utf-8">
<title>HYPERMEDIA PROJECT: CIM</title>


<!--// Carico le librerie jQuery -->
<script src="https://code.jquery.com/jquery-git2.min.js" /></script>
<!--// Carico WebFont da allegare al foglio di stile [ FONT : Muli ] -->
<link href='https://fonts.googleapis.com/css?family=Muli:400,400italic' rel='stylesheet' type='text/css'>
<!--// Icone di FontAwesome da usare con i tag -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!--// Carico il foglio di stile -->
<link href='style.css' rel='stylesheet' type='text/css'>
</head>
<body>
 <!-- // Conterrà tutta la pagina web -->
  <div id="content">

  <!--  //Heading e Logo -->
    <div id="head"></div>

  <!--  // Barra di Navigazione -->
    <nav id="main">

    

      <ul>
        <div style="float:left;font-size:32px; margin-top:-5px;">
        <li> <a href="index.php?s=home"><i class="fa fa-home" aria-hidden="true"></i></a></li>
        </div>
        <li><a href="index.php?s=home">  HOME   </a></li> 
        <li><a href="index.php?s=device">  DEVICE   </a></li>  
        <li><a href="index.php?s=sl">  SMARTLIFE   </a></li>  
        <li><a href="index.php?s=assistenza">  ASSISTENZA   </a></li>  
        <li><a href="index.php?s=altro">  XXXXXX   </a></li>
        <li><a href="index.php?s=admin">  Admin   </a></li>
        <div style="float:right; font-size:32px;margin-top:-10px;">
         <i class="fa fa-shopping-cart" aria-hidden="true"></i>
         <i class="fa fa-envelope" aria-hidden="true"></i>
        </div>
      </ul>

    </nav>
    <nav id="submain">
      <ul class="top" id="submenu">

      </ul>
    </nav>
<div id="page">
<?php
// prendo il contenuto della variabile GET s
$show = strip_tags(stripcslashes($_GET['s']));
// Contiene in nomi dei file in /pages contenuti per l'inclusione
$whitelist = ['home','device','sl','assistenza', 'admin', 'show'];
//rimuoviamo roba strana che possono inserire malintenzionati
  if(in_array($show, $whitelist) or $_GET == null) {
       if(!isset($_GET['s'])){
             $show = "home";
           } 
    include("pages/".$show. ".php");
  }else{
  include("pages/404.php");
  }

?>
</div>
<footer>
 <?php include('footer.php'); ?>
   
 </footer>
  </div><!--// fine div#content -->
</body>
</html><commit_msg>Update home filters<commit_after><!--
/*  ---------------------------------------------------  */
/*  HYPERMEDIA EXAM PROJECT                              */
/*  Politecnico di Milano - 2016                          */
/*  <NAME> - <NAME> - <NAME>  */
/*  ---------------------------------------------------  */
-->
<html>
<head>
  <meta charset="utf-8">
<title>HYPERMEDIA PROJECT: CIM</title>


<!--// Carico le librerie jQuery -->
<script src="https://code.jquery.com/jquery-git2.min.js" /></script>
<!--// Carico WebFont da allegare al foglio di stile [ FONT : Muli ] -->
<link href='https://fonts.googleapis.com/css?family=Muli:400,400italic' rel='stylesheet' type='text/css'>
<!--// Icone di FontAwesome da usare con i tag -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!--// Carico il foglio di stile -->
<link href='style.css' rel='stylesheet' type='text/css'>
</head>
<body>
 <!-- // Conterrà tutta la pagina web -->
  <div id="content">

  <!--  //Heading e Logo -->
    <div id="head"></div>

  <!--  // Barra di Navigazione -->
    <nav id="main">

    

      <ul>
        <div style="float:left;font-size:32px; margin-top:-5px;">
        <li> <a href="index.php?s=home"><i class="fa fa-home" aria-hidden="true"></i></a></li>
        </div>
        <li><a href="index.php?s=home">  HOME   </a></li> 
        <li><a href="index.php?s=device">  DEVICE   </a></li>  
        <li><a href="index.php?s=sl">  SMARTLIFE   </a></li>  
        <li><a href="index.php?s=assistance">  ASSISTANCE   </a></li>  
        <li><a href="index.php?s=altro">  XXXXXX   </a></li>
        <li><a href="index.php?s=admin">  Admin   </a></li>
        <div style="float:right; font-size:32px;margin-top:-10px;">
         <i class="fa fa-shopping-cart" aria-hidden="true"></i>
         <i class="fa fa-envelope" aria-hidden="true"></i>
        </div>
      </ul>

    </nav>
    <nav id="submain">
      <ul class="top" id="submenu">

      </ul>
    </nav>
<div id="page">
<?php
// prendo il contenuto della variabile GET s
$show = strip_tags(stripcslashes($_GET['s']));
// Contiene in nomi dei file in /pages contenuti per l'inclusione
$whitelist = ['home','device','sl','assistance', 'admin', 'show'];
//rimuoviamo roba strana che possono inserire malintenzionati
  if(in_array($show, $whitelist) or $_GET == null) {
       if(!isset($_GET['s'])){
             $show = "home";
           } 
    include("pages/".$show. ".php");
  }else{
  include("pages/404.php");
  }

?>
</div>
<footer>
 <?php include('footer.php'); ?>
   
 </footer>
  </div><!--// fine div#content -->
</body>
</html>
{'fraction_non_alphanumeric': 0.2556971803785245, 'fraction_numerical': 0.008497489378138278, 'mean_word_length': 2.2147734326505275, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7091493', 'n_tokens_mistral': 1882, 'n_tokens_neox': 1826, 'n_words': 379}