【JSP开源代码栏目提醒】:网学会员在JSP开源代码频道为大家收集整理了authorize.jsp提供大家参考,希望对大家有所帮助!
<%@ page contentType="text/html; charset=gb2312"%>
<%@ include file="verify.jsp" %>
<%@ include file="../share/connection.jsp" %>
<%
String name = (String)session.getAttribute("adminname");
if(!name.equals("admin"))
{
out.println("您没有此权限");
return;
}
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../jscss/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE width="80%" height=20
border=0 align="center" cellPadding=0 cellSpacing=0 background="../images/adminbg.gif" bgColor=#587dbc>
<TBODY>
<TR>
<TD><font color="#ffffff">
<div align="center"><strong><font color="#000000">批准用户</font></strong></div>
</font></TD>
</TR>
</TBODY>
</TABLE><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0"style="border:1px solid #003366">
<tr>
<td> <br>
<br>
<%
int flag=0;
String strSQL;
ResultSet rs;
String action=request.getParameter("action");
String actionArray[]={"list","authorize"};
for(int i=0;i<actionArray.length;i++)
{
if (action.equalsIgnoreCase(actionArray[i]))
{
flag=i;
break;
}
}
switch(flag)
{
case 0:
out.print("最近注册的用户:<br>");
strSQL="select * from cs_user where user_active=0";
rs=stm.executeQuery(strSQL);
while(rs.next())
{
out.print(rs.getString("user_truename")+"----"+rs.getString("user_email"));
%>
<a href="authorize.jsp?action=authorize&userid=<%=rs.getInt("user_id")%>">批准</a>
|||<a href="abandon.jsp?userid=<%=rs.getInt("user_id")%>">删除</a>
<%
out.print("<br>");
}
break;
case 1:
String userid=request.getParameter("userid");
strSQL="select * from cs_user where user_id="+userid;
rs=stm.executeQuery(strSQL);
rs.next();
out.print("用户名:"+rs.getString("user_loginname")+"<BR>");
out.print("email:"+rs.getString("user_email")+"<BR>");
out.print("电话:"+rs.getString("user_phone")+"<BR>");
%>
</td>
</tr>
</table>
<form action="saveauthor.jsp" method="post" name="authoruser" target="_self">
权限设置 <br>
<input name="view" type="checkbox" value="1">
阅读
<input type="checkbox" name="add" value="1">
添加
<input type="checkbox" name="edit" value="1">
修改
<input type="checkbox" name="del" value="1">
删除
<input type="checkbox" name="audit" value="1">
审核<br>
<input name="userid" type="hidden" value="<%=userid%>">
<input type="submit" name="Submit" value="确 认">
<input type="submit" name="Submit" value="取 消">
</form>
<%
break;
}// end of switch
%>
</body>
</html>
上一篇:
authorForm.jsp
下一篇:
浅析普外科围手术期抗菌药物的应用