📄 ud_user.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>淳.清凉花坊</title>
<meta name="keywords" content="淳.清凉花坊">
<meta name="description" content="淳.清凉花坊">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {
color: #660000;
font-family: "幼圆";
}
.style3 {
font-size: 14px;
font-family: "幼圆";
color: #660000;
}
.style6 {font-size: 12px}
.style8 {font-size: 12px; color: #006633; }
.style10 {font-size: 14px; color: #660033; }
.style11 {font-size: 14px}
.style12 {
font-size: 14;
color: #660000;
}
.style14 {font-size: 12px; color: #003300; }
.style15 {font-size: 14}
-->
</style>
<script language="javascript">
function chkform(form){
if (form.username.value == ""){
alert("请输入真实姓名!");
form.username.focus();
return false;
}
if (form.phone.value == 0){
alert("请输入电话!");
form.phone.focus();
return false;
}
return true;
}
</script>
</head>
<%! //处理字符串的常用方法
public String getString(String s) {
if(s == null) s = "";
try{
byte a[] = s.getBytes("ISO-8859-1");
s = new String(a);
}
catch(Exception e) {}
return s;
}
%>
<% //获取session值,以及防止非法访问本页面
String userid=request.getParameter("id");
userid=getString(userid);
%>
<%
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }
catch(ClassNotFoundException event) { }
try {
con=DriverManager.getConnection("jdbc:odbc:sun","sa","");
sql=con.createStatement();
rs =sql.executeQuery("select * from uuser where userid="+"'"+userid+"'");
while(rs.next())
{
String username=rs.getString("username");
String sex=rs.getString("sex");
String phone=rs.getString("phone");
String email=rs.getString("email");
String admin=rs.getString("admin");
%>
<body bgcolor="#FFFFFF" >
<table width="858" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
<table id="Table_06" width="100%" height="274" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="/images/6xiang_93.gif" width="11"></td>
<td height="300" colspan="3" align="center" valign="top">
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="819"><img src="images/_r3_c4.gif" width="85" height="86" align="absmiddle"> <span class="style1">您的位置:>> 花坊管理系统</span></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
<tr align="left" bgcolor="#ECE9D8">
<td height="30"><span class="style2"> 淳.清凉花坊感谢您今天的辛勤工作......</span></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bordercolor="#003333" bgcolor="#EEE6D2" class="tableall_shop">
<tr align="center" bgcolor="#EEE6D2">
<td height="25" colspan="2" class="sstitle style1"> </td>
</tr>
<tr bgcolor="#FAF8F1">
<td width="13%" height="360" align="left" bgcolor="#FAF8F1">
<p class="style3">会员管理</p>
<p class="style3"><a href="main.jsp">花坊首页</a></p>
<p class="style3"><a href="admin_user.jsp">管理员名单</a></p>
<p class="style3"><a href="add_user.jsp">添加管理员</a></p>
<p class="style3"><a href="admin_log.jsp">退出登陆</a></p></td>
<td width="87%" align="right" bgcolor="#FAF8F1">
<div align="center">
<table width="68%" border="1" cellspacing="1" cellpadding="1" bgcolor="#ECE9D8">
<form action="mod_ok.jsp" method="post" name="regForm" onSubmit="return chkform(this)" >
<tr align="center">
<td height="30" colspan="3" class="showbg_red" align="center"><b>
<font color="#800000"><span class="sstitle">更新管理员资料</span>(</font><font color="#FF0000">*</font><font color="#800000">为必填写)</font></b></td>
</tr>
<tr bgcolor="#F9F8F2">
<td width="20%" height="25" align="right">管理员ID:</td>
<td height="25" colspan="2"><%=userid%> </td>
</tr>
<tr bgcolor="#F9F8F2" class="sendarea">
<td height="25" align="right">姓 名:</td>
<td width="50%" height="25"><input name="username" type="text" class="input" value="<%=username%>">
<font color="#FF0000">*</font></td>
<td width="45%"><%=sex%></td> </tr>
<tr bgcolor="#F9F8F2">
<td height="25" align="right" class="sendarea">联系电话:</td>
<td height="25" colspan="2"><input name="phone" type="text" class="input" id="phone" value="<%=phone%>" ><font color="#FF0000"> *</font></td>
</tr>
<tr bgcolor="#F9F8F2">
<td height="25" align="right" class="sendarea">注册邮箱:</td>
<td height="25" colspan="2"><input name="email" type="text" class="input" id="email" value="<%=email%>" size="40"></td>
</tr>
<tr bgcolor="#F9F8F2" class="sendarea">
<td height="25" align="right">权限标志:</td>
<td height="25" colspan="2" bordercolor="#FFFFFF">
<input name="admin" type="radio" value="1" checked>
销售管理员
<input type="radio" name="admin" value="2">
鲜花管理员</td>
</tr>
<tr bgcolor="#F9F8F2">
<td height="25" colspan="3" align="center" bordercolor="#FFFFFF">
<INPUT TYPE="reset" name="reset" value="取消">
<input type="submit" name="submit" value="修改" onClick="return(checkform());">
</td>
</tr>
<input name="id" type="hidden" value="<%=userid%>">
</FORM>
</table>
<br>
<%
}
con.close();
}
catch(SQLException e) { }
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -