
<%@ page language="java"  pageEncoding="GB2312" contentType="text/html;charset=GB2312"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<script language="javascript" src='<c:url value="/scripts/change_page.js"/>'></script>
<Script language="javascript">
<!--
/**
 * form 表单
 * pageNo 翻页页码
 */

function dowork(how, entityid) {
	var form = document.sysuser_checkcolumnForm;
	var pageCurrent = '<c:out value="${pageObject.pageCurrent}"/>';
	var pageCount = '<c:out value="${pageObject.pageCount}"/>';
	var mid = getChecked(form);
	switch(how) {
		case 'add' : 
			//window.location.href='<c:url value="/sys/cmsComment/addCMSComment.html"/>';
			form.action = '<c:url value="/sys/sysuser_checkcolumn/addSysuser_checkcolumn.html"/>';
			form.submit();
			break;
		case 'edit' : 
		    if(entityid == "") {
				alert("请选择修改项!");
			} else {
				//window.location.href='<c:url value="/sys/cmsComment/editCMSComment.html"/>?id=' + entityid;
				form.action = '<c:url value="/sys/sysuser_checkcolumn/editSysuser_checkcolumn.html"/>';
				form.id.value = entityid;
				form.method.value = "edit" ;
			    form.submit();
			    break;
			}
			break;
		case 'del' :
			var ids = getChecks(form);
		    if(ids == "") {
				alert("请选择删除项!");
			} else if(confirm("是否删除所选项?")){
				form.action = '<c:url value="/sys/sysuser_checkcolumn/deleteSysuser_checkcolumn.html"/>';
				form.method.value="delete";
				form.submit();
			}			
			break;	
		case 'view':
		    if(entityid == "") {
				alert("请选择查看项项!");
			} else {
				//window.location.href='<c:url value="/sys/cmsarticle/editCMSArticle.html"/>?id=' + entityid;
				openWin('<c:url value="/sys/sysuser_checkcolumn/viewSysuser_checkcolumn.html"/>?method=view&id=' + entityid);
			    break;
			}
			break;
		case 'search':
			if (form.keyword.value==""){
				alert("请填写检索内容");
				form.keyword.focus() ;
			}else{
				form.action ='<c:url value="/sys/sysuser_checkcolumn/findSysuser_checkcolumn.html"/>';
				form.method.value="find" ;
				form.submit() ;
			}
			break;
		case 'up' :
		    if(mid == "") {
				alert("请选择上移项!");
			} 
			else if(mid == form.firstId.value && pageCurrent == '1'){
				alert("第一条记录不能上移!");
			}
			else {
				form.action = '<c:url value="/sys/sysuser_checkcolumn/upSysuser_checkcolumn.html"/>';
				form.method.value = "up";
				form.id.value = mid;
				form.submit();
			}			
			break;
		case 'down' :
		    if(mid == "") {
				alert("请选择下移项!");
			} 
			else if(mid == form.lastId.value && pageCurrent == pageCount){
				alert("最后记录不能下移!");
			}
			else {
				form.action = '<c:url value="/sys/sysuser_checkcolumn/downSysuser_checkcolumn.html"/>';
				form.method.value = "down";
				form.id.value = mid;
				form.submit();
			}			
			break;
		case 'move' :
			var ids = getChecks(form);
		    if(ids == "") {
				alert("请选择移动项!");
			}
			else {
				form.action = '<c:url value="/sys/sysuser_checkcolumn/moveSysuser_checkcolumn.html"/>' ;
				form.method.value = "move" ;
				form.submit();
			}
			break;
	}//end switch
}

//-->
</script>
<html>
<head>
<title>用户可输入的栏目</title>
<link rel="stylesheet" type="text/css" href="../include/style.css">
<META NAME="Author" CONTENT="xunuo">
<META NAME="Keywords" CONTENT="xunuo">
<META NAME="Description" CONTENT="自动生成">
</head>
<body>
<html:form action="/sys/sysuser_checkcolumn/searchSysuser_checkcolumn.html">
<html:hidden property="pageCurrent"/>
<html:hidden property = "id" value="" />
<input type="hidden" name="method" value=""><!--这里需要填写父目录struts如：searchItemsByParent-->

<input type="hidden" name="firstId" value="<c:out value="${firstId}"/>">
<input type="hidden" name="lastId" value="<c:out value="${lastId}"/>">
<table border="0" cellpadding="4" cellspacing="1" class=table width="720">
	<tr>
      <th width="615" align="center"  colspan="3">用户可输入的栏目</th>
      <th width="105" align="center" colspan="2">操作</th>
    </tr>
	<tr class="td">
		<td width = "5"></td>
    
      <td align="center" nowrap>用户id</td>
    
      <td align="center" nowrap>栏目id</td>

		<td class="td"  nowrap  align="center">预览</td>
		<td class="td"  nowrap  align="center">编辑</td>
	</tr>
	<c:forEach var="sysuser_checkcolumn" items="${sysuser_checkcolumnList}">
	<tr class="td">
	<td><input type="checkbox" id="ids" name="ids" value='<c:out value="${sysuser_checkcolumn.id}"/>'></td>
    
		<td><c:out value="${sysuser_checkcolumn.userid}"/></td>
    
		<td><c:out value="${sysuser_checkcolumn.columnid}"/></td>

		<td align=center><a href='javascript: dowork("view", "<c:out value="${sysuser_checkcolumn.id}"/>");'>预览</a></td>
		<td align=center><a href='javascript: dowork("edit", "<c:out value="${sysuser_checkcolumn.id}"/>");'>编辑</a></td>
	</tr>
	</c:forEach>
		  <!-- 操作 start -->

		  <!-- 操作 end -->
		  <!-- 分页 start -->
		<td align="right" style="background-color:#eeeeee" colspan="5">
			<script language="javascript">
	            drawDispartPageView("document.sysuser_checkcolumnForm", <c:out value="${pageObject.pageCurrent}"/>, <c:out value="${pageObject.pageCount}"/>, <c:out value="${pageObject.rowCount}"/>);
	        </script>
			</td>
          </tr>
		 </table><br>
		  <!-- 分页 end -->
	<table border="0" cellpadding="4" cellspacing="1" class=table width="720">
		<tr class="td">
            <td colspan="5" style="background-color:#eeeeee">
			<input type="checkbox" name="allcheck" onclick="selectAll(this.form, this.checked);">
            <input type="button" class="button" value="添加" name="add" onclick="dowork('add');">
			<input type="button" onclick="dowork('del');" value="删除" class=button name=alldell>

			<input type="text" name="keyword" value='<c:out value="${keyword}" />' size="20" />
			<select name="columns" style="width:100px">

			</select>
			<input type="button" name="testb" class="button" value="检索" onclick="dowork('search');"/>
			<input type = "button" class="button" value = "移动内容" name = "move" onclick="dowork('move');"/>
            </td>
		</tr>
	</table>
</html:form>
</body>
</html>

