user_put.asp
来自「安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!」· ASP 代码 · 共 1,244 行 · 第 1/4 页
ASP
1,244 行
<%
'****************************************************
' Hxcms Ver7.6 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.com.cn
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
if userfb<>"yes" then
response.write"<SCRIPT language=JavaScript>alert(' 错误提示:\n\n参数非法!非法操作!!\n\n系统设置会员不能发表 !');"
response.write"JavaScript:window.close()</SCRIPT>"
response.end
end if
if UserLogined<>True then
response.write"<SCRIPT language=JavaScript>alert(' 请登陆后操作 ,请返回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
dim action:action=Request.QueryString("action")
if action="news" then start="会员中心 >> 发布新闻"
if action="art" then start="会员中心 >> 发表文章"
if action="dj" then start="会员中心 >> 发布歌曲"
if action="pic" then start="会员中心 >> 上传图片"
if action="down" then start="会员中心 >> 发布软件"
if action="web" then start="会员中心 >> 推荐网站"
if action="shop" then start="会员中心 >> 发布产品"
if action="" then start="会员中心 >> 发表文章"
end if
dim tit_fir
'=================================================
'过程名:main_put
'作 用:显示发表位置导航
'参 数:无
'Web: http://www.Hx66.net
'=================================================
sub main_put()
Response.Write "<table border=0 Cellspacing='10' Cellpadding='1' align='Center'>" & vbCrLf
Response.Write "<tr>" & vbCrLf
if usernews="yes" then
Response.Write "<td><a href='?action=news'>"
if action="news" then response.write "<font color=red>"
Response.Write "发布新闻</font></a></td>"
end if
if userart="yes" then
Response.Write "<td><a href='?action=art'>"
if action="art" or action="" then response.write "<font color=red>"
Response.Write "发表文章</font></a></td>"
end if
if userdj="yes" then
Response.Write "<td><a href='?action=dj'>"
if action="dj" then response.write "<font color=red>"
Response.Write "发布音乐</font></a></td>"
end if
if userdown="yes" then
Response.Write "<td><a href='?action=down'>"
if action="down" then response.write "<font color=red>"
Response.Write "发布软件</font></a></td>"
end if
if userpic="yes" then
Response.Write "<td><a href='?action=pic'>"
if action="pic" then response.write "<font color=red>"
Response.Write "上传贴图</font></a></td>"
end if
if userweb="yes" then
Response.Write "<td><a href='?action=web'>"
if action="web" then response.write "<font color=red>"
Response.Write "推荐网站</font></a></td>"
end if
if usershop="yes" then
Response.Write "<td><a href='?action=shop'>"
if action="shop" then response.write "<font color=red>"
Response.Write "发布产品</font></a></td>"
end if
Response.Write "</tr>" & vbCrLf
Response.Write "</table>" & vbCrLf
end sub
'=================================================
'过程名:content_put
'作 用:显示发表内容、表单
'参 数:无
'Web: http://www.Hx66.net
'=================================================
sub content_put()
Response.Write "<form name=form2 action='?action="&action&"' method=post onsubmit=""javascript:frm_submitonce(this);"">" & vbCrLf
Response.Write "<input type=hidden name=chk value='yes'>" & vbCrLf
select case action
case "news"
tit_fir="新闻"
if usernews="yes" then
call put_news()
else
call put_close("发布")
end if
case "art"
tit_fir="文章"
if userart="yes" then
call put_art()
else
call put_close("发表")
end if
case "dj"
tit_fir="音乐"
if userdj="yes" then
call put_dj()
else
call put_close("发布")
end if
case "down"
tit_fir="软件"
if userdown="yes" then
call put_down()
else
call put_close("发布")
end if
case "pic"
tit_fir="图片"
if userpic="yes" then
call put_pic()
else
call put_close("发布")
end if
case "web"
tit_fir="网站"
if userweb="yes" then
call put_web()
else
call put_close("推荐")
end if
case "shop"
tit_fir="产品"
if usershop="yes" then
call put_shop()
else
call put_close("发布")
end if
case else
action="art"
tit_fir="文章"
if userart="yes" then
call put_art()
else
call put_close("发表")
end if
end select
Response.Write "</form>"
end sub
'=================================================
'过程名:put_web
'作 用:显示发表酷站
'参 数:无
'Web: http://www.Hx66.net
'=================================================
sub put_web()
dim name,url,pic,desc,csid,username,uppic
if chk() then
name=CheckStr(code_admin("name",1,50))
url=CheckStr(code_admin("url",1,100))
pic=CheckStr(code_admin("pic",1,100))
desc=CheckStr(code_admin("desc",1,200))
csid=trim(request.form("c_id"))
if not isInteger(csid) then
call admin_error("请选择 "&tit_fir&"类型 !")
exit sub
end if
if name="" or url="" or pic="" or desc="" then
call admin_error(tit_fir&"名称、地址、图片和说明 不能为空!")
exit sub
end if
username=code_admin("tjuser",1,20)
set rs=server.CreateObject("adodb.recordset")
rs.open "select cs_name,cs_url from coolsites where cs_name='"&name&"' or cs_url='"&url&"'",conn,1,1
if not rs.eof and not rs.bof then
response.write"<SCRIPT language=JavaScript>alert('错误提示:\n\n① 此酷站已提交过,正等待审核通过,请不要重复提交!\n\n② 您提交的酷站已经存在,感谢你的支持!');"
response.write"this.top.location.href='User_put.asp?action=web';</SCRIPT>"
Response.End
rs.close
end if
sql="select * from coolsites"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("tjuser")=username
rs("cs_name")=name
rs("cscat_id")=csid
rs("cs_url")=url
rs("cs_pic")=pic
rs("cs_desc")=desc
if fbpass<>"yes" or (Hx66_Grade=1 and vippass<>"yes") then
rs("passed")=0
sql="UPDATE [user] SET points = points + "&fbpoints&" where username='"&username&"'"
conn.execute (sql)
else
rs("passed")=1
end if
uppic=right(pic,len(pic)-7)
conn.execute("update [upload] set webtype='酷站',totable=1,url='"&name&"' where filename='"&uppic&"' and totable=0")
rs.update
rs.close
call user_msg("推荐")
exit sub
end if
call form_first()
%>
<table bgcolor="#ffffff" borderColor="#f0f0f0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
<tr>
<td width="17%">站点名称</td>
<td><input type="text" name="name" size="65" class="input"></td>
</tr>
<tr>
<td>所属分类</td>
<td><select name="c_id" class="input">
<%
sql="select * from cscat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof%><option value="<%=rs("cscat_id")%>"><%=rs("cscat_name")%></option>
<%
rs.movenext
loop
if rs.eof and rs.bof then%><option value="0">当前没有酷站分类</option>
<%end if%>
</select></td>
</tr>
<tr>
<td>站点地址</td>
<td><input type="text" name="url" size="65" class="input"></td>
</tr>
<tr>
<td>图片地址</td>
<td><input type="text" name="pic" size="65" class="input"></td>
</tr>
<tr>
<td>图片上传</td>
<td><IFRAME name=ad src="user_upload.asp?action=pic" frameBorder=0 width="100%" scrolling=no height=25></IFRAME></td>
</tr>
<tr>
<td>站点介绍</td>
<td><textarea name="desc" cols="63" rows="8" class="input"></textarea></td>
</tr>
<tr>
<td>提交会员</td>
<td><input type="hidden" name="tjuser" value="<%=Hx66_name%>"><%=Hx66_name%></td>
</tr>
<tr align="center">
<td colspan="2" height="30">
<input type="submit" name="Submit" value="确定新增" class="input">
<input type="reset" name="Reset" value="清空重填" class="input"></td>
</tr>
</table>
<%
end sub
'=================================================
'过程名:put_dj
'作 用:显示发表音乐
'参 数:无
'Web: http://www.Hx66.net
'=================================================
sub put_dj()
dim name,djname,url,csid,types,grades,word,dGrade,dpoints,username,upurl
if chk() then
name=CheckStr(code_admin("name",1,50))
djname=CheckStr(code_admin("djname",1,50))
csid=trim(request.form("c_id"))
types=CheckStr(code_admin("types",1,6))
grades=CheckStr(code_admin("grades",1,5))
url=CheckStr(code_admin("url",1,250))
word=CheckStr(code_admin("word",1,1000))
dGrade=trim(request.form("dGrade"))
dpoints=trim(request.form("dpoints"))
if not isInteger(csid) then
call admin_error("请选择 "&tit_fir&"类型 !")
exit sub
end if
if name="" or djname="" or url="" or word="" then
call admin_error(tit_fir&"名称、歌手、地址和歌词 不能为空!")
exit sub
end if
username=code_admin("tjuser",1,20)
set rs=server.CreateObject("adodb.recordset")
rs.open "select dj_name,dj_url from dj where dj_name='"&name&"' or dj_url='"&url&"'",conn,1,1
if not rs.eof and not rs.bof then
response.write"<SCRIPT language=JavaScript>alert('错误提示:\n\n① 此音乐已提交过,正等待审核通过,请不要重复提交!\n\n② 您提交的音乐已经存在,感谢你的支持!');"
response.write"this.top.location.href='User_put.asp?action=dj';</SCRIPT>"
Response.End
rs.close
end if
sql="select * from dj"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("tjuser")=username
rs("dj_name")=name
rs("dj_user")=djname
rs("djcat_id")=csid
rs("dj_url")=url
rs("dj_pic")=types
rs("dj_desc")=grades
rs("dj_word")=word
rs("Grade")=cint(dGrade)
if cint(dGrade)=0 then
rs("points")=0
else
rs("points")=cint(dpoints)
end if
if fbpass<>"yes" or (Hx66_Grade=1 and vippass<>"yes") then
rs("passed")=0
sql="UPDATE [user] SET points = points + "&fbpoints&" where username='"&username&"'"
conn.execute (sql)
else
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?