<?php
/**
 * @package linea21.modules
 * @subpackage sdi
 * @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']['sdi'];

if ($todo == 'add' || $todo == 'list') {
$resultqb=$sql_object->DBSelect($req_quickbox_list);
	$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_sdi_title=cutText($resultqb[$i]['sdii_name'], 50);
				$qbx_sdi_title=formatText($qbx_sdi_title, '2HTML');
				$qbx_liste.="<li><a href=\"index.php?id=". $resultqb[$i]['sdii_id'] ."&amp;rub=$rub&amp;todo=det\" title=\"".$GLOBALS['lang']['divers']['last_modify'].": ".$resultqb[$i]['sdii_last_modify']."  (".$GLOBALS['lang']['divers']['date_crea'].": ".$resultqb[$i]['sdii_date_crea'].") \">". $qbx_sdi_title ."</a></li>\n";
	}
	}
	$qbx_h1=$nb.''.$GLOBALS['lang']['sdi']['qb_add_title'];

} 	

if ($todo == 'mod' || $todo == 'mod_r'|| $todo == 'mod_e'|| $todo == 'mod_p'|| $todo == 'det' || $todo == 'sup') {
$resultqb=$sql_object->DBSelect($req_quickbox_mod_list);
$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_sdi_title=cutText($resultqb[$i]['sdii_name'], 50);
				$qbx_sdi_title=formatText($qbx_sdi_title, '2HTML');
				$qbx_liste.="<li><a href=\"index.php?id=". $resultqb[$i]['sdii_id'] ."&amp;rub=$rub&amp;todo=det\" title=\"".$GLOBALS['lang']['divers']['last_modify'].": ".$resultqb[$i]['sdii_last_modify']."  (".$GLOBALS['lang']['divers']['date_crea'].": ".$resultqb[$i]['sdii_date_crea'].") \">". $qbx_sdi_title ."</a></li>\n";
	}
	}
	$qbx_h1=$nb.''.$GLOBALS['lang']['sdi']['qb_mod_title'];

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


