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

📄 admin_shopessay.asp

📁 大型黄页系统,精美黄页flash演示,10m
💻 ASP
字号:
<!--#include file="setup.asp" -->
<!--#include file="../inc/email.asp"-->
<%
Const maxperpage = 15
Dim totalPut, CurrentPage, TotalPages
Dim j, i
Dim totalnumber, maxpagecount, Pcount, tempPcount
Dim filename, bookmark
NC_Admin.AdminChk = "63"
NC_Admin.Check
DownsysClass.admin_header
Select Case Trim(Request("action"))
	Case "shenhe"
		Call ShenheEssay
	Case "del"
		Call DelEssay
	Case "delall"
		Call DelAllEssay
	Case Else
		Call EssayMain
End Select
If Founderr = True Then
	NC_Admin.Error_msg (ErrMsg)
End If
DownsysClass.admin_footer
NothingObject

Private Sub EssayMain()
	If Not IsEmpty(Request("page")) Then
		CurrentPage = CLng(Request("page"))
	Else
		CurrentPage = 1
	End If
	If Not IsNumeric(Request("page")) And Request("page") <> "" Then
		Response.Write "错误的系统参数!请输入整数"
		Err.Raise -19691969
	End If
	Response.Write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" class=""tableBorder"">" & vbCrLf
	Response.Write " <tr>" & vbCrLf
	Response.Write " <th nowrap>选择</th><th>留言询价标题</th><th nowrap>评 论 人</th><th nowrap>E-Mail</th><th nowrap>评论人IP</th><th nowrap>评论时间</th>" & vbCrLf
	Response.Write " </tr>" & vbCrLf
	Response.Write " <form name=""myform"" method=""post"" action=''>" & vbCrLf
	Set Rs = CreateObject("ADODB.Recordset")
	SQL = "select NC_ShopEssay.*,NC_Shopinfo.SoftName,NC_Shopinfo.SoftVer From NC_ShopEssay,NC_Shopinfo where NC_ShopEssay.softid = NC_Shopinfo.softid and NC_ShopEssay.shenhe = 0 order by postime desc"
	Rs.Open SQL, conn, 1, 1
	DownsysClass.SqlQueryNum = DownsysClass.SqlQueryNum + 1
	If Rs.bof And Rs.EOF Then
		Response.Write "<tr><td colspan=5 class=forumrow>还没有找到任何留言询价!</td></tr>"
	Else
		totalnumber = Rs.recordcount
		If (totalnumber Mod maxperpage) = 0 Then
			Pcount = totalnumber \ maxperpage
		Else
			Pcount = totalnumber \ maxperpage + 1
		End If
		Rs.MoveFirst
		If CurrentPage > Pcount Then CurrentPage = Pcount
		If CurrentPage < 1 Then CurrentPage = 1
		Rs.Move (CurrentPage - 1) * maxperpage
		bookmark = Rs.bookmark
		i = 0
		Do While Not Rs.EOF And i < CLng(maxperpage)
			Response.Write " <tr height=""21"">" & vbCrLf
			Response.Write " <td align=center class=forumRowHighlight><input type=checkbox name=Essayid value='"
			Response.Write Rs("id")
			Response.Write "'></td>" & vbCrLf
			Response.Write " <td class=forumRowHighlight><A HREF='../shopessay.asp?id="
			Response.Write Rs("softid")
			Response.Write "&ids="
			Response.Write Rs("id")
			Response.Write "' target=_blank>"
			Response.Write Rs("SoftName") & Rs("SoftVer")
			Response.Write "</A></td>" & vbCrLf
			Response.Write " <td nowrap class=forumRowHighlight align=center>"
			Response.Write Server.HTMLEncode(Rs("truename"))
			Response.Write "</td>" & vbCrLf
			Response.Write " <td nowrap align=center class=forumRowHighlight><A HREF=""admin_mailist.asp?action=mail&useremail="
			Response.Write Rs("usermail")
			Response.Write """><img src=""images/email.gif"" border=0></A></td>" & vbCrLf
			Response.Write " <td nowrap class=forumRowHighlight align=center>"
			Response.Write Rs("postip")
			Response.Write "</td>" & vbCrLf
			Response.Write " <td nowrap class=forumRowHighlight align=center>"
			Response.Write FormatDateTime(Rs("postime"), 2)
			Response.Write "</td>" & vbCrLf
			Response.Write " </tr>" & vbCrLf
			Response.Write " <tr height=""21"">" & vbCrLf
			Response.Write " <td colspan=6 class=forumRow><table width=""98%"" align=""center""><tr><td>"
			Response.Write DownsysClass.gotTopic(Rs("content"), 200)
			Response.Write "</td></tr></table></td>" & vbCrLf
			Response.Write " </tr>" & vbCrLf
			Rs.movenext
			i = i + 1
			If i >= maxperpage Then Exit Do
		Loop
	End If
	Rs.Close
	Set Rs = Nothing
	Response.Write " <tr height=""21"">" & vbCrLf
	Response.Write " <td align=center class=forumRowHighlight>管理</td>" & vbCrLf
	Response.Write " <td colspan=5 class=forumRow><input name=""chkAll"" type=""checkbox"" id=""chkAll"" onclick=CheckAll(this.form) value=""checkbox"">全选/反选 " & vbCrLf
	Response.Write " <input type=""radio"" name=""action"" value=""delall"">清空所有留言询价&nbsp;&nbsp;" & vbCrLf
	Response.Write " <input type=""radio"" name=""action"" value=""del"">批量删除&nbsp;&nbsp;" & vbCrLf
	Response.Write " <input type=""radio"" name=""action"" value=""shenhe"">批量审核&nbsp;&nbsp;" & vbCrLf
	Response.Write " <input type=submit name=Submit value=""执行操作"" class=button onclick=""{if(confirm('您确定执行此操作吗?')){this.document.myform.submit();return true;}return false;}""></td>" & vbCrLf
	Response.Write " </tr>" & vbCrLf
	Response.Write " </form>" & vbCrLf
	Response.Write " <tr height=""21"">" & vbCrLf
	Response.Write " <td colspan=6 class=forumRowHighlight>"
	Call showpage
	Response.Write "</td>" & vbCrLf
	Response.Write " </tr>" & vbCrLf
	Response.Write "</table>" & vbCrLf
End Sub

Private Sub ShenheEssay()
	Dim getpass
	Dim topic
	Dim mailbody
	Dim truename
	Dim useremail
	Dim title
	Dim Sucmsg
	Dim getpass1
	Dim topic1
	Dim mailbody1
	Dim truename1
	Dim useremail1
	Dim title1
	Dim Sucmsg1

	DownsysClass.Execute ("update NC_ShopEssay set shenhe=1 where id in (" & Request.Form("Essayid") & ")")
			If CInt(DownsysClass.Setting(13)) = 1  Then
			On Error Resume Next
			'发送注册邮件
	Dim LanguageStr,ii, Rss, SQLs
	LanguageStr = Split(Request.Form("Essayid"), ",")
	For ii = 0 To UBound(LanguageStr)

	Set Rs = CreateObject("ADODB.Recordset")
	SQL = "select * From NC_ShopEssay where id in (" & LanguageStr(ii) & ")"
	Rs.Open SQL, conn, 1, 1
	Set Rss = CreateObject("ADODB.Recordset")
	SQLs = "select * From NC_Shopinfo where softid = "& Rs("softid") &""
	Rss.Open SQLs, conn, 1, 1
	
			topic = "您在" & DownsysClass.Setting(0) & "发布的询价单"
			truename = Rs("truename")
			useremail = Rs("usermail")
			title = Rs("title")
			mailbody = "<html>"
			mailbody = mailbody & "<title>询价单信息</title>"
			mailbody = mailbody & "<body>"
			mailbody = mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
			mailbody = mailbody & "<TD valign=middle align=top>"
			mailbody = mailbody & ""& truename & ",您好:<br><br>"
			mailbody = mailbody & ""& topic &"已经通知客户<br>"
			mailbody = mailbody & "主题:"& title &"<br>"
			mailbody = mailbody & "谢谢您光顾" & DownsysClass.Setting(0) & "<br>"
			mailbody = mailbody & "<br><br>" & DownsysClass.Setting(0) & "<BR><BR>"
			mailbody = mailbody & "<center><font color=red>非常感谢您对我们站点的关注和对我们工作的支持!<BR>无论何时," & DownsysClass.Setting(0) & "都将会一如既往的给您提供优质的服务。</font>"
			mailbody = mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
			mailbody = mailbody & "</body>"
			mailbody = mailbody & "</html>"
			Select Case CInt(DownsysClass.Setting(10))
				Case 0
					Sucmsg = Sucmsg + "系统未开启邮件功能。\n"
				Case 1
					Call Jmail(useremail, topic, mailbody)
				Case 2
					Call Cdonts(useremail, topic, mailbody)
				Case 3
					Call aspemail(useremail, topic, mailbody)
				Case Else
					Sucmsg = Sucmsg + "系统未开启邮件功能。\n"
			End Select
			
			topic1 = "您在" & DownsysClass.Setting(0) & "有客户向您提交询价单"
			truename1 = Rss("truename")
			useremail1 = Rss("usermail")
			title1 = Rs("title")
			mailbody1 = "<html>"
			mailbody1 = mailbody1 & "<title>询价单信息</title>"
			mailbody1 = mailbody1 & "<body>"
			mailbody1 = mailbody1 & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
			mailbody1 = mailbody1 & "<TD valign=middle align=top>"
			mailbody1 = mailbody1 & ""& truename1 & " ,您好:<br><br>"
			mailbody1 = mailbody1 & ""& topic1 &"<br>"
			mailbody1 = mailbody1 & "主题:"& title1 &"<br>"
			mailbody1 = mailbody1 & "请及时登陆网站查看详细资料<br>"
			mailbody1 = mailbody1 & "<br><br>" & DownsysClass.Setting(0) & "<BR><BR>"
			mailbody1 = mailbody1 & "<center><font color=red>非常感谢您对我们站点的关注和对我们工作的支持!<BR>无论何时," & DownsysClass.Setting(0) & "都将会一如既往的给您提供优质的服务。</font>"
			mailbody1 = mailbody1 & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
			mailbody1 = mailbody1 & "</body>"
			mailbody1 = mailbody1 & "</html>"
			Select Case CInt(DownsysClass.Setting(10))
				Case 0
					Sucmsg = Sucmsg + "系统未开启邮件功能。\n"
				Case 1
					Call Jmail(useremail1, topic1, mailbody1)
				Case 2
					Call Cdonts(useremail1, topic1, mailbody1)
				Case 3
					Call aspemail(useremail1, topic1, mailbody1)
				Case Else
					Sucmsg = Sucmsg + "系统未开启邮件功能。\n"
			End Select

		Next
			If SendMail = "OK" Then
				Sucmsg = Sucmsg + "邮件已发送成功!\n"
			Else
				Sucmsg = Sucmsg + "由于系统错误,发送的邮件资料未成功。\n"
			End If
		End If
			Rs.Close
	Set Rs = Nothing
	Response.Write "<script>alert('邮件已发送成功!');location.href=""admin_shopessay.asp""</script>"
	Err.Raise -19691969

End Sub

Private Sub DelEssay()
	DownsysClass.Execute ("delete from NC_ShopEssay where id in (" & Request.Form("Essayid") & ")")
	Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
	Err.Raise -19691969

End Sub


Private Sub DelAllEssay()
	DownsysClass.Execute ("delete from NC_ShopEssay")
	Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
	Err.Raise -19691969
End Sub


Private Sub showpage()
	Dim filename
	Dim n
	Dim ii
	filename = "admin_shopessay.asp"
	If totalnumber Mod maxperpage = 0 Then
		n = totalnumber \ maxperpage
	Else
		n = totalnumber \ maxperpage + 1
	End If
	Response.Write "<table cellspacing=1 width='100%' border=0><form method=Post action=" & filename & "><tr><td align=center> " & vbCrLf
	If CurrentPage < 2 Then
		Response.Write "共有评论 <font COLOR=#FF0000><B>" & totalnumber & "</B></font> &nbsp;首 页&nbsp;上一页&nbsp;"
	Else
		Response.Write "共有评论 <font COLOR=#FF0000><B>" & totalnumber & "</B></font> &nbsp;<a href=" & filename & "?page=1>首 页</a>&nbsp;"
		Response.Write "<a href=" & filename & "?page=" & CurrentPage - 1 & ">上一页</a>&nbsp;"
	End If
	If n - CurrentPage < 1 Then
		Response.Write "下一页&nbsp;尾 页 " & vbCrLf
	Else
		Response.Write "<a href=" & filename & "?page=" & (CurrentPage + 1) & ">下一页</a>"
		Response.Write "&nbsp;<a href=" & filename & "?page=" & n & ">尾 页</a>" & vbCrLf
	End If
	Response.Write "&nbsp;页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
	Response.Write "&nbsp;转到:"
	Response.Write "&nbsp;<select name='page' size='1' style=""font-size: 9pt"" onChange='javascript:submit()'>" & vbCrLf
	For ii = 1 To n
		Response.Write "<option value='" & ii & "' "
		If CurrentPage = Int(ii) Then
			Response.Write "selected "
		End If
		Response.Write ">第" & ii & "页</option>"
	Next
	Response.Write "&nbsp;</select> " & vbCrLf
	Response.Write "</td></tr></FORM></table>" & vbCrLf
End Sub
%>

⌨️ 快捷键说明

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