Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
    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'];
Exemplo n.º 3
0
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);
Exemplo n.º 4
0
 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));
 }
Exemplo n.º 5
0
}
?>
	<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>
Exemplo n.º 6
0
		<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();
Exemplo n.º 7
0
 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);
 }