function CurlGet($cmd) { if (is31()) { if ($GLOBALS["VERBOSE"]) { echo "squidclient({$cmd})\n"; } $data = squidclient($cmd); if ($GLOBALS["VERBOSE"]) { echo "squidclient({$cmd}) -> " . strlen($data) . " bytes\n"; } return $data; } if ($GLOBALS["VERBOSE"]) { echo "builduri({$cmd})\n"; } $curl = new ccurl(builduri($cmd)); $curl->ArticaProxyServerEnabled == "no"; $curl->interface = "127.0.0.1"; $curl->Timeout = 5; $curl->UseDirect = true; if (!$curl->get()) { return; } return $curl->data; }
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["install-status"])) { install_status(); exit; } if (isset($_GET["is31"])) { is31(); exit; } if (isset($_GET["current"])) { page(); exit; } if (isset($_GET["stables"])) { stables(); exit; } tabs(); function is31() { $sock = new sockets(); $page = CurrentPageName();
include_once('ressources/class.users.menus.inc'); include_once('ressources/class.groups.inc'); include_once('ressources/class.artica.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["install-status"])){install_status();exit;} if(isset($_GET["is31"])){is31();exit;} if(isset($_GET["current"])){page();exit;} if(isset($_GET["stables"])){stables();exit;} tabs(); function is31(){ $sock=new sockets(); $page=CurrentPageName(); $tpl=new templates(); $GlobalApplicationsStatus=$sock->APC_GET("GlobalApplicationsStatus",2); if($GlobalApplicationsStatus==null){$GlobalApplicationsStatus=base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));$sock->APC_SAVE("GlobalApplicationsStatus",$GlobalApplicationsStatus);$GLOBALS["GlobalApplicationsStatus"]=$GlobalApplicationsStatus;} $squid_version= ParseAppli($GlobalApplicationsStatus,"APP_SQUID"); if(preg_match("#^([0-9]+)\.([0-9]+)#", $squid_version,$re)){ $MAJOR=$re[1]; $MINOR=$re[2];