📄 admin_video.asp
字号:
rs.close:set rs=nothing
%></td></tr></table><%
end sub
sub video_add()
%><table border="0" width="600" cellspacing="0" cellpadding="0">
<tr><td align=center height=300><%
if request.querystring("types")="add" then
dim csid,title,pic,sql1,no,url,vid
no=request.form("no")
csid=trim(request.form("cid"))
title=code_admin(request.form("title"))
pic=request.form("pic")
if len(pic)<3 then pic="no_pic.gif"
if len(csid)<1 or var_null(title)="" or request.form("movie")="" then
response.write("<font class=red_2>影片的类型、名称、格式和影片地址不能为空!</font><br><br>"&go_back)
else
sql="select * from video"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("type")=request.form("movie")
rs("c_id")=csid
rs("title")=title
rs("username")=login_username
rs("lang")=request.form("lang")
rs("howlong")=request.form("long")
rs("where")=request.form("where")
rs("remark")=request.form("remark")
rs("name")=request.form("name")
rs("hidden")=true
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")=request.form("hot")
rs("ld")=request.form("ld")
rs("pic")=pic
rs("tim")=now_time
rs("counter")=0
rs.update
vid=rs("id")
rs.close
set rs=server.createobject("adodb.recordset")
sql1="select * from videourl where (id is null)"
rs.open sql1,conn,1,3
for i=1 to no
rs.addnew
url=request.form("url"&i&"")
rs("nameid")=vid
rs("url")=url
rs.update
next
rs.close
set rs=nothing
call upload_note(data_name,first_id(data_name))
response.write "<font class=red>影片添加成功!</font> <a href='?c_id="&cid&"'>点击返回</a><br><br><a href='?c_id="&cid&"&action=video_add'>点击继续添加</a>" & _
VbCrLf&"<meta http-equiv='refresh' content='" & web_var(web_num,5) & "; url=?c_id="&cid&"&action=video_add'>"
end if
else
%>
<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_add&types=add' method=post>
<input type=hidden name=upid value=''>
<tr><td width='15%' align=center>影片名称:</td><td width='85%'><input type=text name=title size=70 maxlength=40><% response.write redx %></td></tr>
<tr><td align=center>影片类型:</td><td>
<select name=cid size=1>
<%
sql="select * from videotype order by typeid"
set rs=conn.execute(sql)
do while not rs.eof
response.write vbcrlf&"<option value='"&rs("typeid")&"' class=bg_2>"&rs("type")&"</option>"
rs.movenext
loop
rs.close:set rs=nothing
ispic="v"&upload_time(now_time)
%>
</select>
<% response.write redx %></td></tr>
<tr>
<td align=center>影片信息:</td>
<td>语言类型:
<select name=lang size=1>
<option value='汉语'>汉语</option>
<option value='粤语'>粤语</option>
<option value='日语'>日语</option>
<option value='英语'>英语</option>
<option value='韩语'>韩语</option>
<option value='其他'>其他</option>
</select>
推荐等级:<select name=hot size=1>
<option value='0'>没有等级</option>
<option value='1'>一星级</option>
<option value='2'>二星级</option>
<option value='3'>三星级</option>
<option value='4'>四星级</option>
<option value='5'>五星级</option>
</select>
</td>
</tr>
<tr>
<td><div align="center">观看权限:</div></td>
<td><%call chk_power("",1)%></td>
</tr>
<tr>
<td align=center>所需货币:</td>
<td><%call chk_emoney(0)%> 影片产地:<select size="1" name="where">
<option value="大陆">大陆</option>
<option value="台湾">台湾</option>
<option value="香港">香港</option>
<option value="日韩">日本</option>
<option value="韩国">韩国</option>
<option value="欧美">欧美</option>
<option value="其他">其他</option>
<option selected value="未知" name="where">出产地区</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">
] [<img src="images/video/mov.gif" width="18" height="18"> <input type="radio" value="mov" name="movie">
] [<img src="images/video/media.gif" width="17" height="17"> <input type="radio" value="md" name="movie">
] </td>
</tr>
<tr>
<td><div align="center">开放方式:</div></td>
<td> <input type="radio" value="1" name="ld" checked>在线观看 <input type="radio" value="0" name="ld">影片下载 <input type="radio" value="2" name="ld">即能观看也可下载</td>
</tr>
<tr><td align=center>影片主演:</td><td><input type=text name=name value='无' size=50 maxlength=50></td></tr>
<script language="javascript">
function setid()
{
str='';
if(!window.add_frm.no.value)
window.add_frm.no.value=1;
for(i=1;i<=window.add_frm.no.value;i++)
str+=' 影片地址: <input type="text" name="url'+i+'" class="button" style="padding-left:1pt" size=65 value=""> 第'+i+'集<BR>';
window.upid.innerHTML=str+'<br>';
}
</script>
<tr><td align=center>影片地址:</td><td>集数 <input type="text" name="no" class="button" value="2" size="2">
<input type="button" name="Button" class="buttonface" onclick="setid();" value="设定">
(在点击“设定”按钮后才可输入影片对应地址) <% response.write redx %>
</td></tr>
<tr>
<td colspan="2" id="upid" width="564"></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"," ")%></td></tr>
<tr><td valign=top align=center><br>影片备注</td><td><textarea rows=6 name=remark cols=70></textarea></td></tr>
<tr><td align=center>影片长度:</td><td><input type=text name=long size=12 value='90分钟'> 图片:<input type=test name=pic size=28> <a href='upload.asp?uppath=video&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a> <a href='upload.asp?uppath=video&upname=v&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
%></td></tr></table><%
end sub
sub video_main()
dim rssum,thepages,page,viewpage,del_temp
%>
<table border="0" width="600" cellspacing="0" cellpadding="0">
<tr align=center height=300 valign=top><td width=120 class=htd>
<%
sql="select * from videotype order by typeid"
set rs=conn.execute(sql)
do while not rs.eof
nid=int(rs(0))
if cid=nid then
response.write vbcrlf&" <img src=""images/video/box.gif"" width=""12"" height=""11"" border=""0""> <a href='?c_id="&nid&"'><b><font class=red_3>"&rs(1)&"</b></font></a><br>"
else
response.write vbcrlf&" <img src=""images/video/box1.gif"" width=""12"" height=""11"" border=""0""> <a href='?c_id="&nid&"'><font class=red_3>"&rs(1)&"</font></a><br>"
end if
rs.movenext
loop
rs.close
keyword=trim(request.querystring("keyword"))
if keyword<>"" and not isnull(keyword) then
if sqladd<>"" then
sqladd=sqladd&" and title like '%"&keyword&"%' "
else
sqladd=sqladd&" where title like '%"&keyword&"%' "
end if
pageurl=pageurl&"keyword="&server.urlencode(keyword)&"&"
end if
%>
</td><td width=480>
<table border=1 width='100%' cellspacing=0 cellpadding=1 bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF>
<script language=javascript src='style/admin_del.js'></script>
<form name=del_form action='<%response.write pageurl%>del_ok=ok&dtype=video' method=post><%
if cid<>0 then
sqladd=" where c_id="&cid
end if
sql="select id,c_id,title,hot,hidden from video"&sqladd&" order by tim desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
rssum=0
else
rssum=int(rs.recordcount)
end if
nummer=14
if rssum mod nummer > 0 then
thepages=rssum\nummer+1
else
thepages=rssum\nummer
end if
page=trim(request.querystring("page"))
if not(isnumeric(page)) then page=1:viewpage=1
if int(page)>thepages then
viewpage=1
else
viewpage=page
end if
del_temp=nummer
if rssum=0 then del_temp=0
if int(page)=int(thepages) then
del_temp=rssum-nummer*(thepages-1)
end if
response.write vbcrlf&"<tr><td colspan=3 align=center>共有 <font class=red>"&rssum&"</font> 个影片 ┋ 共<font class=red>"&thepages&"</font>页 ┋ 这是第<font class=red>"&viewpage&"</font>页 ┋ <a href='"&pageurl&"action=video_add'>添加影片</a> </td></tr>" & _
vbcrlf & "<tr><td colspan=3 align=center>分页:"&jk_pagecute(nummer,thepages,viewpage,pageurl,6,"#ff0000") & _
" <input type=checkbox name=del_all value=1 onClick=selectall('"&del_temp&"')> 选中所有 <input type=submit value='删除所选' onclick=""return suredel('"&del_temp&"');""></td></tr>" & _
vbcrlf&"<tr align=center bgcolor=#ffffff><td width='8%'>序号</td><td width='77%'>类型和名称</td><td width='15%'>操作</td></tr>"
if int(viewpage)>1 then
rs.move (viewpage-1)*nummer
end if
for i=1 to nummer
if rs.eof then exit for
now_id=rs("id"):nid=int(rs("hot")):ncid=rs("c_id")
response.write vbcrlf&"<tr align=center><td>"&(viewpage-1)*nummer+i&"</td><td align=left><a href='?action=video_edit&id="&now_id&"'>"&rs("title")&"</a></td><td align=right><a href='?action=hidden&c_id="&cid&"&id="&now_id&"&page="&viewpage&"'>"
if rs("hidden")=true then
response.write "显</a> "
else
response.write "<font class=red_2>隐</font></a> "
end if
response.write "<font class=red>"&nid&"</font> 星 <input type=checkbox name=del_id value='"&now_id&"'></td></tr>"
rs.movenext
next
rs.close:set rs=nothing
%>
</form></table>
<table border=0 align=left>
<form name=sea_frm action='<%response.write pageurl%>'>
<tr>
<td>关键字:</td>
<td><input type=text name=keyword value='<%response.write keyword%>' size=50 maxlength=20> </td>
<td> <input type=submit value=' 搜 索 '> </td>
</tr>
</form>
</table>
</td></tr></table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -