if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);} include_once('ressources/class.templates.inc'); include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.squid.inc'); $usersmenus=new usersMenus(); if(!$usersmenus->AsSquidAdministrator){ $tpl=new templates(); $alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}'); echo "alert('$alert');"; die(); } if(isset($_POST["ProxyPacCacheTime"])){settings_save();exit;} if(isset($_GET["settings-js"])){settings_js();exit;} if(isset($_GET["settings-popup"])){settings_popup();exit;} if(isset($_POST["EmptyCache"])){EmptyCache();exit;} if(isset($_GET["tabs"])){tabs();exit;} if(isset($_GET["help"])){help();exit;} if(isset($_GET["events"])){events();exit;} if(isset($_GET["events-search"])){events_search();exit;} if(isset($_GET["events-script"])){events_script_js();exit;} if(isset($_GET["events-script-popup"])){events_script_popup();exit;} if(isset($_GET["events-script-tester-js"])){events_script_tester_js();exit;} if(isset($_GET["events-script-tester-popup"])){events_script_tester_popup();exit;} if(isset($_POST["TESTER-URL"])){events_script_tester_perform();exit;}
exit; } if (isset($_POST["storage-delete"])) { storage_delete(); exit; } if (isset($_GET["storage-view-search"])) { storage_view_search(); exit; } if (isset($_POST["delete-extracted"])) { storage_view_delete(); exit; } if (isset($_POST["LogRotateCompress"])) { settings_save(); exit; } if (isset($_GET["settings-popup"])) { settings_popup(); exit; } if (isset($_GET["log-retention-time-js"])) { log_retention_time_js(); exit; } if (isset($_GET["remote-nas-js"])) { remote_nas_js(); exit; } if (isset($_GET["remote-nas-popup"])) {
case 'updateoptions': if ($valuser->isadmin()) { search_updatelist_options(); } break; case 'settingsview': if ($valuser->isadmin()) { $page = frm_get('page', 1, 0); $reload = frm_get('reload', 2, 0); settings_edit($reload, $page); } break; case 'savesettings': if ($valuser->isadmin()) { $page = frm_get('page', 1, 0); settings_save($_POST, $page); settings_edit(1, $page); } break; case 'performupdate': if ($valuser->isadmin()) { if (frm_isset('followsymlinks')) { $setctl->set('followsymlinks', 1); } else { $setctl->set('followsymlinks', 0); } if (frm_isset('updusecache')) { $setctl->set('updusecache', 1); } else { $setctl->set('updusecache', 0); }
include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.squid.inc'); include_once('ressources/class.squid.accesslogs.inc'); include_once('ressources/class.tcpip.inc'); $usersmenus=new usersMenus(); if(!$usersmenus->AsDansGuardianAdministrator){ $tpl=new templates(); $alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}'); echo "alert('$alert');"; die(); } if(isset($_GET["parameters"])){page();exit;} if(isset($_POST["LogRotateCompress"])){settings_save();exit;} if(isset($_POST["BackupSquidLogsUseNas"])){remote_nas_save();exit;} if(isset($_GET["BackupLogsMaxStoragePercent-info"])){BackupLogsMaxStoragePercent_info();exit;} tabs(); function BackupLogsMaxStoragePercent_info(){ $sock=new sockets(); $tpl=new templates(); $data=$sock->getFrameWork("system.php?BackupLogsMaxStoragePercent-info=yes"); $DIRPART_INFO=unserialize(base64_decode($data)); $percent=$_GET["BackupLogsMaxStoragePercent-info"]/100; $TOTAL_PART=$DIRPART_INFO["TOT"]/1024;