<%@ page contentType="text/html; charset=gb2312" %> <%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="com.icxo.txthtml.DoText"%> <%@page import="com.bi.user.userBean"%> <% /***********************判断用户是否有读取该文章的权限***********************/ //获取文章的读取所需权限 0:任意 1:需注册 3:VIP seenews.view(); int newsStatus = seenews.getOwner(); //获取当前用户身份(如无session 则为0;普通用户为1;VIP用户为 3) int userStatus = 0; userBean usi = (userBean) session.getAttribute("suser"); if(usi == null || usi.getUsername() == null){ userStatus = 0; }else{ if (usi.getUsergrade().equals("1")) userStatus = 1; if (usi.getUsergrade().equals("2")) userStatus = 3; } //当前文章需要用户登录之后查阅 if ((newsStatus ==1) && (userStatus < 1) ) response.sendRedirect("/notlogin-read.jsp?newsid="+seenews.getNewsid()); //当前文章需要用户为VIP才可查看 if ((newsStatus ==3) && (userStatus != 3) ) response.sendRedirect("/popedom-read.jsp?newsid="+seenews.getNewsid()); /***********************判断用户是否有读取该文章的权限***********************/ DoText dt=new DoText(); response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cache"); response.setDateHeader("Expires", 0); %> <%=seenews.getTitle()%>-世界经理人情报-http://bi.icxo.com