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


PHP GWF_Time::displayAge方法代码示例

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


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

示例1: on_peakmaster_Lc

 public function on_peakmaster_Lc()
 {
     $peak = Dog_ChannelPeak::getHighest();
     $date = $peak->getVar('lcpeak_date');
     $age = GWF_Time::displayAge($date);
     $date = GWF_Time::displayDate($date);
     $count = $peak->getVar('lcpeak_peak');
     $chan = $peak->getChannel();
     $serv = $chan->getServer();
     $args = array($chan->getName(), $serv->displayLongName(), $count, $date, $age);
     $this->rply('best_peak', $args);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:DOGMOD_Peak.php

示例2:

    echo GWF_WEB_ROOT . 'profile/' . $user->urlencode('user_name');
    ?>
"><?php 
    echo $user->displayUsername();
    ?>
</a></td>
		<td class="gwf_num"><?php 
    echo $user->getVar('user_level');
    ?>
</td>
		<td><?php 
    echo $user->isOptionEnabled(GWF_User::SHOW_EMAIL) ? $user->displayEMail() : '';
    ?>
</td>
		<td class="gwf_date"><?php 
    echo GWF_Time::displayDate($user->getVar('user_regdate'));
    ?>
</td>
		<td class="gwf_date"><?php 
    $user->isOptionEnabled(GWF_User::SHOW_BIRTHDAY) ? GWF_Time::displayDate($user->getVar('user_birthdate')) : '';
    ?>
</td>
		<td class="gwf_date"><?php 
    echo $user->isOptionEnabled(GWF_User::HIDE_ONLINE) ? GWF_HTML::lang('unknown') : GWF_Time::displayAge(GWF_Time::getDate(GWF_Date::LEN_SECOND, $user->getVar('user_lastactivity')));
    ?>
</td>
<?php 
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo $tVars['page_menu'];
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:search.php

示例3: gwfProfileRow

echo gwfProfileRow($tLang->lang('th_registered'), GWF_Time::displayDate($u->getVar('user_regdate')));
if ($u->isOptionEnabled(GWF_User::HIDE_ONLINE)) {
    $lastactivity = GWF_HTML::lang('unknown');
} else {
    $lastactivity = GWF_Time::displayTimestamp($u->getVar('user_lastactivity'));
}
echo gwfProfileRow($tLang->lang('th_last_active'), $lastactivity);
echo gwfProfileRow($tLang->lang('th_views'), $p->getVar('prof_views'));
if ('' !== ($v = $p->display('prof_firstname'))) {
    echo gwfProfileRow($tLang->lang('th_firstname'), $v);
}
if ('' !== ($v = $p->display('prof_lastname'))) {
    echo gwfProfileRow($tLang->lang('th_lastname'), $v);
}
if ($u->isOptionEnabled(GWF_User::SHOW_BIRTHDAY) && '00000000' !== ($v = $u->getVar('user_birthdate'))) {
    echo gwfProfileRow($tLang->lang('th_age'), GWF_Time::displayAge($v));
    echo gwfProfileRow($tLang->lang('th_birthdate'), GWF_Time::displayDate($v));
}
if ('' !== ($v = $p->display('prof_street'))) {
    echo gwfProfileRow($tLang->lang('th_street'), $v);
}
if (' ' !== ($v = $p->display('prof_zip') . ' ' . $p->display('prof_city'))) {
    echo gwfProfileRow($tLang->lang('th_city'), $v);
}
if ('' !== ($v = $p->getVar('prof_website', ''))) {
    echo gwfProfileRow($tLang->lang('th_website'), GWF_HTML::anchor($v, $v));
}
if (!$p->isContactHidden($user) || $is_admin) {
    if ($u->isOptionEnabled(GWF_User::SHOW_EMAIL) || $is_admin) {
        if ('' !== ($v = $u->displayEMail())) {
            echo gwfProfileRow($tLang->lang('th_email'), $v);
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:profile.php

示例4: onTop5DamageBest

 private function onTop5DamageBest($rank)
 {
     $db = gdo_db();
     $user = GWF_TABLE_PREFIX . 'dog_users';
     $user2 = GWF_TABLE_PREFIX . 'dog_users';
     $lsh = GWF_TABLE_PREFIX . 'dog_slap_history';
     $limit = GDO::getLimit(1, Common::clamp($rank - 1, 0));
     $query = "SELECT u.user_name slapper, u2.user_name target, s.* FROM {$lsh} s JOIN {$user} u ON u.user_id=lsh_slapper JOIN {$user2} u2 ON u2.user_id=lsh_target ORDER BY lsh_damage DESC {$limit}";
     echo $query . PHP_EOL;
     if (false === ($row = $db->queryFirst($query))) {
         return 'No database record found.' . PHP_EOL;
     }
     $adverb = Dog_SlapItem::getByID($row['lsh_adverb']);
     $verb = Dog_SlapItem::getByID($row['lsh_verb']);
     $adjective = Dog_SlapItem::getByID($row['lsh_adjective']);
     $item = Dog_SlapItem::getByID($row['lsh_item']);
     $date = $row['lsh_date'];
     return sprintf('BestSlap #%d: %s %s %s %s with %s %s. This dealt %d damage and happened on %s, %s ago.', $rank, $row['slapper'], $adverb->getVar('lsi_name'), $verb->getVar('lsi_name'), $row['target'], $adjective->getVar('lsi_name'), $item->getVar('lsi_name'), $row['lsh_damage'], GWF_Time::displayDate($date), GWF_Time::displayAge($date));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:19,代码来源:DOGMOD_Slapwarz.php

示例5:

}
?>
	<div class="gwf_post_body gwf_<?php 
echo $trd ? 'odd' : 'even';
?>
">
		<div class="gwf_post_head">
			<div>
				<span class="ib">
					<span class="gwf_post_title"><?php 
echo $post->displayTitle();
?>
</span>
					<br/>
					<span class="gwf_date gwf_post_date"><?php 
echo $post->displayPostDate() . ' (' . GWF_Time::displayAge($post->getVar('post_date')) . ')';
?>
</span>
				</span>
				<?php 
if ($toolbar !== '') {
    ?>
				<span class="gwf_post_toolbar">
					<span class="gwf_post_apps gwf_buttons"><?php 
    echo $toolbar;
    ?>
</span>
					<span class="gwf_post_perma"><?php 
    echo GWF_HTML::anchor($post->getShowHREFThread($term, $thread), $tLang->lang('permalink'));
    ?>
</span>
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:show_post.php

示例6:

		<td><a href="<?php 
    echo GWF_WEB_ROOT . 'profile/' . $user->urlencode('user_name');
    ?>
"><?php 
    echo $user->displayUsername();
    ?>
</a></td>
		<td class="gwf_num"><?php 
    echo $user->getVar('user_level');
    ?>
</td>
		<td><?php 
    echo $user->isOptionEnabled(GWF_User::SHOW_EMAIL) ? $user->displayEMail() : '';
    ?>
</td>
		<td class="gwf_date"><?php 
    echo $user->displayRegdate();
    ?>
</td>
		<td class="gwf_date"><?php 
    $user->isBirthdayShown() ? $user->displayBirthday() : '';
    ?>
</td>
		<td class="gwf_date"><?php 
    echo $user->isOnlineHidden() ? GWF_HTML::lang('unknown') : GWF_Time::displayAge(GWF_Time::getDate(GWF_Date::LEN_SECOND, $user->getVar('user_lastactivity')));
    ?>
</td>
<?php 
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:users.php

示例7: displayBanner

 private function displayBanner(GWF_User $user, $format = self::FORMAT, $bg = self::BGCOLOR, $fg = self::FGCOLOR, $size, $spacingx = 1, $spacingy = 1, $mx, $my, $divider)
 {
     $this->box_logo = new GWF_GDRect();
     $this->box_stats = new GWF_GDRect(0, 0, self::WIDTH, self::HEIGHT);
     $this->box_avatar = new GWF_GDRect();
     // 		echo $this->box_stats->toString().PHP_EOL;
     # Image
     if (false === ($image = imagecreatetruecolor(self::WIDTH, self::HEIGHT))) {
         echo GWF_HTML::err('ERR_GENERAL', array(__FILE__, __LINE__));
         return false;
     }
     # Colors
     $bg = GWF_GDColor::fromHTML($image, $bg);
     $fg = GWF_GDColor::fromHTML($image, $fg);
     # BG
     imagefilledrectangle($image, 0, 0, self::WIDTH, self::HEIGHT, $bg);
     $format2 = '';
     for ($i = 0; $i < strlen($format); $i++) {
         $c = $format[$i];
         $pos = $this->parsePos($format, $i);
         switch ($c) {
             case 'L':
                 $this->copyLogo($image, $pos);
                 break;
             case 'A':
                 $this->copyAvatar($image, $user, $pos);
                 break;
             case 'S':
                 $this->copySites($image);
                 break;
             default:
                 $format2 .= $c;
                 break;
         }
     }
     // 		echo $this->box_stats->toString().PHP_EOL;
     $text = '';
     for ($i = 0; $i < strlen($format2); $i++) {
         $c = $format2[$i];
         switch ($c) {
             case 'U':
                 $text .= $divider . $user->getVar('user_name');
                 break;
             case 'R':
                 $text .= $divider . 'Registered: ' . GWF_Time::displayAge($user->getVar('user_regdate'));
                 break;
             case 'T':
                 $text .= $divider . $this->module->langUser($user, 'th_totalscore') . ': ' . $user->getVar('user_level');
                 break;
             case 'G':
                 $text .= $divider . $this->module->langUser($user, 'th_rank2') . ': ' . WC_RegAt::calcExactRank($user);
                 break;
             case 'C':
                 $text .= $divider . $this->module->langUser($user, 'th_crank') . ': ' . WC_RegAt::calcExactCountryRank($user);
                 break;
             case 'X':
                 $text .= $divider . $this->getSignature($user);
                 break;
         }
     }
     // 		die($this->getFontPath());
     $text = substr($text, strlen($divider));
     if (!GWF_GDText::write($image, $this->getFontPath(), $this->box_stats->x, $this->box_stats->y, $text, $fg, $this->box_stats->w, $size, $spacingx, $spacingy, $mx, $my)) {
         return false;
     }
     // 		die();
     # Output
     header('Content-Type: image/jpeg');
     imagejpeg($image);
     imagedestroy($image);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:71,代码来源:API_UserBanner.php


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