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
<!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/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="tabs_info">
                <ul>
                    <li {yun:}if $smarty.get.c==''{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email">邮件推广</a></li>
                    <li {yun:}if $smarty.get.c=='msgtg'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=msgtg">短信推广</a></li>
                    <li {yun:}if $smarty.get.c=='tgresume'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=tgresume">简历推广</a></li>
                    <li {yun:}if $smarty.get.c=='tgjob'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=tgjob">职位推广</a></li>
                    <li {yun:}if $smarty.get.c=='email'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=email">自定义邮件</a></li>
                    <li {yun:}if $smarty.get.c=='msg'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=msg">自定义短信</a></li>
                    <li {yun:}if $smarty.get.c=='wxtpl'{/yun}class="curr"{yun:}/if{/yun}><a  href="index.php?m=email&c=wxtpl">公众号模板消息</a></li>
                </ul>
            </div>
 
            <div class="clear"></div>
            
            <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="clear"></div>
            
            <div class="tag_box mt10">
                <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
 
                <form name="myform" target="supportiframe" method="post" class="layui-form">
                    <table width="100%" class="table_form ">
                        <tr>
                            <th colspan="2" class="admin_bold_box">
                                <div class="admin_bold">自定义短信</div>
                            </th>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th width="120">选择用户</th>
                            <td>
                                <div class="layui-input-block">
                                        <input type="radio" name="utype" value="1" title="个人用户">
                                        <input type="radio" name="utype" value="2" title="企业用户">
                                        <input type="radio" name="utype" value="3" title="猎头用户">
                                        <input type="radio" name="utype" value="4" title="培训用户">
                                        <input type="radio" name="utype" value="5" title="自定义用户">
                                </div>
                            </td>
                        </tr>
                        <tr id="user_email" style="display:none;">
                            <th class="t_fr">手机号:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" id="userarr" name="userarr" size="40" value="" />
                                <span class="admin_web_tip">多个用户请用,(半角)隔开</span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120" class="t_fr">短信内容</th>
                            <td>
                                <textarea name="content" cols="100" rows="8" class="layui-textarea t_w480"></textarea>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th width="120"></th>
                            <td>
                                <input class="tty_sub" type="button" value="&nbsp;发 送&nbsp;" lay-filter="send" lay-submit="" />
                                <input class="tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
                            </td>
                        </tr>
                    </table>
                    <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
                </form>
            </div>
        </div>
        </div>
 
        <script>
            var page = 1;
            layui.use(['layer', 'form'], function() {
                var layer = layui.layer,
                    form = layui.form,
                    $ = layui.$;
                $("input[name='utype']").each(function() {
                    $(this).next().click(function() {
                        var val = $(this).prev().val();
                        if(val == '5') {
                            $("#user_email").show();
                            $("input[name=userarr]").val('');
                        } else {
                            $("#user_email").hide();
                            $("input[name=userarr]").val('');
                        }
                    });
                });
                form.on('submit(send)', function (data) {
                    var field = data.field;
                    if(typeof field.utype === 'undefined') {
                        parent.layer.msg('请选择发送信息的用户!', 2, 8);
                        return false;
                    }
                    if(field.utype == "5") {
                        if(field.userarr == "") {
                            parent.layer.msg('请输入手机号码!', 2, 8);
                            return false;
                        }
                    }
                    if(field.content == '') {
                        parent.layer.msg('请填写短信内容!', 2, 8);
                        return false;
                    }
                    page = 1;
                    sendDivMsg(field, page, "正在发送,请稍候。。。", 3);
                    return false;
                })
            });
            function sendDivMsg(field,page,msg,status){
                if(status=="3"){
                    var ii = parent.layer.msg(msg,20,{
                        icon:16,shade:0.01
                    });
                    field.page = page;
                    $.ajax({
                        data: field,
                        type: 'post',
                        dataType: 'json',
                        url: 'index.php?m=email&c=msgsave',
                        success: function (res) {
                            page++;
                            sendDivMsg(field, page, res.msg, res.status);
                        }
                    })
                }else{
                    parent.layer.close(ii);
                    parent.layer.msg(msg, 2, 9, function(){
                        window.location.reload();
                    });
                }
            }
        </script>
    </body>
 
</html>