Example #1
0
    exit;
}
if (isset($_GET["caches-control"])) {
    cache_control();
    exit;
}
if (isset($_GET["AddCachedSitelist-js"])) {
    AddCachedSitelist_js();
    exit;
}
if (isset($_GET["AddCachedSitelist-popup"])) {
    AddCachedSitelist_popup();
    exit;
}
if (isset($_GET["refresh_pattern_site"])) {
    AddCachedSitelist_save();
    exit;
}
if (isset($_GET["AddCachedSitelist-delete"])) {
    AddCachedSitelist_js_delete();
    exit;
}
if (isset($_GET["sites-list"])) {
    WEBSITES_LIST();
    exit;
}
if (isset($_GET["delete-id"])) {
    AddCachedSitelist_delete();
    exit;
}
if (isset($_GET["js"])) {
	include_once('ressources/class.mysql.inc');
	include_once('ressources/class.ini.inc');
	include_once('ressources/class.squid.inc');
	include_once('ressources/class.system.network.inc');
	
	
	$user=new usersMenus();
	if($user->AsSquidAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}	
	if(isset($_GET["caches-control"])){cache_control();exit;}
	if(isset($_GET["AddCachedSitelist-js"])){AddCachedSitelist_js();exit;}
	if(isset($_GET["AddCachedSitelist-popup"])){AddCachedSitelist_popup();exit;}
	if(isset($_POST["refresh_pattern_site"])){AddCachedSitelist_save();exit;}
	if(isset($_GET["AddCachedSitelist-delete"])){AddCachedSitelist_js_delete();exit;}
	if(isset($_GET["sites-list"])){WEBSITES_LIST();exit;}
	if(isset($_GET["websites-search"])){WEBSITES_SEARCH();exit;}
	if(isset($_POST["add_default_settings"])){WEBSITES_DEFAULTS();exit;}
	if(isset($_POST["delete_all"])){WEBSITES_DELETE_ALL();exit;}
	if(isset($_GET["delete-id"])){AddCachedSitelist_delete();exit;}
	if(isset($_GET["js"])){js();exit;}
	
	
function js(){
	$sock=new sockets();
	$sock->SET_INFO("SquidAsSeenCache",1);
	header("content-type: application/x-javascript");
	$page=CurrentPageName();
	$tpl=new templates();