<%@ Language=VBScript %>
<!--#include file="../../yns_chklogin.asp" -->
<!--#include File="../Functions.asp"-->
<!--#include File="../Const.asp"-->
<%

Dim Page
Page = Request("Page")
If Page = "" Then
  Page = 1
End If

Dim MyConn, RS, SqlSelect
Set MyConn = Server.CreateObject("Adodb.Connection")
Set MyConn = GetConnection

'修改排序
'最后更新：DS  2005-04-19
dim orders_id,orders
orders_id=trim(Request.form("orders_id"))
orders=trim(Request.form("order"))
if orders="" then orders="null"
if (isnumeric(orders) or orders="null") and isnumeric(orders_id) then
	MyConn.execute("update SitcomInfo set [order]="&orders&" where Sitcomid="&orders_id)
end if
'排序结束


Set RS = Server.CreateObject("Adodb.RecordSet")
Dim TypeID
TypeID=clng(Request.QueryString("TypeID"))
SqlSelect = "Select SitcomInfo.SitcomID,SitcomInfo.SitcomName,SitcomType.TypeName,SitcomInfo.[order],SitcomInfo.tj From SitcomInfo inner join SitcomType on SitcomType.TypeID=SitcomInfo.Type "
If TypeID<>0 Then SqlSelect = SqlSelect & " Where SitcomInfo.Type="&TypeID
RS.Open SqlSelect, MyConn, 1 , 1
RS.PageSize = SitcomPageSize
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="../../zf.css">
</HEAD>

<script language=javascript>
<!--
function ShowDetailSitcom(SitcomID)
{
	window.open('ShowOneSitcom.asp?SitcomID=' + SitcomID,null,'top=0,left=80,height=' + (screen.availHeight-50) + ',width=' + (screen.availWidth-160) + ',status=no,toolbar=no,scrollbars=yes,menubar=no,location=no',false);
	return false
}
//-->
</script>

<BODY bgcolor="#ffffff">
<table>
  <tr>
    <td height=40 valign=bottom align=right> <a href=AddSitcom.asp?TypeID=<%=TypeID%>>添加产品</a> / 
      <a href=../SitcomType/default.asp><img src="../../images/up.gif" border="0">返回分类</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    </td>
  </tr>
  <%If RS.EOF Then
  'on error resume next
  %>
  <tr>
    <td align=center><br><span style="font-size:15px;color:blue;"><%=MyConn.Execute("Select TypeName From SitcomType where TypeID="&TypeID,1,1)(0)%></span></td>
  </tr>
  <tr>
    <td valign=middle height=60 align=center><font color=red>对不起，系统中还没有产品！</font><br>
    </td>
  </tr>
  <%
  Else
  %>
  <tr>
    <td align=center><span style="font-size:15px;color:blue;"><%=rs("TypeName")%></span></td>
  </tr>
  <tr>
    <td><HR></td>
  </tr>
  <tr>
    <td><%ShowOnePageSitcom RS, Page%></td>
  </tr>
  <tr>
    <td height=20><HR></td>
  </tr>
  <tr>
    <td><%call PageBorrows2 (FileName, Page, RS ,"&TypeID="&TypeID) %></td>
  </tr>
</table>
<%
  End If
RS.Close
Set RS = Nothing
MyConn.Close
Set MyConn = Nothing
%>
</BODY>
</HTML>
