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

Source for file quickbox.php

Documentation is available at quickbox.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage user
  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. //////////// Check Inclusion de pages ////////////
  12. if (!class_exists('auth')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. //////////// Check Droits utilisateur ////////////
  19. if (!$l21auth->isSuperAdmin()) ReloadIndex('admin');
  20. ////////////
  21.  
  22. $qbx_module = _t('menu','user');
  23.  
  24. if ($todo == 'add') {
  25.   $result = $sql_object->DBSelect($req_quickbox_add);
  26.   $qbx_liste = '';
  27.   $nb = '';
  28.   if ($result == 0) {
  29.     $qbx_liste .= "<li>" . _t('divers','nodata') . "</li>";
  30.   } else {
  31.     if (count($result) >= 10) $nb = 10;
  32.     else $nb = count($result);
  33.     for($i = 0; $i < count($result); $i++) {
  34.       $fullname = '';
  35.       if(!empty($result[$i]['profile_firstname']) || $result[$i]['profile_lastname']) {
  36.         $fullname = ' ('. $result[$i]['profile_firstname'].' '.$result[$i]['profile_lastname'].')';
  37.       }
  38.       $qbx_user_login = formatText(cutText($result[$i]['user_login']. $fullname, 50), '2HTML');
  39.       $qbx_liste .= "<li><a href=\"index.php?id=" . $result[$i]['user_id'] . "&amp;rub=" . $rub . "&amp;todo=det\" title=\"" . _t('divers','last_modify') . " " . $result[$i]['user_last_modify_display'] . " - (" . _t('divers','date_crea') . ": " . $result[$i]['user_date_crea_display'] . ") \">" . $qbx_user_login . "</a></li>\n";
  40.     }
  41.   }
  42.   $qbx_h1 = $nb . _t('user','qb_titleadd');
  43. }
  44.  
  45. if ($todo == 'mod' || $todo == 'list' || $todo == 'det') {
  46.   $result = $sql_object->DBSelect($req_quickbox_list);
  47.   $qbx_liste = '';
  48.   $nb = '';
  49.   if ($result == 0) {
  50.     $qbx_liste .= "<li>" . _t('divers','nodata') . "</li>";
  51.   } else {
  52.     if (count($result) >= 10) $nb = 10;
  53.     else $nb = count($result);
  54.     for($i = 0; $i < count($result); $i++) {
  55.       $fullname = '';
  56.       if(!empty($result[$i]['profile_firstname']) || $result[$i]['profile_lastname']) {
  57.         $fullname = ' ('. $result[$i]['profile_firstname'].' '.$result[$i]['profile_lastname'].')';
  58.       }
  59.       $qbx_user_login = formatText(cutText($result[$i]['user_login']. $fullname, 50), '2HTML');
  60.       $qbx_liste .= "<li><a href=\"index.php?id=" . $result[$i]['user_id'] . "&amp;rub=" . $rub . "&amp;todo=det\" title=\"" . _t('divers','last_modify') . " " . $result[$i]['user_last_modify_display'] . " - (" . _t('divers','date_crea') . ": " . $result[$i]['user_date_crea_display'] . ") \">" . $qbx_user_login . "</a></li>\n";
  61.     }
  62.   }
  63.   $qbx_h1 = $nb . _t('user','qb_titlemod');
  64. }
  65.  
  66. if ($todo == 'sup') {
  67.   $result = $sql_object->DBSelect($req_quickbox_sup);
  68.   $qbx_liste = '';
  69.   $nb = '';
  70.   if ($result == 0) {
  71.     $qbx_liste .= "<li>" . _t('divers','nodata') . "</li>";
  72.   } else {
  73.     if (count($result) >= 10) $nb = 10;
  74.     else $nb = count($result);
  75.     for($i = 0; $i < count($result); $i++) {
  76.       $fullname = '';
  77.       if(!empty($result[$i]['profile_firstname']) || $result[$i]['profile_lastname']) {
  78.           $fullname = ' ('. $result[$i]['profile_firstname'].' '.$result[$i]['profile_lastname'].')';
  79.       }
  80.       $qbx_user_login = formatText(cutText($result[$i]['user_login']. $fullname, 50), '2HTML');
  81.       $qbx_liste .= "<li><a href=\"#\" title=\"" . _t('divers','date_sup') . " " . $result[$i]['user_last_modify_display'] . " - (" . _t('divers','date_crea') . ": " . $result[$i]['user_date_crea_display'] . ") \">" . $qbx_user_login . "</a></li>\n";
  82.     }
  83.   }
  84.   $qbx_h1 = $nb . _t('user','qb_titlesup');
  85. }
  86.  
  87. echo QuickBoxNow($qbx_module, $qbx_h1, $qbx_liste);
  88. echo "</div>\n";
  89.  
  90. ?>

Documentation generated on Thu, 20 Mar 2014 16:49:26 +0100 by phpDocumentor 1.4.1