<?php
/**
 * @package linea21.modules
 * @subpackage workshop
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */

//////////// Check Inclusion de pages //////////// 
if (!function_exists('AuthenthificationProcess')){ 
include_once("../lib/lib_common.php");
ReloadIndex('admin');
}
////////////

$qbx_module=$GLOBALS['lang']['menu']['workshop'];

if ($todo == 'add') {
if (IsSuperAdmin()) $resultqb=$sql_object->DBSelect($req_quickbox_add);
else $resultqb=$sql_object->DBSelect($req_quickbox_add_noadmin);
	$qbx_liste='';
	$nb='';
	if($resultqb==0) {
		$qbx_liste.="<li>".$GLOBALS['lang']['divers']['nodata']."</li>";
	} else {	
		if(count($resultqb)>=10) $nb=10; else $nb=count($resultqb);
		for($i=0; $i<count($resultqb); $i++) {
				$qbx_title=cutText($resultqb[$i]['workshop_denomination'], 50);
				$qbx_title=formatText($qbx_title, '2HTML');
				$qbx_liste.="<li><a href=\"index.php?id=". $resultqb[$i]['workshop_id'] ."&amp;rub=".$rub."&amp;todo=det\" title=\"".$GLOBALS['lang']['divers']['date_crea'].": ".$resultqb[$i]['workshop_date_crea_display']." \">". $qbx_title ."</a></li>\n";
	}
	}
	$qbx_h1=$nb.''.$GLOBALS['lang']['workshop']['qb_titleadd'];

} 	

if ($todo == 'mod' || $todo == 'sup' || $todo == 'det' || $todo == 'list' || $todo == 'sup_u' || $todo == 'add_u' || $todo == 'mod_cal' || $todo == 'add_cal' || $todo == 'sup_cal' || $todo == 'list_cal' || $todo == 'list_com' || $todo == 'sup_com' || $todo == 'lock_com' || $todo == 'mod_com' || $todo == 'det_com' || $todo == 'add_com') {
if (IsSuperAdmin())  $resultqb=$sql_object->DBSelect($req_quickbox_mod);
else $resultqb=$sql_object->DBSelect($req_quickbox_mod_noadmin);
	$qbx_liste='';
	$nb='';
	if($resultqb==0) {
		$qbx_liste.="<li>".$GLOBALS['lang']['divers']['nodata']."</li>";
	} else {	
		if(count($resultqb)>=10) $nb=10; else $nb=count($resultqb);
		for($i=0; $i<count($resultqb); $i++) {
				$qbx_title=cutText($resultqb[$i]['workshop_denomination'], 50);
				$qbx_title=formatText($qbx_title, '2HTML');
				$qbx_liste.="<li><a href=\"index.php?id=". $resultqb[$i]['workshop_id'] ."&amp;rub=".$rub."&amp;todo=det\" title=\"".$GLOBALS['lang']['divers']['date_crea'].": ".$resultqb[$i]['workshop_date_crea_display']." \">". $qbx_title ."</a></li>\n";
	}
	}
	$qbx_h1=$nb.''.$GLOBALS['lang']['workshop']['qb_titlemod'];

} 	
	echo QuickBoxNow($qbx_module, $qbx_h1, $qbx_liste);
	echo "</div>\n";
?>


