Beispiel #1
0
 public function execute()
 {
     if (false !== ($token = Common::getGet('token'))) {
         $back = $this->acceptByToken($token);
     }
     if (!GWF_User::isLoggedIn()) {
         return GWF_HTML::err('ERR_LOGIN_REQUIRED');
     }
     return $back;
 }
Beispiel #2
0
 public function execute()
 {
     if (false !== ($token = Common::getGet('unsign'))) {
         return $this->onUnsign(Common::getGet('email', ''), $token);
     }
     if (!$this->module->isNewsletterForGuests() && !GWF_User::isLoggedIn()) {
         return GWF_HTML::err('ERR_LOGIN_REQUIRED');
     }
     if (false !== Common::getPost('sign')) {
         return $this->onSign();
     }
     return $this->templateSign();
 }
Beispiel #3
0
 private function getForm()
 {
     $tags = Common::getPostString('link_tags', Common::getGet('tag'));
     $data = array('link_lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_LangSelect::TYPE_SUPPORTED, 'link_lang'), $this->module->lang('th_link_lang')), 'link_score' => array(GWF_Form::STRING, '0', $this->module->lang('th_link_score'), $this->module->lang('tt_link_score')), 'link_gid' => array(GWF_Form::SELECT, GWF_GroupSelect::single('link_gid'), $this->module->lang('th_link_gid'), $this->module->lang('tt_link_gid')), 'tag_info' => array(GWF_Form::HEADLINE, '', $this->module->lang('info_tag')), 'known_tags' => array(GWF_Form::HEADLINE, '', $this->collectTags()), 'link_tags' => array(GWF_Form::STRING, $tags, $this->module->lang('th_link_tags')), 'div1' => array(GWF_Form::DIVIDER), 'link_href' => array(GWF_Form::STRING, '', $this->module->lang('th_link_href'), $this->module->lang('tt_link_href')), 'link_descr' => array(GWF_Form::STRING, '', $this->module->lang('th_link_descr')));
     if ($this->module->cfgLongDescription()) {
         $data['link_descr2'] = array(GWF_Form::MESSAGE, '', $this->module->lang('th_link_descr2'));
     }
     $data['link_options&' . GWF_Links::MEMBER_LINK] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::MEMBER_LINK]), $this->module->lang('th_link_options&' . GWF_Links::MEMBER_LINK));
     if (GWF_User::isLoggedIn()) {
         $data['link_options&' . GWF_Links::UNAFILIATE] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::UNAFILIATE]), $this->module->lang('th_link_options&' . GWF_Links::UNAFILIATE));
         $data['link_options&' . GWF_Links::ONLY_PRIVATE] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::ONLY_PRIVATE]), $this->module->lang('th_link_options&' . GWF_Links::ONLY_PRIVATE));
     }
     if (!GWF_Session::isLoggedIn() && $this->module->cfgGuestCaptcha()) {
         $data['captcha'] = array(GWF_Form::CAPTCHA);
     }
     $data['buttons'] = array(GWF_Form::SUBMITS, array('preview' => $this->module->lang('btn_preview'), 'add' => $this->module->lang('btn_add')));
     return new GWF_Form($this, $data);
 }
Beispiel #4
0
 private function getForm()
 {
     $data = array();
     if (false === ($file = $this->getFile())) {
         $name = '';
         $size = '';
     } else {
         $_POST['filename'] = $name = $file['name'];
         $size = $file['size'];
     }
     $data['filename'] = array(GWF_Form::STRING, $name, $this->module->lang('th_dl_filename'));
     if ($file === false) {
         $data['file'] = array(GWF_Form::FILE_OPT, '', $this->module->lang('th_file'));
         if (GWF_User::isLoggedIn()) {
             $data['upload'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_upload'));
         }
     } else {
         $data['size'] = array(GWF_Form::SSTRING, $size, $this->module->lang('th_dl_size'));
         $data['remove'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_remove'));
     }
     $data['group'] = array(GWF_Form::SELECT, GWF_GroupSelect::single('group', Common::getPost('group')), $this->module->lang('th_dl_gid'));
     $data['level'] = array(GWF_Form::INT, '0', $this->module->lang('th_dl_level'));
     if (GWF_User::isAdminS()) {
         $data['price'] = array(GWF_Form::FLOAT, '0.00', $this->module->lang('th_dl_price'));
     }
     $data['expire'] = array(GWF_Form::STRING, '0 seconds', $this->module->lang('th_dl_expire'), $this->module->lang('tt_dl_expire'));
     $data['guest_view'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_dl_guest_view'), $this->module->lang('tt_dl_guest_view'));
     $data['guest_down'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_dl_guest_down'), $this->module->lang('tt_dl_guest_down'));
     $data['adult'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_adult'));
     if (GWF_User::isLoggedIn()) {
         $data['huname'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_huname'));
     }
     $data['descr'] = array(GWF_Form::MESSAGE, '', $this->module->lang('th_dl_descr'));
     if (!GWF_User::isLoggedIn() && $this->module->cfgGuestCaptcha()) {
         $data['captcha'] = array(GWF_Form::CAPTCHA);
     }
     $data['add'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_add'));
     return new GWF_Form($this, $data);
 }
Beispiel #5
0
 public function execute()
 {
     require_once GWF_CORE_PATH . 'module/WeChall/WC_Freeze.php';
     require_once GWF_CORE_PATH . 'module/WeChall/WC_RegAt.php';
     if (false !== ($token = Common::getGet('link'))) {
         return $this->onLinkSiteAfterMailPre($token, (int) Common::getGet('site', 0));
     }
     if (!GWF_User::isLoggedIn()) {
         return GWF_HTML::err('ERR_LOGIN_REQUIRED');
     }
     # Hide and Show
     if (false !== ($array = Common::getPost('showname'))) {
         return $this->onHide($array, 0) . $this->templateSites();
     }
     if (false !== ($array = Common::getPost('hidename'))) {
         return $this->onHide($array, 1) . $this->templateSites();
     }
     # Link and UnLink
     if (false !== Common::getPost('link')) {
         return $this->onLinkSite() . $this->templateSites();
     }
     if (false !== ($array = Common::getPost('unlink'))) {
         return $this->onUnLinkSite($array) . $this->templateSites();
     }
     # Update
     if (false !== ($array = Common::getPost('update'))) {
         return $this->onUpdate($array) . $this->templateSites();
     }
     if (false !== Common::getPost('update_all')) {
         return $this->onUpdateAll() . $this->templateSites();
     }
     if (false !== ($siteid = Common::getGet('quick_update'))) {
         return $this->onQuickUpdate($siteid);
     }
     return $this->templateSites();
 }
Beispiel #6
0
<?php

$headers = array(array('Pos', 'wf_order', 'ASC'), array('Score', 'wf_score', 'ASC'), array('Title', 'wf_title', 'ASC'), array('Solvers', 'wf_solvers', 'ASC'), array('LastSolvedBy', 'user_name', 'ASC'), array('LastSolved', 'wf_last_solved_at', 'ASC'));
$logged_in = GWF_User::isLoggedIn();
if ($logged_in) {
    $headers[] = array('Unlock');
}
$box = $tVars['box'];
$box instanceof WC_Warbox;
$site = $tVars['site'];
$site instanceof WC_Site;
$user = GWF_Session::getUser();
$href_flags = $box->hrefFlags();
echo $tVars['site_quickjump'];
echo GWF_Box::box($tLang->lang('info_warbox_details', array($site->displayName(), $box->displayName(), count($tVars['data']))), $tLang->lang('title_warbox_details', array($site->displayName(), $box->displayName())));
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
function solving_form($tVars, WC_Warflag $flag)
{
    $form = '';
    $form .= GWF_Form::start(true, GWF_Form::ENC_DEFAULT, 'post', false);
    $form .= sprintf('<input type="hidden" name="wfid" value="%s" />', $flag->getID());
    $form .= sprintf('<input type="text" name="password_solution" value="" />');
    $form .= sprintf('<input type="submit" name="igotitnow" value="!" />');
    $form .= GWF_Form::end();
    // 	$data = array(
    // 		'flagid' => array(GWF_Form::HIDDEN, $flag->getID()),
    // 		'solution' => array(GWF_Form::STRING, ''),
    // 	);
    // 	$form = new GWF_Form($tVars['method'], $data);
    // 	return $form->templateX();
Beispiel #7
0
$b instanceof GWF_ForumBoard;
$user = GWF_Session::getUser();
$is_mod = GWF_User::isInGroupS('moderator');
?>


<!-- Banner Ads -->
<?php 
echo GWF_Website::getBanners('forum', 'forum');
?>
<hr/>


<!-- Title -->
<?php 
$options = GWF_User::isLoggedIn() ? GWF_Button::options($tVars['href_options'], $tLang->lang('btn_options')) : '';
$bell = GWF_Button::bell($tVars['href_unread'], $tLang->lang('btn_unread'));
$newthreads = $tVars['unread_threads'] > 0 ? sprintf('[%s]', $tVars['unread_threads']) . $bell : '';
$search = GWF_Button::search($tVars['href_search'], $tLang->lang('btn_search'));
$pollsbtn = GWF_Button::generic($tLang->lang('btn_polls'), $tVars['href_polls']);
?>

<h1><?php 
echo $options . $tLang->lang('forum_title') . $search . $newthreads . $pollsbtn;
?>
</h1>

<hr/>


<!-- Nav Tree -->
Beispiel #8
0
 public function cfgCaptcha()
 {
     return GWF_User::isLoggedIn() ? $this->cfgMemberCaptcha() : $this->cfgGuestCaptcha();
 }
Beispiel #9
0
 public static function displayMenuGroups(Module_WeChall $module)
 {
     if (GWF_User::isLoggedIn()) {
         $sel = Common::getGet('mo') === 'Usergroups' ? ' class="wc_menu_sel"' : '';
         return '<li><a' . $sel . ' href="' . GWF_WEB_ROOT . 'my_groups">' . $module->lang('menu_groups') . '</a></li>';
     }
 }
Beispiel #10
0
 private function getForm()
 {
     $data = array('title' => array(GWF_Form::STRING, $this->getFormTitle(), $this->module->lang('th_pm_title')), 'message' => array(GWF_Form::MESSAGE, $this->getFormMessage(), $this->module->lang('th_pm_message')), 'ignore' => array(GWF_Form::VALIDATOR));
     if (!GWF_User::isLoggedIn() && $this->module->cfgGuestCaptcha()) {
         $data['captcha'] = array(GWF_Form::CAPTCHA);
     }
     $data['cmds'] = array(GWF_Form::SUBMITS, array('preview' => $this->module->lang('btn_preview'), 'send' => $this->module->lang('btn_send')));
     return new GWF_Form($this, $data);
 }
Beispiel #11
0
    echo wcProfileOwnLinks($u, $mod_links);
}
# Challs
if (WC_Challenge::getScoreForUser($u) > 0) {
    Module_WeChall::includeForums();
    //	GWF_Module::getModule('Forum')->onInclude();
    # Profile Challs
    $method = $wechall->getMethod('ChallsProfile');
    $method instanceof WeChall_ChallsProfile;
    echo $method->templateChalls($u);
    # Created By
    if ($u->getID() !== '1') {
        $method = $wechall->getMethod('Challs');
        $method instanceof WeChall_Challs;
        echo $method->templateChalls(false, $u->getID(), '', '', '', false, false);
    }
}
# Guestbook
echo wcProfileGuestbook($u);
# Groups
echo wcProfileUsergroup($u, GWF_User::isLoggedIn());
GWF_Website::setPageTitle($tLang->lang('pt_profile', array($u->displayUsername())));
GWF_Website::setMetaDescr($tLang->lang('md_profile', array($u->displayUsername())));
GWF_Website::addMetaDescr(' ' . GWF_Module::getModule('WeChall')->getMethod('API_Bot')->showGlobal($u->getVar('user_name')));
//$tags = '';
//foreach ($regats as $regat)
//{
//	$regat instanceof WC_RegAt;
//	$tags .= ', '.$regat->getSite()->displayName();
//}
//GWF_Website::addMetaTags($tags);