conditionserch.jsp

来自「jsp_javabean+tomcat的web管理系统!」· JSP 代码 · 共 95 行

JSP
95
字号
<%@ page language="java" import ="java.sql.*" contentType="text/html; charset=gb2312"%>
<%@ taglib uri="/WEB-INF/taglibs-dbtags.tld" prefix="sql" %>
<%@ taglib uri="/WEB-INF/taglibs-string.tld" prefix="str" %>
<%
String sql="";
String dataBase="megajoysms";
String contentid=request.getParameter("id");
String mobile =request.getParameter("mobile");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
.style1 {color: #FFFFFF}
-->
</style>
<link href="../../css/all.css" rel="stylesheet" type="text/css">
</head>

<body>
<sql:connection id="conn1">
  <sql:url>jdbc:microsoft:sqlserver://dataserver:1433;DatabaseName=megajoysms</sql:url>
  <sql:driver>com.microsoft.jdbc.sqlserver.SQLServerDriver</sql:driver>
  <sql:userId>sa</sql:userId>
  <sql:password>12345678</sql:password>
</sql:connection>

<table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#808080">
  <tr>
    <td height="23"> <span class="style1">后台管理--[短信夺标]</span></td>
  </tr>
  <tr>
    <td align="center" valign="top" bgcolor="#FFFFFF">
      <form name="form1" method="post" action="conditionserch.jsp">
        <p>&nbsp;</p>
        <table width="77%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#F2F2F2">
            <td height="13">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td width="46%" height="13"><div align="right">期数:</div></td>
            <td width="54%"><select name="id" id="id">
			<sql:statement id="content" conn="conn1">
			<sql:query>
			select * from duobiao_content order by sid desc
			</sql:query>
<sql:resultSet id="showContent">

              <option value="<sql:getColumn position="1"/> "><sql:getColumn position="8"/>:<str:left count="10"><sql:getColumn position="2"/></str:left>--<str:left count="10"><sql:getColumn position="3"/></str:left></option>
			  </sql:resultSet>

			  </sql:statement>
<sql:closeConnection conn="conn1"/>
            </select></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">手机号码:</div></td>
            <td><input name="mobile" type="text" id="mobile" value="<%=(mobile==null?"":mobile)%>"></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">
              <input type="submit" name="Submit" value="提交">
            </div></td>
            <td><input type="reset" name="Submit" value="重置"></td>
          </tr>
        </table>
      </form>
      <hr>
      <%if(contentid!=null){
    //sql="select top 1 * from duobiao_number n,duobiao_user d where n.groupid=d.contentid and groupid="+contentid+"  and times=1 order by number asc";
	if(mobile!=null&& !mobile.equals(""))
	sql="select contentid 期数,mobile 手机号码,price 发送数字,attime 发送时间,gateway 地区标示 from duobiao_user where mobile='"+mobile+"' and contentid="+contentid+" order by sid desc";
	else
	
    sql="select contentid 期数,mobile 手机号码,price 发送数字,attime 发送时间,gateway 地区标示 from duobiao_user where  contentid="+contentid+" order by sid desc";
	//out.print(sql);
    %>    
    <%@ include file="../../results.jsp" %>
<%
}%>
</td>
  </tr>
</table>
</body>

</html>

⌨️ 快捷键说明

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