📄 publish.asp
字号:
<%OPTION EXPLICIT%>
<!--#include file="Include/Config.asp"-->
<!--#include file="Include/SQLUser.asp"-->
<!--#include file="Include/Conn.asp"-->
<!--#include file="Include/IPLockUser.asp"-->
<!--#include file="Include/Style.asp"-->
<html>
<head>
<title>发布文章__<%=WebSiteName%></title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<meta http-equiv="Content-Language" Content="zh-CN">
<meta name="Keywords" Content="<%=WebSiteMKeywords%>">
<meta name="Description" Content="<%=WebSiteMDescription%>">
<link type="text/css" rel="stylesheet" href="Include/Style.css">
<link type="text/css" rel="stylesheet" href="Style/<%=WebSiteStyle%>/Style.css">
<Script Language="JavaScript" src="Include/Function.js"></Script>
<Script Language="JavaScript" src="Include/PopText.js"></Script>
<Script Language="JavaScript">
<!--
function PublishResource_Check() {
if (document.PublishResource.Ar_Name.value=="") {
JS_M_Ar_Name.innerHTML="<font color=#FF0000>请填写文章标题</font>"
document.PublishResource.Ar_Name.focus();
return (false);
}
if (document.PublishResource.Ar_SortID.value=="") {
JS_M_Ar_SortID.innerHTML="<font color=#FF0000>请选择文章类别</font>"
document.PublishResource.Ar_SortID.focus();
return (false);
}
if (document.PublishResource.Ar_AsSortID.value=="") {
JS_M_Ar_SortID.innerHTML="<font color=#FF0000>请选择文章分类</font>"
document.PublishResource.Ar_AsSortID.focus();
return (false);
}
if (document.PublishResource.Ar_Content.value=="") {
JS_M_Ar_Content.innerHTML="<font color=#FF0000>请填写文章内容</font>"
document.PublishResource.Ar_Content.focus();
return (false);
}
return true;
}
//-->
</Script>
</head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<!--#include file="Include/Top.asp"-->
<!--#include file="Include/Menu.asp"-->
<!--#include file="Include/Ads2.asp"-->
<center>
<table border="0" cellpadding="0" cellspacing="1" width="780" height="10" class="T_BGColor_1">
<tr>
<td width="205" class="T_TD_BGColor_1_1" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" height="10">
<tr>
<td height="8"></td>
</tr>
<%if PublishSearchShow="1" then%>
<tr>
<td height="40" background="Style/<%=WebSiteStyle%>/TD_T_Bg_L.gif"><table border="0" cellpadding="0" cellspacing="0" width="188" height="26"><tr><td width="45" align="right"><img src="Style/<%=WebSiteStyle%>/TD_T_Search.gif" width="26" height="26" border="0"></td><td width="140" valign="bottom"><font class="WSText"><%=PublishSearchTitle%></font></td></tr></table></td>
</tr>
<tr>
<td height="10" align="center" valign="top"><!--#include file="Include/Search.asp"--></td>
</tr>
<%end if%>
<tr>
<td height="1" align="center" valign="top"><!--#include file="Include/Ads7.asp"--></td>
</tr>
<%if PublishHitsShow="1" then%>
<tr>
<td height="40" background="Style/<%=WebSiteStyle%>/TD_T_Bg_L.gif"><table border="0" cellpadding="0" cellspacing="0" width="188" height="26"><tr><td width="45" align="right"><img src="Style/<%=WebSiteStyle%>/TD_T_Hits.gif" width="26" height="26" border="0"></td><td width="140" valign="bottom"><font class="WSText"><%=PublishHitsTitle%></font></td></tr></table></td>
</tr>
<tr>
<td height="10"><%
dim rsWeekHits
set rsWeekHits=Server.CreateObject("Adodb.RecordSet")
GuSQL="select top "&PublishHitsNum&" Ar_ID,Ar_Name,Ar_NameColor,Ar_Show,Ar_DateTime,Ar_WeekHits from "&GuTablePrefix&"_Article where Ar_Show='1' and Ar_UserPublish='0' order by Ar_WeekHits desc,Ar_ID desc"
rsWeekHits.open GuSQL,GuConn,1,1
if rsWeekHits.eof and rsWeekHits.bof then
Response.write "<br> <font class=""SilverS12"">没有找到相关数据</font><br><br>"
else
do while not rsWeekHits.eof
Response.write " <img src=""Style/"&WebSiteStyle&"/Title_02.gif"" border=""0""><a href=""Article.asp?ID="&rsWeekHits("Ar_ID")&""" style=""color:"&rsWeekHits("Ar_NameColor")&""" class=""BlackV12"" title="""&rsWeekHits("Ar_Name")&" "&rsWeekHits("Ar_DateTime")&""">"&GuStringCut(rsWeekHits("Ar_Name"),24)&"</a><br>"
rsWeekHits.movenext
loop
end if
rsWeekHits.close
set rsWeekHits=Nothing
%></td>
</tr>
<%end if%>
<tr>
<td height="1"></td>
</tr>
</table></td>
<td width="572" class="T_TD_BGColor_1_2" align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="98%" height="10">
<tr>
<td height="8"></td>
</tr>
<tr>
<td height="40" background="Style/<%=WebSiteStyle%>/TD_T_Bg_R.gif"><table border="0" cellpadding="0" cellspacing="0" width="288" height="26"><tr><td width="45" align="center"><img src="Style/<%=WebSiteStyle%>/TD_T_Publish.gif" width="26" height="26" border="0"></td><td width="240" valign="bottom"><font class="WSText">用 户 发 布 文 章</font></td></tr></table></td>
</tr>
<tr>
<td height="6"></td>
</tr>
<tr>
<td height="10" align="center" valign="top">
<%
if PublishAllow="1" and Trim(Request.Form("GuComm"))="PublishResource" then
dim Ar_Name,Ar_SortID,Ar_AsSortID,Ar_Type,Ar_Country,Ar_Licence,Ar_Language,Ar_Size,Ar_RunEnv,Ar_InstallNote,Ar_From,Ar_FromURL,Ar_Author,Ar_AuthorEmail,Ar_Content,Ar_Content2,Ar_Download1,Ar_Download2,Ar_Username
Ar_Name=Trim(Request.Form("Ar_Name"))
Ar_SortID=Trim(Request.Form("Ar_SortID"))
Ar_AsSortID=Trim(Request.Form("Ar_AsSortID"))
Ar_From=Trim(Request.Form("Ar_From"))
Ar_FromURL=Trim(Request.Form("Ar_FromURL"))
Ar_Author=Trim(Request.Form("Ar_Author"))
Ar_AuthorEmail=Trim(Request.Form("Ar_AuthorEmail"))
Ar_Content=Trim(Request.Form("Ar_Content"))
Ar_Username=Trim(Request.Form("Ar_Username"))
if PublishValidationCode="1" and UCase(Trim(Request.Form("GuValidationCodeInput")))<>Request.Cookies("GuValidationCodeCookies") then
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""RedS12"">提交失败,验证码输入错误</font></td></tr></table></center>"
elseif Ar_Name="" or Ar_SortID="" or Ar_AsSortID="" or Ar_Content="" then
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""RedS12"">提交失败,请将文章信息填写完整</font></td></tr></table></center>"
elseif Len(Trim(Request.Form("Ar_Content")))>PublishContentKB then
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""RedS12"">提交失败,文章内容字数超过了限制</font></td></tr></table></center>"
else
dim rsPu1
set rsPu1=Server.CreateObject("Adodb.RecordSet")
rsPu1.open "select * from "&GuTablePrefix&"_Article where Ar_Name='"&Ar_Name&"' and Ar_AsSortID="&Ar_AsSortID,GuConn,1,1
if not(rsPu1.bof and rsPu1.eof) then
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""RedS12"">提交失败,同一分类下已有相同的文章标题存在</font></td></tr></table></center>"
else
dim rsPu2
set rsPu2=Server.CreateObject("Adodb.RecordSet")
rsPu2.open "select * from "&GuTablePrefix&"_Article where Ar_Name='"&Trim(Request.Form("Ar_Name"))&"'",GuConn,1,3
GuSQL="select * from "&GuTablePrefix&"_Article where (Ar_ID is null)"
rsPu2.addnew
rsPu2("Ar_SortID")=Ar_SortID
rsPu2("Ar_AsSortID")=Ar_AsSortID
rsPu2("Ar_Name")=Ar_Name
rsPu2("Ar_NameColor")="Silver"
rsPu2("Ar_FromURL")=Ar_FromURL
rsPu2("Ar_From")=Ar_From
rsPu2("Ar_Author")=Ar_Author
rsPu2("Ar_AuthorEmail")=Ar_AuthorEmail
rsPu2("Ar_Show")="0"
rsPu2("Ar_CommendB")="0"
rsPu2("Ar_Keyword")=""
rsPu2("Ar_Content")=Ar_Content
rsPu2("Ar_UserPublish")="1"
rsPu2("Ar_Username")=Ar_Username
rsPu2("Ar_IP")=GuUserIP
rsPu2("Ar_DateTime")=date()
rsPu2("Ar_DayDate")=Now()
rsPu2("Ar_DayHits")=0
rsPu2("Ar_WeekDate")=Now()
rsPu2("Ar_WeekHits")=0
rsPu2("Ar_MonthDate")=Now()
rsPu2("Ar_MonthHits")=0
rsPu2("Ar_AllHits")=0
rsPu2.update
rsPu2.close
set rsPu2=Nothing
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_09.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""BlueS12"">文章信息已提交成功,感谢你的发布</font></td></tr></table></center>"
end if
rsPu1.close
set rsPu1=Nothing
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -