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


PHP UserConfig::set方法代码示例

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


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

示例1: modifyTicker

    }
    if (@$domainChar['isExecutorCEO']) {
        $subdomain = modifyTicker($domainChar['alliTicker']) . ".{$baseAddr}";
        if (isset($bannerUpdates[$subdomain])) {
            $banner = $bannerUpdates[$subdomain];
            Db::execute('insert into zz_subdomains (subdomain, banner) values (:subdomain, :banner) on duplicate key update banner = :banner', array(':subdomain' => $subdomain, ':banner' => $banner));
            $error = "Banner updated for {$subdomain}, please wait 2 minutes for the change to take effect.";
        }
        $status = Db::queryRow('select adfreeUntil, banner from zz_subdomains where subdomain = :subdomain', array(':subdomain' => $subdomain), 0);
        $domainChar['adfreeUntil'] = @$status['adfreeUntil'];
        $domainChar['banner'] = @$status['banner'];
        $allis[] = $domainChar;
    }
    $showDisqus = Util::getPost('showDisqus');
    if ($showDisqus) {
        UserConfig::set('showDisqus', $showDisqus == 'true');
        $error = 'Disqus setting updated to ' . ($showDisqus ? ' display.' : ' not display.') . ' The next page load will reflect the change.';
    }
}
$data['domainCorps'] = $corps;
$data['domainAllis'] = $allis;
$data['domainChars'] = $domainChars;
$data['showDisqus'] = UserConfig::get('showDisqus', true);
$app->render('account.html', array('data' => $data, 'message' => $error, 'key' => $key, 'reqid' => $reqid));
function modifyTicker($ticker)
{
    $ticker = str_replace(' ', '_', $ticker);
    $ticker = preg_replace('/^\\./', 'dot.', $ticker);
    $ticker = preg_replace('/\\.$/', '.dot', $ticker);
    return strtolower($ticker);
}
开发者ID:Nord001,项目名称:zKillboard,代码行数:31,代码来源:account.php

示例2:

            $error = "{$entitymetadata['name']} has been added to your tracking list";
        } else {
            $error = "{$entitymetadata['name']} is already being tracked";
        }
    }
    $ddcombine = Util::getPost("ddcombine");
    if (isset($ddcombine)) {
        UserConfig::set("ddcombine", $ddcombine);
    }
    $ddmonthyear = Util::getPost("ddmonthYear");
    if (isset($ddmonthyear)) {
        UserConfig::set("ddmonthyear", $ddmonthyear);
    }
    $useSummaryAccordion = Util::getPost("useSummaryAccordion");
    if (isset($useSummaryAccordion)) {
        UserConfig::set("useSummaryAccordion", $useSummaryAccordion);
    }
}
$data["entities"] = Account::getUserTrackerData();
$data["themes"] = Util::bootstrapThemes();
$data["viewthemes"] = Util::themesAvailable();
$data["apiKeys"] = Api::getKeys($userID);
$data["apiChars"] = Api::getCharacters($userID);
$charKeys = Api::getCharacterKeys($userID);
$charKeys = Info::addInfo($charKeys);
$data["apiCharKeys"] = $charKeys;
$data["userInfo"] = User::getUserInfo();
$data["currentTheme"] = UserConfig::get("theme", "default");
$data["timeago"] = UserConfig::get("timeago");
$data["ddcombine"] = UserConfig::get("ddcombine");
$data["ddmonthyear"] = UserConfig::get("ddmonthyear");
开发者ID:Covert-Inferno,项目名称:zKillboard,代码行数:31,代码来源:account.php

示例3: execute

 /**
  * Executes the cronjob.
  *
  * @param mixed $last_result What the last execution of this cronjob
  *                           returned.
  * @param Array $parameters Parameters for this cronjob instance which
  *                          were defined during scheduling.
  *                          Only valid parameter at the moment is
  *                          "verbose" which toggles verbose output while
  *                          purging the cache.
  */
 public function execute($last_result, $parameters = array())
 {
     global $user;
     $cli_user = $user;
     $notification = new ModulesNotification();
     $query = "SELECT DISTINCT user_id FROM seminar_user su WHERE notification <> 0";
     if (get_config('DEPUTIES_ENABLE')) {
         $query .= " UNION SELECT DISTINCT user_id FROM deputies WHERE notification <> 0";
     }
     $rs = DBManager::get()->query($query);
     while ($r = $rs->fetch()) {
         $user = new Seminar_User($r["user_id"]);
         if ($user->locked) {
             continue;
         }
         setTempLanguage('', $user->preferred_language);
         $to = $user->email;
         $title = "[" . $GLOBALS['UNI_NAME_CLEAN'] . "] " . _("Tägliche Benachrichtigung");
         $mailmessage = $notification->getAllNotifications($user->id);
         $ok = false;
         if ($mailmessage) {
             if ($user->cfg->getValue('MAIL_AS_HTML')) {
                 $smail = new StudipMail();
                 $ok = $smail->setSubject($title)->addRecipient($to)->setBodyHtml($mailmessage['html'])->setBodyText($mailmessage['text'])->send();
             } else {
                 $ok = StudipMail::sendMessage($to, $title, $mailmessage['text']);
             }
         }
         UserConfig::set($user->id, null);
         if ($ok !== false && $parameters['verbose']) {
             echo $user->username . ':' . $ok . "\n";
         }
     }
     $user = $cli_user;
 }
开发者ID:ratbird,项目名称:hope,代码行数:46,代码来源:send_mail_notifications.class.php


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