• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP UserConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: testUserRequestCreation

 public function testUserRequestCreation()
 {
     $factoryMock = $this->getMock('Magento\\Backend\\Model\\Config\\Factory', [], [], '', false);
     $responseMock = $this->getMock('Magento\\Framework\\App\\Console\\Response', [], [], '', false);
     $configMock = $this->getMock('Magento\\Backend\\Model\\Config', [], [], '', false);
     $key = 'key';
     $value = 'value';
     $request = [$key => $value];
     $model = new UserConfig($factoryMock, $responseMock, $request);
     $factoryMock->expects($this->once())->method('create')->will($this->returnValue($configMock));
     $configMock->expects($this->once())->method('setDataByPath')->with($key, $value);
     $configMock->expects($this->once())->method('save');
     $model->launch();
 }
开发者ID:,项目名称:,代码行数:14,代码来源:


示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array('view' => 'tiles'), "presenting/overview"));
     $top->setImage(Icon::create($this->getPluginURL() . "/assets/topicon.svg"));
     $overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $top->addSubNavigation("presenting", $overview);
     $overview->addSubNavigation("overview", new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, array(), "presenting/overview")));
     $overview->addSubNavigation("all", new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, array(), "presenting/all")));
     $overview->addSubNavigation("tools", new AutoNavigation(_('Tools'), PluginEngine::getURL($this, array(), "tools/sidebar_graphics_generator")));
     if ($GLOBALS['perm']->have_perm("autor")) {
         $top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview")));
     }
     if ($GLOBALS['perm']->have_perm("user")) {
         $last_visit = UserConfig::get($GLOBALS['user']->id)->getValue("last_pluginmarket_visit");
         if ($last_visit) {
             $badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", array($last_visit));
             if ($badge_number > 0) {
                 $top->setBadgeNumber($badge_number);
             }
         }
     }
     if ($GLOBALS['perm']->have_perm("root")) {
         $approving = new Navigation(_("Qualitätssicherung"), PluginEngine::getURL($this, array(), "approving/overview"));
         $top->addSubNavigation("approving", $approving);
     }
     Navigation::addItem("/pluginmarket", $top);
     $loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $loginlink->setDescription(_("Laden Sie hier Plugins für Ihr Stud.IP herunter"));
     Navigation::addItem("/login/pluginmarket", $loginlink);
     NotificationCenter::addObserver($this, "triggerFollowingStudips", "PluginReleaseDidUpdateCode");
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:32,代码来源:PluginMarket.class.php


示例3: index_action

 /**
  * Display a user's calendar settings
  */
 public function index_action()
 {
     $calendar_user_control_data = (array) UserConfig::get($GLOBALS['user']->id)->getValue('CALENDAR_SETTINGS');
     foreach ($calendar_user_control_data as $key => $value) {
         $this->{$key} = $value;
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:calendar.php


示例4: before_filter

 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.Terminkalender');
     $this->settings = UserConfig::get($GLOBALS['user']->id)->getValue('CALENDAR_SETTINGS');
     if (!is_array($this->settings)) {
         $this->settings = Calendar::getDefaultUserSettings();
     }
     URLHelper::bindLinkParam('atime', $this->atime);
     $this->atime = Request::int('atime', time());
     $this->category = Request::int('category');
     $this->last_view = Request::option('last_view', $this->settings['view']);
     $this->action = $action;
     $this->restrictions = $this->category ? array('STUDIP_CATEGORY' => $this->category) : null;
     if ($this->category) {
         URLHelper::bindLinkParam('category', $this->category);
     }
     $self = Request::option('self');
     //   var_dump($_SESSION['SessSemName'], $self); exit;
     if (!$self && $_SESSION['SessSemName']['class'] == 'sem') {
         $this->range_id = Request::option('cid');
         Navigation::activateItem('/course/calendar');
     } else {
         $this->range_id = Request::option('range_id', $GLOBALS['user']->id);
         Navigation::activateItem('/calendar/calendar');
         URLHelper::bindLinkParam('range_id', $this->range_id);
     }
     URLHelper::bindLinkParam('last_view', $this->last_view);
 }
开发者ID:ratbird,项目名称:hope,代码行数:29,代码来源:calendar.php


示例5: showFolder

 /**
  * Liefert die vorhandenen Nachrichten eines Ordners des
  * autorisierten Nutzers zurück.
  *
  * @get /user/:user_id/:box/:folder_id
  */
 public function showFolder($user_id, $box, $folder_id)
 {
     $settings = \UserConfig::get($user_id)->MESSAGING_SETTINGS ?: array();
     $type = substr($box, 0, -3);
     if ($folder_id != 0 && (!isset($settings['folder'][$type][$folder_id]) || $settings['folder'][$type][$folder_id] === 'dummy')) {
         $this->notFound();
     }
     // only your messages!
     if ($user_id !== self::currentUser()) {
         $this->error(401);
     }
     // get all messages in the user's folder
     $ids = self::folder($user_id, $box === 'inbox' ? 'rec' : 'snd', $folder_id);
     $total = count($ids);
     $ids = array_slice($ids, $this->offset, $this->limit, true);
     $messages = array();
     if (sizeof($ids)) {
         foreach (\Message::findMany($ids) as $msg) {
             $url = $this->urlf('/message/%s', array($msg->id));
             $messages[$url] = $this->messageToJSON($msg);
         }
     }
     $this->etag(md5(serialize($messages)));
     return $this->paginated($messages, $total, compact('user_id', 'box', 'folder_id'));
 }
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:Messages.php


示例6: bulkSend

 /**
  * Sends the collected messages from sendingMail as e-mail.
  */
 function bulkSend()
 {
     // if nothing to do, return
     if (empty($this->bulk_mail)) {
         return;
     }
     // send a mail, for each language one
     foreach ($this->bulk_mail as $lang_data) {
         foreach ($lang_data as $data) {
             $mail = new StudipMail();
             $mail->setSubject($data['title']);
             foreach ($data['users'] as $user_id => $to) {
                 $mail->addRecipient($to, get_fullname($user_id), 'Bcc');
             }
             $mail->setReplyToEmail('')->setBodyText($data['text']);
             if (strlen($data['reply_to'])) {
                 $mail->setSenderEmail($data['reply_to'])->setSenderName($snd_fullname);
             }
             $user_cfg = UserConfig::get($user_id);
             if ($user_cfg->getValue('MAIL_AS_HTML')) {
                 $mail->setBodyHtml($mailhtml);
             }
             if ($GLOBALS["ENABLE_EMAIL_ATTACHMENTS"]) {
                 foreach (get_message_attachments($data['message_id']) as $attachment) {
                     $mail->addStudipAttachment($attachment['dokument_id']);
                 }
             }
             $mail->send();
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:34,代码来源:ForumBulkMail.php


示例7: initItem

 public function initItem()
 {
     global $user, $neux;
     parent::initItem();
     $my_messaging_settings = UserConfig::get($user->id)->MESSAGING_SETTINGS;
     $lastVisitedTimestamp = isset($my_messaging_settings['last_box_visit']) ? (int) $my_messaging_settings['last_box_visit'] : 0;
     $query = "SELECT SUM(mkdate > :time AND readed = 0) AS num_new,\n                         SUM(readed = 0) AS num_unread,\n                         SUM(readed = 1) AS num_read\n                  FROM message_user\n                  WHERE snd_rec = 'rec' AND user_id = :user_id AND deleted = 0";
     $statement = DBManager::get()->prepare($query);
     $statement->bindValue(':time', $lastVisitedTimestamp);
     $statement->bindValue(':user_id', $GLOBALS['user']->id);
     $statement->execute();
     list($neux, $neum, $altm) = $statement->fetch(PDO::FETCH_NUM);
     $this->setBadgeNumber($neum);
     if ($neux > 0) {
         $tip = sprintf(ngettext('Sie haben %d neue ungelesene Nachricht', 'Sie haben %d neue ungelesene Nachrichten', $neux), $neux);
     } else {
         if ($neum > 1) {
             $tip = sprintf(ngettext('Sie haben %d ungelesene Nachricht', 'Sie haben %d ungelesene Nachrichten', $neum), $neum);
         } else {
             if ($altm > 1) {
                 $tip = sprintf(ngettext('Sie haben %d alte empfangene Nachricht', 'Sie haben %d alte empfangene Nachrichten', $altm), $altm);
             } else {
                 $tip = _('Sie haben keine alten empfangenen Nachrichten');
             }
         }
     }
     $this->setImage(Icon::create('mail', 'navigation', ["title" => $tip]));
 }
开发者ID:ratbird,项目名称:hope,代码行数:28,代码来源:MessagingNavigation.php


示例8: createUdpApplication

 public static function createUdpApplication($config)
 {
     AutoLoad::addRoot(dirname(dirname($config)));
     SysLog::init(UserConfig::getConfig('log'));
     return new YaafUdpServ();
     // return $class;
     //进行路由解析等
 }
开发者ID:delphinBlue,项目名称:tsf,代码行数:8,代码来源:tsf.php


示例9: __construct

 public function __construct()
 {
     parent::__construct();
     if (!is_null(UserConfig::$email_module)) {
         throw new EmailModuleException("You can assign only one email module");
     }
     UserConfig::$email_module = $this;
 }
开发者ID:russelldavis,项目名称:UserBase,代码行数:8,代码来源:EmailModule.php


示例10: saveEmailAlerts

 /**
  * @param User $model
  * Add new email alerts and delete older
  */
 private function saveEmailAlerts(User $model)
 {
     if (isset($_POST['User'])) {
         UserConfig::model()->deleteAll("userId=" . $model->use_id . " AND configType ='" . UserConfig::TYPE_EMAIL_ALERT . "' AND configKey='" . UserConfig::KEY_EMAIL_ALERT_DEAL_STATUS . "'");
         if (isset($_POST['User']['emailAlertForDealStatus'])) {
             $emailAlerts = $_POST['User']['emailAlertForDealStatus'];
             foreach ($emailAlerts as $k => $v) {
                 if ($v == 1) {
                     $userConfig = new UserConfig();
                     $userConfig->unsetAttributes();
                     $userConfig->userId = $model->use_id;
                     $userConfig->configType = UserConfig::TYPE_EMAIL_ALERT;
                     $userConfig->configKey = UserConfig::KEY_EMAIL_ALERT_DEAL_STATUS;
                     $userConfig->configValue = $k;
                     $userConfig->save();
                 }
             }
         }
     }
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:24,代码来源:UserController.php


示例11: before_filter

 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     Navigation::activateItem("/pluginmarket/presenting");
     if ($GLOBALS['perm']->have_perm("user")) {
         $config = UserConfig::get($GLOBALS['user']->id);
         $this->last_pluginmarket_visit = $config->getValue("last_pluginmarket_visit") ?: time();
         $_SESSION['last_pluginmarket_visit'] = time();
         $config->store("last_pluginmarket_visit", $_SESSION['last_pluginmarket_visit']);
     }
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/studiptable.js");
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/pluginmarket.js");
     $tags_statement = DBManager::get()->prepare("\n            SELECT pluginmarket_tags.tag, COUNT(*) AS number\n            FROM pluginmarket_tags\n                INNER JOIN pluginmarket_plugins ON (pluginmarket_plugins.plugin_id = pluginmarket_tags.plugin_id)\n            WHERE pluginmarket_tags. proposal = '0'\n                AND pluginmarket_plugins.approved = 1\n                AND pluginmarket_plugins.publiclyvisible = 1\n            GROUP BY pluginmarket_tags.tag\n            ORDER BY number DESC, RAND()\n            LIMIT 25\n        ");
     $tags_statement->execute();
     $this->tags = $tags_statement->fetchAll(PDO::FETCH_ASSOC);
     // Set view
     $_SESSION['pluginmarket']['view'] = Request::get('view') ?: $_SESSION['pluginmarket']['view'];
     if (!isset($_SESSION['pluginmarket']['view'])) {
         $_SESSION['pluginmarket']['view'] = 'tiles';
     }
     // Sidebar
     $sidebar = Sidebar::Get();
     // Create search widget
     $searchWidget = new SearchWidget($this->url_for('presenting/all'));
     $searchWidget->addNeedle(_('Suche'), 'search', true);
     $sidebar->addWidget($searchWidget);
     // Create cloud
     $tagWidget = new LinkCloudWidget();
     $tagWidget->setTitle(_("Beliebte Tags"));
     foreach ($this->tags as $tag) {
         $tagWidget->addLink($tag['tag'], $this->url_for('presenting/all', array('tag' => $tag['tag'])), $tag['number']);
     }
     $sidebar->addWidget($tagWidget);
     // Create view widget
     if ($action != 'details') {
         $viewWidget = new ViewsWidget();
         $viewWidget->addLink(_('Kacheln'), URLHelper::getLink('', array('view' => 'tiles')))->setActive($_SESSION['pluginmarket']['view'] == 'tiles');
         $viewWidget->addLink(_('Liste'), $this->url_for('presenting/all', array('view' => 'list')))->setActive($_SESSION['pluginmarket']['view'] == 'list');
         $sidebar->addWidget($viewWidget);
     }
     // Create versionfilter widget
     $versionWidget = new OptionsWidget();
     $versionWidget->setTitle(_('Stud.IP Version'));
     // Create options for all studip versions
     $_SESSION['pluginmarket']['version'] = Request::submitted('version') ? Request::get('version') : $_SESSION['pluginmarket']['version'];
     $options[] = "<option value='" . URLHelper::getLink('', array('version' => 0)) . "'>" . _('Alle Versionen') . "</option>";
     foreach (array_reverse(PluginMarket::getStudipReleases()) as $version) {
         $options[] = "<option value='" . URLHelper::getLink('', array('version' => $version)) . "' " . ($_SESSION['pluginmarket']['version'] == $version ? "SELECTED" : "") . ">{$version}</option>";
     }
     $versionWidget->addElement(new WidgetElement('<select style="width: 100%" onchange="location = this.options[this.selectedIndex].value;">' . join("", $options) . '</select>'));
     // Add checkbox to ignore older releases (use invese logic to be applied on startup)
     $sidebar->addWidget($versionWidget, 'comments');
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:53,代码来源:presenting.php


示例12: _getIncludes

 protected function _getIncludes()
 {
     $config = array();
     $config['js']['core'] = json_decode($this->getModule('FS')->read(self::INCLUDES_PATH), TRUE);
     $core_css = $this->getModule('FS')->readDir("system/ui/core/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
     if ($this->isSession()) {
         $user_config = new UserConfig();
         $ui = $user_config->getConfig('ui', TRUE);
         foreach (array('interface', 'icons') as $value) {
             $this->set_session_value($value, $ui[$value]);
         }
         $user_css = $this->getModule('FS')->readDir("system/ui/" . $this->session['interface'] . "/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
         $user_js = [];
         //$this->getModule('FS')->readDir("system/ui/".$this->session['interface']."/interface", TRUE, array('file_type' => 'js', 'path_type' => FS::FILESYSTEM_PATH));
     } else {
         $user_css = $this->getModule('FS')->readDir("system/ui/flatos/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
         $user_js = $this->getModule('FS')->readDir("system/ui/flatos/interface", TRUE, array('file_type' => 'js', 'path_type' => FS::FILESYSTEM_PATH));
     }
     $config['css']['core'] = $core_css;
     $config['css']['user'] = $user_css;
     $config['js']['user'] = $user_js;
     return $config;
 }
开发者ID:na2axl,项目名称:FlatOS,代码行数:23,代码来源:UserInterface.php


示例13: __construct

 function __construct($user = null)
 {
     if ($user instanceof User) {
         $this->user = $user;
     } else {
         $this->user = User::find($user);
     }
     if (!isset($this->user)) {
         $this->user = new User();
         $this->user->user_id = 'nobody';
     }
     $this->cfg = UserConfig::get($this->user->user_id);
     $this->last_online_time = $this->get_last_action();
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:Seminar_User.class.php


示例14: showUserConfiguration

 /**
  * Show the user configuration for one parameter
  *
  * @param   string $user_id
  * @param   string $field
  *
  * @return  array()
  */
 public static function showUserConfiguration($user_id, $field)
 {
     $uconfig = UserConfig::get($user_id);
     $config = Config::get();
     $data = $config->getMetadata($field);
     if (!count($data)) {
         $data['field'] = $field;
         $data['type'] = 'string';
         $data['description'] = 'missing in table `config`';
     }
     $data['value'] = $uconfig->{$field};
     $data['fullname'] = User::find($user_id)->getFullname();
     return $data;
 }
开发者ID:ratbird,项目名称:hope,代码行数:22,代码来源:configuration.php


示例15: down

 function down()
 {
     DBManager::get()->execute("ALTER TABLE `event_data` CHANGE `author_id` `autor_id` VARCHAR(32) NOT NULL");
     DBManager::get()->execute("ALTER TABLE `calendar_event` DROP `mkdate`");
     $replace = array('list' => 'showlist', 'day' => 'showday', 'week' => 'showweek', 'month' => 'showmonth', 'year' => 'showyear');
     $default_settings = array('view' => 'week', 'start' => '9', 'end' => '20', 'step_day' => '900', 'step_week' => '1800', 'type_week' => 'LONG', 'delete' => '0', 'step_week_group' => '3600', 'step_day_group' => '3600');
     $res = DBManager::get()->query("SELECT user_id FROM `user_config` WHERE field = 'CALENDAR_SETTINGS'");
     foreach ($res as $row) {
         $config = UserConfig::get($row['user_id']);
         $settings = $config->getValue('CALENDAR_SETTINGS');
         if (isset($settings['view'])) {
             $default_settings['view'] = $replace[$settings['view']];
             $config->store('CALENDAR_SETTINGS', $default_settings);
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:16,代码来源:160_step_00283_update_calendar_settings.php


示例16: check_terms

function check_terms($userid, $_language_path) {

    if (Request::get('i_accept_the_terms') == "yes") {
        UserConfig::get($userid)->store('TERMS_ACCEPTED', 1);
        return;
    }

    if ($GLOBALS['auth']->auth['uid'] != 'nobody' && !empty($GLOBALS['user']) && !$GLOBALS['user']->cfg->getValue('TERMS_ACCEPTED'))
    {
?>

<table align="center" border="0" cellpadding="1" cellspacing="0">
    <tr>
        <td class="table_header_bold">
            <?= Icon::create('door-enter', 'info_alt')->asImg() ?>
            <b><?=_("Nutzungsbedingungen")?></b>
        </td>
    </tr>
    <tr>
        <td class="blank">
        <p><br><?=_("Stud.IP ist ein Open Source Projekt und steht unter der Gnu General Public License (GPL). Das System befindet sich in der ständigen Weiterentwicklung.")?></p>
        <p><?=_("Um den vollen Funktionsumfang von Stud.IP nutzen zu können, müssen Sie sich am System anmelden.")?><br>
        <?=_("Das hat viele Vorzüge:")?></p>
        <ul>
            <li><?=_("Zugriff auf Ihre Daten von jedem internetfähigen Rechner weltweit,")?></li>
            <li><?=_("Anzeige neuer Mitteilungen oder Dateien seit Ihrem letzten Besuch,")?></li>
            <li><?=_("Ein eigenes Profil im System,")?></li>
            <li><?=_("die Möglichkeit anderen Personen Nachrichten zu schicken oder mit ihnen zu chatten,")?></li>
            <li><?=_("und vieles mehr.")?></li>
        </ul>
        <p><?=_("Mit der Anmeldung werden die nachfolgenden Nutzungsbedingungen akzeptiert:")?></p>
        <? include("locale/$_language_path/LC_HELP/pages/nutzung.html"); ?>
        <p align="center">
        <a href="<?= URLHelper::getLink(Request::url(), array('i_accept_the_terms' => 'yes')) ?>"><b><?=_("Ich erkenne die Nutzungsbedingungen an")?></b></a>
        </p>
        <br>
        </td>
    </tr>
</table>

<?php
    include ('lib/include/html_end.inc.php');
    die;
    }
}
开发者ID:ratbird,项目名称:hope,代码行数:45,代码来源:terms.inc.php


示例17: before_filter

 /**
  * Sets up the controller
  *
  * @param String $action Which action shall be invoked
  * @param Array $args Arguments passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     // Abwärtskompatibilität, erst ab 1.1 bekannt
     if (!isset($GLOBALS['ALLOW_CHANGE_NAME'])) {
         $GLOBALS['ALLOW_CHANGE_NAME'] = TRUE;
     }
     parent::before_filter($action, $args);
     // Ensure user is logged in
     $GLOBALS['auth']->login_if($action !== 'logout' && $GLOBALS['auth']->auth['uid'] === 'nobody');
     // extract username
     $username = Request::username('username', $GLOBALS['user']->username);
     $user = User::findByUsername($username);
     if (!$GLOBALS['perm']->have_profile_perm('user', $user->user_id)) {
         $username = $GLOBALS['user']->username;
     } else {
         $username = $user->username;
         URLHelper::addLinkParam('username', $username);
     }
     $this->about = new about($username, null);
     $this->about->get_user_details();
     if (!$this->about->check) {
         $this->reportErrorWithDetails(_('Zugriff verweigert.'), array(_("Wahrscheinlich ist Ihre Session abgelaufen. Bitte " . "nutzen Sie in diesem Fall den untenstehenden Link, " . "um zurück zur Anmeldung zu gelangen.\n\n" . "Eine andere Ursache kann der Versuch des Zugriffs " . "auf Userdaten, die Sie nicht bearbeiten dürfen, sein. " . "Nutzen Sie den untenstehenden Link, um zurück auf " . "die Startseite zu gelangen."), sprintf(_('%s Hier%s geht es wieder zur Anmeldung beziehungsweise Startseite.'), '<a href="index.php">', '</a>')));
         $this->render_nothing();
         return;
     }
     $this->user = User::findByUsername($username);
     $this->restricted = $GLOBALS['perm']->get_profile_perm($this->user->user_id) !== 'user' && $username !== $GLOBALS['user']->username;
     $this->config = UserConfig::get($this->user->user_id);
     $this->validator = new email_validation_class();
     # Klasse zum Ueberpruefen der Eingaben
     $this->validator->timeout = 10;
     // Default auth plugin to standard
     if (!$this->user->auth_plugin) {
         $this->user->auth_plugin = 'standard';
     }
     PageLayout::addSqueezePackage('settings');
     // Show info message if user is not on his own profile
     if ($username != $GLOBALS['user']->username) {
         $message = sprintf(_('Daten von: %s %s (%s), Status: %s'), htmlReady($this->user->Vorname), htmlReady($this->user->Nachname), $username, $this->user->perms);
         $this->reportInfo($message);
     }
     Sidebar::get()->setImage('sidebar/person-sidebar.png');
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
 }
开发者ID:ratbird,项目名称:hope,代码行数:50,代码来源:settings.php


示例18: getGlobals

 public function getGlobals()
 {
     $result = array();
     if (User::isLoggedIn()) {
         $u = User::getUserInfo();
         $config = UserConfig::getAll();
         foreach ($config as $key => $val) {
             $this->addGlobal($result, $key, $val);
         }
         $this->addGlobal($result, 'sessionusername', $u['username']);
         $this->addGlobal($result, 'sessionuserid', $u['id']);
         $this->addGlobal($result, 'sessionadmin', (bool) $u['admin']);
         $this->addGlobal($result, 'sessionmoderator', (bool) $u['moderator']);
     }
     global $mdb;
     $killsLastHour = new RedisTtlCounter('killsLastHour', 3600);
     $this->addGlobal($result, 'killsLastHour', $killsLastHour->count(), 0);
     return $result;
 }
开发者ID:Nord001,项目名称:zKillboard,代码行数:19,代码来源:UserGlobals.php


示例19: getGlobals

 public function getGlobals()
 {
     global $showAds;
     $result = array();
     if (isset($_SESSION["loggedin"])) {
         $u = User::getUserInfo();
         $config = UserConfig::getAll();
         foreach ($config as $key => $val) {
             $this->addGlobal($result, $key, $val);
         }
         $this->addGlobal($result, "sessionusername", $u["username"]);
         $this->addGlobal($result, "sessionuserid", $u["id"]);
         $this->addGlobal($result, "sessionadmin", (bool) $u["admin"]);
         $this->addGlobal($result, "sessionmoderator", (bool) $u["moderator"]);
     }
     $this->addGlobal($result, "killsLastHour", Storage::retrieve("KillsLastHour", 0));
     $this->addGlobal($result, "showAds", $showAds);
     return $result;
 }
开发者ID:Covert-Inferno,项目名称:zKillboard,代码行数:19,代码来源:UserGlobals.php


示例20: getDailyRegistrations

 public function getDailyRegistrations()
 {
     $db = UserConfig::getDB();
     $dailyregs = array();
     if ($stmt = $db->prepare('SELECT regdate, count(*) AS reqs FROM (SELECT CAST(regtime AS DATE) AS regdate, id AS regs FROM ' . UserConfig::$mysql_prefix . 'users u LEFT JOIN ' . UserConfig::$mysql_prefix . 'googlefriendconnect g ON u.id = g.user_id WHERE g.google_id IS NOT NULL GROUP BY id) agg group by agg.regdate')) {
         if (!$stmt->execute()) {
             throw new Exception("Can't execute statement: " . $stmt->error);
         }
         if (!$stmt->bind_result($regdate, $regs)) {
             throw new Exception("Can't bind result: " . $stmt->error);
         }
         while ($stmt->fetch() === TRUE) {
             $dailyregs[] = array('regdate' => $regdate, 'regs' => $regs);
         }
         $stmt->close();
     } else {
         throw new Exception("Can't prepare statement: " . $db->error);
     }
     return $dailyregs;
 }
开发者ID:russelldavis,项目名称:UserBase,代码行数:20,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP UserController类代码示例发布时间:2022-05-23
下一篇:
PHP UserClient类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap