编辑讨论
function save_onclick()
{
document.form.Content.value=editor.HtmlEdit.document.body.innerHTML;
var strTemp = document.form.password.value;
if (strTemp.length == 0 )
{
alert("请填写密码");
document.form.password.focus();
return false;
}
var strTemp = document.form.Content.value;
if (strTemp.length == 0 )
{
alert("请填写讨论内容");
return false;
}
return true;
}
function save_onclick1()
{
var strTemp = document.form.password.value;
if (strTemp.length == 0 )
{
alert("请填写密码");
document.form.password.focus();
return false;
}
var strTemp = document.form.Content.value;
if (strTemp.length == 0 )
{
alert("请填写讨论内容");
return false;
}
return true;
}
function guestpreview()
{
document.preview.content.value=document.form.Content.value;
var popupWin = window.open('GuestPreview.asp', 'GuestPreview', 'scrollbars=yes,width=620,height=230');
document.preview.submit()
}
rs.open "Select * From guest where id="&request("id"),Conn,2,3
if session("useridname")rs("username") then if session("admin")1 then if session("admin")2 then response.Redirect "error.asp?info=非作者本人不能修改!"
if request.Form"" then
password=Trim(request.Form("password"))
pic=Trim(request.Form("pic"))
Subject=Trim(HTMLEncode(Request.Form("Subject")))
content=Request.Form("content")
if (rs11("lylength")0) and (strLength(UserName)>rs11("lylength")) then response.Redirect "error.asp?info=讨论长度大于"&rs11("lylength")&"个汉字!"
username=Trim(request.Form("username"))
if UserName="" then response.Redirect "error.asp?info=请输入用户名!"
id=request.Form("id")
secret=request.Form("secret")
fontcolor=Trim(request.Form("fontcolor"))
if (session("admin")=1) or (session("admin")=2) then lastdate=request.Form("lastdate")
if secret1 then secret=0
if rs11("muieditor")=0 or rs11("muieditor")=2 then
content=HTMLEncode(content)
end if
lydate =now
if homepage="http://" then homepage=""
rs.close
rs.open "Select * From register where username='" & username& "'" ,Conn,2,3
if session("admin")1 then if session("admin")2 then if md5(password)rs("password1") then response.Redirect "error.asp?info=用户名或密码错误!"
rs.close
rs.open "Select * From guest where id=" & id,Conn,2,3
rs("subject")=subject
strSiteUrl=request.ServerVariables("HTTP_REFERER")
strSiteUrl=lcase(left(strSiteUrl,instrrev(strSiteUrl,"/")))
Content=replace(Content,strSiteUrl,"")
content=replace(content,"'","""")
rs("content")=content
rs("lydate")=lydate
rs("pic")=pic
rs("secret")=secret
rs("fontcolor")=fontcolor
rs("edituser")=session("useridname")
rs("edittime")=now
if (session("admin")=1) or (session("admin")=2) then rs("lastdate")=lastdate
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.Redirect "guest_edit_post_ok.asp?id="&id
end if
recontent=rs("content")
recontent=replace(recontent,"",vbCrLf)
recontent=replace(recontent," "," ")
recontent=replace(recontent,"""","'")
%>
讨论首页
编辑讨论
用户名:
密码:
(必填,否则不能修改)
心情:
讨论标题:
标题醒目
红色醒目
绿色醒目
蓝色醒目
讨论内容:
·换行请按Shift+Enter
·另起一段请按Enter
·支持UBB标签
call showubb()%>
end if%>
讨论功能:
悄悄话(只有登录后才可看到自己的讨论及回复的内容)
最后更新:
此项仅管理员或版主可见
(Ctrl+Enter提交)
set rs=nothing%>
set rs=nothing
%>