各位高手麻烦帮忙看看,谢谢了,很急哦,我在线等 10
下面是程序的一部分代码,想要实现删除功能,页面什么的都出来了,可就是删不掉,看了好久都没看出哪出了毛病.下面的代码中都有包含conn.asp;kill.asp<%dims...
下面是程序的一部分代码,想要实现删除功能,页面什么的都出来了,可就是删不掉,看了好久都没看出哪出了毛病.下面的代码中都有包含conn.asp ;
kill.asp
<%dim sq_id
sq_id = ChkRequest(Request("sq_id"),1) '防注入
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from "& db_xxsq_Table &" where sq_id=" & sq_id
rs2.Open rs2.Source,conn,1,1
if request.cookies(Forcast_SN)("ManageKEY")="super" then
%>
------------------------------------------------------------------
<table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="<%=border%>">
<form action=xxsqKillok.asp method=post>
<tr>
<td width="100%" align="center" height="55" bgcolor="<%=m_top%>"><b>删除信息类别确认</b></td>
</tr>
<input type="hidden" name="sq_id" value="<%=sq_id%>">
<tr>
<td width="100%" align=center bgcolor="#FFFFFF">
<p> </p>
<p>删除信息类别:[ <%=rs2("sq_name")%> ]?<font color=red><br><br>
一起删除相应的文章
<%if request.cookies(Forcast_SN)("ManageKEY")="super" then%>
<input type="radio" name="killnews" value="1">是
<%end if%>
<input type="radio" name="killnews" value="0" checked>否</font>
</p>
<p></p>
</td>
</tr>
<tr>
<td width="100%"align=center bgcolor="<%=m_top%>" height="55" >
<input type=submit value="确定" name="alert_button" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type=button value="取消" name="alert_button" onClick="javascript:history.go(-1)" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
</td>
</tr>
</form>
</table>
</div>
</body>
</html>
<!--#include file=Admin_Bottom.asp-->
<%rs2.close
set rs2=nothing
conn.close
set conn=nothing
else
Show_Err("因为这不是您添加的信息类别,所以您无权删除该信息类别!<br><br>---<a href='javascript:history.back()'>返回</a>---")
response.end
end if
end if%>
killok.asp 在这里,忘了贴了,呵呵
sq_id = ChkRequest(Request("sq_id"),1) '防注入
dim sq_xxms
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from "& db_xxsq_Table &" where sq_id="&sq_id
rs.open sql,conn,3,3
sq_xxms=rs("sq_xxms")
rs.close
set rs=nothing
button_value=trim(Request.Form("alert_button"))
if button_value="确定" then
conn.execute("delete from "& db_xxsq_Table &" where sq_id=" &sq_id)
if killnews=1 then
conn.execute("delete from "& db_xxsq_Table &" where sq_id='" &sq_id &"'")
end if
conn.close
set conn=nothing
response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=xxgk_sqManage.asp"">"
Show_Message("<p align=center><font color=red>恭喜您!您选择的信息类别已经被删除!<br><br>"&freetime&"秒钟后返回上页!</font>")
response.end
end if
response.redirect "xxclass.asp"
end if%> 展开
kill.asp
<%dim sq_id
sq_id = ChkRequest(Request("sq_id"),1) '防注入
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from "& db_xxsq_Table &" where sq_id=" & sq_id
rs2.Open rs2.Source,conn,1,1
if request.cookies(Forcast_SN)("ManageKEY")="super" then
%>
------------------------------------------------------------------
<table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="<%=border%>">
<form action=xxsqKillok.asp method=post>
<tr>
<td width="100%" align="center" height="55" bgcolor="<%=m_top%>"><b>删除信息类别确认</b></td>
</tr>
<input type="hidden" name="sq_id" value="<%=sq_id%>">
<tr>
<td width="100%" align=center bgcolor="#FFFFFF">
<p> </p>
<p>删除信息类别:[ <%=rs2("sq_name")%> ]?<font color=red><br><br>
一起删除相应的文章
<%if request.cookies(Forcast_SN)("ManageKEY")="super" then%>
<input type="radio" name="killnews" value="1">是
<%end if%>
<input type="radio" name="killnews" value="0" checked>否</font>
</p>
<p></p>
</td>
</tr>
<tr>
<td width="100%"align=center bgcolor="<%=m_top%>" height="55" >
<input type=submit value="确定" name="alert_button" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type=button value="取消" name="alert_button" onClick="javascript:history.go(-1)" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
</td>
</tr>
</form>
</table>
</div>
</body>
</html>
<!--#include file=Admin_Bottom.asp-->
<%rs2.close
set rs2=nothing
conn.close
set conn=nothing
else
Show_Err("因为这不是您添加的信息类别,所以您无权删除该信息类别!<br><br>---<a href='javascript:history.back()'>返回</a>---")
response.end
end if
end if%>
killok.asp 在这里,忘了贴了,呵呵
sq_id = ChkRequest(Request("sq_id"),1) '防注入
dim sq_xxms
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from "& db_xxsq_Table &" where sq_id="&sq_id
rs.open sql,conn,3,3
sq_xxms=rs("sq_xxms")
rs.close
set rs=nothing
button_value=trim(Request.Form("alert_button"))
if button_value="确定" then
conn.execute("delete from "& db_xxsq_Table &" where sq_id=" &sq_id)
if killnews=1 then
conn.execute("delete from "& db_xxsq_Table &" where sq_id='" &sq_id &"'")
end if
conn.close
set conn=nothing
response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=xxgk_sqManage.asp"">"
Show_Message("<p align=center><font color=red>恭喜您!您选择的信息类别已经被删除!<br><br>"&freetime&"秒钟后返回上页!</font>")
response.end
end if
response.redirect "xxclass.asp"
end if%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询