Exemplo n.º 1
0
function main_update(){
	$sock=new sockets();
	$datas=trim($sock->getFrameWork('cmd.php?aptcheck=yes'));
	$html=main_tabs()."<table style='width:100%'>
	<tr>
	<td valign='top'>
	<H5>{system_update}</H5>";
	
	if(preg_match('#nb:([0-9]+)\s+#is',$datas,$re)){
		$html=$html . RoundedLightYellow("
		<table style='width:100%'>
		<tr>
			<td valign='top' width=1%><img src='img/48-infos.png'></td>
			<td valign='top'>
				<p style='font-size:12px;font-weight:bold'>{$re[1]}&nbsp;{packages_to_upgrade}</p>
			</td>
		</tr>
		</table>");
		$datas=str_replace($re[0],'',$datas);
	}
	
	$html=$html."</td>
	<td valign='top'>".update_Apply_install()."</td>
	</tr>
	</table>";
	
	$tbl=explode("\n",$datas);
	$t="<table style='width:100%'>";
	
	
	while (list ($num, $ligne) = each ($tbl) ){
		if(trim($ligne)<>null){
				$uri="<a href='#' OnClick=\"javascript:PackageInfos('$ligne')\">";
			$t=$t."
			<tr ". CellRollOver_jaune().">
			<td width=1%><img src='img/fw_bold.gif'></td>
			<td width=99% nowrap>$uri$ligne</a></td>
			</tr>";
		}
		
	}
	
	$t=$t . "</table>";
	$t="<div style='width:100%;height:200px;overflow:auto'>$t</div>";
	$t=RoundedLightWhite($t);
	$tpl=new templates();
	return $tpl->_ENGINE_parse_body("$html$t");
	
	
}
Exemplo n.º 2
0
function main_update()
{
    $sock = new sockets();
    $datas = trim($sock->getFrameWork('cmd.php?aptcheck=yes'));
    $html = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=99%>";
    if (preg_match('#nb:([0-9]+)\\s+#is', $datas, $re)) {
        $html = $html . RoundedLightYellow("\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td valign='top' width=1%><img src='img/48-infos.png'></td>\n\t\t\t<td valign='top'>\n\t\t\t\t<p style='font-size:12px;font-weight:bold'>{$re[1]}&nbsp;{packages_to_upgrade}</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>");
        $datas = str_replace($re[0], '', $datas);
    }
    $html = $html . "</td>\n\t<td valign='top'>" . update_Apply_install() . "</td>\n\t</tr>\n\t</table>";
    $tbl = explode("\n", $datas);
    $t = "<center>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:99%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th colspan=2>{packages_to_upgrade}&nbsp;|&nbsp;{$search_regex}&nbsp;|&nbsp;{$search_sql}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    while (list($num, $ligne) = each($tbl)) {
        if (trim($ligne) != null) {
            if ($classtr == "oddRow") {
                $classtr = null;
            } else {
                $classtr = "oddRow";
            }
            $uri = "<a href='#' OnClick=\"javascript:PackageInfos('{$ligne}')\" style='font-size:16px;text-decoration:underline'>";
            $t = $t . "\n\t\t\t<tr class={$classtr}>\n\t\t\t<td width=1%><img src='img/software-task-48.png'></td>\n\t\t\t<td width=99% nowrap>{$uri}{$ligne}</a></td>\n\t\t\t</tr>";
        }
    }
    $t = $t . "</table>";
    $t = "<div style='width:100%;height:300px;overflow:auto'>{$t}</div>";
    $t = RoundedLightWhite($t);
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body("{$html}{$t}");
}