本文整理汇总了PHP中jconf::get方法的典型用法代码示例。如果您正苦于以下问题:PHP jconf::get方法的具体用法?PHP jconf::get怎么用?PHP jconf::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jconf
的用法示例。
在下文中一共展示了jconf::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ModuleObject
function ModuleObject($config)
{
$this->MasterObject($config);
$this->CacheConfig = jconf::get('cache');
Mobile::is_login();
$this->Execute();
}
示例2: ModuleObject
function ModuleObject($config)
{
$this->MasterObject($config);
$this->TopicLogic = jlogic('topic');
$this->CacheConfig = jconf::get('cache');
$this->Execute();
}
示例3: index
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');
}
}
示例4: MTagLogic
function MTagLogic()
{
Load::logic('topic');
$this->TopicLogic = new TopicLogic();
$this->Config = jconf::get();
$this->DatabaseHandler =& Obj::registry('DatabaseHandler');
}
示例5: Modify
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');
}
示例6: run
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();
}
示例7: MiscLogic
function MiscLogic()
{
$this->Config = jconf::get();
$this->DatabaseHandler =& Obj::registry('DatabaseHandler');
Load::logic('other');
$this->OtherLogic = new OtherLogic();
}
示例8: TopicBbsLogic
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';
}
}
示例9: my_member_validate
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;
}
示例10: 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("修改成功");
}
示例11: ModuleObject
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);
}
示例12: MblogLogic
function MblogLogic()
{
Load::logic('topic');
$this->TopicLogic = new TopicLogic();
Load::logic("topic_list");
$this->TopicListLogic = new TopicListLogic();
$this->Config = jconf::get();
}
示例13: ModuleObject
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();
}
示例14: get_feature
function get_feature()
{
$features = array();
$features = jconf::get('feature');
if (empty($features)) {
$this->update_feature_cache();
$features = jconf::get('feature');
}
return $features;
}
示例15: ModuleObject
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();
}