📄 syscode_guest.asp
字号:
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
<tr>
<tr >
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="title">
<tr>
<td background="images/bar01.gif" width="17"> </td>
<td valign="bottom" background="images/bar02.gif" height="26"><b><font color="#f49c46">></font></b> 主题:
<%=KeywordReplace(rsGuest("GuestTitle"))%>
<img src="<%=GuestPath%>posttime.gif" width="11" height="11" align="absmiddle">
<font color="#006633">:
<% =rsGuest("GuestDatetime")%>
</font></td>
<td background="images/bar03.gif" width="17"> </td>
</tr>
</table>
</td>
</tr>
<tr class="tdbg_leftall">
<td align="center" height="153" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%if rsGuest("GuestIsPassed")=True then%>
<tr class="tdbg_leftall">
<%else%>
<tr bgcolor="#f0f0f0">
<%end if%>
<td width="100" align="center" height="130" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" >
<tr>
<td valign="middle" align="center" width="100%">
<img src="<%=GuestPath%><%=rsGuest("GuestImages")%>.gif" width="80" height="90" onMouseOut=toolTip() onMouseOver="toolTip('<%=GuestTip%>')"><br><br>
<%
if rsGuest("GuestType")=1 then
response.write "<font color=""#006633"">【用户】<br>"&KeywordReplace(UserGuestName)&"</font>"
else
response.write "【游客】<br>"&KeywordReplace(UserGuestName)
end if
%>
</td>
</tr>
</table>
</td>
<td align="center" height="153" width="1" bgcolor="#B4C9E7">
</td>
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="0" class="saytext" height="125" style="TABLE-LAYOUT: fixed">
<tr>
<td align="left" valign="top"><img src="<%=GuestPath%>face<%=rsGuest("GuestFace")%>.gif" width="19" height="19">
<%
if rsGuest("GuestIsPrivate")=true and rsGuest("GuestName")<>LoginName then
response.write "<br><br><font color=green>"
response.write "**************************************<br>"
response.write "* 隐藏留言,管理员和留言用户可以看到 *<br>"
response.write "**************************************"
response.write "</font>"
else
if rsGuest("GuestIsPrivate")=true then
response.write "<font color=green>[隐藏]</font> "
end if
response.write KeywordReplace(ubbcode(dvHTMLEncode(rsGuest("GuestContent"))))
end if
%>
</td>
</tr>
<tr>
<td align="left" valign="bottom">
<%call ShowGuestreply()%>
</td>
</tr>
</table>
<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#B4C9E7">
<tr>
<td></td>
</tr>
</table>
<%call ShowGuestButton()%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="15" align="center" valign="top">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13" class="tdbg_left2"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rsGuest.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
'=================================================
'过程名:ShowGuestreply()
'作 用:显示回复留言
'参 数:无
'=================================================
sub ShowGuestreply()
if len(rsGuest("GuestReply")) >0 then
%>
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td height="1" bgcolor="#B4C9E7"></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed">
<tr>
<td><font color="#006633"> 管理员<font color="#FF0000">[<%=rsGuest("GuestReplyAdmin")%>]</font>回复:
<% =rsGuest("GuestReplyDatetime") %>
</font> </td>
</tr>
<tr>
<td valign="bottom"><font color="#006633"><% =KeywordReplace(ubbcode(dvHTMLEncode(rsGuest("GuestReply")))) %></font></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<%
end if
end sub
'**************************************************
'函数名:KeywordReplace
'作 用:标示搜索关键字
'参 数:strChar-----要转换的字符
'返回值:转换后的字符
'**************************************************
function KeywordReplace(strChar)
if strChar="" then
KeywordReplace=""
else
KeywordReplace= replace(strChar,""&keyword&"","<font color=red>"&keyword&"</font>")
end if
end function
'=================================================
'过程名:WriteGuest()
'作 用:签写留言
'参 数:无
'=================================================
sub WriteGuest()
if SaveEdit<>1 then
WriteType=GuestType
WriteName=LoginName
WriteSex="1"
WriteFace="1"
WriteImages="01"
WriteHomepage="http://"
end if
%>
<script language=JavaScript>
function changeimage()
{
document.formwrite.GuestImages.value=document.formwrite.Image.value;
document.formwrite.showimages.src="<%=GuestPath%>"+document.formwrite.Image.value+".gif";
}
function guestpreview()
{
document.preview.content.value=document.formwrite.GuestContent.value;
var popupWin = window.open('GuestPreview.asp', 'GuestPreview', 'scrollbars=yes,width=620,height=230');
document.preview.submit()
}
function check(thisform)
{
if(thisform.GuestName.value==""){
alert("姓名不能为空!")
thisform.GuestName.focus()
return(false)
}
if(thisform.GuestTitle.value==""){
alert("留言主题不能为空!")
thisform.GuestTitle.focus()
return(false)
}
if(thisform.GuestContent.value==""){
alert("留言内容不能为空!")
thisform.GuestContent.focus()
return(false)
}
if(thisform.GuestContent.value.length>500){
alert("留言内容不能超过500字符!")
thisform.GuestContent.focus()
return(false)
}
if(thisform.reg.checked==true){
if(thisform.GuestName.value.length>14 || thisform.GuestName.value.length<4){
alert("如果注册,用户名长度不能大于14或小于4!")
thisform.GuestName.focus()
return(false)
}
if(thisform.GuestEmail.value==""){
alert("如果注册,用户Email不能为空且必须正确填写!")
thisform.GuestEmail.focus()
return(false)
}
if(thisform.psw.value=="" || thisform.psw.value.length<6){
alert("如果注册,注册密码不能为空,且长度至少六位!")
thisform.psw.focus()
return(false)
}
if(thisform.pswc.value=="" || thisform.pswc.value!=thisform.psw.value){
alert("确认密码不能为空,且需与注册密码相同!")
thisform.pswc.focus()
return(false)
}
if(thisform.question.value==""){
alert("密码问题不能为空!")
thisform.question.focus()
return(false)
}
if(thisform.answer.value==""){
alert("问题答案不能为空!")
thisform.answer.focus()
return(false)
}
}
}
function showreginfo(){
if (document.formwrite.reg.checked == true) {
reginfo.style.display = "";
// reginfoshowtext.innerText="暂时不想注册成为贵站会员"
}else{
reginfo.style.display = "none";
// reginfoshowtext.innerText="我想同时注册成为贵站会员"
}
}
function gbcount(message,total,used,remain)
{
var max;
max = total.value;
if (message.value.length > max) {
message.value = message.value.substring(0,max);
used.value = max;
remain.value = 0;
alert("留言不能超过 500 个字!");
}
else {
used.value = message.value.length;
remain.value = max - used.value;
}
}
</script>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" cellpadding="1" cellspacing="0" class="border">
<tr class="title">
<td colspan="5"> <font color=green><%=PageTitle%></font></td>
</tr>
<tr class="tdbg_leftall">
<td colspan="5" align="center" height="10"></td>
</tr>
<form name="formwrite" method="post" action="<%=strFileName%>?action=savewrite" onSubmit="return check(formwrite)">
<% if WriteType=0 then%>
<tr class="tdbg_leftall">
<td width="20%" align="center">姓 名:</td>
<td width="30%">
<input type="text" name="GuestName" maxlength="14" size="20" value="<%=WriteName%>">
<font color=red>*</font>
</td>
<td width="22%"> </td>
<td colspan="2"> </td>
</tr>
<tr class="tdbg_leftall">
<td align="center">性 别:</td>
<td>
<input type="radio" name="GuestSex" value="1" <% if WriteSex=1 then response.write" checked"%> style="BORDER:0px;">
男
<input type="radio" name="GuestSex" value="0" <% if WriteSex=0 then response.write" checked"%> style="BORDER:0px;">
女 </td>
<td>
<select name="Image" size="1" onChange="changeimage();" >
<%
for i=1 to 9
response.write "<option value='0"&i&"'>0"&i&"</option>"
next
for i=10 to 23
response.write "<option value='"&i&"'>"&i&"</option>"
next
%>
</select>
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -