*/ include("session.php"); require_once("class_functions.php"); require_once("class_db.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } $funct= new functions(); $res_id =$_SESSION['courrier']['res_id']; $func = new functions(); $_SESSION["rediriger"]=false; if($_GET['cancel']) { //$_SESSION["popup_suite"] = true; $_SESSION['diff_copy'] = $_SESSION['liste_originale']; ?> connect(); $conn->query("delete from ".$_SESSION['tablename']['listinstance']." where res_id = ".$res_id." and sequence > 1"); for($i=2;$i < (count($_SESSION['diff_copy']) + 2); $i++) { $conn->query("insert into ".$_SESSION['tablename']['listinstance']." (res_table, res_id, sequence, user_id) values('res_x', '".$res_id."',".$i.", '".$_SESSION['diff_copy'][$i-2]['UserID']."')"); } ?> 0) { $user_access = "and department in ("; for($t=0; $twash($_GET['what_users'], "no", "", "no")); $where .= " AND (u.LASTNAME like '%".strtolower($what_users)."%' OR u.LASTNAME like '%".strtoupper($what_users)."%' OR u.FIRSTNAME like '%".strtolower($what_users)."%' OR u.FIRSTNAME like '%".strtoupper($what_users)."%') "; $orderby = " ORDER BY u.LASTNAME asc, u.FIRSTNAME asc,s.SERVICE asc"; } if(isset($_GET['what_services']) && !empty($_GET['what_services']) ) { $what_services = addslashes($func->wash($_GET['what_services'], "no", "", "no")); $where .= " AND (s.SERVICE like '%".strtolower($what_services)."%' OR s.SERVICE like '%".strtoupper($what_services)."%')"; $orderby = " ORDER BY s.SERVICE asc, u.LASTNAME asc, u.FIRSTNAME asc"; } $db = new dbquery(); $db->connect(); $db->query("select u.USER_ID, u.FIRSTNAME, u.LASTNAME, u.DEPARTMENT, u.MAIL, s.SERVICE FROM ".$_SESSION['tablename']['users']." u, ".$_SESSION['tablename']['services']." s WHERE u.DEPARTMENT = s.ID and STATUS <> 'DEL' AND u.ENABLED = 'Y' ".$user_access." ".$where.$orderby); //$db->show(); $i=0; while($line = $db->fetch_object()) { array_push($users, array("ID" => $line->USER_ID, "PRENOM" => $line->FIRSTNAME, "NOM" => $line->LASTNAME, "DEP_ID" => $line->DEPARTMENT, "MAIL" => $line->MAIL, "DEP" =>$line->SERVICE)); } $id = ""; $desc =""; //print_r($users); if(isset($_GET['action']) && $_GET['action'] == "add" ) { if(isset($_GET['id']) && !empty($_GET['id'])) { $id = $_GET['id']; $find = false; for($i=0;$iconnect(); $conn->query("SELECT u.firstname, u.lastname, u.department, u.mail, s.id from ".$_SESSION['tablename']['users']." u, ".$_SESSION['tablename']['services']." s WHERE s.id = u.department and user_id='".$id."'"); $line = $conn->fetch_object(); array_push($_SESSION['diff_copy'], array("UserID" => $id, "FirstName" =>$line->firstname, "LastName"=>$line->lastname, "Service"=>$line->id, "Mail"=>$line->mail )); } } } else if(isset($_GET['action']) && $_GET['action'] == "remove" ) { $rang = $_GET['rang']; unset( $_SESSION['diff_copy'][$rang] ); $_SESSION['diff_copy'] = array_values($_SESSION['diff_copy']); } $func = new functions(); $time = $func->get_session_time_expire(); ?> <?php echo $_SESSION['config']['applicationname']; ?> <?php echo _CC_LIST;?>

/>
/>






0 ) { ?>

>
 





>
 


>