';
DisplaySearchPublication($keywords, $type, $searchtype);
// echo '
';
DisplaySearchPubliContents($keywords, $type, $searchtype);
//echo '
';
DisplaySearchWorkshop($keywords, $type, $searchtype);
// echo '
';
DisplaySearchWorkshopRep($keywords, $type, $searchtype);
// echo '
';
DisplaySearchWorkshopRepContents($keywords, $type, $searchtype);
// echo '
';
DisplaySearchWorkshopCalendar($keywords, $type, $searchtype);
// echo '
';
DisplaySearchWorkshopCom($keywords, $type, $searchtype);
//echo '
';
DisplaySearchSdi($keywords, $type, $searchtype);
//echo '
';
}
/**
* DisplaySearchNews()
* Affiche les news répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchNews($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_news_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['news_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_news = HrefMaker(array('rub' => $GLOBALS['links']['actualite']['linkvalue'], 'id' => $data[$i]['news_id']));
$published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
}
if ($type == 'ADMIN') {
$link_news = 'index.php?rub=news&todo=det&id=' . $data[$i]['news_id'];
$published_display = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$news_title = formatText($data[$i]['news_title'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $news_title . '';
$content .= '
';
$content .= '' . $published_display . GetStatus($data[$i]['statut']) . '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchNews()
* Affiche les news répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchNewsletter($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_newsletter_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['newsletter_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
/**
* * NON IMPLEMENTE
* if ($type == 'PUBLIC') {
* $link_news = HrefMaker(array('rub' => $GLOBALS['links']['actualite']['linkvalue'], 'id' => $data[$i]['news_id']));
* $published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
* }
*/
if ($type == 'ADMIN') {
$link_newsletter = 'index.php?rub=newsletter&todo=det&id=' . $data[$i]['newsletter_id'];
$published_display = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$newsletter_title = formatText($data[$i]['newsletter_title'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $newsletter_title . '';
$content .= '
';
$content .= '' . $published_display . GetStatus($data[$i]['statut']) . '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchPublication($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_publication_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['publication_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_publi = HrefMaker(array('rub' => $GLOBALS['links']['dossier']['linkvalue'], 'id' => $data[$i]['publi_id']));
$published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
}
if ($type == 'ADMIN') {
$link_publi = 'index.php?rub=publication&todo=det&id=' . $data[$i]['publi_id'];
$published_display = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$publi_title = formatText($data[$i]['publi_title'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $publi_title . '';
$content .= '
';
$content .= '' . $published_display . GetStatus($data[$i]['statut']) . '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchPubliContents($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_publication_content_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['det_publication_module'] . '
' . END_LINE;
//if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) return true;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_publi_det = HrefMaker(array('rub' => $GLOBALS['links']['dossier-partie']['linkvalue'], 'id' => $data[$i]['publicon_id'], 'parentid' => $data[$i]['publi_id']));
$link_publi = HrefMaker(array('rub' => $GLOBALS['links']['dossier']['linkvalue'], 'id' => $data[$i]['publi_id']));
$published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
}
if ($type == 'ADMIN') {
$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 = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$publicon_title = formatText($data[$i]['publicon_title'], '2HTML');
$publi_title = formatText($data[$i]['publi_title'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $publicon_title . '';
$content .= '
';
$content .= '' . $GLOBALS['lang']['name']['publication_module'] . ' : ';
$content .= '' . $publi_title . '';
$content .= ' - ' . $published_display . GetStatus($data[$i]['statut']);
$content .= '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchWorkshop($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['workshop_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links']['groupe-de-travail']['linkvalue'], 'id' => $data[$i]['workshop_id']));
}
if ($type == 'ADMIN') {
$link_workshop = 'index.php?rub=workshop&todo=det&id=' . $data[$i]['workshop_id'];
}
$workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $workshop_title . '';
$statut = GetStatus($data[$i]['statut']);
if (!empty($statut)) $content .= '(' . $statut . ')';
$content .= $pertinence;
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchWorkshopRep($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_workrep_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['workshoprep_module'] . '
' . END_LINE;
//if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) return true;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_workrep = HrefMaker(array('rub' => $GLOBALS['links']['rapport']['linkvalue'], 'id' => $data[$i]['workrep_id']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links']['groupe-de-travail']['linkvalue'], 'id' => $data[$i]['workshop_id']));
$published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
}
if ($type == 'ADMIN') {
$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 = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$workrep_title = formatText($data[$i]['workrep_title'], '2HTML');
$workshop_title = formatText($data[$i]['workshop_denomination'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $workrep_title . '';
$content .= '
';
$content .= '(' . $GLOBALS['lang']['name']['workshop_module'] . ' : ';
$content .= '' . $workshop_title . '';
$content .= ' - ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchWorkshopRepContents($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_workrep_content_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['workshoprepcon_module'] . '
' . END_LINE;
//if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) return true;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_workrep_det = HrefMaker(array('rub' => $GLOBALS['links']['rapport-partie']['linkvalue'], 'id' => $data[$i]['workrepcon_id'], 'parentid' => $data[$i]['workrep_id']));
$link_workrep = HrefMaker(array('rub' => $GLOBALS['links']['rapport']['linkvalue'], 'id' => $data[$i]['workrep_id']));
$published_display = $GLOBALS['lang']['statut']['published_on'] . ' ' . $data[$i]['date_display'];
}
if ($type == 'ADMIN') {
$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 = $GLOBALS['lang']['divers']['date_crea'] . ' ' . $data[$i]['date_display'];
}
$workrepcon_title = formatText($data[$i]['workrepcon_title'], '2HTML');
$workrep_title = formatText($data[$i]['workrep_title'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $workrepcon_title . '';
$content .= '
';
$content .= '(' . $GLOBALS['lang']['name']['workshoprep_module'] . ' : ';
$content .= '' . $workrep_title . '';
$content .= ' - ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchWorkshopCalendar($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_calendar_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['workshopcal_module'] . '
' . END_LINE;
//if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) return true;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') {
$link_workcal = HrefMaker(array('rub' => $GLOBALS['links']['calendrier']['linkvalue'], 'id' => $data[$i]['workcal_workshop_id']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links']['groupe-de-travail']['linkvalue'], 'id' => $data[$i]['workcal_workshop_id']));
}
if ($type == 'ADMIN') {
$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');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$content .= '- ' . END_LINE;
$content .= '' . $workcal_title . '';
$content .= '
';
$content .= '(' . $GLOBALS['lang']['name']['workshop_module'] . ' : ';
$content .= '' . $workshop_title . '';
if (!empty($statut)) $content .= $statut;
$content .= ')';
$content .= '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* 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
*/
function DisplaySearchWorkshopCom($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_workshop_com_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['workshopcom_module'] . '
' . END_LINE;
//if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) return true;
else {
$content .= '
' . END_LINE;
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'] ;
if ($type == 'PUBLIC') {
$link_workcom = HrefMaker(array('rub' => $GLOBALS['links']['sujet']['linkvalue'], 'id' => $id_com, 'parentid' => $data[$i]['workcom_workshop_id']));
$link_workshop = HrefMaker(array('rub' => $GLOBALS['links']['groupe-de-travail']['linkvalue'], 'id' => $data[$i]['workcom_workshop_id']));
}
if ($type == 'ADMIN') {
$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');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
if ($type == 'ADMIN' || ($type == 'PUBLIC' && CookieWorkshopid($data[$i]['workcom_workshop_id']))) {
$content .= '- ' . END_LINE;
$content .= '' . $workcom_title . '';
$content .= '
';
$content .= '(' . $GLOBALS['lang']['name']['workshop_module'] . ' : ';
$content .= '' . $workshop_title . '';
if (!empty($statut)) $content .= $statut;
$content .= ')';
$content .= '';
$content .= $pertinence;
$content .= ' ' . END_LINE;
} else $content .= '';
}
$content .= '
' . END_LINE;
if ($content == '
') return '';
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchSdi()
* 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
*/
function DisplaySearchSdi($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_sdi_search(MatchDataFormat($keywords, $searchtype), $type));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['sdi_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') $link_sdi = HrefMaker(array('rub' => $GLOBALS['links']['tableau-de-bord-idd']['linkvalue'], 'id' => $data[$i]['sdii_id'], 'parentid' => 1));
if ($type == 'ADMIN') $link_sdi = 'index.php?rub=sdi&todo=det&id=' . $data[$i]['sdii_id'];
$news_title = formatText($data[$i]['sdii_name'], '2HTML');
$pertinence = FormatPertinenceIndice($data[$i]['pertinence']);
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $news_title . '';
$content .= '
';
$content .= '( ' . $GLOBALS['lang']['statut']['published_on'] . ' ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= $pertinence;
$content .= ' ' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchYellowpages()
* Affiche les organisations de l'annuaire répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchYellowpages($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_yellowpages_search($keywords, $type, $searchtype));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['yellowpages_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') $link_yp = HrefMaker(array('rub' => $GLOBALS['links']['annuaire-detail']['linkvalue'], 'id' => $data[$i]['yellowp_id']));
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 = $GLOBALS['lang']['divers']['none'];
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $yp_title . '';
$content .= '(' . $GLOBALS['lang']['divers']['date_crea'] . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchUser()
* Affiche les utilisateurs répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchUser($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_user_search($keywords, $type, $searchtype));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['user_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . END_LINE;
for($i = 0; $i < count($data); $i++) {
if ($type == 'PUBLIC') $link_user = HrefMaker(array('rub' => $GLOBALS['links']['profil-utilisateur']['linkvalue'], 'id' => $data[$i]['user_id']));
if ($type == 'ADMIN') $link_user = 'index.php?rub=user&todo=det&id=' . $data[$i]['user_id'];
$user_title = formatText($data[$i]['user_login']);
$pertinence = $GLOBALS['lang']['divers']['none'];
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $user_title . '';
$content .= '(' . $GLOBALS['lang']['divers']['date_crea'] . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchTheme()
* Affiche les theme répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchTheme($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_theme_search($keywords, $type, $searchtype));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['theme_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . 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 = $GLOBALS['lang']['divers']['none'];
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $theme_title . '';
$content .= '(' . $GLOBALS['lang']['divers']['date_crea'] . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchScale()
* Affiche les échelles répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchScale($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_scale_search($keywords, $type, $searchtype));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['scale_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . 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 = $GLOBALS['lang']['divers']['none'];
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $scale_title . '';
$content .= '(' . $GLOBALS['lang']['divers']['date_crea'] . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplaySearchLevel()
* Affiche les niveaux répondant à la requête sur $keywords
*
* @param string $keywords
* @return string $content
*/
function DisplaySearchLevel($keywords, $type, $searchtype)
{
$data = $GLOBALS['sql_object']->DBSelect(SQL_level_search($keywords, $type, $searchtype));
$content = '';
$content .= '
' . $GLOBALS['lang']['search']['level_module'] . '
' . END_LINE;
if (count($data) == 1 && $data == 0) $content .= '
' . $GLOBALS['lang']['search']['no_result'] . '
' . END_LINE;
else {
$content .= '
' . 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 = $GLOBALS['lang']['divers']['none'];
$published_display = $data[$i]['date_display'];
$content .= '- ' . END_LINE;
$content .= '' . $level_title . '';
$content .= '(' . $GLOBALS['lang']['divers']['date_crea'] . ' : ' . $published_display . GetStatus($data[$i]['statut']) . ')';
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
}
$content .= '
' . END_LINE;
echo $content;
}
/**
* DisplayQueryTime()
* Affiche le temps d'execution des requêtes
*
* @param float $start_time
* @param float $end_time
* @return string $content (echo)
*/
function DisplayQueryTime($start_time, $end_time)
{
$content = '' . END_LINE;
$content .= $GLOBALS['lang']['search']['query_time'] . ' ' . (substr($end_time - $start_time, 0, 5)) . ' ' . $GLOBALS['lang']['search']['query_seconds'];
$content .= '
' . END_LINE;
echo $content;
}
function DisplayAdvancedSearchForm()
{
$action = $GLOBALS['links']['resultats-recherche']['linkvalue'];
$content = '';
echo $content;
}
function FormatPertinenceIndice($float) {
$pertinence_i = ($float != 0) ? number_format(round($float, 3), 3, ',', ' ') : $GLOBALS['lang']['search']['score_not_good'];
$pertinence= '- ' . $GLOBALS['lang']['search']['score_abbr'] . ' : ' . $pertinence_i . '';
return $pertinence;
}
?>