Example #1
0
function index_page()
{
    $bind9 = Paragraphe('folder-64-bind9-grey.png', '{APP_BIND9}', '{APP_BIND9_TEXT}', "", null, 210, null, 0, false);
    $openvpn = Paragraphe('64-openvpn-grey.png', '{APP_OPENVPN}', '{APP_OPENVPN_TEXT}', "", null, 210, null, 0, false);
    $users = new usersMenus();
    if ($users->dhcp_installed) {
        $dhcp = Buildicon64('DEF_ICO_DHCP');
    }
    if ($users->BIND9_INSTALLED == true) {
        $bind9 = ICON_BIND9();
    }
    $gateway = Buildicon64('DEF_ICO_GATEWAY');
    $tr[] = $gateway;
    $tr[] = $dhcp;
    $tr[] = $bind9;
    $tr[] = $comp;
    $tr[] = $openvpn;
    $html = CompileTr2($tr, "form");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "system.index.php");
}
Example #2
0
function index_page(){
	$bind9=Paragraphe('folder-64-bind9-grey.png','{APP_BIND9}','{APP_BIND9_TEXT}',"",null,210,null,0,false);
	$openvpn=Paragraphe('64-openvpn-grey.png','{APP_OPENVPN}','{APP_OPENVPN_TEXT}',"",null,210,null,0,false);	
	$users=new usersMenus();
	
	
	if($users->dhcp_installed){
		$dhcp=Buildicon64('DEF_ICO_DHCP');
		}
		
	if($users->BIND9_INSTALLED==true){
		$bind9=ICON_BIND9();
	}
	
	if($users->OPENVPN_INSTALLED==true){
		$openvpn=Paragraphe('64-openvpn.png','{APP_OPENVPN}','{APP_OPENVPN_TEXT}',"javascript:Loadjs('index.openvpn.php')",null,210,null,0,false);	
	}
	
	$comp=ICON_ADD_COMPUTER();
	$gateway=Buildicon64('DEF_ICO_GATEWAY');
	$html="<div style='width:530px'>
	<table>
	<tr>
	<td valign='top'>$gateway</td>
	<td valign='top'>$dhcp</td>
	</tr>
	<tr>
	<td valign='top'>$bind9</td>
	<td valign='top'>$comp</td>
	</tr>
	<tr>
		<td valign='top'>$openvpn</td>
		<td valign='top'>&nbsp;</td>
	</tr>
	</table>
	</div>";
	
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html,"system.index.php");
}
Example #3
0
function main_dns(){
	
	
	$user=new usersMenus();
	$static=Paragraphe('folder-64-dns-grey.png','{nic_static_dns}','{nic_static_dns_text}','');
	$bind9=ICON_BIND9();
	$etc_hosts=Buildicon64("DEF_ICO_ETC_HOSTS");
	$pdns=Buildicon64('DEF_ICO_PDNS');
	$dyndns=Paragraphe('folder-64-dyndns.png','{nic_dynamic_dns}','{nic_dynamic_dns_text}','system.nic.dynamicdns.php');
	$rbl_check=Paragraphe('check-64.png','{rbl_check_artica}','{rbl_check_artica_text}',"javascript:Loadjs('system.rbl.check.php')");
	$dnsmasq=Paragraphe('dns-64.png','{APP_DNSMASQ}','{APP_DNSMASQ_TEXT}',"javascript:Loadjs('dnsmasq.index.php')");
	
	if($user->KASPERSKY_SMTP_APPLIANCE){
		$dyndns=null;
	}
	
	if(!$user->BIND9_INSTALLED){
		$static=null;
		$bind9=null;
	}	
	
	if(!$user->POWER_DNS_INSTALLED){$pdns=Paragraphe("dns-64-grey.png","{APP_PDNS}","{APP_PDNS_TEXT}");}
	if(!$user->dnsmasq_installed){$dnsmasq=Paragraphe("dns-64-grey.png","{APP_DNSMASQ}",'{APP_DNSMASQ_TEXT}');}
		
	
	
	$tr[]=$pdns;
	$tr[]=$dnsmasq;
	$tr[]=$bind9;
	$tr[]=$static;
	$tr[]=$dyndns;
	$tr[]=$etc_hosts;
	$tr[]=$rbl_check;

	
$tables[]="<table style='width:100%'><tr>";
$t=0;
while (list ($key, $line) = each ($tr) ){
		$line=trim($line);
		if($line==null){continue;}
		$t=$t+1;
		$tables[]="<td valign='top'>$line</td>";
		if($t==3){$t=0;$tables[]="</tr><tr>";}
		
}
if($t<3){
	for($i=0;$i<=$t;$i++){
		$tables[]="<td valign='top'>&nbsp;</td>";				
	}
}
				
$tables[]="</table>";	

$html=implode("\n",$tables);	
$tpl=new templates();
echo $tpl->_ENGINE_parse_body($html);
	
}
Example #4
0
function main_dns()
{
    $user = new usersMenus();
    $static = Paragraphe('folder-64-dns-grey.png', '{nic_static_dns}', '{nic_static_dns_text}', '');
    $bind9 = ICON_BIND9();
    $etc_hosts = Buildicon64("DEF_ICO_ETC_HOSTS");
    $pdns = Buildicon64('DEF_ICO_PDNS');
    $dyndns = Paragraphe('folder-64-dyndns.png', '{nic_dynamic_dns}', '{nic_dynamic_dns_text}', 'system.nic.dynamicdns.php');
    if ($user->KASPERSKY_SMTP_APPLIANCE) {
        $dyndns = null;
    }
    if (!$user->BIND9_INSTALLED) {
        $static = null;
        $bind9 = null;
    }
    if (!$user->POWER_DNS_INSTALLED) {
        $pdns = null;
    }
    $tr[] = $pdns;
    $tr[] = $bind9;
    $tr[] = $static;
    $tr[] = $dyndns;
    $tr[] = $etc_hosts;
    $tables[] = "<table style='width:100%'><tr>";
    $t = 0;
    while (list($key, $line) = each($tr)) {
        $line = trim($line);
        if ($line == null) {
            continue;
        }
        $t = $t + 1;
        $tables[] = "<td valign='top'>{$line}</td>";
        if ($t == 3) {
            $t = 0;
            $tables[] = "</tr><tr>";
        }
    }
    if ($t < 3) {
        for ($i = 0; $i <= $t; $i++) {
            $tables[] = "<td valign='top'>&nbsp;</td>";
        }
    }
    $tables[] = "</table>";
    $html = implode("\n", $tables);
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}