chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!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>
        <script language="javascript">
            function checkform(){
                if ($("#name").val()==""){
                    parent.layer.msg('请填写类别名称!', 2, 8);return (false);
                  } 
                  if($("#pic").val()==''){
                    parent.layer.msg("请上传图片!",2,8);return (false);
                  }
                  $("#qform").submit();
            }
        </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/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <title>后台管理</title>
    </head>
    <body class="body_ifm">
        <div class="infoboxp">
 
            <div class="tty-tishi_top">
                <div class="admin_new_tip">
                    <a href="javascript:;" class="admin_new_tip_close"></a>
                    <a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
                    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
                    <div class="admin_new_tip_list_cont">
                        <div class="admin_new_tip_list">问答类别,主要解决问题分类需求。如企业、面试、招聘等分类需求量大问题分类,运营者可以进行汇总后,自主添加到网站问答中!</div>
                    </div>
                </div>
 
                <div class="admin_new_search_box">
                    <a href=" javascript:history.back(-1);" class="admin_new_cz_tj" style="margin-left:0px;"> 类别列表</a>
                </div>
            </div>
 
            <div class="tty_table-bom">
                <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                <form id="qform" name="myform" action="index.php?m=question_class&c=save&pid={yun:}$pid{/yun}" method="post"
                 encType="multipart/form-data" 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>类别名称:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" id="name" name="name" size="40" value="{yun:}$q_class.name{/yun}" />
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th class="t_fr">排序:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" name="sort" size="40" value="{yun:}$q_class.sort{/yun}" />
                                <span class="admin_web_tip">越小越在前</span>
                            </td>
                        </tr>
                        <tr>
                            <th>父类别:</th>
                            <td>
                                <div class="layui-input-inline t_w480">
                                    <select name="pid">
                                        <option value="">请选择</option>
                                        {yun:}foreach item=v from=$class_list{/yun}
                                        <option value="{yun:}$v.id{/yun}" {yun:}if $q_class.pid && $q_class.pid==$v.id{/yun} selected {yun:}/if{/yun}>{yun:}$v.space{/yun}{yun:}$v.name{/yun}
                                        </option> {yun:}/foreach{/yun} 
                                    </select> 
                                </div> 
                            </td> 
                        </tr> 
                        <tr class="admin_table_trbg">
                            <th class="t_fr">简介内容: </th>
                            <td>
                                <script id="intro" name="intro" type="text/plain" cols="100" rows="8" style="width:700px; height:300px;">{yun:}$q_class.intro{/yun} 
                                </script>
                            </td>
                        </tr>
                        <tr>
                            <th class="t_fr">图片: </th>
                            <td>
                                <div class="admin_uppicbox">
                                    <input type="hidden" id="laynoupload" value="1">
                                
                                    <div class="admin_uppicimg">
                                        <img id="imgicon" src="{yun:}$q_class.pic{/yun}" width="140" height="140" {yun:}if !$q_class.pic{/yun}class="none"{yun:}/if{/yun}>
                                    </div>
                                
                                    <span>
                                        <button type="button" class="noupload adminupbtn" lay-data="{imgid: 'imgicon'}">重新上传</button>        
                                    </span>
                                </div>
 
                            </td> 
                        </tr> 
                        <tr>
                            <th>&nbsp;</th>
                            <td align="left">
                                {yun:}if $q_class.id{/yun}
                                <input type="hidden" name="id" size="40" value="{yun:}$q_class.id{/yun}" />
                                <input class="tty_sub" type="button" onclick="checkform()" value="&nbsp;更 新&nbsp;" />
                                {yun:}else{/yun}
                                <input class="tty_sub" type="button" onclick="checkform()" value="&nbsp;添 加&nbsp;" />
                                {yun:}/if{/yun}
                                <input class="tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
                            </td>
                        </tr>
                    </table>
                    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                </form>
            </div>
        </div>
        <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 weburl = '{yun:}$config.sy_weburl{/yun}';
            layui.use(['form'], function() {
                var form = layui.form;
            });
            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: 300
            });
        </script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
    </body>
</html>