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

📄 point_search.asp

📁 采用arcims结合asp开发的一个webgis系统,针对地下水,实现了曲线时时绘制的功能.
💻 ASP
字号:
<%@ LANGUAGE="VBScript" %>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>jingdian</title>
<script language="javascript">
var t_query;
var t2_query = "";
if (opener) {
	t_query = opener.parent.MapFrame;
	t2_query = "opener.parent.MapFrame";
} else {
	t_query = parent.MapFrame;
	t2_query = "parent.MapFrame";
}
function sendsearch()
{
	t_query.toolMode=7;
	for (i=0;i<t_query.layerCount;i++ )
	{
		if (t_query.LayerName[i]=="基本井位")
		{
		t_query.setActiveLayer(i);
		}
		
	}
	
	var questStr="测站编码 = ";
	questStr+=document.queryform2.pointNo.value;
	//alert(questStr);
	t_query.sendQueryString(questStr);
	
	//window.open ('showpoint.asp', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') 
	document.queryform2.action="showpoint.asp";
	document.queryform2.target="_blank";
	document.queryform2.submit();
	return true;
}
function function2(){
 document.queryform2.action="showchart.asp";
 document.queryform2.target="_blank";
 document.queryform2.submit();
 return true;
}
</script>
<% 
Dim conn,connstr,rs,rsstr
'----------建立数据库链接对象
Set conn = Server.CreateObject("ADODB.Connection")
connstr ="Driver={SQL Server};server=(local);uid=sa;pwd=;database=master;"
conn.open connstr

Set rs1 = server.CreateObject("adodb.recordset")
Set rs2 = server.CreateObject("adodb.recordset")
rsstr1 = "select DISTINCT STCD from GW_Z_H "
rsstr2 = "select DISTINCT YMDHM from GW_Z_H order by YMDHM "
rs1.open rsstr1,conn,1,1
rs2.open rsstr2,conn,1,1

reDim listTime(rs2.recordcount)
For i=1 To rs2.recordcount
	listTime(i-1)=rs2("YMDHM")
	rs2.movenext
Next 
For i=0 To rs2.recordcount-1
	  tm=month(listTime(i))   
	if   len(tm)=1   then   tm="0"   &   tm   
	td=day(listTime(i))   
	if   len(td)=1   then   td="0"   &   td   
	str=year(listTime(i))   &   tm   &   td   
	listTime(i)=str
Next
'For i=1 To rs.recordcount
'    response.write rs("STCD")&"<br>"
'    rs.movenext
'Next
'response.write("共有"&rs.recordcount&"人")
%>
<body bgcolor="D7E8FA" LEFTMARGIN=0 TOPMARGIN=0>
<a id="myAddress" href="http://www.baidu.com" target="_blank" style="display:none;"></a> <!--看看这里能不能把参数传递过去 -->
<form name="queryform2" method="get" action="" >
<table width="212"  cellspacing="0" cellpadding="0">
	<tr>
		<td width="100%" align="center"><font color="black" style="font-size=11pt" face="宋体" ><b>测站、时间点查询</b></font></td>
	</tr>
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td>
		<TABLE>
		<TR>
			<td width="80" align="left"><font style="font-size=9pt">&nbsp;测站编码:</font></td>
			<td width="100" align="left"><select style="width=80" name="pointNo">
			<option value="30101" selected>30101
				<%
					For i=1 To rs1.recordcount
						response.write "<option value="
						response.write rs1("STCD")&" >"
						response.write rs1("STCD")
						rs1.movenext
					Next
				%>
				</select>
			</td>
		</TR>
		</TABLE>
		</td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
<tr>
		<td>
		<TABLE>
		<TR>
			<td width="80" align="left"><font style="font-size=10pt">&nbsp;时间:</font></td>
			<td width="120" align="left"><select style="width=120"name="PointTime" >
			<%
					'rs.MoveFirst
					For i=1 To rs2.recordcount
						response.write "<option value="
						response.write listTime(i-1)&" >"
						response.write listTime(i-1)
					Next
				%>
			</td>
		</TR>
		</TABLE>
		</td>
	</tr>	 
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td width="165" align="left"> &nbsp;<input type="button" name="Submit" style="width=100" value="&nbsp;查&nbsp;询&nbsp;" onclick=" sendsearch();"></td>
	</tr>
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td width="165" align="right"> &nbsp;<input type="button" name="Submit2"  value="查询历史水位埋深" onclick="function2();" ></td>
	</tr>
</table>
<%
	Set rs1=Nothing
	Set rs2=Nothing
	conn.close
	Set conn=Nothing
	
%>
</form>
</body>

⌨️ 快捷键说明

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