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

📄 admin.jsp

📁 JSP+ORACLE网站开发实例(下).rar
💻 JSP
字号:
<%@ include file="conn.jsp"%>
<%! 
String replacenull(String a){ 
	if(a==null){
return "&nbsp;"; 
	}else{
return a; 
	}
} 
%> 
<%request.setCharacterEncoding("GB2312");
String admin_pass1="ok";
if(!admin_pass1.equals(session.getValue("admin_pass")))
{  
response.sendRedirect("adminlogin.jsp"); 
}

String px =request.getParameter("px");
if(px==null){
	 px="j_date";
}
String search_txt =request.getParameter("search_txt");
String sql="select user_id,netname,sex,netcall,britherday,ip,renqi,home,date1,photo from scott.larchives"; 
if(search_txt!=null){
sql=sql + " where netname like '%" + search_txt + "%'";
	sql=sql + " or sex like '%" + search_txt + "%'";
	sql=sql + " or netcall like '%" + search_txt + "%'";
	sql=sql + " or britherday like '%" + search_txt + "%'";
	sql=sql + " or ip like '%" + search_txt + "%'";
	sql=sql + " or renqi like '" + search_txt + "'";
	sql=sql + " or date1 like '%" + search_txt + "%' ";

}
sql=sql + " order by lar_id desc";
ResultSet rs_lar=stmt.executeQuery(sql); 

%>
<html>
<head>
<style>
<!--
-->
</style>
<meta name="generator" content="Namo WebEditor v4.0(Trial)">
<link rel="stylesheet" href="ysb.css">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body topmargin="0" leftmargin="5" onLoad="MM_openBrWindow(','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=450')">
<table width="772" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/top.gif" width="772" height="112" usemap="#Map" border="0"></td>
  </tr>
</table>
<table border="0" width="772">
  <tr>
    <td width="578" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
      <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFCCCC">
        <tr> 
          <td style="border-bottom-style: solid" width="88" height="19" align="center"><a href="default.jsp">交友首页</a></td>
          <td style="border-bottom-style: solid" width="41" height="19" align="center">&nbsp;</td>
          <td style="border-bottom-style: solid" width="150" height="19" align="center"><a href="default.jsp" class="x"><b>退出管理</b></a></td>
          <td style="border-bottom-style: solid" width="315" height="19">&nbsp;</td>
          <td style="border-bottom-style: solid" width="155" height="19">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td width="578" align="center" style="border-bottom-style: solid; border-bottom-width: 1"> 
      <p align="left"> <font size="2"><i>
	 <%if(search_txt!=null){ %>
	  以下是包含关键字<font color="#ff0000"><%=search_txt%></font>的所有网友
	  <%}else{%>
	  以下是所有网友的列表<%}%></font> 
      </p>
    </td>
  </tr>
  <tr> 
    <td width="578">&nbsp; </td>
  </tr>
  <tr>  </tr>
</table>  
  <form name="form1">  
    
  <table border="0" width="772" cellspacing="0">
    <tr>  
        
      <td width="87" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">网名</font></td>  
        
      <td width="60" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">性别</font></td>  
        
      <td width="116" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">来自</font></td>  
        
      <td width="80" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">生日</font></td>  
        
      <td width="99" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">网络寻呼机</font></td>  
        
      <td width="110" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">登记IP</font></td>  
        
      <td width="81" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">登记时间</font></td>  
        
      <td width="55" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">人气</font></td>  
        <td width="44" align="center" bgcolor="#000000" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">删除</font></td>  
      </tr>  
      <%while(rs_lar.next()){%>  
      <tr>  
        
      <td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><a href="adminread.jsp?user_id=<%=rs_lar.getString("user_id")%>" title="查看网友<%=rs_lar.getString("netname")%>的祥细资料" target="_blank"><%=rs_lar.getString("netname")%></a></td>  
        <td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("sex")%></td>  
        <td width="116" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("home")%></td>  
        <td width="80" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("britherday")%></td>  
        <td width="99" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("netcall")%></td>  
        <td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("ip")%></td>  
        <td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("date1")%></td>  
        <td width="55" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar.getString("renqi")%></td>  
        <td width="44" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><a href="deluser.jsp?user_id=<%=rs_lar.getString("user_id")%>">[删除]</a></td>  
      </tr>  
      <%}
	  rs_lar.close();%>  
    </table>  
    </form>  
  
<table width="772">
  <tr>  
      
    <td>&nbsp; </td>  
    </tr>  
  </table>  
  <form>  
  <table border="0" width="772" cellspacing="0" height="27">
    <tr>  
      <td width="100%" height="13">  
      <p align="center">  
      关键字<input type="text" name="search_txt" size="8"><input type="submit" value="搜索" name="B1">
        </p>  
      </td>  
   </tr>  
    <tr>  
      <td width="100%" height="12">  
      <p align="center">关键字为空列出所有网友  
      </td>  
    </tr>  
  </table>  
</form>  
<map name="Map">
  <area shape="rect" coords="231,95,276,110" href="default.jsp">
  <area shape="rect" coords="299,95,357,112" href="your.jsp">
  <area shape="rect" coords="384,93,445,111" href="list.jsp">
  <area shape="rect" coords="470,95,532,112" href="register.jsp">
  <area shape="rect" coords="554,95,616,111" href="sendphoto.jsp">
  <area shape="rect" coords="642,94,700,112" href="pics.jsp">
</map>
</body>  
</html>

⌨️ 快捷键说明

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