• 大小: 10.44MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-10
  • 语言: PHP
  • 标签: PHP  

资源简介

基于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.xml

     文件        296  2018-06-12 15:42  education\edu\.idea\php.xml

     文件      60053  2018-06-13 15:26  education\edu\.idea\workspace.xml

     文件       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\database.php

     文件        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\base.php

     文件       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\base.html

     文件        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个文件信息

评论

共有 条评论