📄 modifyinfo.asp
字号:
<%Response.Buffer=true%>
<!--
Programmer:jin kai
Update:2000.8.15
CopyRight:东宇电子商务
-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>天气预报信息修改</title>
<script language="javascript" src="check.js"></script>
<link rel=stylesheet href="style.css" type=text/css>
<!--#include file="../include/odbc.asp" -->
<!--#include file="../include/killStr.asp" -->
<!--#include file="../include/checkUser.asp" -->
<!--#include file="../include/checkServer.asp" -->
<%
'修改:潘树文
'时间:2001年2月9日
%>
</head>
<%
Dim city
Dim rs,sql
Dim rsSelect,sqlSelect
city = trim(Request.QueryString ("cityName"))
Set rs=Server.CreateObject("ADODB.Recordset")
Set rsSelect=Server.CreateObject("ADODB.Recordset")
sql = "Select * From weather_Info Where city = '" & city & "'"
rs.open sql,conn,1,2
%>
<body bgcolor="#C0C0C0">
<form method="POST" action="infoSave.asp" name=form1 onsubmit="return check(this);">
<INPUT TYPE="hidden" name=city value=<%=city%>>
<table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="66%" align="center" colspan="2">天气预报信息修改</td>
</tr>
<%
Dim bg
bg = "bgcolor=#009393"
IF Not rs.Eof Then
%>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">城市</font></td>
<td width="32%" align="center" <%=bg%> ><%=rs("city")%></td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">状况</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="status">
<option value="<%=rs("status")%>"><%=rs("status")%></option>
<%
sqlSelect = "Select * from weather_status Order by statusID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=rsSelect("statusName")%>"><%=rsSelect("statusName")%></option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select></p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">风向</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="direction">
<option value="<%=rs("direction")%>"><%=rs("direction")%></option>
<%
sqlSelect = "Select * from weather_direction Order by directionID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=trim(rsSelect("directionName"))%>风"><%=rtrim(rsSelect("directionName"))%>风</option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select> </p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">风力</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="power">
<option value="<%=rs("power")%>"><%=rs("power")%></option>
<%
sqlSelect = "Select * from weather_power Order by powerID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=trim(rsSelect("powerName"))%>级"><%=rtrim(rsSelect("powerName"))%>级</option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select> </p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">气温</font></td>
<td width="32%" align="center" <%=bg%>>
<input type="text" name="Name" size="10" value="<%=trim(rs("temperature"))%>">
℃</td>
</tr>
<%
rs.Close
Set rs = nothing
Else
%>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">城市</font></td>
<td width="32%" align="center" <%=bg%> ><%=city%> </td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">状况</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="status">
<%
sqlSelect = "Select * from weather_status Order by statusID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=rsSelect("statusName")%>"><%=rsSelect("statusName")%></option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select></p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">风向</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="direction">
<%
sqlSelect = "Select * from weather_direction Order by directionID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=trim(rsSelect("directionName"))%>风"><%=rtrim(rsSelect("directionName"))%>风</option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select> </p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">风力</font></td>
<td width="32%" align="center" <%=bg%>>
<p><select size="1" name="power">
<%
sqlSelect = "Select * from weather_power Order by powerID"
rsSelect.open sqlSelect,conn,1,2
While Not rsSelect.Eof %>
<option value="<%=trim(rsSelect("powerName"))%>级"><%=rtrim(rsSelect("powerName"))%>级</option>
<%
rsSelect.MoveNext
Wend
rsSelect.close
%>
</select> </p>
</td>
</tr>
<tr>
<td width="5%" align="center" bgcolor="#993300"><font color="#00FF00">气温</font></td>
<td width="32%" align="center" <%=bg%>>
<input type="text" name="Name" size="10" value="">
℃</td>
</tr>
<%
End If
Set rsSelect = nothing
conn.close
Set conn = nothing
%>
<tr>
<td width="66%" align="center" colspan="2"> </td>
</tr>
</table>
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td width="50%" align="center"></td>
<td width="50%" align="center"></td>
</tr>
<tr>
<td width="50%" align="center"><br>
<br>
</td>
<td width="50%" align="center"></td>
</tr>
<tr>
<td width="50%" align="center"><input type="submit" value="确认修改" name="B1"></td>
<td width="50%" align="center"><input type="reset" value="全部重写" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -