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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php /* Smarty version Smarty-3.1.21-dev, created on 2025-04-16 17:18:20
         compiled from "E:\ishangstudywebs\zhaopin\app\template\admin\add_class.htm" */ ?>
<?php /*%%SmartyHeaderCode:1901467ff75dc59b989-38960171%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'edf202bd6aa332c1ea343ab903fee9e0bab7e52f' => 
    array (
      0 => 'E:\\ishangstudywebs\\zhaopin\\app\\template\\admin\\add_class.htm',
      1 => 1634883866,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1901467ff75dc59b989-38960171',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'position' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_67ff75dc59fb97_71736330',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67ff75dc59fb97_71736330')) {function content_67ff75dc59fb97_71736330($_smarty_tpl) {?><!--有变量名弹出框-->
<div id="wname" style="display:none; ">
    <div class="job_box_div">
        <div class="job_box_inp">
            <form class="layui-form">
                <table cellspacing='1' cellpadding='1' class="admin_examine_table">
                    <tr>
                        <th width="80">类别选择:</th>
                        <td>
                            <div class="layui-input-block">
                                <input name="ctype" lay-filter="ctype" value="1" title="一级分类" checked type="radio">
                                <input name="ctype" lay-filter="ctype" value="2" title="二级分类" type="radio">
                            </div>
                        </td>
                    </tr>
                    <tr class='sclass' style="display:none;">
                        <th>父类:</th>
                        <td>
                            <div class="layui-input-inline">
                                <select name="nid" lay-filter="nid" id="nid_val">
                                    <option value="0">请选择</option>
                                    <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['position']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
</option>
                                    <?php } ?>
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="t_fr">类别名称:</th>
                        <td>
                            <textarea id='position' class="add_class_textarea"></textarea>
                        </td>
                    </tr>
 
                    <tr class='variable'>
                        <th class="t_fr">调用变量名:</th>
                        <td>
                            <textarea id='variable' class="add_class_textarea"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <span class="admin_web_tip" style="padding-top: 0;">说明:可以添加多条分类(请按回车Enter键换行,一行一个)</span>
                        </td>
                    </tr>
                    <tr>
                        <td colspan='2' align="center"><input class="admin_examine_bth" type="button" value="添加 " onclick="save_class()" /></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
 
<!--有变量名弹出框end-->
<!--弹出框-->
<div id="bname" style="display:none;">
    <div class="job_box_div">
        <div class="job_box_inp">
            <form class="layui-form">
                <table cellspacing='1' cellpadding='1' class="admin_examine_table">
                    <tr>
                        <th width="80">类别选择:</th>
                        <td>
                            <div class="layui-input-block">
                                <input type="radio" name="btype" value="1" title="一级类别">
                                <input type="radio" name="btype" value="2" title="二级类别">
                            </div>
                        </td>
                    </tr>
                    <tr class='sclass_2 sclass_3  sclass' style="display:none;">
                        <th>一级分类:</th>
                        <td>
                            <div class="layui-input-block">
                                <div class="layui-input-inline">
                                    <select name="keyid" lay-filter="" id="keyid_val">
                                        <option value="">请选择</option>
                                        <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['position']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
                                        <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
</option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="t_fr">类别名称:</th>
                        <td>
                            <textarea id='classname' class="add_class_textarea"></textarea>
                            <span class="admin_web_tip">说明:可以添加多条分类(请按回车键换行,一行一个)</span>
                        </td>
                    </tr>
 
                    <tr>
                        <td colspan='2' align="center" class='ui_content_wrap'>
                            <input class="admin_examine_bth" type="button" value="添加 " onClick="save_bclass()" />
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<!--弹出框end-->
<?php echo '<script'; ?>
 type="text/javascript">
    $(document).ready(function() {
        $(".imghide").hover(function() {
            $(this).find('.class_xg').show();
        }, function() {
            $(this).find('.class_xg').hide();
        });
    })
 
    $(document).ready(function() {
        $('body').click(function(evt) {
            if ($(evt.target).parents("#keyid_name").length == 0 && evt.target.id != "keyid_name") {
                $('#keyid_select').hide();
            }
        });
    })
 
    layui.use(['form'], function() {
        var form = layui.form,
            $ = layui.$;
 
        form.on('radio(ctype)', function(data) {
            if (data.value == 1) {
                $(".variable").show();
                $(".sclass").hide();
            } else if (data.value == 2) {
                $(".variable").hide();
                $(".sclass").show();
            }
        });
 
        $("input[name='btype']").each(function() {
            $(this).next().click(function() {
                var val = $(this).prev().val();
                $(".sclass").hide();
                $(".sclass_" + val).show();
            });
        });
    });
<?php echo '</script'; ?>
>
<?php }} ?>