当前位置: 首页>>代码示例>>PHP>>正文


PHP Agecol函数代码示例

本文整理汇总了PHP中Agecol函数的典型用法代码示例。如果您正苦于以下问题:PHP Agecol函数的具体用法?PHP Agecol怎么用?PHP Agecol使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Agecol函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GenQuery

<?php 
$query = GenQuery('stock', 's', '*', 'type');
$res = @DbQuery($query, $link);
if ($res) {
    $row = 0;
    while ($dev = @DbFetchRow($res)) {
        if ($row % 2) {
            $bg = $bgb;
            $bi = $bib;
        } else {
            $bg = $bga;
            $bi = $bia;
        }
        $row++;
        $img = "genh.png";
        $ud = rawurlencode($dev[0]);
        $da = date("j.M (G:i)", $dev[3]);
        list($a1c, $a2c) = Agecol($dev[3], $dev[3], $row % 2);
        echo "<tr bgcolor=#{$bg}><th bgcolor=#{$bi}><img src=img/16/" . $cico[$dev[5]] . ".png title=" . $stco[$dev[5]] . "></th><td>{$dev['0']}</td>\n";
        echo "<td>{$dev['1']}</td><td>{$dev['2']}</td><td bgcolor=#{$a1c}>{$da}</td><td>{$dev['4']}</td>\n";
        echo "<td align=center><a href={$_SERVER['PHP_SELF']}?del={$ud}><img src=img/16/bcnl.png border=0 onclick=\"return confirm('Delete {$dev['0']} from stock?')\" title=\"Delete this device!\"></a></td>\n";
        echo "</tr>\n";
    }
    @DbFreeResult($res);
} else {
    print @DbError($link);
}
echo "</table><table bgcolor=#666666 {$tabtag} >\n";
echo "<tr bgcolor=#{$bg2}><td>{$row} results using {$query}</td></tr></table>\n";
include_once "inc/footer.php";
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:30,代码来源:Devices-Stock.php

示例2: GenQuery

} else {
    $query = GenQuery('user', 's', '*', $ord);
}
$res = @DbQuery($query, $link);
if ($res) {
    $row = 0;
    while ($u = @DbFetchRow($res)) {
        if ($row % 2) {
            $bg = $bgb;
            $bi = $bib;
        } else {
            $bg = $bga;
            $bi = $bia;
        }
        $row++;
        list($cc, $lc) = Agecol($u[10], $u[11], $row % 2);
        echo "<tr bgcolor=#{$bg}>\n";
        echo "<th bgcolor=#{$bi}><img src=" . Smilie($u[0]) . " title=\"Hello I'm {$u['0']}\"'><br>{$u['0']}</th>\n";
        echo "<td>{$u['8']}</td><td align=center>{$u['9']}</td><td>{$u['12']}</td><td align=center>{$u['13']}</td>\n";
        echo "<td bgcolor=#{$cc}>" . date("j. M Y", $u[10]) . "</td>\n";
        echo "<td bgcolor=#{$lc}>" . date("j. M (G:i)", $u[11]) . "</td><th>\n";
        if ($u[2]) {
            echo "<a href={$_SERVER['PHP_SELF']}?grp={$grp}&ord={$ord}&grm={$u['0']}&mgp=adm><img hspace={$hs} src=img/16/cfg.png border=0 title=-admin></a>";
        } else {
            echo "<a href={$_SERVER['PHP_SELF']}?grp={$grp}&ord={$ord}&gad={$u['0']}&mgp=adm><img hspace={$hs} src=img/16/bcls.png border=0  title=+admin></a>";
        }
        if ($u[3]) {
            echo "<a href={$_SERVER['PHP_SELF']}?grp={$grp}&ord={$ord}&grm={$u['0']}&mgp=net><img hspace={$hs} src=img/16/net.png border=0 title=-net></a>";
        } else {
            echo "<a href={$_SERVER['PHP_SELF']}?grp={$grp}&ord={$ord}&gad={$u['0']}&mgp=net><img hspace={$hs} src=img/16/bcls.png border=0 title=+net></a>";
        }
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:31,代码来源:User-Accounts.php

示例3: while

2">
<th width="40"><img src="img/16/user.png"><br>User</th>
<th width="120"><img src="img/16/clock.png"><br><?php 
    echo $timlbl;
    ?>
</th>
<th><img src="img/16/say.png"><br><?php 
    echo $cmtlbl;
    ?>
</th>
</tr>
<?php 
    while ($m = DbFetchRow($res)) {
        if ($_SESSION['user'] == $m[1]) {
            $bg = "txta";
            $bi = "imga";
            $me = 1;
        } else {
            $bg = "txtb";
            $bi = "imgb";
            $me = 0;
        }
        list($fc, $lc) = Agecol($m[0], $m[0], $me);
        $time = date($datfmt, $m[0]);
        echo "<tr class=\"{$bg}\"><th class=\"{$bi}\">" . Smilie($m[1], 1);
        echo "</th>\n";
        echo "<td bgcolor=#{$fc}>{$time}</td><td>" . preg_replace('/(http[s]?:\\/\\/[^\\s]*)/', "<a href=\"\$1\" target=\"window\">\$1</a>", $m[2]) . "</td></tr>\n";
    }
    echo "</table>\n";
}
include_once "inc/footer.php";
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:31,代码来源:User-Profile.php

示例4: while

    if ($res) {
        $nli = 0;
        $row = 0;
        while ($l = DbFetchRow($res)) {
            $ud = rawurlencode($l[1]);
            $un = rawurlencode($l[3]);
            if ($row % 2) {
                $bg = "txta";
                $bi = "imga";
            } else {
                $bg = "txtb";
                $bi = "imgb";
            }
            $row++;
            TblRow($bg);
            list($tc, $tc) = Agecol($l[10], $l[10], $row % 2);
            TblCell($l[1], "?dv={$ud}", "nowrap", "<a href=\"Devices-Status.php?dev={$ud}\"><img src=\"img/16/sys.png\"></a>");
            echo "<td>{$l['2']}</td>\n";
            echo "<th>{$l['6']}</th>\n";
            echo "<td align=right>" . DecFix($l[5]) . "</td>\n";
            TblCell($l[3], "?dv={$un}", "nowrap", "<a href=\"Devices-Status.php?dev={$un}\"><img src=\"img/16/sys.png\"></a>");
            echo "<td>{$l['4']} (Vl{$l['9']} {$l['8']})</td><td>{$l['7']}</td><td bgcolor=\"{$tc}\" width=\"100\" nowrap>" . date($datfmt, $l[10]) . "</td>\n";
            echo "<th><a href=\"?del={$l['0']}&dv={$ud}\"><img src=\"img/16/bcnl.png\" onclick=\"return confirm('Link {$l['0']} {$dellbl}?');\" title=\"{$l['0']} {$dellbl}\"></a></th></tr>\n";
            $nli++;
        }
        DbFreeResult($res);
    } else {
        print DbError($link);
    }
    ?>
</table>
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:31,代码来源:Topology-Linked.php

示例5: GenQuery

        die;
    }
    $dev = @DbFetchRow($res);
    @DbFreeResult($res);
    $query = GenQuery('networks', 's', '*', '', '', array('device'), array('='), array($shd));
    $res = @DbQuery($query, $link);
    while ($n = @DbFetchRow($res)) {
        $net[$n[1]][$n[2]] = ip2long(long2ip($n[3]));
        // thanks again PHP (for increased grey hair count to fix netmask)!
    }
    @DbFreeResult($res);
    $ud = rawurlencode($dev[0]);
    $ip = $dev[1] ? long2ip($dev[1]) : 0;
    $oi = $dev[19] ? long2ip($dev[19]) : 0;
    $img = $dev[18];
    list($fc, $lc) = Agecol($dev[4], $dev[5], 0);
    $fs = date($datfmt, $dev[4]);
    $ls = date($datfmt, $dev[5]);
    $sv = Syssrv($dev[6]);
    $os = $dev[8];
    $comm = $dev[15];
    $ver = $dev[14] & 127;
    ?>
<table cellspacing=10 width=100%>
<tr><td width=50% valign=top>
<h2>General Info</h2><p>
<table bgcolor=#666666 <?php 
    echo $tabtag;
    ?>
 >
<tr>
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:31,代码来源:Devices-Status.php

示例6: urlencode

 if (in_array("oui", $col)) {
     echo "<td><a href=http://www.google.com/search?q=" . urlencode($n[3]) . "&btnI=1>{$n['3']}</a></td>";
 }
 if (in_array("ifname", $col)) {
     echo "<td><a href=?ina=device&opa==&sta={$ud}&ord=ifname>{$n['6']}</a>";
     echo " - <a href=?ina=device&opa==&inb=ifname&opb==&sta={$ud}&cop=AND&stb={$ui}>{$n['7']}</a></td>";
 }
 if (in_array("vlanid", $col)) {
     echo "<td>{$n['8']}</td>";
 }
 if (in_array("ifmetric", $col)) {
     echo "<td align=right>{$n['9']}</td>";
 }
 if (in_array("ifupdate", $col)) {
     $iu = date("j.M G:i:s", $n[10]);
     list($i1c, $i2c) = Agecol($n[10], $n[10], $row % 2);
     echo "<td bgcolor=#{$i1c}>{$iu}</td>";
 }
 if (in_array("ifchanges", $col)) {
     echo "<td align=right>{$n['11']}</td>";
 }
 if (in_array("ifdet", $col)) {
     $link = @DbConnect($dbhost, $dbuser, $dbpass, $dbname);
     $iquery = GenQuery('interfaces', 's', '*', '', '', array('device', 'ifname'), array('=', '='), array($n[6], $n[7]), array('AND'));
     $ires = @DbQuery($iquery, $link);
     $nif = @DbNumRows($ires);
     if ($nif == 1) {
         $if = @DbFetchRow($ires);
         if ($if[8] == "2") {
             $ifimg = "<img src=img/bulbr.png title=\"Disabled!\">";
         } else {
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:31,代码来源:Nodes-List.php

示例7: Agecol

			}
			if(in_array("ifchanges",$col)){	TblCell($n[11],"?in[]=ifchanges&op[]==&st[]=$n[11]");}
			if(in_array("lastchg",$col)){
				list($i1l,$i2l) = Agecol($n[33],$n[33],$row % 2);
				TblCell(date($datfmt,$n[33]),"?in[]=lastchg&op[]==&st[]=$n[33]","nowrap bgcolor=\"#$i1l\"");
			}
			if(in_array("dinerr",$col))	{TblCell($n[34]);}
			if(in_array("douterr",$col))	{TblCell($n[35]);}
			if(in_array("dindis",$col))	{TblCell($n[36]);}
			if(in_array("doutdis",$col))	{TblCell($n[37]);}
			if(in_array("tcpports",$col))	{TblCell($n[17],"?in[]=tcpports&op[]==&st[]=$n[17]");}
			if(in_array("udpports",$col))	{TblCell($n[18],"?in[]=udpports&op[]==&st[]=$n[18]");}
			if(in_array("nodtype",$col))	{TblCell($n[19],"?in[]=nodtype&op[]==&st[]=$n[19]");}
			if(in_array("nodos",$col))	{TblCell($n[20],"?in[]=nodos&op[]==&st[]=$n[20]");}
			if(in_array("osupdate",$col)){
				list($o1c,$o2c) = Agecol($n[21],$n[21],$row % 2);
				TblCell( date($datfmt,$n[21]),"?in[]=osupdate&op[]==&st[]=$n[21]","nowrap bgcolor=\"#$o1c\"");
			}
			if(in_array("noduser",$col))	{TblCell($n[22],"?in[]=noduser&op[]==&st[]=$n[22]");}

			if( !isset($_GET['xls']) ){
				if(in_array("sshNS",$col)){
					echo "<td><a href=ssh://$ip><img src=\"img/16/lokc.png\"></a>\n";
					echo (($wasup)?CheckTCP($ip,'22',''):"-") ."</td>";
				}
				if(in_array("telNS",$col)){
					echo "<td><a href=telnet://$ip><img src=\"img/16/loko.png\"></a>\n";
					echo (($wasup)?CheckTCP($ip,'23',''):"-") ."</td>";
				}
				if(in_array("wwwNS",$col)){
					echo "<td><a href=http://$ip target=window><img src=\"img/16/glob.png\"></a>\n";
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:31,代码来源:Nodes-List.php

示例8: DbFetchRow

		if($res){
			$row = 0;
			if (!$lic){$lic = 1000000;}						# Yepp, not really oo...
			while( ($con = DbFetchRow($res)) ){
				if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
				$row++;
				$ud  = rawurlencode($con[0]);
				TblRow($bg);
				TblCell($con[0],"","class=\"$bi\" width=\"50px\"","<a href=\"Devices-Status.php?dev=$ud\"><img src=\"img/dev/$con[9].png\" title=\"$con[7]\"></a><br>","th-img");
				TblCell( Devcli($con[6],$con[10]) );
				TblCell($con[8]);
				TblCell( substr(implode("\n",preg_grep("/$sta/i",explode("\n",$con[1]) ) ),0,$lic),"?shc=$ud","class=\"code\"" );
				TblCell($con[4]);
				TblCell( substr(implode("\n",preg_grep("/$sta/i",explode("\n",$con[2]) ) ),0,$lic),"","class=\"code\"" );
				TblCell($con[5]);
				list($u1c,$u2c) = Agecol($con[3],$con[3],$row % 2);
				TblCell( date($_SESSION['date'],$con[3]),"","bgcolor=\"#$u1c\" nowrap" );
				echo "</tr>\n";
			}
			DbFreeResult($res);
		}else{
			print DbError($link);
		}
	?>
</table>
<table class="content">
<tr class="<?= $modgroup[$self] ?>2"><td><?= $row ?> Devices</td></tr>
</table>
	<?php
	}
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:30,代码来源:Devices-Config.php

示例9: array

        if ($nnod == 1) {
            $n = @DbFetchRow($nres);
            @DbFreeResult($nres);
        } else {
            $n = array($s[0], $s[1], $s[2], '-', 0, 0, 'Not in nodes', '-');
        }
        $dbna = preg_replace("/^(.*?)\\.(.*)/", "\$1", $n[0]);
        $dbip = long2ip($n[1]);
        $img = Nimg("{$n['2']};{$n['3']}");
        $ls = date("r", $n[5]);
        list($fc, $lc) = Agecol($n[4], $n[5], $row % 2);
        $na = preg_replace("/^(.*?)\\.(.*)/", "\$1", $s[0]);
        $ip = long2ip($s[1]);
        $sup = date("r", $s[6]);
        $simg = "";
        list($s1c, $s2c) = Agecol($s[6], $s[6], $row % 2);
        if ($n[5] > $s[6]) {
            $simg = "<img src=img/16/lokc.png hspace=8 title=\"Reappeared!\">";
        }
        echo "<tr bgcolor=#{$bg}>";
        echo "<th bgcolor=#{$bia} width=120 rowspan=2><a href=Nodes-Status.php?mac={$n['2']}><img src=img/oui/{$img} title=\"{$n['3']}\" vspace=8 border=0></a><br>{$s['2']}\n";
        echo "<td>{$dbna}</td><td>{$dbip}</td><td>{$n['6']}</td><td>{$n['7']}</td><td bgcolor=#{$lc}>{$ls}</td>\n";
        echo "<th>{$simg} <a href={$_SERVER['PHP_SELF']}?del={$s['2']}><img src=img/16/bcnl.png border=0 hspace=8 onclick=\"return confirm('Delete node {$s['2']}?')\"></a></th>\n";
        echo "</tr><tr bgcolor=#{$bg}><td>{$na}</td><td>{$ip}</td><td>{$s['3']}</td><td>{$s['4']}</td><td bgcolor=#{$s1c}>{$sup}</td><td align=center>{$s['5']}</td>\n";
        echo "";
        echo "</tr>\n";
    }
    @DbFreeResult($res);
} else {
    print @DbError($link);
}
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:31,代码来源:Nodes-Stolen.php

示例10: DbQuery

 $res = DbQuery($query, $link);
 if ($res) {
     $usta = urlencode($sta);
     $uopa = urlencode($opa);
     $row = 0;
     while ($trk = DbFetchArray($res)) {
         if ($row % 2) {
             $bg = "txta";
             $bi = "imga";
         } else {
             $bg = "txtb";
             $bi = "imgb";
         }
         $row++;
         $cfgst = '';
         list($cc, $lc) = Agecol($trk['time'], $trk['time'], $row % 2);
         if ($dev and $dev == $trk['device'] and $ifn and $ifn == $trk['ifname']) {
             $time = time();
             if ($src) {
                 if ($src == '-') {
                     $setd = '';
                 } elseif ($src == 'comment') {
                     $trk[$src] = preg_replace('/.+DP:(.+),.+/', '$1', $trk[$src]);
                     $setd = "value='{$trk[$src]}',";
                 } else {
                     $setd = "value='{$trk[$src]}',";
                 }
                 if (!DbQuery("UPDATE nodetrack SET {$setd}source='{$src}',usrname='{$_SESSION['user']}',time={$time} WHERE device = '{$dev}' AND ifname = '{$ifn}';", $link)) {
                     $cfgst = "<img src=\"img/16/bcnl.png\" title=\"" . DbError($link) . "\">";
                 } else {
                     $cfgst = "<img src=\"img/16/bchk.png\" title=\"{$srclbl} = {$src} OK\">";
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:31,代码来源:Nodes-Track.php

示例11: TblHead

<?php
TblHead("$modgroup[$self]2",2);

if ($grp){
	$query	= GenQuery('users','s','*',$ord,'',array('groups'),array('&'),array($grp) );
}else{
	$query	= GenQuery('users','s','*',$ord );
}
$res	= DbQuery($query,$link);
if($res){
	$row = 0;
	while( ($usr = DbFetchRow($res)) ){
		if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
		$row++;
		list($cc,$lc) = Agecol($usr[5],$usr[6],$row % 2);
		TblRow($bg);
?>
<th class="<?= $bi ?>">
<?=Smilie($usr[0]) ?><br><?= $usr[0] ?></th>
<td nowrap><?= $usr[3] ?></td>
<td nowrap><?= $usr[4] ?></td>
<td nowrap><?= $usr[7] ?></td>
<td bgcolor="#<?= $cc ?>"><?= (date($datfmt,$usr[5])) ?></td>
<td bgcolor="#<?= $lc ?>"><?= (date($datfmt,$usr[6])) ?></td>
<td>
<?php  if( !($usr[2] & 1) ) { ?>
<form method="get">
<input type="hidden" name="usr" value="<?= $usr[0] ?>">
<select size="1" name="inv">
<?php
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:30,代码来源:User-Accounts.php

示例12: GenQuery

<?php 
$query = GenQuery('stock', 's', '*', 'time desc', $_SESSION['lim']);
$res = DbQuery($query, $link);
if ($res) {
    $row = 0;
    while ($item = DbFetchRow($res)) {
        if ($row % 2) {
            $bg = "txta";
            $bi = "imga";
        } else {
            $bg = "txtb";
            $bi = "imgb";
        }
        $row++;
        list($a1c, $a2c) = Agecol($item[15], $item[15], $row % 2);
        echo "<tr class=\"{$bg}\"><th class=\"{$bi}\">\n";
        echo "<img src=\"img/16/" . $cico[$item[0]] . ".png\" title=" . $stco[$item[0]] . "></th>\n";
        echo "<td bgcolor=\"#{$a1c}\">" . date($datfmt, $item[15]) . "</td>\n";
        echo "<td><a href=\"?lst=ty&val=" . urlencode($item[2]) . "\">{$item['2']}</a></td>\n";
        echo "<td><a href=\"?lst=us&val=" . urlencode($item[14]) . "\">{$item['14']}</a></td>\n";
        echo "<td><a href=\"?lst=lo&val=" . urlencode($item[4]) . "\">{$item['4']}</a></td><td>{$item['13']}</td>";
        echo "</tr>\n";
    }
}
?>
</table>
<table class="content">
<tr class="<?php 
echo $modgroup[$self];
?>
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:30,代码来源:Devices-Stock.php

示例13: while

 $row = 0;
 $trkst = '';
 $monst = '';
 while ($if = DbFetchRow($res)) {
     if ($row % 2) {
         $bg = "txta";
         $bi = "imga";
     } else {
         $bg = "txtb";
         $bi = "imgb";
     }
     $row++;
     $ud = urlencode($if[0]);
     $ui = urlencode($if[1]);
     list($fc, $lc) = Agecol($if[33], $if[34], $row % 2);
     list($cc, $cc) = Agecol($if[26], $if[26], $row % 2);
     if ($isadmin and $_GET['trk']) {
         $trkst = AddRecord('nodetrack', "device='{$if['0']}' AND ifname='{$if['1']}'", "device,ifname,value,source,usrname,time", "'{$if['0']}','{$if['1']}','-','-','{$_SESSION['user']}','" . time() . "'");
     }
     if ($isadmin and $_GET['upm']) {
         $query = GenQuery('interfaces', 'u', "CONCAT(device,ifname)", '=', "{$if['0']}{$if['1']}", array('trafalert', 'brcalert', 'macflood'), array(), array($tal, $bal, $maf));
         $monst = DbQuery($query, $link) ? "<img src=\"img/16/bchk.png\" title=\" {$monlbl} {$updlbl} OK\" vspace=\"4\">" : "<img src=\"img/16/bcnl.png\" title=\"" . DbError($link) . "\" vspace=\"4\">";
     }
     TblRow($bg);
     if (in_array("imBL", $col)) {
         list($ifbg, $ifst) = Ifdbstat($if[8]);
         list($ifimg, $iftyp) = Iftype($if[4]);
         TblCell("", "", "width=\"50\" class=\"" . ($ifbg ? $ifbg : $bi) . "\"", "<img src=\"img/{$ifimg}\" title=\"{$iftyp} - {$ifst}\">", "th-img");
     }
     if (in_array("ifname", $col)) {
         TblCell("{$if['1']} {$trkst} {$monst}", "?in[]=ifname&op[]==&st[]={$ui}", "align=\"left\"", "", "th");
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:31,代码来源:Devices-Interfaces.php

示例14: DevConfigs


//.........这里部分代码省略.........
            $row++;
            $l = explode($locsep, $r[5]);
            echo "<tr class=\"{$bg}\"><th class=\"{$bi}\"><a href=\"Devices-Status.php?dev=" . urlencode($r[0]) . "\"><img src=\"img/dev/{$r['6']}.png\" title=\"{$conlbl}: {$r['4']}, {$loclbl}: {$l['0']} {$l['1']} {$l['2']}\"></a></th>\n";
            echo "<td><b>" . substr($r[0], 0, $_SESSION['lsiz']) . "</b></td>\n";
            echo "<td>" . Devcli(long2ip($r[1]), $r[2]) . "</td><td>{$r['3']}</td></tr>\n";
        }
        DbFreeResult($res);
    } else {
        print DbError($link);
    }
    ?>
</table>
<table class="content" >
<tr class="<?php 
    echo $modgroup[$self];
    ?>
2"><td><?php 
    echo $row;
    ?>
 Devices, <?php 
    echo $srt;
    ?>
</td></tr>
</table>

</td><td class="helper">

<h2><?php 
    echo $cfglbl;
    ?>
 <?php 
    echo $woulbl;
    ?>
 <?php 
    echo $chglbl;
    ?>
</h2>

<table class="content">
<tr class="<?php 
    echo $modgroup[$self];
    ?>
2">
<th width="33%" colspan="2"><img src="img/16/dev.png"><br>Device</th>
<th><img src="img/16/glob.png"><br>IP</th>
<th><img src="img/16/date.png"><br><?php 
    echo $updlbl;
    ?>
</th>
</tr>
<?php 
    if ($ord) {
        $ocol = "devip";
        $srt = "{$srtlbl}: IP";
    } else {
        $ocol = "device";
        $srt = "{$srtlbl}: Device";
    }
    $query = GenQuery('configs', 's', 'device,devip,cliport,devos,time,contact,location,icon', $ocol, $lim, array('changes', $ina), array('~', $opa), array('^$', $sta), array('AND'), 'LEFT JOIN devices USING (device)');
    $res = DbQuery($query, $link);
    if ($res) {
        $row = 0;
        while ($r = DbFetchRow($res)) {
            if ($row % 2) {
                $bg = "txta";
                $bi = "imga";
            } else {
                $bg = "txtb";
                $bi = "imgb";
            }
            $row++;
            $l = explode($locsep, $r[6]);
            list($u1c, $u2c) = Agecol($r[4], $r[4], $row % 2);
            echo "<tr class=\"{$bg}\"><th class=\"{$bi}\"><a href=\"Devices-Status.php?dev=" . urlencode($r[0]) . "\"><img src=\"img/dev/{$r['7']}.png\" title=\"{$conlbl}: {$r['5']}, {$loclbl}: {$l['0']} {$l['1']} {$l['2']}\"></a></th>\n";
            echo "<td><b>" . substr($r[0], 0, $_SESSION['lsiz']) . "</b></td>\n";
            echo "<td>" . Devcli(long2ip($r[1]), $r[2]) . "</td><td bgcolor=\"#{$u1c}\" nowrap>" . date($_SESSION['date'], $r[4]) . "</td></tr>\n";
        }
        DbFreeResult($res);
    } else {
        print DbError($link);
    }
    ?>
</table>
<table class="content" >
<tr class="<?php 
    echo $modgroup[$self];
    ?>
2"><td><?php 
    echo $row;
    ?>
 Devices, <?php 
    echo $srt;
    ?>
</td></tr>
</table>

</td></tr></table>
<p>
<?php 
}
开发者ID:pl0o0f,项目名称:nedi-puppet,代码行数:101,代码来源:librep.php

示例15: date

        $row++;
        $fs = date("d.M H:i", $i[4]);
        if ($i[5]) {
            $dur = intval(($i[5] - $i[4]) / 3600);
            $ls = date("d.M H:i", $i[5]);
            # . " ($dur h)";
        } else {
            $ls = "-";
        }
        if ($i[7]) {
            $at = date("d.M H:i", $i[7]);
        } else {
            $at = "-";
        }
        $ud = rawurlencode($i[2]);
        list($fc, $lc) = Agecol($i[4], $i[5], $row % 2);
        echo "<tr bgcolor=#{$bg}><th>{$i['0']}</th><th bgcolor={$bi}><img src=img/16/" . $mico[$i[1]] . ".png title=\"" . $mlvl[$i[1]] . "\"></th>\n";
        echo "<th><a href=Monitoring-Messages.php?ina=source&opa==&sta={$ud}>{$i['2']}</th><td>{$i['3']} deps</td>\n";
        echo "<td bgcolor=#{$fc}>{$fs}</td><td bgcolor=#{$fc}>{$ls}</td><th>{$i['6']}</th><td>{$at}</td>";
        ?>
<td>
<form method="get" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
<img src=img/16/<?php 
        echo Cimg($i[8]);
        ?>
.png>
<input type="hidden" name="uca" value="<?php 
        echo $i[0];
开发者ID:BackupTheBerlios,项目名称:nedi-svn,代码行数:31,代码来源:Monitoring-Incidents.php


注:本文中的Agecol函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。