本文整理汇总了PHP中setting_save函数的典型用法代码示例。如果您正苦于以下问题:PHP setting_save函数的具体用法?PHP setting_save怎么用?PHP setting_save使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setting_save函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: load
load()->classs('account');
$modulename = $_GPC['modulename'];
$obj = WeUtility::createModuleReceiver($modulename);
if (empty($obj)) {
exit('error');
}
$obj->uniacid = $_W['uniacid'];
$obj->acid = $_W['acid'];
if (method_exists($obj, 'receive')) {
@$obj->receive();
exit('success');
}
}
if ($do == 'ban') {
$modulename = $_GPC['modulename'];
$ban = $_GPC['ban'];
if (empty($modulename)) {
message('请设置模块名', referer(), 'error');
}
if (!is_array($_W['setting']['module_receive_ban'])) {
$_W['setting']['module_receive_ban'] = array();
}
if (empty($ban)) {
$_W['setting']['module_receive_ban'][$modulename] = $modulename;
} else {
unset($_W['setting']['module_receive_ban'][$modulename]);
}
setting_save($_W['setting']['module_receive_ban'], 'module_receive_ban');
cache_build_module_subscribe_type();
message($module_ban, '', 'ajax');
}
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:subscribe.ctrl.php
示例2: array
$data = array('global' => array('default_theme' => get_variable('default_theme', 'POST', ''), 'link_optimization' => get_variable('link_optimization', 'POST', 0, 'int'), 'site_name' => get_variable('site_name', 'POST', ''), 'site_url' => get_variable('site_url', 'POST', ''), 'foot1' => get_variable('foot1', 'POST', ''), 'foot2' => get_variable('foot2', 'POST', '')), 'email' => array('email_enable' => get_variable('email_enable', 'POST') ? 1 : 0, 'email_function_name' => get_variable('email_function_name', 'POST', ''), 'smtp' => get_variable('smtp', 'POST', 0, 'int'), 'smtp_host' => get_variable('smtp_host', 'POST', ''), 'smtp_port' => get_variable('smtp_port', 'POST', '', 'int'), 'smtp_username' => get_variable('smtp_username', 'POST', ''), 'smtp_password' => get_variable('smtp_password', 'POST', ''), 'site_email' => get_variable('site_email', 'POST', '')));
setting_save($data);
unset($data);
}
global $_CLASS, $_CORE_CONFIG;
$_CLASS['core_template']->assign_array(array('A_OPTION' => 'site', 'ACTION' => generate_link('system', array('admin' => true)), 'LINK_OPTIMIZATION' => $_CORE_CONFIG['global']['link_optimization'], 'SELECT_THEME' => select_theme($_CORE_CONFIG['global']['default_theme']), 'SITE_NAME' => $_CORE_CONFIG['global']['site_name'], 'EMAIL_ENABLE' => $_CORE_CONFIG['email']['email_enable'], 'EMAIL_FUNCTION_NAME' => $_CORE_CONFIG['email']['email_function_name'], 'SMTP' => $_CORE_CONFIG['email']['smtp'], 'SMTP_HOST' => $_CORE_CONFIG['email']['smtp_host'], 'SMTP_PORT' => $_CORE_CONFIG['email']['smtp_port'], 'SMTP_USERNAME' => $_CORE_CONFIG['email']['smtp_username'], 'SMTP_PASSWORD' => $_CORE_CONFIG['email']['smtp_password'], 'SITE_EMAIL' => $_CORE_CONFIG['email']['site_email'], 'FOOTER_FIRST' => $_CORE_CONFIG['global']['foot1'], 'FOOTER_SECOND' => $_CORE_CONFIG['global']['foot2']));
$_CLASS['core_template']->display('admin/system/index.html');
break;
case 'system':
if ($save) {
if (!empty($_POST['maintenance_start'])) {
$expires = strtotime($_POST['maintenance_start']);
$_POST['maintenance_start'] = !$expires || $expires === -1 ? 0 : $expires;
}
$data = array('maintenance' => array('active' => get_variable('maintenance', 'POST') ? 1 : 0, 'text' => get_variable('maintenance_text', 'POST', ''), 'start' => get_variable('maintenance_start', 'POST', 0, 'int')), 'server' => array('cookie_domain' => get_variable('cookie_domain', 'POST', ''), 'cookie_name' => get_variable('cookie_name', 'POST', ''), 'cookie_path' => get_variable('cookie_path', 'POST', ''), 'error_options' => get_variable('error_options', 'POST', 0, 'int'), 'site_domain' => get_variable('site_domain', 'POST', ''), 'site_port' => get_variable('site_port', 'POST', ''), 'site_path' => get_variable('site_path', 'POST', ''), 'site_secure' => get_variable('site_secure', 'POST', 0, 'int'), 'ip_check' => get_variable('ip_check', 'POST', 0, 'int'), 'limit_load' => get_variable('limit_load', 'POST', 0, 'int'), 'limit_sessions' => get_variable('limit_sessions', 'POST', 0, 'int'), 'session_length' => get_variable('session_length', 'POST', 600, 'int')));
setting_save($data);
unset($data);
}
global $_CLASS, $_CORE_CONFIG;
$path = str_replace('\\', '/', dirname(getenv('SCRIPT_NAME')));
if (substr($path, -1) !== '/') {
$path .= '/';
}
$domain = empty($_SERVER['SERVER_NAME']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$_CLASS['core_template']->assign_array(array('A_OPTION' => 'system', 'ACTION' => generate_link('system&mode=system', array('admin' => true)), 'COOKIE_DOMAIN' => $_CORE_CONFIG['server']['cookie_domain'], 'COOKIE_NAME' => $_CORE_CONFIG['server']['cookie_name'], 'COOKIE_PATH' => $_CORE_CONFIG['server']['cookie_path'], 'ERROR' => $_CORE_CONFIG['server']['error_options'], 'MAINTENANCE' => $_CORE_CONFIG['maintenance']['active'], 'MAINTENANCE_MSG' => $_CORE_CONFIG['maintenance']['text'], 'MAINTENANCE_START' => is_numeric($_CORE_CONFIG['maintenance']['start']) ? $_CLASS['core_user']->format_date($_CORE_CONFIG['maintenance']['start'], 'M d, Y h:i a') : '', 'IP_CHECK' => $_CORE_CONFIG['server']['ip_check'], 'SITE_DOMAIN' => $_CORE_CONFIG['server']['site_domain'], 'SITE_PATH' => $_CORE_CONFIG['server']['site_path'], 'SITE_PORT' => $_CORE_CONFIG['server']['site_port'], 'SITE_SECURE' => $_CORE_CONFIG['server']['site_secure'], 'LIMIT_LOAD' => $_CORE_CONFIG['server']['limit_load'], 'LIMIT_SESSIONS' => $_CORE_CONFIG['server']['limit_sessions'], 'SESSION_LENGTH' => $_CORE_CONFIG['server']['session_length']));
$_CLASS['core_template']->display('admin/system/index.html');
break;
}
function setting_save($data)
{
global $_CLASS, $_CORE_CONFIG;
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:31,代码来源:system.php
示例3: model
<?php
/**
* BAE相关设置选项
* [WeEngine System] Copyright (c) 2013 WE7.CC
*/
include model('setting');
if (checksubmit('bae_delete_update') || checksubmit('bae_delete_install')) {
if (!empty($_GPC['bae_delete_update'])) {
unlink(IA_ROOT . '/data/update.lock');
} elseif (!empty($_GPC['bae_delete_install'])) {
unlink(IA_ROOT . '/data/install.lock');
}
message('操作成功!', create_url('setting/common'), 'success');
} elseif (checksubmit('submit')) {
setting_save(array('msg_history' => $_GPC['msg_history'], 'msg_maxday' => intval($_GPC['msg_maxday']), 'use_ratio' => intval($_GPC['use_ratio'])), 'stat');
message('更新设置成功!', create_url('setting/common'));
} else {
$settings = pdo_fetchall('SELECT * FROM ' . tablename('settings'), array(), 'key');
if(is_array($settings)) {
foreach($settings as $k => &$v) {
$settings[$k] = iunserializer($v['value']);
}
}
template('setting/common');
}
开发者ID:royalwang,项目名称:saivi,代码行数:25,代码来源:common.ctrl.php
示例4: message
message('操作成功!', url('system/common'), 'success');
}
if (checksubmit('submit')) {
$mail = array('username' => $_GPC['username'], 'password' => $_GPC['password'], 'smtp' => $_GPC['smtp'], 'sender' => $_GPC['sender'], 'signature' => $_GPC['signature']);
setting_save($mail, 'mail');
$row = pdo_fetchcolumn("SELECT `notify` FROM " . tablename('uni_settings') . " WHERE uniacid = :uniacid", array(':uniacid' => $_W['uniacid']));
$notify = iunserializer($row);
if (!is_array($notify)) {
$notify['sms'] = array();
$notify['sms']['balance'] = 0;
$notify['sms']['signature'] = '系统默认';
}
$notify['mail'] = $mail;
$update = array();
$update['notify'] = iserializer($notify);
pdo_update('uni_settings', $update, array('uniacid' => $_W['uniacid']));
if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
$result = ihttp_email($_GPC['receiver'], $_W['setting']['copyright']['sitename'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
if (is_error($result)) {
message($result['message']);
}
}
message('更新设置成功!', url('system/common'));
}
if (checksubmit('authmodesubmit')) {
$authmode = intval($_GPC['authmode']);
setting_save($authmode, 'authmode');
message('更新设置成功!', url('system/common'));
}
setting_load(array('authmode', 'mail'));
template('system/common');
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:common.ctrl.php
示例5: load
<?php
/**
* [SxxPro System] Copyright (c) 2014 012WZ.COM
* SxxPro is NOT a free software, it under the license terms, visited http://www.qdaygroup.com/ for more details.
*/
$_W['page']['title'] = '云服务诊断 - 云服务';
if (checksubmit()) {
load()->model('setting');
setting_save('', 'site');
message('成功清除站点记录.', 'refresh');
}
setting_load('site');
if (empty($_W['setting']['site'])) {
$_W['setting']['site'] = array();
}
template('cloud/diagnose');
开发者ID:6662680,项目名称:qday_wx,代码行数:17,代码来源:diagnose.ctrl.php
示例6: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$_W['page']['title'] = '注册选项 - 用户设置 - 用户管理';
load()->model('setting');
if (checksubmit('submit')) {
setting_save(array('open' => intval($_GPC['open']), 'verify' => intval($_GPC['verify']), 'code' => intval($_GPC['code']), 'groupid' => intval($_GPC['groupid'])), 'register');
message('更新设置成功!', url('user/registerset'));
}
$settings = setting_load('register');
$settings = $settings['register'];
$groups = pdo_fetchall("SELECT id, name FROM " . tablename('users_group') . " ORDER BY id ASC");
template('user/access');
开发者ID:eduNeusoft,项目名称:weixin,代码行数:17,代码来源:registerset.ctrl.php
示例7: model
<?php
/**
* BAE相关设置选项
* [WDL] Copyright (c) 2013 wormwood.com
*/
include model('setting');
if (checksubmit('bae_delete_update') || checksubmit('bae_delete_install')) {
if (!empty($_GPC['bae_delete_update'])) {
unlink(IA_ROOT . '/data/update.lock');
} elseif (!empty($_GPC['bae_delete_install'])) {
unlink(IA_ROOT . '/data/install.lock');
}
message('操作成功!', create_url('setting/common'), 'success');
} elseif (checksubmit('submit')) {
$mail = array('username' => $_GPC['username'], 'password' => $_GPC['password'], 'smtp' => $_GPC['smtp'], 'sender' => $_GPC['sender'], 'signature' => $_GPC['signature']);
setting_save($mail, 'mail');
setting_save(intval($_GPC['authmode']), 'authmode');
if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
$result = ihttp_email($_GPC['receiver'], $_W['setting']['copyright']['sitename'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
if (is_error($result)) {
message($result['message']);
}
}
message('更新设置成功!', create_url('setting/common'));
} else {
template('setting/common');
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:28,代码来源:common.ctrl.php
示例8: array
$update = array();
$update['notify'] = iserializer($notify);
pdo_update('uni_settings', $update, array('uniacid' => $_W['uniacid']));
if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
$result = ihttp_email($_GPC['receiver'], $_W['setting']['copyright']['sitename'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
if (is_error($result)) {
message($result['message']);
}
}
message('更新设置成功!', url('system/common'));
}
if (checksubmit('authmodesubmit')) {
$authmode = intval($_GPC['authmode']);
setting_save($authmode, 'authmode');
message('更新设置成功!', url('system/common'));
}
if (checksubmit('sms_submit')) {
$sms = $_GPC['sms'];
setting_save($sms, 'sms');
if (!empty($_GPC['sms_testsend']) && !empty($_GPC['sms_receiver'])) {
load()->func('sms');
$content = "您的验证码是:【{$_W['setting']['copyright']['sitename']}短信测试】。如需帮助请联系客服。";
$result = sms_send($_GPC['sms_receiver'], $content, $_W['setting']['copyright']['sitename'], false);
if (is_error($result)) {
message($result['message']);
}
}
message('更新设置成功!', url('system/common'));
}
setting_load(array('authmode', 'mail', 'sms'));
template('system/common');
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:common.ctrl.php
示例9: elseif
$url = 'http://' . $url;
}
$remote['alioss']['url'] = $url;
}
} elseif ($remote['type'] == '1') {
if (empty($remote['ftp']['host'])) {
message('FTP服务器地址为必填项.');
}
if (empty($remote['ftp']['username'])) {
message('FTP帐号为必填项.');
}
if (empty($remote['ftp']['password'])) {
message('FTP密码为必填项.');
}
}
setting_save($remote, 'remote');
message('远程附件配置信息更新成功!', url('system/attachment/remote'));
}
$remote = $_W['setting']['remote'];
if (!empty($remote['alioss']['key']) && !empty($remote['alioss']['secret'])) {
$buckets = attachment_alioss_buctkets($remote['alioss']['key'], $remote['alioss']['secret']);
}
$bucket_datacenter = array('oss-cn-hangzhou' => '杭州数据中心', 'oss-cn-qingdao' => '青岛数据中心', 'oss-cn-beijing' => '北京数据中心', 'oss-cn-hongkong' => '香港数据中心', 'oss-cn-shenzhen' => '深圳数据中心', 'oss-cn-shanghai' => '上海数据中心', 'oss-us-west-1' => '美国硅谷数据中心');
} elseif ($do == 'buckets') {
$key = $_GPC['key'];
$secret = $_GPC['secret'];
$buckets = attachment_alioss_buctkets($key, $secret);
if (is_error($buckets)) {
message(error(-1), '', 'ajax');
}
$bucket_datacenter = array('oss-cn-hangzhou' => '杭州数据中心', 'oss-cn-qingdao' => '青岛数据中心', 'oss-cn-beijing' => '北京数据中心', 'oss-cn-hongkong' => '香港数据中心', 'oss-cn-shenzhen' => '深圳数据中心', 'oss-cn-shanghai' => '上海数据中心', 'oss-us-west-1' => '美国硅谷数据中心');
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:attachment.ctrl.php
示例10: array
<?php
if (checksubmit('token')) {
$filter1 = array('index_image1', 'index_image2', 'index_image3', 'index_image4', 'index_image1_url', 'index_image2_url', 'index_image3_url', 'index_image4_url', 'index_ad1', 'index_ad2', 'index_ad3', 'index_ad4', 'index_ad1_url', 'index_ad2_url', 'index_ad3_url', 'index_ad4_url');
$filter2 = array('index_text1', 'index_text2', 'index_text3', 'index_text4', 'index_text5', 'index_text6', 'index_note', 'index_logo_right');
$newData = cly_array_filter($filter1);
foreach ($filter2 as $v) {
$newData[$v] = $_POST[$v];
}
setting_save($newData);
}
$setting = setting_load();
template('admin/indexpage');
开发者ID:kwdwkiss,项目名称:report,代码行数:13,代码来源:indexpage.ctrl.php
示例11: microtime
$starttime = microtime(true);
$response = cloud_request('http://v2.addons.we7.cc', array(), array('ip' => $_GPC['ip']));
$endtime = microtime(true);
message('请求接口成功,耗时 ' . round($endtime - $starttime, 5) . ' 秒', '', 'ajax');
} else {
if (checksubmit()) {
load()->model('setting');
setting_save('', 'site');
message('成功清除站点记录.', 'refresh');
}
if (checksubmit('updateserverip')) {
load()->model('setting');
if (!empty($_GPC['ip'])) {
setting_save(array('ip' => $_GPC['ip'], 'expire' => TIMESTAMP + 201600), 'cloudip');
} else {
setting_save(array(), 'cloudip');
}
message('修改云服务ip成功.', 'refresh');
}
if (empty($_W['setting']['site'])) {
$_W['setting']['site'] = array();
}
$checkips = array();
if (!empty($_W['setting']['cloudip']['ip'])) {
$checkips[] = $_W['setting']['cloudip']['ip'];
}
if (strexists(strtoupper(PHP_OS), 'WINNT')) {
$cloudip = gethostbyname('v2.addons.we7.cc');
if (!in_array($cloudip, $checkips)) {
$checkips[] = $cloudip;
}
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:diagnose.ctrl.php
示例12: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
setting_load('platform');
if (empty($_W['setting']['platform'])) {
$_W['setting']['platform'] = array('token' => random(32), 'encodingaeskey' => random(43), 'appsecret' => '', 'appid' => '');
setting_save($_W['setting']['platform'], 'platform');
}
$url = parse_url($_W['siteroot']);
if (checksubmit('submit')) {
$data = array('token' => trim($_GPC['platform_token']), 'encodingaeskey' => trim($_GPC['encodingaeskey']), 'appsecret' => trim($_GPC['appsecret']), 'appid' => trim($_GPC['appid']));
setting_save($data, 'platform');
message('更新成功', referer(), 'success');
}
if (!function_exists('mcrypt_module_open')) {
message('抱歉,您的系统不支持加解密 mcrypt 模块,无法进行平台接入');
}
template('extension/platform');
开发者ID:eduNeusoft,项目名称:weixin,代码行数:22,代码来源:platform.ctrl.php
示例13: defined
<?php
defined('IN_IA') or exit('Access Denied');
$dos = array('copyright', 'close');
$do = in_array($do, $dos) ? $do : 'copyright';
load()->model('setting');
load()->func('tpl');
$settings = setting_load('copyright');
$settings = $settings['copyright'];
if (empty($settings) || !is_array($settings)) {
$settings = array();
}
if ($do == 'copyright') {
$_W['page']['title'] = '站点信息设置 - 系统管理';
if (checksubmit('submit')) {
$data = array('sitename' => $_GPC['sitename'], 'url' => strexists($_GPC['url'], 'http://') ? $_GPC['url'] : "http://{$_GPC['url']}", 'statcode' => htmlspecialchars_decode($_GPC['statcode']), 'footerleft' => htmlspecialchars_decode($_GPC['footerleft']), 'footerright' => htmlspecialchars_decode($_GPC['footerright']), 'flogo' => $_GPC['flogo'], 'blogo' => $_GPC['flogo'], 'baidumap' => $_GPC['baidumap'], 'address' => $_GPC['address'], 'phone' => $_GPC['phone'], 'qq' => $_GPC['qq'], 'email' => $_GPC['email'], 'keywords' => $_GPC['keywords'], 'description' => $_GPC['description']);
setting_save($data, 'copyright');
message('更新设置成功!', url('system/site'));
}
}
if ($do == 'close') {
$_W['page']['title'] = '站点信息设置 - 关闭站点';
if (checksubmit('submit')) {
$close['status'] = $_GPC['status'];
$close['reason'] = $_GPC['reason'];
setting_save($close, 'close');
message('站点状态更新成功!', url('system/site/close'));
}
$settings = setting_load('close');
}
template('system/site');
开发者ID:ruige123456,项目名称:dataMining,代码行数:31,代码来源:site.ctrl.php
示例14: defined
<?php
/**
* 站点相关操作
* [Weizan System] Copyright (c) 2013 012WZ.COM
*/
defined('IN_IA') or exit('Access Denied');
$dos = array('copyright');
$do = in_array($do, $dos) ? $do : 'copyright';
load()->model('setting');
load()->func('tpl');
$settings = setting_load('copyright');
$settings = $settings['copyright'];
if (empty($settings) || !is_array($settings)) {
$settings = array();
}
if ($do == 'copyright') {
$_W['page']['title'] = '站点信息设置 - 系统管理';
if (checksubmit('submit')) {
$data = array('status' => $_GPC['status'], 'reason' => $_GPC['reason'], 'sitename' => $_GPC['sitename'], 'url' => strexists($_GPC['url'], 'http://') ? $_GPC['url'] : "http://{$_GPC['url']}", 'statcode' => htmlspecialchars_decode($_GPC['statcode']), 'footerleft' => htmlspecialchars_decode($_GPC['footerleft']), 'footerright' => htmlspecialchars_decode($_GPC['footerright']), 'icon' => $_GPC['icon'], 'flogo' => $_GPC['flogo'], 'blogo' => $_GPC['blogo'], 'baidumap' => $_GPC['baidumap'], 'company' => $_GPC['company'], 'address' => $_GPC['address'], 'person' => $_GPC['person'], 'phone' => $_GPC['phone'], 'qq' => $_GPC['qq'], 'email' => $_GPC['email'], 'keywords' => $_GPC['keywords'], 'description' => $_GPC['description'], 'showhomepage' => intval($_GPC['showhomepage']));
setting_save($data, 'copyright');
message('更新设置成功!', url('system/site'));
}
}
template('system/site');
开发者ID:eduNeusoft,项目名称:weixin,代码行数:25,代码来源:site.ctrl.php
示例15: defined
defined('IN_IA') or exit('Access Denied');
$dos = array('addons');
$do = in_array($do, $dos) ? $do : 'addons';
load()->model('setting');
load()->func('tpl');
$settings = setting_load('addons');
$settings = $settings['addons'];
if (empty($settings) || !is_array($settings)) {
$settings = array();
}
if ($do == 'addons') {
$_W['page']['title'] = '云服务 - 管理应用商城 - 切换应用商城';
if (checksubmit('submit')) {
if ($_GPC['addons_site'] == 0) {
$addons_url = 'http://addons.weizancms.com';
$c_url = 'http://www.012wz.com';
} elseif ($_GPC['addons_site'] == 1) {
$addons_url = 'http://wdl.weizancms.com';
$c_url = 'http://www.wdlcms.com';
} elseif ($_GPC['addons_site'] == 2) {
$addons_url = 'http://addons.we7cms.cn';
$c_url = 'http://www.012wz.com';
} else {
$addons_url = $_GPC['addons_url'];
}
$data = array('addons_site' => $_GPC['addons_site'], 'addons_url' => $addons_url, 'c_url' => $c_url);
setting_save($data, 'addons');
message('更新设置成功!', 'refresh');
}
}
template('cloud/addons');
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:addons.ctrl.php
示例16: message
message('请设置音频视频上传支持的文件大小, 单位 KB.');
}
if (!empty($upload['audio']['extentions'])) {
$upload['audio']['extentions'] = explode("\n", $upload['audio']['extentions']);
foreach ($upload['audio']['extentions'] as $key => &$row) {
$row = trim($row);
if (in_array($row, $harmtype)) {
unset($upload['audio']['extentions'][$key]);
continue;
}
}
}
if (!is_array($upload['audio']['extentions']) || count($upload['audio']['extentions']) < 1) {
message('请添加支持的音频视频附件后缀类型');
}
setting_save($upload, 'upload');
message('更新设置成功!', url('system/attachment'));
}
$post_max_size = ini_get('post_max_size');
$upload_max_filesize = ini_get('upload_max_filesize');
$upload = setting_load('upload');
$upload = empty($upload['upload']) ? $_W['config']['upload'] : $upload['upload'];
$upload['image']['thumb'] = empty($upload['image']['thumb']) ? 0 : 1;
$upload['image']['width'] = intval($upload['image']['width']);
if (empty($upload['image']['width'])) {
$upload['image']['width'] = 800;
}
if (!empty($upload['image']['extentions']) && is_array($upload['image']['extentions'])) {
$upload['image']['extentions'] = implode("\n", $upload['image']['extentions']);
}
if (!empty($upload['audio']['extentions']) && is_array($upload['audio']['extentions'])) {
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:attachment.ctrl.php
示例17: file_delete
file_delete($_GPC['flogo_old']);
$upload = file_upload($_FILES['flogo']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['flogo'] = $upload['path'];
}
if (!empty($_FILES['blogo']['tmp_name'])) {
file_delete($_GPC['blogo_old']);
$upload = file_upload($_FILES['blogo']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['blogo'] = $upload['path'];
}
setting_save($data, 'copyright');
message('更新设置成功!', create_url('setting/copyright'));
}
if (checksubmit('fileupload-flogo-delete')) {
file_delete($_GPC['fileupload-flogo-delete']);
$settings['flogo'] = '';
setting_save($settings, 'copyright');
message('删除成功!', referer(), 'success');
}
if (checksubmit('fileupload-blogo-delete')) {
file_delete($_GPC['fileupload-blogo-delete']);
$settings['blogo'] = '';
setting_save($settings, 'copyright');
message('删除成功!', referer(), 'success');
}
template('setting/copyright');
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:copyright.ctrl.php
示例18: array
*/
$_W['page']['title'] = '云服务诊断 - 云服务';
$dos = array('display', 'testapi');
$do = in_array($do, $dos) ? $do : 'display';
if ($do == 'testapi') {
load()->model('cloud');
$starttime = microtime(true);
$response = cloud_request('http://v2.addons.we7.cc');
$endtime = microtime(true);
message('请求接口成功,耗时 ' . round($endtime - $starttime, 5) . ' 秒', '', 'ajax');
} else {
if (checksubmit()) {
load()->model('setting');
setting_save('', 'site');
message('成功清除站点记录.', 'refresh');
}
if (checksubmit('updateserverip')) {
load()->model('setting');
if (!empty($_GPC['ip'])) {
setting_save($_GPC['ip'], 'cloudip');
} else {
setting_save('', 'cloudip');
}
message('修改云服务ip成功.', 'refresh');
}
setting_load(array('site', 'cloudip'));
if (empty($_W['setting']['site'])) {
$_W['setting']['site'] = array();
}
template('cloud/diagnose');
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:diagnose.ctrl.php
示例19: load
load()->model('cloud');
load()->func('communication');
$r = cloud_prepare();
if (is_error($r)) {
message($r['message'], url('cloud/profile'), 'error');
}
$dos = array('upgrade');
$do = in_array($do, $dos) ? $do : 'upgrade';
if ($do == 'upgrade') {
$_W['page']['title'] = '一键更新 - 云服务';
if (empty($_W['setting']['cloudip']) || $_W['setting']['cloudip']['expire'] < TIMESTAMP) {
$cloudip = gethostbyname('v2.addons.we7.cc');
if (empty($cloudip) || !preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $cloudip)) {
message('云服务域名解析失败,请查看服务器DNS设置或是在“云服务诊断”中手动设置云服务IP', url('cloud/diagnose'), 'error');
}
setting_save(array('ip' => $cloudip, 'expire' => TIMESTAMP + 201600), 'cloudip');
}
if (checksubmit('submit')) {
$upgrade = cloud_build();
if (is_error($upgrade)) {
message($upgrade['message'], '', 'error');
}
if ($upgrade['upgrade']) {
message("检测到新版本: <strong>{$upgrade['version']} (Release {$upgrade['release']})</strong>, 请立即更新.", 'refresh');
} else {
cache_delete('checkupgrade:system');
message('检查结果: 恭喜, 你的程序已经是最新版本. ', 'refresh');
}
}
cache_load('upgrade');
if (!empty($_W['cache']['upgrade'])) {
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:upgrade.ctrl.php
示例20: message
break;
case '1':
message('购买模块升级版本成功,系统将直接跳转至升级界面。', url('cloud/process', array('m' => $auth['name'], 'is_upgrade' => 1, 'is_buy' => 1)), 'success');
exit;
break;
}
message($response['message']['message']);
}
if ($do == 'callback') {
$secret = $_GPC['token'];
if (strlen($secret) == 32) {
$cache = cache_read('cloud:auth:transfer');
cache_delete('cloud:auth:transfer');
if (!empty($cache) && $cache['secret'] == $secret) {
$site = array_elements(array('key', 'token'), $cache);
setting_save($site, 'site');
$auth['key'] = $site['key'];
$auth['password'] = md5($site['key'] . $site['token']);
$auth['forward'] = 'profile';
header('location: ' . __to($auth));
exit;
}
}
message('访问错误.');
}
template('cloud/frame');
function __to($auth)
{
global $authurl;
$query = base64_encode(json_encode($auth));
return $authurl . '&__auth=' . $query;
开发者ID:nsoff,项目名称:wdlcms,代码行数:31,代码来源:redirect.ctrl.php
注:本文中的setting_save函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论