📄 film_add.asp
字号:
<td width="60">影片产地:</td>
<td><select name="film_from" class="select1" id="film_from">
<option value="1" selected>欧美</option>
<option value="2">港台</option>
<option value="3">大陆</option>
<option value="4">日韩</option>
<option value="5">其它</option>
</select></td>
</tr>
</table>
<table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">推荐级别:</td>
<td width="120"><select name="film_level" class="select" id="film_level">
<option value="1">★</option>
<option value="2">★★</option>
<option value="3" selected>★★★</option>
<option value="4">★★★★</option>
<option value="5">★★★★★</option>
</select></td>
<td width="60" align="right">清晰程度:</td>
<td><select name="film_clear" class="select" id="film_clear">
<option value="5">☆☆☆☆☆</option>
<option value="4" selected>☆☆☆☆</option>
<option value="3">☆☆☆</option>
<option value="2">☆☆</option>
<option value="1">☆</option>
</select></td>
</tr>
</table>
<table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">推荐影片:</td>
<td width="120"><input type="radio" name="film_commend" value="true">
是 <input name="film_commend" type="radio" value="false" checked>
否</td>
<td width="60"><span class="style1">需要影币</span>:</td>
<td><input name="film_money" type="text" class="input1" id="film_money" onkeyup="value=value.replace(/[^\d]/g,'') " value="2" size="12" maxlength="3"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
个</td>
</tr>
</table>
<table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">播放等级:</td>
<td width="120"><select name="play_level" class="select1" id="play_level">
<option value="0">免费播放</option>
<option value="1" selected>普通用户</option>
<option value="2">VIP用户</option>
</select></td>
<td width="60">下载等级:</td>
<td><select name="down_level" class="select1">
<option value="0" selected>不允许下载</option>
<option value="1">普通用户</option>
<option value="2">VIP用户</option>
</select></td>
</tr>
</table>
<table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">海报路径:</td>
<td><input name="film_pic" type="text" class="input1" id="film_pic" size="30">
<a href="upload_pic.asp" target="_blank">点击此处上传图片文件</a></td>
</tr>
</table></td>
</tr>
</table>
<table width="550" height="140" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25">剧情简介:</td>
</tr>
<tr>
<td height="100" valign="top"><textarea name="film_gut" cols="55" rows="6" class="input1" id="film_gut"></textarea></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="500" height="5" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">影片地址:</td>
<td><input name="no1" type="text" class="input1" id="no1" value="" size="15">
集数
<input name="no2" type="text" class="input1" id="no2" value="1" size="2">
格式
<input name="no3" type="text" class="input1" id="no3" value=".rm" size="3">
<input name="Submit" type="button" class="button1" value="生成随机文件名" onclick="c_chinese(form1.no1.value)" title="将影片地址自动转换为汉语拼音字母加当前时间">
<input name="Button" type="button" class="button1" onclick="setid()" value="增加">
</td>
</tr>
<tr>
<td colspan="2" id="upid"></td>
</tr>
</table>
<table width="500" height="5" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table></td>
</tr>
</table>
<table width="550" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><input name="Submit" type="submit" class="button1" value="保存影片信息并进入下一步">
<input name="action" type="hidden" id="action" value="save_film"></td>
</tr>
</table>
</form>
<%
end sub
%>
<%
sub save_film()
if request.form("pathid")="" or myobj.ChkNum(request.form("pathid"))=false then
response.write"<script>alert('影片路径信息错误');history.back();</Script>"
response.end
end if
if request.form("film_name")="" then
response.write"<script>alert('请填写影片名称');history.back();</Script>"
response.end
end if
if request.form("film_director")="" then
response.write"<script>alert('请填写导演名称');history.back();</Script>"
response.end
end if
if request.form("film_player")="" then
response.write"<script>alert('请填写主要演员');history.back();</Script>"
response.end
end if
if request.form("film_class")="" then
response.write"<script>alert('影片分类值错误');history.back();</Script>"
response.end
end if
if request.form("film_from")="" or myobj.ChkNum(request.form("film_from"))=false then
response.write"<script>alert('影片产地值错误');history.back();</Script>"
response.end
end if
if request.form("film_level")="" or myobj.ChkNum(request.form("film_level"))=false then
response.write"<script>alert('推荐级别值错误');history.back();</Script>"
response.end
end if
if request.form("film_clear")="" or myobj.ChkNum(request.form("film_clear"))=false then
response.write"<script>alert('清晰度值错误');history.back();</Script>"
response.end
end if
if request.form("film_commend")="" then
response.write"<script>alert('请选择是否推荐该影片');history.back();</Script>"
response.end
end if
if myobj.chkbool(request.form("film_commend"))=false then
response.write"<script>alert('影片推荐值类型错误');history.back();</Script>"
response.end
end if
if request.form("film_money")="" or myobj.ChkNum(request.form("film_money"))=false then
response.write"<script>alert('所需影币值错误');history.back();</Script>"
response.end
end if
if request.form("play_level")="" then
response.write"<script>alert('允许播放的用户等级值错误');history.back();</Script>"
response.end
end if
if request.form("play_level")<>0 and request.form("play_level")<>1 and request.form("play_level")<>2 then
response.write"<script>alert('允许播放的用户等级值错误');history.back();</Script>"
response.end
end if
if request.form("down_level")="" then
response.write"<script>alert('允许下载的用户等级值错误');history.back();</Script>"
response.end
end if
if request.form("down_level")<>0 and request.form("down_level")<>1 and request.form("down_level")<>2 then
response.write"<script>alert('允许下载的用户等级值错误');history.back();</Script>"
response.end
end if
if request.form("no1")="" then
response.write"<script>alert('请填写影片地址并点击[增加]');history.back();</Script>"
response.end
end if
for j= 1 to request.form("no2")
if request.form("urla"&j&"")="" then
response.write"<script>alert('请填写影片地址并点击[增加]');history.back();</Script>"
response.end
end if
next
set rs=server.createobject("adodb.recordset")
rs.open "select * from films where (id is null)",conn,1,3
rs.addnew
rs("pathid")=request.form("pathid")
rs("film_name")=request.form("film_name")
if request.form("other_name")<>"" then
rs("other_name")=request.form("other_name")
end if
rs("film_director")=request.form("film_director")
rs("film_player")=request.form("film_player")
rs("film_class")=request.form("film_class")
rs("film_from")=request.form("film_from")
rs("film_level")=request.form("film_level")
rs("film_clear")=request.form("film_clear")
rs("film_commend")=cbool(request.form("film_commend"))
rs("film_money")=request.form("film_money")
rs("play_level")=request.form("play_level")
rs("film_pic")=request.form("film_pic")
rs("down_level")=request.form("down_level")
rs("film_gut")=request.form("film_gut")
rs.update
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "select @@identity AS 'films'",conn,1,1
id=rs(0)
rs.close
no2=request.form("no2")
set rs=server.createobject("adodb.recordset")
rs.open "select * from film_files where (id is null)",conn,1,3
for i=1 to no2
rs.addnew
film_filename=request.form("urla"&i&"")
rs("filmid")=id
rs("filename")=film_filename
rs.update
next
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<script language=javascript>alert('影片增加成功');location.href = 'film_add.asp';</Script>"
response.end
end sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -