destoon模板编辑中,往往会有客户提出需求提醒会员30天到期的服务,这样才能让客户更好的管理或者提醒会员续费,以保证会员的权利
代码如下:
<?php
defined('IN_DESTOON') or exit('Access Denied');
$atime = strtotime(date("Y-m-d"),time())+2592000;
$btime = strtotime(date("Y-m-d"),time())+2678400;
$result = DB::query("SELECt username,totime FROM ".DT_PRE."company WHERe totime between $atime and $btime");
$g7 = cache_read('group-7.php');while($r = DB::fetch_array($result)) {
$todate = date("Y-m-d",$r['totime']);
$par = $arr = array();
$arr['first']['value'] = '网站会员服务到期提醒';
$arr['keyword2']['value'] = 'VIP会员服务';
$arr['keyword3']['value'] = $todate;
$arr['keyword4']['value'] = $g7['fee'].'元/年';
$arr['remark']['value'] = '点击“详情”进入网站立即续费';
$arr['keyword1']['value'] = 'VIP会员';
$par['username'] = $r['username'];
$par['template_id'] = 'uiUglueraB2bYCaOyufJerPbahh-u5nXKKdqdyDoJmk';
$par['url'] = $EXT['mobile_url'];
$par['topcolor'] = '#FF0000';
$par['data'] = $arr;
echo dcurl(DT_PATH.'/api/weixin/send.php', 'auth='.encrypt(json_encode($par), DT_KEY.'WXTS', 60));
}?>
以上就是小编的想法,有需求的朋友可以参考下,希望能帮到你
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。