Source for file display.php
Documentation is available at display.php 
 * @author linea21 <info@linea21.com>  
 * @license http://opensource.org/licenses/gpl-3.0.html  
 * @param string $keywords   
 * @param string $rub =-1 (option)  
    $fp =  @fopen(LOG_KEYWORDS, 'a');  
    @fwrite($fp, $keywords .  $sep); // mots clefs  
    @fwrite($fp, $type .  $sep); // type ADMIN ou PUBLIC  
    @fwrite($fp, $searchtype .  $sep); // type de recherche  
    if ($rub != - 1) @fwrite($fp, $rub .  $sep); // rubrique matchées  
    @fwrite($fp, date('[d-m-y H:i:s]' .  $sep)); // date  
 * @param string $keywords   
 * @param string $searchtype   
 * @return string $formatted_keywords  
        $formatted_keywords =  '';  
        foreach($words as $value) {  
            $formatted_keywords .=  $op .  $value;  
        trim($formatted_keywords);  
        $formatted_keywords =  $keywords;  
            $formatted_keywords =  '';  
            foreach($words as $value) {  
            $formatted_keywords .=  $op .  $value;  
            trim($formatted_keywords);  
        $formatted_keywords =  '';  
        foreach($words as $value) {  
            $formatted_keywords .=  $op .  $value;  
        trim($formatted_keywords);  
        $formatted_keywords =  '"' .  $keywords .  '"';  
        $formatted_keywords =  '';  
        foreach($words as $value) {  
            $formatted_keywords .=  $op .  $value;  
        trim($formatted_keywords);  
        $formatted_keywords =  $keywords;  
    return $formatted_keywords;  
            $write .=  _t('statut','PA');  
            $write .=  _t('statut','AA');  
            $write .=  _t('statut','draft');  
 * @param string $keywords   
 * @param string $searchtype   
 * Affiche les projets répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchProject">';  
    $content .=  '<h3>' .  _t('search','project_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_news =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['project']['linkvalue'], 'id' =>  $data[$i]['project_id'], 'name' =>  $data[$i]['project_name']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_news =  'index.php?rub=project&todo=det&id=' .  $data[$i]['project_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $news_title =  formatText($data[$i]['project_name'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_news .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['news']['desc'] .  ' : ' .  $news_title, '2ATT') .  '" >' .  $news_title .  '</a>';  
            $content .=  '<span class="infocomp">' .  $published_display .  GetStatus($data[$i]['statut']) .  '</span>';  
 * Affiche les news répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchNews">';  
    $content .=  '<h3>' .  _t('search','news_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_news =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' =>  $data[$i]['news_id'], 'name' =>  $data[$i]['news_title']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_news =  'index.php?rub=news&todo=det&id=' .  $data[$i]['news_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $news_title =  formatText($data[$i]['news_title'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_news .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['news']['desc'] .  ' : ' .  $news_title, '2ATT') .  '" >' .  $news_title .  '</a>';  
            $content .=  '<span class="infocomp">' .  $published_display .  GetStatus($data[$i]['statut']) .  '</span>';  
 * Affiche les news répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchNewsletter">';  
    $content .=  '<h3>' .  _t('search','newsletter_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
             * if ($type == 'PUBLIC') {  
             * $link_news = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' => $data[$i]['news_id']));  
             * $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];  
                $link_newsletter =  'index.php?rub=newsletter&todo=det&id=' .  $data[$i]['newsletter_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $newsletter_title =  formatText($data[$i]['newsletter_title'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_newsletter .  '" title="' .  formatText($newsletter_title, '2ATT') .  '" >' .  $newsletter_title .  '</a>';  
            $content .=  '<span class="infocomp">' .  $published_display .  GetStatus($data[$i]['statut']) .  '</span>';  
 * DisplaySearchPublication()  
 * Affiche les publications répondant à la requête sur $keywords  
 * Requête éffectuée sur le titre et le résumé des publications  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchPubli">';  
    $content .=  '<h3>' .  _t('search','publication_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_publi =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['publication']['linkvalue'], 'id' =>  $data[$i]['publi_id'], 'name' =>  $data[$i]['publi_title']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_publi =  'index.php?rub=publication&todo=det&id=' .  $data[$i]['publi_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $publi_title =  formatText($data[$i]['publi_title'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_publi .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['publication']['desc'] .  ' : ' .  $publi_title, '2ATT') .  '" >' .  $publi_title .  '</a>';  
            $content .=  '<span class="infocomp">' .  $published_display .  GetStatus($data[$i]['statut']) .  '</span>';  
 * DisplaySearchPubliContents()  
 * Affiche les publications répondant à la requête sur $keywords  
 * Requête éffectuée sur le contenu des publications ( titre & body )  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchPubliContents">';  
    $content .=  '<h4>' .  _t('search','det_publication_module') .  '</h4>' .  END_LINE;  
    //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) return true;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_publi_det =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['publication-part']['linkvalue'], 'id' =>  $data[$i]['publicon_id'], 'parentid' =>  $data[$i]['publi_id'], 'name' =>  $data[$i]['publicon_title']));  
                $link_publi =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['publication']['linkvalue'], 'id' =>  $data[$i]['publi_id'], 'name' =>  $data[$i]['publi_title']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_publi_det =  'index.php?rub=contents&todo=det&parent=' .  $data[$i]['publi_id'] .  '&type=P&id=' .  $data[$i]['publicon_id'];  
                $link_publi =  'index.php?rub=publication&todo=det&id=' .  $data[$i]['publi_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $publicon_title =  formatText($data[$i]['publicon_title'], '2HTML');  
            $publi_title =  formatText($data[$i]['publi_title'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_publi_det .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['publication-part']['desc'] .  ' : ' .  $publicon_title, '2ATT') .  '" >' .  $publicon_title .  '</a>';  
            $content .=  '<span class="infocomp">' .  _t('name','publication_module') .  ' : ';  
            $content .=  '<a href="' .  $link_publi .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['publication']['desc'] .  ' : ' .  $publi_title, '2ATT') .  '" >' .  $publi_title .  '</a>';  
            $content .=  ' - ' .  $published_display .  GetStatus($data[$i]['statut']);  
 * DisplaySearchWorkshop()  
 * Affiche les groupes de travail répondant à la requête sur $keywords  
 * Requête éffectuée sur le libellé et le résumé des groupes de travail  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchWorkshop">';  
    $content .=  '<h3>' .  _t('search','workshop_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_workshop =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' =>  $data[$i]['workshop_id'], 'name' =>  $data[$i]['workshop_denomination']));  
                $link_workshop =  'index.php?rub=workshop&todo=det&id=' .  $data[$i]['workshop_id'];  
            $workshop_title =  formatText($data[$i]['workshop_denomination'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_workshop .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] .  ' : ' .  $workshop_title, '2ATT') .  '" >' .  $workshop_title .  '</a>';  
            if (!empty($statut)) $content .=  '<span class="infocomp">(' .  $statut .  ')</span>';  
 * DisplaySearchWorkshopRep()  
 * Affiche les groupes de travail répondant à la requête sur $keywords  
 * Requête éffectuée sur le contenu des rapports de groupes de travail ( titre & body )  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchWorkshopRep">';  
    $content .=  '<h4>' .  _t('search','workshoprep_module') .  '</h4>' .  END_LINE;  
    //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) return true;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_workrep =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['report']['linkvalue'], 'id' =>  $data[$i]['workrep_id'], 'name' =>  $data[$i]['workrep_title']));  
                $link_workshop =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' =>  $data[$i]['workshop_id'], 'name' =>  $data[$i]['workshop_denomination']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_workrep =  'index.php?rub=workshoprep&todo=det&id=' .  $data[$i]['workrep_id'];  
                $link_workshop =  'index.php?rub=workshop&todo=det&id=' .  $data[$i]['workshop_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $workrep_title =  formatText($data[$i]['workrep_title'], '2HTML');  
            $workshop_title =  formatText($data[$i]['workshop_denomination'], '2HTML');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_workrep .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['report']['desc'] .  ' : ' .  $workrep_title, '2ATT') .  '" >' .  $workrep_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('name','workshop_module') .  ' : ';  
            $content .=  '<a href="' .  $link_workshop .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] .  ' : ' .  $workshop_title, '2ATT') .  '" >' .  $workshop_title .  '</a>';  
            $content .=  ' - ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')';  
 * DisplaySearchWorkshopRepContents()  
 * Affiche les groupes de travail répondant à la requête sur $keywords  
 * Requête éffectuée sur le contenu des rapports de groupes de travail ( titre & body )  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchWorkshopContents">';  
    $content .=  '<h5>' .  _t('search','workshoprepcon_module') .  '</h5>' .  END_LINE;  
    //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) return true;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_workrep_det =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['report-part']['linkvalue'], 'id' =>  $data[$i]['workrepcon_id'], 'parentid' =>  $data[$i]['workrep_id'], 'name' =>  $data[$i]['workrepcon_title']));  
                $link_workrep =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['report']['linkvalue'], 'id' =>  $data[$i]['workrep_id'], 'name' =>  $data[$i]['workrep_title']));  
                $published_display =  _t('statut','published_on') .  ' ' .  $data[$i]['date_display'];  
                $link_workrep_det =  'index.php?rub=contents&todo=det&parent=' .  $data[$i]['workrep_id'] .  '&type=W&id=' .  $data[$i]['workrepcon_id'];  
                $link_workrep =  'index.php?rub=workshoprep&todo=det&id=' .  $data[$i]['workrep_id'];  
                $published_display =  _t('divers','date_crea') .  ' ' .  $data[$i]['date_display'];  
            $workrepcon_title =  formatText($data[$i]['workrepcon_title'], '2HTML');  
            $workrep_title =  formatText($data[$i]['workrep_title'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_workrep_det .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['publication-part']['desc'] .  ' : ' .  $workrepcon_title, '2ATT') .  '" >' .  $workrepcon_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('name','workshoprep_module') .  ' : ';  
            $content .=  '<a href="' .  $link_workrep .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['report']['desc'] .  ' : ' .  $workrep_title, '2ATT') .  '" >' .  $workrep_title .  '</a>';  
            $content .=  ' - ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')';  
 * DisplaySearchWorkshopCalendar()  
 * Affiche les groupes de travail répondant à la requête sur $keywords  
 * Requête éffectuée sur les tâches du calendrier de groupes de travail ( libellé & contenu des tâches )  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchWorkshopCal">';  
    $content .=  '<h4>' .  _t('search','workshopcal_module') .  '</h4>' .  END_LINE;  
    //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) return true;  
        for($i =  0; $i <  count($data); $i++ ) {  
                $link_workcal =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['calendar']['linkvalue'], 'id' =>  $data[$i]['workcal_workshop_id'], 'name' =>  $data[$i]['workcal_task']));  
                $link_workshop =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' =>  $data[$i]['workcal_workshop_id'], 'name' =>  $data[$i]['workshop_denomination']));  
                $link_workcal =  'index.php?rub=workshop&todo=list_cal&id=' .  $data[$i]['workcal_workshop_id'];  
                $link_workshop =  'index.php?rub=workshop&todo=det&id=' .  $data[$i]['workcal_workshop_id'];  
            $workcal_title =  formatText($data[$i]['workcal_task'], '2HTML');  
            $workshop_title =  formatText($data[$i]['workshop_denomination'], '2HTML');  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_workcal .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['calendar']['desc'] .  ' : ' .  $workcal_title, '2ATT') .  '" >' .  $workcal_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('name','workshop_module') .  ' : ';  
            $content .=  '<a href="' .  $link_workshop .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] .  ' : ' .  $workshop_title, '2ATT') .  '" >' .  $workshop_title .  '</a>';  
            if (!empty($statut)) $content .=  $statut;  
 * DisplaySearchWorkshopCom()  
 * Affiche les groupes de travail répondant à la requête sur $keywords  
 * Requête éffectuée sur les discussions du calendrier de groupes de travail ( titre & contenu )  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchWorkshopCom">';  
    $content .=  '<h4>' .  _t('search','workshopcom_module') .  '</h4>' .  END_LINE;  
    //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) return true;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($data[$i]['workcom_parent'] !=  0) $id_com =  $data[$i]['workcom_parent'];  
            else $id_com =  $data[$i]['workcom_id'] ;  
                $link_workcom =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['subject']['linkvalue'], 'id' =>  $id_com, 'parentid' =>  $data[$i]['workcom_workshop_id'], 'name' =>  $data[$i]['workcom_subject']));  
                $link_workshop =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' =>  $data[$i]['workcom_workshop_id'], 'name' =>  $data[$i]['workshop_denomination']));  
                $link_workcom =  'index.php?rub=workshop&todo=det_com&id=' .  $data[$i]['workcom_workshop_id'] .  '&com_id=' .  $id_com;  
                $link_workshop =  'index.php?rub=workshop&todo=det&id=' .  $data[$i]['workcom_workshop_id'];  
            $workcom_title =  formatText($data[$i]['workcom_subject'], '2HTML');  
            $workshop_title =  formatText($data[$i]['workshop_denomination'], '2HTML');  
            if ($type ==  'ADMIN' ||  ($type ==  'PUBLIC' &&  CookieWorkshopid($data[$i]['workcom_workshop_id']))) {  
                $content .=  '<li class="matches">' .  END_LINE;  
                $content .=  '<a href="' .  $link_workcom .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['subject']['desc'] .  ' : ' .  $workcom_title, '2ATT') .  '" >' .  $workcom_title .  '</a>';  
                $content .=  '<span class="infocomp">(' .  _t('name','workshop_module') .  ' : ';  
                $content .=  '<a href="' .  $link_workshop .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] .  ' : ' .  $workshop_title, '2ATT') .  '" >' .  $workshop_title .  '</a>';  
                if (!empty($statut)) $content .=  $statut;  
        if ($content ==  '<ul></ul>') return '';  
 * Affiche les indicateurs répondant à la requête sur $keywords  
 * Requête éffectuée sur les informations générales des indicateurs  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchSdi">';  
    $content .=  '<h3>' .  _t('search','sdi_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'PUBLIC') $link_sdi =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['dashboard']['linkvalue'], 'id' =>  $data[$i]['sdii_id'], 'parentid' =>  1, 'name' =>  $data[$i]['sdii_name']));  
            if ($type ==  'ADMIN') $link_sdi =  'index.php?rub=sdi&todo=det&id=' .  $data[$i]['sdii_id'];  
            $news_title =  formatText($data[$i]['sdii_name'], '2HTML');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_sdi .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['dashboard']['desc'] .  ' : ' .  $news_title, '2ATT') .  '" >' .  $news_title .  '</a>';  
            $content .=  '<span class="infocomp">( ' .  _t('statut','published_on') .  ' ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * DisplaySearchYellowpages()  
 * Affiche les organisations de l'annuaire répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $content =  '<div id="MatchYellowpages">';  
    $content .=  '<h3>' .  _t('search','yellowpages_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'PUBLIC') $link_yp =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['directory-detail']['linkvalue'], 'id' =>  $data[$i]['yellowp_id'], 'name' =>  $data[$i]['yellowp_name']));  
            if ($type ==  'ADMIN') $link_yp =  'index.php?rub=yellowpages&todo=det&id=' .  $data[$i]['yellowp_id'];  
            $yp_title =  formatText($data[$i]['yellowp_name'], '2HTML');  
            $pertinence =  _t('divers','none');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_yp .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['directory-detail']['desc'] .  ' : ' .  $yp_title, '2ATT') .  '" >' .  $yp_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('divers','date_crea') .  ' : ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * Affiche les utilisateurs répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $data =  $GLOBALS['sql_object']->DBSelect(SQL_user_search($keywords, $type, $searchtype));  
    $content =  '<div id="MatchUser">';  
    $content .=  '<h3>' .  _t('search','user_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'PUBLIC') $link_user =  HrefMaker(array('rub' =>  $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'], 'id' =>  $data[$i]['user_id'], 'name' =>  $data[$i]['user_login']));  
            if ($type ==  'ADMIN') $link_user =  'index.php?rub=user&todo=det&id=' .  $data[$i]['user_id'];  
            $user_title =  formatText($data[$i]['user_login']);  
            $pertinence =  _t('divers','none');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_user .  '" title="' .  formatText($GLOBALS['links'][LANGUAGE]['user-profile']['desc'] .  ' : ' .  $user_title, '2ATT') .  '" >' .  $user_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('divers','date_crea') .  ' : ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * Affiche les theme répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $data =  $GLOBALS['sql_object']->DBSelect(SQL_theme_search($keywords, $type, $searchtype));  
    $content =  '<div id="MatchTheme">';  
    $content .=  '<h3>' .  _t('search','theme_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'ADMIN') $link_theme =  'index.php?rub=theme&todo=det&id=' .  $data[$i]['theme_id'];  
            $theme_title =  formatText($data[$i]['theme_name']);  
            $pertinence =  _t('divers','none');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_theme .  '">' .  $theme_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('divers','date_crea') .  ' : ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * Affiche les échelles répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $data =  $GLOBALS['sql_object']->DBSelect(SQL_scale_search($keywords, $type, $searchtype));  
    $content =  '<div id="MatchScale">';  
    $content .=  '<h3>' .  _t('search','scale_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'ADMIN') $link_scale =  'index.php?rub=scale&todo=det&id=' .  $data[$i]['scale_id'];  
            $scale_title =  formatText($data[$i]['scale_denomination']);  
            $pertinence =  _t('divers','none');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_scale .  '" title="' .  formatText($scale_title, '2ATT') .  '">' .  $scale_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('divers','date_crea') .  ' : ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * Affiche les niveaux répondant à la requête sur $keywords  
 * @param string $keywords   
 * @return string $content  
    $data =  $GLOBALS['sql_object']->DBSelect(SQL_level_search($keywords, $type, $searchtype));  
    $content =  '<div id="MatchScale">';  
    $content .=  '<h3>' .  _t('search','level_module') .  '</h3>' .  END_LINE;  
    if (count($data) ==  1 &&  $data ==  0) $content .=  '<p>' .  _t('search','no_result') .  '</p>' .  END_LINE;  
        for($i =  0; $i <  count($data); $i++ ) {  
            if ($type ==  'ADMIN') $link_level =  'index.php?rub=level&todo=det&id=' .  $data[$i]['level_id'];  
            $level_title =  formatText($data[$i]['level_name']);  
            $pertinence =  _t('divers','none');  
            $published_display =  $data[$i]['date_display'];  
            $content .=  '<li class="matches">' .  END_LINE;  
            $content .=  '<a href="' .  $link_level .  '" title="' .  formatText($level_title, '2ATT') .  '">' .  $level_title .  '</a>';  
            $content .=  '<span class="infocomp">(' .  _t('divers','date_crea') .  ' : ' .  $published_display .  GetStatus($data[$i]['statut']) .  ')</span>';  
 * Affiche le temps d'execution des requêtes  
 * @param float $start_time   
 * @return string $content (echo)  
    $content =  '<div id="QueryTime">' .  END_LINE;  
    $content .=  _t('search','query_time') .  ' ' .  (substr($end_time -  $start_time, 0, 5)) .  ' ' .  _t('search','query_seconds');  
    $action =  $GLOBALS['links'][LANGUAGE]['search-result']['linkvalue'];  
    $content =  '<form action="index.php" method="get">';  
    $content .=  '<div id="searchcontent">';  
    $content .=  '<label for="advsearch">' .  _t('search','keywords') .  '</label>';  
    $content .=  '<input type="text" maxlength="150"  class="textfield" name="search" id="advsearch" style="margin-right:30px" />';  
    $content.=  '<input id="rub_search" name="rub" type="hidden" value="'. $action. '">';  
    $content .=  '<br class="brendstep" />';  
    $content .=  '<div style="margin:1em 2.3em 0 0">';  
    $content .=  '<input type="radio" name="searchtype" id="searchtype_1" value="one" checked="checked "/><span class="radio">' .  _t('search','one_of_them') .  '</span>';  
    $content .=  '<input type="radio" name="searchtype" id="searchtype_2" value="all" /><span class="radio">' .  _t('search','all_of_them') .  '</span>';  
    $content .=  '<input type="radio" name="searchtype" id="searchtype_3" value="exp" /><span class="radio">' .  _t('search','expression') .  '</span>';  
    $content .=  '<br class="brendstep" />';  
    $content.= '<input type="submit" value="ok" size="15" name="valid" id="validadvsearch" style="margin-left:35em" />'. END_LINE;      
    $pertinence_i =  ($float !=  0) ?  number_format(round($float, 3), 3, ',', ' ') :  _t('search','score_not_good');  
    $pertinence=  '<span class="pertinence">- <abbr title="'. formatText(_t('search','score'), '2ATT'). '">' .  _t('search','score_abbr') .  '</abbr> : ' .  $pertinence_i .  '</span>';  
 
 
        
       |