<?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');
}
// //////////


$req_liste = "SELECT * FROM " . T_LEVEL . " WHERE level_statut<>'E' ORDER BY level_range ASC;";

$req_quickbox_list = "SELECT level_id, level_name, DATE_FORMAT(level_last_modify, '".toStringSqlDate('long')."') AS level_last_modify, level_last_modify AS level_last_modify2, DATE_FORMAT(level_date_crea, '".toStringSqlDate()."') AS level_date_crea
						FROM " . T_LEVEL . "
						WHERE level_statut <> 'E'
						ORDER BY level_last_modify2 DESC
						LIMIT 0 , 10;";

function SQL_getdetlevel($level_id)
{
  $req_det = "SELECT level_name, level_description, level_comment, level_visual_identity, level_range, DATE_FORMAT(level_last_modify, '".toStringSqlDate('long')."') AS level_last_modify, DATE_FORMAT(level_date_crea, '".toStringSqlDate()."') AS level_date_crea, level_statut FROM " . T_LEVEL . " WHERE level_id =" . $level_id . ";";
  return $req_det;
}

function SQL_getonelevel($level_id)
{
  $req_one_level = "SELECT level_id, level_name, level_description, level_comment, level_visual_identity, level_range, level_statut FROM " . T_LEVEL . " WHERE level_statut<>'E' AND level_id=" . $level_id . ";";
  return $req_one_level;
}

?>