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

📄 admin_video.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="include/onlogin.asp" -->
<!-- #include file="include/conn.asp" -->
<!-- #include file="include/jk_pagecute.asp" -->
<%
if trim(request.querystring("delid"))<>"" then
   conn.execute"delete from videourl where id="&request("delid")
   conn.close
   set conn=nothing
   response.redirect Request.ServerVariables("HTTP_REFERER")
end if

dim nsort,rs2,sql2,id,j,sqladd,cid,sid,ncid,nsid,nid,now_id,pageurl,ispic,data_name,nummer,ddim,genre,os,downtype,movie,keyword
tit="<a href='admin_video.asp?action='>影片列表</a>&nbsp;┋&nbsp;" & _
    "<a href='admin_video.asp?action=video_add'>添加影片</a>&nbsp;┋&nbsp;" & _
    "<a href='admin_vsort.asp'>影片分类</a>"
response.write header(19,tit)
nsort="video":sqladd="":data_name="video"
cid=trim(request.querystring("c_id"))
sid=trim(request.querystring("s_id"))
if not(isnumeric(cid)) then cid=0
if not(isnumeric(sid)) then sid=0
cid=int(cid):sid=int(sid)
pageurl="?c_id="&cid&"&s_id="&sid&"&"

if trim(request.querystring("del_ok"))="ok" then
'response.write request.form("del_id")
'response.end
conn.execute("delete from videourl where nameid in("&request.form("del_id")&")")
  response.write del_select(request.form("del_id"))

end if

function del_select(delid)
  dim del_i,del_num,del_dim,del_sql,fobj,ispic
  if delid<>"" and not isnull(delid) then
    delid=replace(delid," ","")
    del_dim=split(delid,",")
    del_num=UBound(del_dim)
    for del_i=0 to del_num
      call upload_del(data_name,del_dim(del_i))
      del_sql="delete from video where id="&del_dim(del_i)
      conn.execute(del_sql)
    next
    Erase del_dim
    del_select=vbcrlf&"<script language=javascript>alert(""共删除了 "&del_num+1&" 条影片记录!"");</script>"
  end if
end function

id=trim(request.querystring("id"))
if action="hidden" and isnumeric(id) then
  sql="select "&action&" from "&data_name&" where id="&id
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then
    if rs(action)=true then
      sql="update "&data_name&" set "&action&"=0 where id="&id
    else
      sql="update "&data_name&" set "&action&"=1 where id="&id
    end if
    conn.execute(sql)
  end if
  rs.close
  action=""
end if

select case action
case "video_add"
  call video_add()
case "video_edit"
  call video_edit()
case "code"
  call code_main()
case "code_add"
  call code_add()
case "code_edit"
  call code_edit()
case "code_del"
  call code_del()
case else
  call video_main()
end select

close_conn
response.write ender()

sub video_edit()
  dim sql3,rs3,id,csid,title,lang,remark,counter,hot,pic,where
  id=request.querystring("id")
  if not(isnumeric(id)) then call video_main():exit sub
%><table border=0 width=600 cellspacing=0 cellpadding=0>
<tr><td align=center height=300>
<%
  sql="select * from video where id="&id
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,1,3
  if rs.eof and rs.bof then
    rs.close:set rs=nothing
    call video_main():exit sub
  end if
  if trim(request.querystring("types"))="edit" then
    csid=trim(request.form("csid"))
    title=code_admin(request.form("title"))
    lang=code_admin(request.form("lang"))
    hot=code_admin(request.form("hot"))
    where=code_admin(request.form("where"))

    pic=request.form("pic")
    if len(pic)<3 then pic="no_pic.gif"


    remark=request.form("remark")
    counter=trim(request.form("counter"))

'response.write lang&where&request.form("movie")
'response.end

    if len(csid)<1 or var_null(title)="" then
      response.write("<font class=red_2>影片的类型、名称和影片地址不能为空!</font><br><br>"&go_back)
    else
      rs("c_id")=csid

	  if trim(request.form("username_my"))="yes" then rs("username")=login_username
      if trim(request.form("hidden"))="yes" then
        rs("hidden")=false
      else
        rs("hidden")=true
      end if

      rs("title")=title
      rs("lang")=lang
      rs("remark")=remark
      rs("pic")=pic
      'rs("tim")=now_time

	rs("type")=request.form("movie")
	rs("howlong")=request.form("long")
	rs("where")=where
    rs("name")=request.form("name")


    if isnumeric(trim(request.form("emoney"))) then
      rs("emoney")=trim(request.form("emoney"))
    else
      rs("emoney")=0
    end if
    rs("power")=replace(replace(trim(request.form("power"))," ",""),",",".")

rs("hot")=hot
rs("ld")=request.form("ld")

     if isnumeric(counter) then rs("counter")=counter
      rs.update
      call upload_note(data_name,id)
      response.write "<font class=red>影片修改成功!</font><br><br><a href='?c_id="&cid&"&s_id="&sid&"'>点击返回</a>" & _
		     vbcrlf&"<meta http-equiv='refresh' content='" & web_var(web_num,5) & "; url=?c_id="&cid&"&s_id="&sid&"'>"
    end if
  else
    cid=int(rs("c_id")):hot=int(rs("hot")):lang=rs("lang"):where=rs("where")
    ispic=rs("pic"):pic=ispic
    if Instr(ispic,"/")>0 then ispic=right(ispic,len(ispic)-Instr(ispic,"/"))
    if Instr(ispic,".")>0 then ispic=left(ispic,Instr(ispic,".")-1)
    if ispic="no_pic" then ispic="n_"&id:pic=""
%><table border=0 width='98%' cellspacing=0 cellpadding=2>
  <tr><td colspan=2 height=40 align=center><font class=red>影片修改</font></td></tr>
<form name='add_frm' action="?action=video_edit&types=edit&id=<%response.write id%>" method=post>
<input type=hidden name=upid value=''>
  <tr><td width='15%' align=center>影片名称:</td><td width='85%'><input type=text name=title value='<%response.write rs("title")%>' size=60 maxlength=40><% response.write redx %></td></tr>
  <tr><td align=center>影片类型:</td><td><select name=csid size=1>
   <%
  sql3="select * from videotype order by typeid"
  set rs3=conn.execute(sql3)
  do while not rs3.eof
nid=int(rs3(0))
if cid=nid then
    response.write vbcrlf&"<option value='"&rs3("typeid")&"' class=bg_2 selected>"&rs3("type")&"</option>"
	else 
    response.write vbcrlf&"<option value='"&rs3("typeid")&"' class=bg_2>"&rs3("type")&"</option>"
end if
	rs3.movenext
  loop
  rs3.close:set rs3=nothing

%>
</select><% response.write redx %>&nbsp;&nbsp;隐藏:<input type=checkbox name=hidden<%if rs("hidden")=false then response.write " checked"%> value='yes'>&nbsp;选上为隐藏显示&nbsp;&nbsp;<input type=checkbox name=username_my value='yes'>&nbsp;<font alt='发布人:<%response.write rs("username")%>'>点击修改发布人为我</font></td>
  </tr>
  <tr><td align=center>影片信息:</td><td>语言类型: 
              <select name=lang size=1>
<option value='汉语'  <% if lang="汉语"  then response.write " selected"  %>>汉语</option>
<option value='粤语'   <% if lang="粤语" then response.write " selected"  %>>粤语</option>
<option value='日语'   <% if lang="日语" then response.write " selected"  %>>日语</option>
<option value='英语'   <% if lang="英语" then response.write " selected"  %>>英语</option>
<option value='韩语'  <% if lang="韩语" then response.write " selected"  %>>韩语</option>
<option value='其他'   <% if lang="其他" then response.write " selected"  %>>其他</option>
</select>&nbsp;&nbsp;&nbsp;推荐等级:<select name=hot size=1>
<option value='0'<% if hot=0 then response.write " selected" %>>没有等级</option>
<option value='1'<% if hot=1 then response.write " selected" %>>一星级</option>
<option value='2'<% if hot=2 then response.write " selected" %>>二星级</option>
<option value='3'<% if hot=3 then response.write " selected" %>>三星级</option>
<option value='4'<% if hot=4 then response.write " selected" %>>四星级</option>
<option value='5'<% if hot=5 then response.write " selected" %>>五星级</option>
</select>
</td>
          </tr>
  <tr>
            <td align=center>观看权限:</td>
            <td><%call chk_power(rs("power"),0)%></td>
          </tr>
  <tr>
            <td align=center>所需货币:</td>
            <td><%call chk_emoney(rs("emoney"))%>&nbsp;&nbsp;影片产地:<select size="1" name="where">
          <option value="大陆" <% if where="大陆" then response.write " selected" %>>大陆</option>
          <option value="台湾" <% if where="台湾" then response.write " selected" %>>台湾</option>
          <option value="香港" <% if where="香港" then response.write " selected" %>>香港</option>
          <option value="日本" <% if where="日本" then response.write " selected" %>>日本</option>
          <option value="韩国" <% if where="韩国" then response.write " selected" %>>韩国</option>
          <option value="欧美" <% if where="欧美" then response.write " selected" %>>欧美</option>
          <option value="其他" <% if where="其他" then response.write " selected" %>>其他</option>
          <option value="未知" <% if where="未知" then response.write " selected" %>>出产地区</option>
          </select></td>
          </tr>
<tr>
            <td><div align="center">影片类别:</div></td>
            <td>[ <img src="images/video/real.gif" width="16" height="16"> <input type="radio" value="rm" name="movie" <%if rs("type")="rm" then response.write "checked" end if%>>  
              ]&nbsp; [ <img src="images/video/mov.gif" width="18" height="18"> <input type="radio" value="mov" name="movie" <%if rs("type")="mov" then response.write "checked" end if%>>  
              ]&nbsp; [<img src="images/video/media.gif" width="18" height="17"> <input type="radio" value="md" name="movie" <%if rs("type")="md" then response.write "checked" end if%>>
              ]&nbsp;&nbsp;&nbsp; </td>  
          </tr>

<td><div align="center">开放方式:</div></td>
<td> <input type="radio" value="1" name="ld" <%if rs("ld")=1 then response.write "checked" end if%>>在线观看 <input type="radio" value="0" name="ld"<%if rs("ld")=0 then response.write "checked" end if%>>影片下载 <input type="radio" value="2" name="ld" <%if rs("ld")=2 then response.write "checked" end if%>>即能观看也可下载</td>  
</tr>
  <tr><td align=center>影片主演:</td><td><input type=text name=name value='<%response.write rs("name")%>' size=50 maxlength=50>&nbsp;&nbsp;&nbsp;影片人气:<input type=text name=counter value='<%response.write rs("counter")%>' size=4 maxlength=10></td></tr>
<%
dim rsurl,no,idno
idno=trim(request("id"))
sql="select * from videourl where nameid="&idno
'set rsurl=conn.execute(sql)
set rsurl=server.createobject("adodb.recordset")
rsurl.open sql,conn,1,3
if rsurl.bof and rsurl.eof then
response.write "<tr><td></td><td>没有影片提供观看</td></tr>"
else
no=rsurl.recordcount
'response.write no
'response.end
for i=1 to no
%>
          <tr>
            <td width="114" bgcolor="#FFFFFF" align="center">在线观看:</td>
            <td bgcolor="#FFFFFF" width="507" colspan="2"><input type="text" name="url<%=i%>" class="button" style="border-style: solid; border-width: 1; padding-left: 1pt" size="60" value="<%=rsurl("url")%>"> 
            第<%=i%>集 <a href="?delid=<%=rsurl("id")%>">
            <font color="#FF0000">删除</font></a></td>
          </tr>
<%
rsurl.movenext
next
end if
rsurl.close
set rsurl=nothing
%>    
          <tr>
            <td width="114" bgcolor="#FFFFFF" align="center">增加地址:</td>
            <td>
			<iframe width="500" height="22" noresize target="main" border="0" rows="64,*" frameborder="0" scrolling="no" framespacing="0" src="video_addurl.asp?id=<%=request("id")%>">
            </iframe>
            </td></tr>
  <tr height=35<%response.write format_table(3,1)%>><td align=center><%call frm_ubb_type()%></td><td><%call frm_ubb("add_frm","remark","&nbsp;&nbsp;")%></td></tr>
  <tr><td align=center valign=top><br>影片备注:</td><td><%response.write("<textarea rows=6 name=remark cols=70>"&rs("remark")&"</textarea>")%></td></tr>
  <tr><td align=center>影片长度:</td><td><input type=text name=long value='<%response.write rs("howlong")%>' size=12>
&nbsp;图片:<input type=test name=pic value='<% if ispic<>"no_pic.gif" then response.write pic %>' size=30>&nbsp;<a href='upload.asp?uppath=video&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a>&nbsp;&nbsp;<a href='upload.asp?uppath=video&upname=n&uptext=remark' target=upload_frame>上传至内容</a></td></tr>
  <tr><td align=center>上传图片:</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=video&upname=<%response.write ispic%>&uptext=pic'></iframe></td></tr>
  <tr height=30><td></td><td><input type=submit value=' 提 交 修 改 '></td></tr>
</form></table><%
  end if

⌨️ 快捷键说明

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