Example #1
0
 function sendgroupmsg()
 {
     $this->getportname();
     $portname = $this->portname;
     $this->getspotpositionname($this->spotpositionid);
     $arriveposition = $this->spotpositionname;
     $arrivetime = date("m月d日 H时i分");
     $weixin = new class_weixin();
     // $result= $weixin->sendgroupmsg($portname,$arriveposition,$arrivetime);
     $result = $weixin->sendServiceMsg($portname, $arriveposition, $arrivetime);
 }
Example #2
0
    //
    if (!is_array($data_array)) {
        echo "<p>对不起,没有查找到您要发送的群发内容!---</p>" . $date;
        return;
    } else {
        echo "<p>正在发送群消息!---</p>" . $date;
        $weixin = new class_weixin();
        foreach ($data_array as $row) {
            $portname = $row['portname'];
            $arriveposition = $row['arriveposition'];
            $arrivetime = $row['arrivetime'];
            $sql = "update t_wxsendmsg set sign = 1";
            sqlexec($sql);
            break;
        }
        $result = $weixin->sendServiceMsg($portname, $arriveposition, $arrivetime);
    }
} else {
    if (!is_array($datatemp_array)) {
        echo "<p>对不起,没有查找到您要发送的模版内容!---</p>" . $date;
        return;
    } else {
        echo "<p>正在发送模板消息!---</p>" . $date;
        $weixin = new class_weixin();
        foreach ($datatemp_array as $row) {
            $wxid = $row['wxid'];
            $cdkey = $row['cdkey'];
            $username = $row['username'];
            $carnum = $row['carnum'];
            $arrivetime = $row['arrivetime'];
            $kindname = $row['kindname'];