留 言 删 除
function checkpass(thisform,pass)
{
if(thisform.pass.value==""){
alert("请输入管理员密码!")
thisform.pass.focus()
return(false)
}
}
textdelid=clng(request("textdelid"))
pass=request("pass")
textcaption=request("textcaption")
checkbox=request("checkbox")
sql="select pass from supervisor"
set guestpass=conn.execute(sql)
//是否选择了记住密码
if session("guest")=true then
sql="delete from guest where id="&textdelid
conn.execute sql
response.write" window.opener.location.reload();alert('留言删除成功!');window.close();"
end if
//密码是否正确是否为空
if len(pass)>0 and passguestpass("pass") then
response.write"alert('密码错误!请重新输入!')"
end if
if pass"" and pass=guestpass("pass") then
//密码是否正确
if len(checkbox)>0 then session("guest")=true
sql="delete from guest where id="&textdelid
conn.execute sql
response.write" window.opener.location.reload();alert('留言删除成功!');window.close();"
end if
'if pass guestpass("pass") and pass"" then
'response.write"alert('密码错误!请重新输入。')"
'end if
'response.write"alert('请输入管理员密码')"
%>
∴
删除主题:
密 码:
记住密码,浏览器关闭时密码失效。