chengkun
2025-05-12 b6bc92ec11e1e280185ce7682d17589cb45c20f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
 
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet"/>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/custom_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
 
<div class="tty_table-bom">
  <div class="admin_table_border">
    <iframe id="supportiframe"  name="supportiframe"  onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form name="myform" action="index.php?m=admin_introduce&c=save" method="post"  onSubmit="return save();" target="supportiframe" class="layui-form">
      <table width="100%" class="table_form" style="background:#fff;">
          <tr >
              <th colspan="2" class="admin_bold_box">
                  <div class="admin_bold">类别名称</div>
              </th>
          </tr>
        <tr >
          <th width="120">类别名称:</th>
          <td><input class="layui-input t_w480" type="text" id="position" name="position" size="40" value="{yun:}$info.name{/yun}"/></td>
        </tr>
        <tr class="admin_table_trbg" id="content">
          <th class="t_fr">自定义描述: </th>
          <td><textarea  id="intro" name="content" style="width:500px; height:150px;">{yun:}$info.content{/yun}</textarea></td>
        </tr>
        <tr>
          <th class="t_fr">排序:</th>
          <td>
              <input class="layui-input t_w480" type="text" name="sort" value="{yun:}$info.sort{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"/>
                <span class="admin_web_tip">越小越在前</span>
            </td>
        </tr>
        <tr class="admin_table_trbg" >
            <th></th>
              <td> {yun:}if $info.id{/yun}
                <input type="hidden" name="id"   value="{yun:}$info.id{/yun}"/>
                <input class="tty_sub" type="submit" name="submit" value="&nbsp;更 新&nbsp;"  />
                {yun:}else{/yun}
                <input class="tty_sub" type="submit" name="submit" value="&nbsp;添 加&nbsp;"  />
                {yun:}/if{/yun}
                <input class="tty_cz" type="button" onclick="back()" value="&nbsp;返回 &nbsp;" />
            </td>
        </tr>
      </table>
       <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">      
    </form>
  </div>
</div>
</div>
<script type="text/javascript">
    layui.use(['form'], function(){
        var form = layui.form
            ,$ = layui.$;
 
        form.on('select(nid)', function(data){
            var pytoken=$("#pytoken").val(); 
            $.post("index.php?m=admin_introduce&c=get_class", {nid:data.value,pytoken:pytoken},function(data) {
        var data=eval('('+data+')');
        var html='';
        if(data && data.length>0){
          html+= '<option value="">请选择</option>';
          for(var i=0; i<data.length;i++){
            
            html+='<option value="'+data[i].id+'">'+data[i].name+'</option>';
          }
        }else{
          html+='<option value="">该分类下暂无子类!</option>';
        }
                $("#keyid_select").html(html);
                form.render();
            })
        });
    })
    function save(){
        var position=$("#position").val();
        if($.trim(position)==''){
            parent.layer.msg('类别名称不能为空!', 2, 8);return false;
        }
    }
    function back() {
        history.back(-1);
    }
</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
    var editor = UE.getEditor('intro',{
        toolbars:[[ 'Source','|', 'Undo', 'Redo','Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily', 'fontsize',  'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|','insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','simpleupload', '|','link', 'unlink', 'indent', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify']],wordCount:false,elementPathEnabled:false,initialFrameHeight:200
    });
</script>
 
</body>
</html>