public function displayLastSolvedDate() { if (NULL === ($date = $this->getVar('wf_last_solved_at'))) { return ''; } return GWF_Time::displayDate($date); }
private function onAddBan() { $form = $this->getFormBan(); if (false !== ($errors = $form->validate($this->module))) { return $errors; } $perm = $form->getVar('perm'); $ban = $form->getVar('type'); $ends = $form->getVar('ends'); $msg = $form->getVar('msg'); $userid = $this->user->getID(); if ($ban) { if ($perm) { $ends = ''; } elseif ($ends === '') { return $this->module->error('err_perm_or_date'); } elseif ($ends < date('YmdHis')) { return $this->module->error('err_future_is_past'); } GWF_Ban::insertBan($userid, $ends, $msg); if ($ends === '') { return $this->module->message('msg_permbanned', array($this->user->displayUsername())); } else { return $this->module->message('msg_tempbanned', array($this->user->displayUsername(), GWF_Time::displayDate($ends))); } } else { GWF_Ban::insertWarning($userid, $msg); return $this->module->message('msg_warned', array($this->user->displayUsername())); } }
public function displayEndDate() { if ($this->isWarning()) { return ''; } elseif ('' === ($ends = $this->getVar('ban_ends'))) { return GWF_HTML::lang('never'); } else { return GWF_Time::displayDate($ends); } }
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); }
public function templateShow() { if (false === ($news = GWF_News::getNewsQuick($this->module->getNewsPerPage(), $this->catid, $this->page, GWF_Language::getCurrentID()))) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } $date = count($news) > 0 ? $news[0]['news_date'] : GWF_Settings::getSetting('gwf_site_birthday') . '090000'; $date = GWF_Time::displayDate($date); GWF_Website::setPageTitle($this->module->lang('pt_news', array($date))); GWF_Website::setMetaTags($this->module->lang('mt_news', array($date))); GWF_Website::setMetaDescr($this->module->lang('md_news', array($this->page, $this->nPages))); // $mod_forum = GWF_Module::getModule('Forum', true); $tVars = array('news' => $news, 'titles' => GWF_News::getTitlesQuick($this->catid, GWF_Language::getCurrentID()), 'cats' => GWF_News::getCategories(), 'catid' => $this->catid, 'cat' => GWF_HTML::display($this->catTitle), 'page_menu' => $this->getPageMenu(), 'page' => $this->page, 'can_sign' => $this->module->canSignNewsletter(GWF_Session::getUser()), 'href_sign_news' => $this->module->hrefSignNewsletter(), 'may_add' => GWF_User::isAdminS() || GWF_User::isStaffS(), 'href_add' => $this->module->hrefAddNews()); return $this->module->templatePHP('show.php', $tVars); }
private static function sendMail(Module_Account $module, GWF_User $user, array $data) { $token = GWF_AccountChange::createToken($user->getID(), 'demo', serialize($data)); $mail = new GWF_Mail(); $mail->setSender($module->cfgMailSender()); $mail->setReceiver($user->getVar('user_email')); $mail->setSubject($module->lang('chdemo_subj')); $username = $user->display('user_name'); $timeout = GWF_Time::humanDuration($module->cfgChangeTime()); $gender = GWF_HTML::display($user->getVar('user_gender')); $country = GWF_Country::getByIDOrUnknown($data['user_countryid'])->display('country_name'); $lang1 = GWF_Language::getByIDOrUnknown($data['user_langid'])->display('lang_nativename'); $lang2 = GWF_Language::getByIDOrUnknown($data['user_langid2'])->display('lang_nativename'); $gender = GWF_HTML::lang('gender_' . $data['user_gender']); $birthdate = $data['user_birthdate'] > 0 ? GWF_Time::displayDate($data['user_birthdate'], true, 1) : GWF_HTML::lang('unknown'); $link = self::getChangeLink($user->getID(), $token); $mail->setBody($module->lang('chdemo_body', array($username, $timeout, $gender, $country, $lang1, $lang2, $birthdate, $link))); return $mail->sendToUser($user) ? $module->message('msg_mail_sent') : GWF_HTML::err('ERR_MAIL_SENT'); }
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); }
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)); }
$orderby = $table->getMultiOrderby($by, $dir); $ipp = 50; $nRows = $table->countRows(); $nPages = GWF_PageMenu::getPagecount($ipp, $nRows); $page = Common::clamp(Common::getGetInt('page', 1), 1, $nPages); $from = GWF_PageMenu::getFrom($page, $ipp); $pagemenu = GWF_PageMenu::display($page, $nPages, sprintf('highscore.php?by=%s&dir=%s&page=%%PAGE%%', urlencode($by), urlencode($dir))); $headers = array(array($chall->lang('th_start'), 'wccc_start'), array($chall->lang('th_user'), 'user_name'), array($chall->lang('th_time'), 'wccc_time'), array($chall->lang('th_count'), 'wccc_count'), array($chall->lang('th_solved'), 'wccc_solved'), array($chall->lang('th_rate'), 'wccc_rate')); if (false === ($result = $table->select('*', '', $orderby, array('wccc_uid'), $ipp, $from))) { die('DB ERROR'); } echo $pagemenu; echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, sprintf('highscore.php?by=%%BY%%&dir=%%DIR%%&page=1')); $user = new GWF_User(false); while (false !== ($row = $table->fetch($result, GDO::ARRAY_A))) { $user->setGDOData($row); echo GWF_Table::rowStart(); echo sprintf('<td class="gwf_date">%s</td>', GWF_Time::displayDate($row['wccc_start'])) . PHP_EOL; echo sprintf('<td>%s</td>', $user->displayProfileLink()) . PHP_EOL; echo sprintf('<td class="gwf_num">%ss</td>', $row['wccc_time']) . PHP_EOL; echo sprintf('<td class="gwf_num">%s</td>', $row['wccc_count']) . PHP_EOL; echo sprintf('<td class="gwf_num">%s</td>', $row['wccc_solved']) . PHP_EOL; echo sprintf('<td class="gwf_num">%.02f%%</td>', $row['wccc_rate']) . PHP_EOL; echo GWF_Table::rowEnd(); } $table->free($result); echo GWF_Table::end(); echo $pagemenu; echo $chall->copyrightFooter(); require_once 'challenge/html_foot.php';
<p><?php echo $tLang->lang('info_update', array(GWF_Time::displayDate($tVars['up_datestamp']), $tVars['up_token'], GWF_HTML::display($tVars['up_server']))); ?> <?php echo $tVars['form'];
<?php $lang = array('en' => array('help' => 'Usage: %CMD% [<gwf_date>|<countrycode_iso1>]. Print the current bot-time, a gwf_date as uniox timestamp, or the current time in a country.', 'bot' => 'The bot\'s time is %s %s. Unix timestamp: %s', 'err_tz_stub' => 'I cannot parse timezones yet. I blame Hirsch.', 'err_date' => 'Invalid gwf_date!', 'out' => 'The date %s will have the unix timestamp of %d.')); $plugin = Dog::getPlugin(); $message = $plugin->msg(); if ($message === '') { $timezone = date('T'); $gdo_date = GWF_Time::getDate(GWF_Date::LEN_SECOND); $plugin->rply('bot', array(GWF_Time::displayDate($gdo_date), $timezone, time())); } elseif (preg_match('/^[a-z]{2}$/i', $message)) { $plugin->rply('err_tz_stub'); } elseif (preg_match('/^[0-9]{2,21}$/', $message)) { if (!GWF_Time::isValidDate($message, false, strlen($message), 100000)) { $plugin->rply('err_date'); } else { $plugin->rply('out', array(GWF_Time::displayDate($message), GWF_Time::getTimestamp($message))); } } else { $plugin->showHelp(); }
public function displayFirstDate() { return GWF_Time::displayDate($this->getVar('sitemas_firstdate')); }
public static function displayFooter($debug = true) { $back = ''; if (self::wantFooter()) { $back .= '<footer id="gwf_footer">'; $back .= self::displayFooterMenu(Module_WeChall::instance()); if (!($module = GWF_Module::getModule('Heart'))) { return GWF_HTML::err('ERR_MODULE_MISSING', array('Heart')); } $back .= '<div id="foot_boxes" class="cf">' . PHP_EOL; $back .= '<div class="foot_box">' . self::lang('footer_1', array(date('Y'))) . '</div>' . PHP_EOL; $back .= '<div class="foot_box">' . self::lang('footer_2', array($module->cfgUserrecordCount(), GWF_Time::displayDate($module->cfgUserrecordDate()), $module->cfgPagecount())) . '</div>' . PHP_EOL; $back .= $debug ? '<div class="foot_box">' . self::debugFooter() . '</div>' . PHP_EOL : ''; $back .= '</div>' . PHP_EOL; $back .= '</footer>' . PHP_EOL; } return $back; }
public function displayBirthdate() { return GWF_Time::displayDate($this->getVar('birthdate')); }
public function render_quote($htmlspecial, $nl2br, $raw) { # Display the date of the original message. if (isset($this->params['date'])) { $date = GWF_Time::displayDate($this->params['date']); } else { $date = ''; } # Show from whom is the quote. $username = ''; if (isset($this->params['quote'])) { $username = $this->params['quote']; } elseif (isset($this->params['from'])) { $username = $this->params['from']; } $username = htmlspecialchars($username); $pre = '<blockquote class="gwf_bb_quote">'; if ($date !== '' || $username !== '') { $top = ''; if ($username !== '') { $top .= sprintf('<span>%s</span>', GWF_HTML::lang('quote_from', array($username))); } if ($date !== '') { $top .= sprintf('<div class="gwf_date">%s</div>', $date); } if ($top !== '') { $pre .= '<div class="gwf_bb_quote_top">'; $pre .= $top; $pre .= '</div>'; } } $after = '</blockquote>'; return $pre . $this->renderChilds($htmlspecial, $nl2br, $raw) . $after; }
public function displayLastDate() { return GWF_Time::displayDate($this->getVar('thread_lastdate')); }
public function displayColumn(GWF_Module $module, GWF_User $user, $col_name) { switch ($col_name) { case 'order_id': return $this->getVar($col_name); case 'user_name': return $this->getUser()->display($col_name); case 'order_date_paid': case 'order_date_ordered': return GWF_Time::displayDate($this->getVar($col_name)); case 'order_price': case 'order_price_total': return $this->getCurrency()->displayValue($this->getVar($col_name), true); case 'order_site': return GWF_HTML::display($this->getPaymentModule()->getSiteName()); case 'order_status': $status = $this->getVar('order_status'); $text = $module->lang('status_' . $status); switch ($status) { case self::CREATED: case self::ORDERED: case self::PAID: case self::PROCESSED: $href = '#'; } return GWF_HTML::anchor($href, $text); case 'order_data': return $this->getData()->displayOrder(); case 'order_descr_admin': $text = $this->display($col_name); $href = GWF_WEB_ROOT . 'index.php?mo=Payment&me=StaffOrder&oid=' . $this->getID(); return GWF_HTML::anchor($href, $text); default: return $this->display($col_name); // return sprintf('=[%s]=', $this->display($col_name)); } }
<?php echo $tVars['search_form']; $headers = array(array($tLang->lang('th_userid'), 'user_id', 'ASC'), array($tLang->lang('th_user_credits'), 'user_credits', 'ASC'), array($tLang->lang('th_user_level'), 'user_level', 'ASC'), array($tLang->lang('th_country'), 'user_countryid', 'ASC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_regdate'), 'user_regdate', 'ASC'), array($tLang->lang('th_email'), 'user_email', 'ASC'), array($tLang->lang('th_birthdate'), 'user_birthdate', 'ASC'), array($tLang->lang('th_regip'), 'user_regip', 'ASC'), array($tLang->lang('th_lastactivity'), 'user_lastactivity', 'DESC')); echo $tVars['pagemenu']; echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); foreach ($tVars['users'] as $user) { echo GWF_Table::rowStart(); $user instanceof GWF_User; $href = Module_Admin::getUserEditURL($user->getID()); echo GWF_Table::column(GWF_HTML::anchor($href, $user->getID()), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($href, round($user->getVar('user_credits')), 2), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($href, $user->getLevel()), 'gwf_num'); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $user->displayCountryFlag())); echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_name'))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_regdate'))), 'gwf_date'); echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_email'))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_birthdate'))), 'gwf_date'); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_IP6::displayIP($user->getVar('user_regip'), GWF_IP_EXACT))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayTimestamp($user->getVar('user_lastactivity'))), 'gwf_date'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
echo $tVars['page_menu']; ?> </span> <span class="ssy800v ssy_st_out2"> <span class="ssy800v_R ssy_st_out1"> <?php foreach ($tVars['news'] as $news) { ?> <a class="gwf_newsbox_item" href="#newsid_<?php echo $news['news_id']; ?> "></a> <span class="gwf_newsbox_item"> <span class="gwf_newsbox_date"><?php echo GWF_Time::displayDate($news['news_date']); ?> </span> <span class="gwf_newsbox_author"><?php echo GWF_HTML::display($news['user_name']); ?> </span> <span class="gwf_newsbox_title"><?php echo GWF_HTML::display($news['newst_title']); ?> </span> <span class="gwf_newsbox_message"><?php echo GWF_Message::display($news['newst_message']); ?> </span> </span>
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'];
<p><?php echo $tLang->lang('pi_trashcan'); ?> </p> <?php echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_pm_options&1'), 'options&1', 'DESC'), array($tLang->lang('th_pm_date'), 'pm_date', 'DESC'), array($tLang->lang('th_pm_from'), 'T_B.user_name', 'ASC'), array($tLang->lang('th_pm_to'), 'T_A.user_name', 'ASC'), array($tLang->lang('th_pm_title'), 'pm_title', 'ASC'), array()); $data = array(); $uid = GWF_Session::getUserID(); echo sprintf('<form id="gwf_pm_form" method="post" action="%s">', $tVars['form_action']); //echo sprintf('<table>'); foreach ($tVars['pms'] as $pm) { $pm instanceof GWF_PM; // $is_read = $pm->isOptionEnabled(GWF_PM::READ); // $is_sender = $pm->getSender()->getID() === $uid; // $is_deleted = $pm->getReceiver()-> // $class = $is_sender ? ($is_read ? 'gwf_pm_read' : 'gwf_pm_unread') : ($is_read ? 'gwf_pm_new' : 'gwf_pm_old'); $data[] = array(sprintf('<span class="%s" />', $pm->getHTMLClass()), sprintf('%s', GWF_Time::displayDate($pm->getVar('pm_date'))), sprintf('%s', $pm->getSender()->display('user_name')), sprintf('%s', $pm->getReceiver()->display('user_name')), sprintf('%s', GWF_HTML::anchor($pm->getDisplayHREF(), $pm->getVar('pm_title'))), sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID())); } $headers = GWF_Table::getHeaders2($headers, $tVars['sort_url']); $btns = '<input type="submit" name="restore" value="' . $tLang->lang('btn_restore') . '" />'; $raw_body = '<tr><td colspan="4"></td><td class="ri">' . $btns . '</td><td>' . '<input type="checkbox" onclick="gwfPMToggleAll(this.checked);"/>' . '</td></tr>'; echo GWF_Table::display2($headers, $data, $tVars['sort_url'], '', $raw_body); //echo sprintf('</table>'); echo sprintf('</form>'); echo $tVars['form_empty'];
<?php Module_WeChall::includeForums(); $chall = $tVars['chall']; $chall instanceof WC_Challenge; $headers = array(array($tLang->lang('th_length'), 'wmc_length'), array($tLang->lang('th_csolve_date'), 'wmc_date'), array($tLang->lang('th_user_name'), 'user_name'), array($tLang->lang('th_solution'), 'wmc_solution')); $chall->showHeader(true); echo GWF_Box::box($tVars['table_title']); echo $tVars['page_menu']; echo GWF_Table::start(); //echo GWF_Table::displayHeaders1($headers, $tVars['sort_url'], 'wmc_date', 'ASC', 'by', 'dir', $tVars['table_title']); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); $guest = GWF_Guest::getGuest(); $userr = new GWF_User(false); foreach ($tVars['data'] as $row) { if ($row['user_name'] === NULL) { $username = GWF_HTML::lang('guest'); } else { $userr->setGDOData($row); $username = $userr->displayProfileLink(); } echo GWF_Table::rowStart(); echo GWF_Table::column($row['wmc_length'], 'gwf_num'); echo GWF_Table::column(GWF_Time::displayDate($row['wmc_date']), 'gwf_date'); echo GWF_Table::column($username); echo GWF_Table::column($row['wmc_solution']); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['page_menu'];
public function displayDate() { return GWF_Time::displayDate($this->getVar('news_date')); }
<?php $headers = array(array($tLang->lang('th_date'), 'vm_date', 'DESC', 6), array($tLang->lang('th_title'), 'vm_title', 'ASC', 1), array($tLang->lang('th_votes'), 'vm_votes', 'DESC', 3), array($tLang->lang('th_top_answ'), null, null, 2)); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['polls'] as $poll) { $poll instanceof GWF_VoteMulti; $href = $poll->hrefShow(); echo GWF_Table::rowStart(); echo sprintf('<td class="gwf_date"><a href="%s">%s</a></td>', $href, GWF_Time::displayDate($poll->getVar('vm_date'))); echo sprintf('<td><a href="%s">%s</a></td>', $href, $poll->display('vm_title')); echo sprintf('<td class="gwf_num"><a href="%s">%s</a></td>', $href, $poll->getVar('vm_votes')); echo sprintf('<td><a href="%s">%s</a></td>', $href, $poll->displayTopAnswers()); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); if ($tVars['may_add_poll']) { echo GWF_Button::wrapStart(); echo GWF_Button::add($tLang->lang('btn_add_poll'), $tVars['href_add_poll']); echo GWF_Button::wrapEnd(); }
public function showPage(GWF_Page $page) { $page->increase('page_views', 1); $robot = $page->isOptionEnabled(GWF_PAGE::INDEXED) ? 'index,' : 'noindex,'; $robot .= $page->isOptionEnabled(GWF_PAGE::FOLLOW) ? 'follow' : 'nofollow'; GWF_Website::addMeta(array('robots', $robot, 0), true); GWF_Website::setMetaDescr($page->getVar('page_meta_desc')); GWF_Website::setMetaTags($page->getVar('page_meta_tags')); GWF_Website::setPageTitle($page->getVar('page_title')); GWF_Website::addInlineCSS($page->getVar('page_inline_css')); $translations = $this->getPageTranslations($page); $user = GWF_User::getStaticOrGuest(); $tVars = array('page' => $page, 'page_views' => $page->getVar('page_views'), 'title' => $page->display('page_title'), 'author' => $page->display('page_author_name'), 'created' => GWF_Time::displayDate($page->getVar('page_create_date')), 'modified' => GWF_Time::displayDate($page->getVar('page_date')), 'content' => $this->getPageContent($page), 'comments' => $this->getPageComments($page), 'form_reply' => $this->getPageCommentsForm($page), 'pagemenu' => $this->getPagemenuComments($page), 'translations' => $translations, 'trans_string' => $this->getPageTranslationsString($page, $translations), 'similar' => $this->getSimilarPages($page), 'edit_permission' => $page->isOwner($user) || $this->module->isAuthor($user)); return $this->module->template('show_page.tpl', $tVars); }
echo GWF_Table::start(); // echo '<thead><tr><th colspan="5">'.$tVars['folder']->display('pmf_name').'</th></tr></thead>'.PHP_EOL; $raw = '<tr><th colspan="6">' . $tVars['folder']->display('pmf_name') . '</th></tr>' . PHP_EOL; echo GWF_Table::displayHeaders1($headers, $tVars['sort_url'], 'pm_date', 'DESC', 'by', 'dir', $raw); foreach ($tVars['pms'] as $pm) { $pm instanceof GWF_PM; echo GWF_Table::rowStart(); $reply = GWF_Button::reply($pm->getReplyHREF(), $tLang->lang('btn_reply')); // $fromid = $pm->getFromID(); // $toid = $pm->getToID(); // $own = $fromid===$toid ? GWF_Session::getUser()->displayProfileLink() : ''; $href = $pm->getDisplayHREF(); $html_class = $pm->getHTMLClass(); $icon = sprintf('<a href="%s" class="gwf_pm_icon %s" title="%s" ></a>', $href, $html_class, $tLang->lang($html_class)); echo GWF_Table::column(); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, GWF_Time::displayDate($pm->getVar('pm_date'))), 'gwf_date'); echo GWF_Table::column($pm->isRecipient() ? $reply . sprintf('%s', $pm->getSender()->displayProfileLink()) : ''); echo GWF_Table::column($pm->isSender() ? $reply . sprintf('%s', $pm->getReceiver()->displayProfileLink()) : ''); echo GWF_Table::column("{$icon} " . GWF_HTML::anchor($href, $pm->getVar('pm_title'))); echo GWF_Table::column(sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID()), 'ce'); echo GWF_Table::rowEnd(); } echo GWF_Table::rowStart(); echo GWF_Table::column('', '', 5); echo GWF_Table::column(sprintf('<input type="checkbox" name="toggle" onclick="gwfPMToggleAll(this.checked);" />'), 'ce'); echo GWF_Table::rowEnd(); $btns = '<input type="submit" name="delete" value="Delete" />' . $tVars['folder_select'] . '<input type="submit" name="move" value="Move" />'; $raw_body = '<tr><td colspan="5">' . $btns . '</td></tr>'; echo $raw_body; echo GWF_Table::end(); echo sprintf('</form>');
echo $tLang->lang('pi_trashcan'); ?> </p> <?php echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_pm_options&1'), 'options&1', 'DESC'), array($tLang->lang('th_pm_date'), 'pm_date', 'DESC'), array($tLang->lang('th_pm_from'), 'T_B.user_name', 'ASC'), array($tLang->lang('th_pm_to'), 'T_A.user_name', 'ASC'), array($tLang->lang('th_pm_title'), 'pm_title', 'ASC'), array()); $data = array(); $uid = GWF_Session::getUserID(); echo sprintf('<form id="gwf_pm_form" method="post" action="%s">', htmlspecialchars($tVars['form_action'])); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['pms'] as $pm) { $pm instanceof GWF_PM; echo GWF_Table::rowStart(); echo GWF_Table::column('<span class="' . $pm->getHTMLClass() . '" ></span>'); echo GWF_Table::column(GWF_Time::displayDate($pm->getVar('pm_date'))); echo GWF_Table::column($pm->getSender()->display('user_name')); echo GWF_Table::column($pm->getReceiver()->display('user_name')); echo GWF_Table::column(GWF_HTML::anchor($pm->getDisplayHREF(), $pm->getVar('pm_title'))); echo GWF_Table::column(sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID())); // $is_read = $pm->isOptionEnabled(GWF_PM::READ); // $is_sender = $pm->getSender()->getID() === $uid; // $is_deleted = $pm->getReceiver()-> // $class = $is_sender ? ($is_read ? 'gwf_pm_read' : 'gwf_pm_unread') : ($is_read ? 'gwf_pm_new' : 'gwf_pm_old'); // $data[] = array( // sprintf('<span class="%s" />', $pm->getHTMLClass()), // sprintf('%s', GWF_Time::displayDate($pm->getVar('pm_date'))), // sprintf('%s', $pm->getSender()->display('user_name')), // sprintf('%s', $pm->getReceiver()->display('user_name')), // sprintf('%s', GWF_HTML::anchor($pm->getDisplayHREF(), $pm->getVar('pm_title'))), // sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID()),
<?php GWF_Javascript::focusElementByName('term'); echo $tVars['form_q']; # quickform # Start PMs if (count($tVars['pms']) > 0) { $headers = array(array($tLang->lang('th_pm_options&1'), 'pm_options&1'), array($tLang->lang('th_pm_date'), 'pm_date'), array($tLang->lang('th_pm_from')), array($tLang->lang('th_pm_to')), array($tLang->lang('th_pm_title'), 'pm_title'), array('<input type="checkbox" onclick="gwfPmToggleAll"/>')); $uid = GWF_Session::getUserID(); echo $tVars['pagemenu']; echo sprintf('<form id="gwf_pm_form" method="post" action="%s">', $tVars['form_action']); echo GWF_Table::start(); echo GWF_Table::displayHeaders2($headers, $tVars['sort_url']); foreach ($tVars['pms'] as $pm) { $pm instanceof GWF_PM; echo GWF_Table::rowStart(); echo sprintf('<td><span class="%s" /></td>', $pm->getHTMLClass()) . PHP_EOL; echo sprintf('<td>%s</td>', GWF_Time::displayDate($pm->getVar('pm_date'))) . PHP_EOL; echo sprintf('<td>%s</td>', $pm->getSender()->display('user_name')) . PHP_EOL; echo sprintf('<td>%s</td>', $pm->getReceiver()->display('user_name')) . PHP_EOL; echo sprintf('<td>%s</td>', GWF_HTML::anchor($pm->getDisplayHREF($tVars['term']), $pm->getVar('pm_title'))) . PHP_EOL; echo sprintf('<td><input type="checkbox" name="pm[%s]" /></td>', $pm->getID()) . PHP_EOL; echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo '</form>' . PHP_EOL; echo $tVars['pagemenu']; } # End PMs
public function cfgUserrecordDate() { return GWF_Time::displayDate($this->getModuleVar('userrecd', '00000000000000')); }
echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_user_name')); echo sprintf('<td>%s</td>', $order->getOrderUser()->displayProfileLink()); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_email')); echo sprintf('<td>%s</td>', $order->getOrderPayEMail()); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_date_ordered')); echo sprintf('<td class="gwf_date">%s</td>', GWF_Time::displayDate($order->getVar('order_date_ordered'))); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_date_paid')); echo sprintf('<td class="gwf_date">%s</td>', GWF_Time::displayDate($order->getVar('order_date_paid'))); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_site')); echo sprintf('<td>%s</td>', $order->getPaymentModule()->getSiteName()); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_status')); echo sprintf('<td>%s</td>', $status_link); echo GWF_Table::rowEnd(); echo GWF_Table::rowStart(); echo sprintf('<td>%s</td>', $tLang->lang('th_order_price_total')); echo sprintf('<td>%s</td>', Module_Payment::displayPrice($order->getOrderPriceTotal())); echo GWF_Table::rowEnd(); echo GWF_Table::end(); echo $tVars['form_exec'];