| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 532 人关注过本帖
标题:求助怎么改写这篇源码?
只看楼主 加入收藏
sen860203
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-3-2
收藏
 问题点数:0 回复次数:3 
求助怎么改写这篇源码?

我下载了一个电影网站源码, 但是在添加影片的时候,会让你选择隶属服务器,我想把那个改成自己直接添加的影片地址,不知道该怎么改,求助高手帮我指点下!
下面是源码!



<%@language=vbscript codepage=936 %>
<!--#include file="../inc/conn.asp"-->
<!--#include file="AdminChkPurview.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>添加影片</title>
<link rel="stylesheet" type="text/css" href="../inc/Admin_Style.css">
<script language = "JavaScript">
function isNumber(String)
{
var Letters = "1234567890";
var i;
var c;
if(String.charAt( 0 )=='-')
return false;
if( String.charAt( String.length - 1 ) == '-' )
return false;
for( i = 0; i < String.length; i ++ )
{
c = String.charAt( i );
if (Letters.indexOf( c ) < 0)
return false;
}
return true;
}
function CheckForm()
{
if (document.myform.Title.value=="")
{
alert("影片名称不能为空!");
document.myform.Title.focus();
return false;
}
if (document.myform.typeid.value=="typeid")
{
alert("请选择影片类别!");
document.myform.typeid.focus();
return false;
}
if (document.myform.where.value=="where")
{
alert("请选择影片出产地!");
document.myform.where.focus();
return false;
}
if (document.myform.Movielevel.value=="Movielevel")
{
alert("请选择影片推荐度!");
document.myform.Movielevel.focus();
return false;
}
if (document.myform.howlong.value=="")
{
alert("影片长度不能为空!");
document.myform.howlong.focus();
return false;
}
if(!isNumber(document.myform.howlong.value))
{
alert("影片长度只能为数字!");
document.myform.howlong.focus();
return false;
}
if (document.myform.name.value=="")
{
alert("影片主演不能为空!");
document.myform.name.focus();
return false;
}
if (document.myform.domurl3.value=="")
{
alert("影片主演不能为空!");
document.myform.domurl3.focus();
return false;
}
if (document.myform.serverip.value=="serverip")
{
alert("请选择影片隶属服务器!");
document.myform.serverip.focus();
return false;
}
if (document.myform.no1.value=="")
{
alert("影片地址不能为空!");
document.myform.no1.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("影片内容不能为空!");
document.myform.Content.focus();
return false;
}
if (document.myform.Content.value.length>2048000)
{
alert("文章内容太长,超出了ACCESS数据库的限制(2048K)!建议将文章分成几部分录入。");
document.myform.Content.focus();
return false;
}
return true;
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
if request("add")="" then
%>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Movieadd.asp?add=ok" target="_self">
<tr>
<td height="22" align="center" class="title" colspan="3"><b>添 加 影 片</b></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片名称:</strong></td>
<td width="730"><input name="Title" type="text" value="" size="50" maxlength="30"></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片设置:</strong></td>
<td colspan="2">
<select name="typeid" size="1">
<%
dim rs,sql,sel
set rs=server.createobject("adodb.recordset")
sql="select * from type order by Arrange"
rs.open sql,conn,1,1
do while not rs.eof
sel="selected"
response.write "<option " & sel & " value='"+CStr(rs("typeID"))+"' name=typeid>"+rs("type")+"</option>"+chr(13)+chr(10)
rs.movenext
loop
rs.close
%>
<option selected name="typeid" value="typeid">影片类型</option>
</select>&nbsp;
<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="where" name="where">出产地区</option>
</select>&nbsp;
<select size="1" name="Movielevel">
<option value="1">一星级</option>
<option value="2">二星级</option>
<option value="3">三星级</option>
<option value="4">四星级</option>
<option value="5">五星级</option>
<option value="Movielevel" selected name="Movielevel">选择推荐度</option>
</select>&nbsp;
<select size="1" name="canlook">
<option selected value="1">普通影片</option>
<option value="3">黄金影片</option>
<option value="0">免费电影</option>
</select> </td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>播放格式:</strong></td>
<td colspan="2">
<input type="radio" value="rm" checked name="movietype" style="border: 0px;background-color: #eeeeee;">
<img src="../Images/realplayer.gif" width="20" height="20" border="0">&nbsp;&nbsp;
<input type="radio" value="md" name="movietype" style="border: 0px;background-color: #eeeeee;">
<img src="../Images/mediaplayer.gif" width="20" height="20" border="0">&nbsp;&nbsp;
<input type="radio" value="qt" name="movietype" style="border: 0px;background-color: #eeeeee;">
<img src="../Images/QuickTime.gif" width="20" height="20" border="0"> </td>
<tr class="tdbg">
<td width="254" align="right"><strong>影片长度:</strong></td>
<td colspan="2"><input name="howlong" type="text" value="" size="20" maxlength="5">
分钟</td>
</tr>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>领衔主演:</strong></td>
<td colspan="2"><input name="name" type="text" value="" size="50" maxlength="50"></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>图片地址:</strong></td>
<td colspan="2">
<input type="text" name="domurl3" size="38" class="smallinput" maxlength="255" value=
"<%if request.cookies("images")="" then%>../images/movie.jpg<%else%><%response.write request.cookies("images")%><%end if%>">
</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>上传图片:</strong></td>
<td colspan="2">
<iframe style="top:2px" ID="UploadFiles" src="upload.asp" frameborder=0 scrolling=no width="450" height="25">
</iframe>
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>隶属服务器:</strong></td>
<td colspan="2">
<select class="smallSel" name="serverip" size="1">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from movie"
rs.open sql,conn,1,1
c=1
do while not rs.eof
ipsip=rs("ipsip")
id=rs("id")
sel="selected"
response.write "<option " & sel & " value='"&id&"' name='serverip'>"&c&"号服务器 "&ipsip&"</option>"
c=c+1
rs.movenext
loop
rs.close
%>
<option selected value="serverip" name="serverip">隶属服务器</option>
</select> </td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片地址:</strong></td>
<td colspan="2">
<table width="554" cellspacing="0" border="0" style="border-collapse: collapse" bordercolor="#111111">
<script language="javascript">
function setid()
{
str='';
if(!window.myform.no.value)
window.myform.no.value=1;

for(i=1;i<=window.myform.no.value;i++)
{
if(window.myform.no.value<10)
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集<BR>';
}
else if(window.myform.no.value<100)
{
if(i<10)
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+'0'+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集 <BR>';
}
else
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集<BR>';
}
}
else if(window.myform.no.value<1000)
{
if(i<10)
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+'00'+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集 <BR>';
}
else if(i<100)
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+'0'+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集 <BR>';
}
else
{
str+='&nbsp;影片地址:<input type="text" name="urla'+i+'" class="button" style="padding-left:1pt" size=45 value="'+window.myform.no1.value+''+i+''+window.myform.no2.value+'">&nbsp;第'+i+'集<BR>';
}
}
}
window.upid.innerHTML=str+'<br>';
}
</script>
<tr>
<td width="490">
<input type="text" name="no1" class="button" value="" size="32">
集数<input type="text" name="no" class="button" value="1" size="3">
格式<input type="text" name="no2" class="button" value=".rm" size="5">
<input type="button" name="Button" class="buttonface" onClick="setid();" value="设定" style="cursor: hand;background-color: #cccccc;"></td>
</tr>
<tr>
<td colspan="2" id="upid" width="564"></td>
</tr>
</table> </td>
</tr>
<tr class="tdbg">
<td width="254" align="right" valign="middle"><p><strong>影片简介:</strong></p></td>
<td colspan="2"><textarea name="Content" value="" cols="50" rows="10"></textarea></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>推荐设置:</strong></td>
<td colspan="2">热点推荐
<input name="best" type="radio" value="1" checked style="border: 0px;background-color: #eeeeee;">

<input type="radio" name="best" value="0" style="border: 0px;background-color: #eeeeee;">
否&nbsp;&nbsp;首页推荐
<input type="radio" name="firstbest" value="1" style="border: 0px;background-color: #eeeeee;">
&nbsp; 是
<input type="radio" name="firstbest" value="0" checked style="border: 0px;background-color: #eeeeee;">
否 </td>
</tr>
</td>
</tr>
<tr class="tdbg">
<td align="center" colspan="3">
<input name="Add" type="submit" id="Add" value=" 添&nbsp;&nbsp;加 " style="cursor: hand;background-color: #cccccc;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="Cancel" type="reset" id="Cancel" value=" 重&nbsp;&nbsp;填 " style="cursor: hand;background-color: #cccccc;"> </td></tr>
</form>
</table>
<%
else
set rs=server.createobject("adodb.recordset")
sql="select * from learning where (articleid is null)"
rs.open sql,conn,1,3
rs.addnew

rs("typeid")=Request.Form("typeid")
rs("softlevel")=Request.Form("movielevel")
rs("where")=Request.Form("where")
rs("title")=request.form("title")
rs("name")=request.form("name")
rs("content")=replace(request.form("content"),vbcrlf,"<br>")
rs("canlook")=request.form("canlook")
rs("howlong")=request.form("howlong")
rs("serverip")=request.form("serverip")
rs("best")=request.form("best")
rs("firstbest")=request.form("firstbest")
rs("domurl")=request.form("domurl3")
rs("movietype")=request.form("movietype")
rs.update
articleid=rs("articleid")
rs.close

no=request.form("no")
set rs=server.createobject("adodb.recordset")
sql1="select * from movieurl where (id is null)"
rs.open sql1,conn,1,3
for i=1 to no
rs.addnew
url=trim(request.form("urla"&i&""))
rs("nameid")=articleid
rs("url")=url
rs.update
next

rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<table cellpadding="0" cellspacing="1" border="0" width="100%">
<tr>
<td height="22" align="center" class="title">&nbsp;</td>
</tr>
<tr class="tdbg">
<td height="468" align="center"><p>添加成功</p>
<a href="Movieadd.asp"><p>点这里继续添加</p></a></td>
</tr>
<tr class="tdbg">
<td width="254" align="right">&nbsp;</td>
</tr>
</table>
<%
end if
%>
<!--#include file="AdminFooder.asp"-->
</body>
</html>

搜索更多相关主题的帖子: 源码 
2006-03-02 02:30
gbyacc
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2006-2-21
收藏
得分:0 
看不清啊兄弟

2006-03-06 19:06
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:0 

这,怎么看?


----我怎能在别人的苦难面前转过脸去----
2006-03-06 19:09
gbyacc
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2006-2-21
收藏
得分:0 
看不清啊兄弟

2006-03-06 21:00
快速回复:求助怎么改写这篇源码?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021204 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved