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


PHP jconf::update方法代码示例

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


在下文中一共展示了jconf::update方法的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: 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

示例4: DoModify

 function DoModify()
 {
     if (isset($this->Post['show'])) {
         jconf::set('show', $this->Post['show']);
     }
     if (isset($this->Post['cache'])) {
         jconf::set('cache', $this->Post['cache']);
     }
     cache_clear();
     $config = array();
     if ($this->Post['template_path'] != "" && $this->Post['template_path'] != $this->Config['template_path']) {
         $this->Post['template_path'] = dir_safe($this->Post['template_path']);
         $config['template_path'] = $this->Post['template_path'];
     }
     if (isset($this->Post['templatedeveloper']) && $this->Post['templatedeveloper'] != $this->Config['templatedeveloper']) {
         $config['templatedeveloper'] = $this->Post['templatedeveloper'] ? 1 : 0;
     }
     if (isset($this->Post['style_three_tol']) && $this->Post['style_three_tol'] != $this->Config['style_three_tol']) {
         $config['style_three_tol'] = $this->Post['style_three_tol'] ? 1 : 0;
     }
     if ($config) {
         jconf::update($config);
     }
     $this->Messager("设置成功");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:25,代码来源:show.mod.php

示例5: DoModify

 function DoModify()
 {
     $field = 'theme';
     $image_id = MEMBER_ID;
     $theme_bg_image = str_replace($this->Config['site_url'] . '/', '', $this->Post['theme_bg_image']);
     $image_path = RELATIVE_ROOT_PATH . 'images/' . $field . '/' . face_path($image_id);
     $image_name = $image_id . "_o.jpg";
     $image_file = $image_path . $image_name;
     if ($_FILES && $_FILES[$field]['name']) {
         if (!is_dir($image_path)) {
             jio()->MakeDir($image_path);
         }
         jupload()->init($image_path, $field, true);
         jupload()->setNewName($image_name);
         $result = jupload()->doUpload();
         if ($result) {
             $result = is_image($image_file);
         }
         if (!$result) {
             jio()->DeleteFile($image_file);
             $this->Messager("[图片上载失败]" . implode(" ", (array) jupload()->getError()), null);
         } else {
             $theme_bg_image = $image_file;
         }
     } else {
         if ($theme_bg_image != $image_file) {
         }
     }
     $theme_id = $this->Post['theme_id'];
     $theme_bg_color = $this->Post['theme_bg_color'];
     $theme_text_color = $this->Post['theme_text_color'];
     $theme_link_color = $this->Post['theme_link_color'];
     $theme_bg_image_type = $this->Post['theme_bg_image_type'];
     $theme_bg_repeat = $this->Post['theme_bg_repeat'] ? 1 : 0;
     $theme_bg_fixed = $this->Post['theme_bg_fixed'] ? 1 : 0;
     $sql = "update " . TABLE_PREFIX . "members set\r\n\t\t\t`theme_bg_image`='{$theme_bg_image}', `theme_bg_color`='{$theme_bg_color}', `theme_text_color`='{$theme_text_color}',\r\n\t\t\t`theme_link_color`='{$theme_link_color}' , theme_id='{$theme_id}' , theme_bg_image_type='{$theme_bg_image_type}' ,\r\n\t\t\t`theme_bg_repeat`='{$theme_bg_repeat}' , `theme_bg_fixed`='{$theme_bg_fixed}'\r\n\t\t\twhere `uid`='" . MEMBER_ID . "'";
     $this->DatabaseHandler->Query($sql);
     if ('admin' == MEMBER_ROLE_TYPE && $this->Post['set_default']) {
         $config = array();
         $config['theme_id'] = $theme_id;
         $config['theme_bg_image'] = $theme_bg_image;
         $config['theme_bg_color'] = $theme_bg_color;
         $config['theme_text_color'] = $theme_text_color;
         $config['theme_link_color'] = $theme_link_color;
         $config['theme_bg_image_type'] = $theme_bg_image_type;
         $config['theme_bg_repeat'] = $theme_bg_repeat;
         $config['theme_bg_fixed'] = $theme_bg_fixed;
         jconf::update($config);
     }
     $query = $this->DatabaseHandler->Query("select * from " . TABLE_PREFIX . "members where `uid`='" . MEMBER_ID . "'");
     $this->_initTheme($query->GetRow());
     $this->Messager("设置成功", 'index.php?mod=topic&code=myhome');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:53,代码来源:skin.mod.php

示例6: dosetting

 function dosetting()
 {
     $config = array();
     $config['vote_open'] = $this->Post['config']['vote_open'];
     $config['vote_verify'] = $this->Post['config']['vote_verify'];
     $config['vote_vip'] = $this->Post['config']['vote_vip'];
     jconf::update($config);
     $this->Messager('操作成功了');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:vote.mod.php

示例7: 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

示例8: doploy

 function doploy()
 {
     $config = array();
     $config['qun_setting']['qun_ploy']['avatar'] = $this->Post['config']['qun_ploy']['avatar'];
     $config['qun_setting']['qun_ploy']['vip'] = $this->Post['config']['qun_ploy']['vip'];
     jconf::update($config);
     $new_ploy_ary = array();
     if (!empty($this->Post['new_qun_ploy'])) {
         $new_fans_nums = $this->Post['new_qun_ploy']['fans_num_min'];
         foreach ($new_fans_nums as $key => $value) {
             $qun_num = $this->Post['new_qun_ploy']['qun_num'][$key];
             $topics_lower = $this->Post['new_qun_ploy']['topics_lower'][$key];
             if ($qun_num && $value) {
                 $new_ploy_ary[] = array('fans_num_min' => intval($value), 'topics_lower' => $topics_lower, 'qun_num' => intval($qun_num));
             }
         }
     }
     $qun_ploy = $this->Post['qun_ploy'];
     $new_ploy_keys = array();
     if (!empty($qun_ploy)) {
         $new_ploy_keys = array_keys($qun_ploy);
         $max_ployid = max($new_ploy_keys);
     }
     foreach ($new_ploy_ary as $k => $v) {
         $qun_ploy[$k + $max_ployid + 1] = $v;
     }
     $del_ids =& $this->Post['del_ids'];
     $order_ary = array();
     $order_ary_2 = array();
     if (is_array($qun_ploy)) {
         foreach ($qun_ploy as $id => $val) {
             if (is_array($del_ids) && in_array($id, $del_ids) || $id == 0 && (!$val['fans_num_min'] || !$val['topics_lower'] || !$val['qun_num'])) {
                 unset($qun_ploy[$id]);
             } else {
                 $order_ary[$val['fans_num_min']] = $id;
                 $order_ary_2[$val['topics_lower']] = $id;
             }
         }
     }
     ksort($order_ary);
     ksort($order_ary_2);
     $range_ary = array();
     $range_ary_2 = array();
     $min_limit = array_keys($order_ary);
     $min_limit_2 = array_keys($order_ary_2);
     for ($i = 0; $i < count($min_limit); $i++) {
         $range_ary[$order_ary[$min_limit[$i]]] = array('fans_num_max' => isset($min_limit[$i + 1]) ? $min_limit[$i + 1] : 999999999, 'fans_num_min' => $min_limit[$i]);
     }
     for ($i = 0; $i < count($min_limit_2); $i++) {
         $range_ary_2[$order_ary_2[$min_limit_2[$i]]] = array('topics_higher' => isset($min_limit_2[$i + 1]) ? $min_limit_2[$i + 1] : 999999999, 'topics_lower' => $min_limit_2[$i]);
     }
     foreach ($qun_ploy as $id => $ploy) {
         $fans_num_max_new = $range_ary[$id]['fans_num_max'];
         $fans_num_min_new = $range_ary[$id]['fans_num_min'];
         $topics_higher_new = $range_ary_2[$id]['topics_higher'];
         $topics_lower_new = $range_ary_2[$id]['topics_lower'];
         if ($fans_num_max_new == $fans_num_min_new) {
             $this->Messager('策略粉丝限制重复');
         }
         if (in_array($id, $new_ploy_keys)) {
             $data = array('id' => $id, 'qun_num' => abs($ploy['qun_num']), 'fans_num_min' => $fans_num_min_new, 'fans_num_max' => $fans_num_max_new, 'topics_lower' => $topics_lower_new, 'topics_higher' => $topics_higher_new);
             $this->QunLogic->update_ploy($data);
         } else {
             $data = array('qun_num' => abs($ploy['qun_num']), 'fans_num_min' => $fans_num_min_new, 'fans_num_max' => $fans_num_max_new, 'topics_lower' => $topics_lower_new, 'topics_higher' => $topics_higher_new);
             $this->QunLogic->add_ploy($data);
         }
     }
     if (!empty($del_ids)) {
         $count = $this->QunLogic->ploy_nums();
         if ($count == count($del_ids)) {
             $this->QunLogic->update_ploy_cache();
             $this->Messager('操作成功,但不允许删除全部策略');
         }
         $this->QunLogic->delete_ploy($del_ids);
     }
     $this->QunLogic->update_ploy_cache();
     $this->Messager('操作成功了');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:78,代码来源:qun.mod.php

示例9: onOff

 public function onOff()
 {
     $onOff = (int) $this->Get["reward_on_off"];
     jconf::update("reward_open", $onOff);
     $this->Messager('操作成功', 'admin.php?mod=reward');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:6,代码来源:reward.mod.php

示例10: DoModifyFtp

 function DoModifyFtp()
 {
     $ftp_key = jget('ftp_key', 'int');
     $do = jget('do');
     $mod_new_ftp = $ftp_config = jconf::get('ftp');
     if ($ftp_key >= 0 && $do == 'edit') {
         $ftp = $this->Post['ftp'];
         $ftp['on'] = $ftp['on'] && $ftp['host'] ? 1 : 0;
         $ftp['ssl'] = $ftp['ssl'] ? 1 : 0;
         $ftp['port'] = $ftp['port'] ? $ftp['port'] : ($ftp['type'] == 'FTP' ? 21 : 80);
         $ftp['attachurl'] = $ftp['attachurl'] ? $ftp['attachurl'] : ($ftp['type'] == 'Aliyun' && $ftp['attachdir'] ? 'http:/' . '/' . $ftp['attachdir'] . '.oss.aliyuncs.com' : '');
         $ftp['pasv'] = $ftp['pasv'] ? 1 : 0;
         $ftp['timeout'] = max(0, (int) $ftp['timeout']);
         $ftp['priority'] = max(1, (int) $ftp['priority']);
         if ('请输入FTP密码' == $ftp['password']) {
             $ftp['password'] = $ftp_config[$ftp_key]['password'];
         }
         $mod_new_ftp[$ftp_key] = $ftp;
         $ftp_on_error = false;
         jconf::set('ftp', $mod_new_ftp);
         if ($ftp['on']) {
             if (!($ftp['host'] && $ftp['port'] && $ftp['username'] && $ftp['password'] && $ftp['attachdir'] && $ftp['attachurl'])) {
                 $mod_new_ftp[$ftp_key]['on'] = $ftp['on'] = 0;
                 jconf::set('ftp', $mod_new_ftp);
                 $this->Messager('<font color=red>数据填写不完整</font>');
             }
             $ftp_result = ftpcmd('upload', 'images/noavatar.gif', '', $ftp_key);
             if ($ftp_result < 1) {
                 $ftp_error = $ftp_result;
                 $mod_new_ftp[$ftp_key]['on'] = $ftp['on'] = 0;
                 $ftp_on_error = true;
                 jconf::set('ftp', $mod_new_ftp);
             }
         }
         $ftp_sys_on = 0;
         foreach ($mod_new_ftp as $val) {
             if ($val['on'] == 1) {
                 $ftp_sys_on = 1;
                 break;
             }
         }
         if ($ftp_sys_on != $this->Config['ftp_on']) {
             $config = array();
             $config['ftp_on'] = $ftp_sys_on;
             jconf::update($config);
         }
         $errors = array('-100' => '服务器禁止了FTP功能', '-101' => '配置中没有开启FTP(请在配置中启用FTP功能)', '-102' => '连接到FTP服务器错误(请检查FTP地址或者端口号是否正确)', '-103' => '登录FTP服务器错误(请检查FTP用户名和密码是否正确)', '-104' => '更改FTP目录错误(请检查FTP用户的权限)', '-105' => '创建FTP目录错误(请检查FTP用户的权限)', '-106' => '文件本地读取错误', '-107' => '文件上传到FTP服务器错误(请检查FTP的权限)<br>如果您是第一次开启,出现该提示,则说明您的FTP无写入权限<br>如果您以前已经正常开启使用过,则说明您的FTP无修改与删除权限<br>');
         if ($ftp_error && isset($errors[$ftp_error])) {
             $this->Messager($errors[$ftp_error], null);
         } elseif ($ftp_on_error) {
             $this->Messager('<font color=red>服务开启失败,请检查数据填写是否正确</font>');
         }
     } else {
         $newftp = jget('newftp');
         $newftp_arr = array();
         if ($newftp['host']) {
             foreach ($newftp['host'] as $k => $v) {
                 if ($v && $newftp['port'][$k]) {
                     $newftp_arr[$k]['host'] = $v;
                     $newftp_arr[$k]['port'] = $newftp['port'][$k];
                     $newftp_arr[$k]['username'] = $newftp['username'][$k];
                     $newftp_arr[$k]['password'] = $newftp['password'][$k];
                     $newftp_arr[$k]['type'] = $newftp['type'][$k];
                     $newftp_arr[$k]['on'] = 0;
                     $newftp_arr[$k]['ssl'] = 0;
                     $newftp_arr[$k]['pasv'] = 0;
                     $newftp_arr[$k]['timeout'] = 0;
                     $newftp_arr[$k]['priority'] = 1;
                     $newftp_arr[$k]['attachdir'] = $newftp['type'][$k] == 'FTP' ? '.' : '';
                 }
             }
         }
         $ids = jget('ids');
         if ($ids) {
             foreach ($ids as $k => $v) {
                 unset($ftp_config[$v]);
             }
         }
         $new_ftp_config = array_merge($ftp_config, $newftp_arr);
         jconf::set('ftp', $new_ftp_config);
     }
     $this->Messager("设置成功");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:83,代码来源:setting.mod.php

示例11: DoSetting

 function DoSetting()
 {
     if (!is_file(ROOT_PATH . './api/uc_client/client.php')) {
         $this->Messager('Ucenter的客户端文件 <b>' . ROOT_PATH . './api/uc_client/client.php' . "</b> 不存在,请检查");
     }
     if (!is_file(ROOT_PATH . 'api/uc.php')) {
         $this->Messager('Ucenter的api文件 <b>' . ROOT_PATH . 'api/uc.php' . "</b> 不存在,请检查");
     }
     if (trim($_POST['uc_config_string'])) {
         $_uc_config = $this->_get_uc_config($_POST['uc_config_string']);
         if (!$_uc_config) {
             $this->Messager("通过字符串更新UC配置失败,请手工填写具体的配置信息", null);
         }
         $_POST['ucenter'] = array_merge($_POST['ucenter'], $_uc_config);
     }
     $_POST['ucenter']['uc_charset'] = $_POST['ucenter']['uc_db_charset'] = $this->Config['charset'];
     if (!$_POST['ucenter']['uc_key']) {
         $this->Messager("请填写Ucenter通信密钥,建议查看" . "帮助文" . "档</b>" . "</a>");
     }
     if (!$_POST['ucenter']['uc_api']) {
         $this->Messager("请填写Ucenter地址,建议查看" . "帮助文" . "档</b>" . "</a>");
     }
     if (!$_POST['ucenter']['uc_app_id']) {
         $this->Messager("请填写当前应用ID,建议查看" . "帮助文" . "档</b>" . "</a>");
     }
     if ('请输入Ucenter的数据库密码' == $_POST['ucenter']['uc_db_password']) {
         $_POST['ucenter']['uc_db_password'] = jconf::get('ucenter', 'uc_db_password');
     }
     if ('mysql' == $_POST['ucenter']['uc_connect']) {
         $_POST['ucenter']['uc_db_name'] = "`" . trim($_POST['ucenter']['uc_db_name'], '`') . "`";
         $_POST['ucenter']['uc_db_table_prefix'] = $_POST['ucenter']['uc_db_name'] . '.' . (false !== ($_tmp_pos = strpos($_POST['ucenter']['uc_db_table_prefix'], '.')) ? substr($_POST['ucenter']['uc_db_table_prefix'], $_tmp_pos + 1) : $_POST['ucenter']['uc_db_table_prefix']);
         if (@($dl = mysql_connect($_POST['ucenter']['uc_db_host'], $_POST['ucenter']['uc_db_user'], $_POST['ucenter']['uc_db_password'])) && mysql_query("SHOW COLUMNS FROM {$_POST['ucenter']['uc_db_table_prefix']}members", $dl)) {
         } else {
             $this->Messager("无法连接Ucenter数据库,请检查您填写的Ucenter数据库配置信息");
         }
     }
     $ucenter = $_POST['ucenter'];
     jconf::set('ucenter', $ucenter);
     if ($ucenter['enable']) {
         if ('mysql' == $ucenter['uc_connect']) {
             include_once ROOT_PATH . './api/uc_api_db.php';
             $uc_db = new JSG_UC_API_DB();
             @$uc_db->connect($ucenter['uc_db_host'], $ucenter['uc_db_user'], $ucenter['uc_db_password'], $ucenter['uc_db_name'], $ucenter['uc_db_charset'], 0, $ucenter['uc_db_table_prefix']);
             if (!$uc_db->link || !$uc_db->query("SHOW COLUMNS FROM {$ucenter['uc_db_table_prefix']}members", 'SILENT')) {
                 $ucenter['enable'] = 0;
                 jconf::set('ucenter', $ucenter);
                 jconf::update('ucenter_enable', $ucenter['enable'] ? 1 : 0);
                 $this->Messager("无法连接Ucenter数据库,请检查您填写的Ucenter数据库配置信息是否正确.");
             } else {
                 jconf::update('ucenter_enable', $ucenter['enable'] ? 1 : 0);
                 if ($ucenter['enable']) {
                     $this->Messager("Ucenter配置保存成功,如果您已经对数据库进行过备份了,<a href='admin.php?mod=ucenter&code=merge&confirm=1'><b>请点此进行用户数据整合</b></a>", null);
                 }
             }
         }
     }
     jconf::update('ucenter_enable', $ucenter['enable'] ? 1 : 0);
     $this->Messager("配置成功", 'admin.php?mod=ucenter&code=ucenter');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:59,代码来源:ucenter.mod.php

示例12: DoValidate

 function DoValidate()
 {
     $data = array('is_card_pic' => (int) $this->Post['is_card_pic']);
     $new_config = array();
     $new_config['card_pic_enable'] = $data;
     jconf::update($new_config);
     $this->Messager("设置成功", 'admin.php?mod=vipintro&code=validate_setting', -1);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:8,代码来源:vipintro.mod.php

示例13: SetVest

 function SetVest()
 {
     $config = array();
     $config['vest_enable'] = $this->Post['config']['vest_enable'] ? 1 : 0;
     $config['vest_role'] = $this->Post['config']['vest_role'] ? implode(',', $this->Post['config']['vest_role']) : '';
     jconf::update($config);
     $this->Messager('设置成功', 'admin.php?mod=member&code=config');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:8,代码来源:member.mod.php

示例14: _upgradeLock

 function _upgradeLock($lock = true)
 {
     if ($lock) {
         @touch(ROOT_PATH . './data/cache/upgrade.lock');
         jconf::update('upgrade_lock_time', time());
     } else {
         jconf::update('upgrade_lock_time', 0);
         @unlink(ROOT_PATH . './data/cache/upgrade.lock');
         @unlink(ROOT_PATH . 'upgrade.php');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:11,代码来源:upgrade.mod.php

示例15: archive

 function archive($tid = 0)
 {
     $num = 1000000;
     $keep = 200000;
     $tid = jfilter($tid, 'int');
     if ($tid > 0 && $tid - $GLOBALS['_J']['config']['last_archive_topic_tid'] > $num + $keep) {
         $max_tid = $num + max(0, (int) $GLOBALS['_J']['config']['last_archive_topic_tid']);
         if (!jtable('topic_table_id')->table_id($max_tid)) {
             $table_id = jtable('topic_table_id')->add($max_tid);
             if ($table_id) {
                 $p = array('<=@tid' => $max_tid);
                 jtable('topic')->copy($this->_table . '_' . $table_id, 3, $p);
                 jtable('topic_more')->copy('topic_more_' . $table_id, 3, $p);
                 jconf::update('last_archive_topic_tid', $max_tid);
             }
         }
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:18,代码来源:topic.class.php


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