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


PHP jconf::set方法代码示例

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


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

示例1: DoSave

 function DoSave()
 {
     $dedecms = $this->Post['dedecms'];
     $dedecms_config_default = $dedecms_config = jconf::get('dedecms');
     $dedecms_config['enable'] = $dedecms['enable'] ? 1 : 0;
     $dedecms_config['db_host'] = $dedecms['db_host'];
     $dedecms_config['db_name'] = $dedecms['db_name'];
     $dedecms_config['db_user'] = $dedecms['db_user'];
     $dedecms_config['db_pass'] = $dedecms['db_pass'];
     $dedecms_config['db_port'] = $dedecms['db_port'];
     $dedecms_config['db_pre'] = $dedecms['db_pre'];
     $dedecms_config['charset'] = $dedecms['charset'];
     $dedecms_config['db_url'] = $dedecms['db_url'];
     if ($dedecms_config['enable']) {
         include_once ROOT_PATH . './api/uc_api_db.php';
         $dede_db = new JSG_UC_API_DB();
         @$dede_db->connect($dedecms['db_host'], $dedecms['db_user'], $dedecms['db_pass'], $dedecms['db_name'], $dedecms['charset'], 1, $dedecms['db_pre']);
         if (!$dede_db->link || !$dede_db->query("SHOW COLUMNS FROM {$dedecms['db_pre']}member", 'SILENT')) {
             $this->Messager("无法连接DedeCMS数据库,请检查您填写的DedeCMS数据库配置信息是否正确.");
             exit;
         }
     }
     if ($dedecms_config_default != $dedecms_config) {
         jconf::set('dedecms', $dedecms_config);
     }
     if ($dedecms_config['enable'] != $this->Config['dedecms_enable']) {
         $config = array();
         $config['dedecms_enable'] = $dedecms_config['enable'];
         jconf::update($config);
     }
     $this->Messager("修改成功");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:dedecms.mod.php

示例2: ForceIP

 function ForceIP()
 {
     $ip = trim($this->Post['ip']);
     if (!$ip) {
         json_error("无效IP。");
     }
     if ('admin' != MEMBER_ROLE_TYPE) {
         json_error("您没有封IP权限");
     }
     if ($ip == $GLOBALS['_J']['client_ip']) {
         json_error("无法禁止当前的IP。");
     }
     if (preg_match("/^(\\d{1,3}\\.){1,3}\\d{1,3}\\.?\$/", $ip)) {
         $ip = str_replace(".", "\\.", $ip);
     }
     $access = jconf::get('access');
     $ip_arr = explode('|', $access['ipbanned']);
     if ($ip_arr && in_array($ip, $ip_arr)) {
         json_error("已禁止此IP");
     }
     if ($access['ipbanned']) {
         $access['ipbanned'] .= '|' . $ip;
     } else {
         $access['ipbanned'] = $ip;
     }
     jconf::set('access', $access);
     $config = array();
     $config['ipbanned_enable'] = $access['ipbanned'] ? 1 : 0;
     jconf::update($config);
     json_result('禁止IP:' . $ip . '成功');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:topic_manage.mod.php

示例3: DoClean

 function DoClean()
 {
     $type = get_param('type');
     if (!$type) {
         $this->Messager("请先选择要清理的缓存对象");
     }
     $this->_removeTopicAttach();
     $this->_removeTopicLongtext();
     $this->_removeVoteImage();
     if (in_array('data', $type)) {
         cache_db('clear');
         jtable('failedlogins')->truncate();
         DB::query("update " . TABLE_PREFIX . "members set `username`=`uid` WHERE `username`!=`uid` AND `username` REGEXP '^[0-9]*\$'");
     }
     if (in_array('tpl', $type)) {
         cache_clear();
         jconf::set('validate_category', array());
         jlogic('credits')->rule_conf(true);
     }
     if (in_array('channel', $type)) {
         jlogic('channel')->update_data();
     }
     if (in_array('album', $type)) {
         jlogic('image')->update_data();
     }
     $this->Messager("已清空所有缓存");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:27,代码来源:cache.mod.php

示例4: writeNextRunTime

 function writeNextRunTime()
 {
     $query = $this->DatabaseHandler->Query("SELECT nextrun FROM " . TABLE_PREFIX . 'task' . " WHERE available>'0' ORDER BY nextrun LIMIT 1");
     $row = $query->GetRow();
     $nextruntime = $row['nextrun'] ? $row['nextrun'] : time() + 1800;
     jconf::set('task', 'nextrun', $nextruntime);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:task.logic.php

示例5: update_feature_cache

 function update_feature_cache()
 {
     $features = array();
     $query = DB::query("SELECT * FROM " . DB::table('feature'));
     while ($value = DB::fetch($query)) {
         $features[$value['featureid']] = $value['featurename'];
     }
     jconf::set('feature', $features);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:feature.logic.php

示例6: weibo_show

 function weibo_show()
 {
     $conf = jconf::get('weibo_show');
     $link_display_none_radio = $this->jishigou_form->YesNoRadio('link_display_none', (int) $conf['link_display_none']);
     if (jpost('settingsubmit')) {
         $conf['link_display_none'] = jpost('link_display_none') ? 1 : 0;
         jconf::set('weibo_show', $conf);
         $this->Messager('设置成功了');
     }
     include template();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:11,代码来源:tools.mod.php

示例7: DoModify

 function DoModify()
 {
     $set['about'] = $this->Post['about'];
     $set['contact'] = $this->Post['contact'];
     $set['joins'] = $this->Post['joins'];
     $set['float'] = $this->Post['float'];
     $set['float_align'] = $this->Post['float_align'];
     $set['float_style'] = $this->Post['float_style'];
     $set = jstripslashes($set);
     jconf::set('web_info', $set);
     $this->Messager("修改成功", 'admin.php?mod=web_info');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:12,代码来源:web_info.mod.php

示例8: doconfig

 function doconfig()
 {
     $config = $this->Post['config'];
     $live_config['user'] = trim($config['user']);
     $live_config['des'] = trim($config['des']);
     $live_config['ads'] = trim($config['ads']);
     $uid = DB::result_first("SELECT uid FROM " . DB::table("members") . " WHERE nickname = '{$live_config['user']}'");
     if ($uid) {
         $live_config['uid'] = $uid;
         jconf::set('live', $live_config);
         $this->Messager("配置成功");
     } else {
         $this->Messager("用户 <b>" . $live_config['user'] . "</b> 不存在!");
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:15,代码来源:live.mod.php

示例9: update_qun_num

 function update_qun_num($cat_id, $num = null)
 {
     $ret = false;
     $cat_id = (int) $cat_id;
     if ($cat_id > 0) {
         if (isset($num)) {
             $num = (int) $num;
             $ret = $this->db->update_count($cat_id, 'qun_num', $num);
         } else {
         }
     }
     if ($ret) {
         jconf::set('qun_category', array());
     }
     return $ret;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:qun_category.logic.php

示例10: setting

 function setting()
 {
     if (jget('settingsubmit')) {
         $url = jget('url');
         $url['status_default'] = (int) $url['status_default'];
         foreach ($url['status_set'] as $k => $v) {
             $url['status_set'][$k] = (int) $v;
         }
         jconf::set('url', $url);
         $this->Messager('设置成功');
     }
     $url = jconf::get('url');
     $options = array(1 => array('value' => 1, 'name' => '加入白名单(允许访问)队列<br />'), 0 => array('value' => 0, 'name' => '加入常规(默认)队列<br />'), -1 => array('value' => -1, 'name' => '加入黑名单(禁止访问)队列<br />'));
     $status_default_radio = $this->jishigou_form->Radio('url[status_default]', $options, (int) $url['status_default']);
     $options = array(0 => array('value' => 0, 'name' => '直接跳转到相应的链接地址(推荐用于白名单(允许访问)队列)<br />'), 1 => array('value' => 1, 'name' => '给出可以点击的链接地址,需要点击后才能跳转(推荐用于常规(默认)队列)<br />'), 2 => array('value' => 2, 'name' => '给出链接地址,需要自行复制链接地址到浏览器地址栏中进行访问(推荐用于常规(默认)队列)<br />'), 3 => array('value' => 3, 'name' => '禁止访问(推荐用于黑名单(禁止访问)队列)<br />'));
     $status_set_allow_radio = $this->jishigou_form->Radio('url[status_set][1]', $options, (int) $url['status_set'][1]);
     $status_set_normal_radio = $this->jishigou_form->Radio('url[status_set][0]', $options, (int) $url['status_set'][0]);
     $status_set_disallow_radio = $this->jishigou_form->Radio('url[status_set][-1]', $options, (int) $url['status_set'][-1]);
     include template();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:20,代码来源:url.mod.php

示例11: DoSave

 function DoSave()
 {
     $dzbbs = $this->Post['dzbbs'];
     $dzbbs_config_default = $dzbbs_config = jconf::get('dzbbs');
     $dzbbs_config['enable'] = $dzbbs['enable'] ? 1 : 0;
     $dzbbs_config['db_host'] = $dzbbs['db_host'];
     $dzbbs_config['db_name'] = $dzbbs['db_name'];
     $dzbbs_config['db_user'] = $dzbbs['db_user'];
     $dzbbs_config['db_pass'] = $dzbbs['db_pass'];
     $dzbbs_config['db_port'] = $dzbbs['db_port'];
     $dzbbs_config['db_pre'] = $dzbbs['db_pre'];
     $dzbbs_config['charset'] = $dzbbs['charset'];
     $dzbbs_config['db_url'] = $dzbbs['db_url'];
     $dzbbs_config['dz_ver'] = $dzbbs['dz_ver'];
     if ($dzbbs_config['enable']) {
         $table_m = $dzbbs['dz_ver'] == 'dzx' ? $dzbbs['db_pre'] . 'common_member' : $dzbbs['db_pre'] . 'members';
         include_once ROOT_PATH . './api/uc_api_db.php';
         $dz_db = new JSG_UC_API_DB();
         @$dz_db->connect($dzbbs['db_host'], $dzbbs['db_user'], $dzbbs['db_pass'], $dzbbs['db_name'], $dzbbs['charset'], 1, $dzbbs['db_pre']);
         if (!$dz_db->link || !$dz_db->query("SHOW COLUMNS FROM {$table_m}", 'SILENT')) {
             $this->Messager("无法连接Discuz数据库,请检查您填写的Discuz数据库配置信息是否正确.");
             exit;
         }
     }
     if ($dzbbs_config_default != $dzbbs_config) {
         jconf::set('dzbbs', $dzbbs_config);
     }
     if ($dzbbs_config['enable'] != $this->Config['dzbbs_enable']) {
         $config = array();
         $config['dzbbs_enable'] = $dzbbs_config['enable'];
         if ($dzbbs_config['enable'] == 1) {
             $config['ucenter_enable'] = 1;
             $config['pwbbs_enable'] = 0;
             $config['phpwind_enable'] = 0;
         }
         jconf::update($config);
     }
     $this->Messager("修改成功");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:39,代码来源:dzbbs.mod.php

示例12: DoModifySetting

 function DoModifySetting()
 {
     $attach = $this->Post['attach'];
     $attach_config_default = $attach_config = jconf::get('attach');
     $attach_config['enable'] = $attach['enable'] ? 1 : 0;
     $attach_config['qun_enable'] = $attach['qun_enable'] ? 1 : 0;
     $attach_config['request_file_type'] = jlogic('attach')->type_filter($attach['request_file_type']);
     $attach_config['request_size_limit'] = min(max(1, (int) $attach['request_size_limit']), 51200);
     $attach_config['request_files_limit'] = min(max(1, (int) $attach['request_files_limit']), 50);
     $attach_config['score_min'] = max(1, (int) $attach['score_min']);
     $attach_config['score_max'] = max(1, (int) $attach['score_max']);
     if ($attach_config['score_max'] < $attach_config['score_min']) {
         $attach_config['score_max'] = $attach_config['score_min'];
     }
     $attach_config['no_score_user'] = is_array($this->Post['no_score_user']) ? implode(',', $this->Post['no_score_user']) : '';
     $config = array();
     if ($attach_config_default != $attach_config) {
         jconf::set('attach', $attach_config);
     }
     if ($attach_config['enable'] != $this->Config['attach_enable']) {
         $config['attach_enable'] = $attach_config['enable'];
     }
     if ($attach_config['qun_enable'] != $this->Config['qun_attach_enable']) {
         $config['qun_attach_enable'] = $attach_config['qun_enable'];
     }
     if ($attach_config['request_file_type'] != $this->Config['attach_file_type']) {
         $config['attach_file_type'] = $attach_config['request_file_type'];
     }
     if ($attach_config['request_size_limit'] != $this->Config['attach_size_limit']) {
         $config['attach_size_limit'] = $attach_config['request_size_limit'];
     }
     if ($attach_config['request_files_limit'] != $this->Config['attach_files_limit']) {
         $config['attach_files_limit'] = $attach_config['request_files_limit'];
     }
     if ($config) {
         jconf::update($config);
     }
     $this->Messager("修改成功");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:39,代码来源:attach.mod.php

示例13: modify

 function modify()
 {
     if (jget('settingsubmit')) {
         $limit = jget('limit', 'int');
         if ($limit < 1) {
             $limit = 15;
         }
         $time = jget('time', 'int');
         if ($time < 1) {
             $time = 15;
         }
         $white_list = jget('white_list');
         if ($white_list) {
             $white_list = explode("\n", $white_list);
             foreach ($white_list as $k => $v) {
                 $white_list[$k] = trim($v);
             }
             $white_list = array_remove_empty(array_unique($white_list));
         }
         $failedlogins = array('limit' => $limit, 'time' => $time, 'white_list' => $white_list);
         jconf::set('failedlogins', $failedlogins);
     }
     $this->Messager('设置成功', 'admin.php?mod=failedlogins&code=index');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:24,代码来源:failedlogins.mod.php

示例14: hot_tag_recommend

 function hot_tag_recommend()
 {
     $rets = array();
     if ($GLOBALS['_J']['config']['hot_tag_recommend_enable']) {
         $rets = jconf::get('hot_tag_recommend');
         if ($rets['list'] && TIMESTAMP - $rets['time'] >= 1800) {
             $for_count = $rets['num'];
             foreach ($rets['list'] as $key => $val) {
                 if ($for_count < 1) {
                     break;
                 }
                 $for_count--;
                 if ($val['tag_id']) {
                     $rets['list'][$key]['topic_count'] = DB::result_first(" select `topic_count` from `" . TABLE_PREFIX . "tag` where id='{$val[tag_id]}' ");
                 } else {
                     $rets['list'][$key]['topic_count'] = 0;
                 }
             }
             $rets['time'] = TIMESTAMP;
             jconf::set('hot_tag_recommend', $rets);
         }
     }
     return $rets;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:24,代码来源:data_block.logic.php

示例15: DoDelADV

 function DoDelADV()
 {
     $ids = jget('ids');
     if ($ids && is_array($ids)) {
         $ad = jconf::get('ad');
         $ids_where = implode(',', $ids);
         DB::query(" delete from `" . TABLE_PREFIX . "ad` where `adid` in ({$ids_where}) ");
         foreach ($ad['ad_list'] as $k => $page) {
             foreach ($page as $k_local => $local) {
                 foreach ($local as $ad_id => $ad_one) {
                     $ad_info = DB::fetch_first(" select * from `" . TABLE_PREFIX . "ad` where `adid` = '{$ad_id}' ");
                     if (!$ad_info) {
                         if (isset($ad['ad_list'][$k][$k_local][$ad_id]) && is_array($ad['ad_list'][$k][$k_local][$ad_id])) {
                             unset($ad['ad_list'][$k][$k_local][$ad_id]);
                         }
                     }
                     if (in_array($ad_id, $ids)) {
                         if (isset($ad['ad_list'][$k][$k_local][$ad_id]) && is_array($ad['ad_list'][$k][$k_local][$ad_id])) {
                             unset($ad['ad_list'][$k][$k_local][$ad_id]);
                         }
                     }
                 }
                 $ad['ad_list'][$k][$k_local] = array_filter($ad['ad_list'][$k][$k_local]);
             }
             $ad['ad_list'][$k] = array_filter($ad['ad_list'][$k]);
         }
         $ad['ad_list'] = array_filter($ad['ad_list']);
         jconf::set('ad', $ad);
     }
     $this->Messager('删除成功', 'admin.php?mod=income&code=ad_list');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:income.mod.php


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