function ModuleObject($config) { $this->MasterObject($config); $this->CacheConfig = jconf::get('cache'); Mobile::is_login(); $this->Execute(); }
function ModuleObject($config) { $this->MasterObject($config); $this->TopicLogic = jlogic('topic'); $this->CacheConfig = jconf::get('cache'); $this->Execute(); }
function index() { $config = jconf::get('live'); if (!$config) { $setting = true; include template('admin/live'); } else { $per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num']))); $gets = array('mod' => 'live', 'pn' => $this->Get['pn']); $page_url = 'admin.php?' . url_implode($gets); $count = DB::result_first("SELECT COUNT(*) FROM " . DB::table("live")); $list = array(); $guestall = array(); if ($count) { $page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'), '20 50 100 200,500'); $query = DB::query("SELECT *\r\n\t\t\t\t\t\t\t\tFROM " . DB::table("live") . "\r\n\t\t\t\t\t\t\t\tORDER BY lid DESC\r\n\t\t\t\t\t\t\t\t{$page_arr['limit']}"); $lids = array(); while ($value = DB::fetch($query)) { $value['datetime'] = date('Y-m-d H:i', $value['starttime']) . ':' . date('Y-m-d H:i', $value['endtime']); $lids[] = $value['lid']; $list[$value['lid']] = $value; } $guestall = $this->LiveLogic->Getguest($lids); foreach ($guestall as $key => $val) { $h = ''; foreach ($val['host'] as $k => $v) { $h .= $v['nickname'] . ' '; } $list[$key]['hosts'] = $h; } } include template('admin/live_index'); } }
function MTagLogic() { Load::logic('topic'); $this->TopicLogic = new TopicLogic(); $this->Config = jconf::get(); $this->DatabaseHandler =& Obj::registry('DatabaseHandler'); }
function Modify() { $member = jsg_member_info(MEMBER_ID); $theme_id = $this->Member['theme_id']; $theme_bg_image = $this->Member['theme_bg_image']; $theme_bg_color = $this->Member['theme_bg_color']; $theme_text_color = $this->Member['theme_text_color']; $theme_link_color = $this->Member['theme_link_color']; $theme_bg_image_type = $this->Member['theme_bg_image_type']; $theme_bg_repeat = $this->Member['theme_bg_repeat']; $theme_bg_fixed = $this->Member['theme_bg_fixed']; $open_theme_list = jconf::get('theme'); $themelist = $open_theme_list['theme_list']; $count = 0; foreach ($themelist as $k => $v) { $v['element'] = "{$v[theme_bg_color]},{$v[theme_text_color]},{$v[theme_link_color]},{$v[theme_id]},{$v[theme_bg_image_type]}"; $themelist[$k] = $v; $count = $count + 1; } $prepage = 8; $page_count = ceil($count / $prepage); $page = 1; if ($count > $perpage) { $multi .= '<a href=\'javascript:;\' onclick=\'pre("pre");\'>上一页</a>'; $multi .= ' <a href=\'javascript:;\' onclick=\'pre("next");\'>下一页</a>'; } $my_bg_image = RELATIVE_ROOT_PATH . 'images/theme/' . face_path(MEMBER_ID) . MEMBER_ID . '_o.jpg'; if (is_file($my_bg_image)) { $my_bg_image = $this->Config['site_url'] . "/" . $my_bg_image; } else { $my_bg_image = ''; } $this->Title = "个人模板设置"; include template('topic_theme'); }
function run($id = 0) { $this->setID($id); $sql = "SELECT * FROM " . TABLE_PREFIX . 'task' . " WHERE " . ($this->ID ? "id='{$this->ID}'" : "available>'0' AND nextrun<='{$this->timestamp}'") . " order by nextrun LIMIT 1"; $query = $this->DatabaseHandler->Query($sql); if ($task = $query->GetRow()) { $this->task = $task; $lock = jconf::get('task', 'lock'); $task['filename'] = str_replace(array('..', '/', '\\'), '', $task['filename']); $taskfile = './include/ext/task/' . $task['filename']; if ($lock > $this->timestamp - 600) { return null; } else { jconf::set('task', 'lock', time()); } @ignore_user_abort(true); $task['filename'] = str_replace(array('..', '/', '\\'), array('', '', ''), $task['filename']); $task['minute'] = explode("\t", $task['minute']); $this->nextRun($task); if (!(include_once $taskfile)) { $this->log("计划任务 {$task['name']} 文件 {$taskfile} 已经不存在", E_USER_ERROR, 0); } else { $log_id = $this->log("执行超时,请检查任务脚本。", E_USER_ERROR, 0); list($usec, $sec) = explode(" ", microtime()); $start = (double) $usec + (double) $sec; $TaskItem = new TaskItem(); $TaskItem->run(); list($usec, $sec) = explode(" ", microtime()); $exec_time = (double) $usec + (double) $sec - $start; $this->logUpdate($log_id, $TaskItem->log['message'], $TaskItem->log['error'], $exec_time); } @jconf::set('task', 'lock', 0); } $this->writeNextRunTime(); }
function MiscLogic() { $this->Config = jconf::get(); $this->DatabaseHandler =& Obj::registry('DatabaseHandler'); Load::logic('other'); $this->OtherLogic = new OtherLogic(); }
function TopicBbsLogic() { $this->MemberHandler =& Obj::registry("MemberHandler"); $this->TopicLogic = jlogic('topic'); if ($GLOBALS['_J']['config']['dzbbs_enable'] && ($config['dzbbs'] = jconf::get('dzbbs'))) { $this->BbsDatabase = new jishigou_mysql($config['dzbbs']['db_host'], $config['dzbbs']['db_port']); $this->BbsDatabase->Charset($config['dzbbs']['charset']); $this->BbsDatabase->doConnect($config['dzbbs']['db_user'], $config['dzbbs']['db_pass'], $config['dzbbs']['db_name'], $GLOBALS['_J']['config']['db_persist']); Obj::register('BbsDatabase', $this->BbsDatabase); define('BBS_TB_PRE', $config['dzbbs']['db_pre']); define('BBS_API_URL', $config['dzbbs']['db_url']); define('BBS_ENABLE', $config['dzbbs']['enable']); define('DZ_BBS_VER', $config['dzbbs']['dz_ver']); $this->BbsType = 'discuz'; } elseif ($GLOBALS['_J']['config']['phpwind_enable'] && $GLOBALS['_J']['config']['pwbbs_enable']) { $config['phpwind'] = jconf::get('phpwind'); $this->BbsDatabase = new jishigou_mysql($config['phpwind']['pw_db_host']); $this->BbsDatabase->Charset($config['phpwind']['pw_db_charset']); $this->BbsDatabase->doConnect($config['phpwind']['pw_db_user'], $config['phpwind']['pw_db_password'], $config['phpwind']['pw_db_name'], $GLOBALS['_J']['config']['db_persist']); Obj::register('BbsDatabase', $this->BbsDatabase); define('BBS_TB_PRE', $config['phpwind']['pw_db_table_prefix']); define('BBS_API_URL', $config['phpwind']['pw_api']); define('BBS_ENABLE', $config['phpwind']['enable']); $this->BbsType = 'phpwind'; } }
function my_member_validate($uid, $email, $role_id = '', $new = 0, $check_allow = 1) { if (1 > ($uid = (int) $uid)) { return false; } if (!($email = trim($email))) { return false; } $sys_config = jconf::get(); if ($new == 0 && !$sys_config['reg_email_verify']) { return false; } if ($check_allow && jdisallow($uid)) { return false; } $sql = "select * from `" . TABLE_PREFIX . "member_validate` where `uid`='{$uid}' order by `regdate` asc"; $query = DB::query($sql); $data = array(); if (DB::num_rows($query) > 0) { DB::query("delete from `" . TABLE_PREFIX . "member_validate` where `uid`='{$uid}'"); } $data['uid'] = $uid; $data['email'] = $email; $data['role_id'] = (int) ($role_id > 0 ? $role_id : $sys_config['normal_default_role_id']); $data['key'] = substr(md5(md5($uid . $email . $role_id) . md5(uniqid(mt_rand(), true))), 3, 16); $data['status'] = $data['verify_time'] = '0'; $data['regdate'] = TIMESTAMP; $data['type'] = 'email'; jtable('member_validate')->insert($data); $email_message = "您好:\r\n您收到此邮件是因为在 {$sys_config['site_url']} 用户注册中使用了该 Email,\r\n如果您没有进行上述操作,请忽略这封邮件。\r\n------------------------------------------------------\r\n帐号激活说明:\r\n为避免垃圾邮件或您的Email地址被滥用,我们需要对您的email有效性进行验证,\r\n您只需点击下面的链接即可激活您的帐号,并享有真正会员权限:\r\n{$sys_config['site_url']}/index.php?mod=member&code=verify&uid={$data['uid']}&key={$data['key']}&from=reg\r\n\r\n(如果上面不是链接形式,请将地址手工粘贴到浏览器地址栏再访问)\r\n感谢您的访问,祝您使用愉快!\r\n\r\n此致,\r\n{$sys_config['site_name']} 管理团队.\r\n"; $send_result = send_mail($email, " [{$sys_config['site_name']}]Email地址验证", $email_message, $sys_config['site_name'], $sys_config['site_admin_email'], array(), 3, false); return $send_result; }
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("修改成功"); }
function ModuleObject($config) { $this->MasterObject($config); $this->ShowConfig = jconf::get('show'); Load::logic('vote'); $this->VoteLogic = new VoteLogic(); $this->TopicLogic = jlogic('topic'); if (MEMBER_ROLE_TYPE != 'admin') { if (!$this->Config['vote_open']) { $this->Messager("当前站点没有开放投票功能", null); } } $code =& $this->Code; ob_start(); if (!empty($this->Get['vid']) && empty($code)) { $code = 'view'; } else { if (empty($code)) { $code = 'index'; if (!empty($this->Get['uid']) && empty($this->Get['view'])) { $this->Get['view'] = 'me'; } } } if (in_array($code, array('create'))) { $this->_check_login(); } if (method_exists('ModuleObject', $code)) { $this->{$code}(); } else { $this->index(); } $body = ob_get_clean(); $this->ShowBody($body); }
function MblogLogic() { Load::logic('topic'); $this->TopicLogic = new TopicLogic(); Load::logic("topic_list"); $this->TopicListLogic = new TopicListLogic(); $this->Config = jconf::get(); }
function ModuleObject($config) { $this->MasterObject($config); $this->ID = jget('id', 'int'); $this->TopicLogic = jlogic('topic'); $this->CacheConfig = jconf::get('cache'); $this->ShowConfig = jconf::get('show'); $this->Execute(); }
function get_feature() { $features = array(); $features = jconf::get('feature'); if (empty($features)) { $this->update_feature_cache(); $features = jconf::get('feature'); } return $features; }
function ModuleObject($config) { $this->MasterObject($config); $this->ID = jget('id', 'int'); Mobile::logic('mblog'); $this->MblogLogic = new MblogLogic(); $this->CacheConfig = jconf::get('cache'); $this->ShowConfig = jconf::get('show'); Mobile::is_login(); $this->Execute(); }
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(); }
function ModuleObject($config) { $this->MasterObject($config); $this->TopicLogic = jlogic('topic'); $this->CacheConfig = jconf::get('cache'); Load::logic('validate_category'); $this->ValidateLogic = new ValidateLogic($this); Load::logic('validate_extra'); $this->ValidateExtraLogic = new ValidateExtraLogic(); $this->Execute(); }
function ModuleObject($config) { $this->MasterObject($config); $this->ID = jget('id', 'int'); Load::logic("topic"); $this->TopicLogic = new TopicLogic(); $this->ShowConfig = jconf::get('show'); if ($this->Code != 'login') { Mobile::is_login(); } $this->Execute(); }
function MailQueue() { $msg_config = jconf::get('mail_msg'); $site_url = $this->Config['site_url']; $site_name = $this->Config['site_name']; $page_url = 'admin.php?mod=notice&code=mailq'; $per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num']))); $count = DB::result_first(" select count(*) from `" . TABLE_PREFIX . "mailqueue` "); $page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'), '20 50 100 200 500'); $sql = " select mq.*,m.username,m.nickname\r\n\t\t\t\t from `" . TABLE_PREFIX . "mailqueue` mq\r\n\t\t\t\t left join `" . TABLE_PREFIX . "members` m on m.uid = mq.uid\r\n\t\t\t\t where `dateline` > 0\r\n\t\t\t\t order by `dateline` {$page_arr['limit']}"; $query = DB::query($sql); while ($rs = db::fetch($query)) { $msg = array(); $rs['dateline'] = date('Y-m-d H:i:s', $rs['dateline']); if ($rs['msg']) { $nickname = $rs['nickname']; $msg = unserialize($rs['msg']); $site_new_data = array(); $newpm = $msg['newpm'] ? $msg['newpm'] : 0; $newpm && ($site_new_data['newpm'] = "有{$newpm}条未读私信"); $at_new = $msg['at_new'] ? $msg['at_new'] : 0; $at_new && ($site_new_data['at_new'] = "被@{$at_new}次"); $comment_new = $msg['comment_new'] ? $msg['comment_new'] : 0; $comment_new && ($site_new_data['comment_new'] = "被评论{$comment_new}次"); $event_new = $msg['event_new'] ? $msg['event_new'] : 0; $event_new && ($site_new_data['event_new'] = "有{$event_new}个活动更新"); $fans_new = $msg['fans_new'] ? $msg['fans_new'] : 0; $fans_new && ($site_new_data['fans_new'] = "新增加{$fans_new}个粉丝"); $qun_new = $msg['qun_new'] ? $msg['qun_new'] : 0; $qun_new && ($site_new_data['qun_new'] = "有{$qun_new}个群更新"); $vote_new = $msg['vote_new'] ? $msg['vote_new'] : 0; $vote_new && ($site_new_data['vote_new'] = "投票有{$vote_new}个更新"); $dig_new = $msg['dig_new'] ? $msg['dig_new'] : 0; $dig_new && ($site_new_data['dig_new'] = "被赞{$dig_new}次"); $channel_new = $msg['channel_new'] ? $msg['channel_new'] : 0; $channel_new && ($site_new_data['channel_new'] = "频道有{$channel_new}个更新"); $company_new = $msg['company_new'] ? $msg['company_new'] : 0; $company_new && ($site_new_data['company_new'] = "单位有{$company_new}个更新"); $load = $msg['load'] ? $msg['load'] . "天" : ''; $site_new_data = $site_new_data ? '<br>您' . implode(',', $site_new_data) . '。' : ''; if ($msg_config['msg']) { $message = $msg_config['msg']; $message = str_replace(array('newpm', 'at_new', 'comment_new', 'event_new', 'fans_new', 'qun_new', 'vote_new', 'dig_new', 'channel_new', 'company_new', 'load', 'site_url', 'site_name', 'time', 'nickname', 'site_new_data', 'time'), array($newpm, $at_new, $comment_new, $event_new, $fans_new, $qun_new, $vote_new, $dig_new, $channel_new, $company_new, $load, $site_url, $site_name, date('Y:m:d H:i:s'), $nickname, $site_new_data, $time), $message); } else { $message = "尊敬的{$nickname:}<br>您好!<br>在未登录{$site_name}的{$load}期间,您收到了一些信息:" . "{$site_new_data}<br>点击<a href='{$site_url}'>{$site_url}</a>查看" . "<br><br>(<font color='gray'>如此邮件提醒对您产生了干扰,请<a href='{$site_url}/index.php?mod=settings&code=sendmail' targegt='_blank'>点击修改提醒设置</a></font>)<br>" . data('Y-m-d H:i:s'); } $message .= $recommend_tips ? '<br><br><b>官方推荐内容:</b>' . $recommend_tips : ''; $rs['message'] = $message; } $mailQueue[$rs['qid']] = $rs; } include template('admin/mail_queue'); }
function kaixin_enable($sys_config = array()) { if (!$sys_config) { $sys_config = jconf::get(); } if (!$sys_config['kaixin_enable']) { return false; } if (!$sys_config['kaixin']) { $sys_config['kaixin'] = jconf::get('kaixin'); } return $sys_config; }
function yy_enable($sys_config = array()) { if (!$sys_config) { $sys_config = jconf::get(); } if (!$sys_config['yy_enable']) { return false; } if (!$sys_config['yy']) { $sys_config['yy'] = jconf::get('yy'); } return $sys_config; }
function ModuleObject($config) { $this->MasterObject($config); $this->ID = jget('id', 'int'); Load::logic('topic'); $this->TopicLogic = new TopicLogic($this); Mobile::logic('tag'); $this->MTagLogic = new MTagLogic(); $this->CacheConfig = jconf::get('cache'); $this->ShowConfig = jconf::get('show'); Mobile::is_login(); $this->Execute(); }
function member() { $this->Title = '人气用户推荐'; $show_conf = jconf::get('show', 'topic_top'); $cache_conf = jconf::get('cache', 'topic_top'); $credits = $this->Config['credits_filed']; $credits_name = $this->Config['credits']['ext'][$credits]['name']; $top_fans_member = jlogic('member')->get_member_by_top_fans($show_conf['guanzhu'], $cache_conf['guanzhu']); $week_fans_member = jlogic('member')->get_member_by_fans($show_conf['renqi'], $cache_conf['renqi']); $week_topic_member = jlogic('member')->get_member_by_topic($show_conf['huoyue'], $cache_conf['huoyue']); $week_reply_member = jlogic('member')->get_member_by_reply($show_conf['yingxiang'], $cache_conf['yingxiang']); $top_credits_member = jlogic('member')->get_member_by_top_credits($show_conf['credits'], $cache_conf['credits'], $credits); include template(); }
function ModuleObject($config) { $this->MasterObject($config); $qun_setting = jconf::get('qun_setting'); if (MEMBER_ROLE_TYPE != 'admin') { if (!$qun_setting['qun_open']) { $this->Messager('站点暂时不开放微群功能', 'index.php'); } } $this->TopicLogic = jlogic('topic'); Load::logic('qun'); $this->QunLogic = new QunLogic(); $this->Execute(); }
function TopicCmsLogic() { $this->MemberHandler =& Obj::registry("MemberHandler"); $this->TopicLogic = jlogic('topic'); if ($GLOBALS['_J']['config']['dedecms_enable'] && ($config['dedecms'] = jconf::get('dedecms'))) { $this->CmsDatabase = new jishigou_mysql($config['dedecms']['db_host'], $config['dedecms']['db_port']); $this->CmsDatabase->Charset($config['dedecms']['charset']); $this->CmsDatabase->doConnect($config['dedecms']['db_user'], $config['dedecms']['db_pass'], $config['dedecms']['db_name'], $GLOBALS['_J']['config']['db_persist']); Obj::register('CmsDatabase', $this->CmsDatabase); define('CMS_TB_PRE', $config['dedecms']['db_pre']); define('CMS_API_URL', $config['dedecms']['db_url']); define('CMS_ENABLE', $config['dedecms']['enable']); } }
public function ModuleObject($config) { $wechat_conf = jconf::get("wechat"); if (!$wechat_conf || !$wechat_conf['on'] || !$wechat_conf['token']) { $msg = "后台未开启或微信Token值没有设定……"; jlog('wechat', $msg, 0); exit($msg); } $this->wechatConfig = $wechat_conf; define("TOKEN", $wechat_conf['token']); $this->MasterObject($config); $this->WLogic = jlogic("wechat"); $this->main(); }
function mail_send_test() { $k = jget('k', 'int'); $smtp = jconf::get('smtp'); $test_smtp = $smtp['smtp'][$k]; jfunc('mail'); $ret = _send_mail_by_smtp($test_smtp['mail'], $this->Config['site_name'] . '-' . date('Y-m-d H:i:s'), '邮件测试正文---' . date('Y-m-d H:i:s'), $test_smtp); if ($ret) { echo '发送成功。'; } else { echo '发送不成功,请检查配置是否正确。'; } exit; }
function DoSave() { if (!is_file(ROOT_PATH . './api/pw_client/uc_client.php')) { $this->Messager('Phpwind的客户端文件 <b>' . ROOT_PATH . './api/pw_client/uc_client.php' . "</b> 不存在,请检查"); } if (!is_file(ROOT_PATH . 'pw_api.php')) { $this->Messager('Phpwind的api文件 <b>' . ROOT_PATH . 'pw_api.php' . "</b> 不存在,请检查"); } $phpwind = $this->Post['phpwind']; $phpwind_config_default = $phpwind_config = jconf::get('phpwind'); $phpwind_config['enable'] = $phpwind['enable'] ? 1 : 0; $phpwind_config['face'] = $phpwind['face'] ? 1 : 0; $phpwind_config['bbs'] = $phpwind['bbs'] ? 1 : 0; $phpwind_config['pw_db_host'] = $phpwind['pw_db_host']; $phpwind_config['pw_db_name'] = $phpwind['pw_db_name']; $phpwind_config['pw_db_user'] = $phpwind['pw_db_user']; $phpwind_config['pw_db_password'] = $phpwind['pw_db_password']; $phpwind_config['pw_ip'] = $phpwind['pw_ip']; $phpwind_config['pw_db_table_prefix'] = $phpwind['pw_db_table_prefix']; $phpwind_config['pw_db_charset'] = $phpwind['pw_db_charset']; $phpwind_config['pw_charset'] = $phpwind['pw_charset']; $phpwind_config['pw_pptkey'] = $phpwind['pw_pptkey']; $phpwind_config['pw_key'] = $phpwind['pw_key'] ? $phpwind['pw_key'] : ''; $phpwind_config['pw_api'] = $phpwind['pw_api']; $phpwind_config['pw_app_id'] = $phpwind['pw_app_id'] ? $phpwind['pw_app_id'] : 0; if ($phpwind_config['enable']) { include_once ROOT_PATH . './api/uc_api_db.php'; $pw_db = new JSG_UC_API_DB(); @$pw_db->connect($phpwind['pw_db_host'], $phpwind['pw_db_user'], $phpwind['pw_db_password'], $phpwind['pw_db_name'], $phpwind['pw_db_charset'], 1, $phpwind['pw_db_table_prefix']); if (!$pw_db->link || !$pw_db->query("SHOW COLUMNS FROM {$phpwind['pw_db_table_prefix']}members", 'SILENT')) { $this->Messager("无法连接PhpWind数据库,请检查您填写的PhpWind数据库配置信息是否正确."); exit; } } if ($phpwind_config_default != $phpwind_config) { jconf::set('phpwind', $phpwind_config); } if ($phpwind_config['enable'] != $this->Config['phpwind_enable'] || $phpwind_config['bbs'] != $this->Config['pwbbs_enable']) { $config = array(); $config['phpwind_enable'] = $phpwind_config['enable']; $config['pwbbs_enable'] = $phpwind_config['bbs']; if ($phpwind_config['enable'] == 1) { $config['ucenter_enable'] = 0; $config['dzbbs_enable'] = 0; } jconf::update($config); } $this->Messager("配置成功"); }
function ModuleObject($config) { $this->MasterObject($config); $this->ID = jget('id', 'int'); Mobile::logic('mblog'); $this->MblogLogic = new MblogLogic(); $this->CacheConfig = jconf::get('cache'); if (!in_array($this->Code, array('new', 'hot_comments', 'hot_forwards'))) { Mobile::is_login(); } if (empty($this->Code)) { $this->Code = "home"; } $this->Execute(); }
function area_config_to_json() { $config['area'] = jconf::get('area'); $json = ""; foreach ($config['area'] as $key => $val) { $j = ''; foreach ($val as $k => $v) { $j .= "'{$k}':'{$v}',"; } $j = trim($j, ' ,'); $json .= "'{$key}':{'key':'{$key}','values':{{$j}}},"; } $json = trim($json, ','); $json = "{'请选择…':{'key':'0','defaultvalue' : '0','values':{'请选择…':'0'}},{$json}}"; return $json; }