Пример #1
0
include_once dirname(__FILE__) . '/ressources/class.mysql.inc';
include_once dirname(__FILE__) . '/ressources/class.system.nics.inc';
if ($argv[1] == "--stop") {
    wccp_stop();
    exit;
}
if ($argv[1] == "--remove") {
    wccp_remove();
    exit;
}
if ($argv[1] == "--reconfigure") {
    wccp();
    exit;
}
if ($argv[1] == "--squid") {
    squid();
    exit;
}
if ($argv[1] == "--build") {
    wccp();
    exit;
}
if ($argv[1] == "--verif") {
    wccp_verif();
    exit;
}
function build_progress($text, $pourc)
{
    if (!$GLOBALS["PROGRESS"]) {
        return;
    }
	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($_POST["ActAsASyslogServer"])){ActAsASyslogServerSave();exit;}
	if(isset($_GET["inline"])){popup();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["appliance-settings"])){appliance_settings();exit;}
	if(isset($_GET["squid-settings"])){squid();exit;}
	
	
js();


function js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{STATISTICS_APPLIANCE}");
	$html="YahooWin2(550,'$page?popup=yes','$title')";
	echo $html;
}

function popup(){
		$tpl=new templates();