当前位置: 首页>>代码示例>>PHP>>正文


PHP ihttp_email函数代码示例

本文整理汇总了PHP中ihttp_email函数的典型用法代码示例。如果您正苦于以下问题:PHP ihttp_email函数的具体用法?PHP ihttp_email怎么用?PHP ihttp_email使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ihttp_email函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: payResult

 public function payResult($params)
 {
     $fee = intval($params['fee']);
     $data = array('status' => $params['result'] == 'success' ? 1 : 0);
     $paytype = array('credit' => '1', 'wechat' => '2', 'alipay' => '2', 'delivery' => '3');
     $data['paytype'] = $paytype[$params['type']];
     if ($params['type'] == 'wechat') {
         $data['transid'] = $params['tag']['transaction_id'];
     }
     if ($params['type'] == 'delivery') {
         $data['status'] = 1;
     }
     $order = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_order') . " WHERE id = '{$params['tid']}'");
     if ($order['status'] != 1) {
         pdo_update('hx_zhongchou_order', $data, array('id' => $params['tid']));
         //$order = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_order') . " WHERE id = '{$params['tid']}'");
         $pid = $order['pid'];
         $item_id = $order['item_id'];
         $project = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_project') . " WHERE id = '{$pid}'");
         $item = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_project_item') . " WHERE id = '{$item_id}'");
         pdo_update('hx_zhongchou_project', array('finish_price' => $project['finish_price'] + $order['item_price'], 'donenum' => $project['donenum'] + 1), array('id' => $pid));
         pdo_update('hx_zhongchou_project_item', array('donenum' => $item['donenum'] + 1), array('id' => $item_id));
     }
     if ($params['from'] == 'return') {
         //积分变更
         //$this->setOrderCredit($params['tid']);
         //邮件提醒
         if (!empty($this->module['config']['noticeemail'])) {
             $address = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_address') . " WHERE id = :id", array(':id' => $order['addressid']));
             $body = "<h3>购买众筹项目详情</h3> <br />";
             $body .= "名称:{$project['title']} <br />";
             $body .= "<br />支持金额:{$item['price']}元 (已付款)<br />";
             $body .= "<h3>购买用户详情</h3> <br />";
             $body .= "真实姓名:{$address['realname']} <br />";
             $body .= "地区:{$address['province']} - {$address['city']} - {$address['area']}<br />";
             $body .= "详细地址:{$address['address']} <br />";
             $body .= "手机:{$address['mobile']} <br />";
             load()->func('communication');
             ihttp_email($this->module['config']['noticeemail'], '众筹订单提醒', $body);
         }
         $setting = uni_setting($_W['uniacid'], array('creditbehaviors'));
         $credit = $setting['creditbehaviors']['currency'];
         if ($params['type'] == $credit) {
             message('支付成功!', $this->createMobileUrl('myorder'), 'success');
         } else {
             message('支付成功!', '../../app/' . $this->createMobileUrl('myorder'), 'success');
         }
     }
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:49,代码来源:site.php

示例2: COUNT

     $sql .= " AND `email`!=''";
     $countSql = 'SELECT COUNT(*)' . $sql;
     $ret['total'] = pdo_fetchcolumn($countSql, $pars);
     $ret['total'] = intval($ret['total']);
     $psize = 1;
     $pindex = intval($post['next']);
     $pindex = max(1, $pindex);
     $start = $psize * ($pindex - 1);
     $sql = 'SELECT `email`' . $sql . " LIMIT {$start}, {$psize}";
     $ds = pdo_fetchall($sql, $pars);
     if (is_array($ds)) {
         foreach ($ds as $row) {
             $str_find = array('../attachment/images', 'resource/components/tinymce/plugins/emoticons/img');
             $str_replace = array($_W['siteroot'] . 'attachment/images', $_W['siteroot'] . 'web/resource/components/tinymce/plugins/emoticons/img');
             $post['content'] = str_replace($str_find, $str_replace, $post['content']);
             $r = ihttp_email($row['email'], $post['title'], $post['content']);
             if (is_error($r)) {
                 $ret['failed']++;
             } else {
                 $ret['success']++;
             }
         }
     }
     if ($start + $psize < $ret['total']) {
         $ret['next'] = $pindex + 1;
     }
 }
 if ($post['type'] == 'sms') {
     $sql .= " AND `mobile`!=''";
     $countSql = 'SELECT COUNT(*)' . $sql;
     $ret['total'] = pdo_fetchcolumn($countSql, $pars);
开发者ID:hahamy,项目名称:we7,代码行数:31,代码来源:broadcast.ctrl.php

示例3: payResult

 public function payResult($params)
 {
     global $_W;
     //if ($params['result'] == 'success' && $params['from'] == 'notify') {
     $fee = intval($params['fee']);
     $data = array('status' => $params['result'] == 'success' ? 1 : 0);
     $paytype = array('credit' => '1', 'wechat' => '2', 'alipay' => '2', 'delivery' => '3');
     $data['paytype'] = $paytype[$params['type']];
     if ($params['type'] == 'wechat') {
         $data['transid'] = $params['tag']['transaction_id'];
     }
     if ($params['type'] == 'delivery') {
         $data['status'] = 1;
     }
     if (substr($params['tid'], 0, 3) == 'ws-') {
         $params['tid'] = str_replace('ws-', '', $params['tid']);
         $order = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_order_ws') . " WHERE id = '{$params['tid']}'");
         if ($order['status'] != 1) {
             pdo_update('hx_zhongchou_order_ws', $data, array('id' => $params['tid']));
             $pid = $order['pid'];
             $project = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_project') . " WHERE id = '{$pid}'");
             pdo_update('hx_zhongchou_project', array('finish_price' => $project['finish_price'] + $order['item_price']), array('id' => $pid));
         }
     } else {
         $order = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_order') . " WHERE id = '{$params['tid']}'");
         if ($order['status'] != 1) {
             pdo_update('hx_zhongchou_order', $data, array('id' => $params['tid']));
             $pid = $order['pid'];
             $item_id = $order['item_id'];
             $project = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_project') . " WHERE id = '{$pid}'");
             $item = pdo_fetch("SELECT * FROM " . tablename('hx_zhongchou_project_item') . " WHERE id = '{$item_id}'");
             pdo_update('hx_zhongchou_project', array('finish_price' => $project['finish_price'] + $order['item_price'], 'donenum' => $project['donenum'] + 1), array('id' => $pid));
             pdo_update('hx_zhongchou_project_item', array('donenum' => $item['donenum'] + 1), array('id' => $item_id));
         }
         //模板消息
         $address = pdo_fetch("SELECT * FROM " . tablename('mc_member_address') . " WHERE id = :id", array(':id' => $order['addressid']));
         $settings = $this->module['config'];
         if (!empty($settings['kfid']) && !empty($settings['k_templateid'])) {
             $kfirst = empty($settings['kfirst']) ? '您有一个新的众筹订单' : $settings['kfirst'];
             $kfoot = empty($settings['kfoot']) ? '请及时处理,点击可查看详情' : $settings['kfoot'];
             $kurl = '';
             $kdata = array('first' => array('value' => $kfirst, 'color' => '#ff510'), 'keyword1' => array('value' => $order['ordersn'], 'color' => '#ff510'), 'keyword2' => array('value' => '众筹:' . $project['title'], 'color' => '#ff510'), 'keyword3' => array('value' => $order['price'] . '元', 'color' => '#ff510'), 'keyword4' => array('value' => $address['username'], 'color' => '#ff510'), 'keyword5' => array('value' => $params['type'], 'color' => '#ff510'), 'remark' => array('value' => $kfoot, 'color' => '#ff510'));
             $acc = WeAccount::create();
             $acc->sendTplNotice($settings['kfid'], $settings['k_templateid'], $kdata, $kurl, $topcolor = '#FF683F');
         }
         if (!empty($settings['m_templateid'])) {
             $mfirst = empty($settings['mfirst']) ? '众筹支付成功通知' : $settings['mfirst'];
             $mfoot = empty($settings['mfoot']) ? '点击查看订单详情' : $settings['mfoot'];
             $murl = $_W['siteroot'] . 'app' . str_replace('./', '/', $this->createMobileUrl('myorder', array('op' => 'detail', 'orderid' => $order['id'])));
             $mdata = array('first' => array('value' => $mfirst, 'color' => '#ff510'), 'keyword1' => array('value' => $address['username'], 'color' => '#ff510'), 'keyword2' => array('value' => $order['ordersn'], 'color' => '#ff510'), 'keyword3' => array('value' => $order['price'] . '元', 'color' => '#ff510'), 'keyword4' => array('value' => '众筹:' . $project['title'], 'color' => '#ff510'), 'remark' => array('value' => $mfoot, 'color' => '#ff510'));
             $acc = WeAccount::create();
             $acc->sendTplNotice($order['from_user'], $settings['m_templateid'], $mdata, $murl, $topcolor = '#FF683F');
         }
         //积分变更
         //$this->setOrderCredit($params['tid']);
         //邮件提醒
         if (!empty($this->module['config']['noticeemail'])) {
             $body = "<h3>购买众筹项目详情</h3> <br />";
             $body .= "名称:{$project['title']} <br />";
             $body .= "<br />支持金额:{$order['price']}元 (已付款)<br />";
             $body .= "<h3>购买用户详情</h3> <br />";
             $body .= "真实姓名:{$address['username']} <br />";
             $body .= "地区:{$address['province']} - {$address['city']} - {$address['district']}<br />";
             $body .= "详细地址:{$address['address']} <br />";
             $body .= "手机:{$address['mobile']} <br />";
             load()->func('communication');
             ihttp_email($this->module['config']['noticeemail'], '众筹订单提醒', $body);
         }
         $setting = uni_setting($_W['uniacid'], array('creditbehaviors'));
         $credit = $setting['creditbehaviors']['currency'];
     }
     //}
     if ($params['from'] == 'return') {
         if ($params['type'] == $credit) {
             message('支付成功!', $this->createMobileUrl('myorder'), 'success');
         } else {
             message('支付成功!', '../../app/' . $this->createMobileUrl('myorder'), 'success');
         }
     }
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:80,代码来源:site.php

示例4: array

if (checksubmit('submit')) {
    $mail = array('username' => $_GPC['username'], 'password' => $_GPC['password'], 'smtp' => $_GPC['smtp'], 'sender' => $_GPC['sender'], 'signature' => $_GPC['signature']);
    setting_save($mail, 'mail');
    $row = pdo_fetchcolumn("SELECT `notify` FROM " . tablename('uni_settings') . " WHERE uniacid = :uniacid", array(':uniacid' => $_W['uniacid']));
    $notify = iunserializer($row);
    if (!is_array($notify)) {
        $notify['sms'] = array();
        $notify['sms']['balance'] = 0;
        $notify['sms']['signature'] = '系统默认';
    }
    $notify['mail'] = $mail;
    $update = array();
    $update['notify'] = iserializer($notify);
    pdo_update('uni_settings', $update, array('uniacid' => $_W['uniacid']));
    if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
        $result = ihttp_email($_GPC['receiver'], $_W['setting']['copyright']['sitename'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
        if (is_error($result)) {
            message($result['message']);
        }
    }
    message('更新设置成功!', url('system/common'));
}
if (checksubmit('authmodesubmit')) {
    $authmode = intval($_GPC['authmode']);
    setting_save($authmode, 'authmode');
    message('更新设置成功!', url('system/common'));
}
if (checksubmit('sms_submit')) {
    $sms = $_GPC['sms'];
    setting_save($sms, 'sms');
    if (!empty($_GPC['sms_testsend']) && !empty($_GPC['sms_receiver'])) {
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:common.ctrl.php

示例5: message

    if ($num > $row['stock']) {
        message('团购产品库存不足,无法参与团购。');
    }
    if ($num > $row['limit_num'] && $row['limit_num'] != 0) {
        message('每个用户只能购买' . $row['limit_num'] . '个产品。');
    }
    //保存订单
    $insert = array('weid' => $weid, 'tid' => $tid, 'from_user' => $from, 'ordersn' => date('md') . sprintf("%04d", $_W['fans']['id']) . random(4, 1), 'totalnum' => $num, 'totalprice' => intval($num) * floatval($row['price']), 'status' => 0, 'sendtype' => 0, 'paytype' => $_GPC['paytype'], 'createtime' => TIMESTAMP);
    if ($_GPC['paytype'] == 3) {
        $insert['secretsn'] = 'A' . random(11, 1);
        $insert['status'] = 1;
    }
    $temp = pdo_insert('groupon_order', $insert);
    if ($temp == false) {
        $this->message('订单失败,请稍候重试');
    } else {
        //0.52版本可以开启发邮件功能
        if (!empty($row['email'])) {
            ihttp_email($row['email'], '您有新订单', '您的产品' . $row['title'] . '团购了' . $num . '份,还剩下' . $row['stock'] . '份');
        }
        $orderid = pdo_insertid();
        if ($_GPC['paytype'] == 3) {
            //选择了货到付款
            //跳转到详情页
            //$this->message('订单成功,您选择了货到付款,请初始消费券后,付款消费。',$this->createMobileUrl('wleshow', array('tid'=>$tid,'id' => $orderid)),0);
            $this->message('订单成功,您选择了货到付款,请初始消费券后,付款消费。', $this->createMobileUrl('wleticket'), 0);
        } else {
            $this->message('订单成功', $this->createMobileUrl('wlpayment', array('orderid' => $orderid)), 0);
        }
    }
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:wldopay.php

示例6: payResult

 public function payResult($params)
 {
     global $_W;
     $fee = intval($params['fee']);
     $data = array('status' => $params['result'] == 'success' ? 1 : 0);
     $paytype = array('credit' => '1', 'wechat' => '2', 'alipay' => '2', 'delivery' => '3');
     // 卡券代金券备注
     if (!empty($params['is_usecard'])) {
         $cardType = array('1' => '微信卡券', '2' => '系统代金券');
         $data['paydetail'] = '使用' . $cardType[$params['card_type']] . '支付了' . ($params['fee'] - $params['card_fee']);
         $data['paydetail'] .= '元,实际支付了' . $params['card_fee'] . '元。';
     }
     $data['paytype'] = $paytype[$params['type']];
     if ($params['type'] == 'wechat') {
         $data['transid'] = $params['tag']['transaction_id'];
     }
     if ($params['type'] == 'delivery') {
         $data['status'] = 1;
     }
     $sql = 'SELECT `goodsid` FROM ' . tablename('shopping_order_goods') . ' WHERE `orderid` = :orderid';
     $goodsId = pdo_fetchcolumn($sql, array(':orderid' => $params['tid']));
     $sql = 'SELECT `total`, `totalcnf` FROM ' . tablename('shopping_goods') . ' WHERE `id` = :id';
     $goodsInfo = pdo_fetch($sql, array(':id' => $goodsId));
     // 更改库存
     if ($goodsInfo['totalcnf'] == '1' && !empty($goodsInfo['total'])) {
         pdo_update('shopping_goods', array('total' => $goodsInfo['total'] - 1), array('id' => $goodsId));
     }
     pdo_update('shopping_order', $data, array('id' => $params['tid']));
     if ($params['from'] == 'return') {
         //积分变更
         $this->setOrderCredit($params['tid']);
         $order = pdo_fetch("SELECT `price`, `paytype`, `from_user`, `addressid` FROM " . tablename('shopping_order') . " WHERE id = '{$params['tid']}'");
         $ordergoods = pdo_fetchall("SELECT goodsid, total FROM " . tablename('shopping_order_goods') . " WHERE orderid = '{$params['tid']}'", array(), 'goodsid');
         $goods = pdo_fetchall("SELECT id, title, thumb, marketprice, unit, total FROM " . tablename('shopping_goods') . " WHERE id IN ('" . implode("','", array_keys($ordergoods)) . "')");
         $address = pdo_fetch("SELECT * FROM " . tablename('shopping_address') . " WHERE id = :id", array(':id' => $order['addressid']));
         if (!empty($this->module['config']['noticeemail']) || !empty($this->module['config']['mobile'])) {
             $body = "<h3>购买商品清单</h3> <br />";
             if (!empty($goods)) {
                 foreach ($goods as $row) {
                     $body .= "名称:{$row['title']} ,数量:{$ordergoods[$row['id']]['total']} <br />";
                 }
             }
             $paytype = $order['paytype'] == '3' ? '货到付款' : '已付款' . '<br />';
             $body .= '总金额:' . $order['price'] . '元' . $paytype . '<br />';
             $body .= '<h3>购买用户详情</h3> <br />';
             $body .= '真实姓名:' . $address['realname'] . '<br />';
             $body .= '地区:' . $address['province'] . ' - ' . $address['city'] . ' - ' . $address['area'] . '<br />';
             $body .= '详细地址:' . $address['address'] . '<br />';
             $body .= '手机:' . $address['mobile'] . '<br />';
             // 邮件提醒
             if (!empty($this->module['config']['noticeemail'])) {
                 load()->func('communication');
                 ihttp_email($this->module['config']['noticeemail'], '微商城订单提醒', $body);
             }
             // 短信提醒
             if (!empty($this->module['config']['mobile'])) {
                 load()->model('cloud');
                 $body = str_replace(array('<h3>', '</h3>', '<br />'), array('', '', "\n"), $body);
                 cloud_sms_send($this->module['config']['mobile'], $body);
             }
         }
         //支付成功,打印订单
         if (empty($order)) {
             exit('订单不存在或已经删除');
         }
         //获取所有打印机
         $prints = pdo_fetchall('SELECT * FROM ' . tablename('shopping_print') . ' WHERE uniacid = :aid AND status = 1', array(':aid' => $_W['uniacid']));
         if (empty($prints)) {
             // exit('没有有效的打印机');
         }
         $orderinfo = '';
         $orderinfo .= '名称      单价  数量 金额<BR>';
         $orderinfo .= '--------------------------------<BR>';
         foreach ($goods as $row) {
             $orderInfo .= "{$row['title']}{$row['marketprice']}{$ordergoods[$row['id']]['total']}{$order['price']} <br />";
         }
         $orderInfo .= '--------------------------------<BR>';
         $orderinfo .= "合计:{$order['price']}元<BR>";
         $orderinfo .= "下单人:{$address['realname']}<BR>";
         $orderinfo .= "地址:{$address['province']} - {$address['city']} - {$address['area']} {$address['address']} <BR>";
         $orderinfo .= "联系电话:{$address['mobile']}<BR>";
         $orderinfo .= "支付方式:{$order['paytype']}<BR>";
         include 'wprint.class.php';
         //遍历所有打印机
         foreach ($prints as $li) {
             if (!empty($li['qrcode_link'])) {
                 $orderinfo .= "<QR>{$li['qrcode_link']}</QR>";
             }
             if (!empty($li['print_no']) && !empty($li['key'])) {
                 $wprint = new wprint();
                 $status = $wprint->StrPrint($li['print_no'], $li['key'], $orderinfo, 1);
                 if (!is_error($status)) {
                     $i++;
                     $data = array('uniacid' => $_W['uniacid'], 'sid' => $sid, 'pid' => $li['id'], 'oid' => $id, 'status' => 1, 'foid' => $status, 'addtime' => TIMESTAMP);
                     pdo_insert('shopping_order_print', $data);
                 }
             }
         }
         // if($i > 0) {
         // 	 pdo_query('UPDATE ' . tablename('str_order') . " SET print_nums = print_nums + {$i} WHERE uniacid = {$_W['uniacid']} AND id = {$id}");
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:mygit,代码行数:101,代码来源:site.php

示例7: pdo_fetchall

    $list = pdo_fetchall("SELECT * FROM" . tablename('weilive_prizecode') . "WHERE weid = " . $weid . " and inkind = 2");
} elseif ($op == 'inkind3') {
    $list = pdo_fetchall("SELECT * FROM" . tablename('weilive_prizecode') . "WHERE weid = " . $weid . " and inkind = 3");
} elseif ($op == 'detail') {
    $item = pdo_fetch("SELECT * FROM" . tablename('weilive_prizecode') . "WHERE id='{$_GPC['id']}'");
    $row = pdo_fetch("SELECT f.*, m.address, m.mobile, m.email FROM" . tablename("mc_mapping_fans") . " as f left join " . tablename('mc_members') . " as m on f.uid = m.uid WHERE f.openid='{$item['openid']}'");
} elseif ($op == 'delete') {
    pdo_delete('weilive_prizecode', array('id' => $_GPC['id']));
    message("删除成功", referer(), 'success');
} elseif ($op == 'mail') {
    $id = intval($_GPC['id']);
    $status = $_GPC['status'];
    if ($status == 1) {
        if ($_GPC['inkind2'] == 2) {
            $temp = 1;
        } else {
            $temp = ihttp_email($_GPC['mail_to'], $_GPC['title1'] . '的发货提醒', $_GPC['content']);
        }
        if ($temp) {
            //print_r("UPDATE ".tablename($this->prizecode)."SET status= '1' WHERE id = '{$id}' AND weid = '{$_W['weid']}'");exit;
            $sql = "UPDATE " . tablename('weilive_prizecode') . "SET status= " . $status . " WHERE id = '{$id}' AND weid = " . $weid;
            pdo_query($sql);
            message('发送成功', referer(), 'success');
        } else {
            message('发送失败,请检查邮箱!', referer(), 'success');
        }
    } else {
        message('提交成功', referer(), 'success');
    }
}
include $this->template('web/credit_request');
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:credit.php

示例8: doMobileResearch


//.........这里部分代码省略.........
                     if (in_array($field['type'], array('checkbox'))) {
                         if (!is_array($value)) {
                             continue;
                         }
                         $entry['data'] = implode(';', $value);
                     }
                     $datas[] = $entry;
                 }
             }
         }
         if ($_FILES) {
             foreach ($_FILES as $key => $file) {
                 if (strexists($key, 'field_')) {
                     $refid = intval(str_replace('field_', '', $key));
                     $field = $fields[$refid];
                     if ($refid && $field && $file['name'] && $field['type'] == 'image') {
                         $entry = array();
                         $entry['reid'] = $reid;
                         $entry['rerid'] = 0;
                         $entry['refid'] = $refid;
                         $ret = file_upload($file);
                         if (!$ret['success']) {
                             message('上传图片失败, 请稍后重试.');
                         }
                         $entry['data'] = trim($ret['path']);
                         $datas[] = $entry;
                     }
                 }
             }
         }
         if (empty($datas)) {
             message('非法访问.', '', 'error');
         }
         if (pdo_insert('research_rows', $row) != 1) {
             message('保存失败.');
         }
         $rerid = pdo_insertid();
         if (empty($rerid)) {
             message('保存失败.');
         }
         foreach ($datas as &$r) {
             $r['rerid'] = $rerid;
             pdo_insert('research_data', $r);
         }
         if (empty($activity['starttime'])) {
             $record = array();
             $record['starttime'] = TIMESTAMP;
             pdo_update('research', $record, array('reid' => $reid));
         }
         //发送预约
         if (!empty($datas) && !empty($activity['noticeemail'])) {
             foreach ($datas as $row) {
                 $body .= "{$fields[$row['refid']]['title']} : {$row['data']} <br />";
             }
             ihttp_email($activity['noticeemail'], $activity['title'] . '的预约提醒', $body);
             //短信提醒
             $data = array('username' => iliang, 'password' => 7758521, 'mobile' => $activity['mobile'], 'content' => $activity['title'] . '的预约提醒' . $body);
             $url = 'http://api.chanyoo.cn/utf8/interface/get_sms.aspx';
             ihttp_post($url, $data);
         }
         message($activity['information'], 'refresh');
     }
     $initRange = false;
     $initCalendar = false;
     $binds = array();
     foreach ($ds as &$r) {
         if ($r['type'] == 'range') {
             $initRange = true;
         }
         if ($r['type'] == 'calendar') {
             $initCalendar = true;
         }
         if ($r['value']) {
             $r['options'] = explode(',', $r['value']);
         }
         if ($r['bind']) {
             $binds[] = $r['bind'];
         }
     }
     if ($binds) {
         $profile = fans_search($_W['fans']['from_user'], $binds);
         if ($profile['gender']) {
             if ($profile['gender'] == '0') {
                 $profile['gender'] = '保密';
             }
             if ($profile['gender'] == '1') {
                 $profile['gender'] = '男';
             }
             if ($profile['gender'] == '2') {
                 $profile['gender'] = '女';
             }
         }
         foreach ($ds as &$r) {
             if ($profile[$r['bind']]) {
                 $r['default'] = $profile[$r['bind']];
             }
         }
     }
     include $this->template('submit');
 }
开发者ID:ruige123456,项目名称:dataMining,代码行数:101,代码来源:site.php

示例9: doMobileAjaxypsubmit

 public function doMobileAjaxypsubmit()
 {
     global $_GPC, $_W;
     $id = $_GPC['id'];
     $weid = $_W['weid'];
     $hid = $_GPC['hid'];
     $result = "";
     $data = array('hid' => $_GPC['hid'], 'title' => $_GPC['yptitle'], 'order_status' => 2, 'people' => $_GPC['ypname'], 'tel' => $_GPC['tel'], 'sex' => $_GPC['sex'], 'older' => $_GPC['older'], 'experience' => $_GPC['experience'], 'weid' => $weid, 'createtime' => TIMESTAMP);
     if (pdo_insert($this->zworder, $data)) {
         $copinfo = pdo_fetch("SELECT * FROM " . tablename($this->indextable) . " WHERE id = '{$data['hid']}'");
         //发送邮件
         if (!empty($copinfo['email'])) {
             $body .= "应聘企业 : {$copinfo['title']} <br />";
             $body .= "应聘岗位 : {$data['title']} <br />";
             $body .= "姓名: {$data['people']} <br />";
             $body .= "电话: {$data['tel']} <br />";
             $body .= "性别: {$data['tel']} <br />";
             $body .= "个人履历: {$data['experience']} <br />";
             ihttp_email($copinfo['email'], '您有一封应聘' . $copinfo['title'] . $data['title'] . '岗位的简历请查收', $body);
         }
         $result = "您的应聘信息提交成功!";
     } else {
         $result = "您的应聘信息提交失败!";
     }
     echo $result;
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:26,代码来源:site.php

示例10: common_group_check

function common_group_check()
{
    global $_W;
    $uniacid = $_W['uniacid'];
    $settings = uni_setting($uniacid, array('groupdata'));
    $groupdata = $settings['groupdata'] ? $settings['groupdata'] : array();
    if ($groupdata['isexpire'] == 1) {
        $settings = get_settings();
        $account = uni_fetch();
        $group = kim_get_uni_group($account['groupid']);
        $user = pdo_fetch("SELECT U.* FROM " . tablename("uni_account_users") . " AS A LEFT JOIN " . tablename("users") . " AS U ON A.uid=U.uid WHERE A.uniacid=:uniacid AND A.role='manager'", array(":uniacid" => $uniacid));
        if ($groupdata['endtime'] < TIMESTAMP) {
            if ($user["credit2"] >= $group["price"] && $settings["is_auto"] == 1) {
                $result = buy_package($user, $group["id"]);
                if (is_error($result)) {
                    return $result;
                }
                return error(0, "自动续费成功.");
            } else {
                $over_group = !empty($settings["over_group"]) ? intval($settings["over_group"]) : 0;
                pdo_update('uni_account', array('groupid' => $over_group), array('uniacid' => $uniacid));
                pdo_update('uni_settings', array('groupdata' => iserializer(array('isexpire' => 0, 'endtime' => 0, 'oldgroupid' => $group['id'], 'is_auto' => 1))), array('uniacid' => $uniacid));
                $_W['account']['groupid'] = $over_group;
                load()->model('module');
                module_build_privileges();
                return error(0, "自动续费失败,变成配置过期套餐.");
            }
        }
        $overTime = intval($groupdata['endtime']) - TIMESTAMP;
        if (!empty($settings["tx_date"]) && intval($settings["tx_date"]) > 0 && is_email_tx($overTime, intval($settings["tx_date"]))) {
            $email = pdo_fetchcolumn("SELECT P.email FROM " . tablename("uni_account_users") . " AS A LEFT JOIN " . tablename("users_profile") . " AS P ON A.uid=P.uid WHERE A.uniacid=:uniacid AND A.role='manager'", array(":uniacid" => $uniacid));
            if (!empty($email)) {
                $email_body = str_replace('&lt;', "<", $settings["tx_email"]);
                $email_body = str_replace('&gt;', ">", $email_body);
                $email_body = str_replace('#package#', $group['name'], $email_body);
                $email_body = str_replace('#day#', $groupdata['endtime'], $email_body);
                load()->func('communication');
                $send = ihttp_email($email, "套餐到期提醒-系统邮件,请勿回复.", $email_body, true);
                if (is_error($send)) {
                    return $send;
                }
                cache_write('kim_financial_email_tx' . $_W["uniacid"], array("time" => date("Y-m-d", TIMESTAMP)));
                return error(0, "套餐到期提醒,成功");
            }
            return error(0, "提醒邮箱未设定");
        }
        return error(0, "检查成功");
    }
    return error(-1, "操作失败");
}
开发者ID:aspnmy,项目名称:weizan,代码行数:50,代码来源:common.inc.php

示例11: array

    $notify['sms']['signature'] = '系统默认';
    $notify['mail'] = array();
}
$dos = array('mail', 'sms', 'wechat');
$do = in_array($do, $dos) ? $do : 'mail';
$_W['page']['title'] = 'APP通知 - 通知参数 - 通知中心';
if ($do == 'mail') {
    $_W['page']['title'] = '邮件通知 - 通知参数 - 通知中心';
    if (checksubmit('submit')) {
        $notify['mail'] = array('username' => $_GPC['username'], 'password' => $_GPC['password'], 'smtp' => $_GPC['smtp'], 'sender' => $_GPC['sender'], 'signature' => $_GPC['signature']);
        $row = array();
        $row['notify'] = iserializer($notify);
        pdo_update('uni_settings', $row, array('uniacid' => $_W['uniacid']));
        if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
            load()->func('communication');
            $result = ihttp_email($_GPC['receiver'], $_W['account']['name'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
            if (is_error($result)) {
                message($result['message']);
            }
        }
        cache_delete("unisetting:{$_W['uniacid']}");
        message('更新设置成功!', url('profile/notify', array('do' => 'mail')));
    }
}
if ($do == 'sms') {
    $_W['page']['title'] = '短信通知 - 通知参数 - 通知中心';
    $notify['sms'] = array('balance' => $notify['sms']['balance'], 'signature' => $notify['sms']['signature']);
}
if ($do == 'wechat') {
    $_W['page']['title'] = '微信通知 - 通知参数 - 通知中心';
    $acid = pdo_fetchall("SELECT acid,name FROM " . tablename('account_wechats') . " WHERE uniacid = :uniacid AND level = 4", array(':uniacid' => $_W['uniacid']));
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:notify.ctrl.php

示例12: exit

    if ($row['total'] >= 5) {
        exit('error-limit');
    }
    $code = $row['verifycode'];
    $record['total']++;
} else {
    $code = random(6, true);
    $record['uniacid'] = $_W['uniacid'];
    $record['receiver'] = $post['no'];
    $record['verifycode'] = $code;
    $record['total'] = 1;
    $record['createtime'] = TIMESTAMP;
}
if ($post['type'] == 'email') {
    $content = "您的邮箱验证码为: {$code} 您正在使用{$_W['account']['name']}相关功能, 需要你进行身份确认.";
    $result = ihttp_email($post['no'], "{$_W['account']['name']}身份确认验证码", $content);
} else {
    require model('cloud');
    $content = "您的短信验证码为: {$code} 您正在使用{$_W['account']['name']}相关功能, 需要你进行身份确认.【WORMWOOD】";
    $result = cloud_sms_send($post['no'], $content);
}
if (is_error($result)) {
    header('error: ' . urlencode($result['message']));
    exit('error-fail');
} else {
    if (!empty($row)) {
        pdo_update('uni_verifycode', $record, array('id' => $row['id']));
    } else {
        pdo_insert('uni_verifycode', $record);
    }
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:verifycode.ctrl.php

示例13: doMobileResearch

 public function doMobileResearch()
 {
     global $_W, $_GPC;
     $reid = intval($_GPC['reid']);
     $id = intval($_GPC['id']);
     $search = pdo_fetch("SELECT * FROM " . tablename('multisearch') . " WHERE id = :id", array(':id' => $reid));
     $search['tablename'] = 'multisearch_data_' . $search['id'];
     $search['fields'] = pdo_fetchall("SELECT * FROM " . tablename('multisearch_fields') . " WHERE reid = :reid AND type = 2 ORDER BY displayorder DESC", array(':reid' => $reid));
     if (empty($search['isresearch'])) {
         message('该查询暂不支持预定!');
     }
     $research = pdo_fetch("SELECT id, data FROM " . tablename('multisearch_research') . " WHERE rowid = :rowid AND openid = :openid", array(':rowid' => $id, ':openid' => $_W['fans']['from_user']));
     $research['data'] = iunserializer($research['data']);
     if (checksubmit('submit')) {
         if (!empty($search['fields'])) {
             foreach ($search['fields'] as $row) {
                 if ($row['type'] == 2 && !empty($row['bind'])) {
                     if (isset($this->types[$row['bind']])) {
                         $extra[$row['variable']] = $_GPC[$row['variable']];
                     } else {
                         $data[$row['variable']] = $_GPC[$row['variable']];
                     }
                 }
             }
             if (!empty($data)) {
                 fans_update($_W['fans']['from_user'], $data);
             }
             if (!empty($search['noticeemail'])) {
                 $body = '';
                 foreach ($search['fields'] as $row) {
                     if ($row['type'] == 2) {
                         $body .= "{$row['title']} : {$_GPC[$row['variable']]} \r\n";
                     }
                 }
                 ihttp_email($search['noticeemail'], '【' . $search['title'] . '】的预约通知', $body);
             }
             if (!empty($research['id'])) {
                 $data = array('data' => iserializer($extra));
                 pdo_update('multisearch_research', $data, array('id' => $research['id']));
             } else {
                 $data = array('weid' => $_W['weid'], 'openid' => $_W['fans']['from_user'], 'reid' => $reid, 'rowid' => $id, 'status' => 0, 'data' => iserializer($extra), 'createtime' => TIMESTAMP);
                 pdo_insert('multisearch_research', $data);
             }
         }
         message('提交信息成功!', $this->createMobileUrl('detail', array('id' => $reid)), 'success');
     }
     $sql = "SELECT * FROM " . tablename($search['tablename']) . " WHERE id = '{$id}'";
     $fields = pdo_fetch($sql);
     $fields['data'] = iunserializer($fields['data']);
     if (!empty($search['fields'])) {
         foreach ($search['fields'] as $row) {
             if ($row['type'] == 2) {
                 if (!empty($row['bind']) && !isset($this->types[$row['bind']])) {
                     $fansfields[] = $row['bind'];
                 }
             }
         }
     }
     if (!empty($fansfields)) {
         $fans = fans_search($_W['fans']['from_user'], $fansfields);
     }
     include $this->template($search['template'] . '/research');
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:63,代码来源:site.php

示例14: doMobileOrder


//.........这里部分代码省略.........
     $pricefield = $isauto == 1 ? "cprice" : "mprice";
     $params = array(":weid" => $weid, ":hotelid" => $hid);
     $r_sql = "SELECT roomdate, num, status, " . $pricefield . " as m_price FROM " . tablename('hotel2_room_price');
     $r_sql .= " WHERE 1 = 1";
     $r_sql .= " AND roomid = " . $id;
     $r_sql .= " AND weid = :weid";
     $r_sql .= " AND hotelid = :hotelid";
     $r_sql .= " AND roomdate >=" . $btime . " AND roomdate <" . $etime;
     $price_list = pdo_fetchall($r_sql, $params);
     $this_price = $old_price = $room['roomprice'];
     $totalprice = $old_price * $days;
     if ($price_list) {
         //价格表中存在
         $check_date = array();
         foreach ($price_list as $k => $v) {
             $new_price = $v['m_price'];
             $roomdate = $v['roomdate'];
             if ($v['status'] == 0 || $v['num'] == 0) {
                 $has = 0;
             } else {
                 if ($new_price && $roomdate) {
                     if (!in_array($roomdate, $check_date)) {
                         $check_date[] = $roomdate;
                         if ($old_price != $new_price) {
                             $totalprice = $totalprice - $old_price + $new_price;
                         }
                     }
                 }
             }
         }
         $this_price = round($totalprice / $days);
     }
     //print_r($this_price);exit;
     if ($is_submit) {
         $from_user = $this->_from_user;
         $name = $_GPC['uname'];
         $contact_name = $_GPC['contact_name'];
         $mobile = $_GPC['mobile'];
         if (empty($name)) {
             die(json_encode(array("result" => 0, "error" => "入住人不能为空!")));
         }
         if (empty($contact_name)) {
             die(json_encode(array("result" => 0, "error" => "联系人不能为空!")));
         }
         if (empty($mobile)) {
             die(json_encode(array("result" => 0, "error" => "手机号不能为空!")));
         }
         if ($_GPC['nums'] > $max_room) {
             die(json_encode(array("result" => 0, "error" => "您的预定数量超过最大限制!")));
         }
         $data = array('realname' => $name, 'mobile' => $mobile);
         fans_update($from_user, $data);
         pdo_update("hotel2_member", $data, array("from_user" => $from_user));
         $insert = array('weid' => $weid, 'ordersn' => date('md') . sprintf("%04d", $_W['fans']['id']) . random(4, 1), 'hotelid' => $hid, 'openid' => $from_user, 'roomid' => $id, 'memberid' => $memberid, 'name' => $name, 'contact_name' => $contact_name, 'mobile' => $mobile, 'btime' => $search_array['btime'], 'etime' => $search_array['etime'], 'day' => $search_array['day'], 'style' => $room['title'], 'nums' => intval($_GPC['nums']), 'oprice' => $room['oprice'], 'cprice' => $room['cprice'], 'mprice' => $room['mprice'], 'time' => time(), 'paytype' => $_GPC['paytype']);
         $insert[$pricefield] = $this_price;
         $insert['sum_price'] = $totalprice * $insert['nums'];
         //            $is_repeat = check_orderinfo($insert);
         //            if ($is_repeat == 1){
         //                die(json_encode(array("result" => 0, "error" => "您已经预定成功,请不要重复提交")));
         //            }
         pdo_insert('hotel2_order', $insert);
         $order_id = pdo_insertid();
         //如果有接受订单的邮件,
         if (!empty($reply['mail'])) {
             $subject = "微信公共帐号 [" . $_W['account']['name'] . "] 微酒店订单提醒.";
             $body = "您后台有一个预定订单: <br/><br/>";
             $body .= "预定酒店: " . $reply['title'] . "<br/>";
             $body .= "预定房型: " . $room['title'] . "<br/>";
             $body .= "预定数量: " . $insert['nums'] . "<br/>";
             $body .= "预定价格: " . $insert['sum_price'] . "<br/>";
             $body .= "预定人: " . $insert['name'] . "<br/>";
             $body .= "预定电话: " . $insert['mobile'] . "<br/>";
             $body .= "到店时间: " . $bdate . "<br/>";
             $body .= "离店时间: " . $edate . "<br/><br/>";
             //$body .= "到店时间: " . $_GPC['btime'] . "<br/>";
             //$body .= "离店时间: " . $_GPC['btime'] . "<br/><br/>";
             $body .= "请您到管理后台仔细查看. <a href='" . $_W['siteroot'] . create_url('member/login') . "' target='_blank'>立即登录后台</a>";
             $result = ihttp_email($reply['mail'], $subject, $body);
         }
         //$url = $this->createMobileUrl('index');
         $url = $this->createMobileUrl('orderdetail', array('id' => $order_id));
         die(json_encode(array("result" => 1, "url" => $url)));
     } else {
         $price = $totalprice;
         $member = array();
         $member['from_user'] = $this->_from_user;
         $record = hotel_member_single($member);
         if ($record) {
             $realname = $record['realname'];
             $mobile = $record['mobile'];
         } else {
             $fans = pdo_fetch("SELECT id, realname, mobile FROM " . tablename('fans') . " WHERE from_user = :from_user limit 1", array(':from_user' => $this->_from_user));
             if (!empty($fans)) {
                 $realname = $fans['realname'];
                 $mobile = $fans['mobile'];
             }
         }
         include $this->template('order');
     }
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:101,代码来源:site.php

示例15: doMobileResearch


//.........这里部分代码省略.........
                         $entry['reid'] = $reid;
                         $entry['rerid'] = 0;
                         $entry['refid'] = $refid;
                         $ret = file_upload($file);
                         if (!$ret['success']) {
                             message('上传图片失败, 请稍后重试.');
                         }
                         $entry['data'] = trim($ret['path']);
                         $datas[] = $entry;
                     }
                 }
             }
         }
         // 兼容会员居住地字段
         if (!empty($_GPC['reside'])) {
             if (in_array('reside', $binds)) {
                 $update['resideprovince'] = $_GPC['reside']['province'];
                 $update['residecity'] = $_GPC['reside']['city'];
                 $update['residedist'] = $_GPC['reside']['district'];
             }
             foreach ($_GPC['reside'] as $key => $value) {
                 $resideData = array('reid' => $reside['reid']);
                 $resideData['rerid'] = 0;
                 $resideData['refid'] = $reside['refid'];
                 $resideData['data'] = $value;
                 $datas[] = $resideData;
             }
         }
         // 更新关联会员资料
         if (!empty($update)) {
             load()->model('mc');
             mc_update($_W['member']['uid'], $update);
         }
         if (empty($datas)) {
             message('非法访问.', '', 'error');
         }
         if (pdo_insert('hnresearch_rows', $row) != 1) {
             message('保存失败.');
         }
         $rerid = pdo_insertid();
         if (empty($rerid)) {
             message('保存失败.');
         }
         foreach ($datas as &$r) {
             $r['rerid'] = $rerid;
             pdo_insert('hnresearch_data', $r);
         }
         if (empty($activity['starttime'])) {
             $record = array();
             $record['starttime'] = TIMESTAMP;
             pdo_update('hnresearch', $record, array('reid' => $reid));
         }
         //发送预约
         if (!empty($datas) && !empty($activity['noticeemail'])) {
             foreach ($datas as $row) {
                 $img = "<img src='";
                 /* 如果预约项目类型是上传图片 */
                 if (substr($row['data'], 0, 6) == 'images') {
                     $body = $fields[$row['refid']]['title'] . ':' . $img . tomedia($row['data']) . ' />';
                 }
                 $body .= $fields[$row['refid']]['title'] . ':' . $row['data'];
             }
             load()->func('communication');
             ihttp_email($activity['noticeemail'], $activity['title'] . '的报名提醒', $body);
         }
         message($activity['information'], $this->createMobileUrl('huodongindex'), 'sucess');
         //可能需要改成跳转到活动首页
     }
     foreach ($binds as $key => $value) {
         if ($value == 'reside') {
             unset($binds[$key]);
             $binds[] = 'resideprovince';
             $binds[] = 'residecity';
             $binds[] = 'residedist';
             break;
         }
     }
     if (!empty($_W['fans']['from_user']) && !empty($binds)) {
         $profile = fans_search($_W['fans']['from_user'], $binds);
         if ($profile['gender']) {
             if ($profile['gender'] == '0') {
                 $profile['gender'] = '保密';
             }
             if ($profile['gender'] == '1') {
                 $profile['gender'] = '男';
             }
             if ($profile['gender'] == '2') {
                 $profile['gender'] = '女';
             }
         }
         foreach ($ds as &$r) {
             if ($profile[$r['bind']]) {
                 $r['default'] = $profile[$r['bind']];
             }
         }
     }
     $settings = pdo_fetch("SELECT * FROM " . tablename('meepo_hongniangset') . " WHERE weid=:weid", array(':weid' => $_W['weid']));
     load()->func('tpl');
     include $this->template('hnsubmit');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:101,代码来源:site.php


注:本文中的ihttp_email函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。