| | |
| | | * |
| | | * 软件声明:未经授权前提下,不得用于商业运营、二次开发以及任何形式的再次发布。 |
| | | */ |
| | | |
| | | class config_controller extends adminCommon{ |
| | | |
| | | /** |
| | | * 系统-网站设置 |
| | | */ |
| | | function index_action(){ |
| | | if (strpos($this->config['sy_weburl'], 'https') !== false) { |
| | | if (strpos($this->config['sy_weburl'], 'https') !== FALSE) { |
| | | |
| | | $this->config['mapurl'] = 'https://api.map.baidu.com/api?v=2.0&ak=' . $this->config['map_key'] . '&s=1'; |
| | | } else { |
| | |
| | | |
| | | // 保存 |
| | | function save_action(){ |
| | | // var_dump($_POST);exit; |
| | | if ($_POST['config']) { |
| | | |
| | | if ($_POST['config'] == 'uploadconfig'){ |
| | |
| | | unset($_POST['config']); |
| | | unset($_POST['pytoken']); |
| | | if (isset($_POST['map_key'])) { |
| | | if (strpos($this->config['sy_weburl'], 'https') !== false) { |
| | | if (strpos($this->config['sy_weburl'], 'https') !== FALSE) { |
| | | |
| | | $_POST['mapurl'] = 'https://api.map.baidu.com/api?v=2.0&ak=' . $_POST['map_key'] . '&s=1'; |
| | | } else { |
| | |
| | | } |
| | | if (!empty($_POST['sy_weburl'])) { |
| | | $weburl = trim($_POST['sy_weburl']); |
| | | if (stripos($weburl, 'http') === false){ |
| | | if (stripos($weburl, 'http') === FALSE) { |
| | | $this->layer_msg('网站地址缺少http://或https://', 8, 1, ''); |
| | | } |
| | | // 保存域名时,相关的内容要重新保存,防止域名或http头改变后,有关功能异常 |
| | |
| | | // 开启sphinx时,检查searchd是否运行,生成sphinx.conf配置文件 |
| | | function check_usesphinx_action(){ |
| | | include_once (LIB_PATH . "sphinx.class.php"); |
| | | $useSphinx = false; |
| | | $useSphinx = FALSE; |
| | | if (sphinx::isRun($this->config['sphinxhost'], $this->config['sphinxport'])) { |
| | | $useSphinx = true; |
| | | $useSphinx = TRUE; |
| | | } |
| | | |
| | | if ($useSphinx) { |
| | |
| | | echo '1'; |
| | | exit(); |
| | | } |
| | | |
| | | //后台专用,layui上传图片公共方法 |
| | | function layui_upload_action() |
| | | { |
| | | function layui_upload_action() { |
| | | |
| | | if($_FILES['file']['tmp_name']){ |
| | | |
| | |
| | | echo json_encode($return); |
| | | } |
| | | } |
| | | |
| | | ?> |