示例#1
0
<?php

include_once "../includes/config.inc.php";
//send_phone_msg('18789251158','您的验证码是:568972');
$configModel = new Model_CustomerConfig();
$ss = $configModel->sendCustomerMsg("【云客生活部落】:【★】天气预报:【今天】8月1日,多云,27°到36°,南风3-4级转西南风3-4级。\n\n【★】【心灵鸡汤】:一齐走的兄弟姐妹是一种安慰,一齐走的兄弟姐妹忠告是一种激励,一齐走的兄弟姐妹鼓励是一种力量,一齐走的兄弟姐妹想念是一种愉悦。祝福你兄弟姐妹!\n<a href='http://mp.weixin.qq.com/s?__biz=MzA5ODQwMzI4Ng==&amp;mid=208574136&amp;idx=2&amp;sn=f978823cb2c33499635362154118e724#rd'>【★】【★】【★】“值得学习的思维模式”(←点击我哦^_^)</a>", array('ow6AGuAOUkUcUrjCyT2isDn9rRJc'));
var_dump($ss);
示例#2
0
<?php

include_once "../../includes/config.inc.php";
$configModel = new Model_CustomerConfig();
$userModel = new Model_Subtable('sub_user');
//微信通道
if (method_is('post')) {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_POST['content'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $configModel->sendCustomerMsg($content, $_POST['fromuser']);
} else {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_GET['id'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $smarty->assign('content', $content);
    $smarty->assign('id', $id);
    $listArr = $userModel->field('fromuser')->where("username in ('15631183141','18013085978','13814812590','18351519983')")->dataArr();
    $smarty->assign('list', $listArr);
    $smarty->assign('listcount', count($listArr));
    $smarty->setTpl('msg/templates/send_kf.html')->display();
    die;
}
示例#3
0
            }
        }
    }
    die;
}
if ($_REQUEST['a'] == 'send_msg_new') {
    set_time_limit(0);
    $configModel = new Model_CustomerConfig();
    $tid = $_POST['tid'];
    $content = $_POST['msg'];
    //职位信息
    /* $taskModel=D('sub_task');
    	$taskRow=$taskModel->find($tid); */
    //确认过的报名人员
    $listArr = D('sub_sign')->where("tid='{$tid}' and is_valid=1")->dataArr();
    if ($listArr) {
        foreach ($listArr as $key => $value) {
            $uRow = $userModel->field('id,nickname,fromuser')->where("id='{$value['uid']}'")->dataRow();
            if ($uRow['fromuser']) {
                $configModel->sendCustomerMsg($content, $uRow['fromuser']);
                usleep(100000);
            }
        }
    }
    die;
}
$listArr = $userModel->field('fromuser')->where("`type`=1 and fromuser!=''")->dataArr();
shuffle($listArr);
$smarty->assign('list', $listArr);
$smarty->assign('listcount', count($listArr));
$smarty->setTpl('task/templates/send_wx_msg.html')->display();
示例#4
0
    $listArr = $signModel->where("is_valid=1 and is_zj=0 and dudao_uid=0 and tid='" . $aRow['tid'] . "'")->order('id asc')->limit($limit_str)->dataArr();
    if (!$listArr) {
        $listArr = array();
    }
    //已追加给该督导和指定给该督导的报名人员
    $zj_list = $signModel->where("is_valid=1 and tid='" . $aRow['tid'] . "' and dudao_uid='" . $userRow['id'] . "'")->order('id asc')->dataArr();
    if (!$zj_list) {
        $zj_list = array();
    }
    $listArr = array_merge($listArr, $zj_list);
    if ($listArr) {
        $configModel = new Model_CustomerConfig();
        foreach ($listArr as $key => $value) {
            //从快照中获取用户信息
            $value['user_json'] ? $uRow = unserialize($value['user_json']) : ($uRow = $userModel->find($value['uid']));
            $configModel->sendCustomerMsg($_POST['content'], array($uRow['fromuser']));
            usleep(100000);
        }
    }
    die;
}
//追加报名
if ($_REQUEST['a'] == 'sign_zj') {
    $phone = $_GET['phone'];
    //判断手机账号是否存在
    $uRow = $userModel->where("type=1 and pid!=0 and username='******'")->dataRow();
    if (!$uRow) {
        die('no');
    }
    $signModel = new Model_Subtable('sub_sign');
    $data['num']['tid'] = $_GET['tid'];
示例#5
0
    $data = array();
    $data['info']['jid'] = (int) $_REQUEST['jid'];
    $data['info']['uid'] = $_SESSION['tyuser']['id'];
    $jobRow = $model->find($data['info']['jid']);
    $row = $jobsignModel->where("jid='" . $data['info']['jid'] . "' and uid='" . $data['info']['uid'] . "'")->dataRow();
    //已领取
    if ($row) {
        die('err');
    } else {
        $res = $jobsignModel->add($data);
        //领取数+1
        $jobsignModel->query("update sub_job set num=num+1 where id='" . $data['info']['jid'] . "'");
        //发消息
        if ($res) {
            $configModel = new Model_CustomerConfig();
            $configModel->sendCustomerMsg('您领取了新任务:' . $jobRow['title'] . ",<a href='" . $jobRow['msg'] . "'>点击这里</a>,查看详细任务密函", $userRow['fromuser']);
            die('suc');
        } else {
            die('err');
        }
    }
}
//推送消息页
if ($_REQUEST['a'] == 'msg') {
    $id = (int) $_GET['id'];
    $smarty->assign('vo', $model->find($id));
    $smarty->setLayout('')->setTpl('mobile/templates/job_msg.html')->display();
    die;
}
//取消任务
if ($_REQUEST['a'] == 'cancel_sign') {
示例#6
0
        $id = (int) $_GET['id'];
        if ($id) {
            $smarty->assign('vo', $model->find($id));
        }
        $smarty->setTpl('user/templates/cz.html')->display();
        die;
    }
}
//向单个用户发消息
if ($_REQUEST['a'] == 'send_msg') {
    if (method_is('post')) {
        $id = $_POST['id'];
        $userModel = new Model_Subtable('sub_user');
        $userRow = $userModel->find($id);
        $configModel = new Model_CustomerConfig();
        $configModel->sendCustomerMsg($_POST['content'], $userRow['fromuser']);
    }
    die;
}
//生成大礼包优惠码
if ($_REQUEST['a'] == 'produce_code') {
    if (method_is('post')) {
        $data = array();
        $id = $_POST['id'];
        $userModel = new Model_Subtable('sub_user');
        $userRow = $userModel->find($id);
        $data['info']['id'] = $id;
        $data['info']['code'] = substr(md5($userRow['username']), -6);
        $userModel->add($data);
    }
    die;