本文整理汇总了PHP中printtimedif函数的典型用法代码示例。如果您正苦于以下问题:PHP printtimedif函数的具体用法?PHP printtimedif怎么用?PHP printtimedif使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printtimedif函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlformat
// if (stripos($guest['useragent'], "robot") !== false && $banorama)
$marker = " style='color: #f88;'";
else
$marker = "";
*/
$marker = '';
$lasturltd = "{$tccell2l}{$marker}><a rel=\"nofollow\" href=\"" . urlformat($guest['lasturl']) . "\">{$guest['lasturl']}";
if (substr($guest['lasturl'], -11) == '(IP banned)') {
$lasturltd = "{$tccell2l}{$marker}><a rel=\"nofollow\" href=\"" . substr($guest['lasturl'], 0, -12) . "\">" . substr($guest['lasturl'], 0, -12) . "</a> (IP banned)";
} elseif (substr($guest['lasturl'], -11) == '(Tor proxy)') {
$lasturltd = "{$tccell2l}{$marker}><a rel=\"nofollow\" href=\"" . substr($guest['lasturl'], 0, -12) . "\">" . substr($guest['lasturl'], 0, -12) . "</a> (Tor proxy)";
}
print "<tr style=\"height:40px;\">\n\t\t\t{$tccell1}{$marker}>{$i}</td>\n\t\t\t{$tccell2s}{$marker}>" . htmlspecialchars($guest['useragent']) . "</td>\n\t\t\t{$tccell1}{$marker}>" . date('h:i:s A', $guest['date'] + $tzoff) . "</td>\n\t\t\t{$lasturltd}</td>";
if ($banorama && !$guest['banned']) {
$ipban = "<a href=?banip={$guest['ip']}&valid=" . md5($guest['ip'] . "aglkdgslhkadgshlkgds") . ">Ban</a> - ";
} elseif ($guest['banned']) {
$ipban = "<span style='color: #f88; font-weight: bold;'>Banned</span> - ";
} else {
$ipban = "";
}
if ($isadmin) {
print "</td>{$tccell1}{$marker}>\n\t\t\t<a href=ipsearch.php?ip={$guest['ip']}>{$guest['ip']}</a>{$smallfont}\n\t\t\t<br>[{$ipban}<a href=http://google.com/search?q={$guest['ip']}>G</a>-<a href=http://en.wikipedia.org/wiki/User:{$guest['ip']}>W</a>-<a href=http://{$guest['ip']}/>H</a>]</a></font>";
}
print "</tr>";
}
print $tblend . $footer;
printtimedif($startingtime);
function urlformat($url)
{
return preg_replace("/^\\/thread\\.php\\?pid=([0-9]+)\$/", "/thread.php?pid=\\1#\\1", $url);
}
示例2: errorpage
function errorpage($text, $redir = '', $redirurl = '')
{
global $header, $tblstart, $tccell1, $tblend, $footer, $startingtime;
print "{$header}<br>{$tblstart}{$tccell1}>{$text}";
if ($redir) {
print '<br>' . redirect($redirurl, $redir, 0);
}
print "{$tblend}{$footer}";
printtimedif($startingtime);
die;
}