From 2c88c99afe3b6f68d9f74d68f7e02a62e2f2c32d Mon Sep 17 00:00:00 2001
From: colly_wyx <wangyixiong_007@163.com>
Date: Fri, 11 Aug 2017 13:56:01 +0800
Subject: [PATCH] 修改默认路口
---
application/modules/Public/controllers/User.php | 72 +++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 1 deletions(-)
diff --git a/application/modules/Public/controllers/User.php b/application/modules/Public/controllers/User.php
index a545807..6e941c0 100644
--- a/application/modules/Public/controllers/User.php
+++ b/application/modules/Public/controllers/User.php
@@ -28,7 +28,13 @@
else{
exit($this->showSuccess('������������', true));
}
- }
+ }
+ else{
+ $session = Yaf_Session::getInstance();
+ if(isset($session['user'])){
+ $this->redirect('/admin/index/index');
+ }
+ }
}
/**
@@ -40,6 +46,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