<!--#include file="Qvodcms_Conn.asp"-->
<!--#include file="QvodCms_Check.asp"-->
<!--#include file="../Cache/QvodCms.Class_Cai.asp"-->
<!--#include file="Caiji/Cai_Conn.asp"-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>管理页面</TITLE>
<link href="skins/css/jaja_main.css" rel="stylesheet" type="text/css" />
<script language = "javaScript" src = "Qvodcms_All.js" type="text/javascript"></script>
<style type="text/css">
.td2 input{color: #555;height:21px;}
.td2 .small{color:#999;border:#DFDFDF 1px solid;}
</style>
</head>
<body>
<%
Dim action,class_id,did,class_bigid,class_orderid,class_name,svid
action=Trim(Request.QueryString("action"))
did=Replace(Trim(Request.Form("did")),", ",",")'批量ID
If action="saveedit" Then
      svid=Split(did,",")
	  For Each id In svid
	   i=i+1
	   Sql="Update cj_class set class_id='"&QvodCms_CLng(Request.Form("class_id"&id))&"' where c_id="&id&""
	   Conn_Cai.Execute Sql
	   next
	   Set Conn_Cai = Nothing
	   Response.Redirect "QvodCms_Class_Cai.asp" 
End If
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th colspan=2 background="Skins/images/tdbg.gif" class="title">&nbsp;<a href="?action=add">采集分类绑定</a></th>
</tr>
<tr><td class="td2">

<table width="100%" border=0 align=center cellpadding="4" cellspacing=1 class=tbtitle style="background: #cad9ea;">
<tr bgcolor="#e4edf9" style="text-align:left;">
  <td width="35">选中</td>
  <td width="139" align="center">采集栏目名称</td>
  <td width="786">&nbsp;&nbsp;&nbsp;绑定分类名称</td>  
  </tr>
<form action='?action=saveedit' method='post' name='form'>
<%
Call OpenConn()
Set rs = Server.CreateObject("adodb.recordset")
sql = " Select * from cj_class "
rs.Open sql, Conn_Cai, 1, 1
 if not(rs.eof and rs.bof) then
   Do while not rs.eof
%>
<tr align="left" bgcolor=#f5fafe>
<td ><input name='did' type='checkbox' value='<%=rs("c_id")%>' style='border:none' checked></td>
<td ><%=rs("class_name")%></td>
<td >&nbsp;&nbsp;&nbsp;<select name="class_id<%=rs("c_id")%>" ><option value="">请选择分类</option><%=QvodCms_Class_Cai(rs("class_id"))%></select></td>
</tr>
 <%
 rs.Movenext:Loop:rs.Close:Set rs=Nothing:Set Conn_Cai = Nothing
 End If:Call CloseConn()
 %>

<tr bgcolor='#ffffff'><td colspan='3' align='center'><INPUT type='submit' value='批量修改绑定栏目' name='Submit'></td></tr>
</form>
</table>

</td></tr> 
</table>
</body>
</html>

<%
'**************************************************
'TypeID：大类ID
'作  用：显示无级分类
'Call QvodCms_Class_Cai(0,"",classid)
'**************************************************
Function QvodCms_Class_Cai(TypeID)'递归查询分类
		Dim RSclass,TempStr
		TempStr ="┄"
		for m=1 to Class_Count
		if Class_Cid(m)=Trim(TypeID) then
			QvodCms_Class_Cai = QvodCms_Class_Cai & "<option value="""&TypeID&""" selected>"
		else
			QvodCms_Class_Cai = QvodCms_Class_Cai & "<option value="""&Class_Cid(m)&""">"
		end if
			QvodCms_Class_Cai = QvodCms_Class_Cai & "├" & TempStr & Class_Cname(m)
			QvodCms_Class_Cai = QvodCms_Class_Cai & "</option>" & Chr(13) & Chr(10)
			QvodCms_Class_Cai = QvodCms_Class_Cai 
		Next	
End Function
%>
