Source for file list.php
Documentation is available at list.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* 'Home' module is used into the back-office
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
if(defined('MOD_COMMENT') && MOD_COMMENT == 1) {
include_once(themePath('../comment/display.php'));
include_once(themePath('../comment/'. SQL. '.inc.php'));
include_once('../class/class.comment.php');
if(COMMENT_MODERATION == 1) {
$data = $comm->getAllByModule($status, $sql_object, false, 'date');
$nb_comments = count($data);
$data = $comm->getAllByModule($status, $sql_object, 10, 'date');
$nb_comments = count($data);
if (isset ($_COOKIE['linea21_lastcon'])) $date = date("Y-m-d", $_COOKIE['linea21_lastcon']);
$result_yp = $sql_object -> DBSelect($req_yp);
if ($result_yp[0]['yellowp_id']== "") $nb_yp= 0;
else $nb_yp = count($result_yp);
$link_yp = "index.php?rub=yellowpages&todo=det&id=";
for ($i = 0;$i < count($result_yp);$i++ ) {
$liste_yp .= "\t<li class=\"li2\"><a href=\"" . $link_yp . $result_yp[$i]['yellowp_id'] . "\" title=\"" . formatText($result_yp[$i]['yellowp_name'], '2ATT') . "\">" . formatText($result_yp[$i]['yellowp_name'], '2HTML') . "</a></li>\n\n";
}else $liste_yp .= "\t<li><div class=\"info\">" . _t('home','noupdate'). "</div></li>\n\n";
$result_sdi = $sql_object -> DBSelect($req_sdi);
if ($result_sdi[0]['sdii_id']== "") $nb_dashboard= 0;
else $nb_dashboard = count($result_sdi);
$link_dashboard = "index.php?rub=dashboard&todo=det&id=";
for ($i = 0;$i < count($result_sdi);$i++ ) {
$liste_dashboard .= "\t<li class=\"li2\"><a href=\"" . $link_dashboard . $result_sdi[$i]['sdii_id'] . "&scale_id=" . $result_sdi[$i]['scale_id'] . "\" title=\"" . formatText($result_sdi[$i]['sdii_name'], '2ATT') . "\">" . formatText($result_sdi[$i]['sdii_name'], '2HTML') . "</a> <span class=\"scale\"> (" . formatText($result_sdi[$i]['scale_denomination'], '2HTML') . ") </span></li>\n\n";
}else $liste_dashboard .= "\t<li><div class=\"info\">" . _t('home','noupdate'). "</div></li>\n\n";
if (isset ($_COOKIE['linea21_lastcon'])){
$resultu = $sql_object -> DBSelect($req_user);
if ($resultu[0]['user_id']== "") $nb_user= 0;
else $nb_user = count($resultu);
$link_user = "index.php?rub=user&todo=det&id=";
for ($i = 0;$i < count($resultu);$i++ ) {
$liste_user .= "\t<li class=\"li2\"><a href=\"" . $link_user . $resultu[$i]['user_id'] . "\" title=\"" . formatText($resultu[$i]['user_login'], '2ATT') . "\">" . formatText($resultu[$i]['user_login'], '2HTML') . "</a></li>\n\n";
}else $liste_user .= "\t<li><div class=\"info\">" . _t('home','noupdate'). "</div></li>\n\n";
$result_news = $sql_object -> DBSelect($req_news);
if ($result_news[0]['news_id']== "") $nb_news= 0;
else $nb_news = count($result_news);
$link_news = "index.php?rub=news&todo=det&id=";
for ($i = 0;$i < count($result_news);$i++ ) {
$liste_news .= "\t<li class=\"li2\"><a href=\"" . $link_news . $result_news[$i]['news_id'] . "\" title=\"" . formatText($result_news[$i]['news_title'], '2ATT') . "\">" . formatText($result_news[$i]['news_title'], '2HTML') . "</a></li>\n\n";
} else $liste_news .= "\t<li><div class=\"info\">" . _t('home','noresult'). "</div></li>\n\n";
$result_publi = $sql_object -> DBSelect($req_publi);
$link_publi = "index.php?rub=publication&todo=det&id=";
if ($result_publi[0]['publi_id']== "") $nb_publi= 0;
else $nb_publi = count($result_publi);
if ($nb_publi<> 0) $liste_publi = "\t<li class=\"li2\"><a href=\"" . $link_publi . $result_publi[0]['publi_id'] . "\" title=\"" . formatText($result_publi[0]['publi_title'], '2HTML') . "\">" . formatText($result_publi[0]['publi_title'], '2HTML') . "</a></li>\n\n";
else $liste_publi = "\t<li><div class=\"info\">" . _t('home','noresult'). "</div></li>\n\n";
$result_rep = $sql_object -> DBSelect($req_rep);
if ($result_rep[0]['workrep_id']== "") $nb_rep= 0;
else $nb_rep = count($result_rep);
$link_rep = "index.php?rub=workshoprep&todo=det&id=";
if ($nb_rep<> 0) $liste_rep = "\t<li class=\"li2\"><a href=\"" . $link_rep . $result_rep[0]['workrep_id'] . "\" title=\"" . formatText($result_rep[0]['workrep_title'], '2ATT') . "\">" . formatText($result_rep[0]['workrep_title'], '2HTML') . "</a></li>\n\n";
else $liste_rep = "\t<li><div class=\"info\">" . _t('home','noresult'). "</div></li>\n\n";
if ($rProjects == 0) $nbProjects= 0;
else $nbProjects = count($rProjects);
$link_projects = "index.php?rub=project&todo=det&id=";
for ($i = 0;$i < count($rProjects);$i++ ) {
$lProjects .= "\t<li class=\"li2\"><a href=\"" . $link_projects . $rProjects[$i]->project_id . "\" title=\"" . formatText($rProjects[$i]->project_name, '2ATT') . "\">" . formatText($rProjects[$i]->project_name, '2HTML') . ' ('. $rProjects[$i]->project_estimated_date_display . ")</a></li>\n\n";
} else $lProjects .= "\t<li><div class=\"info\">" . _t('home','noresult'). "</div></li>\n\n";
<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home') ?></a>
include_once(THEME_ADMIN_PATH. "quickicons.php");
<div class="contentcontainer"> <?php include_once($dir . "/menurub.php");
$listing .= "<div class=\"scale\">" . _t('home','accueil') . ": <a href=\"mailto:". MAIL_LINEA. "\" title=\"". MAIL_LINEA. "\">". MAIL_LINEA. "</a></div>";
$listing .= "<h2>" . _t('home','resume') . "</h2><br class=\"brendstep\" />";
if(COMMENT_MODERATION == 1) {
$title = sprintf(_t('home','comment_to_moderate'), '<span id="cc">'. $nb_comments. '</span>');
$title = sprintf(_t('home','comment'), $nb_comments);
$listing .= "<div class=\"toggle_title\"><a href=\"#\" onclick=\"$('#comments').slideToggle(); return false;\">" . $title. "</a></div>";
$listing .= "<div class=\"contboxgray\" id=\"comments\" >\n";
if(!empty($html_comments)) $listing .= $html_comments;
else $listing .= "<div class=\"info\">". _t('home','noresult'). "</div>";
if (hasRight('dashboard') && defined('MOD_DASHBOARD') && MOD_DASHBOARD == 1) {
$listing .= "<div class=\"toggle_title\"><a href=\"#\" onclick=\"$('#general').slideToggle(); return false;\">" . $nb_dashboard . " " . _t('home','dashboard') . "</a></div>";
$listing .= "<div class=\"contboxgray\" id=\"general\" style=\"display:none;\" >\n";
$listing .= $liste_dashboard;
$listing .= "<div class=\"toggle_title\"><a href=\"#\" onclick=\"$('#projects').slideToggle(); return false;\">" . _t('home','project') . "</a></div>";
$listing .= "<div class=\"contboxgray\" id=\"projects\" style=\"display:none;\" >\n";
if (isset ($_COOKIE['linea21_lastcon'])){
$listing .= "<div class=\"toggle_title\"><a href=\"#\" onclick=\"$('#user').slideToggle(); return false;\">" . $nb_user . " " . _t('home','user') . "</a></div>";
$listing .= "<div class=\"contboxgray\" id=\"user\" style=\"display:none;\" >\n";
$listing .= "<div class=\"toggle_title\"><a href=\"#\" onclick=\"$('#yp').slideToggle(); return false;\">" . $nb_yp . " " . _t('home','yp') . "</a></div>";
$listing .= "<div class=\"contboxgray\" id=\"yp\" style=\"display:none;\" >\n";
$listing .= "<h3>" . _t('home','news') . "</h3>";
$listing .= "<div class=\"contboxgray\">\n";
if (hasRight('publication') && defined('MOD_PUBLICATION') && MOD_PUBLICATION == 1) {
$listing .= "<h3>" . _t('home','publi') . "</h3>";
$listing .= "<div class=\"contboxgray\">\n";
$listing .= $liste_publi;
$listing .= "<div class=\"scale\">" . formatText($result_publi[0]['publi_resume'], '2HTML') . "</div>";
$listing .= "<h3>" . _t('home','report') . "</h3>";
$listing .= "<div class=\"contboxgray\">\n";
$listing .= "<div class=\"scale\">" . formatText($result_rep[0]['workrep_resume'], '2HTML') . "</div>";
<?php include_once($dir . "/help.php");
|