From 2e53366717ad57da1a9dd6dc71a69c078961ad74 Mon Sep 17 00:00:00 2001
From: colly_wyx <wangyixiong_007@163.com>
Date: Thu, 10 Aug 2017 17:21:37 +0800
Subject: [PATCH] 新闻模块,平台首页
---
application/modules/Public/controllers/User.php | 64 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/application/modules/Public/controllers/User.php b/application/modules/Public/controllers/User.php
index a545807..aca388a 100644
--- a/application/modules/Public/controllers/User.php
+++ b/application/modules/Public/controllers/User.php
@@ -40,6 +40,70 @@
$this->redirect('/user_login.html');
}
+ /**
+ * ������
+ */
+ public function UploadAction(){
+ //header('Access-Control-Allow-Origin: http://www.baidu.com'); //������http://www.baidu.com������������������
+ //header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With'); //���������������������header
+ date_default_timezone_set("Asia/Shanghai");
+ error_reporting(E_ERROR);
+ header("Content-Type: text/html; charset=utf-8");
+
+ $CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents("themes/ueditor/php/config.json")), true);
+ $action = $this->get('action');
+ switch ($action) {
+ case 'config':
+ $result = json_encode($CONFIG);
+ break;
+
+ /* ������������ */
+ case 'uploadimage':
+ /* ������������ */
+ case 'uploadscrawl':
+ /* ������������ */
+ case 'uploadvideo':
+ /* ������������ */
+ case 'uploadfile':
+ $result = include("themes/ueditor/php/action_upload.php");
+ break;
+
+ /* ������������ */
+ case 'listimage':
+ $result = include("themes/ueditor/php/action_list.php");
+ break;
+ /* ������������ */
+ case 'listfile':
+ $result = include("themes/ueditor/php/action_list.php");
+ break;
+
+ /* ������������������ */
+ case 'catchimage':
+ $result = include("themes/ueditor/php/action_crawler.php");
+ break;
+
+ default:
+ $result = json_encode(array(
+ 'state'=> '������������������'
+ ));
+ break;
+ }
+
+ /* ������������ */
+ if (isset($_GET["callback"])) {
+ if (preg_match("/^[\w_]+$/", $_GET["callback"])) {
+ echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')';
+ } else {
+ echo json_encode(array(
+ 'state'=> 'callback���������������'
+ ));
+ }
+ } else {
+ echo $result;
+ }
+ die();
+ }
+
}
--
Gitblit v1.8.0