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


PHP functions::timecount方法代码示例

本文整理汇总了PHP中functions::timecount方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::timecount方法的具体用法?PHP functions::timecount怎么用?PHP functions::timecount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在functions的用法示例。


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

示例1: mysql_query

if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&amp;' . ($mod ? 'mod=' . $mod . '&amp;' : ''), $start, $total, $kmess) . '</div>';
}
if ($total) {
    $req = mysql_query($sql_list . "{$start}, {$kmess}");
    $i = 0;
    while (($res = mysql_fetch_assoc($req)) !== false) {
        if ($res['id'] == core::$user_id) {
            echo '<div class="gmenu">';
        } else {
            echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
        }
        $arg['stshide'] = 1;
        $arg['header'] = ' <span class="gray">(';
        if ($mod == 'history') {
            $arg['header'] .= functions::display_date($res['sestime']);
        } else {
            $arg['header'] .= $res['movings'] . ' - ' . functions::timecount(time() - $res['sestime']);
        }
        $arg['header'] .= ')</span><br /><img src="../images/info.png" width="16" height="16" align="middle" />&#160;' . functions::display_place($res['id'], $res['place']);
        echo functions::display_user($res, $arg);
        echo '</div>';
        ++$i;
    }
} else {
    echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&amp;' . ($mod ? 'mod=' . $mod . '&amp;' : ''), $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=online' . ($mod ? '&amp;mod=' . $mod : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
}
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:online.php

示例2: array

         echo '<div class="sub">' . '<div>' . functions::display_menu($menu) . '</div>' . '<p><span class="gray">' . $lng['installation_date'] . ':</span> ' . functions::display_date($res['time']) . '<br />' . '<span class="gray">' . $lng['placing'] . ':</span>&nbsp;' . $array_placing[$res['layout']] . '<br />' . '<span class="gray">' . $lng['to_show'] . ':</span>&nbsp;' . $array_show[$res['view']];
         // Вычисляем условия договора на рекламу
         $agreement = array();
         $remains = array();
         if (!empty($res['count_link'])) {
             $agreement[] = $res['count_link'] . ' ' . $lng['transitions_n'];
             $remains_count = $res['count_link'] - $res['count'];
             if ($remains_count > 0) {
                 $remains[] = $remains_count . ' ' . $lng['transitions_n'];
             }
         }
         if (!empty($res['day'])) {
             $agreement[] = functions::timecount($res['day'] * 86400);
             $remains_count = $res['day'] * 86400 - (time() - $res['time']);
             if ($remains_count > 0) {
                 $remains[] = functions::timecount($remains_count);
             }
         }
         // Если был договор, то выводим описание
         if ($agreement) {
             echo '<br /><span class="gray">' . $lng['agreement'] . ':</span>&nbsp;' . implode($agreement, ', ');
             if ($remains) {
                 echo '<br /><span class="gray">' . $lng['remains'] . ':</span> ' . implode($remains, ', ');
             }
         }
         echo ($res['show'] ? '<br /><span class="red"><b>' . $lng['link_direct'] . '</b></span>' : '') . '</p></div></div>';
         ++$i;
     }
 } else {
     echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
 }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:ads.php

示例3: mysql_result

 }
 $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `user_id` = '" . $user['id'] . "'"), 0);
 if ($total) {
     $req = mysql_query("SELECT * FROM `cms_ban_users` WHERE `user_id` = '" . $user['id'] . "' ORDER BY `ban_time` DESC LIMIT {$start}, {$kmess}");
     $i = 0;
     while ($res = mysql_fetch_assoc($req)) {
         $remain = $res['ban_time'] - time();
         $period = $res['ban_time'] - $res['ban_while'];
         echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
         echo '<img src="../images/' . ($remain > 0 ? 'red' : 'green') . '.gif" width="16" height="16" align="left" />&#160;' . '<b>' . $lng_ban['ban_' . $res['ban_type']] . '</b>' . ' <span class="gray">(' . date("d.m.Y / H:i", $res['ban_while']) . ')</span>' . '<br />' . functions::checkout($res['ban_reason']) . '<div class="sub">';
         if ($rights > 0) {
             echo '<span class="gray">' . $lng_ban['ban_who'] . ':</span> ' . $res['ban_who'] . '<br />';
         }
         echo '<span class="gray">' . $lng['term'] . ':</span> ' . ($period < 86400000 ? functions::timecount($period) : $lng_ban['ban_time_before_cancel']);
         if ($remain > 0) {
             echo '<br /><span class="gray">' . $lng['remains'] . ':</span> ' . functions::timecount($remain);
         }
         // Меню отдельного бана
         $menu = array();
         if ($rights >= 7 && $remain > 0) {
             $menu[] = '<a href="profile.php?act=ban&amp;mod=cancel&amp;user=' . $user['id'] . '&amp;ban=' . $res['id'] . '">' . $lng_ban['ban_cancel_do'] . '</a>';
         }
         if ($rights == 9) {
             $menu[] = '<a href="profile.php?act=ban&amp;mod=delete&amp;user=' . $user['id'] . '&amp;ban=' . $res['id'] . '">' . $lng_ban['ban_delete_do'] . '</a>';
         }
         if (!empty($menu)) {
             echo '<div>' . functions::display_menu($menu) . '</div>';
         }
         echo '</div></div>';
         ++$i;
     }
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:ban.php

示例4: htmlspecialchars

Статистика
-----------------------------------------------------------------
*/
$textl = htmlspecialchars($user['name']) . ': ' . $lng['statistics'];
require '../incfiles/head.php';
echo '<div class="phdr"><a href="profile.php?user=' . $user['id'] . '"><b>' . $lng['profile'] . '</b></a> | ' . $lng['statistics'] . '</div>' . '<div class="user"><p>' . functions::display_user($user, array('iphide' => 1)) . '</p></div>' . '<div class="list2">' . '<p><h3><img src="../images/rate.gif" width="16" height="16" class="left" />&#160;' . $lng['statistics'] . '</h3><ul>';
if ($rights >= 7) {
    if (!$user['preg'] && empty($user['regadm'])) {
        echo '<li>' . $lng_profile['awaiting_registration'] . '</li>';
    } elseif ($user['preg'] && !empty($user['regadm'])) {
        echo '<li>' . $lng_profile['registration_approved'] . ': ' . $user['regadm'] . '</li>';
    } else {
        echo '<li>' . $lng_profile['registration_free'] . '</li>';
    }
}
echo '<li><span class="gray">' . ($user['sex'] == 'm' ? $lng_profile['registered_m'] : $lng_profile['registered_w']) . ':</span> ' . date("d.m.Y", $user['datereg']) . '</li>' . '<li><span class="gray">' . ($user['sex'] == 'm' ? $lng_profile['stayed_m'] : $lng_profile['stayed_w']) . ':</span> ' . functions::timecount($user['total_on_site']) . '</li>';
$lastvisit = time() > $user['lastdate'] + 300 ? date("d.m.Y (H:i)", $user['lastdate']) : false;
if ($lastvisit) {
    echo '<li><span class="gray">' . $lng['last_visit'] . ':</span> ' . $lastvisit . '</li>';
}
echo '</ul></p><p>' . '<h3><img src="../images/activity.gif" width="16" height="16" class="left" />&#160;' . $lng_profile['activity'] . '</h3><ul>' . '<li><span class="gray">' . $lng['forum'] . ':</span> <a href="profile.php?act=activity&amp;user=' . $user['id'] . '">' . $user['postforum'] . '</a></li>' . '<li><span class="gray">' . $lng['guestbook'] . ':</span> <a href="profile.php?act=activity&amp;mod=comments&amp;user=' . $user['id'] . '">' . $user['postguest'] . '</a></li>' . '<li><span class="gray">' . $lng['comments'] . ':</span> ' . $user['komm'] . '</li>' . '</ul></p>' . '<p><h3><img src="../images/award.png" width="16" height="16" class="left" />&#160;' . $lng_profile['achievements'] . '</h3>';
$num = array(50, 100, 500, 1000, 5000);
$query = array('postforum' => $lng['forum'], 'postguest' => $lng['guestbook'], 'komm' => $lng['comments']);
echo '<table border="0" cellspacing="0" cellpadding="0"><tr>';
foreach ($num as $val) {
    echo '<td width="28" align="center"><small>' . $val . '</small></td>';
}
echo '<td></td></tr>';
foreach ($query as $key => $val) {
    echo '<tr>';
    foreach ($num as $achieve) {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:stat.php


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