<?php echo $this->fetch('header.html'); ?>
<div class="row">
<div class="span12">
<h1><?php echo $this->_var['lang']['navbar_admin']; ?></h1>
<ul class="nav  nav-tabs nav-justified">
<li><a href="<?php echo $this->_var['appadmin']; ?>?m=admin_navbar"><?php echo $this->_var['lang']['navbar_admin']; ?></a></li>
<li class="active"><a href="<?php echo $this->_var['appadmin']; ?>?m=admin_navbar&a=add"><?php echo $this->_var['lang']['navbar_add']; ?></a></li>
</ul>
<form action="admin.php?m=admin_navbar&a=save" method="post">
<input type="hidden" name="id" value="<?php echo $this->_var['nav']['id']; ?>">
<table width="100%" border="0"   class="table table-bordered">


 <?php if (! $this->_var['parent']): ?>		
  <tr>
    <td height="30" align="right"><?php echo $this->_var['lang']['target']; ?>：</td>
    <td><select name="target" id="target">
      <option value="_self"><?php echo $this->_var['lang']['_self']; ?></option>
      <option value="_blnk" <?php if ($this->_var['nav']['target'] == '_blank'): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['lang']['_blank']; ?></option>
    </select></td>
  </tr>
  <?php endif; ?>
  <?php if ($this->_var['parent']): ?>	
  <tr>
    <td width="16%" height="30" align="right"><?php echo $this->_var['lang']['last_category']; ?>：</td>
    <td width="84%">
    <input type="hidden" name="pid" value="<?php echo $this->_var['parent']['id']; ?>">
      <?php echo $this->_var['parent']['title']; ?></td>
  </tr>
  <?php endif; ?>
  <tr>
    <td height="30" align="right"><?php echo $this->_var['lang']['name']; ?>：</td>
    <td><input name="title" type="text" value="<?php echo $this->_var['nav']['title']; ?>" />
	</td>
  </tr>
  <tr>
    <td height="30" align="right"><?php echo $this->_var['lang']['link_url']; ?>：</td>
    <td><input name="link_url" type="text" id="link_url" value="<?php echo $this->_var['nav']['link_url']; ?>" size="40" /></td>
  </tr>
  <?php if (! $this->_var['parent']): ?>
  <tr>
    <td height="30" align="right"><?php echo $this->_var['lang']['position']; ?>：</td>
    <td><select name="group_id" id="group_id">
    	<?php $_from = $this->_var['group_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'g');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['g']):
?>
        <option value="<?php echo $this->_var['k']; ?>" <?php if ($this->_var['k'] == $this->_var['nav']['group_id']): ?> selected<?php endif; ?>><?php echo $this->_var['g']; ?></option>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </select></td>
  </tr>
  <?php endif; ?>
  
   <tr>
          <td>状态：</td>
          <td><select name="status">
              <option value="1" <?php if ($this->_var['nav']['status'] == 1): ?> selected="selected"<?php endif; ?>>隐藏</option>
              <option value="2" <?php if ($this->_var['nav']['status'] == 2): ?> selected="selected"<?php endif; ?>>显示</option>
              
            </select></td>
        </tr>
  
  <tr>
    <td height="30" align="right">m：      </td>
    <td><input name="m" type="text" id="m" value="<?php echo $this->_var['nav']['m']; ?>" /></td>
  </tr>
  <tr>
    <td height="30" align="right">a：</td>
    <td><input name="a" type="text" id="a" value="<?php echo $this->_var['nav']['a']; ?>" /></td>
  </tr>
  <tr>
    <td height="30" align="right"><?php echo $this->_var['lang']['sort']; ?>：</td>
    <td><input name="orderindex" type="text" id="orderindex" value="<?php echo $this->_var['nav']['orderindex']; ?>" /></td>
  </tr>
  <tr>
    <td height="30" align="right">&nbsp;</td>
    <td><input type="submit" name="button" id="button" value="<?php echo $this->_var['lang']['submit']; ?>" class="btn" /></td>
  </tr>
</table>
 
</form>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>