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

📄 c.jsp

📁 网上购物系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style></head>
<jsp:useBean id="ConBean" scope="session"  
class="com.bitc.ch13.DBCon"/>
<%
String text = new String(request.getParameter("text").getBytes("ISO-8859-1"),"GBK");
String select = new String(request.getParameter("select").getBytes("ISO-8859-1"),"GBK");
String aa = "";
aa = "SELECT * FROM vidc where "+select+" = '"+text+"'";
%>
<body>
<table width="781" height="197" border="0">

    <tr>  <form action="c.jsp" method="post" name="form">
      <td width="775" height="10" align="center" bgcolor="#EBEBEB">请输入您要查询的内容
        <input name="text" type="text" id="text">
          <select name="select">
            <option value="ftp">FTP名称查询</option>
            <option value="lxr">联系人</option>
			<option value="dh">电话</option>
			<option value="sfz">EMAIL</option>
			<option value="qq">Q&nbsp;Q</option>
            <option value="www" selected>域名查询</option>
                    </select>        <input type="submit" name="Submit" value="查  询"></td> </form>
    </tr>
    <tr>
      <td height="164" align="center">
	  <%
	  Connection con = ConBean.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(aa);
while(rs.next()){
String id = rs.getString("id");
%>
<table width="816" height="214" border="1" bordercolor="#009999">
  <tr>
    <td width="106" height="37"><%=rs.getString("mc")%></td>
    <td width="104">价格:<%int pric = rs.getInt("pric");if(pric > 800){out.println("<b><font color=red>"+pric+"</font></b>");}else{out.println(pric);}%></td>
    <td width="79">邮局:<%=rs.getString("m")%></td>
    <td width="67"><select name="select">
	<%String k = rs.getString("s");out.println("<option value=MSSQL selected>"+k+"</option>");%>
            
    </select></td>
    <td width="116">FTP:<%=rs.getString("ftp")%></td>
    <td width="151">FTP密码:<%=rs.getString("ftppwd")%></td>
    <td width="147">域名:<%=rs.getString("www")%></td>
  </tr>
  <tr bgcolor="#FFFFCC">
    <td height="16" colspan="7">联系人资料:</td>
  </tr>
  <tr>
    <td height="31">姓名:<%=rs.getString("lxr")%></td>
    <td>电话:<%=rs.getString("dh")%></td>
    <td>QQ:
      <%String qq = rs.getString("qq");out.println(qq);%></td>
    <td colspan="3">地址:<%=rs.getString("dz")%></td>
    <td>E-Mail:<%=rs.getString("sfz")%></td>
  </tr>
    <tr bgcolor="#FEF9EF">
    <td height="76" colspan="7">&nbsp;</td>
  </tr><tr>
    <td height="40"><input type="button" name="Submit" value="编   辑" onClick="edit(<%=id%>)"></td>
    <td><input type="button" name="Submit2" value="删  除" onClick="del(<%=id%>)"></td>
    <td><a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=<%=qq%>&Site=深圳万网&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:<%=qq%>:1></a></td>
    <td colspan="3"><input type="button" name="Submit3" value="暂  停" onClick="r(<%=id%>)">
    <input type="submit" name="Submit5" value="备份文件">    
    <input type="submit" name="Submit6" value="备份数据库">
    <input type="submit" name="Submit7" value="恢复数据库"></td>
    <td><input type="button" name="Submit4" value="发注册信" onClick="x(<%=id%>)"></td>
  </tr>
</table>  
<%

  }
  rs.close();
  stmt.close();
ConBean.close();
%>
<script language="javascript">
function del(id)
{
	 myvalue=confirm("该操作不可恢复,确认要删除吗?");
     if (myvalue== true)
	   window.location ="s.jsp?id="+id 
}
</script>
<script language="javascript">
function edit(ide)
{
		   window.location ="edit.jsp?id="+ide 
}
</script>
<script language="javascript">
function r(id)
{
	 myvalue=confirm("确认该用户已经打款了吗?");
     if (myvalue== true)
	   window.location ="z.jsp?id="+id 
}
</script>
<script language="javascript">
function x(id)
{
	 myvalue=confirm("确认要给该用户发信吗?");
     if (myvalue== true)
	   window.location ="zsx.jsp?id="+id 
}
</script>
</td>
    </tr>
 
</table>

</body>
</html>

⌨️ 快捷键说明

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