*/ include("session.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } $tab = array(); $tmp = array(); $tmp = $_SESSION['user']['tables']; for($i=0; $i < count($_SESSION['ressources']); $i++) { if(in_array($_SESSION['ressources'][$i]['tablename'], $tmp)) { array_push($tab,$_SESSION['ressources'][$i]); } } if(isset($_POST['table']) && !empty($_POST['table'])) { $_SESSION['tablechoice'] = $_POST['table']; require_once("class_functions.php"); require_once("class_db.php"); $db = new dbquery(); $db->connect(); $db->query("SELECT r.TYPE_ID, t.DESCRIPTION from ".$_SESSION['tablename']['doctypes']." t, ".$_SESSION['tablechoice']." r WHERE (r.TYPE_ID=t.TYPE_ID) and t.RES_TABLE = '".$_SESSION['tablechoice']."' GROUP BY r.TYPE_ID"); $i=0; $_SESSION['right_list'] = array(); $_SESSION['type_id'] = array(); while($line = $db->fetch_object()) { $_SESSION['type_id'][$i] = array("ID" => $line->TYPE_ID,"DESC" => $line->DESCRIPTION); $i++; } ?>