<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<%@ taglib uri="/cms4j" prefix="cms4j" %>
<%@ taglib tagdir="/WEB-INF/tags/" prefix="cms4jExd"%>
<cms4jExd:init/>

<script src="../../js/common.js"></script>
<script src="../../js/page_init.js"></script>
<script src="js/article.js"></script>
<script>
//页面初始化
function pageInit(){
	selectInit("article_order_list","${param.order}");
	selectInit("special_list","${param.special_id}");
	
	selectInit("page_list","${param.pn}");
}

//aschen add 20060807 多专题文章
function OpenChildWindow() {
	 var idSelected=document.cms4jForm.SPECIAL_ID.value;
	 url = 'special_list.jsp?idSelected='+idSelected;
	 sWidth = '500';
	 sHeight = '400';
     gOpenedWindow = null;
     gOpened = false;
     var  str = "height=" +  sHeight +  ",innerHeight=" + sHeight;
     str += ",width=" + sWidth + ",innerWidth=" + sWidth;
    if (window.screen) {
       var ah = window.screen.availHeight - 30;
       var  aw = window.screen.availWidth - 10;
       var xc = (aw - sWidth)/2;
       var yc = (ah - sHeight) / 2;
       str += ",left=" + xc + ",screenX=" + xc;
       str += ",top=" + yc + ",screenY=" + yc;
      }      
      str +=",scrollbars=yes";
     gOpenedWindow =  window.open(url, "window" , str);
}

//设置专题列表
function resetSel(){
	var sel = document.getElementById("SPECIAL_SHOW");
	sel.options.length=0;
	var id=document.cms4jForm.SPECIAL_ID.value;
	var name=document.cms4jForm.SPECIAL_NAME.value;
	if(id=="1"||id==null||id==""){
		return;
	}else{
		var arrId=new Array();
		var arrName=new Array();
		arrId=id.split("|");
		arrName=name.split("|");
		var idValue;
		var nameValue;
		for(var i=0;i<arrId.length-1;i++){
			idValue=arrId[i];
			nameValue=arrName[i];
			sel.options[sel.options.length] = new Option(nameValue,idValue);	
		}
	}
}

function initMove(){
document.cms4jForm.moveto.value=document.cms4jForm.SPECIAL_ID.value
}
</script>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>CMS4J </title>
<link href="../skin/blue/css/oper_area_style.css" rel="stylesheet" type="text/css">
</head>

<body  onLoad="pageInit()">
<form action="" method="post" name="cms4jForm" id="cms4jForm">
 <input type="hidden" value="1" name="moveto">
  <input type="hidden" value="1" name="SPECIAL_ID">
 <input type="hidden" value="1" name="SPECIAL_NAME">
<cms4j:article special_id="${param.special_id}" order="${param.order}" page_size="15" scope="" article_id="" filter="audited" purview_type="admin">

<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="12"> 
    <td width="3%"><img src="../../images/admin/oper_table_up_left.gif" width="26" height="12"></td>
    <td width="92%" background="../../images/admin/oper_table_up_bg.gif" height="12"></td>
    <td width="5%"><img src="../../images/admin/oper_table_up_right.gif" width="26" height="12"></td>
  </tr>
  <tr> 
    <td colspan="3"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="5" background="../../images/admin/oper_table_left_bg.gif"><img src="../../images/admin/oper_table_left_bg.gif" width="5" height="2"></td>
          <td background="../../images/admin/oper_table_bg.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="31%" class="title_bar">专题文章管理
                  <select name="special_list" class="form_select" onChange="special_filter()">
                    <option selected value="all">所有专题</option>
					<option id = "1" value="1">无</option>
                    <cms4j:article_special>
                    <option id = "<%=special.getSPECIAL_ID()%>" value="<%=special.getSPECIAL_ID()%>"><%=special.getNAME()%></option>
                    </cms4j:article_special>
                  </select></td>
                <td width="26%" align="center" class="title_bar"><select name="article_order_list" class="form_select" onChange="article_order()">
                  <option value="" selected>排列顺序</option>
                  <option value="date_desc">时间-降序</option>
                  <option value="date">时间-升序</option>
                  <option value="clicks_desc">点击数-降序</option>
                  <option value="clicks">点击数-升序</option>
                  <option value="id_desc">ID-降序</option>
                  <option value="id">ID-升序</option>
                </select>                    </td>
                <td width="43%" align="right" class="title_bar">移动所选至
                 
                  <select name="SPECIAL_SHOW" id="SPECIAL_SHOW" SIZE="1" STYLE="WIDTH:40%">
                  </select><a href="javascript:OpenChildWindow();">选择</a>
                  <input name="Submit22" type="button" class="form_button" value="移 动" onClick="initMove();moveArticleToSpecialFromSelected(this.form);">                 
			  </td>
              </tr>
              <tr height="4"> 
                <td height="4" colspan="3"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table_border_bg">
              <tr class="table_title">
                <td width="2%" align="center"><input type="checkbox" name="selectAll" value="checkbox" onClick="checkAll(this.form)"></td> 
                <td width="7%">ID</td>
                <td width="33%">标题</td>
                <td width="14%">所属栏目</td>
                <td width="21%">所属专题</td>
                <td width="8%">添加者</td>
                <td width="7%">点击数</td>
                <td width="8%">操作</td>
              </tr>
			  
			  <cms4j:article_list>
              <tr class="table_border_cell_bg">
                <td align="center"><input type="checkbox" name="selected" value="<%=article_info.getID()%>" onClick="unselectall('selectAll')"></td> 
                <td align="center"><%=article_info.getID()%></td>
                <td><%=article_info.getInfoPropImage()%> <%=article_info.getTITLE()%></td>
                <td align="center"><%=article_info.getCLASS_NAME()%></td>
                <td align="center"><%=article_info.getSPECIAL_NAME()%></td>
                <td align="center"><%=article_info.getADD_USER()%></td>
                <td align="center"><%=article_info.getCLICKS()%></td>
                <td align="center" class="text_button"><a href="../../do?action=moveArticleToSpecial&operType=single&operItem=<%=article_info.getID()%>">脱离专题</a></td>
              </tr>
			  </cms4j:article_list>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_border_bg">
              <tr class="table_border_cell_bg"> 
                <td width="28%" align="center">&nbsp; </td>
                <td width="72%" align="right" class="table_oper_tr"><div align="right">
				<cms4jExd:page_ctrl_admin/>  
                  </div></td>
              </tr>
            </table></td>
          <td width="5" background="../../images/admin/oper_table_right_bg.gif"><img src="../../images/admin/oper_table_right_bg.gif" width="5" height="2"></td>
        </tr>
      </table></td>
  </tr>
  <tr height="13"> 
    <td><img src="../../images/admin/oper_table_down_left.gif" width="26" height="13"></td>
    <td width="100%" height="13" background="../../images/admin/oper_table_down_bg.gif"></td>
    <td align="right"><img src="../../images/admin/oper_table_down_right.gif" width="26" height="13"></td>
  </tr>
</table>
</cms4j:article>
</form>
</body>
</html>
