include_once('ressources/class.ini.inc'); include_once('ressources/class.squid.inc'); include_once('ressources/class.system.network.inc'); $user=new usersMenus(); if($user->AsWebStatisticsAdministrator==false){ $tpl=new templates(); echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');"; die();exit(); } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["tabs"])){tabs();exit;} if(isset($_GET["title"])){tables_title();exit;} if(isset($_GET["schedules"])){schedules();exit;} if(isset($_GET["purge-bydate"])){purge_bydate();exit;} if(isset($_POST["ArticaProxyStatisticsBackupFolder"])){Save();exit;} if(isset($_GET["backup-db-js"])){backup_db_js();exit;} if(isset($_POST["backup-db-perform"])){backup_db_perform();exit;} if(isset($_GET["remove-db-js"])){remove_database_js();exit;} if(isset($_POST["remove-all-data"])){remove_database_perform();exit;} js(); function js(){ header("content-type: application/x-javascript");
set_default_action(); switch (get_request_var('action')) { case 'save': form_save(); break; case 'actions': form_actions(); break; case 'edit': top_header(); schedule_edit(); bottom_footer(); break; default: top_header(); schedules(); bottom_footer(); break; } function schedule_delete() { $selected_items = sanitize_unserialize_selected_items(get_nfilter_request_var('selected_items')); if ($selected_items != false) { foreach ($selected_items as $id) { db_fetch_assoc('DELETE FROM plugin_maint_schedules WHERE id=' . $id . ' LIMIT 1'); db_fetch_assoc('DELETE FROM plugin_maint_hosts WHERE schedule =' . $id); } } header('Location: maint.php?header=false'); exit; }
include_once('ressources/class.ldap.ou.inc'); include_once('ressources/class.user.inc'); include_once(dirname(__FILE__).'/framework/class.unix.inc'); include_once(dirname(__FILE__).'/framework/frame.class.inc'); if(is_array($argv)){ if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;} if(preg_match("#--no-reload#",implode(" ",$argv))){$GLOBALS["NORELOAD"]=true;} if($GLOBALS["VERBOSE"]){ini_set('html_errors',0);ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);} } if($argv[1]=="--import"){import($argv[2]);die();} if($argv[1]=="--schedules"){schedules();die();} function import($ID){ $zimbra=new ldapOu($ID); $hash=$zimbra->searchUsers(); $ou=$zimbra->ou; if($ou==null){echo "Destination: no such ou\n";return;} if(preg_match("#zimbraAccount#",$zimbra->QueryUsers)){ $AsZimbra=true; } for($i=0;$i<$hash["count"];$i++){ importZimbra($hash[$i],$ou);