精品深夜福利视频,日本中文字幕不卡,久久久久国产,av综合电影网站


待發短信

在線客服
產品支持 短信寶客服
合作渠道 渠道合作
服務咨詢

4001-021-502

工作時間

9:00-21:00

微擎系統新增短信寶短信接口

微擎是一款免費開源的公眾平臺管理系統,基于web2.0技術架構,他有很多的擴展模塊,二次開發也非常方便,小編對于這套系統還是比較了解的,今天小編就以替換短信接口為例告訴大家如何進行二次開發,我們講解的是微擎1.7.3版本,使用的短信接口是我們短信寶短信群發平臺的接口,我們短信寶短信群發平臺非常穩定,發送速度快,注冊就送測試短信,推薦大家使用。

首先我們需要替換項目中web\themes\default\system下的site.html文件,替換代碼如下:

?
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
{template 'common/header'}
<div class="we7-page-title">站點設置</div>
<ul class="we7-page-tab">
<li{if $do == 'copyright'class="active"{/if}><a href="{php echo url('system/site');}">站點信息</a></li>
</ul>
<div class="clearfix">
<form action="" method="post"  class="we7-form" role="form" enctype="multipart/form-data" id="form1">
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">關閉站點</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" name="status" id="status-1" {if $settings['status'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="status-1">
             
        </label>
        <input type="radio" name="status" id="status-0" {if $settings['status'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="status-0">
            
        </label>    </div>
</div>
<div class="form-group reason" {if $settings['status'] == 0} style="display:none;" {/if}>
    <label class="col-sm-2 control-label" style="text-align:left;">關閉原因</label>
    <div class="col-sm-8">
        <textarea style="height:150px;" class="form-control" cols="70" name="reason" autocomplete="off">{$settings['reason']}</textarea>
        <input type="hidden" name="reasons" value="{$settings['reason']}">
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">備案號</label>
    <div class="col-sm-8">
        <input type="text" name="icp" class="form-control" value="{$settings['icp']}">
    </div>
</div>
<h5 class="page-header">登錄站點</h5>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">是否開啟驗證碼</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" id="verifycode-1" name="verifycode" {if $settings['verifycode'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="verifycode-1">
            
        </label>
        <input type="radio" id="verifycode-0" name="verifycode" {if $settings['verifycode'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="verifycode-0">
            
        </label>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">是否開啟手機登錄</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" name="mobile_status" id="mobile_status_status-1" {if $settings['mobile_status'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="mobile_status_status-1">
            
        </label>
        <input type="radio" name="mobile_status" id="mobile_status_status-0" {if $settings['mobile_status'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="mobile_status_status-0">
            
        </label>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">默認登錄方式</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" name="login_type" id = "login_type_status-0" {if $settings['login_type'] == 0 || $settings['mobile_status'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="login_type_status-0">
            賬號密碼登錄
        </label>
        <input type="radio" name="login_type" id = "login_type_status-1" {if $settings['login_type'] == 1} checked="checked" {/if} {if $settings['mobile_status'] == 0} disabled {/if}value="1" />
        <label class="radio-inline" for="login_type_status-1">
            手機登錄
        </label>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">強制綁定信息</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" id="bind_status-0" name="bind" value="" {if empty($settings['bind'])}checked{/if}/>
        <label class="radio-inline" for="bind_status-0">
            
        </label>
        <input type="radio" id="bind_status-1" name="bind" value="qq" {if $settings['bind'] == 'qq'}checked{/if}/>
        <label class="radio-inline" for="bind_status-1">
            qq
        </label>
        <input type="radio" id="bind_status-2" name="bind" value="wechat" {if $settings['bind'] == 'wechat'}checked{/if}/>
        <label class="radio-inline" for="bind_status-2">
            微信
        </label>
        <input type="radio" id="bind_status-3" name="bind" value="mobile" {if $settings['bind'] == 'mobile'}checked{/if}/>
        <label class="radio-inline" for="bind_status-3">
            手機號
        </label>
    </div>
</div>
<h5 class="page-header">調試開關</h5>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">是否開啟調試模式</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" id="develop_status-1" name="develop_status" {if $settings['develop_status'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="develop_status-1">
            
        </label>
        <input type="radio" id="develop_status-0" name="develop_status" {if $settings['develop_status'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="develop_status-0">
            
        </label>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">是否開啟日志</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" id="log_status-1" name="log_status" {if $settings['log_status'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="log_status-1">
            
        </label>
        <input type="radio" id="log_status-0" name="log_status" {if $settings['log_status'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="log_status-0">
            
        </label>
    </div>
</div>
<h5 class="page-header">版權信息</h5>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">是否顯示首頁</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" name="showhomepage" value="1" id="showhomepage_1" {if !empty($settings['showhomepage'])} checked{/if}>
        <label for="showhomepage_1" class="radio-inline"> 是</label>
        <input type="radio" name="showhomepage" value="0" id="showhomepage_2" {if empty($settings['showhomepage'])} checked{/if}>
        <label for="showhomepage_2" class="radio-inline"> 否</label>
        <div class="help-block">設置“否”后,打開地址時將直接跳轉到登錄頁面,否則會跳轉到首頁。</div>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">網站名稱</label>
    <div class="col-sm-8">
        <input type="text" name="sitename" class="form-control" value="{$settings['sitename']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">網站URL</label>
    <div class="col-sm-8">
        <input type="text" name="url" class="form-control" value="{$settings['url']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">keywords</label>
    <div class="col-sm-8">
        <input type="text" name="keywords" class="form-control" value="{$settings['keywords']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">description</label>
    <div class="col-sm-8">
        <input type="text" name="description" class="form-control" value="{$settings['description']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">左側菜單定位</label>
    <div class="col-sm-8 form-control-static">
        <input type="radio" name="leftmenu_fixed" id="leftmenu_fixed_status-1" {if $settings['leftmenufixed'] == 1} checked="checked" {/if} value="1" />
        <label class="radio-inline" for="leftmenu_fixed_status-1">
            
        </label>
        <input type="radio" name="leftmenu_fixed" id="leftmenu_fixed_status-0" {if $settings['leftmenufixed'] == 0} checked="checked" {/if} value="0" />
        <label class="radio-inline" for="leftmenu_fixed_status-0">
            
        </label>
        <span class="help-block">選擇“否”并保存后,左側菜單隨頁面滾動而上下滾動</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">后臺風格設置</label>
    <div class="col-sm-8">
        <select name="template" class="form-control">
            {loop $template $tpl}
            <option value="{$tpl}" {if $_W['setting']['basic']['template'] == $tpl}selected{/if}>
            {if !empty($template_ch_name[$tpl])}{$template_ch_name[$tpl]}{else}{$tpl}{/if}
            </option>
            {/loop}
        </select>
        <span class="help-block">favorite icon</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">favorite icon</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_image('icon'$settings['icon'], ''array('global' => true, 'extras' => array('image'=> ' width="32" ')));}
        <span class="help-block">favorite icon</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">前臺LOGO</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_image('flogo'$settings['flogo'], ''array('global' => true));}
        <span class="help-block">最佳尺寸:220px*50px</span>
        <span class="help-block">此logo是指首頁及登錄頁面logo。</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">背景圖片</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_image('background_img'$settings['background_img'], ''array('global' => true));}
        <span class="help-block">最佳尺寸:1920px*800px</span>
        <span class="help-block">此圖片是指登錄頁面的背景圖。</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">前臺幻燈片</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_multi_image('slides'$settings['slides'], array('global' => true, 'thumb' => 0));}
        <span class="help-block">設置首頁幻燈片。</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">前臺幻燈片顯示文字</label>
    <div class="col-sm-8">
        <input type="text" class="form-control" name="notice" value="{$settings['notice']}"/>
        <span class="help-block">該文字顯示在幻燈片上。</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">后臺LOGO</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_image('blogo'$settings['blogo'], ''$options array('global' => true));}
        <span class="help-block">最佳尺寸:110px*35px</span>
        <span class="help-block">此logo是指登錄后在本系統左上角顯示的logo。</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2  control-label" style="text-align:left;">第三方統計代碼</label>
    <div class="col-sm-8">
        <textarea style="height:150px;" class="form-control" cols="70" name="statcode" autocomplete="off">{$settings['statcode']}</textarea>
        <span class="help-block">只支持百度統計</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">底部右側信息(上)</label>
    <div class="col-sm-8">
        <textarea style="height:150px;" class="form-control" cols="70" name="footerright" autocomplete="off">{$settings['footerright']}</textarea>
        <span class="help-block">自定義底部右側信息,支持HTML</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">底部左側信息(下)</label>
    <div class="col-sm-8">
        <textarea style="height:150px;" class="form-control" cols="70" name="footerleft" autocomplete="off">{$settings['footerleft']}</textarea>
        <span class="help-block">自定義底部左側信息,支持HTML</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">聯系人</label>
    <div class="col-sm-8">
        <input type="text" name="person" class="form-control" value="{$settings['person']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">聯系電話</label>
    <div class="col-sm-8">
        <input type="text" name="phone" class="form-control" value="{$settings['phone']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">QQ</label>
    <div class="col-sm-8">
        <input type="text" name="qq" class="form-control" value="{$settings['qq']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">郵箱</label>
    <div class="col-sm-8">
        <input type="text" name="email" class="form-control" value="{$settings['email']}" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">公司名稱</label>
    <div class="col-sm-8">
        <input type="text" name="company" value="{$settings['company']}"  class="form-control" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">關于我們</label>
    <div class="col-sm-8">
        {php echo tpl_ueditor('companyprofile'$settings['companyprofile']);}
        <span class="help-block">該文字顯示在個人中心->關于我們中</span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">詳細地址</label>
    <div class="col-sm-8">
        <input type="text" name="address" value="{$settings['address']}"  class="form-control" />
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label" style="text-align:left;">地理位置</label>
    <div class="col-sm-8">
        {php echo tpl_form_field_coordinate('baidumap'$settings['baidumap'])}
    </div></div>
 <div class="form-group">
                <label class="col-sm-2 control-label" style="text-align:left;">短信寶賬號</label>
                <div class="col-sm-8">
                        <input type="text" name="sms_name" class="form-control" value="{$settings['sms_name']}" />
                        <span class="help-block">沒有短信寶賬號?點擊<a class="btn btn-primary span3" target="_blank" href="http://www.980247.com">免費注冊</a></span>
                </div>        </div>
        <div class="form-group">
                <label class="col-sm-2 control-label" style="text-align:left;">短信寶密碼</label>
                <div class="col-sm-8">
                        <input type="password" name="sms_password" class="form-control" value="{$settings['sms_password']}" />
                </div>        </div>
<div class="form-group">
    <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-1 col-xs-12 col-sm-10 col-md-10 col-lg-11">
        <input name="submit" type="submit" value="提交" class="btn btn-primary span3" />
        <input type="hidden" name="token" value="{$_W['token']}" />
    </div>
</div>
</form>
<script type="text/javascript">
    $("#form1").submit(function() {
        if ($("input[name='status']:checked").val() == 1) {
            if ($("textarea[name='reason']").val() == '') {
                util.message('請填寫站點關閉原因');
                return false;
            }
        }
    });
    $("input[name='status']").click(function() {
        if ($(this).val() == 1) {
            $(".reason").show();
            var reason = $("input[name='reasons']").val();
            $("textarea[name='reason']").text(reason);
        else {
            $(".reason").hide();
        }
    });
    $("input[name='mobile_status']").click(function() {
        if ($(this).val() == 0) {
            $("#login_type_status-1").attr("checked", false);
            $("#login_type_status-0").prop("checked", true);
            $("#login_type_status-1").attr("disabled", true);
        else {
            $("#login_type_status-1").attr("disabled", false);
        }
    });
</script>
</div>
{template 'common/footer'}

接著我們替換項目web\themes\default\account\manage-sms.html文件,代碼如下:

?
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
{template 'common/header'}
{template 'account/account-header'}
<div id="js-account-manage-sms" ng-controller="AccountManageSms" ng-cloak>
<table class="table we7-table table-hover">
<col width="200px"/>
<col width="230px"/>
<tr>
<th>剩余條數</th>
<th class="text-right">操作</th>
</tr><tr>
<td ng-if="notify.sms"><span ng-bind="notify.sms.balance">{$notify['balance']}</span>條</td>
<td ng-if="!notify.sms">0條</td>
<td>
<div class="link-group">
    <!-- //{if permission_check_account_user('see_account_manage_sms_blance')} -->
    <a href="javascript:;" data-toggle="modal" data-target="#balance" ng-click="editSms('balance', notify.sms.balance)">分配短信</a>
    <!-- {/if} -->
    <a href="javascript:;" data-toggle="modal" data-target="#signature" ng-click="editSms('signature', notify.sms.signature)">設置短信簽名</a>
</div></td></tr>
</table>
<div class="modal fade" id="balance" tabindex="-1" role="dialog" aria-hidden="true">
<div class="we7-modal-dialog modal-dialog">
<div class="modal-content">
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <div class="modal-title">分配短信</div>
</div>
<div class="modal-body we7-form">
    <div class="form-group">
        <input type="number" min="0" ng-model="middleSms.balance" class="form-control" placeholder="請填寫短信剩余條數,必須為整數。" />
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-primary" ng-click="httpChange('balance')">確定</button>
    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div></div></div>
</div>
<div class="modal fade" id="signature" tabindex="-1" role="dialog" aria-hidden="true">
<div class="we7-modal-dialog modal-dialog">
<div class="modal-content">
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <div class="modal-title">修改短信簽名</div></div>
<div class="modal-body">
    <div class="form-group">
        <input type="text" ng-model="middleSms.signature" name="signature" value="{$notify['sms']['signature']}" class="form-control" placeholder="請填寫短信簽名" />
        <span class="help-block">請填寫短信簽名,一般為3-8個字符。</span>
        <!-- <select name="signature" class="we7-select" ng-model="middleSms.signature">
            {if !empty($notify['sms']['signature'])}
                {if in_array($notify['sms']['signature'], $signatures)}
                    <option selected value="{$notify['sms']['signature']}">{$notify['sms']['signature']}</option>
                {elseif !empty($notify['sms']['signature'])}
                    <option value="{$notify['sms']['signature']}">{$notify['sms']['signature']}(未通過云服務審核)</option>
                {/if}
            {/if}
            {loop $signatures $signa}
                {if $signa != $notify['sms']['signature']}
                    <option value="{$signa}">{$signa}</option>
                {/if}
            {/loop}
        </select>
        <span class="help-block">請填寫短信簽名。未審核簽名可以通過云短信審核簽名</span> -->
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-primary" ng-click="httpChange('signature')">確定</button>
    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div></div></div>
</div>
</div>
<script>
angular.module('accountApp').value('config', {
notify: {php echo !empty($notify) ? json_encode($notify) : 'null'},
signatures: {php echo !empty($signatures) ? json_encode($signatures) : 'null'},
links: {
postSms: "{php echo url('account/post/sms', array('acid' => $acid, 'uniacid' => $uniacid))}",
},
});
angular.bootstrap($('#js-account-manage-sms'), ['accountApp']);
</script>
{template 'common/footer'}

替換完成后我們去修改保存短信寶配置文件,打開項目web\source\system\site.ctrl.php文件,替換為以下代碼:

?
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
<?php
/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA'or exit('Access Denied');
 
    load()->model('system');
 
$dos array('copyright');
$do = in_array($do$dos) ? $do 'copyright';
$_W['page']['title'] = '站點設置 - 工具  - 系統管理';
 
$settings $_W['setting']['copyright'];
if(empty($settings) || !is_array($settings)) {
    $settings array();
else {
    $settings['slides'] = iunserializer($settings['slides']);
}
 
    $path = IA_ROOT . '/web/themes/';
    if(is_dir($path)) {
        if ($handle = opendir($path)) {
            while (false !== ($templatepath = readdir($handle))) {
                if ($templatepath != '.' && $templatepath != '..') {
                    if(is_dir($path.$templatepath)){
                        $template[] = $templatepath;
                    }
                }
            }
        }
    }
 
if ($do == 'copyright') {
    
        $template_ch_name = system_template_ch_name();
    
    if (checksubmit('submit')) {
        
            $data array(
                'status' => intval($_GPC['status']),
                'verifycode' => intval($_GPC['verifycode']),
                'reason' => trim($_GPC['reason']),
                'sitename' => trim($_GPC['sitename']),
                'url' => (strexists($_GPC['url'], 'http://') || strexists($_GPC['url'], 'https://')) ? $_GPC['url'] : "http://{$_GPC['url']}",
                'statcode' => system_check_statcode($_GPC['statcode']),
                'footerleft' => safe_gpc_html(htmlspecialchars_decode($_GPC['footerleft'])),
                'footerright' => safe_gpc_html(htmlspecialchars_decode($_GPC['footerright'])),
                'icon' => trim($_GPC['icon']),
                'flogo' => trim($_GPC['flogo']),
                'background_img' => trim($_GPC['background_img']),
                'slides' => iserializer($_GPC['slides']),
                'notice' => trim($_GPC['notice']),
                'blogo' => trim($_GPC['blogo']),
                'baidumap' => $_GPC['baidumap'],
                'company' => trim($_GPC['company']),
                'companyprofile' => safe_gpc_html(htmlspecialchars_decode($_GPC['companyprofile'])),
                'address' => trim($_GPC['address']),
                'person' => trim($_GPC['person']),
                'phone' => trim($_GPC['phone']),
                'qq' => trim($_GPC['qq']),
                'email' => trim($_GPC['email']),
                'keywords' => trim($_GPC['keywords']),
                'description' => trim($_GPC['description']),
                'showhomepage' => intval($_GPC['showhomepage']),
                'leftmenufixed' => (!empty($_GPC['leftmenu_fixed'])) ? 1 : 0,
                'mobile_status' => $_GPC['mobile_status'],
                'login_type' => $_GPC['login_type'],
                'log_status' => intval($_GPC['log_status']),
                'develop_status' => intval($_GPC['develop_status']),
                'icp' => safe_gpc_string($_GPC['icp']),
                'bind' => $_GPC['bind'],
                'sms_name'=>trim($_GPC['sms_name']),
                'sms_password'=>trim($_GPC['sms_password'])
            );
        
        
            
        $test = setting_save($data'copyright');
 
        
            $template = trim($_GPC['template']);
            setting_save(array('template' => $template), 'basic');
        
 
        itoast('更新設置成功!', url('system/site'), 'success');
    }
}
template('system/site');

接著我們替換項目web\source\utility\verifycode.ctrl.php文件,替換代碼如下:

?
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
<?php
/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA'or exit('Access Denied');
 
load()->model('setting');
$custom_sign = safe_gpc_string($_GPC['custom_sign']);
 
$_W['uniacid'] = intval($_GPC['uniacid']);
if (empty($_W['uniacid'])) {
    $uniacid_arr array(
        'name' => '短信驗證碼',
    );
else {
    $uniacid_arr = pdo_fetch('SELECT * FROM ' . tablename('uni_account') . ' WHERE uniacid = :uniacid'array(':uniacid' => $_W['uniacid']));
    if(empty($uniacid_arr)) {
        exit('非法訪問');
    }
}
$receiver = trim($_GPC['receiver']);
if(empty($receiver)){
    exit('請輸入郵箱或手機號');
elseif(preg_match(REGULAR_MOBILE, $receiver)){
    $receiver_type 'mobile';
elseif(preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"$receiver)) {
    $receiver_type 'email';
else {
    exit('您輸入的郵箱或手機號格式錯誤');
}
 
pdo_delete('uni_verifycode'array('createtime <' => TIMESTAMP - 1800));
 
$sql 'SELECT * FROM ' . tablename('uni_verifycode') . ' WHERE `receiver`=:receiver AND `uniacid`=:uniacid';
$pars array();
$pars[':receiver'] = $receiver;
$pars[':uniacid'] = $_W['uniacid'];
$row = pdo_fetch($sql$pars);
$record array();
$code = random(6, true);
if(!empty($row)) {
    if($row['total'] >= 5) {
        exit('您的操作過于頻繁,請稍后再試');
    }
    $record['total'] = $row['total'] + 1;
    $record['verifycode'] = $code;
    $record['createtime'] = TIMESTAMP;
else {
    $record['uniacid'] = $_W['uniacid'];
    $record['receiver'] = $receiver;
    $record['verifycode'] = $code;
    $record['total'] = 1;
    $record['createtime'] = TIMESTAMP;
}
if(!empty($row)) {
    pdo_update('uni_verifycode'$recordarray('id' => $row['id']));
else {
    pdo_insert('uni_verifycode'$record);
}
 
if($receiver_type == 'email') {
    load()->func('communication');
    $content "您的郵箱驗證碼為: {$code} 您正在使用{$uniacid_arr['name']}相關功能, 需要你進行身份確認.";
    $result = ihttp_email($receiver"{$uniacid_arr['name']}身份確認驗證碼"$content);
else {
    load()->model('cloud');
    $r = cloud_prepare();
    if(is_error($r)) {
        exit($r['message']);
    }
    $setting = uni_setting($_W['uniacid'], 'notify');
    $content "您的短信驗證碼為: {$code} 您正在使用{$uniacid_arr['name']}相關功能, 需要你進行身份確認,請不要告訴他人 ";
    $result = cloud_sms_send($receiver$contentarray(), $custom_sign);
}
 
if(is_error($result)) {
    header('error: ' . urlencode($result['message']));
    exit($result['message']);
}
exit('success');

最后我們修改短信接口文件,打開項目framework\model\cloud.mod.php文件,修改cloud_sms_send、cloud_sms_info 這兩個方法,修改代碼為:

?
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
function cloud_sms_send($mobile$content$postdata array()) {
        global $_W;
        
        if(!preg_match('/^1\d{10}$/'$mobile) || empty($content)) {
                return error(1, '發送短信失敗, 原因: 手機號錯誤或內容為空.');
        }
        
        $row = pdo_get('uni_settings' array('uniacid' => $_W['uniacid']), array('notify'));
        $row['notify'] = @iunserializer($row['notify']);
 
        $config $row['notify']['sms'];
        $balance intval($config['balance']);
        
        $sign $config['signature'];
        if(empty($sign)) {
                $sign '短信寶';
        }
        //判斷剩余條數
        if($balance<1){
                return error(-1, '短信發送失敗, 原因:余額不足');
        }
        //短信寶賬號
        $smsbao_info=pdo_get('uni_settings' array('uniacid' => $_W['uniacid']), array('copyright'));
        $sms_param['u']=$_W['setting']['copyright']['sms_name'];
        $sms_param['p']=md5($_W['setting']['copyright']['sms_password']);
        $sms_param['m']=$mobile;
        $sms_param['c']='【'.$sign.'】'.$content;
        $response file_get_contents("http://api.smsbao.com/sms?".http_build_query($sms_param));
        if (trim($response)!='0') {
                return error($response'短信發送失敗, 原因:'.$response);
        }
 
        if (trim($response)=='0') {
                $row['notify']['sms']['balance'] = $row['notify']['sms']['balance'] - 1;
                if ($row['notify']['sms']['balance'] < 0) {
                        $row['notify']['sms']['balance'] = 0;
                }
                pdo_update('uni_settings'array('notify' => iserializer($row['notify'])), array('uniacid' => $_W['uniacid']));
                uni_setting_save('notify'$row['notify']);
        }
        return true;
}
 
 
function cloud_sms_info() {
        global $_W;
 
        $data=[];
        //返回短信的剩余條數以及簽名
        $sms_name=$_W['setting']['copyright']['sms_name'];
        $sms_password=md5($_W['setting']['copyright']['sms_password']);
        $res=file_get_contents("http://api.smsbao.com/query?u={$sms_name}&p={$sms_password}");
        $retArr = split("\n"$res);
        $balanceArr = split(","$retArr[1]);
        $data['sms_count']=$retArr[0] == 0 ? $balanceArr[1]:0;
        return $data;
}

好了,經過以上的替換,短信寶的短信平臺已經替換成功了,我們去進行發送測試:


報備一下短信寶的VIP模板,這樣就可以走短信寶的優質通道了,即便遇到敏感文字我們都不會人工審核,短信內容3~5秒就可送達。

另外:我們已經開發好完整的微擎系統短信寶插件,點擊此鏈接 下載及查看安裝流程。

開源插件

最新更新

電商類

CMS類

微信類

文章標簽
精品深夜福利视频,日本中文字幕不卡,久久久久国产,av综合电影网站
日韩中文字幕av电影| 国产乱码午夜在线视频| 久久久五月天| 久久人人97超碰国产公开结果| 国产亚洲电影| 国产精品99久久免费| 国产精品99久久免费| 你懂的国产精品| 精品国产黄a∨片高清在线| 国产精品久久久久久久久免费高清 | 日韩1区2区| 久久av导航| 色婷婷亚洲mv天堂mv在影片| 亚洲黄色免费看| аⅴ资源天堂资源库在线| 手机在线电影一区| 亲子伦视频一区二区三区| 九九综合在线| 男女男精品网站| 青青草国产精品亚洲专区无| 国产日产精品_国产精品毛片 | 亚洲精品影院在线观看| 日韩av中文在线观看| 日韩激情一区二区| 欧美日本一区| 精品国产一区二区三区2021| www在线观看黄色| 欧美va天堂| 91在线成人| 黄色网一区二区| 欧美日韩在线二区| 日韩精品一级中文字幕精品视频免费观看 | 中文在线资源| 91久久久精品国产| 欧美一区不卡| 精品视频一区二区三区四区五区 | 精品国产欧美日韩| 欧美日韩亚洲在线观看| 一区二区不卡| 国产成人久久精品麻豆二区| 91九色精品国产一区二区| 日韩精品a在线观看91| 国产aⅴ精品一区二区四区| 亚洲国内精品| 日韩三级一区| 久久99久久久精品欧美| 久久国产主播| 日韩精彩视频在线观看| av在线资源| 亚洲涩涩av| 久久精品色播| 亚洲欧美日韩精品一区二区| 欧美在线黄色| 福利精品一区| 五月亚洲婷婷| 成人自拍av| 97se亚洲| 精品在线91| 欧美aa在线视频| 美女毛片一区二区三区四区最新中文字幕亚洲| 国产精品久久久久9999高清| 亚洲青青久久| 国产亚洲福利| 国产精品99一区二区| 水蜜桃精品av一区二区| 国产精品片aa在线观看| 亚洲欧美久久精品| 在线亚洲观看| 视频一区中文| 久久免费高清| 日韩国产一区| 激情不卡一区二区三区视频在线| 久久精品97| 久久国产日韩欧美精品| 免费久久99精品国产| 激情久久久久久| 日韩在线综合| 人在线成免费视频| 国产精品久久久久久久免费观看| 久久gogo国模啪啪裸体| 国产精品一区二区三区av| 婷婷亚洲成人| 中文字幕一区二区av| 国产精品嫩草99av在线| 亚洲精品在线观看91| 1000部精品久久久久久久久| 中文字幕系列一区| 亚洲爱爱视频| 精精国产xxxx视频在线野外| www.九色在线| 国产传媒在线观看| 亚洲一级特黄| 日韩av网站在线免费观看| 亚洲一区二区免费看| 久久激情网站| 国产精品99一区二区三| 国产欧美69| 日韩精品欧美成人高清一区二区| 在线视频精品| 免费欧美一区| 久久国产电影| se01亚洲视频 | 国产成人精品福利| 欧美亚洲二区| 日韩精品欧美大片| 亚洲狼人精品一区二区三区| 国产婷婷精品| 国产高清一区| 欧美1区免费| 欧美日韩一区二区三区视频播放| 久久男人av资源站| 国产aⅴ精品一区二区三区久久| 国产精品大片| 国产欧美91| 国产一区 二区| 国产日本久久| 国产欧美激情| 麻豆久久久久久| 老司机免费视频一区二区| 国产美女视频一区二区| 国产日产精品_国产精品毛片 | 日韩在线观看一区二区| 99国产精品99久久久久久粉嫩| 亚洲网站视频| 尤物网精品视频| 日韩午夜高潮| 99在线观看免费视频精品观看| 国产中文一区| 影音先锋国产精品| 美女91精品| 亚洲久久视频| 亚洲精品护士| 久久黄色影视| 精品深夜福利视频| 91日韩免费| 99精品电影| 水蜜桃久久夜色精品一区的特点| 美女精品网站| 久久精品72免费观看| 久久精品福利| 日韩中文欧美| 欧美91福利在线观看| 亚洲美洲欧洲综合国产一区| 免费国产亚洲视频| 国产亚洲第一伦理第一区| 久久wwww| 日韩欧美另类一区二区| 久久精品国内一区二区三区水蜜桃| 免费国产自久久久久三四区久久| 亚洲激情另类| 日韩精品福利一区二区三区| 欧美1区2区3| 群体交乱之放荡娇妻一区二区| 欧美亚洲国产激情| 欧美资源在线| 国产精品一站二站| 国产拍在线视频| 国产视频一区欧美| 国产日韩一区二区三免费高清| 成人在线视频免费看| 欧美亚洲精品在线| 中文无码久久精品| 国产精品啊v在线| 亚洲福利一区| 69堂精品视频在线播放| 免费看av不卡| 蜜桃av一区二区| 九九久久国产| 亚洲中午字幕| 精品久久久亚洲| 亚洲综合日本| 国产在线观看91一区二区三区| 亚洲二区精品| 日韩精品福利一区二区三区| 电影91久久久| 天堂av在线一区| 国产欧美三级| 日韩一区欧美| 日韩精品一区二区三区免费视频| 精品久久福利| 在线视频亚洲欧美中文| 精品视频在线观看网站| 亚洲欧美视频| 精品国产午夜| 中文字幕一区二区三区日韩精品 | 在线国产一区| 国产福利资源一区| se01亚洲视频| 欧美日韩伊人| 伊人成人网在线看| 久久精品亚洲| 国产视频一区在线观看一区免费| 欧美激情视频一区二区三区在线播放| 日韩成人亚洲| 欧美一级网站| 欧美特黄一级| 精品国产一区二区三区2021| 男女男精品网站| 日韩在线综合| 日韩高清成人在线|