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

Source for file quickbox.php

Documentation is available at quickbox.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage content
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Content' module is used by 'Publication' and 'Workshop' modules
  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.  
  19. //////////// Check Droits utilisateur ////////////
  20. if (!hasRight('publication'&& !hasRight('workshop')) ReloadIndex('admin');
  21. ///////////
  22.  
  23. $qbx_module=_t('menu',$mod_inc);
  24. if($type=='W'{
  25.   $quickbox_type=_t('contents','qb_title_type_W');
  26.   $suffix_css='w';
  27. }
  28. if($type=='P'{
  29.   $quickbox_type=_t('contents','qb_title_type_P');
  30.   $suffix_css='p';
  31. }
  32.  
  33. if ($todo == 'add' || $todo== 'det'{
  34.   if($type=='P'$req_quickbox=SQL_getPublicationParts($parent'CREA''Y'10);
  35.   if($type=='W'$req_quickbox=SQL_getWorkshopParts($parent'CREA''Y'10);
  36.   $result=$sql_object->DBSelect($req_quickbox);
  37.   $qbx_liste='';
  38.   $nb='';
  39.   if($result==0{
  40.     $qbx_liste.="<li>"._t('divers','nodata')."</li>";
  41.   else {
  42.     if(count($result)>=10$nb=10else $nb=count($result);
  43.     for($i=0$i<count($result)$i++{
  44.       $qbx_link='?rub=contents&amp;todo=det&amp;type='.$type.'&amp;parent='.$parent.'&amp;id=';
  45.       if($type=='P'{
  46.         $qbx_part_title=$result[$i]['publicon_title'];
  47.         $qbx_part_date=$result[$i]['publicon_date_crea_display'];
  48.         $qbx_link.=$result[$i]['publicon_id'];
  49.       }
  50.       if($type=='W'{
  51.         $qbx_part_title=$result[$i]['workrepcon_title'];
  52.         $qbx_part_date=$result[$i]['workrepcon_date_crea_display'];
  53.         $qbx_link.=$result[$i]['workrepcon_id'];
  54.       }
  55.       $qbx_part_title=formatText(cutText($qbx_part_title50)'2HTML');
  56.       $qbx_liste.="<li><a href=\"".$qbx_link."\" title=\""._t('divers','date_crea').": ".$qbx_part_date." \">"$qbx_part_title ."</a></li>\n";
  57.     }
  58.   }
  59.   $qbx_h1=$nb._t('contents','qb_titleadd');
  60.  
  61. }
  62. if ($todo == 'mod'{
  63.   if($type=='P'$req_quickbox=SQL_getPublicationParts($parent'MODIFY''Y'10);
  64.   if($type=='W'$req_quickbox=SQL_getWorkshopParts($parent'MODIFY''Y'10);
  65.   $result=$sql_object->DBSelect($req_quickbox);
  66.   $qbx_liste='';
  67.   $nb='';
  68.   if($result==0{
  69.     $qbx_liste.="<li>"._t('divers','nodata')."</li>";
  70.   else {
  71.     if(count($result)>=10$nb=10else $nb=count($result);
  72.     for($i=0$i<count($result)$i++{
  73.       $qbx_link='?rub=contents&amp;todo=det&amp;type='.$type.'&amp;parent='.$parent.'&amp;id=';
  74.       if($type=='P'{
  75.         $qbx_part_title=$result[$i]['publicon_title'];
  76.         $qbx_part_date_crea=$result[$i]['publicon_date_crea_display'];
  77.         $qbx_part_last_modify=$result[$i]['publicon_last_modify_display'];
  78.         $qbx_link.=$result[$i]['publicon_id'];
  79.             
  80.       }
  81.       if($type=='W'{
  82.         $qbx_part_title=$result[$i]['workrepcon_title'];
  83.         $qbx_part_date_crea=$result[$i]['workrepcon_date_crea_display'];
  84.         $qbx_part_last_modify=$result[$i]['workrepcon_last_modify_display'];
  85.         $qbx_link.=$result[$i]['workrepcon_id'];
  86.       }
  87.       $qbx_part_title=formatText(cutText($qbx_part_title50)'2HTML');
  88.       $qbx_liste.="<li><a href=\"".$qbx_link."\" title=\""._t('divers','last_modify')." ".$qbx_part_last_modify." - ("._t('divers','date_crea').": ".$qbx_part_date_crea.") \">"$qbx_part_title ."</a></li>\n";
  89.     }
  90.     $qbx_h1=$nb._t('contents','qb_titlemod');
  91.   }
  92.  
  93. }
  94. if ($todo == 'sup'{
  95.   if($type=='P'$req_quickbox=SQL_getPublicationParts($parent'MODIFY''N'10);
  96.   if($type=='W'$req_quickbox=SQL_getWorkshopParts($parent'MODIFY''N'10);
  97.   $result=$sql_object->DBSelect($req_quickbox);
  98.   $qbx_liste='';
  99.   $nb='';
  100.   if($result==0{
  101.     $qbx_liste.="<li>"._t('divers','nodata')."</li>";
  102.   else {
  103.     if(count($result)>=10$nb=10else $nb=count($result);
  104.     for($i=0$i<count($result)$i++{
  105.       if($type=='P'{
  106.         $qbx_part_title=$result[$i]['publicon_title'];
  107.         $qbx_part_date_crea=$result[$i]['publicon_date_crea_display'];
  108.         $qbx_part_last_modify=$result[$i]['publicon_last_modify_display'];
  109.       }
  110.       if($type=='W'{
  111.         $qbx_part_title=$result[$i]['workrepcon_title'];
  112.         $qbx_part_date_crea=$result[$i]['workrepcon_date_crea_display'];
  113.         $qbx_part_last_modify=$result[$i]['workrepcon_last_modify_display'];
  114.       }
  115.       $qbx_part_title=formatText(cutText($qbx_part_title50)'2HTML');
  116.       $qbx_liste.="<li><a href=\"#\" title=\""._t('divers','date_sup')." ".$qbx_part_last_modify." - ("._t('divers','date_crea').": ".$qbx_part_date_crea.") \">"$qbx_part_title ."</a></li>\n";
  117.     }
  118.   }
  119.   $qbx_h1=$nb._t('contents','qb_titlesup');
  120. }
  121. echo QuickBoxNow($qbx_module$qbx_h1$qbx_liste$suffix_css);
  122. echo "</div>\n";
  123. ?>

Documentation generated on Thu, 03 May 2012 15:07:25 +0200 by phpDocumentor 1.4.1