<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../html/yidacms_htmlurl.asp" -->
<!--#include file="../js/admin_vipkp.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>视频配置！</title>
	<script charset="utf-8" src="<%=webpath%>bianji/kindeditor.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/plugins/code/prettify.js"></script>

	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content1"]', {

				uploadJson : '<%=webpath%>uploadclass/upfile_flash.asp',
				fileManagerJson : '<%=webpath%>uploadclass/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>
<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

		set rs = server.createobject("adodb.recordset")
		sql="select * from book_management"
		rs.open sql,dbok,1,1
		html1 = rs("asp_html")
		set rs=nothing

        if request("t")="videoedit" Then

			if len(trim(request.Form("shuaiweb_videoname")))<1 then
				response.write ("<script language=javascript> alert('名称必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if
		  
			if len(trim(request.Form("shuaiweb_videocontent")))<1 then
				response.write ("<script language=javascript> alert('内容不能为空，且不少于1个字符！');history.back(-1);</script>")
				response.end
			end if 
		  
		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_video WHERE id= "&request("id")&"" 
		rs.open sql,dbok,1,3
			rs("shuaiweb_videoname")=trim(request.form("shuaiweb_videoname"))
			rs("shuaiweb_videoclass")=trim(request.form("shuaiweb_videoclass"))
			rs("shuaiweb_videocontent")=trim(request.form("shuaiweb_videocontent"))
			rs("shuaiweb_videourl")=trim(request.form("shuaiweb_videourl"))
			rs("shuaiweb_videopic")=trim(request.form("shuaiweb_videopic"))
			rs("shuaiweb_videowidth")=trim(request.form("shuaiweb_videowidth"))
			rs("shuaiweb_videoheight")=trim(request.form("shuaiweb_videoheight"))
			rs("shuaiweb_videotype")=trim(request.form("shuaiweb_videotype"))
			rs("yida_language")="ch"
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功修改！');location.replace('admin_video.asp');</script>"
		End If 

		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_video WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1
		T_video = rs("shuaiweb_videoclass")
%>
		<table width="98%" height="100%" border="0"cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
		   <form id="form1" name="form1" method="post" action="admin_videoedit.asp?t=videoedit&id=<%=rs("id")%>">
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">选择栏目<br />
<%
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_videoclass"
		rs.open sql,dbok,1,1
%>
          <select name="shuaiweb_videoclass" id="shuaiweb_videoclass" class="winla">
             <%
		if rs.bof and rs.eof then
			response.write "暂无记录!"
				Else
		do while not rs.eof
                %>
              <option value="<%=rs("id")%>" <%if T_video = rs("id") then%>selected<%end if%> ><%=rs("shuaiweb_videoclassname")%></option>	
                <%
		rs.MoveNext 
		loop   
		rs.close
		End If 

		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_video WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1
%>

</select>
                        </td>
                        </tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">视频名称<br /><input name="shuaiweb_videoname" type="text" id="shuaiweb_videoname" class="win" value="<%=rs("shuaiweb_videoname")%>"/> <font color=red>(必填)</font></td>
                        </tr>
                        <tr>
                          <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">视频格式<br /> 
	                          <input type="radio" name="shuaiweb_videotype" value="1" <%if rs("shuaiweb_videotype")="1" then response.write "checked" end if %>/>
				Swf
				  <input type="radio" name="shuaiweb_videotype" value="2" <%if rs("shuaiweb_videotype")="2" then response.write "checked" end if %>/>
			  Flv
				  <input type="radio" name="shuaiweb_videotype" value="3" <%if rs("shuaiweb_videotype")="3" then response.write "checked" end if %>/>
			  Rm Rmvb Avi Wmv
</td>
			</tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">视频封面<br /><input name="shuaiweb_videopic" id="shuaiweb_productsminpic" type="text" value="<%=rs("shuaiweb_videopic")%>" class="win"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/min/upfile.htm" allowtransparency="true" ></iframe></div></td>
                        </tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">视频URL<br /><input name="shuaiweb_videourl" value="<%=rs("shuaiweb_videourl")%>" type="text" class="win"/> <font color=red>(必填)</font></td>
                        </tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">宽度&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;高度<br /><input name="shuaiweb_videowidth" type="text" value="<%=rs("shuaiweb_videowidth")%>" class="win2"/> <input name="shuaiweb_videoheight" type="text" value="<%=rs("shuaiweb_videoheight")%>" class="win2"/><font color=red>(必填)</font></td>
                        </tr>
			<tr>
			  <td width="650" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">信息内容<br /><textarea id="content1" name="shuaiweb_videocontent" style="width:100%;height:300px;"><%=rs("shuaiweb_videocontent")%></textarea><font color=red>(必填)</font>
</td>
			</tr>
			<tr>

			  <td><input type="submit" name="Submit" value="提交" class="inanniu"/>
			  <input type="reset" name="Submit2" value="重置" class="inanniu" /></td>
			</tr>
			</form>
		</table>
<%
rs.close
set rs=nothing
%>
</body>
</html>
