*/ 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..."; } $func = new functions(); $_SESSION["rediriger"]=false; if($_GET['cancel']) { $_SESSION["popup_suite"] = true; $_SESSION['diff'] = $_SESSION['liste_originale']; ?> 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"; } if( !isset($_GET['what_users']) && !isset($_GET['what_services']) ) $where = " AND 1=0 "; if($_SESSION['config']['show_only_elu_in_mailing_list'] == 'true') $where .= "AND u.ELU = 'Y' "; $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 =""; if(isset($_GET['action']) && $_GET['action'] == "add" ) { if(isset($_GET['id']) && !empty($_GET['id'])) { $id = $_GET['id']; $find = false; for($i=0; $i < count($_SESSION['diff']); $i++) { if($id == $_SESSION['diff'][$i]['UserID']) { $find = true; break; } } if( $find == false) { $conn = new dbquery(); $conn->connect(); $conn->query("SELECT u.FIRSTNAME, u.LASTNAME, u.DEPARTMENT, u.MAIL, s.SERVICE 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'], array( "UserID" => $id, "FirstName" =>$line->FIRSTNAME, "LastName"=>$line->LASTNAME, "Service_id"=>$line->DEPARTMENT, "Service"=>$line->SERVICE, "Mail"=>$line->MAIL )); } } } else if(isset($_GET['action']) && $_GET['action'] == "remove" ) { $rang = $_GET['rang']; unset( $_SESSION['diff'][$rang] ); $_SESSION['diff'] = array_values($_SESSION['diff']); } else if(isset($_GET['action']) && $_GET['action'] == "up" ) { $rang = $_GET['rang']; $temp = $_SESSION['diff'][$rang]; $_SESSION['diff'][$rang] = $_SESSION['diff'][$rang-1]; $_SESSION['diff'][$rang-1] = $temp; } else if(isset($_GET['action']) && $_GET['action'] == "down" ) { $rang = $_GET['rang']; $temp = $_SESSION['diff'][$rang]; $_SESSION['diff'][$rang] = $_SESSION['diff'][$rang+1]; $_SESSION['diff'][$rang+1] = $temp; } $func = new functions(); $time = $func->get_session_time_expire(); ?> "._CHOOSE_DEPARTMENT_FIRST.". " . ""; } else { $link = "popup_diff_view.php"; ?> / /> /> 0) { ?> 0) { ?> $value) { if(is_array($_SESSION['mail_action'][$key]) && !empty($value['label']) ) { ?> > 1){?> 1) { ?> > $value) { if(is_array($_SESSION['mail_action'][$key]) && !empty($value['label']) ) { ?> > 0 ) { ?> > . . . . .
. .
.