linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file display.php

Documentation is available at display.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage search
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. themeInclude('../search/' . SQL . '.inc.php');
  12.  
  13. /**
  14.  * LogKeywordsSearch()
  15.  * 
  16.  * @param string $keywords 
  17.  * @param string $type 
  18.  * @param string $rub =-1 (option)
  19.  * @return void 
  20.  */
  21. function LogKeywordsSearch($keywords, $type, $searchtype, $rub = -1)
  22. {
  23.     $sep = '##';
  24.     $fp = @fopen(LOG_KEYWORDS, 'a');
  25.     @fwrite($fp, $keywords . $sep); // mots clefs
  26.     @fwrite($fp, $type . $sep); // type ADMIN ou PUBLIC
  27.     @fwrite($fp, $searchtype . $sep); // type de recherche
  28.     if ($rub != -1) @fwrite($fp, $rub . $sep); // rubrique matchées
  29.     @fwrite($fp, i2c_realip() . $sep); // adresse
  30.     @fwrite($fp, date('[d-m-y H:i:s]' . $sep)); // date
  31.     @fwrite($fp, date("\n"));
  32.     @fclose($fp);
  33. } 
  34.  
  35. /**
  36.  * MatchDataFormat()
  37.  * 
  38.  * @param string $keywords 
  39.  * @param string $searchtype 
  40.  * @return string $formatted_keywords
  41.  */
  42. function MatchDataFormat($keywords, $searchtype)
  43. {
  44.     $keywords = trim(addslashes($keywords));
  45.     switch ($searchtype) {
  46.         case 'one':
  47.         if(strtolower(SQL)=='pgsql') {
  48.         $words = explode(' ', $keywords);
  49.         $formatted_keywords = '';
  50.         $op='';
  51.         foreach($words as $value) {
  52.             $formatted_keywords .= $op . $value;
  53.             $op=' | ';
  54.             }
  55.         trim($formatted_keywords);
  56.         }
  57.         if(strtolower(SQL)=='mysql') {
  58.         $formatted_keywords = $keywords;
  59.         }
  60.             break;
  61.         case 'all':
  62.             $words = explode(' ', $keywords);
  63.             $formatted_keywords = '';
  64.         $op='';
  65.             foreach($words as $value) {
  66.             $formatted_keywords .= $op . $value;
  67.             if(strtolower(SQL)=='pgsql') $op=' & ';
  68.             if(strtolower(SQL)=='mysql') $op=' + ';
  69.         }
  70.             trim($formatted_keywords);
  71.             break;
  72.         case 'exp':
  73.         if(strtolower(SQL)=='pgsql') {
  74.         $words = explode(' ', $keywords);
  75.         $formatted_keywords = '';
  76.         $op='';
  77.         foreach($words as $value) {
  78.             $formatted_keywords .= $op . $value;
  79.             $op=' & ';
  80.             }
  81.         trim($formatted_keywords);
  82.         }
  83.         if(strtolower(SQL)=='mysql') {
  84.         $formatted_keywords = '"' . $keywords . '"';
  85.         }
  86.             break;
  87.         default:
  88.             if(strtolower(SQL)=='pgsql') {
  89.         $words = explode(' ', $keywords);
  90.         $formatted_keywords = '';
  91.         $op='';
  92.         foreach($words as $value) {
  93.             $formatted_keywords .= $op . $value;
  94.             $op=' | ';
  95.             }
  96.         trim($formatted_keywords);
  97.         }
  98.         if(strtolower(SQL)=='mysql') {
  99.         $formatted_keywords = $keywords;
  100.         }
  101.             break;
  102.     } 
  103.     return $formatted_keywords;
  104. } 
  105.  
  106. function GetStatus($short_status)
  107. {
  108.     $write = ' - ';
  109.     switch ($short_status) {
  110.         case 'PA':
  111.             $write .= _t('statut','PA');
  112.             break;
  113.         case 'AA':
  114.             $write .= _t('statut','AA');
  115.             break;
  116.         case 'P':
  117.             $write = '';
  118.             break;
  119.         case 'Y':
  120.             $write = '';
  121.             break;
  122.         case 'D':
  123.             $write .= _t('statut','draft');
  124.             break;
  125.         default:
  126.             $write = '';
  127.     } 
  128.     return $write;
  129. } 
  130.  
  131. /**
  132.  * DisplayPublicResults()
  133.  * 
  134.  * @param string $keywords 
  135.  * @param string $searchtype 
  136.  * @return void (echo)
  137.  ***/
  138. function DisplayPublicResults($keywords, $searchtype)
  139. {
  140.     $type = 'PUBLIC';
  141.     if(defined('MOD_PROJECT') && MOD_PROJECT == true) DisplaySearchProject($keywords, $type, $searchtype);
  142.     if(defined('MOD_NEWS') && MOD_NEWS == true) DisplaySearchNews($keywords, $type, $searchtype);
  143.     //echo '<hr />';
  144.     if(defined('MOD_PUBLICATION') && MOD_PUBLICATION == true) DisplaySearchPublication($keywords, $type, $searchtype); 
  145.     // echo '<hr />';
  146.     if(defined('MOD_PUBLICATION') && MOD_PUBLICATION == true) DisplaySearchPubliContents($keywords, $type, $searchtype);
  147.     //echo '<hr />';
  148.     if(defined('MOD_WORKSHOP') && MOD_WORKSHOP == true) DisplaySearchWorkshop($keywords, $type, $searchtype); 
  149.     // echo '<hr />';
  150.     if(defined('MOD_WORKSHOP') && MOD_WORKSHOP == true) DisplaySearchWorkshopRep($keywords, $type, $searchtype); 
  151.     // echo '<hr />';
  152.     if(defined('MOD_WORKSHOP') && MOD_WORKSHOP == true) DisplaySearchWorkshopRepContents($keywords, $type, $searchtype); 
  153.     // echo '<hr />';
  154.     if(defined('MOD_WORKSHOP') && MOD_WORKSHOP == true) DisplaySearchWorkshopCalendar($keywords, $type, $searchtype); 
  155.     // echo '<hr />';
  156.     if(defined('MOD_WORKSHOP') && MOD_WORKSHOP == true) DisplaySearchWorkshopCom($keywords, $type, $searchtype);
  157.     //echo '<hr />';
  158.     if(defined('MOD_SDI') && MOD_SDI == true) DisplaySearchSdi($keywords, $type, $searchtype);
  159.     //echo '<hr />';
  160. }
  161.  
  162. /**
  163.  * DisplaySearchProject()
  164.  * Affiche les projets répondant à la requête sur $keywords
  165.  * 
  166.  * @param string $keywords 
  167.  * @return string $content
  168.  */
  169. function DisplaySearchProject($keywords, $type, $searchtype)
  170. {
  171.     $data = $GLOBALS['sql_object']->DBSelect(SQL_project_search(MatchDataFormat($keywords, $searchtype), $type));
  172.  
  173.     $content = '<div id="MatchProject">';
  174.     $content .= '<h3>' . _t('search','project_module') . '</h3>' . END_LINE;
  175.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  176.     else {
  177.         $content .= '<ul>' . END_LINE;
  178.         for($i = 0; $i < count($data); $i++) {
  179.             if ($type == 'PUBLIC') {
  180.                 $link_news = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['project']['linkvalue'], 'id' => $data[$i]['project_id'], 'name' => $data[$i]['project_name']));
  181.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  182.             } 
  183.             if ($type == 'ADMIN') {
  184.                 $link_news = 'index.php?rub=project&amp;todo=det&amp;id=' . $data[$i]['project_id'];
  185.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  186.             } 
  187.  
  188.             $news_title = formatText($data[$i]['project_name'], '2HTML');
  189.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  190.  
  191.             $content .= '<li class="matches">' . END_LINE;
  192.             $content .= '<a href="' . $link_news . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['news']['desc'] . ' : ' . $news_title, '2ATT') . '" >' . $news_title . '</a>';
  193.             $content .= '<br />';
  194.             $content .= '<span class="infocomp">' . $published_display . GetStatus($data[$i]['statut']) . '</span>';
  195.             $content .= $pertinence;
  196.             $content .= '</li>' . END_LINE;
  197.         } 
  198.         $content .= '</ul>' . END_LINE;
  199.     } 
  200.     $content .= '</div>' . END_LINE;
  201.     echo $content;
  202. }
  203.  
  204. /**
  205.  * DisplaySearchNews()
  206.  * Affiche les news répondant à la requête sur $keywords
  207.  * 
  208.  * @param string $keywords 
  209.  * @return string $content
  210.  */
  211. function DisplaySearchNews($keywords, $type, $searchtype)
  212. {
  213.     $data = $GLOBALS['sql_object']->DBSelect(SQL_news_search(MatchDataFormat($keywords, $searchtype), $type));
  214.  
  215.     $content = '<div id="MatchNews">';
  216.     $content .= '<h3>' . _t('search','news_module') . '</h3>' . END_LINE;
  217.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  218.     else {
  219.         $content .= '<ul>' . END_LINE;
  220.         for($i = 0; $i < count($data); $i++) {
  221.             if ($type == 'PUBLIC') {
  222.                 $link_news = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' => $data[$i]['news_id'], 'name' => $data[$i]['news_title']));
  223.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  224.             } 
  225.             if ($type == 'ADMIN') {
  226.                 $link_news = 'index.php?rub=news&amp;todo=det&amp;id=' . $data[$i]['news_id'];
  227.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  228.             } 
  229.  
  230.             $news_title = formatText($data[$i]['news_title'], '2HTML');
  231.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  232.  
  233.             $content .= '<li class="matches">' . END_LINE;
  234.             $content .= '<a href="' . $link_news . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['news']['desc'] . ' : ' . $news_title, '2ATT') . '" >' . $news_title . '</a>';
  235.             $content .= '<br />';
  236.             $content .= '<span class="infocomp">' . $published_display . GetStatus($data[$i]['statut']) . '</span>';
  237.             $content .= $pertinence;
  238.             $content .= '</li>' . END_LINE;
  239.         } 
  240.         $content .= '</ul>' . END_LINE;
  241.     } 
  242.     $content .= '</div>' . END_LINE;
  243.     echo $content;
  244. } 
  245.  
  246. /**
  247.  * DisplaySearchNews()
  248.  * Affiche les news répondant à la requête sur $keywords
  249.  * 
  250.  * @param string $keywords 
  251.  * @return string $content
  252.  */
  253. function DisplaySearchNewsletter($keywords, $type, $searchtype)
  254. {
  255.     $data = $GLOBALS['sql_object']->DBSelect(SQL_newsletter_search(MatchDataFormat($keywords, $searchtype), $type));
  256.  
  257.     $content = '<div id="MatchNewsletter">';
  258.     $content .= '<h3>' . _t('search','newsletter_module') . '</h3>' . END_LINE;
  259.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  260.     else {
  261.         $content .= '<ol>' . END_LINE;
  262.         for($i = 0; $i < count($data); $i++) {
  263.             /**
  264.              * * NON IMPLEMENTE 
  265.              * if ($type == 'PUBLIC') {
  266.              * $link_news = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['news']['linkvalue'], 'id' => $data[$i]['news_id']));
  267.              * $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  268.              * }
  269.              */
  270.  
  271.             if ($type == 'ADMIN') {
  272.                 $link_newsletter = 'index.php?rub=newsletter&amp;todo=det&amp;id=' . $data[$i]['newsletter_id'];
  273.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  274.             }
  275.             $newsletter_title = formatText($data[$i]['newsletter_title'], '2HTML');
  276.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  277.  
  278.             $content .= '<li class="matches">' . END_LINE;
  279.             $content .= '<a href="' . $link_newsletter . '" title="' . formatText($newsletter_title, '2ATT') . '" >' . $newsletter_title . '</a>';
  280.             $content .= '<br />';
  281.             $content .= '<span class="infocomp">' . $published_display . GetStatus($data[$i]['statut']) . '</span>';
  282.             $content .= $pertinence;
  283.             $content .= '</li>' . END_LINE;
  284.         } 
  285.         $content .= '</ol>' . END_LINE;
  286.     } 
  287.     $content .= '</div>' . END_LINE;
  288.     echo $content;
  289. } 
  290.  
  291. /**
  292.  * DisplaySearchPublication()
  293.  * Affiche les publications répondant à la requête sur $keywords
  294.  * Requête éffectuée sur le titre et le résumé des publications
  295.  * 
  296.  * @param string $keywords 
  297.  * @return string $content
  298.  */
  299. function DisplaySearchPublication($keywords, $type, $searchtype)
  300. {
  301.     $data = $GLOBALS['sql_object']->DBSelect(SQL_publication_search(MatchDataFormat($keywords, $searchtype), $type));
  302.  
  303.     $content = '<div id="MatchPubli">';
  304.     $content .= '<h3>' . _t('search','publication_module') . '</h3>' . END_LINE;
  305.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  306.     else {
  307.         $content .= '<ul>' . END_LINE;
  308.         for($i = 0; $i < count($data); $i++) {
  309.             if ($type == 'PUBLIC') {
  310.                 $link_publi = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['publication']['linkvalue'], 'id' => $data[$i]['publi_id'], 'name' => $data[$i]['publi_title']));
  311.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  312.             } 
  313.             if ($type == 'ADMIN') {
  314.                 $link_publi = 'index.php?rub=publication&amp;todo=det&amp;id=' . $data[$i]['publi_id'];
  315.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  316.             } 
  317.  
  318.             $publi_title = formatText($data[$i]['publi_title'], '2HTML');
  319.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  320.  
  321.             $content .= '<li class="matches">' . END_LINE;
  322.             $content .= '<a href="' . $link_publi . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['publication']['desc'] . ' : ' . $publi_title, '2ATT') . '" >' . $publi_title . '</a>';
  323.             $content .= '<br />';
  324.             $content .= '<span class="infocomp">' . $published_display . GetStatus($data[$i]['statut']) . '</span>';
  325.             $content .= $pertinence;
  326.             $content .= '</li>' . END_LINE;
  327.         } 
  328.         $content .= '</ul>' . END_LINE;
  329.     } 
  330.     $content .= '</div>' . END_LINE;
  331.     echo $content;
  332. } 
  333.  
  334. /**
  335.  * DisplaySearchPubliContents()
  336.  * Affiche les publications répondant à la requête sur $keywords
  337.  * Requête éffectuée sur le contenu des publications ( titre & body )
  338.  * 
  339.  * @param string $keywords 
  340.  * @return string $content
  341.  */
  342. function DisplaySearchPubliContents($keywords, $type, $searchtype)
  343. {
  344.     $data = $GLOBALS['sql_object']->DBSelect(SQL_publication_content_search(MatchDataFormat($keywords, $searchtype), $type));
  345.  
  346.     $content = '<div id="MatchPubliContents">';
  347.     $content .= '<h4>' . _t('search','det_publication_module') . '</h4>' . END_LINE;
  348.     //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  349.     if (count($data) == 1 && $data == 0) return true;
  350.     else {
  351.         $content .= '<ul>' . END_LINE;
  352.         for($i = 0; $i < count($data); $i++) {
  353.             if ($type == 'PUBLIC') {
  354.                 $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']));
  355.                 $link_publi = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['publication']['linkvalue'], 'id' => $data[$i]['publi_id'], 'name' => $data[$i]['publi_title']));
  356.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  357.             } 
  358.             if ($type == 'ADMIN') {
  359.                 $link_publi_det = 'index.php?rub=contents&amp;todo=det&amp;parent=' . $data[$i]['publi_id'] . '&amp;type=P&amp;id=' . $data[$i]['publicon_id'];
  360.                 $link_publi = 'index.php?rub=publication&amp;todo=det&amp;id=' . $data[$i]['publi_id'];
  361.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  362.             } 
  363.  
  364.             $publicon_title = formatText($data[$i]['publicon_title'], '2HTML');
  365.             $publi_title = formatText($data[$i]['publi_title'], '2HTML');
  366.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  367.  
  368.             $content .= '<li class="matches">' . END_LINE;
  369.             $content .= '<a href="' . $link_publi_det . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['publication-part']['desc'] . ' : ' . $publicon_title, '2ATT') . '" >' . $publicon_title . '</a>';
  370.             $content .= '<br />';
  371.             $content .= '<span class="infocomp">' . _t('name','publication_module') . ' : ';
  372.             $content .= '<a href="' . $link_publi . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['publication']['desc'] . ' : ' . $publi_title, '2ATT') . '" >' . $publi_title . '</a>';
  373.             $content .= ' - ' . $published_display . GetStatus($data[$i]['statut']);
  374.             $content .= '</span>';
  375.             $content .= $pertinence;
  376.             $content .= '</li>' . END_LINE;
  377.         } 
  378.         $content .= '</ul>' . END_LINE;
  379.     } 
  380.     $content .= '</div>' . END_LINE;
  381.     echo $content;
  382. } 
  383.  
  384. /**
  385.  * DisplaySearchWorkshop()
  386.  * Affiche les groupes de travail répondant à la requête sur $keywords
  387.  * Requête éffectuée sur le libellé et le résumé des groupes de travail
  388.  * 
  389.  * @param string $keywords 
  390.  * @return string $content
  391.  */
  392. function DisplaySearchWorkshop($keywords, $type, $searchtype)
  393. {
  394.     $data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_search(MatchDataFormat($keywords, $searchtype), $type));
  395.  
  396.     $content = '<div id="MatchWorkshop">';
  397.     $content .= '<h3>' . _t('search','workshop_module') . '</h3>' . END_LINE;
  398.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  399.     else {
  400.         $content .= '<ul>' . END_LINE;
  401.         for($i = 0; $i < count($data); $i++) {
  402.             if ($type == 'PUBLIC') {
  403.                 $link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' => $data[$i]['workshop_id'], 'name' => $data[$i]['workshop_denomination']));
  404.             } 
  405.             if ($type == 'ADMIN') {
  406.                 $link_workshop = 'index.php?rub=workshop&amp;todo=det&amp;id=' . $data[$i]['workshop_id'];
  407.             } 
  408.  
  409.             $workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
  410.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  411.  
  412.             $content .= '<li class="matches">' . END_LINE;
  413.             $content .= '<a href="' . $link_workshop . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] . ' : ' . $workshop_title, '2ATT') . '" >' . $workshop_title . '</a>';
  414.             $statut = GetStatus($data[$i]['statut']);
  415.             if (!empty($statut)) $content .= '<span class="infocomp">(' . $statut . ')</span>';
  416.          $content .= $pertinence;
  417.             $content .= '</li>' . END_LINE;
  418.         } 
  419.         $content .= '</ul>' . END_LINE;
  420.     } 
  421.     $content .= '</div>' . END_LINE;
  422.     echo $content;
  423. } 
  424.  
  425. /**
  426.  * DisplaySearchWorkshopRep()
  427.  * Affiche les groupes de travail répondant à la requête sur $keywords
  428.  * Requête éffectuée sur le contenu des rapports de groupes de travail ( titre & body )
  429.  * 
  430.  * @param string $keywords 
  431.  * @return string $content
  432.  */
  433. function DisplaySearchWorkshopRep($keywords, $type, $searchtype)
  434. {
  435.     $data = $GLOBALS['sql_object']->DBSelect(SQL_workrep_search(MatchDataFormat($keywords, $searchtype), $type));
  436.  
  437.     $content = '<div id="MatchWorkshopRep">';
  438.     $content .= '<h4>' . _t('search','workshoprep_module') . '</h4>' . END_LINE;
  439.     //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  440.     if (count($data) == 1 && $data == 0) return true;
  441.     else {
  442.         $content .= '<ul>' . END_LINE;
  443.         for($i = 0; $i < count($data); $i++) {
  444.             if ($type == 'PUBLIC') {
  445.                 $link_workrep = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['report']['linkvalue'], 'id' => $data[$i]['workrep_id'], 'name' => $data[$i]['workrep_title']));
  446.                 $link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' => $data[$i]['workshop_id'], 'name' => $data[$i]['workshop_denomination']));
  447.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  448.             } 
  449.             if ($type == 'ADMIN') {
  450.                 $link_workrep = 'index.php?rub=workshoprep&amp;todo=det&amp;id=' . $data[$i]['workrep_id'];
  451.                 $link_workshop = 'index.php?rub=workshop&amp;todo=det&amp;id=' . $data[$i]['workshop_id'];
  452.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  453.             } 
  454.  
  455.             $workrep_title = formatText($data[$i]['workrep_title'], '2HTML');
  456.             $workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
  457.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  458.             $published_display = $data[$i]['date_display'];
  459.  
  460.             $content .= '<li class="matches">' . END_LINE;
  461.             $content .= '<a href="' . $link_workrep . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['report']['desc'] . ' : ' . $workrep_title, '2ATT') . '" >' . $workrep_title . '</a>';
  462.             $content .= '<br />';
  463.             $content .= '<span class="infocomp">(' . _t('name','workshop_module') . ' : ';
  464.             $content .= '<a href="' . $link_workshop . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] . ' : ' . $workshop_title, '2ATT') . '" >' . $workshop_title . '</a>';
  465.             $content .= ' - ' . $published_display . GetStatus($data[$i]['statut']) . ')';
  466.             $content .= '</span>';
  467.             $content .= $pertinence;
  468.             $content .= '</li>' . END_LINE;
  469.         } 
  470.         $content .= '</ul>' . END_LINE;
  471.     } 
  472.     $content .= '</div>' . END_LINE;
  473.     echo $content;
  474. } 
  475.  
  476. /**
  477.  * DisplaySearchWorkshopRepContents()
  478.  * Affiche les groupes de travail répondant à la requête sur $keywords
  479.  * Requête éffectuée sur le contenu des rapports de groupes de travail ( titre & body )
  480.  * 
  481.  * @param string $keywords 
  482.  * @return string $content
  483.  */
  484. function DisplaySearchWorkshopRepContents($keywords, $type, $searchtype)
  485. {
  486.     $data = $GLOBALS['sql_object']->DBSelect(SQL_workrep_content_search(MatchDataFormat($keywords, $searchtype), $type));
  487.  
  488.     $content = '<div id="MatchWorkshopContents">';
  489.     $content .= '<h5>' . _t('search','workshoprepcon_module') . '</h5>' . END_LINE;
  490.     //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  491.     if (count($data) == 1 && $data == 0) return true;
  492.     else {
  493.         $content .= '<ul>' . END_LINE;
  494.         for($i = 0; $i < count($data); $i++) {
  495.             if ($type == 'PUBLIC') {
  496.                 $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']));
  497.                 $link_workrep = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['report']['linkvalue'], 'id' => $data[$i]['workrep_id'], 'name' => $data[$i]['workrep_title']));
  498.                 $published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
  499.             } 
  500.             if ($type == 'ADMIN') {
  501.                 $link_workrep_det = 'index.php?rub=contents&amp;todo=det&amp;parent=' . $data[$i]['workrep_id'] . '&amp;type=W&amp;id=' . $data[$i]['workrepcon_id'];
  502.                 $link_workrep = 'index.php?rub=workshoprep&amp;todo=det&amp;id=' . $data[$i]['workrep_id'];
  503.                 $published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
  504.             } 
  505.  
  506.             $workrepcon_title = formatText($data[$i]['workrepcon_title'], '2HTML');
  507.             $workrep_title = formatText($data[$i]['workrep_title'], '2HTML');
  508.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  509.  
  510.             $content .= '<li class="matches">' . END_LINE;
  511.             $content .= '<a href="' . $link_workrep_det . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['publication-part']['desc'] . ' : ' . $workrepcon_title, '2ATT') . '" >' . $workrepcon_title . '</a>';
  512.             $content .= '<br />';
  513.             $content .= '<span class="infocomp">(' . _t('name','workshoprep_module') . ' : ';
  514.             $content .= '<a href="' . $link_workrep . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['report']['desc'] . ' : ' . $workrep_title, '2ATT') . '" >' . $workrep_title . '</a>';
  515.             $content .= ' - ' . $published_display . GetStatus($data[$i]['statut']) . ')';
  516.             $content .= '</span>';
  517.             $content .= $pertinence;
  518.             $content .= '</li>' . END_LINE;
  519.         } 
  520.         $content .= '</ul>' . END_LINE;
  521.     } 
  522.     $content .= '</div>' . END_LINE;
  523.     echo $content;
  524. } 
  525.  
  526. /**
  527.  * DisplaySearchWorkshopCalendar()
  528.  * Affiche les groupes de travail répondant à la requête sur $keywords
  529.  * Requête éffectuée sur les tâches du calendrier de groupes de travail ( libellé & contenu des tâches )
  530.  * 
  531.  * @param string $keywords 
  532.  * @return string $content
  533.  */
  534. function DisplaySearchWorkshopCalendar($keywords, $type, $searchtype)
  535. {
  536.     $data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_calendar_search(MatchDataFormat($keywords, $searchtype), $type));
  537.  
  538.     $content = '<div id="MatchWorkshopCal">';
  539.     $content .= '<h4>' . _t('search','workshopcal_module') . '</h4>' . END_LINE;
  540.     //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  541.     if (count($data) == 1 && $data == 0) return true;
  542.     else {
  543.         $content .= '<ul>' . END_LINE;
  544.         for($i = 0; $i < count($data); $i++) {
  545.             if ($type == 'PUBLIC') {
  546.                 $link_workcal = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['calendar']['linkvalue'], 'id' => $data[$i]['workcal_workshop_id'], 'name' => $data[$i]['workcal_task']));
  547.                 $link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' => $data[$i]['workcal_workshop_id'], 'name' => $data[$i]['workshop_denomination']));
  548.             } 
  549.             if ($type == 'ADMIN') {
  550.                 $link_workcal = 'index.php?rub=workshop&amp;todo=list_cal&amp;id=' . $data[$i]['workcal_workshop_id'];
  551.                 $link_workshop = 'index.php?rub=workshop&amp;todo=det&amp;id=' . $data[$i]['workcal_workshop_id'];
  552.             } 
  553.  
  554.             $workcal_title = formatText($data[$i]['workcal_task'], '2HTML');
  555.             $workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
  556.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  557.  
  558.             $content .= '<li class="matches">' . END_LINE;
  559.             $content .= '<a href="' . $link_workcal . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['calendar']['desc'] . ' : ' . $workcal_title, '2ATT') . '" >' . $workcal_title . '</a>';
  560.             $content .= '<br />';
  561.             $content .= '<span class="infocomp">(' . _t('name','workshop_module') . ' : ';
  562.             $content .= '<a href="' . $link_workshop . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] . ' : ' . $workshop_title, '2ATT') . '" >' . $workshop_title . '</a>';
  563.             if (!empty($statut)) $content .= $statut;
  564.             $content .= ')';
  565.             $content .= '</span>';
  566.             $content .= $pertinence;
  567.             $content .= '</li>' . END_LINE;
  568.         } 
  569.         $content .= '</ul>' . END_LINE;
  570.     } 
  571.     $content .= '</div>' . END_LINE;
  572.     echo $content;
  573. } 
  574.  
  575. /**
  576.  * DisplaySearchWorkshopCom()
  577.  * Affiche les groupes de travail répondant à la requête sur $keywords
  578.  * Requête éffectuée sur les discussions du calendrier de groupes de travail ( titre & contenu )
  579.  * 
  580.  * @param string $keywords 
  581.  * @return string $content
  582.  */
  583. function DisplaySearchWorkshopCom($keywords, $type, $searchtype)
  584. {
  585.     $data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_com_search(MatchDataFormat($keywords, $searchtype), $type));
  586.  
  587.     $content = '<div id="MatchWorkshopCom">';
  588.     $content .= '<h4>' . _t('search','workshopcom_module') . '</h4>' . END_LINE;
  589.     //if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  590.     if (count($data) == 1 && $data == 0) return true;
  591.     else {
  592.         $content .= '<ul>' . END_LINE;
  593.         for($i = 0; $i < count($data); $i++) {
  594.             if ($data[$i]['workcom_parent'] != 0) $id_com = $data[$i]['workcom_parent'];
  595.             else $id_com = $data[$i]['workcom_id'] ;
  596.             if ($type == 'PUBLIC') {
  597.                 $link_workcom = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['subject']['linkvalue'], 'id' => $id_com, 'parentid' => $data[$i]['workcom_workshop_id'], 'name' => $data[$i]['workcom_subject']));
  598.                 $link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'], 'id' => $data[$i]['workcom_workshop_id'], 'name' => $data[$i]['workshop_denomination']));
  599.             } 
  600.             if ($type == 'ADMIN') {
  601.                 $link_workcom = 'index.php?rub=workshop&amp;todo=det_com&amp;id=' . $data[$i]['workcom_workshop_id'] . '&amp;com_id=' . $id_com;
  602.                 $link_workshop = 'index.php?rub=workshop&amp;todo=det&amp;id=' . $data[$i]['workcom_workshop_id'];
  603.             } 
  604.  
  605.             $workcom_title = formatText($data[$i]['workcom_subject'], '2HTML');
  606.             $workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
  607.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  608.  
  609.             if ($type == 'ADMIN' || ($type == 'PUBLIC' && CookieWorkshopid($data[$i]['workcom_workshop_id']))) {
  610.                 $content .= '<li class="matches">' . END_LINE;
  611.                 $content .= '<a href="' . $link_workcom . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['subject']['desc'] . ' : ' . $workcom_title, '2ATT') . '" >' . $workcom_title . '</a>';
  612.                 $content .= '<br />';
  613.                 $content .= '<span class="infocomp">(' . _t('name','workshop_module') . ' : ';
  614.                 $content .= '<a href="' . $link_workshop . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['workgroup']['desc'] . ' : ' . $workshop_title, '2ATT') . '" >' . $workshop_title . '</a>';
  615.                 if (!empty($statut)) $content .= $statut;
  616.                 $content .= ')';
  617.                 $content .= '</span>';
  618.                 $content .= $pertinence;
  619.                 $content .= '</li>' . END_LINE;
  620.             } else $content .= '';
  621.         } 
  622.         $content .= '</ul>' . END_LINE;
  623.  
  624.         if ($content == '<ul></ul>') return '';
  625.     } 
  626.     $content .= '</div>' . END_LINE;
  627.  
  628.     echo $content;
  629. } 
  630.  
  631. /**
  632.  * DisplaySearchSdi()
  633.  * Affiche les indicateurs répondant à la requête sur $keywords
  634.  * Requête éffectuée sur les informations générales des indicateurs
  635.  * 
  636.  * @param string $keywords 
  637.  * @return string $content
  638.  */
  639. function DisplaySearchSdi($keywords, $type, $searchtype)
  640. {
  641.     $data = $GLOBALS['sql_object']->DBSelect(SQL_sdi_search(MatchDataFormat($keywords, $searchtype), $type));
  642.  
  643.     $content = '<div id="MatchSdi">';
  644.     $content .= '<h3>' . _t('search','sdi_module') . '</h3>' . END_LINE;
  645.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  646.     else {
  647.         $content .= '<ul>' . END_LINE;
  648.         for($i = 0; $i < count($data); $i++) {
  649.             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']));
  650.             if ($type == 'ADMIN') $link_sdi = 'index.php?rub=sdi&amp;todo=det&amp;id=' . $data[$i]['sdii_id'];
  651.  
  652.             $news_title = formatText($data[$i]['sdii_name'], '2HTML');
  653.             $pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
  654.             $published_display = $data[$i]['date_display'];
  655.  
  656.             $content .= '<li class="matches">' . END_LINE;
  657.             $content .= '<a href="' . $link_sdi . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['dashboard']['desc'] . ' : ' . $news_title, '2ATT') . '" >' . $news_title . '</a>';
  658.             $content .= '<br />';
  659.             $content .= '<span class="infocomp">( ' . _t('statut','published_on') . ' ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  660.             $content .= $pertinence;
  661.             $content .= '</li>' . END_LINE;
  662.         } 
  663.         $content .= '</ul>' . END_LINE;
  664.     } 
  665.     $content .= '</div>' . END_LINE;
  666.     echo $content;
  667. } 
  668.  
  669. /**
  670.  * DisplaySearchYellowpages()
  671.  * Affiche les organisations de l'annuaire répondant à la requête sur $keywords
  672.  * 
  673.  * @param string $keywords 
  674.  * @return string $content
  675.  */
  676. function DisplaySearchYellowpages($keywords, $type, $searchtype)
  677. {
  678.     $data = $GLOBALS['sql_object']->DBSelect(SQL_yellowpages_search($keywords, $type, $searchtype));
  679.  
  680.     $content = '<div id="MatchYellowpages">';
  681.     $content .= '<h3>' . _t('search','yellowpages_module') . '</h3>' . END_LINE;
  682.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  683.     else {
  684.         $content .= '<ul>' . END_LINE;
  685.         for($i = 0; $i < count($data); $i++) {
  686.             if ($type == 'PUBLIC') $link_yp = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['directory-detail']['linkvalue'], 'id' => $data[$i]['yellowp_id'], 'name' => $data[$i]['yellowp_name']));
  687.             if ($type == 'ADMIN') $link_yp = 'index.php?rub=yellowpages&amp;todo=det&amp;id=' . $data[$i]['yellowp_id'];
  688.  
  689.             $yp_title = formatText($data[$i]['yellowp_name'], '2HTML');
  690.             $pertinence = _t('divers','none');
  691.             $published_display = $data[$i]['date_display'];
  692.  
  693.             $content .= '<li class="matches">' . END_LINE;
  694.             $content .= '<a href="' . $link_yp . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['directory-detail']['desc'] . ' : ' . $yp_title, '2ATT') . '" >' . $yp_title . '</a>';
  695.             $content .= '<span class="infocomp">(' . _t('divers','date_crea') . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  696.             $content .= '</li>' . END_LINE;
  697.         } 
  698.         $content .= '</ul>' . END_LINE;
  699.     } 
  700.     $content .= '</div>' . END_LINE;
  701.     echo $content;
  702. } 
  703.  
  704. /**
  705.  * DisplaySearchUser()
  706.  * Affiche les utilisateurs répondant à la requête sur $keywords
  707.  * 
  708.  * @param string $keywords 
  709.  * @return string $content
  710.  */
  711. function DisplaySearchUser($keywords, $type, $searchtype)
  712. {
  713.     $data = $GLOBALS['sql_object']->DBSelect(SQL_user_search($keywords, $type, $searchtype));
  714.  
  715.     $content = '<div id="MatchUser">';
  716.     $content .= '<h3>' . _t('search','user_module') . '</h3>' . END_LINE;
  717.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  718.     else {
  719.         $content .= '<ul>' . END_LINE;
  720.         for($i = 0; $i < count($data); $i++) {
  721.             if ($type == 'PUBLIC') $link_user = HrefMaker(array('rub' => $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'], 'id' => $data[$i]['user_id'], 'name' => $data[$i]['user_login']));
  722.             if ($type == 'ADMIN') $link_user = 'index.php?rub=user&amp;todo=det&amp;id=' . $data[$i]['user_id'];
  723.  
  724.             $user_title = formatText($data[$i]['user_login']);
  725.             $pertinence = _t('divers','none');
  726.             $published_display = $data[$i]['date_display'];
  727.  
  728.             $content .= '<li class="matches">' . END_LINE;
  729.             $content .= '<a href="' . $link_user . '" title="' . formatText($GLOBALS['links'][LANGUAGE]['user-profile']['desc'] . ' : ' . $user_title, '2ATT') . '" >' . $user_title . '</a>';
  730.             $content .= '<span class="infocomp">(' . _t('divers','date_crea') . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  731.             $content .= '</li>' . END_LINE;
  732.         } 
  733.         $content .= '</ul>' . END_LINE;
  734.     } 
  735.     $content .= '</div>' . END_LINE;
  736.     echo $content;
  737. } 
  738.  
  739. /**
  740.  * DisplaySearchTheme()
  741.  * Affiche les theme répondant à la requête sur $keywords
  742.  * 
  743.  * @param string $keywords 
  744.  * @return string $content
  745.  */
  746. function DisplaySearchTheme($keywords, $type, $searchtype)
  747. {
  748.     $data = $GLOBALS['sql_object']->DBSelect(SQL_theme_search($keywords, $type, $searchtype));
  749.  
  750.     $content = '<div id="MatchTheme">';
  751.     $content .= '<h3>' . _t('search','theme_module') . '</h3>' . END_LINE;
  752.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  753.     else {
  754.         $content .= '<ul>' . END_LINE;
  755.         for($i = 0; $i < count($data); $i++) {
  756.             if ($type == 'ADMIN') $link_theme = 'index.php?rub=theme&amp;todo=det&amp;id=' . $data[$i]['theme_id'];
  757.  
  758.             $theme_title = formatText($data[$i]['theme_name']);
  759.             $pertinence = _t('divers','none');
  760.             $published_display = $data[$i]['date_display'];
  761.  
  762.             $content .= '<li class="matches">' . END_LINE;
  763.             $content .= '<a href="' . $link_theme . '">' . $theme_title . '</a>';
  764.             $content .= '<span class="infocomp">(' . _t('divers','date_crea') . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  765.             $content .= '</li>' . END_LINE;
  766.         } 
  767.         $content .= '</ul>' . END_LINE;
  768.     } 
  769.     $content .= '</div>' . END_LINE;
  770.     echo $content;
  771. } 
  772.  
  773. /**
  774.  * DisplaySearchScale()
  775.  * Affiche les échelles répondant à la requête sur $keywords
  776.  * 
  777.  * @param string $keywords 
  778.  * @return string $content
  779.  */
  780. function DisplaySearchScale($keywords, $type, $searchtype)
  781. {
  782.     $data = $GLOBALS['sql_object']->DBSelect(SQL_scale_search($keywords, $type, $searchtype));
  783.  
  784.     $content = '<div id="MatchScale">';
  785.     $content .= '<h3>' . _t('search','scale_module') . '</h3>' . END_LINE;
  786.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  787.     else {
  788.         $content .= '<ul>' . END_LINE;
  789.         for($i = 0; $i < count($data); $i++) {
  790.             if ($type == 'ADMIN') $link_scale = 'index.php?rub=scale&amp;todo=det&amp;id=' . $data[$i]['scale_id'];
  791.  
  792.             $scale_title = formatText($data[$i]['scale_denomination']);
  793.             $pertinence = _t('divers','none');
  794.             $published_display = $data[$i]['date_display'];
  795.  
  796.             $content .= '<li class="matches">' . END_LINE;
  797.             $content .= '<a href="' . $link_scale . '" title="' . formatText($scale_title, '2ATT') . '">' . $scale_title . '</a>';
  798.             $content .= '<span class="infocomp">(' . _t('divers','date_crea') . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  799.             $content .= '</li>' . END_LINE;
  800.         } 
  801.         $content .= '</ul>' . END_LINE;
  802.     } 
  803.     $content .= '</div>' . END_LINE;
  804.     echo $content;
  805. } 
  806.  
  807. /**
  808.  * DisplaySearchLevel()
  809.  * Affiche les niveaux répondant à la requête sur $keywords
  810.  * 
  811.  * @param string $keywords 
  812.  * @return string $content
  813.  */
  814. function DisplaySearchLevel($keywords, $type, $searchtype)
  815. {
  816.     $data = $GLOBALS['sql_object']->DBSelect(SQL_level_search($keywords, $type, $searchtype));
  817.  
  818.     $content = '<div id="MatchScale">';
  819.     $content .= '<h3>' . _t('search','level_module') . '</h3>' . END_LINE;
  820.     if (count($data) == 1 && $data == 0) $content .= '<p>' . _t('search','no_result') . '</p>' . END_LINE;
  821.     else {
  822.         $content .= '<ul>' . END_LINE;
  823.         for($i = 0; $i < count($data); $i++) {
  824.             if ($type == 'ADMIN') $link_level = 'index.php?rub=level&amp;todo=det&amp;id=' . $data[$i]['level_id'];
  825.  
  826.             $level_title = formatText($data[$i]['level_name']);
  827.             $pertinence = _t('divers','none');
  828.             $published_display = $data[$i]['date_display'];
  829.  
  830.             $content .= '<li class="matches">' . END_LINE;
  831.             $content .= '<a href="' . $link_level . '" title="' . formatText($level_title, '2ATT') . '">' . $level_title . '</a>';
  832.             $content .= '<span class="infocomp">(' . _t('divers','date_crea') . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')</span>';
  833.             $content .= '</li>' . END_LINE;
  834.         } 
  835.         $content .= '</ul>' . END_LINE;
  836.     } 
  837.     $content .= '</div>' . END_LINE;
  838.     echo $content;
  839. } 
  840.  
  841. /**
  842.  * DisplayQueryTime()
  843.  * Affiche le temps d'execution des requêtes
  844.  * 
  845.  * @param float $start_time 
  846.  * @param float $end_time 
  847.  * @return string $content (echo)
  848.  */
  849. function DisplayQueryTime($start_time, $end_time)
  850. {
  851.     $content = '<div id="QueryTime">' . END_LINE;
  852.     $content .= _t('search','query_time') . ' ' . (substr($end_time - $start_time, 0, 5)) . ' ' . _t('search','query_seconds');
  853.     $content .= '</div>' . END_LINE;
  854.     echo $content;
  855. } 
  856.  
  857. {
  858.     $action = $GLOBALS['links'][LANGUAGE]['search-result']['linkvalue'];
  859.     $content = '<form action="index.php" method="get">';
  860.     $content .= '<div id="searchcontent">';
  861.     $content .= '<label for="advsearch">' . _t('search','keywords') . '</label>';
  862.     $content .= '<input type="text" maxlength="150"  class="textfield" name="search" id="advsearch" style="margin-right:30px" />';
  863.     $content.= '<input id="rub_search" name="rub" type="hidden" value="'.$action.'">';
  864.     $content .= '<br class="brendstep" />';
  865.     $content .= '<div style="margin:1em 2.3em 0 0">';
  866.     $content .= '<input type="radio" name="searchtype" id="searchtype_1" value="one" checked="checked "/><span class="radio">' . _t('search','one_of_them') . '</span>';
  867.     $content .= '<input type="radio" name="searchtype" id="searchtype_2" value="all" /><span class="radio">' . _t('search','all_of_them') . '</span>';
  868.     $content .= '<input type="radio" name="searchtype" id="searchtype_3" value="exp" /><span class="radio">' . _t('search','expression') . '</span>';
  869.     $content .= '</div>';
  870.     $content .= '<br class="brendstep" />';
  871.     $content.='<input type="submit" value="ok" size="15" name="valid" id="validadvsearch" style="margin-left:35em" />'.END_LINE;    
  872.     $content .= '</div>';
  873.     $content .= '</form>';
  874.  
  875.     echo $content;
  876. }
  877.  
  878. function FormatPertinenceIndice($float) {
  879.     $pertinence_i = ($float != 0) ? number_format(round($float, 3), 3, ',', ' ') : _t('search','score_not_good');
  880.     $pertinence= '<span class="pertinence">- <abbr title="'.formatText(_t('search','score'), '2ATT').'">' . _t('search','score_abbr') . '</abbr> : ' . $pertinence_i . '</span>';
  881.     
  882.     
  883.     return $pertinence;
  884. }
  885. ?>

Documentation generated on Fri, 16 Oct 2009 09:32:04 +0200 by phpDocumentor 1.4.1