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


PHP GWF_User::isLoggedIn方法代码示例

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


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

示例1: execute

 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;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:Accept.php

示例2: execute

 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();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Sign.php

示例3: getForm

 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);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:18,代码来源:Add.php

示例4: getForm

 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);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:39,代码来源:Add.php

示例5: execute

 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();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:36,代码来源:LinkedSites.php

示例6: array

<?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();
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:warbox_details.php

示例7: sprintf

$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 -->
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:forum.old.php

示例8: cfgCaptcha

 public function cfgCaptcha()
 {
     return GWF_User::isLoggedIn() ? $this->cfgMemberCaptcha() : $this->cfgGuestCaptcha();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:Module_Shoutbox.php

示例9: displayMenuGroups

 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>';
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:7,代码来源:WC_HTML.php

示例10: getForm

 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);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:9,代码来源:Send.php

示例11: wcProfileOwnLinks

    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);
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:profile.php


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