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

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


//////////// Check Droits utilisateur ////////////
if (!$l21auth->isSuperAdmin()) ReloadIndex('admin');
////////////

$result = $sql_object->DBSelect($req_liste);

?>
<div id="chemin">
<ul>
	<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home');?></a></li>
	<li><a href="<?php echo $rub_link; ?>" id="chemin_<?php echo $rub; ?>" class="chemin_rub"> <?php echo _t('menu','level'); ?> </a></li>
	<li><span> <?php echo formatNavTitle(_t('level','list'));?> </span></li>
</ul>
</div>
<!--end barre haute -->
<?php
include_once(THEME_ADMIN_PATH."quickicons.php");
?>
<div class="contentcontainer"><?php
include_once(override($dir.'/menurub.php', THEME_ADMIN_PATH));
?>
<div id="content"><?php
$link_mod = $rub_link . "&amp;todo=mod&amp;id=";
$link_det = $rub_link . "&amp;todo=det&amp;id=";
$level_denomination = '';

for ($i = 0; $i < count($result);$i++) {
  $level_denomination .= "<li class=\"contextual-menu li1\">\n";
  $level_denomination .= "\t<a href=\"" . $link_det . $result[$i]['level_id'] . "\">";
  $level_denomination .= formatText($result[$i]['level_name'], '2HTML') . "</a>";
  if ($result[$i]['level_statut'] == 'D') $level_denomination .= "<span class=\"state\">" . _t('statut','draft') . "</span>";
  $level_denomination .= "\t<a href=\"" . $link_mod . $result[$i]['level_id'] . "\" class=\"ico_mod\" title=\"" . _t('level','mod') . "\"></a>\n";
  $level_denomination .= "\n</li>\n";
}

echo '<div  id="tree">'.END_LINE;
echo "<ul>\n<li><a href=\"#\">"._t('menu','level')."</a><ul>";
echo $level_denomination;
echo "</ul></li></ul>\n";
echo '</div>'.END_LINE;
?></div>
<?php include_once(override($dir.'/help.php', THEME_ADMIN_PATH)); ?>
</div>