• 大小: 11.04MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-07-29
  • 语言: PHP
  • 标签: thinkphp  

资源简介

之前根据网上教程做的教学管理系统,这个修改过些内容,可能在下载后需要调整些,文章地址:https://blog.csdn.net/dhywjx/article/details/80712939

资源截图

代码片段和文件信息

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  2018-06-11 10:11  edu\
     文件          35  2017-09-08 13:39  edu\.gitignore
     目录           0  2018-06-13 15:26  edu\.idea\
     文件         281  2017-11-24 02:53  edu\.idea\edu.iml
     文件         258  2017-11-24 02:53  edu\.idea\modules.xml
     文件         296  2018-06-12 15:42  edu\.idea\php.xml
     文件       60053  2018-06-13 15:26  edu\.idea\workspace.xml
     文件        2038  2017-09-08 13:39  edu\.travis.yml
     文件        1822  2017-09-08 13:39  edu\LICENSE.txt
     文件        5775  2017-09-08 13:39  edu\README.md
     目录           0  2018-06-12 19:19  edu\application\
     文件          13  2017-09-08 13:39  edu\application\.htaccess
     文件         606  2017-09-08 13:39  edu\application\command.php
     文件         616  2017-09-08 13:39  edu\application\common.php
     文件        8789  2018-06-12 19:19  edu\application\config.php
     文件        1909  2017-11-24 08:33  edu\application\database.php
     目录           0  2017-11-24 02:39  edu\application\extra\
     文件         636  2017-09-08 13:43  edu\application\extra\queue.php
     目录           0  2018-06-13 15:26  edu\application\index\
     文件          95  2018-06-13 15:26  edu\application\index\config.php
     目录           0  2018-06-13 10:33  edu\application\index\controller\
     文件         703  2017-11-25 04:17  edu\application\index\controller\base.php
     文件        3863  2018-06-13 10:33  edu\application\index\controller\Grade.php
     文件         256  2018-06-12 18:57  edu\application\index\controller\Index.php
     文件        3813  2017-12-05 09:21  edu\application\index\controller\Student.php
     文件        4146  2017-12-04 13:53  edu\application\index\controller\Teacher.php
     文件        6895  2018-06-12 20:00  edu\application\index\controller\User.php
     目录           0  2017-12-02 19:34  edu\application\index\model\
     文件        1203  2017-12-02 19:34  edu\application\index\model\Grade.php
     文件        1003  2017-12-02 10:35  edu\application\index\model\Student.php
     文件        1212  2017-12-02 10:37  edu\application\index\model\Teacher.php
............此处省略3210个文件信息

评论

共有 条评论