资源简介
tp5实战教学管理系统
默认管理员: peter 密码:123456 ,admin用户不得更名,密码可以修改。
代码片段和文件信息
package com.baidu.ueditor;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.baidu.ueditor.define.ActionMap;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.baseState;
import com.baidu.ueditor.define.State;
import com.baidu.ueditor.hunter.FileManager;
import com.baidu.ueditor.hunter.ImageHunter;
import com.baidu.ueditor.upload.Uploader;
public class ActionEnter {
private HttpServletRequest request = null;
private String rootPath = null;
private String contextPath = null;
private String actionType = null;
private ConfigManager configManager = null;
public ActionEnter ( HttpServletRequest request String rootPath ) {
this.request = request;
this.rootPath = rootPath;
this.actionType = request.getParameter( “action“ );
this.contextPath = request.getContextPath();
this.configManager = ConfigManager.getInstance( this.rootPath this.contextPath request.getRequestURI() );
}
public String exec () {
String callbackName = this.request.getParameter(“callback“);
if ( callbackName != null ) {
if ( !validCallbackName( callbackName ) ) {
return new baseState( false AppInfo.ILLEGAL ).toJSONString();
}
return callbackName+“(“+this.invoke()+“);“;
} else {
return this.invoke();
}
}
public String invoke() {
if ( actionType == null || !ActionMap.mapping.containsKey( actionType ) ) {
return new baseState( false AppInfo.INVALID_ACTION ).toJSONString();
}
if ( this.configManager == null || !this.configManager.valid() ) {
return new baseState( false AppInfo.CONFIG_ERROR ).toJSONString();
}
State state = null;
int actionCode = ActionMap.getType( this.actionType );
Mapject> conf = null;
switch ( actionCode ) {
case ActionMap.CONFIG:
return this.configManager.getAllConfig().toString();
case ActionMap.UPLOAD_IMAGE:
case ActionMap.UPLOAD_SCRAWL:
case ActionMap.UPLOAD_VIDEO:
case ActionMap.UPLOAD_FILE:
conf = this.configManager.getConfig( actionCode );
state = new Uploader( request conf ).doExec();
break;
case ActionMap.CATCH_IMAGE:
conf = configManager.getConfig( actionCode );
String[] list = this.request.getParameterValues( (String)conf.get( “fieldName“ ) );
state = new ImageHunter( conf ).capture( list );
break;
case ActionMap.LIST_IMAGE:
case ActionMap.LIST_FILE:
conf = configManager.getConfig( actionCode );
int start = this.getStartIndex();
state = new FileManager( conf ).listFile( start );
break;
}
return state.toJSONString();
}
public int getStartIndex () {
String start = this.request.getParameter( “start“ );
try {
return Integer.parseInt( start );
} catch ( Exception e ) {
return 0;
}
}
/**
* callback参数验证
*/
public boolean valid
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-08-04 23:41 application\
文件 6148 2017-08-04 21:42 application\.DS_Store
目录 0 2017-08-11 09:39 __MACOSX\
目录 0 2017-08-11 09:39 __MACOSX\application\
文件 120 2017-08-04 21:42 __MACOSX\application\._.DS_Store
文件 13 2017-07-04 11:52 application\.htaccess
文件 618 2017-07-04 11:52 application\command.php
文件 628 2017-07-04 11:52 application\common.php
文件 9032 2017-08-04 16:38 application\config.php
文件 1958 2017-08-04 23:41 application\databa
目录 0 2017-01-23 22:03 application\extra\
文件 635 2017-01-23 22:03 application\extra\queue.php
目录 0 2017-08-04 23:01 application\index\
文件 6148 2017-08-04 21:42 application\index\.DS_Store
目录 0 2017-08-11 09:39 __MACOSX\application\index\
文件 120 2017-08-04 21:42 __MACOSX\application\index\._.DS_Store
目录 0 2017-08-10 12:44 application\index\controller\
文件 784 2017-08-05 00:33 application\index\controller\ba
文件 4617 2017-08-10 11:19 application\index\controller\Grade.php
文件 703 2017-08-09 09:11 application\index\controller\Index.php
文件 4076 2017-08-10 09:19 application\index\controller\Student.php
文件 4843 2017-08-10 11:50 application\index\controller\Teacher.php
文件 7934 2017-08-10 12:44 application\index\controller\User.php
目录 0 2017-08-10 10:07 application\index\model\
文件 874 2017-08-10 10:07 application\index\model\Grade.php
文件 878 2017-08-09 22:18 application\index\model\Student.php
文件 1085 2017-08-09 17:45 application\index\model\Teacher.php
文件 1784 2017-08-08 11:25 application\index\model\User.php
目录 0 2017-08-04 17:54 application\index\validate\
文件 213 2017-08-04 18:01 application\index\validate\User.php
目录 0 2017-08-09 21:53 application\index\view\
............此处省略3453个文件信息
- 上一篇:CNC_Grbl教程
- 下一篇:windows程序设计——代码工程
评论
共有 条评论