本文整理汇总了PHP中server::getPreviousDay方法的典型用法代码示例。如果您正苦于以下问题:PHP server::getPreviousDay方法的具体用法?PHP server::getPreviousDay怎么用?PHP server::getPreviousDay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server
的用法示例。
在下文中一共展示了server::getPreviousDay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: server
if ($_REQUEST['server_id'] && !$server) {
$server = new server($_REQUEST['server_id']);
}
echo '</span>';
echo ' | <a href="' . ($_REQUEST['server_id'] ? '/server/' . $_REQUEST['server_id'] : '') . '/user/' . $LOGIN_DATA['user_id'] . '"><img src="/images/user.png" alt="Your Profile" title="Your Profile" /></a> ';
echo ' <a href="/login/out.php"><img src="/images/door_out.png" alt="Logout" title="Logout" /></a> ';
}
//end if logged in
?>
<a href="http://pibb.com/go/theproject"><img src="/images/comment.png" alt="Discuss" title="Discuss" /></a>
<a href="/faq/"><img src="/images/information.png" alt="FAQ" title="FAQ" /></a>
<br />
<?php
if ($server) {
if (!$server->getWeekLength() || $server->getPreviousWeek() < time()) {
$day = $server->getPreviousDay();
$time_left = round(abs(time() - $server->getDayLength() - $day) / 60, 2);
echo '<span id="day-left">' . $time_left . '</span> minutes left in the day';
?>
<script type="text/javascript" src="/include/prototype.js"></script>
<script type="text/javascript" src="/include/ajax.js"></script>
<script type="text/javascript">
//<![CDATA[
var day_left_id = '';
function update_day_left() {
var block = document.getElementById('day-left');
block.innerHTML = Math.round((block.innerHTML - (1/60))*100)/100;
if(block.innerHTML < 0) block.innerHTML = 0;
day_left_id = setTimeout("update_day_left()", 1100);
}//end function update_day_left