public function __construct() { if (!WF_Auth::isLogin()) { $this->code = 403; $this->mess = '登陆已过期,请重新登陆'; $this->show(); } if (!WF_Auth::isAllow()) { $this->code = 403; $this->mess = 'Request api not auth'; $this->show(); } $act = 'on_' . WF_ACTION_NAME; if (!method_exists($this, $act)) { $this->code = 300; $this->mess = 'Request api not found'; $this->show(); } $this->FileFS = new WF_FileFS(); $this->init(); $this->{$act}(); }
<?php // +---------------------------------------------------------------------- // | Copyright (C) 2015 AdminSheng.Com // +---------------------------------------------------------------------- // | Author: 站长之声 // +---------------------------------------------------------------------- require './config.php'; if (!WF_Auth::isLogin()) { redirect('login.php?act=in'); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta name="renderer" content="webkit"> <title> 文件上传组件</title> <script src="static/js/jquery-1.7.2.min.js"></script> <script src="static/plupload/plupload.min.js"></script> <!-- <script src="static/plupload/plupload.js"></script> <script src="static/plupload/plupload.flash.js"></script> <script src="static/plupload/plupload.html4.js"></script> <script src="static/plupload/plupload.html5.js"></script> --> <link rel="stylesheet" href="static/plupload/jquery.plupload.queue/jquery.plupload.queue.css" /> <script src="static/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js"></script> <script src="static/js/webftp.core.js"></script>