示例#1
0
function set_order_msg($uid, $keyword1, $keyword2, $keyword3)
{
    global $db, $_CFG;
    $weixinconfig = get_cache('weixin_config');
    if (intval($_CFG['weixin_apiopen']) == 1 && $weixinconfig['set_payment'] == '1') {
        $user = $db->getone("select weixin_openid from " . table('members') . " where uid ={$uid} limit 1");
        if ($user['weixin_openid'] != "") {
            $template = array('touser' => $user['weixin_openid'], 'template_id' => "UxurRCK19QNDb3_g2lO5GSQ4lHO48-d1idxBYvutbBc", 'url' => '', 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8("尊敬的用户,您有以下订单需要完成支付:")), 'color' => "#743A3A"), 'keyword1' => array('value' => urlencode(gbk_to_utf8($keyword1)), 'color' => "#743A3A"), 'keyword2' => array('value' => urlencode(gbk_to_utf8($keyword2)), 'color' => "#743A3A"), 'keyword3' => array('value' => urlencode(gbk_to_utf8($keyword3)), 'color' => "#743A3A"), 'keyword4' => array('value' => urlencode(gbk_to_utf8(date('Y-m-d', time()))), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n您可以查看该订单后支付。"), 'color' => "#743A3A")));
            send_template_message(urldecode(json_encode($template)));
        }
    }
}
示例#2
0
文件: apply.php 项目: winiceo/fenzhan
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
                    report_deal($_SESSION['uid'], $points_rule['apply_jobs']['type'], $points_rule['apply_jobs']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $points_rule['apply_jobs']['type'] == "1" ? "+" : "-";
                    write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']},({$operator}{$points_rule['apply_jobs']['value']}),(剩余:{$user_points})", 2, 1301, "申请职位", "{$operator}{$points_rule['apply_jobs']['value']}", "{$user_points}");
                } else {
                    write_memberslog($_SESSION['uid'], 2, 1301, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']}");
                }
            }
            //微信
            if (intval($_CFG['weixin_apiopen']) == 1 && $weixinconfig['set_applyjobs'] == '1') {
                $user = $db->getone("select weixin_openid from " . table('members') . " where uid = {$jobs['uid']} limit 1");
                if ($user['weixin_openid'] != "") {
                    $resume_url = $_CFG['wap_domain'] . "/resume-show.php?id=" . $resumeid;
                    $template = array('touser' => $user['weixin_openid'], 'template_id' => "u_yoFifHb-ryYXMtNSlATj_Wfm1CWTKEjf8EkiM6dvY", 'url' => $resume_url, 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8("你收到了一份新简历,请及时登录" . $_CFG['site_name'] . "查阅")), 'color' => "#743A3A"), 'job' => array('value' => urlencode(gbk_to_utf8($jobs['jobs_name'])), 'color' => "#743A3A"), 'resuname' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'realname' => array('value' => urlencode(gbk_to_utf8($personal_fullname)), 'color' => "#743A3A"), 'exp' => array('value' => urlencode(gbk_to_utf8($resume_basic['experience_cn'])), 'color' => "#743A3A"), 'lastjob' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n" . $notes), 'color' => "#743A3A")));
                    send_template_message(urldecode(json_encode($template)));
                }
            }
            exit("ok");
        } else {
            exit("err");
        }
    }
} elseif ($act == 'apply_del') {
    $yid = !empty($_POST['id']) ? $_POST['id'] : exit("请选择删除项目!");
    $n = del_jobs_apply($yid, $_SESSION['uid']);
    if (intval($n) > 0) {
        exit("ok");
    } else {
        exit("err");
    }
示例#3
0
/**
 * 餐厅管理人员受理订单后,发送消息给用户
 * 取餐通知
 * 格式:
 *      商店名称
 *      订单编号
 *      订单类型
 *      付款状态
 * @param $cids 餐厅编号
 * @param $oid  订单编号
 * @param $uname    用户姓名
 * @param $cname    餐厅名称
 * @param $winname  窗口名称
 * @param $paysta   支付状态
 * @param $uid      用户编号
 * @param $amount   菜品数量
 * @param $total    总价
 * @param $towid    接收消息的微信号
 */
function altermsg_for_sales($cids, $oid, $uname, $cname, $winname, $paysta, $uid, $amount, $total, $towid)
{
    $token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
    $oids = num2str_x(orderid_content_x, $oid);
    $uids = num2str(userid_content, $uid);
    $pre_str = '{"first": {"value":"%s,在【%s】取餐","color":"#000000"},"storeName":{"value":"%s","color":"#000000"},"orderId":{"value": "%s","color":"#000000"},"orderType":{"value":"默认","color":"#000000"},"remark":{"value":"订单数量:%s\\r\\n订单金额:¥%0.2f\\r\\n付款状态:%s\\r\\n\\r\\n点击查看订单详情,并完成销售","color":"#000000"}}';
    $data = sprintf($pre_str, $uname, $winname, $cname, $oids, $amount, $total, $paysta);
    send_template_message($token, $towid, CFG_TPMSG_QUCAN, CFG_HTTP . "mobile/admin_order_list.php?act=preuids&cids={$cids}&uids={$uids}", "#7B68EE", $data);
}