📄 user_softessays.asp
字号:
<!--#include file="setup.asp" -->
<!--#include file="inc/email.asp"-->
<link href="style.css" rel="stylesheet" type="text/css">
<%
Const maxperpage = 15
Dim sortname
Dim strSortid
Dim GroupSet
Dim GroupName
Dim DownloadClass_Ads
Dim NowStats
Dim HtmlTitle
Dim Style_CSS
Dim HtmlTempStr
Dim TempTopStr
Dim TempFootStr
Dim isEdit
Dim Rs1
Dim Rs2
Dim Rs3
dim SQL3
Dim Rs4
Dim SQL4
Dim Rs5
Dim SQL5
Dim Rs6
Dim SQL6
Dim softTitle
Dim sortid
Dim rootid
Dim selSoftid
Dim SiteRs
Dim pubSoftID
Dim strSortName
Dim TxtContent
Dim keyword
Dim findword
Dim ii
Dim datNowTime
Dim ParentID
Dim strParent
Dim Child
Dim depth
Dim TotalPageNum
Dim n
Dim pagestart
Dim pageend
Dim ArraySoftid
Dim selSortid
Dim pagination
Dim GotoPageType
Dim SoftBody
Dim WhereSQL
Dim totalPut, CurrentPage, TotalPages
Dim j, i
Dim totalnumber, maxpagecount, Pcount, tempPcount
Dim filename, bookmark
NC_Admin.AdminChk = "17"
NC_Admin.Check
DownsysClass.PublishSoft
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=""750"" 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
Dim RS1, SQL1
Set Rs1 = CreateObject("ADODB.Recordset")
SQL1 = "select * From NC_User where username like '%"&DownsysClass.memberName&"%'"
Rs1.Open SQL1, conn, 1, 1
Set Rs = CreateObject("ADODB.Recordset")
SQL = "select NC_SoftEssay.*,NC_SoftInfo.SoftName,NC_SoftInfo.SoftVer From NC_SoftEssay,NC_SoftInfo where NC_SoftEssay.softid = NC_SoftInfo.softid and NC_SoftEssay.truename like '%"&Rs1("truename")&"%' 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='../softessay.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"">清空所有留言询价 " & vbCrLf
Response.Write " <input type=""radio"" name=""action"" value=""del"">批量删除 " & vbCrLf
Response.Write " <input type=""radio"" name=""action"" value=""shenhe"">批量审核 " & 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_SoftEssay 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_SoftEssay where id in (" & LanguageStr(ii) & ")"
Rs.Open SQL, conn, 1, 1
Set Rss = CreateObject("ADODB.Recordset")
SQLs = "select * From NC_Softinfo 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_softessay.asp""</script>"
Err.Raise -19691969
End Sub
Private Sub DelEssay()
DownsysClass.Execute ("delete from NC_SoftEssay 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_SoftEssay")
Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
Err.Raise -19691969
End Sub
Private Sub showpage()
Dim filename
Dim n
Dim ii
filename = "admin_softessay.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> 首 页 上一页 "
Else
Response.Write "共有评论 <font COLOR=#FF0000><B>" & totalnumber & "</B></font> <a href=" & filename & "?page=1>首 页</a> "
Response.Write "<a href=" & filename & "?page=" & CurrentPage - 1 & ">上一页</a> "
End If
If n - CurrentPage < 1 Then
Response.Write "下一页 尾 页 " & vbCrLf
Else
Response.Write "<a href=" & filename & "?page=" & (CurrentPage + 1) & ">下一页</a>"
Response.Write " <a href=" & filename & "?page=" & n & ">尾 页</a>" & vbCrLf
End If
Response.Write " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
Response.Write " 转到:"
Response.Write " <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 " </select> " & vbCrLf
Response.Write "</td></tr></FORM></table>" & vbCrLf
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -