⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yd_guestbook_admin_edit.asp

📁 是个不错的留言版
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="YD_guestbook_CONN.asp" -->
<!--#include file="YD_guestbook_Const.asp" -->
<%
'------------------------------------------------------------------------
'By 玄天尊, 更新于2005-05-19 晚.
'和论坛结合的留言本,分会员与游客两种模式
'可定义是否使用验证码,防止恶意留言
'ACCESS与MSSQL通用版本
'www.YdSpace.org And www.YdSpace.net  异度空间技术部
'------------------------------------------------------------------------
Response.Buffer=True
Dvbbs.Stats="留言编辑"
Dvbbs.Nav()
Dvbbs.Head_var 0,0,""&guestbook_setting(0)&"","YD_guestbook_index.asp"

If not dvbbs.master then
	Response.Redirect "YD_guestbook_Save.asp?action=information&sid=2&act=<li>错误,留言编辑只能管理员进入,如果你是管理员请先登陆&Flag=2"
End if

call GuestState()
select case request("action")
	case "SaveEdit"
		call SaveEdit()
	case "Savepadlock"
		call Savepadlock()
	case else
		call main()
end select
Dvbbs.ActiveOnline
Dvbbs.footer()

Sub main()
Dim Tid,rootid,Content,distinguish,AnswerExpress,AnswerFace,AnswerColor,AnswerName,AnswerEmail,ThemeWeb,AnswerOicq
Dim userregface
Tid=request("Tid")
If not isnumeric(Tid) then
	Response.Redirect "YD_guestbook_Save.asp?action=information&sid=2&act=<li>错误的参数,请指定正确主题。&Flag=2"
End if
Sql="select * from YD_Guest_Theme where id="&Tid&""
Set Rs=guestbook_conn.execute(Sql)
If Rs.eof and Rs.bof then
	Rs.close
	Set Rs=nothing
	Response.Redirect "YD_guestbook_Save.asp?action=information&sid=2&act=<li>没有找到您要浏览的主题。&Flag=2"
End if
Rs.close
Set Rs=nothing

Sql="select Thid,Content,distinguish,AnswerExpress,AnswerFace,AnswerColor,AnswerName,AnswerEmail,AnswerWeb,AnswerOicq from YD_Guest_Theme where id="&Tid&""
Set Rs=guestbook_conn.execute(Sql)
rootid=Rs(0)
Content=Rs(1)
distinguish=Rs(2)
AnswerExpress=Rs(3)
AnswerFace=Rs(4)
AnswerColor=Rs(5)
AnswerName=Rs(6)
AnswerEmail=Rs(7)
ThemeWeb=Rs(8)
AnswerOicq=Rs(9)
Rs.close
Set Rs=nothing

Sql="select SaveTheme,UserName,ThemeEmail,ThemeOicq,ThemeWeb,ThemeFace,Express from YD_Guest_topic where id="&rootid&""
Set Rs=guestbook_conn.execute(Sql)
%>
<table class=tableborder1 cellspacing=1 cellpadding=3 align=center border=0>
  <tr>
    <th align="center" colspan="3" height="25"><b>编辑留言</b></th>
  </tr>
  <form method=post action="?action=SaveEdit&Tid=<%=Tid%>">
<%
If distinguish="1" then
%>
  <tr>
    <TD width=25% class=tablebody1 colspan="2"><B>昵 称:</B><li>填写您的称呼。</TD>
    <TD width=75% class=tablebody1>&nbsp;<input name="mincheng" size="30" value="<%=htmlencode(Rs(1))%>">&nbsp;&nbsp;<font color=red>*</font>不得超过12个英文字符</td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2"><B>信 箱:</B><li>填写您的Email地址。</TD>
    <TD class=tablebody1>&nbsp;<input name="E_mail" size="30" value="<%=htmlencode(Rs(2))%>">&nbsp;&nbsp;<font color=red>*</font></td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2"><B>网 址:</B><li>填写您的Web地址。</TD>
    <TD class=tablebody1>&nbsp;<input name="MyWeb" size="30" value="<%=htmlencode(Rs(4))%>"></td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2">&nbsp;<B>OICQ:</B><li>填写您的Oicq号码。</TD>
    <TD class=tablebody1>&nbsp;<input name="Oicq" size=30 value="<%=htmlencode(Rs(3))%>"></td>
  </tr>
  <tr>
    <td class=tablebody1 colspan="2"><b>主题标题:</b><li>内容的标题,必须填写。</td>
    <td class=tablebody1>&nbsp;<input name="zhuti" size="70" maxlength="80" value="<%=Server.htmlencode(Rs(0))%>">&nbsp;&nbsp;<font color=red>*</font>不得超过50个英文字符</td>
  </tr>
  <tr>
    <td width=25% valign=top class=tablebody1 colspan="2"><b>当前心情:</b><li>将放在留言的前面</td>
    <td width=75% class=tablebody1>
	<%for i=1 to 9%>
	<input type="radio" value="face<%=i%>" name="xingqingtu" <%If i=1 then response.write "checked"%>><img src="Skins/Default/topicface/face<%=i%>.gif">&nbsp;&nbsp;<%Next%>
	<br>
	<%for i=10 to 18%>
	<input type="radio" value="face<%=i%>" name="xingqingtu"><img src="Skins/Default/topicface/face<%=i%>.gif">&nbsp;&nbsp;
	<%Next%>
    </td>
  </tr>
  <tr>
    <td class=tablebody1 width="25%" valign="top" align="left" colspan="2"><B>请选择头像:</B><li>头像将出现在您的留言中</td>
    <td class=tablebody1 width="75%" valign="top" align="left" rowspan="2">&nbsp;选择头像:&nbsp;<select name=ThemeFace size=1 onChange="document.images['ThemeFace'].src=options[selectedIndex].value;">
<%
	For i=1 to 60
	userregface="Images/userface/Image" & i & ".gif"
	If trim(lcase(Rs(5))) = trim(lcase(userregface)) then
%> 
	<option value='Images/userface/Image<%=i%>.gif' selected>Image<%=i%></option>
<%
	Else
%>
	<option value='Images/userface/Image<%=i%>.gif'>Image<%=i%></option>
<%
	End if
	Next
%>
	</select>&nbsp;&nbsp;颜色:&nbsp;<SELECT name=color>
<option style="background-color:black;color: black" value="black" <%If AnswerColor="black" then%> selected <%End if%>>黑色 </option>
<option style="background-color:blue;color: blue" value="blue" <%If AnswerColor="blue" then%> selected <%End if%>>蓝色 </option>
<option style="background-color:red;color: red" value="red" <%If AnswerColor="red" then%> selected <%End if%>>红色 </option>
<option style="background-color:olive;color: olive" value="olive" <%If AnswerColor="olive" then%> selected <%End if%>>橄榄色 </option>
<option style="background-color:teal;color: teal" value="teal" <%If AnswerColor="teal" then%> selected <%End if%>>青色 </option>
<option style="background-color:maroon;color: maroon" value="maroon" <%If AnswerColor="maroon" then%> selected <%End if%>>栗色 </option>
<option style="background-color:navy;color: navy" value="navy" <%If AnswerColor="navy" then%> selected <%End if%>>海蓝色 </option>
<option style="background-color:gray;color: gray" value="gray" <%If AnswerColor="gray" then%> selected <%End if%>>灰色 </option>
<option style="background-color:lime;color: lime" value="lime" <%If AnswerColor="lime" then%> selected <%End if%>>绿色 </option>
<option style="background-color:Fuchsia;color: fuchsia" value="fuchsia" <%If AnswerColor="fuchsia" then%> selected <%End if%>>紫色 </option>
<option style="background-color:yellow;color: yellow" value="yellow" <%If AnswerColor="yellow" then%> selected <%End if%>>黄色 </option>
<option style="background-color:green;color: green" value="green" <%If AnswerColor="green" then%> selected <%End if%>>深绿色 </option>
<option style="background-color:purple;color: purple" value="purple" <%If AnswerColor="purple" then%> selected <%End if%>>深紫色 </option></SELECT><BR>&nbsp;<textarea name="Content" cols="95" rows="12"><%=Server.htmlencode(Content)%></textarea></td>
  </tr>
  <tr>
    <td class=tablebody1 width="13%" valign="middle"><B>内容:</B><li>不支持html语法<li>UBB标签不支持</td>
    <td class=tablebody1 width="12%" align="center"><img id=ThemeFace src="<%=Rs(5)%>"></td>
  </tr>
<%
	Else
%>
  <tr>
    <TD width=25% class=tablebody1 colspan="2"><B>昵 称:</B><li>填写您的称呼。</TD>
    <TD width=75% class=tablebody1>&nbsp;<input name="mincheng" size="30" value="<%=htmlencode(AnswerName)%>">&nbsp;&nbsp;<font color=red>*</font>不得超过12个英文字符</td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2"><B>信 箱:</B><li>填写您的Email地址。</TD>
    <TD class=tablebody1>&nbsp;<input name="E_mail" size="30" value="<%=htmlencode(AnswerEmail)%>">&nbsp;&nbsp;<font color=red>*</font></td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2"><B>网 址:</B><li>填写您的Web地址。</TD>
    <TD class=tablebody1>&nbsp;<input name="MyWeb" size="30" value="<%=htmlencode(ThemeWeb)%>"></td>
  </tr>
  <tr>
    <TD class=tablebody1 colspan="2">&nbsp;<B>OICQ:</B><li>填写您的Oicq号码。</TD>
    <TD class=tablebody1>&nbsp;<input name="Oicq" size="30" value="<%=htmlencode(AnswerOicq)%>"></td>
  </tr>
  <tr>
    <td width=25% valign=top class=tablebody1 colspan="2"><b>当前心情:</b><li>将放在留言的前面</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -