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

Source for file list.php

Documentation is available at list.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage home
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Home' module is used into the back-office
  10.  */
  11.  
  12. //////////// Check Inclusion de pages ////////////
  13. if (!function_exists('AuthenthificationProcess')){
  14.   include_once("../lib/lib_common.php");
  15.   ReloadIndex('admin');
  16. }
  17. ////////////
  18. if (isset($_COOKIE['linea21_lastcon'])) $date = date("Y-m-d", $_COOKIE['linea21_lastcon']);
  19. $result_yp = $sql_object -> DBSelect($req_yp);
  20. if ($result_yp[0]['yellowp_id']=="") $nb_yp=0;
  21. else $nb_yp = count($result_yp);
  22. $link_yp = "index.php?rub=yellowpages&amp;todo=det&amp;id=";
  23. $liste_yp = '';
  24.  
  25. if ($nb_yp<>0) {
  26.   for ($i = 0;$i < count($result_yp);$i++) {
  27.     $liste_yp .= "\t<li class=\"li2\"><a href=\"" . $link_yp . $result_yp[$i]['yellowp_id'] . "&amp;id=" . $result_yp[$i]['yellowp_id'] . "\" title=\"" . formatText($result_yp[$i]['yellowp_name'], '2ATT') . "\">" . formatText($result_yp[$i]['yellowp_name'], '2HTML') . "</a></li>\n\n";
  28.   }
  29. }else   $liste_yp .= "\t<li><div class=\"info\">" ._t('home','noupdate'). "</div></li>\n\n";
  30.  
  31.  
  32.  
  33. $result_sdi = $sql_object -> DBSelect($req_sdi);
  34. if ($result_sdi[0]['sdii_id']=="") $nb_dashboard=0;
  35. else $nb_dashboard = count($result_sdi);
  36. $liste_dashboard = '';
  37. $link_dashboard = "index.php?rub=dashboard&amp;todo=det&amp;id=";
  38. if ($nb_dashboard<>0) {
  39.   for ($i = 0;$i < count($result_sdi);$i++) {
  40.     $liste_dashboard .= "\t<li class=\"li2\"><a href=\"" . $link_dashboard . $result_sdi[$i]['sdii_id'] . "&amp;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";
  41.   }
  42. }else   $liste_dashboard .= "\t<li><div class=\"info\">" ._t('home','noupdate'). "</div></li>\n\n";
  43.  
  44. if (isset($_COOKIE['linea21_lastcon'])){
  45.   $req_user = SQL_getUser($date);
  46.   $resultu = $sql_object -> DBSelect($req_user);
  47.   if ($resultu[0]['user_id']=="") $nb_user=0;
  48.   else $nb_user = count($resultu);
  49.   $liste_user = '';
  50.   $link_user = "index.php?rub=user&amp;todo=det&amp;id=";
  51.   if ($nb_user<>0) {
  52.     for ($i = 0;$i < count($resultu);$i++) {
  53.       $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";
  54.     }
  55.   }else   $liste_user .= "\t<li><div class=\"info\">" ._t('home','noupdate'). "</div></li>\n\n";
  56. }
  57.  
  58. $result_news = $sql_object -> DBSelect($req_news);
  59. $liste_news = '';
  60. if ($result_news[0]['news_id']=="") $nb_news=0;
  61. else $nb_news = count($result_news);
  62. $link_news = "index.php?rub=news&amp;todo=det&amp;id=";
  63. if ($nb_news<>0) {
  64.   for ($i = 0;$i < count($result_news);$i++) {
  65.     $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";
  66.   }
  67. } else   $liste_news .= "\t<li><div class=\"info\">" ._t('home','noresult'). "</div></li>\n\n";
  68.  
  69.  
  70. $result_publi = $sql_object -> DBSelect($req_publi);
  71. $link_publi = "index.php?rub=publication&amp;todo=det&amp;id=";
  72. if ($result_publi[0]['publi_id']=="") $nb_publi=0;
  73. else $nb_publi = count($result_publi);
  74. 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";
  75. else  $liste_publi = "\t<li><div class=\"info\">" ._t('home','noresult'). "</div></li>\n\n";
  76.  
  77. $result_rep = $sql_object -> DBSelect($req_rep);
  78. if ($result_rep[0]['workrep_id']=="") $nb_rep=0;
  79. else $nb_rep = count($result_rep);
  80. $link_rep = "index.php?rub=workshoprep&amp;todo=det&amp;id=";
  81. 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";
  82. else  $liste_rep = "\t<li><div class=\"info\">" ._t('home','noresult'). "</div></li>\n\n";
  83.  
  84. $rProjects = $sql_object->DBSelect(SQL_getProjects(), 'OBJECT');
  85. $lProjects = '';
  86. if ($rProjects == 0) $nbProjects=0;
  87. else $nbProjects = count($rProjects);
  88. $link_projects = "index.php?rub=project&amp;todo=det&amp;id=";
  89. if ($nbProjects > 0) {
  90.   for ($i = 0;$i < count($rProjects);$i++) {
  91.     $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";
  92.   }
  93. } else   $lProjects .= "\t<li><div class=\"info\">" ._t('home','noresult'). "</div></li>\n\n";
  94.  
  95.  
  96. ?>
  97. <div id="chemin">
  98. <ul>
  99.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home') ?></a>
  100.     </li>
  101. </ul>
  102. </div>
  103. <!--end barre haute -->
  104. <?php
  105. include_once(THEME_ADMIN_PATH."quickicons.php");
  106.  
  107. ?>
  108. <div class="contentcontainer"><?php include_once($dir . "/menurub.php");
  109.  
  110. ?>
  111. <div id="content"><?php
  112. $listing = '';
  113. $listing .= "<div class=\"scale\">" . _t('home','accueil') . ": <a href=\"mailto:".MAIL_LINEA."\" title=\"".MAIL_LINEA."\">".MAIL_LINEA."</a></div>";
  114. $listing .= "<h2>" . _t('home','resume') . "</h2><br class=\"brendstep\" />";
  115.  
  116. if (HaveRight('dashboard') && defined('MOD_DASHBOARD') && MOD_DASHBOARD == 1) {
  117.   $listing .= "<div class=\"workshop_det\"><a href=\"#\" onclick=\"$('#general').slideToggle();\">" . $nb_dashboard . " " . _t('home','dashboard') . "</a></div>";
  118.   $listing .= "<div class=\"sdtheme\" id=\"general\" style=\"display:none;\" >\n";
  119.   $listing .= "<ul>\n";
  120.   $listing .= $liste_dashboard;
  121.   $listing .= "</ul>\n";
  122.   $listing .= "</div>\n";
  123. }
  124.  
  125. if (IsSuperAdmin() && defined('MOD_PROJECT') && MOD_PROJECT == 1) {
  126.   $listing .= "<div class=\"workshop_det\"><a href=\"#\" onclick=\"$('#projects').slideToggle();\">" . _t('home','project') . "</a></div>";
  127.   $listing .= "<div class=\"sdtheme\" id=\"projects\" style=\"display:none;\" >\n";
  128.   $listing .= "<ul>\n";
  129.   $listing .= $lProjects;
  130.   $listing .= "</ul>\n";
  131.   $listing .= "</div>\n";
  132. }
  133.  
  134. if (HaveRight('category_user') && defined('MOD_USER') && MOD_USER == 1){
  135.   if (isset($_COOKIE['linea21_lastcon'])){
  136.     $listing .= "<div class=\"workshop_det\"><a href=\"#\" onclick=\"$('#user').slideToggle();\">" . $nb_user . " " . _t('home','user') . "</a></div>";
  137.     $listing .= "<div class=\"sdtheme\" id=\"user\" style=\"display:none;\" >\n";
  138.     $listing .= "<ul>\n";
  139.     $listing .= $liste_user;
  140.     $listing .= "</ul>\n";
  141.     $listing .= "</div>\n";
  142.   }
  143. }
  144. if (IsSuperAdmin() && defined('MOD_WORKSHOP') && MOD_WORKSHOP == 1){
  145.   $listing .= "<div class=\"workshop_det\"><a href=\"#\" onclick=\"$('#yp').slideToggle();\">" . $nb_yp . " " . _t('home','yp') . "</a></div>";
  146.   $listing .= "<div class=\"sdtheme\" id=\"yp\" style=\"display:none;\" >\n";
  147.   $listing .= "<ul>\n";
  148.   $listing .= $liste_yp;
  149.   $listing .= "</ul>\n";
  150.   $listing .= "</div>\n";
  151. }
  152. if (HaveRight('news') && defined('MOD_NEWS') && MOD_NEWS == 1){
  153.   $listing .= "<div class=\"h2sdtheme\"><span>" . _t('home','news') . "</span></div>";
  154.   $listing .= "<div class=\"sdtheme\">\n";
  155.   $listing .= "<ul>\n";
  156.   $listing .= $liste_news;
  157.   $listing .= "</ul>\n";
  158.   $listing .= "</div>\n";
  159. }
  160. if (HaveRight('publication') && defined('MOD_PUBLICATION') && MOD_PUBLICATION == 1) {
  161.   $listing .= "<div class=\"h2sdtheme\"><span>" . _t('home','publi') . "</span></div>";
  162.   $listing .= "<div class=\"sdtheme\">\n";
  163.   $listing .= "<ul>\n";
  164.   $listing .= $liste_publi;
  165.   $listing .= "</ul>\n";
  166.   $listing .= "<div class=\"scale\">" . formatText($result_publi[0]['publi_resume'], '2HTML') . "</div>";
  167.   $listing .= "</div>\n";
  168. }
  169. if (HaveRight('workshop') && defined('MOD_WORKSHOP') && MOD_WORKSHOP == 1){
  170.   $listing .= "<div class=\"h2sdtheme\"><span>" . _t('home','report') . "</span></div>";
  171.   $listing .= "<div class=\"sdtheme\">\n";
  172.   $listing .= "<ul>\n";
  173.   $listing .= $liste_rep;
  174.   $listing .= "</ul>\n";
  175.   $listing .= "<div class=\"scale\">" . formatText($result_rep[0]['workrep_resume'], '2HTML') . "</div>";
  176.   $listing .= "</div>\n";
  177. }
  178.  
  179. echo $listing;
  180.  
  181. ?></div>
  182. <?php include_once($dir . "/help.php");
  183.  
  184. ?></div>

Documentation generated on Fri, 16 Oct 2009 09:35:50 +0200 by phpDocumentor 1.4.1