Edit_Message.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:3k
- <!--#include file="../wml.ini"-->
- <%
- call wmlbegin("修改留言","wrap")
- go=request.QueryString("go")
- id=cint(request.QueryString("id"))
- if session("MessagePass")=id then
- if Go="" Then
- set rs=server.CreateObject("adodb.recordset")
- sql="select * from Message WHERE id="&id
- rs.open sql,conn,1,3
- if not (rs.bof and rs.eof) then
- %>
- 您的昵称<br/>
- <input name="Name" title="您的昵称" type="text" emptyok="true" size="15" maxlength="10" value="<%=outHTM(rs("Name"))%>"/><br/>
- 留言标题<br/>
- <input name="Title" title="留言标题" type="text" emptyok="true" size="15" maxlength="20" value="<%=outHTM(rs("Title"))%>"/><br/>
- 留言内容<br/>
- <input name="Content" title="留言内容" type="text" emptyok="true" size="15" maxlength="500" value="<%=outHTM(rs("Content"))%>"/><br/>
- 联系方法(不公开)<br/>
- <input name="Relation" title="联系方法" type="text" emptyok="true" size="15" maxlength="50" value="<%=outHTM(rs("Relation"))%>"/><br/>
- 密码(用于修改留言)<br/>
- <input name="Pass" title="密码" type="text" emptyok="true" size="15" maxlength="50" value="<%=outHTM(rs("Pass"))%>"/><br/>
- <anchor>提交编辑
- <go href="Edit_Message.Asp?go=1&id=<%=id%>" method="post">
- <postfield name="Name" value="$(Name)"/>
- <postfield name="Title" value="$(Title)"/>
- <postfield name="Content" value="$(Content)"/>
- <postfield name="Relation" value="$(Relation)"/>
- <postfield name="Pass" value="$(Pass)"/>
- </go>
- </anchor><br/>
- <%
- end if
- else
- dim Name,Title,Content,Relation,Pass
- Name=trim(request("Name"))
- Title=trim(request("Title"))
- Content=trim(request("Content"))
- Relation=trim(request("Relation"))
- Pass=trim(request("Pass"))
- dim ok
- ok=true
- if Name="" then
- call wmlwrite("您的昵称不能为空",true)
- ok=false
- End if
- if Title="" then
- call wmlwrite("留言标题不能为空",true)
- ok=false
- End if
- if Content="" then
- call wmlwrite("留言内容不能为空",true)
- ok=false
- End if
- if Relation="" then
- call wmlwrite("联系方法不能为空",true)
- ok=false
- End if
- if Pass="" then
- call wmlwrite("密码不能为空",true)
- ok=false
- End if
- if ok=true then
- set rs=server.CreateObject("adodb.recordset")
- sql="select * from Message WHERE id="&id
- rs.open sql,conn,1,3
- if not (rs.bof and rs.eof) then
- rs("Name")=Name
- rs("Title")=Title
- rs("Content")=Content
- rs("Relation")=Relation
- rs("Pass")=Pass
- rs.update()
- end if
- end if
- call wmlwrite("<b>修改成功!</b>",true)
- end if
- else
- call wmlwrite("<b>请不要TK别人的留言!</b>",true)
- end if
- call wap.navs("留言本,index.asp|预览留言,View.Asp?id=" & id & "|管理留言,Admin_Message.Asp?Go=1&id=" & id & "|编辑留言,")
- call wmlend
- %>