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

PHP get_setting函数代码示例

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

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



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

示例1: __construct

 /**
  * Constructor (generates a connection to the API)
  * @param   string  Clockworksms API key required to use the plugin
  * @return  void
  */
 public function __construct($apiKey = null)
 {
     $plugin = ClockworksmsPlugin::create();
     $clockWorkSMSPlugin = $plugin->get('tool_enable');
     if (empty($apiKey)) {
         $clockWorkSMSApiKey = $plugin->get('api_key');
     } else {
         $clockWorkSMSApiKey = $apiKey;
     }
     $this->table = Database::get_main_table('user_field_values');
     if ($clockWorkSMSPlugin == true) {
         $this->apiKey = $clockWorkSMSApiKey;
         // Setting Clockworksms api
         define('CONFIG_SECURITY_API_KEY', $this->apiKey);
         $trimmedApiKey = trim(CONFIG_SECURITY_API_KEY);
         if (!empty($trimmedApiKey)) {
             $this->api = new Clockwork(CONFIG_SECURITY_API_KEY);
         } else {
             $this->api = new Clockwork(' ');
             $recipient_name = api_get_person_name(
                 api_get_setting('administratorName'),
                 api_get_setting('administratorSurname'),
                 null,
                 PERSON_NAME_EMAIL_ADDRESS
             );
             $email_form = get_setting('emailAdministrator');
             $emailsubject = 'Clockworksms error';
             $emailbody = 'Key cannot be blank';
             $sender_name = $recipient_name;
             $email_admin = $email_form;
             api_mail_html($recipient_name, $email_form, $emailsubject, $emailbody, $sender_name, $email_admin);
         }
         $this->plugin_enabled = true;
     }
 }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:40,代码来源:clockworksms.lib.php


示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // if this is a load balancer FoOlSlide, disable the public interface
     if (get_setting('fs_balancer_master_url')) {
         show_404();
     }
     // We need to set some theme stuff, so let's load the template system
     $this->load->library('template');
     $this->config->load('theme');
     // Set theme by using the theme variable
     $this->template->set_theme(get_setting('fs_theme_dir') ? get_setting('fs_theme_dir') : 'default');
     // load the controller from the current theme, else load the default one
     if (file_exists('content/themes/' . get_setting('fs_theme_dir') . '/reader_controller.php')) {
         require_once 'content/themes/' . get_setting('fs_theme_dir') . '/reader_controller.php';
     } else {
         require_once 'content/themes/' . $this->config->item('theme_extends') . '/reader_controller.php';
     }
     $this->RC = new Reader_Controller();
     // load the functions from the current theme, else load the default one
     if (file_exists('content/themes/' . get_setting('fs_theme_dir') . '/reader_functions.php')) {
         require_once 'content/themes/' . get_setting('fs_theme_dir') . '/reader_functions.php';
     } else {
         require_once 'content/themes/' . $this->config->item('theme_extends') . '/reader_functions.php';
     }
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:26,代码来源:Public_Controller.php


示例3: register

 function register($_username, $_password, $_email)
 {
     if ($this->ucenter_charset != 'utf-8') {
         $result = uc_user_register(convert_encoding($_username, 'utf-8', $this->ucenter_charset), $_password, $_email);
     } else {
         $result = uc_user_register($_username, $_password, $_email);
     }
     switch ($result) {
         default:
             $uid = $this->model('account')->user_register($_username, $_password, $_email);
             if (get_setting('register_valid_type') == 'N' or get_setting('register_valid_type') == 'email' and get_setting('register_type') == 'invite') {
                 $this->model('active')->active_user_by_uid($uid);
             }
             return array('user_info' => $this->model('account')->get_user_info_by_username($_username), 'uc_uid' => $result, 'username' => $_username, 'email' => $_email);
             break;
         case -1:
             return '用户名不合法';
             break;
         case -2:
             return '用户名包含不允许注册的词语';
             break;
         case -3:
             return '用户名已经存在';
             break;
         case -4:
             return 'Email 格式有误';
             break;
         case -5:
             return 'Email 不允许注册';
             break;
         case -6:
             return '该 Email 已经被注册';
             break;
     }
 }
开发者ID:chenruixuan,项目名称:wecenter,代码行数:35,代码来源:ucenter.php


示例4: bet

 /**
  * User command for betting on the coin toss game in the casino
  *
  * @param bet int The amount of money to bet on the coin toss game
  * @return Array
  *
  * @note
  * If the player bets within ~1% of the maximum bet, they will receive a reward item
  */
 public function bet()
 {
     $player = new Player(self_char_id());
     $bet = intval(in('bet'));
     $negative = $bet < 0;
     set_setting('bet', max(0, $bet));
     $pageParts = ['reminder-max-bet'];
     if ($negative) {
         $pageParts = ['result-cheat'];
         $player->vo->health = subtractHealth($player->id(), 99);
     } else {
         if ($bet > $player->vo->gold) {
             $pageParts = ['result-no-gold'];
         } else {
             if ($bet > 0 && $bet <= self::MAX_BET) {
                 if (rand(0, 1) === 1) {
                     $pageParts = ['result-win'];
                     $player->vo->gold = add_gold($player->id(), $bet);
                     if ($bet >= round(self::MAX_BET * 0.99)) {
                         // within about 1% of the max bet & you win, you get a reward item.
                         add_item($player->id(), self::REWARD, 1);
                     }
                 } else {
                     $player->vo->gold = subtract_gold($player->id(), $bet);
                     $pageParts = ['result-lose'];
                 }
             }
         }
     }
     // End of not cheating check.
     return $this->render(['pageParts' => $pageParts, 'player' => $player, 'bet' => get_setting('bet')]);
 }
开发者ID:reillo,项目名称:ninjawars,代码行数:41,代码来源:CasinoController.php


示例5: binding_callback_action

 function binding_callback_action()
 {
     $oauth = new Services_Weibo_WeiboOAuth(get_setting('sina_akey'), get_setting('sina_skey'));
     if ($_GET['uid'] and $this->user_info['permission']['is_administortar']) {
         $user_id = intval($_GET['uid']);
         $user_info = $this->model('account')->get_user_info_by_uid($user_id);
         if (empty($user_info)) {
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('本地用户不存在,无法绑定')));
         }
         $sina_token = $oauth->getAccessToken('code', array('code' => $_GET['code'], 'redirect_uri' => get_js_url('/account/sina/binding_callback/uid-' . $user_id)));
     } else {
         $user_id = $this->user_id;
         AWS_APP::session()->sina_token = $oauth->getAccessToken('code', array('code' => $_GET['code'], 'redirect_uri' => get_js_url('/account/sina/binding_callback/')));
         $sina_token = AWS_APP::session()->sina_token;
         $redirect = get_js_url('/account/setting/openid/');
     }
     $client = new Services_Weibo_WeiboClient(get_setting('sina_akey'), get_setting('sina_skey'), $sina_token['access_token']);
     $uid_get = $client->get_uid();
     $sina_profile = $client->show_user_by_id($uid_get['uid']);
     if ($sina_profile['error']) {
         H::redirect_msg(AWS_APP::lang()->_t('与微博通信出错, 错误代码: %s', $sina_profile['error']), "/account/setting/openid/");
     }
     if (!$this->model('integral')->fetch_log($user_id, 'BIND_OPENID')) {
         $this->model('integral')->process($user_id, 'BIND_OPENID', round(get_setting('integral_system_config_profile') * 0.2), '绑定 OPEN ID');
     }
     //$this->model('openid_weibo')->bind_account($sina_profile, get_js_url('/account/setting/openid/'), $user_id, $last_key['oauth_token'], $last_key['oauth_token_secret'], $sina_token);
     $this->model('openid_weibo')->bind_account($sina_profile, $redirect, $user_id, $sina_token);
 }
开发者ID:chenruixuan,项目名称:wecenter,代码行数:28,代码来源:sina.php


示例6: send_activation_mail

 public function send_activation_mail($email, $name, $role, $token)
 {
     $this->load->library('mailer');
     $mail = new PHPMailer();
     $mail->SMTPAuth = true;
     $mail->SMTPSecure = "ssl";
     $mail->Host = "smtp.gmail.com";
     $mail->Port = 465;
     $mail->Username = "[email protected]";
     $mail->Password = "guardianoftime";
     $mail->Subject = "Jagamana Registration";
     $template = file_get_contents(base_url() . '/assets/template/registration.html');
     $template = preg_replace('%SITEPATH%', base_url() . "register/activate", $template);
     $template = preg_replace('%NAME%', $name, $template);
     $template = preg_replace('%ROLE%', $role, $template);
     $template = preg_replace('%TOKEN%', $token, $template);
     $template = preg_replace('%YEAR%', date("Y"), $template);
     $template = preg_replace('%ADDRESS%', get_setting("Address"), $template);
     $template = preg_replace('%WEBSITE%', get_setting("Website Name"), $template);
     $mail->Body = $template;
     $mail->isSMTP();
     $mail->isHTML(true);
     $mail->SetFrom('[email protected]', 'Jagamana Service');
     $mail->AddReplyTo("[email protected]", "Jagamana Service");
     $mail->AddAddress($email, $name);
     if ($mail->Send()) {
         return true;
     }
     return false;
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:30,代码来源:register.php


示例7: build_auth_header

 public function build_auth_header($args = array(), $request_url, $request_method)
 {
     if (isset($args) and !is_array($args)) {
         return false;
     }
     if (isset($args['oauth_token_secret'])) {
         $oauth_token_secret = $args['oauth_token_secret'];
         unset($args['oauth_token_secret']);
     }
     $timestamp = time();
     $args['oauth_consumer_key'] = get_setting('twitter_consumer_key');
     $args['oauth_nonce'] = base64_encode(md5($timestamp));
     $args['oauth_signature_method'] = 'HMAC-SHA1';
     $args['oauth_timestamp'] = $timestamp;
     $args['oauth_version'] = '1.0';
     ksort($args);
     $parm_str = http_build_query($args, '', '&', PHP_QUERY_RFC3986);
     $sign_base_str = $request_method . '&' . rawurlencode($request_url) . '&' . rawurlencode($parm_str);
     $sign_key = rawurlencode(get_setting('twitter_consumer_secret')) . '&' . rawurlencode($oauth_token_secret);
     $args['oauth_signature'] = base64_encode(hash_hmac('sha1', $sign_base_str, $sign_key, true));
     ksort($args);
     $auth_header = 'Authorization: OAuth ';
     foreach ($args as $key => $value) {
         $auth_header .= $key . '="' . rawurlencode($value) . '", ';
     }
     return substr($auth_header, 0, strlen($auth_header) - 2);
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:27,代码来源:twitter.php


示例8: index_action

 public function index_action()
 {
     if ($_GET['tag']) {
         $this->crumb(AWS_APP::lang()->_t('标签') . ': ' . $_GET['tag'], '/favorite/tag-' . $_GET['tag']);
     }
     //边栏可能感兴趣的人或话题
     if (TPL::is_output('block/sidebar_recommend_users_topics.tpl.htm', 'favorite/index')) {
         $recommend_users_topics = $this->model('module')->recommend_users_topics($this->user_id);
         TPL::assign('sidebar_recommend_users_topics', $recommend_users_topics);
     }
     if ($action_list = $this->model('favorite')->get_item_list($_GET['tag'], $this->user_id, calc_page_limit($_GET['page'], get_setting('contents_per_page')))) {
         foreach ($action_list as $key => $val) {
             $item_ids[] = $val['item_id'];
         }
         TPL::assign('list', $action_list);
     } else {
         if (!$_GET['page'] or $_GET['page'] == 1) {
             $this->model('favorite')->remove_favorite_tag(null, null, $_GET['tag'], $this->user_id);
         }
     }
     if ($item_ids) {
         $favorite_items_tags = $this->model('favorite')->get_favorite_items_tags_by_item_id($this->user_id, $item_ids);
         TPL::assign('favorite_items_tags', $favorite_items_tags);
     }
     TPL::assign('favorite_tags', $this->model('favorite')->get_favorite_tags($this->user_id));
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/favorite/tag-' . $_GET['tag']), 'total_rows' => $this->model('favorite')->count_favorite_items($this->user_id, $_GET['tag']), 'per_page' => get_setting('contents_per_page')))->create_links());
     TPL::output('favorite/index');
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:28,代码来源:main.php


示例9: normal_sign

function normal_sign($uid, $tieba)
{
    $setting = get_setting($uid);
    $url = "http://tieba.baidu.com/mo/m?kw={$tieba[unicode_name]}";
    $get_url = curl_get($url, $uid);
    if (!$get_url) {
        return array(1, '无法打开贴吧首页', 0);
    }
    $get_url = wrap_text($get_url);
    preg_match('/<ahref="([^"]*?)">签到<\\/a>/', $get_url, $matches);
    if (isset($matches[1])) {
        $s = str_replace('&amp;', '&', $matches[1]);
        $sign_url = 'http://tieba.baidu.com' . $s;
        $get_sign = curl_get($sign_url, $uid, $setting['use_bdbowser']);
        $done++;
        if (!$get_sign) {
            return array(1, '签到错误,可能已经签到成功,稍后重试', 0);
        }
        $get_sign = wrap_text($get_sign);
        preg_match('/<spanclass="light">签到成功,经验值上升<spanclass="light">(\\d+)<\\/span>/', $get_sign, $matches);
        if ($matches[1]) {
            return array(2, "签到成功,经验值+{$matches[1]}", $matches[1]);
        } else {
            return array(1, '签到错误,可能已经签到成功,稍后重试', 0);
        }
    } else {
        preg_match('/<span>已签到<\\/span>/', $get_url, $matches);
        if ($matches[0]) {
            return array(2, '此前已成功签到', 0);
        } else {
            return array(-1, '找不到签到链接,稍后重试', 0);
        }
    }
}
开发者ID:ahmatjan,项目名称:Tieba_Sign,代码行数:34,代码来源:sign.php


示例10: setup

 public function setup()
 {
     if (get_setting('index_per_page')) {
         $this->per_page = get_setting('index_per_page');
     }
     HTTP::no_cache_header();
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:7,代码来源:ajax.php


示例11: Upload

 protected function Upload($dir, $files)
 {
     global $lang;
     $sum = 0;
     foreach ($files as $key => $val) {
         $sum += $_FILES[$val]['size'];
     }
     if ($sum <= 2097152) {
         $rel_dir = 'Uploads/';
         $make_dir = FALSE;
         if (get_setting('ftp', 'use_ftp') || intval(get_setting('ftp', 'use_ftp')) == 1) {
             if ($conn_id = ftp_connect(get_setting('ftp', 'server'))) {
                 if (@ftp_login($conn_id, get_setting('ftp', 'username'), get_setting('ftp', 'password'))) {
                     @ftp_mkdir($conn_id, $rel_dir . $dir);
                     @ftp_chmod($conn_id, 0777, $rel_dir . $dir);
                     $make_dir = TRUE;
                 }
             }
         } else {
             if (@mkdir($rel_dir . $dir)) {
                 $make_dir = TRUE;
             }
         }
         if ($make_dir) {
             foreach ($files as $key => $file) {
                 @move_uploaded_file($_FILES[$file]['tmp_name'], $rel_dir . $dir . '/' . $_FILES[$file]['name']);
             }
         }
     } else {
         return SetError::Set($lang['L_ERRORFILESTOOBIG']);
     }
     return TRUE;
 }
开发者ID:BackupTheBerlios,项目名称:k4bb,代码行数:33,代码来源:posting.class.php


示例12: Execute

 public function Execute(Template $template, Session $session, $request)
 {
     if ($session['user'] instanceof Member && $session['user']['perms'] & ADMIN) {
         $dba = DBA::Open();
         $table = $request['act'] == 'addpi' ? POSTICONS : EMOTICONS;
         $img_location = $table == POSTICONS ? 'PostIcons' : 'Emoticons';
         $description = $dba->Quote($request['description']);
         if ($_FILES['upload']['error'] == 0) {
             $image = $_FILES['upload']['name'];
             move_uploaded_file($_FILES['upload']['tmp_name'], $rel_dir . 'Images/' . get_setting('template', 'imgfolder') . '/Icons/' . $img_location . '/' . $_FILES['upload']['name']);
         } else {
             $image = $dba->Quote($request['current_images']);
         }
         if ($table == POSTICONS) {
             if ($dba->Query("INSERT INTO " . $table . " (image, description) VALUES ('{$image}', '{$description}')")) {
                 header("Location: admin.php?act=icons");
             }
         } else {
             $typed = htmlspecialchars($request['typed']);
             if ($dba->Query("INSERT INTO " . $table . " (image, description, typed) VALUES ('{$image}', '{$description}', '{$typed}')")) {
                 header("Location: admin.php?act=icons");
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:k4bb,代码行数:25,代码来源:icons.class.php


示例13: search_result_action

 public function search_result_action()
 {
     if (!in_array($_GET['search_type'], array('questions', 'topics', 'users', 'articles'))) {
         $_GET['search_type'] = null;
     }
     $search_result = $this->model('search')->search(cjk_substr($_GET['q'], 0, 64), $_GET['search_type'], $_GET['page'], get_setting('contents_per_page'), null, $_GET['is_recommend']);
     if ($this->user_id and $search_result) {
         foreach ($search_result as $key => $val) {
             switch ($val['type']) {
                 case 'questions':
                     $search_result[$key]['focus'] = $this->model('question')->has_focus_question($val['search_id'], $this->user_id);
                     break;
                 case 'topics':
                     $search_result[$key]['focus'] = $this->model('topic')->has_focus_topic($this->user_id, $val['search_id']);
                     break;
                 case 'users':
                     $search_result[$key]['focus'] = $this->model('follow')->user_follow_check($this->user_id, $val['search_id']);
                     break;
             }
         }
     }
     TPL::assign('search_result', $search_result);
     if (is_mobile()) {
         TPL::output('m/ajax/search_result');
     } else {
         TPL::output('search/ajax/search_result');
     }
 }
开发者ID:wenyinos,项目名称:wecenter,代码行数:28,代码来源:ajax.php


示例14: check_latest

 /**
  * Connects to FoOlPod to retrieve which is the latest version from the API
  *
  * @param type $force forces returning the download even if FoOlSlide is up to date
  * @return type FALSE or the download URL
  */
 function check_latest($force = FALSE)
 {
     if (function_exists('curl_init')) {
         $this->load->library('curl');
         $result = $this->curl->simple_post($this->pod . '/api/software/foolslide', array('url' => site_url(), 'version' => get_setting('fs_priv_version')));
     } else {
         $result = file_get_contents($this->pod . '/api/software/foolslide');
     }
     if (!$result) {
         set_notice('error', _('FoOlPod server could not be contacted: impossible to check for new versions.'));
         return FALSE;
     }
     $data = json_decode($result);
     $new_versions = array();
     foreach ($data->versions as $new) {
         if (!$this->is_bigger_version(FOOLSLIDE_VERSION, $new)) {
             break;
         }
         $new_versions[] = $new;
     }
     if (!empty($new_versions)) {
         return $new_versions;
     }
     if ($force) {
         return array($data->versions[0]);
     }
     return FALSE;
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:34,代码来源:upgrade_model.php


示例15: __construct

 public function __construct($request)
 {
     global $lang;
     $this->lang = $lang;
     if (isset($_GET['sort']) && $_GET['sort'] != "*") {
         //if($request['sort'] == "*") {
         //$order ="[a-zA-Z].*$";
         //$like = 'REGEXP';
         //} else {
         $order = strtolower($_GET['sort']) . '%';
         $like = 'LIKE';
         //}
     } else {
         $order = "%";
         $like = 'LIKE';
     }
     $limit = isset($_GET['limit']) ? intval($_GET['limit']) : NULL;
     $start = isset($_GET['start']) ? intval($_GET['start']) : NULL;
     global $settings;
     $db_type = get_setting(get_setting('application', 'dba_name'), 'type');
     $proper_limit = $db_type == 'pgsql' ? "LIMIT {$limit} OFFSET {$start}" : "LIMIT {$start}, {$limit}";
     $extra = !is_null($limit) && !is_null($start) ? $proper_limit : "LIMIT " . $settings['memberlistperpage'];
     $query = "SELECT * FROM " . USERS . " WHERE name {$like} '{$order}' {$extra}";
     $this->users = DBA::Open()->Query($query)->GetIterator();
 }
开发者ID:BackupTheBerlios,项目名称:k4bb,代码行数:25,代码来源:mliterator.class.php


示例16: index_action

 public function index_action()
 {
     $_GET['per_page'] = $_GET['per_page'] ? intval($_GET['per_page']) : get_setting('contents_per_page');
     $result = $this->model('search')->search(cjk_substr($_GET['q'], 0, 64), $_GET['type'], $_GET['page'], $_GET['per_page'], $_GET['topic_ids'], $_GET['is_recommend']);
     if (!$result) {
         $result = array();
     }
     if ($_GET['is_question_id'] and is_digits($_GET['q'])) {
         $question_info = $this->model('question')->get_question_info_by_id($_GET['q']);
         if ($question_info) {
             $result[] = $this->model('search')->prase_result_info($question_info);
         }
     }
     if ($result) {
         $key_arr = array('type', 'search_id', 'name', 'detail');
         foreach ($result as $key => $val) {
             foreach ($val as $k => $v) {
                 if (!in_array($k, $key_arr)) {
                     unset($result[$key][$k]);
                 }
             }
         }
     }
     H::ajax_json_output(AWS_APP::RSM(array('total_rows' => count($result), 'rows' => $result), 1, null));
 }
开发者ID:nerverwind,项目名称:wecenter_ios_sdk,代码行数:25,代码来源:search.php


示例17: list_setting

function list_setting($config)
{
    $initalMoney = get_setting($config, 'InitialMoney');
    $lastCheckTime = get_setting($config, 'LastCheckTime');
    ?>
<form action="setting.php" method="post">
<input type="hidden" name="action_type" value="submit_edit"/>

<table border="0">
	<tr>
		<td>Initial money</td>
		<td>
			<input type="text" name="InitialMoney" 
				value="<?php 
    echo $initalMoney['Value'];
    ?>
"/>
		</td>
	</tr>
	<tr>
		<td>Last check time</td>
		<td>
			<?php 
    showTimeBox("setting_lastchecktime", $lastCheckTime['Value']);
    ?>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="Save" /></td>
	</tr>
</table>
</form>
<?php 
}
开发者ID:NguyenThanhDung,项目名称:Finance,代码行数:35,代码来源:setting.php


示例18: __construct

 public function __construct()
 {
     $this->setting = get_setting();
     $this->bduss = get_robot_bduss();
     $this->un = self::getun($this->bduss[0]);
     $this->cron();
 }
开发者ID:WingLim,项目名称:TieBaRobot,代码行数:7,代码来源:class.tieba.php


示例19: sign_in_action

 public function sign_in_action()
 {
     if ($_GET['uid'] != $this->user_id) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('签到失败!')));
     }
     if ($this->model('sign')->is_signed_today($_GET['uid'])) {
         H::ajax_json_output(AWS_APP::RSM(array('is_signed' => true)), 1, null);
     }
     $continous = $this->model('sign')->sign_in($_GET['uid']);
     $integral_every_day = get_setting('sign_integral_every_day');
     $integral_seventh_day = get_setting('sign_integral_seventh_day');
     // 积分操作
     $is_seventh_day = false;
     if ($continous < 0) {
         H::ajax_json_output(AWS_APP::RSM(array('is_signed' => true)), 1, null);
     } else {
         if ($continous == 6) {
             $integral = $integral_seventh_day;
             $integral_message = '连续7天签到积分';
             $is_seventh_day = true;
         } else {
             $integral = $integral_every_day;
             $integral_message = '每日签到积分';
         }
     }
     $this->model('integral')->process($_GET['uid'], 'SIGN_IN', $integral, $integral_message, $_GET['uid']);
     H::ajax_json_output(AWS_APP::RSM(array('is_signed' => false, 'continous' => $continous, 'integral_every_day' => $integral_every_day, 'integral_seventh_day' => $integral_seventh_day, 'user_integral' => $this->user_info['integral'] + $integral)), 1, null);
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:28,代码来源:ajax.php


示例20: Open

 public static final function Open($name = '')
 {
     static $databases = NULL;
     static $connections = NULL;
     if ($name == '') {
         $name = get_setting('application', 'dba_name') == '' ? get_setting('', 'database', FALSE) : get_setting('application', 'dba_name');
     }
     //First build a list of databases if it doesn't exist
     if ($databases == NULL) {
         $databases = array();
         $connections = array();
         $ini_file = PC_CONFIG_DIR . '/databases.ini.php';
         if (!is_readable($ini_file)) {
             throw new Exception('todo');
         }
         $databases = parse_ini_file($ini_file, true);
     }
     //Second, check for an existing connection
     if (isset($connections[$name])) {
         return $connections[$name];
     }
     //echo "Database name: $name<br />" . OS_ENDL;
     if (!isset($databases[$name])) {
         throw new Exception('That Database doesn\'t exist. Check in pagecraft.ini AND/OR databases.ini to see if you have properly configured PageCraft.');
     }
     //Finally, attempt to create a new connection
     if (!isset($databases[$name]['type'])) {
         throw new Exception('todo');
     }
     $class = $databases[$name]['type'] . '_Connection';
     $connections[$name] = new $class($databases[$name]);
     return $connections[$name];
 }
开发者ID:BackupTheBerlios,项目名称:k4bb,代码行数:33,代码来源:dba.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_setting_value函数代码示例发布时间:2022-05-15
下一篇:
PHP get_setmeal_one函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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