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

📄 user_put.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<%

'****************************************************
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="joke" 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:    www.ynsky.com.cn
'=================================================
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 userjoke="yes" then
Response.Write "<td><a href='?action=joke'>"
if action="joke" 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:    www.ynsky.com.cn
'=================================================
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 "joke"
  tit_fir="笑话"
  if userjoke="yes" then
    call put_joke()
  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="joke"
  tit_fir="笑话"
  if userjoke="yes" then
    call put_joke()
  else
    call put_close("发表")
  end if
end select
Response.Write "</form>"
end sub


'=================================================
'过程名:put_web
'作  用:显示发表游记
'参  数:无
'Web:    http://www.ynsky.com.cn
'=================================================
sub put_web()
  dim name,artname,aahome,csid,akeyword,pic,content,dGrade,dpoints,username,uppic
  if chk() then
    name=CheckStr(code_admin("name",1,50))
    artname=CheckStr(code_admin("artname",1,50))
    aahome=CheckStr(code_admin("aahome",1,50))
    csid=trim(request.form("c_id"))
    akeyword=CheckStr(code_admin("akeyword",1,50))
    pic=CheckStr(code_admin("pic",1,100))
    content=code_admin("content",1,100000)
    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 artname="" or aahome="" or content="" then
      call admin_error(tit_fir&"标题、作者、来源和内容 不能为空!")
      exit sub
    end if
    if strLength(content)>artmax then
      call admin_error(tit_fir&"内容太长 不可以超过"&artmax&"个字符!!")
      exit sub
    end if
    username=code_admin("tjuser",1,20)
    set rs=server.CreateObject("adodb.recordset")
    rs.open "select art_title from web where art_title='"&name&"'",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 web"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,3
    rs.addnew
    rs("tjuser")=username
    rs("art_title")=name
    rs("art_author")=artname
    rs("art_ahome")=aahome
    rs("cat_id")=csid 
    rs("art_keyword")=akeyword  
    rs("art_content")=content
    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
    rs("passed")=1
    end if
    if pic<>"" then
    rs("images")=pic
    rs("isimg")=1
    uppic=right(pic,len(pic)-7)
    conn.execute("update [upload] set webtype='游记',totable=1,url='"&name&"' where filename='"&uppic&"' and totable=0")
    end if
    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><input name="artname" type="text" id="writer" size="20" class="input">&nbsp;<button onClick="writer.value='佚名'" class="input">佚名</button>&nbsp;<button onClick="writer.value='网络'" class="input">网络</button>&nbsp;<button onClick="writer.value='<%=Hx66_name%>'" class="input"><%=Hx66_name%></button>
      </td>
     </tr>
     <tr> 
      <td>游记来源</td>
      <td> <input name="aahome" type="text" id="writer1" size="28" class="input">&nbsp;<button onClick="writer1.value='转摘'" class="input">转摘</button>&nbsp;<button onClick="writer1.value='原创'" class="input">原创</button></button>
     </td>
    </tr>
    <tr> 
      <td>所属分类</td>
      <td><select name="c_id" class="input">
<%
sql="select * from web_cat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("cat_name")&"'>"
sql="select * from web_cat where sid="&rs1("cat_id") 
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
%>
      <option value="<%=rs2("cat_id")%>">├ <%=rs2("cat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs1.close
set rs1=nothing%>
</select>&nbsp;&nbsp;关键字 
<input type="text" name="akeyword" size="18" class="input">&nbsp;多个用 | 隔开。</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" align="center"> <script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "Editor/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
<textarea name="content" style="width:540; height:250" id="content"></textarea>
<script language="javascript1.2">
editor_generate('content');
</script>
      </td>
    </tr>
    <tr>
      <td>阅读等级</td>
      <td><select name="dGrade" id="Grade" class="input">
        <option value="0">游客可读</option>
        <option value="1">普通用户</option>
        <option value="2">VIP 用户</option>
        </select>&nbsp;&nbsp;阅读所需会员积分数:<input type="text" name="dpoints" size="5" value="0" class="input"> *正整数数字</td>
    </tr>
    <tr> 
      <td>提交会员</td>
      <td><input type="hidden" name="tjuser" value="<%=Hx66_name%>"><%=Hx66_name%></td>
    </tr>  
  <tr> 
     <td>游记图片</td>
     <td><input type="text" name="pic" size="65" class="input"></td>
  </tr>
  <tr> 
     <td>图片上传</td>
     <td><IFRAME name=upload_frame src="user_upload.asp?action=pic" frameBorder=0 width="100%" scrolling=no height=25></IFRAME></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:    www.ynsky.com.cn
'=================================================
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"))

⌨️ 快捷键说明

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