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
include_once(themePath('../search/' . SQL . '.inc.php'));
* @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
// no search on comments from public app
if($type == 'PUBLIC') return true;
$content = '<div id="MatchComment">';
$content .= '<h3>' . _t('search','comment_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 = HrefMaker(array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'id' => $data[$i]['project_id'], 'name' => $data[$i]['project_name']));
$published_display = _t('statut','published_on') . ' ' . $data[$i]['date_display'];
$link = 'index.php?rub=comment&todo=det&id=' . $data[$i]['comment_id'];
$published_display = _t('divers','date_crea') . ' ' . $data[$i]['date_display'];
if(!empty($data[$i]['comment_name'])) $uname = formatText($data[$i]['comment_name'], '2HTML');
else $uname = formatText($data[$i]['user_login'], '2HTML');
$title = $data[$i]['comment_body'];
$content .= '<li class="matches">' . END_LINE;
$content .= '<span class="infocomp">' . _t('divers', 'by'). ' '. $uname . ' - '. $published_display . GetStatus($data[$i]['comment_status']) . '</span>';
* 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'][U_L]['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'][U_L]['project']['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['report']['linkvalue'], 'id' => $data[$i]['workrep_id'], 'name' => $data[$i]['workrep_title']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['calendar']['linkvalue'], 'id' => $data[$i]['workcal_workshop_id'], 'name' => $data[$i]['workcal_task']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['topic']['linkvalue'], 'id' => $id_com, 'parentid' => $data[$i]['workcom_workshop_id'], 'name' => $data[$i]['workcom_subject']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links'][U_L]['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' && isWorkgroupUser($data[$i]['workcom_workshop_id']))) {
$content .= '<li class="matches">' . END_LINE;
$content .= '<a href="' . $link_workcom . '" title="' . formatText($GLOBALS['links'][U_L]['topic']['desc'] . ' : ' . $workcom_title, '2ATT') . '" >' . $workcom_title . '</a>';
$content .= '<span class="infocomp">(' . _t('name','workshop_module') . ' : ';
$content .= '<a href="' . $link_workshop . '" title="' . formatText($GLOBALS['links'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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'][U_L]['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="MatchLevel">';
$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'][U_L]['search-result']['linkvalue'];
$content = '<form action="index.php" method="get">';
$content .= '<div id="searchcontent">';
$content .= '<label for="advsearch" class="labelised">' . _t('search','keywords') . '</label>';
$content .= '<input type="text" maxlength="200" class="textfield" name="search" id="advsearch" style="margin-right:30px" />';
$content .= '<input id="rub_search2" name="rub" type="hidden" value="'. $action. '" />';
$content .= '<div style="margin:1.8em 0 0 17em">';
$content .= '<input type="radio" name="searchtype" id="searchtype_1" value="one" checked="checked "/><label class="labelised autowidth" for="searchtype_1">' . _t('search','one_of_them') . '</label>';
$content .= '<input type="radio" name="searchtype" id="searchtype_2" value="all" /><label class="labelised autowidth" for="searchtype_2">' . _t('search','all_of_them') . '</label>';
$content .= '<input type="radio" name="searchtype" id="searchtype_3" value="exp" /><label class="labelised autowidth" for="searchtype_3">' . _t('search','expression') . '</label>';
$content .= '<input type="submit" value="ok" size="15" name="valid" id="validadvsearch" class="submitbut" />'. 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>';
|