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


PHP GWF_User::setGDOData方法代码示例

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


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

示例1: execute

 public function execute()
 {
     GWF3::setConfig('log_request', false);
     $_GET['ajax'] = 1;
     $cut = time() - GWF_ONLINE_TIMEOUT;
     $user = new GWF_User();
     $table = GDO::table('GWF_Session');
     $profiles = '';
     if (false === ($result = $table->select('sess_user,user_name,user_options,user_level', "sess_time>={$cut}", 'user_name ASC', array('user')))) {
         return;
     }
     $guest = 0;
     $member = 0;
     $total = 0;
     $u_count = array();
     $u_users = array();
     while (false !== ($row = $table->fetch($result, GDO::ARRAY_A))) {
         $total++;
         $uid = $row['sess_user'];
         if ($uid == 0) {
             $guest++;
             continue;
         }
         $member++;
         $user->setGDOData($row);
         if ($user->isOptionEnabled(GWF_User::HIDE_ONLINE)) {
             continue;
         }
         if (isset($u_count[$uid])) {
             $u_count[$uid]++;
         } else {
             $u_count[$uid] = 1;
             $u_users[$uid] = $user->displayProfileLink();
         }
     }
     $table->free($result);
     foreach ($u_count as $uid => $cnt) {
         $multi = $cnt > 1 ? "(x{$cnt})" : '';
         $profiles .= ', ' . $u_users[$uid] . $multi;
     }
     $profiles = $profiles === '' ? '.' : ': ' . substr($profiles, 2) . '.';
     return sprintf('%s Online%s', $total, $profiles);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:43,代码来源:Beat.php

示例2: templateDDOS

 private function templateDDOS(WC_Site $site)
 {
     //		require_once GWF_CORE_PATH.'module/WeChall/WC_RegAt.php';
     $siteid = $site->getVar('site_id');
     $regat = GWF_TABLE_PREFIX . 'wc_regat';
     $users = GWF_TABLE_PREFIX . 'user';
     $query = "SELECT u.* FROM {$regat} JOIN {$users} u ON regat_uid=user_id WHERE regat_sid={$siteid}";
     $db = gdo_db();
     if (false === ($result = $db->queryRead($query))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $user = new GWF_User();
     while (false !== ($row = $db->fetchAssoc($result))) {
         $user->setGDOData($row);
         $site->onUpdateUser($user, false);
     }
     $db->free($result);
     $site->recalcSite();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:19,代码来源:SiteDDOS.php

示例3: array

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


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