<!--#include file="../conn/conn1.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="../config.asp"-->

<%
typeid=request("typeid")
Set filmtype= Server.CreateObject("ADODB.Recordset") 
strSql="select * from type"
filmtype.open strSql,Conn,1,1 
%>
<script language="JavaScript">
<!--
function  validate()
    {
       
        if  (document.myform.type.value=="")
        {
            alert("新加类型不能为空");
            document.myform.type.focus();
            return false ;
        }
		}

function cform(){
 if(!confirm("你是否确认删除该类型？"))
 return false;

}
 -->
</script>

<link rel="stylesheet" type="text/css" href="../css/style.css">
<title>管理视频</title>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<center>
  <TABLE width="95%" border="0" cellpadding="0" cellspacing="2">
  <TR valign=top>
    <td><TABLE width=100% align=center>
      <TR bgcolor="#660066">
        <TD colspan=3 align=center height=20><font color="#FFFFFF">管理视频类别</font></TD>
      </TR>
      <%if filmtype.eof and filmtype.bof then
           response.write "<font color='red'>还没有任何分类</font>"
           else
           do while not (filmtype.eof or filmtype.bof)
           %>
      <FORM METHOD=POST ACTION="etype.asp">
        <tr onMouseOut="this.style.backgroundColor='#f3f3f3'" onMouseOver="this.style.backgroundColor='#BFDFFF'">
          <td><INPUT name=type TYPE="text" id="type" style="font-size:9pt;border: 1px solid #000000; " value="<%=filmtype("type")%>" size=13 >
              <INPUT TYPE="hidden" name=id value=<%=filmtype("typeid")%>>          </td>
          <td align=center><INPUT TYPE="submit" name="edit" value="修改" style="border:1pt solid #636563;font-size:9pt; LINE-HEIGHT: normal;HEIGHT: 18px;">          </td>
          <td align="center"><INPUT TYPE="submit" value="删除" name="del" style="border:1pt solid #636563;font-size:9pt; LINE-HEIGHT: normal;HEIGHT: 18px;" onClick="return cform();">          </td>
        </tr>
      </FORM>
      <%filmtype.movenext 
        loop 
        end if%>
      <FORM METHOD=POST ACTION="etype.asp" name=myform>
        <tr>
          <td colspan=3>新类别：
              <input name="type" type="text" id="type" style="font-size:9pt;border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000" size=10>
<INPUT TYPE="submit" name="add" value="增加" style="border:1pt solid #000000;font-size:9pt; LINE-HEIGHT: normal;HEIGHT: 18px;" onClick="return  validate()">          </td>
        </tr>

      </FORM>
    </TABLE></TD>
  </TR>
   <%filmtype.close
	set filmtype=nothing
%>
  </TABLE>

	</td>
	</TR></TABLE>
</center>