Example #1
0
function render_page($content=null){

$hour=date('h');
$key_cache="CACHEINFOS_STATUSSEVERREDNDER$hour";
if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];}
unset($_SESSION["DISTRI"]);

include_once('ressources/class.os.system.inc');
include_once("ressources/class.os.system.tools.inc");
if(!isset($_SESSION["DISTRI"])){
	$sys=new systeminfos();
	writelogs('Loading datas system for session',__FUNCTION__,__FILE__);
	$distri=$sys->ditribution_name;
	$kernel=$sys->kernel_version;
	$LIBC=$sys->libc_version;
	$temp=$sys->GetCpuTemp();
	$users=new usersMenus();
	$os=new os_system();
	$arraycpu=$os->cpu_info();
	$cpuspeed=round(($arraycpu["cpuspeed"]/1000*100)/100,2); 
	$host=$users->hostname;
	$publicip=@file_get_contents("ressources/logs/web/myIP.conf");

	$distri="<table style='width:100%;color:white;font-size:11px'>
				<tr>
					<td valign='top' style='font-size:12px'>
						<strong>{server}</strong>:&nbsp;$host<br><br>{public_ip}:&nbsp;<strong>$publicip</strong><br><strong> {$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz</strong>
					</td>
					<td valign='top' style='font-size:12px'>
						<strong>Artica&nbsp;$users->ARTICA_VERSION&nbsp;$distri&nbsp;kernel $kernel<br>libc $LIBC&nbsp;&nbsp;&Temp $temp&nbsp;C</strong>
					</td>
				</tr>
			</table>";
	
	$_SESSION["DISTRI"]=$distri;
}else{
	$distri=$_SESSION["DISTRI"];
}

$distri_logo="img/serv-mail-linux.png";
if(is_file("img/$users->LinuxDistriCode.png")){$distri_logo="img/$users->LinuxDistriCode.png";}
if(is_file("img/$users->LinuxDistriCode.gif")){$distri_logo="img/$users->LinuxDistriCode.gif";}

$artica=new artica_general();
	
	
	
	$html="
	<table style='width:100%;background-color:#005446'>
		<tr>
			<td style='background-color:#005447;margin:0px;padding:0px;border:0px'>
				<table style='width:100%;margin:0px;padding:0px;border:0px'>
				<tr>
					<td width=1%>
						<img src='$distri_logo'>
					</td>
					<td valign='top'>
							<table style='width:100%'>
								<tr>
									<td valign='top'><span style='color:white;font-size:18px;font-weight:bold'>{manage_your_server}</td>
								</tr>
								<tr>
								<td valign='top' style='padding-top:3px;border-top:1px dotted white;font-size:11px'>
									$distri
								</td>
								</tr>
							</table>
					</td>
				</tr>
				</table>
			 </td>
			</tr>
		<tr style='margin:0px;padding:0px;border:0px'>
			<td valign='top' style='background-color:#005446;margin:0px;padding:0px;border:0px'>
					$content
			</td>
		</tr>
	</table>
		<table style='width:100%;background-color:white'>
			<tr>
				<td width=1%>" . Field_checkbox('ConfigureYourserverStart',1,$artica->ArticaFirstWizard,"OnClick=\"javascript:ConfigureYourserver_Cancel();\"")."</td>
				<td align='left'>{disable_startup}</td>
			</tr>
		</table>	
	";
	$_SESSION[$key_cache]=$html;
	return $html;
	
	
}
Example #2
0
function section_computer_header()
{
    $hour = date('h');
    $key_cache = "CACHEINFOS_STATUSSEVERREDNDER{$hour}";
    //if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];}
    unset($_SESSION["DISTRI"]);
    include_once 'ressources/class.os.system.inc';
    include_once "ressources/class.os.system.tools.inc";
    $sock = new sockets();
    $datas = unserialize($sock->getFrameWork("services.php?dmicode=yes"));
    $img = "img/server-256.png";
    $foundChassis = false;
    if (is_array($datas)) {
        $proc_type = $datas["PROC_TYPE"];
        $MANUFACTURER = $datas["MANUFACTURER"];
        $PRODUCT = $datas["PRODUCT"];
        $CHASSIS = $datas["CHASSIS"];
        $md5Chassis = md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}");
        if (is_file("img/vendors/{$md5Chassis}.jpg")) {
            $img = "img/vendors/{$md5Chassis}.jpg";
            $foundChassis = true;
        }
        if (is_file("img/vendors/{$md5Chassis}.jpeg")) {
            $img = "img/vendors/{$md5Chassis}.jpeg";
            $foundChassis = true;
        }
        if (is_file("img/vendors/{$md5Chassis}.png")) {
            $img = "img/vendors/{$md5Chassis}.png";
            $foundChassis = true;
        }
    }
    if (!$foundChassis) {
        $chassis_serial = "<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{serial}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$md5Chassis}</td>\n\t\t\t\t</tr>";
    }
    if (!isset($_SESSION["DISTRI"])) {
        $sys = new systeminfos();
        writelogs('Loading datas system for session', __FUNCTION__, __FILE__);
        $distri = $sys->ditribution_name;
        $kernel = $sys->kernel_version;
        $LIBC = $sys->libc_version;
        $temp = $sys->GetCpuTemp();
        $users = new usersMenus();
        $os = new os_system();
        $arraycpu = $os->cpu_info();
        $cpuspeed = round($arraycpu["cpuspeed"] / 1000 * 100 / 100, 2);
        $host = $users->hostname;
        $publicip = @file_get_contents("ressources/logs/web/myIP.conf");
        $distri_logo = "img/serv-mail-linux.png";
        if (is_file("img/{$users->LinuxDistriCode}.png")) {
            $distri_logo = "img/{$users->LinuxDistriCode}.png";
        }
        if (is_file("img/{$users->LinuxDistriCode}.gif")) {
            $distri_logo = "img/{$users->LinuxDistriCode}.gif";
        }
        $distri = "\n\t<center>\n\t\n\t\n\t<table style='width:100%;color:black;' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2 align=center><img src='{$img}'></td>\n\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{server}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$host}</strong><br><strong>{$MANUFACTURER} {$PRODUCT} {$CHASSIS}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{public_ip}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$publicip}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{processors}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>{$proc_type}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>Artica:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$users->ARTICA_VERSION}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t<td valign='top' style='font-size:12px'><img src='{$distri_logo}'></td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$distri}<br>kernel {$kernel}\n\t\t\t\t\t<br>libc {$LIBC}<br>Temp {$temp}&nbsp;C</strong>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t{$chassis_serial}\n\t\t\t</table>\n</center>";
        $_SESSION["DISTRI"] = $distri;
    } else {
        $distri = $_SESSION["DISTRI"];
    }
    $html = "{$distri}";
    $_SESSION[$key_cache] = $html;
    return $html;
}
Example #3
0
function section_computer_header()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return null;
    }
    $hour = date('h');
    $key_cache = "CACHEINFOS_STATUSSEVERREDNDER{$hour}";
    $page = CurrentPageName();
    //if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];}
    unset($_SESSION["DISTRI"]);
    include_once 'ressources/class.os.system.inc';
    include_once "ressources/class.os.system.tools.inc";
    $sock = new sockets();
    $datas = unserialize($sock->getFrameWork("services.php?dmicode=yes"));
    $img = "img/server-256.png";
    $foundChassis = false;
    if (is_array($datas)) {
        $proc_type = $datas["PROC_TYPE"];
        $MANUFACTURER = $datas["MANUFACTURER"];
        $PRODUCT = $datas["PRODUCT"];
        $CHASSIS = $datas["CHASSIS"];
        $md5Chassis = md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}");
        if (is_file("img/vendors/{$md5Chassis}.jpg")) {
            $img = "img/vendors/{$md5Chassis}.jpg";
            $foundChassis = true;
        }
        if (is_file("img/vendors/{$md5Chassis}.jpeg")) {
            $img = "img/vendors/{$md5Chassis}.jpeg";
            $foundChassis = true;
        }
        if (is_file("img/vendors/{$md5Chassis}.png")) {
            $img = "img/vendors/{$md5Chassis}.png";
            $foundChassis = true;
        }
    }
    if (!$foundChassis) {
        $chassis_serial = "<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{serial}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$md5Chassis}</td>\n\t\t\t\t</tr>";
    }
    if (!isset($_SESSION["DISTRI"])) {
        $sys = new systeminfos();
        writelogs('Loading datas system for session', __FUNCTION__, __FILE__);
        $distri = $sys->ditribution_name;
        $kernel = $sys->kernel_version;
        $LIBC = $sys->libc_version;
        $temp = $sys->GetCpuTemp();
        $users = new usersMenus();
        $os = new os_system();
        $arraycpu = $os->cpu_info();
        $cpuspeed = round($arraycpu["cpuspeed"] / 1000 * 100 / 100, 2);
        $host = $users->hostname;
        $publicip = @file_get_contents("ressources/logs/web/myIP.conf");
        $distri_logo = "img/serv-mail-linux.png";
        if (is_file("img/{$users->LinuxDistriCode}.png")) {
            $distri_logo = "img/{$users->LinuxDistriCode}.png";
        }
        if (is_file("img/{$users->LinuxDistriCode}.gif")) {
            $distri_logo = "img/{$users->LinuxDistriCode}.gif";
        }
        if (preg_match("#Broken pipevmware#i", $MANUFACTURER)) {
            $MANUFACTURER = "VMWare";
        }
        if (preg_match("#Broken pipevmware#i", $PRODUCT)) {
            $PRODUCT = "VMWare";
        }
        if (preg_match("#Broken pipevmware#i", $CHASSIS)) {
            $CHASSIS = "VMWare";
        }
        if ($MANUFACTURER != null) {
            $tr[] = $MANUFACTURER;
        }
        if ($PRODUCT != null) {
            $tr[] = $PRODUCT;
        }
        if ($CHASSIS != null) {
            $tr[] = $CHASSIS;
        }
        if (count($tr) > 0) {
            $LINEMANU = @implode(", ", $tr);
        }
        if ($publicip == null) {
            $publicip = "x.x.x.x";
        }
        $distri = "\n\t<center>\n\t\n\t\n\t<table style='width:99%;color:black;' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2 align=center><img src='{$img}'></td>\n\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend nowrap>{server}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong id='squidcklinks-host-infos'></strong>\n\t\t\t\t\t\t<div><i style='font-weight:bold;font-size:11px'>{$LINEMANU}</i></div></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend nowrap>{public_ip}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><a href=\"javascript:RefreshMyIP()\" style='font-size:12px;text-decoration:underline;font-weight:bold' id='RefreshMyIP-span'>{$publicip}</a></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{processors}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>{$proc_type}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>Artica:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$users->ARTICA_VERSION}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t<td valign='top' style='font-size:12px'><img src='{$distri_logo}'></td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$distri}<br>kernel {$kernel}\n\t\t\t\t\t<br>libc {$LIBC}<br>Temp {$temp}&nbsp;C</strong>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t{$chassis_serial}\n\t\t\t</table>\n</center>\n<script>\n\tUnlockPage();\n\tLoadAjaxTiny('squidcklinks-host-infos','{$page}?squidcklinks-host-infos=yes');\n\tfunction RefreshMyIP(){\n\t\tLoadAjaxTiny('RefreshMyIP-span','{$page}?RefreshMyIp=yes');\n\t}\n\t\n</script>\n\t\n\n\n";
        $tpl = new templates();
        $distri = $tpl->_ENGINE_parse_body($distri);
        $_SESSION["DISTRI"] = $distri;
    } else {
        $distri = $_SESSION["DISTRI"];
    }
    $html = "{$distri}";
    $_SESSION[$key_cache] = $html;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
function AddremovePrograms1()
{
    $sys = new systeminfos();
    $sys->ParseAPPs();
    $prod = $_GET["setp1"];
    if ($prod == null) {
        echo "&nbsp;";
        exit;
    }
    $version = $sys->array_applis_line[$prod];
    $img1 = 'add-64.png';
    $js1 = "PerformAutoInstall('{$prod}');";
    $tips1 = "{install_this_prog}";
    $img = 'delete-64.png';
    $js = "PerformAutoRemove('{$prod}');";
    $tips = "{remove_this_prog}";
    $img = imgtootltip($img, $tips, $js);
    $remove = "<tr>\n\t<td width=1% valign='top'>{$img}</td>\n\t<td valign='top'>\n\t\t<strong>{$tips}</strong>\n\t</td>\n\t</tr>";
    $img = imgtootltip($img1, $tips1, $js1);
    $add = "<tr>\n\t\t\t<td width=1% valign='top'>{$img}</td>\n\t\t\t<td valign='top'><strong>{$tips1}</strong></td>\n\t</tr>";
    if ($prod == 'APP_GEOIP') {
        $remove = null;
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr><td colspan=2><H4>{" . $prod . "} {$version}</H4></td></tr>\n\t{$add}\n\t{$remove}\n\t</table>\n\t<br><div id='step2'></div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body(RoundedLightGreen($html));
}
Example #5
0
function env()
{
    $sys = new systeminfos();
    $tpl = new templates();
    $img = "<img src='img/fw_bold.gif'>";
    $html = "<H5>{environement}</h5>\n\t<table style='width:600px' align=center>\n\t<tr>\n\t<td><strong>{path}</strong></td>\n\t<td><code>" . $sys->environements() . "</td>\n\t</tr>\n\t</table>";
    return RoundedLightWhite($tpl->_ENGINE_parse_body($html));
}
Example #6
0
function disk()
{
    $tpl = new templates();
    $sys = new systeminfos();
    $hash = $sys->DiskUsages();
    $page = CurrentPageName();
    if (!is_array($hash)) {
        return null;
    }
    $img = "<img src='img/fw_bold.gif'>";
    $html = "\n\t<table style='width:100%'>\n<tr>\n\t<td align='right' colspan=2>" . imgtootltip('20-refresh.png', '{refresh}', "LoadAjax('disk','{$page}?disk=yes');") . "</td>\n</tr>\t\n\t\t<tr>\n\t\t<td width=1% valign='top'><img src='img/disk-64.png'></td>\n\t\t<td valign='top'>\n\t\t\t<H5>{disks_usage}</h5>\n\t\t\t<table style='width:100%' align=center>\n\t\t\t\t<tr style='background-color:#CCCCCC'>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t<td><strong>{Filesystem}</strong></td>\n\t\t\t\t\t<td><strong>{size}</strong></td>\n\t\t\t\t\t<td><strong>{used}</strong></td>\n\t\t\t\t\t<td><strong>{available}</strong></td>\n\t\t\t\t\t<td align='center'><strong>{pourcent}</strong></td>\n\t\t\t\t\t<td><strong>{mounted_on}</strong></td>\n\t\t\t\t</tr>\n\t";
    while (list($num, $ligne) = each($hash)) {
        $html = $html . "<tr " . CellRollOver() . ">\n\t \t<td width=1% class=bottom>{$img}</td>\n\t \t<td class=bottom>{$ligne[0]}</td>\n\t \t<td class=bottom>{$ligne[2]}</td>\n\t \t<td class=bottom>{$ligne[3]}</td>\n\t \t<td class=bottom>{$ligne[4]}</td>\n\t \t<td align='center' class=bottom><strong>{$ligne[5]}</strong></td>\n\t \t<td class=bottom>{$ligne[6]}</td>\n\t \t</tr>\n\t \t";
    }
    $html = $html . "</table>";
    return "<br>" . RoundedLightGrey($tpl->_ENGINE_parse_body($html) . "</td></tr></table></td></tr></table>");
}
Example #7
0
function env()
{
    $sys = new systeminfos();
    $tpl = new templates();
    $page = CurrentPageName();
    $img = "<img src='img/fw_bold.gif'>";
    $html = "<H5>{environement}</h5>\n\t\t<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n\t\t<tbody>\n<thead class='thead'>\n\n<tr>\n<th>{path}</th>\n\n</tr>\n</thead>\n";
    $array = $sys->environements();
    while (list($num, $ligne) = each($array)) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $html = $html . "\n\t \t\t<tr class={$classtr}>\n\t<td><strong>{path}</strong></td>\n\t<td><code>{$ligne}</code></td>\n\t</tr>";
    }
    return $tpl->_ENGINE_parse_body($html . "</tbody></table>");
}
function section_computer_header(){
if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return null;}
$hour=date('h');
$key_cache="CACHEINFOS_STATUSSEVERREDNDER$hour";
$page=CurrentPageName();
//if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];}
unset($_SESSION["DISTRI"]);

include_once('ressources/class.os.system.inc');
include_once("ressources/class.os.system.tools.inc");
$sock=new sockets();
$datas=unserialize($sock->getFrameWork("services.php?dmicode=yes"));
$img="img/server-256.png";
$foundChassis=false;
if(is_array($datas)){
	$proc_type=$datas["PROC_TYPE"];
	$MANUFACTURER =$datas["MANUFACTURER"];
	$PRODUCT=$datas["PRODUCT"];
	$CHASSIS=$datas["CHASSIS"];
	$md5Chassis=md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}");
	if(is_file("img/vendors/$md5Chassis.jpg")){$img="img/vendors/$md5Chassis.jpg";$foundChassis=true;}
	if(is_file("img/vendors/$md5Chassis.jpeg")){$img="img/vendors/$md5Chassis.jpeg";$foundChassis=true;}
	if(is_file("img/vendors/$md5Chassis.png")){$img="img/vendors/$md5Chassis.png";$foundChassis=true;}
	
}

if(!$foundChassis){
	$chassis_serial="<tr>
					<td valign='top' style='font-size:12px' class=legend>{serial}:</td>
					<td valign='top' style='font-size:12px'><strong>$md5Chassis</td>
				</tr>";
}

if(!isset($_SESSION["DISTRI"])){
	$sys=new systeminfos();
	writelogs('Loading datas system for session',__FUNCTION__,__FILE__);
	$distri=$sys->ditribution_name;
	$kernel=$sys->kernel_version;
	$LIBC=$sys->libc_version;
	$temp=$sys->GetCpuTemp();
	$users=new usersMenus();
	$os=new os_system();
	$arraycpu=$os->cpu_info();
	$cpuspeed=round(($arraycpu["cpuspeed"]/1000*100)/100,2); 
	$host=$users->hostname;
	$publicip=@file_get_contents("ressources/logs/web/myIP.conf");
$distri_logo="img/serv-mail-linux.png";
if(is_file("img/$users->LinuxDistriCode.png")){$distri_logo="img/$users->LinuxDistriCode.png";}
if(is_file("img/$users->LinuxDistriCode.gif")){$distri_logo="img/$users->LinuxDistriCode.gif";}

if(preg_match("#Broken pipevmware#i", $MANUFACTURER)){$MANUFACTURER="VMWare";}
if(preg_match("#Broken pipevmware#i", $PRODUCT)){$PRODUCT="VMWare";}
if(preg_match("#Broken pipevmware#i", $CHASSIS)){$CHASSIS="VMWare";}



	$distri="
	<center>
	
	
	<table style='width:99%;color:black;' class=form>
		<tr>
			<td colspan=2 align=center><img src='$img'></td>
		</tr>
				<tr>
					<td valign='top' style='font-size:12px' class=legend>{server}:</td>
					<td valign='top' style='font-size:12px'><strong id='squidcklinks-host-infos'></strong><strong>$MANUFACTURER, $PRODUCT, $CHASSIS</td>
				</tr>
				<tr>
					<td valign='top' style='font-size:12px' class=legend>{public_ip}:</td>
					<td valign='top' style='font-size:12px'><strong>$publicip</strong></td>
				</tr>				
				<tr>
					<td valign='top' style='font-size:12px' class=legend>{processors}:</td>
					<td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>$proc_type</strong></td>
				</tr>				
				<tr>
					<td valign='top' style='font-size:12px' class=legend>Artica:</td>
					<td valign='top' style='font-size:12px'><strong>$users->ARTICA_VERSION</strong></td>
				</tr>							
					<td valign='top' style='font-size:12px'><img src='$distri_logo'></td>
					<td valign='top' style='font-size:12px'><strong>$distri<br>kernel $kernel
					<br>libc $LIBC<br>Temp $temp&nbsp;C</strong>
					</td>
				</tr>
				$chassis_serial
			</table>
</center>
<script>
	LoadAjaxTiny('squidcklinks-host-infos','$page?squidcklinks-host-infos=yes');
</script>
	


";
	$tpl=new templates();
	$distri=$tpl->_ENGINE_parse_body($distri);
	$_SESSION["DISTRI"]=$distri;}else{$distri=$_SESSION["DISTRI"];}
	$html="$distri";
	$_SESSION[$key_cache]=$html;
	SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
	echo $html;
}
Example #9
0
function main_master_config()
{
    $ldap = new clladp();
    $cross = new crossroads();
    $sys = new systeminfos();
    $sys->ParseIP();
    $sys_ips = $sys->array_tcp_addr;
    $sys->array_tcp_addr[null] = '{or_select}';
    $list_ip = Field_array_Hash($sys->array_tcp_addr, "PostfixMasterServerIdentity_ip", null, null, null, 0, 'width:150px');
    $CrossRoadsBalancingServerIP = Field_array_Hash($sys_ips, "CrossRoadsBalancingServerIP", $cross->CrossRoadsBalancingServerIP, null, null, 0, 'width:150px');
    $html = main_tabs() . "<br>\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'>\n\t<img src='img/green-server.png'>\n\t</td>\n\t<td valign='top'>\n\t<H5>{main_settings}</H5>\n\t<p class=caption>{main_server_text}</p>" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right'><strong>{replicate_suffix}:</strong></td>\n\t\t<td><strong>{$ldap->suffix}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 class=caption align='right'>{replicate_suffix_text}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'><strong>{CrossRoadsBalancingServerName}:</strong></td>\n\t\t<td><strong>" . Field_text('CrossRoadsBalancingServerName', $cross->CrossRoadsBalancingServerName, 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 class=caption align='right'>{CrossRoadsBalancingServerName_text}</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td align='right'><strong>{CrossRoadsPoolingTime}:</strong></td>\n\t\t<td><strong>" . Field_text('CrossRoadsPoolingTime', $cross->CrossRoadsPoolingTime, 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 class=caption align='right'>{CrossRoadsPoolingTime_text}</td>\n\t</tr>\t\t\n\t\n\t\n\t<tr>\n\t\t<td align='right'><strong>{PostfixMasterServerIdentity}:</strong></td>\n\t\t<td><strong>" . Field_text('PostfixMasterServerIdentity', $cross->PostfixMasterServerIdentity, 'width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'>&nbsp;</td>\n\t\t<td><strong>{$list_ip}</td>\n\t</tr>\n\n\t<tr>\n\t\t<td colspan=2 class=caption align='right'>{PostfixMasterServerIdentity_text}</td>\n\t</tr>\t\t\n<tr><td colspan=2 class=caption align='right'><hr></td></tr>\t\t\n\t<tr>\n\t\t<td align='right'><strong>{CrossRoadsBalancingServerIP}:</strong></td>\n\t\t<td><strong>{$CrossRoadsBalancingServerIP}</td>\n\t</tr>\t\n<tr>\n\t\t<td colspan=2 class=caption align='right'>{CrossRoadsBalancingServerIP_text}</td>\n\t</tr>\t\t\n\t\n\t\n\t\n\n\t<tr>\n\t\t<td colspan=2 class=caption align='right'><input type='button' value='{edit}&nbsp;&raquo;' OnClick=\"javascript:CrossRoadsSaveMaster();\"</td>\n\t</tr>\n\t</table>") . "\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Example #10
0
function disk(){
$tpl=new templates();
	$sys=new systeminfos();
	$hash=$sys->DiskUsages();	
	if(!is_array($hash)){return null;}
	$img="<img src='img/fw_bold.gif'>";
	$html="<H4>{disks_usage}:</h4>
	<table style='width:600px' align=center>
	<tr style='background-color:#CCCCCC'>
	<td>&nbsp;</td>
	<td class=legend>{Filesystem}:</strong></td>
	<td class=legend>{size}:</strong></td>
	<td class=legend>{used}:</strong></td>
	<td class=legend>{available}:</strong></td>
	<td align='center'><strong>{use%}:</strong></td>
	<td class=legend>{mounted_on}:</strong></td>
	</tr>
	";
	
	 while (list ($num, $ligne) = each ($hash) ){
	 	$html=$html . "<tr " . CellRollOver().">
	 	<td width=1% class=bottom>$img</td>
	 	<td class=bottom>{$ligne[0]}:</td>
	 	<td class=bottom>{$ligne[2]}:</td>
	 	<td class=bottom>{$ligne[3]}:</td>
	 	<td class=bottom>{$ligne[4]}:</td>
	 	<td align='center' class=bottom><strong>{$ligne[5]}:</strong></td>
	 	<td class=bottom>{$ligne[6]}:</td>
	 	</tr>
	 	";
	 	
	 }
	return $html . "</table>";
	
}