📄 _left__jsp.java
字号:
/*
* JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
*/
package _jsp._news;
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 _left__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);
String userid,passwd;
boolean isUser;
// \u4ecesession\u4e2d\u53d6\u7528\u6237\u540d\u548c\u5bc6\u7801
userid = (String)session.getValue("user_id");
passwd = (String)session.getValue("passwd");
// \u5982\u679c\u4e3a\u7a7a\u5219isUser = false
if(userid==null ||passwd==null)
isUser = false;
else{
if(IsUser(userid,passwd))
isUser = true;
else
isUser = false;
}
try{
//\u5982\u679c\u662f\u7ba1\u7406\u5458\uff0c\u5219\u53ef\u4ee5\u8bbe\u7f6e\u7528\u6237\u4fe1\u606f\uff0c\u5982\u679c\u662f\u5176\u4ed6\u7528\u6237\u5219\u53ef\u4ee5\u66f4\u6539\u81ea\u5df1\u7684\u5bc6\u7801
// \u5b9a\u4e49\u7528\u6237\u5bf9\u8c61
Vector v_Cate;
Categories o_Cate = new Categories();
o_Cate.setCateId(0);
o_Cate.setCateTitle("");
v_Cate = o_Cate.getMoreCategories();
int num = v_Cate.size();
for(int i=0;i<num;i++)
{
o_Cate = (Categories)v_Cate.elementAt(i);
out.write(_jsp_string2, 0, _jsp_string2.length);
out.print((o_Cate.getCateId()));
out.write(_jsp_string3, 0, _jsp_string3.length);
out.print((o_Cate.getCateTitle()));
out.write(_jsp_string4, 0, _jsp_string4.length);
}
out.write(_jsp_string5, 0, _jsp_string5.length);
// \u5982\u679c\u662f\u7cfb\u7edf\u7528\u6237\uff0c\u5219\u663e\u793a\u7ba1\u7406\u7c7b\u76ee
if(isUser){
out.write(_jsp_string6, 0, _jsp_string6.length);
// \u5224\u65ad\u7528\u6237\u7c7b\u578b\uff0c\u5982\u679c\u662f\u7ba1\u7406\u5458\uff0c\u5219\u663e\u793a\u7c7b\u522b\u7ba1\u7406,2-\u8868\u793a\u4e3a\u7cfb\u7edf\u7ba1\u7406\u5458
if(getType(userid)==2){
out.write(_jsp_string7, 0, _jsp_string7.length);
}
out.write(_jsp_string8, 0, _jsp_string8.length);
// \u5224\u65ad\u7528\u6237\u7c7b\u578b\uff0c\u5982\u679c\u662f\u7ba1\u7406\u5458\uff0c\u5219\u663e\u793a\u7528\u6237\u7ba1\u7406,2-\u8868\u793a\u4e3a\u7cfb\u7edf\u7ba1\u7406\u5458
if(getType(userid)==2){
out.write(_jsp_string9, 0, _jsp_string9.length);
}
out.write(_jsp_string10, 0, _jsp_string10.length);
}else{
out.write(_jsp_string11, 0, _jsp_string11.length);
}
}catch(Exception e){e.printStackTrace();}
out.write(_jsp_string12, 0, _jsp_string12.length);
} 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/left.jsp"), -2859236435866121387L, 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_string7;
private final static char []_jsp_string1;
private final static char []_jsp_string2;
private final static char []_jsp_string8;
private final static char []_jsp_string0;
private final static char []_jsp_string12;
private final static char []_jsp_string5;
private final static char []_jsp_string3;
private final static char []_jsp_string4;
private final static char []_jsp_string11;
private final static char []_jsp_string6;
private final static char []_jsp_string9;
private final static char []_jsp_string10;
static {
_jsp_string7 = "\r\n<tr><td align=\"center\"><a href=\"admin/cateAdmin.jsp\" target=\"main\" style=\"text-decoration: none\">\u7c7b\u522b\u7ba1\u7406</a></td></tr>\r\n".toCharArray();
_jsp_string1 = "\r\n<html>\r\n<head>\r\n<link rel=\"stylesheet\" href=\"style.css\">\r\n</head>\r\n<body>\r\n<table border=\"0\" width=\"50%\">\r\n".toCharArray();
_jsp_string2 = "\r\n<tr><td align=\"center\"><a href=\"NewsList.jsp?cid=".toCharArray();
_jsp_string8 = "\r\n\r\n<tr><td> </td></tr>\r\n<tr><td align=\"center\"><hr size=\"1\" color=\"#0000FF\"></td></tr>\r\n".toCharArray();
_jsp_string0 = " \r\n\r\n\r\n".toCharArray();
_jsp_string12 = "\r\n</table>\r\n</body>\r\n</html>".toCharArray();
_jsp_string5 = "\r\n<tr><td align=\"center\"><hr size=\"1\" color=\"#0000FF\"></td></tr>\r\n<tr><td align=\"center\"><a href=\"search.jsp\" target=\"main\" style=\"text-decoration: none\">\u65b0\u95fb\u67e5\u8be2</a></td></tr>\r\n".toCharArray();
_jsp_string3 = "\" target=\"main\" style=\"text-decoration: none\">".toCharArray();
_jsp_string4 = "</a></td></tr>\r\n".toCharArray();
_jsp_string11 = "\r\n<tr><td align=\"center\"><hr size=\"1\" color=\"#0000FF\"></td></tr>\r\n<tr><td align=\"center\"><a href=\"Login.htm\" target=\"main\" style=\"text-decoration: none\">\u7cfb\u7edf\u767b\u5f55</a></td></tr>\r\n".toCharArray();
_jsp_string6 = "\r\n<tr><td> </td></tr>\r\n<tr><td align=\"center\"><hr size=\"1\" color=\"#0000FF\"></td></tr>\r\n<tr><td align=\"center\"><a href=\"admin/NewsAdmin.jsp\" target=\"main\" style=\"text-decoration: none\">\u65b0\u95fb\u7ba1\u7406</a></td></tr>\r\n".toCharArray();
_jsp_string9 = "\r\n<tr><td align=\"center\"><a href=\"admin/userList.jsp\" target=\"main\" style=\"text-decoration: none\">\u7528\u6237\u7ba1\u7406</a></td></tr>\r\n".toCharArray();
_jsp_string10 = "\r\n<tr><td align=\"center\"><a href=\"admin/userChgpwd.jsp\" target=\"main\" style=\"text-decoration: none\">\u66f4\u6539\u5bc6\u7801</a></td></tr>\r\n<tr><td> </td></tr>\r\n<tr><td align=\"center\"><a href=\"LoginExit.jsp\" target=\"main\" style=\"text-decoration: none\">\u9000\u51fa\u767b\u5f55</a></td></tr>\r\n".toCharArray();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -