<!-- #INCLUDE FILE="include/onlogin.asp" -->
<!-- #INCLUDE FILE="include/conn.asp" -->
<%
dim change,delet,addname,typena,typer
tit=vbcrlf & "<a href='admin_nsort.asp?nsort=art'>恅戲</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_nsort.asp?nsort=down'>狟婥</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_vsort.asp'>萇荌</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_nsort.asp?nsort=busin'>陓洘</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_nsort.asp?nsort=gall'>芞踱</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_nsort.asp?nsort=flash'>雄賒</a>&nbsp;幸&nbsp;" & _
    vbcrlf & "<a href='admin_nsort.asp?nsort=web'>厙桴</a>"
response.write header(5,tit)

change=request("change")
delet=request("delet")
addname=request("addname")
if delet<>"" then
   conn.execute"delete from videotype where typeid="&request("typeid")
      set rs=nothing
   conn.close
   set conn=nothing
response.redirect Request.ServerVariables("HTTP_REFERER")
end if

if change<>"" then
typena=request("typename")
set rs=server.createobject("adodb.recordset")

sql="select * from videotype where typeid="&request("typeid")
rs.open sql,conn,1,3

rs("type")=typena
rs.update
rs.close
   set rs=nothing
   conn.close
   set conn=nothing
response.redirect Request.ServerVariables("HTTP_REFERER")
end if

if addname<>"" then
typer=request("type")
set rs=server.createobject("adodb.recordset")
rs.open "select * from videotype",conn,1,3
rs.addnew
rs("type")=typer
rs.update
rs.close
   set rs=nothing
   conn.close
   set conn=nothing
response.redirect Request.ServerVariables("HTTP_REFERER")
end if

if delet="" and change="" and addname="" then 
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td width="100%" align=center colspan=2><b>萇荌煦濬奪燴:</b><br><br></td>
    <%set rs=server.createobject("adodb.recordset")
   sql="select * from videotype"
   rs.open sql,conn,1,3
  do while not rs.eof%>
  </tr>
  </form>
  <form method="POST" onsubmit action="admin_vsort.asp?typeid=<%=rs("typeid")%>">
    <tr>
      <td width="37%" align="right"><font color="#0066CC"><%=rs("type")%></font>&nbsp;</td>
      <td><input type="text" name="typename" size="15" value=<%=rs("type")%>>&nbsp;
      <input type="submit" value="党蜊" name="change">
      <input type="submit" value="刉壺" name="delet"></td>
    </tr>
  </form>
  <% rs.movenext
      loop
      %>
  <form method="POST" onsubmit action="admin_vsort.asp?act=add">
  <tr>
  	<td colspan=2 height=30></td>
  </tr>
    <tr>
      <td colspan=2 align="center">陔崝ㄩ
      <input type="text" name="type" size="15">&nbsp;
      <input type="submit" value="陔崝" name="addname"></td>
    </tr>
  </form>
</table>

<%
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write ender()
end if
%>

