📄 user_down.asp
字号:
pass=false
end if
else
jifen=0
money=0
popedom=0
isgood=false
istop=false
pass=false
if fabuPass=0 then
pass=true
elseif fabuPass=1 then
pass=false
end if
end if
if Request.form("allowPl")="true" then
allowpl=true
else
allowpl=false
end if
for i=1 to 4
urlstr=request.form("url"&i)
urltitle=request.form("urltitle"&i)
if urlstr<>"" then
if urltitle="" then
url=url&urlstr&"$:下载地址|"
else
url=url&urlstr&"$:"&urltitle&"|"
end if
end if
next
if url<>"" then
if len(url)=inStrRev(url,"|") then
url=left(url,InStrRev(url,"|")-1)
end if
end if
if trim(title)="" then
errmsg="<li>请您输入下载标题</li>"
end if
if trim(keyword)="" then
errmsg=errmsg&"<li>请您输入关键词</li>"
end if
if downclass="" then
errmsg=errmsg&"<li>请您选择新闻所属分类</li>"
else
clStr=split(downclass,",")
if ubound(clStr)=1 then
catid=clStr(0)
classId=clStr(1)
else
errmsg=errmsg&"<li>您输入的分类ID不正确</li>"
end if
end if
if trim(content)="" then
errmsg=errmsg&"<li>请您输入简介内容</li>"
end if
if not isNumeric(jifen) then
errmsg=errmsg&"<li>您输入的"&pointName&"值不正确,"&pointName&"值应为数字型整数</li>"
end if
if not isNumeric(money) then
errmsg=errmsg&"<li>您输入的"&moneyName&"值不正确,"&moneyName&"值应为数字型整数</li>"
end if
if trim(url)="" then
errmsg=errmsg&"<li>请您填上至少一个下载地址</li>"
end if
if errmsg<>"" then
showmsg "<font color=""#ff0000"">系统发生如下错误:</font><br>"&errmsg,"出错信息"
errmsg=""
exit sub
end if
if ms_submit=0 then
if chkIsOut=false then
showmsg "<font color=""#ff0000"">茂盛系统返回提示信息:</font><br><br>对不起,本站不允许从外部提交数据","系统出错信息"
exit sub
end if
end if
if action=lcase("maosin_savemdf") then
sql="select * from ms_down where id="&id
else
sql="select * from ms_down where (id is null)"
end if
Set urs=Server.CreateObject("ADODB.RecordSet")
urs.open sql,connstr,1,3
if action<>lcase("maosin_savemdf") then
urs.AddNew
end if
urs("catID")=catID
urs("classID")=classID
urs("down_title")=chkFormStr(title)
urs("titlecolor")=chkColor(titlecolor)
urs("down_keyword")=chkFormStr(replace(keyword,"|",","))
urs("down_size")=ChkFormStr(downsize)
urs("down_mode")=ChkFormStr(accmode)
urs("down_roof")=ChkFormStr(approof)
urs("language")=ChkFormStr(language)
urs("down_commend")=ChkFormStr(star)
urs("down_guanfang")=ChkFormStr(guanfang)
urs("down_demo")=ChkFormStr(demo)
urs("imgurl")=ChkFormStr(imgurl)
urs("down_url")=replace(url,"'","")
if action<>lcase("maosin_savemdf") then
urs("down_date")=now()
urs("post_member")=userinfo(1)
end if
urs("down_content")=filterKeyWord(ubbCode(content,1,0,0,1))
urs("pass")=pass
urs("down_good")=isgood
urs("down_istop")=istop
urs("allow_pl")=allowpl
urs("popedom")=popedom
urs("jifen")=jifen
urs("money")=money
urs("popedom")=popedom
urs.Update
urs.close
set urs=nothing
if fabupass=0 and action<>lcase("maosin_savemdf") then
conn.execute("update ms_user set user_money=user_money+"&fabuPointNum&" where user_id="&cint(userinfo(0))&" and user_name='"&userinfo(1)&"'")
userinfo=session("userinfo")
userinfo(3)=userinfo(3)+fabuPointNum
session("userinfo")=userinfo
end if
if action=lcase("maosin_savemdf") then
showmsg "<li>恭喜恭喜,您提交的数据已成功保存</li><br><span id=seNum>3</span><a href=javascript:showtime></a>秒钟后系统将自动返回下载管理页......</b><meta http-equiv=refresh content=3;url=user_publish.asp?channel=down&action=downList><SCRIPT>valignbottom()</SCRIPT><script>function showtime(secs){seNum.innerText=secs;if(--secs>0)setTimeout('showtime('+secs+')',1000);}showtime(3);</script>","操作成功信息"
else
showmsg "<li>恭喜您,提交已成功保存</li><br><span id=seNum>3</span><a href=javascript:showtime></a>秒钟后系统将自动返回下载管理页......</b><meta http-equiv=refresh content=3;url=user_publish.asp?channel=down&action=downList><SCRIPT>valignbottom()</SCRIPT><script>function showtime(secs){seNum.innerText=secs;if(--secs>0)setTimeout('showtime('+secs+')',1000);}showtime(3);</script>","操作成功信息"
end if
exit sub
End Sub
sub downList()
dim mytitle
if Request("list")="1" then
sql="select * from ms_down where post_member='"&userinfo(1)&"' order by down_date desc"
mytitle="我的全部下载"
elseif Request("list")="2" then
sql="select * from ms_down where pass=true and post_member='"&userinfo(1)&"' order by down_date desc"
mytitle="通过审核的下载"
elseif Request("list")="3" then
sql="select * from ms_down where pass=false and post_member='"&userinfo(1)&"' order by down_date desc"
mytitle="没有通过审核的下载"
else
sql="select * from ms_down where post_member='"&userinfo(1)&"'"
end if
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableBC">
<tr>
<td height="22" colspan="3" valign="middle" class="tdT">我的全部下载</td>
</tr>
<tr class="tdBC">
<td width="420" height="22" valign="middle">标题</td>
<td width="80" align="center" valign="middle">状态</td>
<td width="80" align="center" valign="middle">管理操作</td>
</tr>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,connstr,1,1
dim downList(7),tempStr:tempStr=""
dim n:n=20
url="user_publish.asp?channel=down&action=downList&list=1&"
nextpage=pagetitle(rs,n,url,"篇下载")
dim lineNo:lineNo=1
if not rs.eof and not rs.bof then
do while not rs.eof and lineNo<=rs.pagesize
downList(0)=rs("id")
downlist(4)="下载标题:"&rs("down_title")&" 发表日期:"&rs("down_date")&" 录入会员:"&rs("post_member")&" 阅读次数:"&rs("down_clicks")
downList(1)="<a href=""showdown.asp?id="&downList(0)&""" title="""&downList(4)&"""><font color="""&rs("titlecolor")&""">"&rs("down_title")&"</font></a>"
if rs("pass")=true then
downList(2)="核(<font color=""#ff0000"">√</font>)"
downList(5)="<font color=""#707070"">修改</font> "
downList(6)="<font color=""#707070"">删除</font>"
else
downList(5)="<a href=""user_publish.asp?channel=down&action=maosin_mdfdown&id="&downList(0)&""">修改</a> "
downList(6)="<a href=""user_publish.asp?channel=down&action=maosin_deldown&id="&downList(0)&""">删除</a>"
downList(2)="核(<font color=""#ff0000"">×</font>)"
end if
if rs("down_good")=true then
downList(2)=downList(2)&" 荐(<font color=""#ff0000"">√</font>)"
else
downList(2)=downList(2)&" 荐(<font color=""#ff0000"">×</font>)"
end if
downList(3)=rs("down_date")
tempStr=tempStr&"<tr class=""tdBC""><td height=""22"" valign=""middle"">"&downList(1)&"</td><td valign=""middle"" align=""center"">"&downList(2)&"</td><td valign=""middle"" align=""center"">"&downList(5)&downList(6)&"</td></tr>"
rs.movenext
lineNo=lineNo+1
loop
response.write tempStr
else
response.write "<tr><td height=""30"" colspan=""3"" valign=""middle"" align=""center"" class=""tdBC"">您在此类暂时还没有下载</td></tr>"
end if
if rs.RecordCount>n then%>
<tr>
<td height="22" colspan="3" valign="middle" class="tdBC"><%=nextpage%></td>
</tr>
<%end if%>
</table>
<%
rs.close
set rs=nothing
End Sub
Sub deletedown()
dim id,sql,modNum
id=Request.QueryString("id")
sql="delete from ms_down where pass=false and post_member='"&replace(trim(userinfo(1)),"'","")&"' and id="&id
conn.execute sql,modNum
if cint(modNum)=0 then
showmsg "<font color=""#ff0000"">系统返回如下信息:</font><br><li>此篇下载已通过审核了,您没有删除的权限,如有什么问题请联系管理员!</li>","操作错误信息"
else
showmsg "<li>已成功删除一篇下载</li><br><span id=seNum>3</span><a href=javascript:showtime></a>秒钟后系统将自动返回......</b><meta http-equiv=refresh content=3;url=user_publish.asp?channel=down&action=downList><SCRIPT>valignbottom()</SCRIPT><script>function showtime(secs){seNum.innerText=secs;if(--secs>0)setTimeout('showtime('+secs+')',1000);}showtime(3);</script>","操作成功信息"
end if
End Sub
Sub modifydown()
sql="Select * from ms_down where id="&Request.QueryString("id")
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,1
%>
<script language="javascript">
function downcheck(){
if(document.myform.downclass.options[document.myform.downclass.selectedIndex].value==""){
alert("请选择所属分类");
document.myform.downclass.focus();
return false;}
if(document.myform.title.value==""){
alert("下载名称不能为空");
document.myform.title.focus();
return false;}
if(document.myform.content.value==""){
alert("简介内容不能为空");
return false;}
if(document.myform.downsize.value==""){
alert("下载大小不能为空");
document.myform.downsize.focus();
return false;}
if(document.myform.keyword.value==""){
alert("关键词不能为空");
document.myform.keyword.focus();
return false;}
if(document.myform.approof.value==""){
alert("运行环境不能为空");
document.myform.approof.focus();
return false;}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -