28,406
社区成员
发帖
与我相关
我的任务
分享
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%
if Request.QueryString("mark")="southidc" then
Opdate=Trim(Request("Opdate"))
Nu=Trim(Request("Nu"))
First=Trim(Request("First"))
SSecond=Trim(Request("Second"))
Third=Trim(Request("Third"))
Fourth=Trim(Request("Fourth"))
Fifth=Trim(Request("Fifth"))
Sixth=Trim(Request("Sixth"))
Seventh=Trim(Request("Seventh"))
Spe=Trim(Request("Spe"))
Content=Trim(Request("Content"))
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Shuangse where id="&id
rs.open sql,conn,1,3
rs("Opdate")=Opdate
rs("Nu")=Nu
rs("First")=First
rs("Second")=SSecond
rs("Third")=Third
rs("Fourth")=Fourth
rs("Fifth")=Fifth
rs("Sixth")=Sixth
rs("Seventh")=Seventh
rs("Spe")=Spe
rs("Content")=Content
rs.update
rs.close
response.redirect "Admin_Shuangse.asp"
end if
%>
<%
id=request.querystring("id")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Shuangse where id="&id, conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"> <br>
<table width="660" border="0" cellpadding="0" cellspacing="1" class="table_southidc">
<tr>
<td class="back_southidc" height="25"> <div align="center"><strong>修改双色球开奖信息<br></strong></div></td>
</tr>
<tr>
<form method="post" name="myform" action="Admin_ShuangseEdit.asp?mark=southidc">
<input type=hidden name=id value=<%=id%>>
<td><div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr bgcolor="#fcfcfc">
<td width="27%" height="25"><div align="center">开奖日期</div></td>
<td width="73%">
<input name="Year" type="text" value="<%=rs("Opdate")%>" size="15" maxlength="30">
</td>
</tr>
<tr bgcolor="#fcfcfc">
<td height="25"><div align="center">奖期</div></td>
<td>第<input name="Nu" type="text" value="<%=rs("Nu")%>" size="10" maxlength="30">期</td>
</tr>
<tr bgcolor="#fcfcfc">
<td height="25"><div align="center">红球号码</div></td>
<td>
<input name="First" type="text" value="<%=rs("First")%>" size="2" maxlength="2">
<input name="Second" type="text" value="<%=rs("Second")%>" size="2" maxlength="2">
<input name="Third" type="text" value="<%=rs("Third")%>" size="2" maxlength="2">
<input name="Fourth" type="text" value="<%=rs("Fourth")%>" size="2" maxlength="2">
<input name="Fifth" type="text" value="<%=rs("Fifth")%>" size="2" maxlength="2">
<input name="Sixth" type="text" value="<%=rs("Sixth")%>" size="2" maxlength="2">
</td>
</tr>
<tr bgcolor="#fcfcfc">
<td height="25"><div align="center">蓝球号码</div></td>
<td> <input name="Spe" type="text" value="<%=rs("Spe")%>" size="2" maxlength="2"></td>
</tr>
<tr bgcolor="#FCFCFC">
<td height="25" valign="top"><div align="center">开奖公告</div></td>
<td valign="top"> <textarea name="Content" style="display:none"><%=rs("Content")%></textarea>
<iframe ID="eWebEditor1" src="SouthidcEditor/ewebeditor.asp?id=content&style=southidc" frameborder="0" scrolling="no" width="550" HEIGHT="300"></iframe>
</td>
</tr>
<tr bgcolor="#FCFCFC">
<td height="25" colspan="2">
<input type=hidden name=Pic value=<%=rs("Pic")%>>
<div align="center">
<input name="submit" type="submit" value="确定">
<input name="reset" type="reset" value="恢复">
</div></td>
</tr>
</table>
</div></td>
</form>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
<%
id=request.querystring("id")
'改到这里即可,
if Request.QueryString("mark")="southidc" then
'需要防止SQL注入风险,需要过滤
Opdate=Trim(Request("Opdate"))
Nu=Trim(Request("Nu"))
First=Trim(Request("First"))
SSecond=Trim(Request("Second"))
Third=Trim(Request("Third"))
Fourth=Trim(Request("Fourth"))
Fifth=Trim(Request("Fifth"))
Sixth=Trim(Request("Sixth"))
Seventh=Trim(Request("Seventh"))
Spe=Trim(Request("Spe"))
Content=Trim(Request("Content"))
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Shuangse where id="&id '原来的参数肯定不在
rs.open sql,conn,1,3
rs("Opdate")=Opdate
rs("Nu")=Nu
rs("First")=First
rs("Second")=SSecond
rs("Third")=Third
rs("Fourth")=Fourth
rs("Fifth")=Fifth
rs("Sixth")=Sixth
rs("Seventh")=Seventh
rs("Spe")=Spe
rs("Content")=Content
rs.update
rs.close
response.redirect "Admin_Shuangse.asp"
end if
%>
<%
'说实话,这里的先更新数据库,然后再查询出来,不觉得效率有问题吗?有时间多看看想想可以提高很多的
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Shuangse where id="&id, conn,1,1
%>
<!-- 提交时候也需要把编号提交过去,否则你依据什么来修改你的数据库-->
<form method="post" name="myform" action="Admin_ShuangseEdit.asp?id= <%=id%>&mark=southidc">