⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _news_0upload__jsp.java

📁 设备管理系统
💻 JAVA
字号:
/*
 * JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
 */

package _jsp._news._admin;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.text.*;
import java.util.Date;
import java.util.*;
import java.lang.*;
import java.io.*;
import news.*;
import newscomm.*;

public class _news_0upload__jsp extends com.caucho.jsp.JavaPage
{
  private final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
  private boolean _caucho_isDead;

  

  	public final int MaxPerPage = 20;	//\u6bcf\u9875\u4fe1\u606f\u4e2a\u6570

  	public String IMG_SITE;

  	public String IMG_LABLE_F = "<P[space]align=center><IMG[space]SRC=";

  	public String IMG_LABLE_L = "></P><p>";

  	public String strBG1="#FFFFFF";

  	public String strBG2="#FEEC85";

  	public String strbg;

  

  //\u66ff\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u5b57\u7b26

  	public static String replaceString(String origStr, String oldStr, String newStr) {

         if (origStr == null || origStr.length() == 0 || oldStr == null ||

             oldStr.length() == 0 || newStr == null) {

             return origStr;

         }

         StringBuffer buffer = new StringBuffer();

         // find the oldStr's place in origStr

         while (origStr.indexOf(oldStr) != -1) {

             int index = origStr.indexOf(oldStr);

  		   buffer.append(origStr.substring(0, index));

  		   buffer.append(newStr);

  		   origStr = origStr.substring(index+oldStr.length());

       }

         buffer.append(origStr);

         return buffer.toString();

     }

  // \u5224\u65ad\u662f\u5426\u4e3a\u65b0\u4fe1\u606f

  	boolean isNew(String adate)

  	{

  		Calendar c=Calendar.getInstance();

  		SimpleDateFormat thismonth = new SimpleDateFormat("yyyy-MM-dd");

  		c.add(Calendar.DATE, -3);

  		String slastday=thismonth.format(c.getTime());

  			

  		if(slastday.compareTo(adate) <=0) return true;

  		else return false;

  	}

  

  	public String getName(String Userid)throws Exception

  	{

  	  try{

  		User o_user = new User();

  		o_user.setUserName(Userid);

  		if(o_user.getUser())

  		  {

  			return o_user.getEmpName();

  		  }

  	  }catch(Exception e)

          {System.out.println(e.toString());}

  	  return "";

  	}

  	// \u5224\u65ad\u7528\u6237\u662f\u5426\u5b58\u5728

  	public boolean IsUser(String userid,String passwd)throws Exception

  	{	

  		try{

  			if(userid.length()==0 || passwd.length()==0)

  				return false;

  			else{

  				// \u5b9a\u4e49\u7528\u6237\u5bf9\u8c61\uff0c\u8bbe\u7f6e\u5176\u7528\u6237\u540d\u548c\u5bc6\u7801

  				User o_user = new User();

  				o_user.setUserName(userid);

  				o_user.setUserPwd(passwd);

  				// \u5224\u65ad\u662f\u5426\u5b58\u5728\u6b64\u7528\u6237\u4fe1\u606f\uff0c\u5982\u679c\u5b58\u5728\u6b64\u7528\u6237\u5219\u8fd4\u56detrue

  				if(o_user.getUser())

  				{

  					return true;

  				}

  			}

  		}catch(Exception e){

  			e.printStackTrace();

  		}

  		return false;

  	}

  	// \u5224\u65ad\u7528\u6237\u7c7b\u578b

  	public int getType(String userid)throws Exception

  	{	

  		try{

  			if(userid.length()==0)

  				return 0;

  			else{

  				// \u5b9a\u4e49\u7528\u6237\u5bf9\u8c61\uff0c\u8bbe\u7f6e\u5176\u7528\u6237\u540d\u548c\u5bc6\u7801

  				User o_user = new User();

  				o_user.setUserName(userid);

  				// \u5224\u65ad\u662f\u5426\u5b58\u5728\u6b64\u7528\u6237\u4fe1\u606f\uff0c\u5982\u679c\u5b58\u5728\u6b64\u7528\u6237\u5219\u8fd4\u56detrue

  				if(o_user.getUser())

  					return o_user.getUserType();

  			}

  		}catch(Exception e){

  			e.printStackTrace();

  		}

  		return 0;

  	}

  

  


  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext = com.caucho.jsp.QJspFactory.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html;charset=gb2312");
    request.setCharacterEncoding("GB2312");
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      
IMG_SITE = "/servlet/news.ReadImage?ImgId=";

      out.write(_jsp_string1, 0, _jsp_string1.length);
      	// \u53d6\u5f97\u5f53\u524d\u7528\u6237\u540d
	String userId = (String)session.getValue("user_id");
	String pwd = (String)session.getValue("passwd");
// \u53ea\u6709\u7cfb\u7edf\u7528\u6237\u624d\u53ef\u4ee5\u6709\u6743\u9650
if(IsUser(userId,pwd))
{
	
      out.write(_jsp_string2, 0, _jsp_string2.length);
      }
else
	out.println("\u4f60\u6ca1\u6709\u6dfb\u52a0\u7684\u6743\u9650");		

    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      com.caucho.jsp.QJspFactory.freePageContext(pageContext);
    }
  }

  private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

  public java.util.ArrayList _caucho_getDependList()
  {
    return _caucho_depends;
  }

  public void _caucho_addDepend(com.caucho.vfs.PersistentDependency depend)
  {
    super._caucho_addDepend(depend);
    com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
  }

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;
    if (com.caucho.server.util.CauchoSystem.getVersionId() != 5022137076587403036L)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.vfs.Dependency depend;
      depend = (com.caucho.vfs.Dependency) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public java.util.HashMap<String,java.lang.reflect.Method> _caucho_getFunctionMap()
  {
    return _jsp_functionMap;
  }

  public void init(ServletConfig config)
    throws ServletException
  {
    super.init(config);
    com.caucho.server.webapp.WebApp webApp
      = (com.caucho.server.webapp.WebApp) config.getServletContext();
    com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
  }

  public void init(com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    com.caucho.loader.DynamicClassLoader loader;
    loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    mergePath.addClassPath(resourcePath);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("news/admin/news_upload.jsp"), 5002081712640344032L, false);
    com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
    depend = new com.caucho.vfs.Depend(appDir.lookup("news/admin/NewsComm.jsp"), 7147789067385854643L, false);
    com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
  }

  private final static char []_jsp_string2;
  private final static char []_jsp_string0;
  private final static char []_jsp_string1;
  static {
    _jsp_string2 = "\r\n<html>\r\n<head>\r\n<title></title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link rel=\"stylesheet\" href=\"../style.css\"></head>\r\n<body bgcolor=\"#FFFCD9\" leftmargin=\"0\" topmargin=\"0\">\r\n<form name=\"form1\" method=\"post\" action=\"news_upfile.jsp\" ENCTYPE=\"multipart/form-data\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" bordercolordark=\"#CCCCCC\" bordercolorlight=\"#000000\">\r\n<tr>\r\n<td width=\"100%\">\r\n<input type=\"file\" name=\"file1\" style=\"width:88%\" value=\"\">&nbsp;&nbsp;<input type=\"submit\" name=\"Submit\" value=\"\u63d0 \u4ea4\"></td>\r\n</tr>\r\n</table>\r\n</form>\r\n</body>\r\n</html>\r\n".toCharArray();
    _jsp_string0 = "    \r\n\r\n\r\n".toCharArray();
    _jsp_string1 = "\r\n".toCharArray();
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -