<?php /* Smarty version Smarty-3.0.8, created on 2012-03-26 11:09:55
         compiled from "E:/wwwroot/guanjianzi/wwwroot/themes/system/link.html" */ ?>
<?php /*%%SmartyHeaderCode:302494f6fde038e1cb1-63801291%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b8bfd6c78730ff41fa85e5c54c3ba639ea2f1c66' => 
    array (
      0 => 'E:/wwwroot/guanjianzi/wwwroot/themes/system/link.html',
      1 => 1321886082,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '302494f6fde038e1cb1-63801291',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("header.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>

	<?php if ($_smarty_tpl->getVariable('action')->value=='list'){?>
    <h3 class="title"><em><?php echo $_smarty_tpl->getVariable('pagetitle')->value;?>
</em><span><a href="<?php echo $_smarty_tpl->getVariable('fileurl')->value;?>
?act=add">+添加新链接</a></span></h3>
    <div class="listbox">
        <form name="mform" method="post" action="<?php echo $_smarty_tpl->getVariable('fileurl')->value;?>
">
        <div class="search">
        	<input name="keywords" type="text" id="keywords" class="ipt" size="30" value="<?php echo $_smarty_tpl->getVariable('keywords')->value;?>
" />
        	<input type="submit" class="btn" value="搜索" />
        </div>
        </form>
        
        <form name="mform" method="post" action="">
        <div class="toolbar">
			<select name="act" id="act" class="sel">
			<option value="del" style="color: #FF0000;">删除选定</option>
			</select>
			<input type="submit" class="btn" value="应用" onClick="if(IsCheck('link_id[]')==false){alert('请指定您要操作的链接ID！');return false;}else{return confirm('确认执行此操作吗？');}">
        </div>
        
    	<table width="100%" border="0" cellspacing="1" cellpadding="0">
    		<tr>
				<th><input type="checkbox" id="ChkAll" onClick="CheckAll(this.form)"></th>
				<th>ID</th>
				<th>网站名称</th>
				<th>链接地址</th>
				<th>是否可见</th>
				<th>排列顺序</th>
                <th>操作选项</th>
    		</tr>
            <?php  $_smarty_tpl->tpl_vars['link'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('links')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['link']->key => $_smarty_tpl->tpl_vars['link']->value){
?>
    		<tr>
				<td><input name="link_id[]" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['link']->value['link_id'];?>
"></td>
				<td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_id'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_name'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_url'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_display'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_order'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['link']->value['link_operate'];?>
</td>
    		</tr>
			<?php }} else { ?>
			<tr><td colspan="7">无任何链接！</td></tr>
			<?php } ?>
		</table>
        </form>
        <div class="pagebox"><?php echo $_smarty_tpl->getVariable('showpage')->value;?>
</div>
    </div>
    <?php }?>
    
    <?php if ($_smarty_tpl->getVariable('action')->value=='add'||$_smarty_tpl->getVariable('action')->value=='edit'){?>
    <h3 class="title"><em><?php echo $_smarty_tpl->getVariable('pagetitle')->value;?>
</em><span><a href="<?php echo $_smarty_tpl->getVariable('fileurl')->value;?>
">返回列表&raquo;</a></span></h3>
    <div class="formbox">
		<form name="mform" method="post" action="<?php echo $_smarty_tpl->getVariable('fileurl')->value;?>
">
		<table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<th>网站名称：</th>
				<td><input name="link_name" type="text" class="ipt" id="link_name" size="50" maxlength="50" value="<?php echo $_smarty_tpl->getVariable('link')->value['link_name'];?>
" /></td>
			</tr>
			<tr>
				<th>网站地址：</th>
				<td><input name="link_url" type="text" class="ipt" id="link_url" size="50" maxlength="255" value="<?php echo $_smarty_tpl->getVariable('link')->value['link_url'];?>
" /></td>
			</tr>
			<tr>
				<th>图标地址：</th>
				<td><input name="link_logo" type="text" class="ipt" id="link_logo" size="50" maxlength="255" value="<?php echo $_smarty_tpl->getVariable('link')->value['link_logo'];?>
" /></td>
			</tr>
			<tr>
				<th>是否显示：</th>
				<td><input name="link_display" type="radio" id="link_display1" value="1"<?php echo opt_checked($_smarty_tpl->getVariable('display')->value,1);?>
><label for="link_display1">显示</label>　<input name="link_display" type="radio" id="link_display2" value="2"<?php echo opt_checked($_smarty_tpl->getVariable('display')->value,2);?>
><label for="link_display2">隐藏</label></td>
			</tr>
			<tr>
				<th>排列顺序：</th>
				<td><input name="link_order" type="text" class="ipt" id="link_order" size="10" maxlength="3" value="<?php echo !$_smarty_tpl->getVariable('link')->value['link_order'] ? '0' : $_smarty_tpl->getVariable('link')->value['link_order'];?>
" /></td>
			</tr>
			<tr class="btnbox">
            	<th>&nbsp;</th>
				<td>
					<input name="act" type="hidden" id="act" value="<?php echo $_smarty_tpl->getVariable('h_action')->value;?>
">
					<?php if ($_smarty_tpl->getVariable('action')->value=='edit'&&$_smarty_tpl->getVariable('link')->value['link_id']){?>
					<input name="link_id" type="hidden" id="link_id" value="<?php echo $_smarty_tpl->getVariable('link')->value['link_id'];?>
">
					<?php }?>
					<input type="submit" class="btn" value="保 存">
					<input type="reset" class="btn" value="取 消" onClick="window.location.href='<?php echo $_smarty_tpl->getVariable('fileurl')->value;?>
';">
				</td>
			</tr>
		</table>
        </form>
	</div>           
	<?php }?>
    
<?php $_template = new Smarty_Internal_Template("footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>