资源简介
基于thinkphp开发的简单的教学管理系统,简单易学的PHP代码
代码片段和文件信息
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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 35 2017-09-08 13:39 education\edu\.gitignore
文件 281 2017-11-24 02:53 education\edu\.idea\edu.iml
文件 258 2017-11-24 02:53 education\edu\.idea\modules.xm
文件 296 2018-06-12 15:42 education\edu\.idea\php.xm
文件 60053 2018-06-13 15:26 education\edu\.idea\workspace.xm
文件 2038 2017-09-08 13:39 education\edu\.travis.yml
文件 13 2017-09-08 13:39 education\edu\application\.htaccess
文件 606 2017-09-08 13:39 education\edu\application\command.php
文件 616 2017-09-08 13:39 education\edu\application\common.php
文件 8789 2018-06-12 19:19 education\edu\application\config.php
文件 1909 2017-11-24 08:33 education\edu\application\databa
文件 636 2017-09-08 13:43 education\edu\application\extra\queue.php
文件 95 2018-06-13 15:26 education\edu\application\index\config.php
文件 703 2017-11-25 04:17 education\edu\application\index\controller\ba
文件 3863 2018-06-13 10:33 education\edu\application\index\controller\Grade.php
文件 256 2018-06-12 18:57 education\edu\application\index\controller\Index.php
文件 3813 2017-12-05 09:21 education\edu\application\index\controller\Student.php
文件 4146 2017-12-04 13:53 education\edu\application\index\controller\Teacher.php
文件 6895 2018-06-12 20:00 education\edu\application\index\controller\User.php
文件 1203 2017-12-02 19:34 education\edu\application\index\model\Grade.php
文件 1003 2017-12-02 10:35 education\edu\application\index\model\Student.php
文件 1212 2017-12-02 10:37 education\edu\application\index\model\Teacher.php
文件 1893 2017-11-26 08:54 education\edu\application\index\model\User.php
文件 3582 2017-12-03 00:32 education\edu\application\index\view\grade\grade_add.html
文件 4284 2017-12-03 11:36 education\edu\application\index\view\grade\grade_edit.html
文件 8042 2017-12-03 23:11 education\edu\application\index\view\grade\grade_list.html
文件 2274 2017-11-26 03:24 education\edu\application\index\view\index\index.html
文件 413 2017-11-25 05:10 education\edu\application\index\view\public\ba
文件 696 2017-11-24 06:05 education\edu\application\index\view\public\footer.html
文件 3635 2017-11-26 11:30 education\edu\application\index\view\public\header.html
............此处省略3215个文件信息
- 上一篇:php毕业设计文档+源码.rar
- 下一篇:青春旅行社源码-某宝买的
相关资源
- php毕业设计文档+源码.rar
- php实现电子商务网站
- PHP面向对象 基础知识点汇总代码+知识
- php订餐网站源代码
- php-5.2.9-1-Win32.zip
- php 举牌小人 源码
- phpAdmin4.0.10
- 细说PHP(第2版) - 高洛峰.mobi
- Sorry.NET PHP在线生成王境泽表情
- 斯芬克斯全中文搜索引擎加自动分词
- 快捷网上订餐系统php
- php-5.2.1-Win32
- 韩顺平.php从入门到精通笔记- 完整版
- 热搜视频解析,VIP视频解析网站源码
- php高仿赶集网58同城源码v3.2
- 基于Yii 框架开发的博客.zip
- php问答系统-ask2问答 问答系统源码
- PHP Tools for VS 2013(永久免费最新版)
- PHP+MySQL动态网站开发 源码66768
- phpdisk_Z-Core_v4.5 网赚运营版 破解版
- 基于php+mysql+Apache的学生成绩管理系统
- phpMyAdmin-4.3.6-all-languages.zip
- php微信吸粉源码生成个性标签
- php在线选课系统含学生教师操作手册
- php调用webservice及myeclipse创建webservic
-
Phpcmsv9.3.6ba
seUE4Fix.zip - PHPDiskZ-Core Advanced Edition v4.5 无域名限
- php+mysql+smarty仿淘宝商城源码
- PHP工具箱配置和
- php 简单的商城。
评论
共有 条评论