|
@@ -25,7 +25,6 @@ use session;
|
|
|
use Base;
|
|
|
use UnloginException;
|
|
|
use Exception;
|
|
|
-use merchantControl;
|
|
|
use errcode;
|
|
|
|
|
|
class MerchantServer extends BaseServer
|
|
@@ -59,28 +58,15 @@ class MerchantServer extends BaseServer
|
|
|
try
|
|
|
{
|
|
|
fcgi_header("Content-Type: text/html; charset=UTF-8");
|
|
|
+
|
|
|
if(file_exists($file))
|
|
|
{
|
|
|
- if($this->is_exclude($file)) {
|
|
|
- include $file;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(!isset($_GET['act'])) {
|
|
|
- $_GET['act'] = 'index';
|
|
|
- }
|
|
|
- if(!isset($_GET['op'])) {
|
|
|
- $_GET['op'] = 'index';
|
|
|
- }
|
|
|
- if(!isset($_POST['act'])) {
|
|
|
- $_POST['act'] = 'index';
|
|
|
- }
|
|
|
- if(!isset($_POST['op'])) {
|
|
|
- $_POST['op'] = 'index';
|
|
|
- }
|
|
|
-
|
|
|
- //部分控制器不需要使用session.
|
|
|
+ if ($this->isIndex($file)) {
|
|
|
Base::mobile_control();
|
|
|
+ } elseif ($this->is_exclude($file)) {
|
|
|
+ include $file;
|
|
|
+ } else {
|
|
|
+ echo "You cannot access this file.";
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -90,10 +76,10 @@ class MerchantServer extends BaseServer
|
|
|
}
|
|
|
}
|
|
|
catch (UnloginException $ex) {
|
|
|
- merchantControl::outerr(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin));
|
|
|
+ joutput_error(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin));
|
|
|
}
|
|
|
catch (Exception $ex) {
|
|
|
- merchantControl::outerr($ex->getCode(),$ex->getMessage());
|
|
|
+ joutput_error($ex->getCode(),$ex->getMessage());
|
|
|
Log::record("run_looper exception catch code={$ex->getCode()} msg={$ex->getMessage()} trace={$ex->getTraceAsString()}",Log::ERR);
|
|
|
}
|
|
|
session::instance()->end();
|