<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<%
If Not FRAdminLevel(301) Then
	Call ErrorMsg()
End If
order=request.querystring("order")
id=request.querystring("id")
	if order<>"" and id<>"" then
		if order="up" then
			sql="select min(orderid) as min1 from JOB_Channel"
			set rss=conn.execute(sql)
				min=rss("min1")
			rss.close
			set rss=nothing
			set rso=server.CreateObject("adodb.recordset")
			sql="select * from JOB_Channel where ChannelID="&id
			rso.open sql,conn,1,1
			if not min=rso("orderid") then
			conn.execute("update JOB_Channel set orderid=orderid+1 where orderid="&rso("orderid")-1)
			conn.execute("update JOB_Channel set orderid=orderid-1 where ChannelID="&id)
			else
				response.write "<script language=javascript>alert('已经是第一了!');location.href='admin_orderchannel.asp';</script>"
			end if
			rso.close
			set rso=nothing
		else
			sql="select max(orderid) as max1 from JOB_Channel"
			set rss=conn.execute(sql)
				max=rss("max1")
			rss.close
			set rss=nothing
			set rso=server.CreateObject("adodb.recordset")
			sql="select * from JOB_Channel where ChannelID="&id
			rso.open sql,conn,1,1
			if not max=rso("orderid") then
			conn.execute("update JOB_Channel set orderid=orderid-1 where orderid="&rso("orderid")+1)
			conn.execute("update JOB_Channel set orderid=orderid+1 where ChannelID="&id)
			else
				response.write "<script language=javascript>alert('已经是最后了!');location.href='admin_orderchannel.asp';</script>"
			end if
			rso.close
			set rso=nothing

		end if
	end if
%>

<html>
<head>
<title>嘉挚人才（中国）</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<link href="../css/style<%=sk%>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../inc/input.js"></script></head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <tr>
    <th height=25 class="tableHeaderText">导航条管理 </th>
  </tr>
  <tr>
    <td height="22" class="bodytitle"><font color="ff6600"><b class="style1">　频道管理</b></font>：　<A href="Admin_Channel.asp">频道管理首页</A>　|　<a href="Admin_addChannel.asp">添加频道</a>　|　<a href="admin_orderchannel.asp">频道排序</a></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <tr>
    <th height=25 colspan="10" class="tableHeaderText">导航排序管理 </th>
  </tr>
  <tr>
    <td width="50" align="center" class="bodytitle"><font color="ff6600"><b class="style1">频道ID</b></font></td>
    <td width="82" height="22" align="center" class="bodytitle"><font color="ff6600"><b class="style1">频道名称</b></font></td>
    <td width="69" align="center"><font color="ff6600"><b class="style1">打开方式</b></font></td>
    <td width="72" align="center" class="bodytitle"><font color="ff6600"><b class="style1">频道类型</b></font></td>
    <td width="197" height="22" align="center"><font color="ff6600"><b class="style1"><STRONG>频道目录/链接地址</STRONG></b></font></td>
    <td width="71" align="center"><font color="ff6600"><b class="style1"><STRONG>项目名称</STRONG></b></font></td>
    <td width="69" align="center"><font color="ff6600"><b class="style1"><STRONG>功能模块</STRONG></b></font></td>
    <td width="99" align="center"><font color="ff6600"><b class="style1"><strong>频道状态</strong></b></font></td>
    <td width="68" height="22" align="center"><font color="ff6600"><b class="style1"><STRONG><font color="ff6600"><b class="style1"><strong>排序</strong></b></font></STRONG></b></font></td>
    <td width="141" align="center"><STRONG><font color="ff6600"><b class="style1"><STRONG>排序操作</STRONG></b></font></STRONG></td>
  </tr>
  <%
set rs=server.CreateObject("adodb.recordset")
sql="select * from JOB_Channel order by orderid"
rs.open sql,conn,1,1
do while not rs.eof
  %>
  <tr bgcolor="#EFEFEF" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'"> 
    <td width="50" align="center"><%=rs("ChannelID")%></td>
    <td width="82" align="center"><%=rs("ChannelName")%></td>
    <td align="center">
		<%
			if rs("OpenType")=0 then
			response.write "原窗口"
			else
			response.write "新窗口"
			end if
		%>	</td>
    <td width="72" align="center">
	<%
			select case rs("ChannelType")
			case 0
			response.write "<font color=green>系统频道</font>"
			case 1
			response.write "<font color=blue>内部频道</font>"
			case 2
			response.write "<font color=red>外部频道</font>"
			end select
		%>	</td>
    <td width="197">
	<%
			if not isnull(rs("LinkUrl")) then
			response.write "地址："&rs("LinkUrl")
			else
			response.write "目录："&rs("ChannelDir")
			end if
		%>	</td>
    <td width="71" align="center"><%=rs("ChannelShortName")%></td>
	  <td width="69" align="center">
    <%
	  		'myarray=("招聘","求职","院校","猎头","培训","留言","测评","派遣","下载","文章")
			select case rs("ModuleType")
			case 1
			response.write "求职"
			case 2
			response.write "招聘"
			case 3
			response.write "院校"
			case 4
			response.write "猎头"
			case 5
			response.write "培训"
			case 6
			response.write "留言"
			case 7
			response.write "测评"
			case 8
			response.write "派遣"
			case 9
			response.write "下载"
			case 10
			response.write "文章"
			case 11
			response.write "论坛"
			case 12
			response.write "视频招聘"
			case 13
			response.write "视频简历"
			case 14
			response.write "帮助"
			case 15
			response.write "分站"
			case else
			response.write "未知"
			end select
	  %>    </td>
		<td width="99" align="center">			<%
				if rs("Disabled") then
					response.write "<font color=red>×</font>"
					else
					response.write "<font color=green>√</font>"
				end if
			%>
</td>
		<td width="68" align="center">
		<%=rs("orderid")%>
	</td>
        <td width="141" align="center">
			<a href="?order=up&id=<%=rs("ChannelID")%>">↑</a>&nbsp;&nbsp;&nbsp;
			<a href="?order=down&id=<%=rs("ChannelID")%>">↓</a>			</td>
  </tr>
 <%
 rs.movenext
 loop
 rs.close
 set rs=nothing
 %>
</table>
<!--#include file="../inc/copy.asp" -->
</body>
</html>
<%conn.Close:Set conn=Nothing%>



