{include file="head.html"}
<div id="jywrap">
  <div id="maincontent">
    <div class="wrap">
      <div class="crumbs"> <a href="__APP__/index/home">{lang='栏目管理'}</a> <a href="#">{lang='栏目设置'}</a> </div>
      <hr />
      <br />
      <form action="__URL__/edit" method="post">
        <div class="infobox">
          <h3>{lang='编辑内容列表栏目'}</h3>
          <table class="table_style form-table"  id="hacker" width="100%" border="0" cellspacing="0" cellpadding="0">
            <tbody>
              <tr>
                <td width="100">{lang='所属栏目'}：</td>
                <td><select name="pid" id="pid">
                    <?php if($info['pid']==0){ ?>
                    <option value="0" selected="selected">{lang='无（作为一级栏目）'}</option>
                    <?php }?>
                    <?php if($info['pid']<>0){ ?>
                    <option value="0" selected="selected">{lang='顶级栏目'}</option>
                    <?php }?>
                    <?php if(!empty($cat)) { foreach($cat as $vo){ ?>
                    <?php if($vo['id']==$info['pid']){ ?>
                    <option value="{$vo['id']}" selected="selected">{$vo['cname']}</option>
                    <?php } else{?>
                    <option value="{$vo['id']}">{$vo['cname']}</option>
                    <?php } ?>
                    <?php } } ?>
                  </select>
                  <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{lang='分页条数'}：</strong>
                  <input  name="size" id="size" type='text' class="regular-text" style="width:30px; height:20px !important; line-height:20px !important" value="{$info['size']}" /></td>
              </tr>
              <tr>
                <td>{lang='栏目名称'}：</td>
                <td><input class="regular-text" type='text'  name="name" id="name" value="{$info['name']}" /></td>
              </tr>
              <tr>
                <td>{lang='栏目URL名'}：</td>
                <td><input name="pinyin" type='text' class="regular-text" id="pinyin" value="{$info['pinyin']}" />
                  &nbsp;&nbsp;&nbsp;{lang='只允许英文数字下划线留空则将标题自动转换成拼音'}</td>
              </tr>
              <tr>
                <td>{lang='栏目SEO名称'}：</td>
                <td><input class="regular-text" type='text'  name="seoname" id="seoname" value="{$info['seoname']}" /></td>
              </tr>
              <tr>
                <td>{lang='栏目关键字'}：</td>
                <td><input class="regular-text" type='text' name="keywords" id="keywords" value="{$info['keywords']}"  /></td>
              </tr>
              <tr>
                <td>{lang='栏目描述'}：</td>
                <td><textarea name="description" id="description" cols="0" rows="5" class="regular-textarea" style="width:320px;">{$info['description']}</textarea></td>
              </tr>
              <tr>
                <td>{lang='栏目形象图'}：</td>
                <td><div>
                    <input class="regular-text" style="width:320px" name="pic" id="pic" value="{$info['pic']}" />
                    &nbsp;<a id="loadimage" href="javascript:openimage()" >{lang='预览'}</div>
                  <iframe scrolling="no"; frameborder="0" src="__APP__/upload/file.html?inputName=pic" style="width:300px; height:35px;"></iframe></td>
              </tr>
              <tr>
                <td>{lang='栏目状态'}：</td>
                <td>{lang='栏目属性'}
                  <select name="type" id="type" >
                    <option value="0" <?php if($info['type']==0) { ?> selected="selected" <?php } ?> >{lang='栏目页'}</option>
                    <option value="1" <?php if($info['type']==1) { ?> selected="selected" <?php } ?> >{lang='列表页'}</option>
                  </select>
                  &nbsp;&nbsp;&nbsp;&nbsp;{lang='菜单'}
                  <select name="hide" id="hide" >
                    <option value="0" <?php if($info['hide']==0) { ?> selected="selected" <?php } ?> >{lang='显示'}</option>
                    <option value="1" <?php if($info['hide']==1) { ?> selected="selected" <?php } ?> >{lang='隐藏'}</option>
                  </select>
                  &nbsp;&nbsp;&nbsp;&nbsp;{lang='排序'}
                  <input  name="sorter" id="sorter" type='text' class="regular-text" style="width:30px;" value="{$info['sorter']}" /></td>
              </tr>
              <tr>
                <td>{lang='外部连接'}：</td>
                <td><input name="url" id="url" type='text' class="regular-text" value="{$info['url']}" /></td>
              </tr>
              <tr>
                <td>{lang='栏目模板'}：</td>
                <td><input name="tpl_list" type='text' id="tpl_list" class="regular-text" value="{$info['tpl_list']}" />
                  <select id="classselect" onchange="$('#tpl_list').val($(this).val())">
                    <option value="">{lang='选择栏目模板'}</option>
                    <?php if(!empty($tpl_dir['files'])) foreach($tpl_dir['files'] as $vo){?>
                    <option value="<?php echo current(explode('.', $vo)) ?>">{$vo}</option>
                    <?php } ?>
                  </select></td>
              </tr>
              <tr>
                <td>{lang='内容模板'}：</td>
                <td><input name="tpl_content" type='text'  id="tpl_content" class="regular-text" value="{$info['tpl_content']}" />
                  <select id="classselect" onchange="$('#tpl_content').val($(this).val())">
                    <option value="">{lang='选择内容模板'}</option>
                    <?php if(!empty($tpl_dir['files'])) foreach($tpl_dir['files'] as $vo){?>
                    <option value="<?php echo current(explode('.', $vo)) ?>">{$vo}</option>
                    <?php } ?>
                  </select></td>
              </tr>
              <tr>
                <td>{lang='扩展模型'}：</td>
                <td><select id="ext_mid" name="ext_mid">
                    <option value="0">（{lang='不选择模型'}）</option>
                    <?php if (!empty($model_list)) foreach ($model_list as $vo) { ?>
                    <option value="{$vo['id']}" <?php if($info['ext_mid']==$vo['id']) { ?> selected="selected" <?php } ?> >{$vo['name']}</option>
                    <?php } ?>
                  </select></td>
              </tr>
              <?php module('common')->plus_hook_tpl('channel','edit',$info) ?>
            </tbody>
          </table>
        </div>
        <div class="submit_body">
          <input name="psot_do" id="psot_do" type="hidden" value="yes" />
          <input name="id" id="id" type="hidden" value="{$info['id']}">
          <button class="regular-button" type="submit" >{lang='修改'}</button>
        </div>
      </form>
    </div>
  </div>
</div>
{include file="plus/pic_view.html"}
</body></html>