<?php /* Smarty version Smarty-3.1.10, created on 2016-12-10 20:41:13
         compiled from "/home/wwwroot/changming/public_html/themes/system/city.html" */ ?>
<?php /*%%SmartyHeaderCode:1442394707584bf7e9c61a04-30122500%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd0ae89e0438b318c4f19655f7b458e6edb41298c' => 
    array (
      0 => '/home/wwwroot/changming/public_html/themes/system/city.html',
      1 => 1481353353,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1442394707584bf7e9c61a04-30122500',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'action' => 0,
    'pagetitle' => 0,
    'fileurl' => 0,
    'area_mod' => 0,
    'root_id' => 0,
    'areas' => 0,
    'area' => 0,
    'city_option' => 0,
    'row' => 0,
    'h_action' => 0,
    'areagory_option' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.10',
  'unifunc' => 'content_584bf7e9eab119_39108867',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_584bf7e9eab119_39108867')) {function content_584bf7e9eab119_39108867($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


	<?php if ($_smarty_tpl->tpl_vars['action']->value=='list'){?>
	<h3 class="title"><em><?php echo $_smarty_tpl->tpl_vars['pagetitle']->value;?>
</em><span><a href="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
?mod=<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
&act=add&root_id=<?php echo $_smarty_tpl->tpl_vars['root_id']->value;?>
">+添加新地区</a></span></h3>
	<div class="listbox">
		<form name="mform" method="post" action="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
">
		<table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<th>ID</th>
				<th>地区名称</th>
                <th>所属模块</th>
				<th>目录名称</th>
				<th>内容统计</th>
				<th>排列顺序</th>
				<th>栏目属性</th>
				<th>操作选项</th>
			</tr>
			<?php  $_smarty_tpl->tpl_vars['area'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['area']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['areas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['area']->key => $_smarty_tpl->tpl_vars['area']->value){
$_smarty_tpl->tpl_vars['area']->_loop = true;
?>
			<tr>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_id'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_name'];?>
 <span style="color: #999; font-size: 10px;">(<?php echo $_smarty_tpl->tpl_vars['area']->value['area_childcount'];?>
)</span></td>
                <td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_mod'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_dir'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_postcount'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_order'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_attr'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['area']->value['area_operate'];?>
</td>
			</tr>
			<?php }
if (!$_smarty_tpl->tpl_vars['area']->_loop) {
?>
				<?php if ($_smarty_tpl->tpl_vars['root_id']->value==0){?>
				<tr><td colspan="8">无任何地区！</td></tr>
				<?php }else{ ?>
				<tr><td colspan="8">该地区下无任何子地区！<a href="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
&root_id=0">返回顶级地区</a></td></tr>
			<?php }?>
			<?php } ?>
		</table>
		</form>
	</div>
	<?php }?>

	<?php if ($_smarty_tpl->tpl_vars['action']->value=='add'||$_smarty_tpl->tpl_vars['action']->value=='edit'){?>
    <h3 class="title"><em><?php echo $_smarty_tpl->tpl_vars['pagetitle']->value;?>
</em><span><a href="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
?mod=<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">返回列表&raquo;</a></span></h3>
	<div class="formbox">
    	<form name="mform" method="post" action="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<th>所属地区：</th>
				<td><select name="root_id" id="root_id" class="sel"><option value="0">作为顶级地区</option><?php echo $_smarty_tpl->tpl_vars['city_option']->value;?>
</select><input name="area_mod" type="hidden" id="area_mod" value="<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
"></td>
			</tr>
			<tr>
				<th>地区名称：</th>
				<td><input name="area_name" type="text" class="ipt" id="area_name" size="35" maxlength="50" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['area_name'];?>
" />  <input name="area_isbest" type="checkbox" id="area_isbest" value="1"<?php echo opt_checked($_smarty_tpl->tpl_vars['row']->value['area_isbest'],1);?>
 /><label for="area_isbest">设为推荐</label></td>
			</tr>
			<tr>
				<th>目录名称：</th>
				<td><input name="area_dir" type="text" class="ipt" id="area_dir" size="50" maxlength="50" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['area_dir'];?>
" /></td>
			</tr>
			<tr>
				<th>跳转地址：</th>
				<td><input name="area_url" type="text" class="ipt" id="area_url" size="50" maxlength="255" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['area_url'];?>
" /></td>
			</tr>
			<tr>
				<th>关 键 词：</th>
				<td><input name="area_keywords" type="text" class="ipt" id="area_keywords" size="50" maxlength="255" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['area_keywords'];?>
" /><span class="tips">多个关键词之间用“逗号”隔开</span></td>
			</tr>
			<tr>
				<th valign="top">地区描述：</th>
				<td><textarea name="area_description" cols="50" rows="6" class="ipt" id="area_description"><?php echo $_smarty_tpl->tpl_vars['row']->value['area_description'];?>
</textarea></td>
			</tr>
			<tr>
				<th>排列顺序：</th>
				<td><input name="area_order" type="text" class="ipt" id="area_order" size="10" maxlength="10" value="<?php echo !$_smarty_tpl->tpl_vars['row']->value['area_order'] ? '0' : $_smarty_tpl->tpl_vars['row']->value['area_order'];?>
" /></td>
			</tr>
			<tr class="btnbox">
            	<td>&nbsp;</td>
				<td>
                    <input name="act" type="hidden" id="act" value="<?php echo $_smarty_tpl->tpl_vars['h_action']->value;?>
">
                    <input name="area_mod" type="hidden" id="area_mod" value="<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">
					<?php if ($_smarty_tpl->tpl_vars['action']->value=='edit'&&$_smarty_tpl->tpl_vars['row']->value['area_id']){?>
					<input name="area_id" type="hidden" id="area_id" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['area_id'];?>
">
					<?php }?>
					<input type="submit" class="btn" value="保 存">&nbsp;
					<input type="reset" class="btn" value="取 消" onClick="window.location.href='<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
';">
				</td>
			</tr>
		</table>
        </form>
	</div>
	<?php }?>
    
	<?php if ($_smarty_tpl->tpl_vars['action']->value=='reset'){?>
    <h3 class="title"><em><?php echo $_smarty_tpl->tpl_vars['pagetitle']->value;?>
</em><span><a href="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
?mod=<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">返回列表&raquo;</a></span></h3>
	<div class="formbox">
		<form name="mform" method="post" action="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
">
		<table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
            	<th>注意事项：</th>
				<td>如果选择复位所有地区，则所有地区都将作为一级地区，这时您需要重新对各个地区进行归属的基本设置。<br />不要轻易使用该功能，仅在做出了错误的设置而无法复原地区之间的关系和排序的时候使用。</td>
			</tr>
			<tr class="btnbox">
            	<th>&nbsp;</th>
				<td>
					<input name="act" type="hidden" id="act" value="<?php echo $_smarty_tpl->tpl_vars['h_action']->value;?>
">
                    <input name="area_mod" type="hidden" id="area_mod" value="<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">
					<input type="submit" class="btn" value="复 位">&nbsp;
					<input type="reset" class="btn" value="取 消" onClick="window.location.href='<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
';">
				</td>
			</tr>
		</table>
		</form>
	</div>
	<?php }?>

	<?php if ($_smarty_tpl->tpl_vars['action']->value=='merge'){?>
    <h3 class="title"><em><?php echo $_smarty_tpl->tpl_vars['pagetitle']->value;?>
</em><span><a href="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
?mod=<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">返回列表&raquo;</a></span></h3>
	<div class="formbox">
		<form name="mform" method="post" action="<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
">
		<table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<th>将地区：</th>
				<td><select name="source_id" id="source_id" class="sel"><?php echo $_smarty_tpl->tpl_vars['areagory_option']->value;?>
</select></td>
			</tr>
			<tr>
				<th>合并到：</th>
				<td><select name="target_id" id="target_id" class="sel"><?php echo $_smarty_tpl->tpl_vars['areagory_option']->value;?>
</select></td>
			</tr>
			<tr>
            	<th>注意事项：</th>
				<td><font color="#ff0000">所有操作不可逆，请慎重操作！</font><br />不能在同一个地区内进行操作，不能将一个地区合并到其下属地区中，目标地区中不能含有子地区，合并后您所指定的地区（或者包括其下属地区）将被删除，所有内容将转移到目标地区中。</td>
			</tr>
			<tr class="btnbox">
            	<th>&nbsp;</th>
				<td>
					<input name="act" type="hidden" id="act" value="<?php echo $_smarty_tpl->tpl_vars['h_action']->value;?>
">
                    <input name="area_mod" type="hidden" id="area_mod" value="<?php echo $_smarty_tpl->tpl_vars['area_mod']->value;?>
">
					<input type="submit" class="btn" value="合 并">&nbsp;
					<input type="reset" class="btn" value="取 消" onClick="window.location.href='<?php echo $_smarty_tpl->tpl_vars['fileurl']->value;?>
';">
				</td>
			</tr>
		</table>
        </form>
	</div>
	<?php }?>

<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>