예제 #1
0
 public static function deliver(Module_PM $module, GWF_PM $pm)
 {
     if (false === ($pmo = GWF_PMOptions::getPMOptions($pm->getReceiver()))) {
         return 0;
     }
     if (!$pmo->isOptionEnabled(GWF_PMOptions::EMAIL_ON_PM)) {
         return 0;
     }
     $sender = $pm->getSender();
     $receiver = $pm->getReceiver();
     if ('' === ($rec = $receiver->getValidMail())) {
         return 0;
     }
     $sendername = $sender->getID() !== '0' ? $sender->display('user_name') : GWF_HTML::langUser($receiver, 'guest');
     $email = new GWF_Mail();
     $email->setSender($module->cfgEmailSender());
     $email->setReceiver($rec);
     $email->setSubject($module->langUser($receiver, 'mail_subj', array($sendername)));
     $autofolder = sprintf('index.php?mo=PM&me=AutoFolder&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
     $autofolder = Common::getAbsoluteURL($autofolder);
     $autofolder = GWF_HTML::anchor($autofolder, $autofolder);
     $delete = sprintf('index.php?mo=PM&me=Delete&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
     $delete = Common::getAbsoluteURL($delete);
     $delete = GWF_HTML::anchor($delete, $delete);
     $email->setBody($module->langUser($receiver, 'mail_body', array($receiver->displayUsername(), $sendername, $pm->display('pm_title'), $pm->display('pm_message'), $autofolder, $delete)));
     if (false === $email->sendToUser($receiver)) {
         return -4;
     }
     return 1;
 }
예제 #2
0
 public function displayUsername()
 {
     $uname = $this->getVar('shout_uname');
     if ($this->isGuestShout()) {
         return $uname;
         //			return GWF_HTML::lang('guest').'_'.$uname;
     }
     return GWF_HTML::anchor(GWF_WEB_ROOT . 'profile/' . urlencode($uname), GWF_HTML::display($uname));
 }
예제 #3
0
function wcProfileLastActivity(GWF_User $user, $ipp, $priv = false)
{
    $uid = $user->getID();
    $uh = GDO::table('WC_HistoryUser2');
    $entries = $uh->selectObjects('*', "userhist_uid={$uid}", 'userhist_date DESC', $ipp);
    //	$entries = array_reverse($entries);
    $back = '';
    $back .= '<table class="cl">';
    $href_txt_history = GWF_WEB_ROOT . 'history/for/' . $user->urlencode2('user_name');
    $anchor = GWF_HTML::anchor($href_txt_history, WC_HTML::lang('th_last_activites', array($user->displayUsername())));
    $back .= sprintf('<thead><tr><th colspan="2">%s</th></tr></thead>', $anchor);
    $unknown = GWF_HTML::lang('unknown');
    foreach ($entries as $entry) {
        $entry instanceof WC_HistoryUser2;
        $back .= GWF_Table::rowStart();
        $back .= sprintf('<td class="gwf_date">%s</td>', $priv ? $unknown : $entry->displayDate());
        $back .= sprintf('<td>%s</td>', $entry->displayComment());
        $back .= GWF_Table::rowEnd();
    }
    $back .= '</table>';
    return $back;
}
예제 #4
0
파일: profile.php 프로젝트: sinfocol/gwf3
}
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);
        }
    }
    $v = $p->display('prof_tel');
    if ($v !== '0' && $v !== '') {
        echo gwfProfileRow($tLang->lang('th_tel'), $v);
    }
    $v = $p->display('prof_mobile');
    if ($v !== '0' && $v !== '') {
        echo gwfProfileRow($tLang->lang('th_mobile'), $v);
    }
예제 #5
0
 public function displayWWW()
 {
     $url = $this->getVar('cmt_www');
     return GWF_HTML::anchor($url, $url, $url);
 }
예제 #6
0
파일: join_api.php 프로젝트: sinfocol/gwf3
// $href_api_3 = GWF_WEB_ROOT.'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_3';
echo '<a name="api_3"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_3b', array($usage_3_1, $usage_3_1, $usage_3_1, $event_types, $examples)), $l->lang('api_3t'));
# API 4)
$href_api_4 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_4';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_User&no_session=1&', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_4_1 = htmlspecialchars($url . 'username=<username>[&apikey=<your_api_key>]');
$example_4_1 = GWF_HTML::anchor($url . 'username='******'username='******'WC_NO_XSS_PASS'])) {
    $api_key = urlencode($udata['WC_NO_XSS_PASS']);
    $example_4_2 = GWF_HTML::anchor($url . "username={$uname}&apikey={$api_key}", $url . "username={$uname}&apikey={$api_key}");
} else {
    $example_4_2 = '';
}
echo '<a name="api_4"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_4b', array($usage_4_1, $usage_4_1, $example_4_1, $example_4_2)), $l->lang('api_4t'));
# API 5)
$href_api_5 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_5';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_Site&no_session=1', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_5_1 = htmlspecialchars($url . '[&sitename=<sitename>]');
$example_5_1 = GWF_HTML::anchor($url, $url);
$example_5_2 = GWF_HTML::anchor($url . '&sitename=WeChall', $url . '&sitename=WeChall');
echo '<a name="api_5"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_5b', array($usage_5_1, $usage_5_1, $example_5_1, $example_5_2)), $l->lang('api_5t'));
# Buttons
echo GWF_Button::wrapStart();
echo GWF_Button::generic($l->lang('btn_join'), GWF_WEB_ROOT . 'join_us');
echo GWF_Button::generic($l->lang('btn_join_war'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=warbox');
echo GWF_Button::generic($l->lang('btn_join_opt'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=optional');
echo GWF_Button::generic($l->lang('btn_api'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=wechall_api', 'generic', '', true);
echo GWF_Button::wrapEnd();
예제 #7
0
 public function getLastPosterLink()
 {
     if ($this->getPostCount() === 1) {
         return '';
     }
     if ('' === ($username = $this->getVar('thread_lastposter'))) {
         return GWF_HTML::lang('guest');
     }
     $href = sprintf('%sprofile/%s', GWF_WEB_ROOT, urlencode($username));
     return GWF_HTML::anchor($href, $username);
 }
예제 #8
0
파일: forum.php 프로젝트: sinfocol/gwf3
        $lastdate = $t->displayLastDate();
        $b2 = $t->getBoard();
        $anchor_board = GWF_HTML::anchor($b2->getShowBoardHREF(), $b2->getVar('board_title'));
        $anchor_thread = GWF_HTML::anchor($t->getPageHREF(1), $t->getVar('thread_title'));
        echo GWF_Table::rowStart();
        echo GWF_Table::column($anchor_board . '<br/>' . $anchor_thread);
        //		 GWF_HTML::anchor($t->getPageHREF(1), $t->displayBoardTitle().'<br/>'.$t->display('thread_title'), '', '', false));
        echo GWF_Table::column($edit . $unread);
        echo GWF_Table::column($t->getFirstPosterLink());
        echo GWF_Table::column($t->getVar('thread_postcount'), 'gwf_num');
        echo GWF_Table::column($t->getLastPosterLink());
        $btn_next = GWF_Button::next($hrefLastPage, $lastposttxt);
        echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $lastdate, '', '', false) . $btn_next, 'gwf_date');
        echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_thanks')), 'gwf_num');
        echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_votes_up')), 'gwf_num');
        echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_viewcount')), 'gwf_num');
        echo GWF_Table::rowEnd();
    }
    echo GWF_table::end();
}
?>
<!-- End Of Latest Threads -->

<!-- Boards -->
<?php 
echo $tVars['pagemenu_boards'];
?>

<?php 
$childs = $tVars['boards'];
if (count($childs) > 0) {
예제 #9
0
파일: warsolve.php 프로젝트: sinfocol/gwf3
<?php

$headers = array(array('WCID'), array('TITLE'), array('CAT'), array('SOL'), array('BTN'));
echo GWF_Form::start();
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers);
foreach ($tVars['flags'] as $flag) {
    $flag instanceof WC_Warflag;
    $solved = $flag->getVar('wf_solved_at') !== NULL;
    echo GWF_Table::rowStart();
    echo GWF_Table::column($flag->getID());
    $class = 'wc_chall_solved_' . ($solved ? '1' : '0');
    echo GWF_Table::column(GWF_HTML::anchor($flag->getURL(), $flag->getTitle()), $class);
    echo GWF_Table::column($flag->displayCat());
    if ($flag->isWarchall()) {
        echo GWF_Table::column('');
        echo GWF_Table::column('');
    } elseif ($solved) {
        echo GWF_Table::column('SOLVED!');
        echo GWF_Table::column('');
    } else {
        echo GWF_Table::column(sprintf('<input type="text" name="password[%s]" value="">', $flag->getID()));
        echo GWF_Table::column(sprintf('<input type="submit" name="button[%s]" value="CHECK">', $flag->getID()));
    }
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo GWF_Form::end();
예제 #10
0
파일: GWF_Order.php 프로젝트: sinfocol/gwf3
 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));
     }
 }
예제 #11
0
파일: trashcan.php 프로젝트: sinfocol/gwf3
<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'];
예제 #12
0
파일: search.php 프로젝트: sinfocol/gwf3
<?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
예제 #13
0
<?php

$order = $tVars['order'];
$order instanceof GWF_Order;
$status = $order->getVar('order_status');
$status_text = $tLang->lang('status_' . $status);
switch ($status) {
    case GWF_Order::CREATED:
    case GWF_Order::ORDERED:
        $status_link = GWF_HTML::anchor($tVars['href_paid'], $status_text);
        break;
    case GWF_Order::PAID:
    case GWF_Order::PROCESSED:
        $status_link = $status_text;
        break;
}
echo GWF_Table::start();
echo GWF_Table::rowStart();
echo sprintf('<td>%s</td>', $tLang->lang('th_order_id'));
echo sprintf('<td>%s</td>', $order->getVar('order_id'));
echo GWF_Table::rowEnd();
echo GWF_Table::rowStart();
echo sprintf('<td>%s</td>', $tLang->lang('th_order_token'));
echo sprintf('<td>%s</td>', $order->getVar('order_token'));
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'));
예제 #14
0
     $same_score = $solved;
 }
 if ($has_osr === true) {
     $osr = $user->getVar('regat_onsiterank');
     if ($osr === '0') {
         $osr = '?';
     }
     $onsiterank = "&nbsp;({$osr})";
 } else {
     $onsiterank = '';
 }
 echo GWF_Table::rowStart();
 echo sprintf('<td>%s</td>', $same_rank);
 //	echo sprintf('<td>%s</td>', GWF_Country::displayFlagS($data['user_countryid']));
 echo sprintf('<td>%s</td>', $user->displayCountryFlag());
 echo sprintf('<td>%s</td>', GWF_HTML::anchor($user->getProfileHREF(), $user->getVar('user_name')));
 //	echo sprintf('<td class="gwf_num">%s</td>', $score);
 echo sprintf('<td class="gwf_num">%s</td>', $user->getVar('regat_score'));
 echo sprintf('<td class="gwf_num">%.02f%%</td>', $user->getVar('regat_solved') * 100);
 echo '<td>';
 echo $logo;
 $username = $user->display('user_name');
 foreach ($tVars['sites'] as $site) {
     $site instanceof WC_Site;
     $sid2 = $site->getVar('site_id');
     $var = 'site_' . $sid2;
     if ($user->hasVar($var)) {
         $solved = $user->getVar($var);
         $percent = round($solved * 100, 2);
         $txt = $username . $solvetext . $percent . '%' . $ontxt . $site->display('site_name');
         echo $site->displayLogo(round(30 * $solved + 2), $txt, $solved >= 1, 32, $username);
예제 #15
0
파일: groups.php 프로젝트: sinfocol/gwf3
    } else {
        $ugopt = 0;
    }
    if (($ugopt & (GWF_UserGroup::LEADER | GWF_UserGroup::CO_LEADER)) > 0) {
        $edit = GWF_Button::edit(GWF_WEB_ROOT . 'edit_usergroup/' . $group->getID() . '/' . $group->urlencodeSEO('group_name'));
    } else {
        $edit = '';
    }
    $parent_board = $tVars['module']->getForumBoard();
    if (false !== ($board = GWF_ForumBoard::getByID($group->getVar('group_bid')))) {
        $href = $board->getShowBoardHREF();
        $forum = GWF_HTML::anchor($href, $group->getVar('group_name'));
    } else {
        $forum = $group->display('group_name');
    }
    $members = GWF_HTML::anchor(GWF_WEB_ROOT . 'users_in_group/' . $group->getID() . '/' . $group->urlencodeSEO('group_name'), $group->getVar('group_memberc'));
    echo GWF_Table::rowStart();
    echo GWF_Table::column($edit . $forum, 'nowrap');
    echo GWF_Table::column($members, 'gwf_num');
    echo GWF_Table::column($founder->displayProfileLink());
    if ($user->isGuest()) {
        echo '<td></td>' . PHP_EOL;
    } elseif ($in_grp) {
        echo GWF_Table::column(sprintf('<input type="submit" name="part[%s]" value="%s" />', $group->getVar('group_id'), $btn_part));
    } elseif ($group->isOptionEnabled(GWF_Group::FREE)) {
        echo GWF_Table::column(sprintf('<input type="submit" name="join[%s]" value="%s" />', $group->getVar('group_id'), $btn_join));
    } else {
        echo '<td></td>' . PHP_EOL;
    }
    echo GWF_Table::rowEnd();
}
예제 #16
0
 public static function sendAlertMail(Module_Account $module, GWF_User $user, $record_alert = 'record_alert')
 {
     if ($receive_mail = $user->getValidMail()) {
         $module->onLoadLanguage();
         $mail = new GWF_Mail();
         $mail->setSender(GWF_BOT_EMAIL);
         $sig = $module->lang("mail_signature");
         $mail->setSenderName($sig);
         $mail->setReceiver($receive_mail);
         $mail->setSubject($module->lang("mails_{$record_alert}"));
         $url = Common::getAbsoluteURL($module->getMethodURL('Access'));
         $mail->setBody($module->lang("mailb_record_alert", array($user->displayUsername(), $module->lang("mailv_{$record_alert}"), GWF_HTML::display($_SERVER['HTTP_USER_AGENT']), $_SERVER['REMOTE_ADDR'], gethostbyaddr($_SERVER['REMOTE_ADDR']), GWF_HTML::anchor($url, $url, 'Manage IP recording'), $sig)));
         $mail->sendToUser($user);
     }
 }
예제 #17
0
파일: Form.php 프로젝트: sinfocol/gwf3
 private function sendEmail($username, $email, $token, $password)
 {
     $mail = new GWF_Mail();
     $mail->setSender(GWF_BOT_EMAIL);
     $mail->setReceiver($email);
     $mail->setSubject($this->module->lang('regmail_subject'));
     $href = Common::getAbsoluteURL('activate/' . $token);
     $a = GWF_HTML::anchor($href, $href);
     if ($this->module->isPlaintextInEmail()) {
         $pt = $this->module->lang('regmail_ptbody', array(htmlspecialchars($username), htmlspecialchars($password)));
     } else {
         $pt = '';
     }
     $mail->setBody($this->module->lang('regmail_body', array($username, $a, $pt)));
     return $mail->sendAsHTML() ? $this->module->message('msg_mail_sent') : GWF_HTML::err('ERR_MAIL_SENT');
 }
예제 #18
0
 private static function getMailBodyUser(Module_Audit $module, GWF_AuditLog $log)
 {
     $url = Common::getAbsoluteURL($log->hrefReplay(), false);
     $link = GWF_HTML::anchor($url, $url);
     return sprintf("Hello %s\n\nTo review or share your logfiles on warchall, you may use these links:\nReplay: %s\n\nFrom: %s-%s (%s)\n", $log->getVar('al_eusername'), $link, $log->getVar('al_eusername'), $log->getVar('al_username'), $log->displayDate());
 }
예제 #19
0
<?php 
if ($tVars['jquery']) {
    return;
}
?>

<?php 
$count = count($tVars['latest_players']);
$cols = 7;
if ($count > 0) {
    echo '<table>';
    echo sprintf('<tr><th colspan="%d">%s</th></tr>', $cols, $tLang->lang('th_latest_players', array($count, $tVars['latest_players_time'])));
    echo '<tr>';
    $i = 0;
    foreach ($tVars['latest_players'] as $username) {
        echo sprintf('<td class="gwf_td_%d">%s</td>', $i % 2, GWF_HTML::anchor(GWF_WEB_ROOT . 'profile/' . urlencode($username), $username));
        if ($i % $cols === $cols - 1) {
            echo '</tr><tr>';
        }
        $i++;
    }
    echo '</tr>';
    echo '</table>';
}
?>

<?php 
if ($site->isScored()) {
    $name = $site->displayName();
    ?>
		<?php 
예제 #20
0
파일: show_post.php 프로젝트: sinfocol/gwf3
					<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>
				</span>
				<?php 
}
?>
				<div class="cb"></div>
			</div>
		</div>
		
		<?php 
$attach = '';
if ($post->hasAttachments()) {
    $attach .= '<div class="gwf_attachments">' . PHP_EOL;
    $attachments = $post->getAttachments();
예제 #21
0
파일: WC_HTML.php 프로젝트: sinfocol/gwf3
 private static function onlineMoreAnchor(Module_WeChall $module)
 {
     return GWF_HTML::anchor(GWF_WEB_ROOT . 'users/with/All/by/user_lastactivity/DESC/page-1', ', ' . $module->lang('more_online') . '…');
 }
예제 #22
0
파일: search.php 프로젝트: sinfocol/gwf3
<?php

GWF_Javascript::focusElementByName('term');
echo $tVars['form_quick'];
#echo $tVars['form_adv'];
if (count($tVars['result']) > 0) {
    echo $tVars['pagemenu'];
    $headers = array(array($tLang->lang('th_post_date'), 'post_date', 'DESC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_title')), array($tLang->lang('th_thanks'), 'post_thanks', 'DESC'), array($tLang->lang('th_votes_up'), 'post_votes_up', 'DESC'));
    echo GWF_Table::start();
    echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
    foreach ($tVars['result'] as $post) {
        echo GWF_Table::rowStart();
        $post instanceof GWF_ForumPost;
        $hrefPost = $post->getShowHREF($tVars['term']);
        $hrefProfile = $post->getUser()->getProfileHREF();
        echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->displayPostDate()));
        echo GWF_Table::column(GWF_HTML::anchor($hrefProfile, $post->getUser()->displayUsername()));
        echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->getVar('post_title')));
        echo GWF_Table::column($post->getVar('post_thanks'), 'gwf_num');
        echo GWF_Table::column($post->getVar('post_votes_up'), 'gwf_num');
        echo GWF_Table::rowEnd();
    }
    echo GWF_Table::end();
    echo $tVars['pagemenu'];
}
예제 #23
0
<?php

echo $tVars['pagemenu'];
$headers = array(array($tLang->lang('th_ssyf_id'), 'ssyf_id', 'DESC'), array($tLang->lang('th_ssyf_date'), 'ssyf_date', 'ASC'), array($tLang->lang('th_ssyf_status'), 'ssyf_status', 'ASC'), array($tLang->lang('th_ssyf_studio'), 'ssyf_studio', 'ASC'), array($tLang->lang('th_ssyf_ricavi'), 'ssyf_ricavi', 'ASC'), array($tLang->lang('th_ssyf_subricavi'), 'ssyf_subricavi', 'ASC'));
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
$data = array();
foreach ($tVars['forms'] as $form) {
    $form instanceof SSY_Form;
    $fid = $form->getID();
    $hrefExport = $tVars['module']->getMethodURL('Staff', '&export=' . $fid);
    echo GWF_Table::rowStart();
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $fid));
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->displayDate()));
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->displayStatus($tVars['module'])));
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_studio')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_ricavi')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_subricavi')));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
예제 #24
0
 public function displayShowLink($text)
 {
     $id = $this->getID();
     return GWF_HTML::anchor(GWF_WEB_ROOT . 'index.php?mo=Helpdesk&me=Ticket&ticket=' . $id, $text, 'Ticket #' . $id);
 }
예제 #25
0
파일: layer3.php 프로젝트: sinfocol/gwf3
<?php

#echo $tVars['form_wipe'];
echo $tVars['pagemenu'];
$headers = array(array($tLang->lang('th_ssyu_id'), 'ssyu_id', 'DESC'), array($tLang->lang('th_ssyu_fiscale'), 'ssyu_fiscale', 'ASC'), array($tLang->lang('th_ssyu_firstname'), 'ssyu_firstname', 'ASC'), array($tLang->lang('th_ssyu_lastname'), 'ssyu_lastname', 'ASC'), array($tLang->lang('th_ssyu_city'), 'ssyu_city', 'ASC'), array($tLang->lang('th_ssyu_businame'), 'ssyu_businame', 'ASC'), array($tLang->lang('th_ssyu_busicity'), 'ssyu_busicity', 'ASC'));
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
$tVars['module'] instanceof GWF_Module;
foreach ($tVars['users'] as $user) {
    $uid = $user->getID();
    $hrefForms = $tVars['module']->getMethodURL('Staff', '&forms=' . $uid);
    echo GWF_Table::rowStart();
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $uid));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_fiscale')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_firstname')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_lastname')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_city')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_businame')));
    echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_busicity')));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo $tVars['pagemenu'];
예제 #26
0
파일: unread.php 프로젝트: sinfocol/gwf3
<h2><?php 
echo $tLang->lang('pi_unread');
?>
</h2>
<h3><?php 
echo GWF_Button::generic($tLang->lang('btn_mark_read'), GWF_WEB_ROOT . 'index.php?mo=Forum&me=MarkRead');
?>
</h3>

<?php 
echo $tVars['pagemenu'];
$headers = array(array($tLang->lang('th_title'), 'thread_title', 'ASC'), array($tLang->lang('th_firstposter'), 'thread_firstposter', 'ASC'), array($tLang->lang('th_postcount'), 'thread_postcount', 'ASC'), array($tLang->lang('th_lastposter'), 'thread_lastposter', 'ASC'), array($tLang->lang('th_lastdate'), 'thread_lastdate', 'ASC'), array($tLang->lang('th_thread_thanks'), 'thread_thanks', 'DESC'), array($tLang->lang('th_thread_votes_up'), 'thread_votes_up', 'DESC'));
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
foreach ($tVars['threads'] as $t) {
    $t instanceof GWF_ForumThread;
    $b = $t->getBoard();
    echo GWF_Table::rowStart();
    $boardlink = GWF_HTML::anchor($b->getShowBoardHREF(), $b->getVar('board_title'));
    $threadlink = GWF_HTML::anchor($t->getPageHREF(1), $t->getVar('thread_title'));
    echo GWF_Table::column("{$boardlink}<br/>{$threadlink}");
    echo GWF_Table::column($t->getFirstPosterLink());
    echo GWF_Table::column($t->getPostCount(), 'gwf_num');
    echo GWF_Table::column($t->getLastPosterLink());
    echo GWF_Table::column(GWF_HTML::anchor($t->getLastPageHREF(), $t->displayLastDate()));
    echo GWF_Table::column($t->getVar('thread_thanks'), 'gwf_num');
    echo GWF_Table::column($t->getVar('thread_votes_up'), 'gwf_num');
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo $tVars['pagemenu'];
예제 #27
0
    // 	return $form->templateX();
    return $form;
}
foreach ($tVars['data'] as $flag) {
    $flag instanceof WC_Warflag;
    $solved = $flag->getVar('wf_solved_at') !== NULL;
    echo GWF_Table::rowStart();
    echo GWF_Table::column($flag->getVar('wf_order'), 'gwf_num');
    echo GWF_Table::column($flag->getVar('wf_score'), 'gwf_num');
    $class = $solved ? 'wc_chall_solved_1' : 'wc_chall_solved_0';
    if ('' === ($url = $flag->getVar('wf_url'))) {
        echo GWF_Table::column($flag->display('wf_title'), $class);
    } else {
        echo GWF_Table::column(GWF_HTML::anchor($url, $flag->getVar('wf_title'), NULL, $class));
    }
    echo GWF_Table::column(GWF_HTML::anchor($flag->hrefSolvers(), $flag->getVar('wf_solvers')), 'gwf_num');
    echo GWF_Table::column($flag->displayLastSolvedBy());
    echo GWF_Table::column($flag->displayLastSolvedDate(), 'gwf_date');
    if ($logged_in) {
        if (!$flag->isWarflag()) {
            echo GWF_Table::column('--ssh--only--');
        } elseif ($solved) {
            echo GWF_Table::column('Well Done');
        } else {
            echo GWF_Table::column(solving_form($tVars, $flag));
        }
    }
    // 	if ( ($user !== false) && () )
    // 	{
    // 		echo GWF_Table::column(GWF_Button::bell($href_flags, 'Enter Flags'));
    // 	}
예제 #28
0
 private static function sendSubscriptionB(Module_Forum $module, GWF_ForumThread $thread, GWF_User $user, $postername, $msg_block, $msg_count, $boardText, $threadTitle, $sender)
 {
     $userid = $user->getID();
     $username = $user->displayUsername();
     if (false === ($receiver = $user->getValidMail())) {
         GWF_Log::logCron('[ERROR] User ' . $username . ' has no valid email.');
         return false;
     }
     if (false === ($options = GWF_ForumOptions::getUserOptions($user))) {
         GWF_Log::logCron('[ERROR] User ' . $username . ' has no valid forum options.');
     }
     $token = $options->getVar('fopt_token');
     $href = Common::getAbsoluteURL($thread->getLastPageHREF(false), false);
     $showLink = GWF_HTML::anchor($href, $href);
     $href = Common::getAbsoluteURL($thread->getExternalUnSubscribeHREF($userid, $token, true), false);
     $unsubLink = GWF_HTML::anchor($href, $href);
     $href = Common::getAbsoluteURL($thread->getExternalUnSubscribeAllHREF($userid, $token, true), false);
     $unsubLinkAll = GWF_HTML::anchor($href, $href);
     $mail = new GWF_Mail();
     $mail->setSender($sender);
     $mail->setReceiver($receiver);
     $mail->setSubject($module->langUser($user, 'submail_subj', array($threadTitle, $postername, $boardText)));
     $mail->setBody($module->langUser($user, 'submail_body', array($username, $msg_count, $boardText, $threadTitle, $msg_block, $showLink, $unsubLink, $unsubLinkAll)));
     if (false === $mail->sendToUser($user)) {
         GWF_Log::logCron('[ERROR] Can not send mail to ' . $username . '; EMail: ' . $receiver);
     } else {
         GWF_Log::logCron('[+] Successfully sent Email to ' . $username . '; EMail: ' . $receiver);
     }
 }
예제 #29
0
파일: trashcan.php 프로젝트: sinfocol/gwf3
<?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()),
    //	);
}
echo GWF_Table::end();
예제 #30
0
 private static function getChangeLink($userid, $token)
 {
     $url = Common::getAbsoluteURL(sprintf('index.php?mo=Account&me=ChangeDemo&userid=%s&token=%s', $userid, $token));
     return GWF_HTML::anchor($url, $url);
 }