home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
zb
/
Notepad-1
/
editsave.asp
< prev
next >
Wrap
Text File
|
2004-12-09
|
2KB
|
73 lines
<!--#include file="conn.asp"-->
<%
if instr(request.servervariables("http_referer"),"edit")<1 then
response.redirect "index.asp"
end if
if instr(request.servervariables("http_referer"),"http://"&request.servervariables("host") )<1 then
response.redirect "index.asp"
end if
dim title,email,qq,url,nei,id,rt
dim exec, rs
id=encodestr(Request.form("id"))
title=encodestr(Request.form("title"))
email=encodestr(Request.form("email"))
qq=encodestr(Request.form("qq"))
url=encodestr(Request.form("url"))
nei=replace(Request.form("nei"),"'","""")
if id="" or not theUser.reged then
session("errmsg")="╖╟╖¿▓┘╫≈úíúíúí"
response.redirect("admin_error.asp")
end if
if len(title)>40 then
title=left(title,40)
end if
Set rs = Server.CreateObject("ADODB.Recordset")
exec="select * from ly where id="&id
rs.Open exec,conn,1,2
if rs.eof then
rsclose()
connclose()
session("errmsg")="╕├┴⌠╤╘▓╗┤µ╘┌úíúíúí"
response.redirect "admin_error.asp"
end if
rs("title")=title
if email="" then
rs("email")=null
else
rs("email")=email
end if
if qq="" then
rs("qq")=null
else
rs("qq")=qq
end if
if url="" then
rs("url")=null
else
rs("url")=url
end if
if instr(nei,"[align=right][ ┤╦┴⌠╤╘▒╗ "&theUser.name&" ╨▐╕─╣² ][/align]")>0 then
rs("nei")=nei
else
rs("nei")=nei&"[align=right][ ┤╦┴⌠╤╘▒╗ "&theUser.name&" ╨▐╕─╣² ][/align]"
end if
rs.update
rs.requery
rt=rs("rt")
rsclose()
connclose()
if rt=0 then
session("url")="show.asp?id="&id
else
session("url")="show.asp?id="&rt&"#"&id
end if
response.redirect "addok.asp"
%>