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

📄 reply.asp

📁 网络书生留言本单用户 v1.0 正式版源码,大家下了就知道怎么用了!
💻 ASP
字号:
<!--#include file="Gbconn.asp" -->
<!--#include file="char.asp" -->
<!--#include file="eof.asp" -->
<%
If request.Cookies("qzenetgbuser")="" then
response.Redirect("guestbook.asp")
Else
if request.QueryString("reply")="saves" then
Call saves()
else
Call reply()
end if

Sub reply()
dim rid,pageno
rid = request.QueryString("rid")
pageno = request.QueryString("page")
set rs=server.createobject("adodb.recordset")
sql="select * from gb where id="&rid&""
rs.open sql,conn,1,1
if not (rs.eof and rs.bof) then
dim g_name,g_email,g_page,g_oicq,g_address,g_face,g_content,g_ip,g_se,g_time
g_name=rs("g_name")
g_email=rs("g_email")
g_page=rs("g_page")
g_oicq=rs("g_oicq")
g_address=rs("g_address")
g_face=rs("g_face")
g_content=rs("g_content")
g_ip=rs("g_ip")
g_se=rs("g_se")
g_time=rs("g_time")
end if
%>
<table width="600" align="center" cellpadding="0" cellspacing="0" class="tableg1">
  <tr> 
    <td width="120" valign="top" class="lineh">
	<table width="100%" border="0">
        <tr> 
          <td height="50" align="center"> 
           <%
		  response.Write("<img src='"&g_face&"' width='32' height='32'>")		   
		  %>
          </td>
        </tr>
        <tr> 
          <td height="20" align="center"> 
            <%
		  response.Write(g_name)  
		  %>
          </td>
        </tr>
        <tr> 
          <td height="20" align="center">来自: 
            <%
		  response.Write(g_address)			   
		  %>
          </td>
        </tr>
      </table></td>
    <td valign="top">
	<table width="100%" border="0">
        <tr> 
          <td class="linewb">
		  <table width="100%" border="0">
              <tr align="center" valign="bottom"> 
                <td width="30"> 
                  <%
				  if g_email<>"" then
				           response.Write("<a href='mailto:"&g_email&"' title='给"&g_name&"发信'><img src=images/email.gif width=16 height=18 border=0></a>")
				  end if
				 %>
                </td>
                <td width="30"> 
                  <%if g_page<>"" then
						   response.Write("<a href='"&g_page&"' 'target=_blank' title='"&g_name&"的主页'><img src=images/page.gif width=16 height=18 border=0></a>")
				   end if%>
                </td>
                <td width="30"> 
                  <%if rs("g_oicq")<>"" then
						   response.Write("<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&g_oicq&"' title='QQ["&g_oicq&"]的情况' target='_blank'><img src=images/qq.gif width=16 height=18 border=0></a>")				  
				   end if%>
                </td>
                <td width="80" align="right">
                  <%
		  if g_se=true then
		      response.Write("<font color='#FF0000'><b>悄悄话</b></a>")  
		  end if		   
		%>
                </td>
                <td width="80" align="right"><a href="del.asp?del=gb&page=<%=pageno%>&did=<%=rid%>" onclick="{if(confirm('确实要删除这条留言吗?')){return true;}return false;}">删除</a> 
                </td>
                <td align="right"><%=g_time%></td>
                <td width="30" align="right"> 
                  <%response.Write("<img src='images/ip.gif' width='16' height='18' alt='"&g_ip&"'>")%>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td valign="top" class="linecc"> 
            <%response.Write(g_content)%>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
<%rs.close%>
<SCRIPT language=javascript id=QzeNet>
<!--
function reply_onsubmit() 
{
   if(document.reply.r_content.value.length==0)
 {
   alert("总该写几句吧:)");
   document.reply.r_content.focus();
   return false;
 }
    if(document.reply.r_content.value.length>600)
 {
   alert("写太多了,不要超过600字哦!");
   document.reply.r_content.focus();
   return false;
 }	
}
//-->
</SCRIPT>
<table width="600" align="center" cellpadding="0" cellspacing="0" class="tableg2">
  <Form language=javascript name="reply" method="post" action="?reply=saves" onsubmit="return reply_onsubmit()">
    <tr> 
      <td width="120" align="center" class="lineh"> 
        <p> <img src="images/reply.gif" width="32" height="32"> <br>
        <strong>站长回复</strong></p></td>
    <td>
	<table width="100%" border="0">
        <tr> 
          <td><textarea name="r_content" cols="60" rows="3" id="r_content"></textarea>
            </td>
        </tr>
        <tr> 
          <td align="center">
		    <input name="page" type="hidden" id="page" value="<%=pageno%>">
              <input type="hidden" name="gid" value="<%=rid%>"> 
              <input type="submit" name="Submit2" value="写好了" style="height:20px">&nbsp;&nbsp;
            <input type="reset" name="Submit3" value="重新写" style="height:20px">
              [支持 UBB 语法] </td>
        </tr>
      </table></td>
  </tr></form>
</table>
<%
end sub
Sub saves()
dim gid,pageno,r_contnet
gid=request.Form("gid")
pageno=request.Form("page")
r_content=UBB(request.Form("r_content"))
conn.Execute("Insert into reply(gid,r_content) values("&gid&",'"&r_content&"')") 
conn.close
response.Redirect("guestbook.asp?pageno="&pageno&"")
end sub
End if
%>
<!--#include file="bof.asp" -->

⌨️ 快捷键说明

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