<!-- #include file="../../themes/admin/~css.php" -->
<form style="width:600px;height:450px" action="<?=url(RPGM.'menuedit/?id='.$arg_0.'&ajax')?>" method="post" id="form" onsubmit="return yun_submit(this.id)">
<h3 class="title">菜单编辑</h3>

<div class="in">
<?php $i=0; foreach($conf['sys_elangs'] as $k=>$v){?>
<div class="fieldwrapper">
	<label for="" class="styled"><?=$i<1?'菜单名称':''?><img style="width:20px;height:18px" src="<?=THEMEPATH?>img/flags/<?=$k?>.png" /></label>
	<div class="thefield">
    <input name="name[<?=$k?>]" type="text" value="<?=htmlspecialchars($conf['sys_menus'][$arg_0]['name'][$k])?>" id="name_<?=$k?>" />
    </div>
</div>
<?php $i++;}?>
<?php $i=0; foreach($conf['sys_elangs'] as $k=>$v){?>
<div class="fieldwrapper">
	<label for="" class="styled"><?=$i<1?'菜单简介':''?><img style="width:20px;height:18px" src="<?=THEMEPATH?>img/flags/<?=$k?>.png" /></label>
	<div class="thefield">
    <textarea style="height:50px" name="doc[<?=$k?>]" id="doc_<?=$k?>"><?=htmlspecialchars($conf['sys_menus'][$arg_0]['doc'][$k])?></textarea>
    </div>
</div>
<?php $i++;}?>

<div class="fieldwrapper">
	<label for="" class="styled">排序号</label>
	<div class="thefield">
   <input name="order" id="order" value="<?=$conf['sys_menus'][$arg_0]['order']?>"  /> 
    </div>
</div>
<?php if($conf['sys_menus'][$arg_0]['mod']=='home_'){?>
<div class="fieldwrapper">
	<label for="" class="styled">功能</label>
	<div class="thefield">
    网站首页
    </div>
    </div>
<?php }else {?>   
    <br /> 
    <div class="fieldwrapper">
	<label for="" class="styled">打开方式</label>
	<div class="thefield">
    <input name="blank" type="checkbox" value="1" <?=empty($conf['sys_menus'][$arg_0]['blank'])?'':'checked="checked"'?>/> 新窗口
    </div>
    </div>
    <div class="fieldwrapper">
	<label for="" class="styled">父级</label>
	<div class="thefield">
    <select name="pid">
<option value="0">无</option>
<?php 
 foreach($conf['sys_pmenus'] as $k=>$v){
     if($v['mod']=='home_' || $k==$arg_0) continue;
 ?>
        <option value="<?=$k?>" <?=$k==$conf['sys_menus'][$arg_0]['pid']?'selected="selected"':''?>><?=htmlxlang($v['name'])?></option>
         <?php }?>
</select>
</div>
</div>
    
<?php if($conf['sys_menus'][$arg_0]['mod']=='link_'){?>
     <div class="fieldwrapper">
	<label for="" class="styled">链接地址</label>
	<div class="thefield">
    <input name="link_" value="<?=htmlspecialchars($conf['sys_menus'][$arg_0]['link_'])?>"  />
    </div>
    </div>
    <div class="fieldwrapper">
	<label for="" class="styled">判断当前页</label>
	<div class="thefield">
    模块id <input name="current_mod"  value="<?=html($conf['sys_menus'][$arg_0]['current_mod'])?>" /> + <input name="current_mid" type="checkbox" value="1" <?=$conf['sys_menus'][$arg_0]['current_mid']?'checked="checked"':''?> /> 菜单ID     </div>
    </div>                
    
    <?php }else if($conf['sys_menus'][$arg_0]['mod']=='fun_'){?>
     <div class="fieldwrapper">
	<label for="" class="styled">页面功能</label>
	<div class="thefield">
    <?=htmlspecialchars($conf['sys_funs'][$conf['sys_menus'][$arg_0]['fun_']])?>
    </div>
    </div>
    <div class="fieldwrapper">
	<label for="" class="styled">指定模板</label>
	<div class="thefield">
    content_<input name="tplpf_c" value="<?=htmlspecialchars($conf['sys_menus'][$arg_0]['tplpf_c'])?>"  />
    </div>
    </div>
<?php }else if($conf['sys_menus'][$arg_0]['mod']=='page_'){?>
     <div class="fieldwrapper">
	<label for="" class="styled">页面标识</label>
	<div class="thefield">
    <input name="page_" value="<?=htmlspecialchars($conf['sys_menus'][$arg_0]['page_'])?>"  />
    </div>
    </div>
    <div class="fieldwrapper">
	<label for="" class="styled">指定模板</label>
	<div class="thefield">
    page_<input name="tplpf_c" value="<?=htmlspecialchars($conf['sys_menus'][$arg_0]['tplpf_c'])?>"  />
   </div>
   </div>
<?php }else{?>
<div class="fieldwrapper">
	<label for="" class="styled">隶属模块</label>
<?=htmlspecialchars(modname($conf['sys_menus'][$arg_0]['mod']))?>
</div>
<?=do_apply('menu_option_val','string',$arg_0,$conf['sys_menus'][$arg_0]['mod'])?> 
<?php }}?>

<div class="buttonsdiv" >
	<input value="提交" type="submit" class="button"> 
    <input value="重置" type="reset" class="button">
</div>

</div>
</form>
<script type="text/javascript">
	yun_onfocus("name_<?=LANG?>");
 </script>
