Example #1
0
     </div>
        <div class="general_box title">
     <p>Meta description: </p>
             <form action="#" method="POST">
                 <textarea type="text" name="meta-description" /><?php 
echo get_meta_description($con, $options);
?>
</textarea>
            <input type="submit" name="meta-description_ok" value="   OK  " />
        </form>
     </div>
            <div class="general_box title">
     <p>Meta keywords: </p>
             <form action="#" method="POST">
                 <textarea type="text" name="meta-keywords" /><?php 
echo get_meta_keywords($con, $options);
?>
</textarea>
            <input type="submit" name="meta-keywords_ok" value="   OK  " />
        </form>
     </div>
     <div class="general_box logo">
           <p>Logo: </p>
            <form enctype="multipart/form-data" action="#" method="POST">
            <input type="file" name="logo" size=35 />
            <input type="submit" name="logo_ok" value="   OK  " />
            <div class="show_box show_logo">
                <?php 
if ($logo = get_logo($con, $options)) {
    ?>
             <img src="/images/<?php 
Example #2
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title><?php 
get_portal_title();
?>
 - <?php 
get_main_navigation_title();
?>
</title>
  <?php 
get_meta_description();
?>
    
  <?php 
get_meta_keywords();
?>
  
  <link rel="stylesheet" type="text/css" media="screen" href="/website/themes/default/css/screen.css"></link>
  <%widget_link%>
<%widget_css%>  
  <?php 
if (Zend_Auth::getInstance()->hasIdentity()) {
    ?>
  <link rel="stylesheet" type="text/css" media="screen" href="/website/themes/default/css/modus.css"></link>
  <?php 
}
?>
  
  <script type="text/javascript" src="/website/themes/default/js_incs/prototype/prototype.js"></script>
  <script type="text/javascript" src="/website/themes/default/js_incs/script.aculous/scriptaculous.js"></script>
function indexer($file, $tab_mot_vide)
{
    global $conn;
    //______________________ traitement head________________________
    $title = get_title_With_ER($file);
    $keywords = get_meta_keywords($file);
    $description = get_meta_description($file);
    $chaine_head = $keywords . " " . $description . " ";
    // conversion entites html ascii
    $chaine_head = entitesHTML2Caracts($chaine_head);
    //minuscule
    $chaine = strtolower($chaine_head);
    //les separateurs pour decouper le texte en mots
    $separateurs = " |{}[])(-_;,:.'’»«\$!?\"*\\/&=#";
    //decoupage du texte en elements/mots
    $tab_mots_head = explodeBIS($separateurs, $chaine);
    //affichage des mots
    //print_tab($tab_mots);
    //echo "<br><br>";
    //calcul de la frequence des mots
    //suppression des doublons
    $tab_mots_occurrences_head = array_count_values($tab_mots_head);
    //print_tab($tab_mots_occurrences);
    // calcul du poids des mots
    $tab_mots_poids_head = occ2poids($tab_mots_occurrences_head, 2);
    //print_tab($tab_mots_poids_head);
    //______________________ Fin traitement head________________________
    //______________________ traitement body________________________
    $body = get_Body($file);
    // body sans balises scripts
    $body_sans_scripts = strip_scripts($body);
    // suppression des balises html
    $clean_body = strip_tags($body_sans_scripts);
    // conversion entites html ascii
    $clean_body = entitesHTML2Caracts($clean_body);
    //minuscule
    $clean_body = strtolower($clean_body);
    //les separateurs pour decouper le texte en mots
    $separateurs = " |{}[])(-_;,:.'’»«\$!?\"*\\/&=#";
    //decoupage du texte en elements/mots
    $tab_mots_body = explodeBIS($separateurs, $clean_body);
    //affichage des mots
    //print_tab($tab_mots);
    //echo "<br><br>";
    //calcul de la frequence des mots
    //suppression des doublons
    $tab_mots_occurrences_body = array_count_values($tab_mots_body);
    //print_tab($tab_mots_occurrences);
    // calcul du poids des mots
    $tab_mots_poids_body = $tab_mots_occurrences_body;
    //print_tab($tab_mots_poids_body);
    //________________________ fin traitement body ______________________
    // fusion des deux tableaux
    $tab_mots_poids = fusion_tabH_tabB_tabV($tab_mots_poids_head, $tab_mots_poids_body, $tab_mot_vide);
    //print_tab($tab_mots_poids);
    //création du doccument dans la BDD
    $data = array('adr' => mysqli_real_escape_string($conn, $file), 'title' => mysqli_real_escape_string($conn, $title), 'description' => mysqli_real_escape_string($conn, $description));
    $id_doc = createDoc($data);
    foreach ($tab_mots_poids as $mot => $poids) {
        if (!cleanChaine($mot)) {
            $data = array('id_doc' => mysqli_real_escape_string($conn, $id_doc), 'mot' => mysqli_real_escape_string($conn, trim($mot)), 'poids' => mysqli_real_escape_string($conn, $poids));
            createMot($data);
        }
    }
}