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

📄 admin_guestbook.asp

📁 政府网站集成OA办公考勤新闻发布网站信息管理会员管理
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_FrontSetFeedback")<>1 then HX_GoBack "对不起,您的权限不够!","" %>
<head>
<title>后台管理 &gt;&gt; 投诉反馈管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../HXinclude/HX_Style.css" rel="stylesheet" type="text/css">
</head>
<body topmargin='20' leftmargin='0' bottommargin='0'>

<%
    dim indexfilename,indeximg,txt,action_e,rscount,sqlCount,page2,m,unhtmlgl,nowtime,cText,startubb,endubb_a,endubb_b,endubb,server_v1,server_v2
    indexfilename=right(Request.ServerVariables("PATH_TRANSLATED"),(len(Request.ServerVariables("PATH_TRANSLATED"))-instrRev(Request.ServerVariables("PATH_TRANSLATED"),"\"))) 
    indeximg="Images/" '图片文件夹
    n=6 '每页显示留言数
    x=5  '每页显示的页数
    txt=1000  '留言的最大字数
    dim webtitle,webname,webyn,webgl,webyn2,view2
    set rs1 = conn.execute("select * From a125_Set")

    if rs1("gbyn")<>"" then webyn=rs1("gbyn")
    webgl=rs1("gl")
    rs1.close
    set rs1=nothing
    '设置页脚信息,这里可以加入你的地址
    page =Request.QueryString("page")
    if page="" or page=0 then page=1
    action = Request.QueryString("action")
    action_e = Request.Form("action_e")
    if action_e <>"" then
    server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
    server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
    if mid(server_v1,8,len(server_v2))<>server_v2 then 
    response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>" 
    response.write "<tr><td style='font:9pt Verdana'>" 
    response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱该参数!"
    response.write "</td></tr></table></center>"
    response.end
    end if
    end if
%>
<script language="JavaScript">
    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("留言不能超过 <%=txt%> 个字!");
    }
    else {
    used.value = message.value.length;
    remain.value = max - used.value;
    }
    }
</script>
<table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#115F8F'><tr><td colspan='2' bgcolor=ffffff>
 <table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>投诉反馈管理</font></td></tr></table>

<%
    '主程序
    Select Case action_e
    Case ""
    Case "reply"
    Call Reply_Execute()
    Case "admin"
    Call Admin_Login_Execute()
    Case "EditPWD"
    Call EditPWD_Execute()
    Case "Edit"
    Call Edit_Execute()
    Case "Edit_web"
    Call Edit_web()
    End Select
    Call Main_Menu()
    Select Case action
    Case "UbbHelp"
    Call UbbHelp()
    Case "Admin_Login"
    Call Admin_Login()
    Case "Exit"
    Call Exit_Admin()
    Call View_a125_gb()
    Case ""	
    Call View_a125_gb()
    Case "Add_New"
    Call Add_New()
    Case "reply"
    Call Reply()
    Case "View_a125_gb"
    Call View_a125_gb()
    Case "Delete"
    Call Delete()
    Call View_a125_gb()
    Case "EditPWD"
    Call EditPWD()
    Case "Edit"
    Call Edit()
    Case "Edit_web"
    Call Edit_web()
    End Select
%>
</td></tr></table>
<% Sub Main_Menu() %>
 <table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor='#A1BBE0'>
   <tr bgcolor='#F6F6F6'><td><div align="left">
<%
    if webyn=1 then
    set rscount=server.createobject("adodb.recordset")
    sqlCount="select count(View) from a125_gb where view=0"
    rsCount.open sqlCount,conn,1,1
    if RsCount(0)=0 then
    response.write "<font color=#FF0000>您暂时没有未处理的留言</font>"
    else
    response.write "<font color=#FF0000>您还有<b> " & rsCount(0) & " </b>条留言未处理</font>"
    rsCount.close
    end if
    else
    response.write "您没有设置留言审核功能"
    end if
%>
&nbsp;&nbsp;&nbsp;<a href="?cl=no">未处理邮件</a>&nbsp;&nbsp;<a href="?cl=yes">已处理邮件</a>&nbsp;&nbsp;<a href="?cl=all">全部邮件</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?action=Edit_web">基本设置</a>
</div></td>
</tr>
</table>
<%
    End Sub
    '''''''''''''''''''''''
    '查看留言
    Sub View_a125_gb()
    dim gbcount,y,j,k
       if request("cl")="yes" then
    set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view=1")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开留言字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=1 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=1 Order By id Desc"
    end if
    end if
    
           if request("cl")="no" then
    set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view=0")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开留言字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=0 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view=0 Order By id Desc"
    end if
    end if
            if request("cl")="all" or request("cl")="" then
    set rs = conn.execute("select COUNT(*) as gbcount From a125_gb where view<2")
    gbcount=rs("gbcount")
    rs.close
    if gbcount/n = int(gbcount/n) then '计算出分页数
    y=int(gbcount/n)
    else
    y=int(gbcount/n)+1
    end if
    page2= int(page/x)
    if page/x>page2 then page2=page2+1
    k=page2*x
    if k>y then k=y
    '打开留言字段'
    if page=1 then
    sql="select top "&n&" id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view<2 Order By id Desc"
    else
    sql="select id,name,sex,web,email,title,a125_gb,date,reply,ip,come,view,qq,phone From a125_gb where view<2 Order By id Desc"
    end if
    end if
 
    if Page >100 then
    rs.Open sql,Conn,1
    else
    Set Rs=Conn.Execute(sql)
    end if
    if Page>1 then RS.Move n*page-n
%>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%" height="20" >
有<%=gbcount %>条留言 <%=page %>/<%=y %>页 分页 <a href="?page=1"><<</a>
<% if page2>1 then %>
  <a href="<%=indexfilename%>?page=<%=page2*x-x%>"><</a>
<% end if %>
<% For m =page2*x-(x-1) To k %>
[<a href="<%=indexfilename%>?page=<%=m%>"><%=m%></a>]
<% Next %>
<% if page2*x < y then %>
<a href="<%=indexfilename%>?page=<%=m%>">></a>
<% end if %>
	  <a href="?page=<%=y %>">>></a>
</td></tr></table>


<% if rs.bof  and rs.eof then Response.Write "当前没有留言记录" %>
<%
    dim lou,a125_gb,reply,email,qq,web,come,phone
    if Request.QueryString("page")<2 then
    lou=gbcount
    else
    lou=gbcount-((Request.QueryString("page")-1)*n)
    end if
    i=0
    do while not rs.eof and i<n
    i=i+1
    reply=""
    a125_gb=""  
    a125_gb=rs("a125_gb")
    reply=rs("reply")
%>
<table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor='#f1f1f1'><TBODY>
 <tr bgcolor='#A1BBE0' class='td4'><TD colSpan=2 height=25>
  <table width="100%" height="31"  border="0" background="Images/a125_gbdaohang.gif" class="unnamed1"><tr>  
    <td height="21">&nbsp;&nbsp;主题:<b><%=rs("title")%></b></td>            
    <td> 
<div align="right">
<% if len(trim(rs("web")))>8  then %>
                <a href="<%=rs("web")%>" target="_blank"><img src="../<%=indeximg%>a125_homepage.gif" alt="<%=rs("web")%>" width=16 height=16 border="0"></a>
<% end if %>
<% if len(trim(rs("email")))>6  then %>
             	<a href="mailto:<%=rs("email")%>"><img src="../<%=indeximg%>a125_email.gif" alt="<%=rs("email")%>" width="16" height="16" border="0"></a> 
<% end if %>
<% if len(trim(rs("qq")))>3  then %>
                <img src="../<%=indeximg%>a125_oicq.gif" alt="<%=Rs("qq")%>" width="16" height="16" border="0">
<% end if %>
<% if len(trim(rs("phone")))>3  then %>
                <img src="../<%=indeximg%>phone.gif" alt="<%=Rs("phone")%>" width="16" height="16" border="0">
<% end if %>

⌨️ 快捷键说明

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