<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: depart.tpl.php 64 2016-07-30 14:01:18Z along $
#
#	Copyright (C) 2008-2016 PHPDisk Team. All Rights Reserved.
#
##
#-->
<?php !defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!'); ?>
<!--#if($action =='index'){#-->
<div id="container">
<h1>部门组管理<!--#sitemap_tag('部门组管理');#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?=__('tips')?> </b>
<span class="txtgray">以下列出系统的所有部门组，您可以创建新的部门组</span>
</div>
<form name="link_form" action="{#urr(ADMINCP,"item=$item&menu=$menu")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="update" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<!--#
if($depart_tree){
#-->
<tr>
	<td width="40%" class="bold"><?=__('show_order')?>|部门名称</td>
	<td align="center" class="bold"><?=__('user_count')?></td>
	<td class="bold" align="right"><?=__('operation')?></td>
</tr>
{$depart_tree}

<!--#
}else{	
#-->
<tr>
	<td colspan="6" align="center">暂无部门列表</td>
</tr>
<!--#
}
#-->
<tr>
	<td align="center" colspan="5">
	<input type="button" class="btn" onclick="go('{#urr(ADMINCP,"item=depart&menu=user&action=depart_create")#}');" value="创建新的部门..." />&nbsp;
	<input type="submit" class="btn" value="<?=__('btn_update')?>"/>
	</td>
</tr>
</table>
</form>
</div>
</div>
<!--#}elseif($action =='depart_create' || $action =='depart_modify'){#-->
<div id="container">
<!--#if($action =='depart_create'){#-->
<h1>创建新的部门</h1>
<!--#}else{#-->
<h1>编辑部门</h1>
<!--#}#-->
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?=__('tips')?>: </b>
<span class="txtgray">创建、修改部门组</span>
</div>
<form action="{#urr(ADMINCP,"item=depart&menu=user")#}" method="post" onsubmit="return chkform(this);">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="depart_id" value="{$depart_id}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="40%"><span class="bold">部门组名称</span>: <br /><span class="txtgray">此处可以创建用户自定义的组名称</span></td>
	<td><input type="text" name="depart_name" value="{$depart_name}" size="40" maxlength="50"/></td>
</tr>
<tr>
	<td><span class="bold">上级部门:</span><br /><span class="txtgray">支持无限级</span></td>
	<td>
	<select name="pid">
	<option value="0" style="color:#008800">顶级部门</option>
	{#get_depart_option(0,$pid)#}
	</select>
	</td>
</tr>
<tr>
	<td></td>
	<td><input type="submit" class="btn" value="<?=__('btn_submit')?>"/>&nbsp;<input type="button" class="btn" value="<?=__('btn_back')?>" onclick="javascript:history.back();" /></td>
</tr>
</table>
</form>
<script language="javascript">
function chkform(o){
	if(o.depart_name.value.strtrim().length <2){
		atips("部门名字长度非法");
		o.depart_name.focus();
		return false;
	}	
}
</script>
</div>
</div>
<!--#}#-->
