• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_mail函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: find_email

 /**
  * 显示文本框及处理提交的用户信息
  *
  */
 function find_email()
 {
     if (!IS_POST) {
         header("location:/index.php");
     } else {
         $addr = $_SERVER['HTTP_REFERER'];
         if (empty($_POST['email'])) {
             $this->show_warning("unsettled_required", 'go_back', $addr);
             return;
         }
         $email = trim($_POST['email']);
         $model_user =& m('member');
         $info = $model_user->get("email='{$email}'");
         if (empty($info) || $info['email'] != $email) {
             $this->show_warning('not_exist', 'go_back', $addr);
             return;
         }
         $word = $this->_rand();
         $md5word = md5($word);
         $res = $this->_password_mod->get($info['user_id']);
         if (empty($res)) {
             $info['activation'] = $md5word;
             $this->_password_mod->add($info);
         } else {
             $this->_password_mod->edit($info['user_id'], array('activation' => "{$md5word}"));
         }
         $mail = get_mail('touser_find_password', array('user' => $info, 'word' => $word));
         $this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
         $this->json_result();
         return;
     }
 }
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:36,代码来源:find_password.app.php


示例2: index

 /**
  * 显示文本框及处理提交的用户信息
  *
  */
 function index()
 {
     if (!IS_POST) {
         $this->import_resource('jquery.plugins/jquery.validate.js');
         $this->display("find_password.html");
     } else {
         $addr = $_SERVER['HTTP_REFERER'];
         if (empty($_POST['username']) || empty($_POST['email']) || empty($_POST['captcha'])) {
             $this->show_warning("unsettled_required", 'go_back', $addr);
             return;
         }
         if (base64_decode($_SESSION['captcha']) != strtolower($_POST['captcha'])) {
             $this->show_warning("captcha_faild", 'go_back', $addr);
             return;
         }
         $username = trim($_POST['username']);
         $email = trim($_POST['email']);
         /* 简单验证是否是该用户 */
         $ms =& ms();
         //连接用户系统
         $info = $ms->user->get($username, true);
         if (empty($info) || $info['email'] != $email) {
             $this->show_warning('not_exist', 'go_back', $addr);
             return;
         }
         $word = $this->_rand();
         $md5word = md5($word);
         $res = $this->_password_mod->get($info['user_id']);
         if (empty($res)) {
             $info['activation'] = $md5word;
             $this->_password_mod->add($info);
         } else {
             $this->_password_mod->edit($info['user_id'], array('activation' => "{$md5word}"));
         }
         $mail = get_mail('touser_find_password', array('user' => $info, 'word' => $word));
         $this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
         $this->show_message("sendmail_success", 'back_index', 'index.php');
         return;
     }
 }
开发者ID:GavinLai,项目名称:ecmall,代码行数:44,代码来源:find_password.app.php


示例3: notify

 /**
  *    支付完成后,外部网关的通知地址,在此会进行订单状态的改变,这里严格验证,改变订单状态
  *
  *    @author    Garbin
  *    @return    void
  */
 function notify()
 {
     //这里是支付宝,财付通等当订单状态改变时的通知地址
     $order_id = 0;
     if (isset($_POST['order_id'])) {
         $order_id = intval($_POST['order_id']);
     } else {
         $order_id = intval($_GET['order_id']);
     }
     if (!$order_id) {
         /* 无效的通知请求 */
         $this->show_warning('no_such_order');
         return;
     }
     /* 获取订单信息 */
     $model_order =& m('order');
     $order_info = $model_order->get($order_id);
     if (empty($order_info)) {
         /* 没有该订单 */
         $this->show_warning('no_such_order');
         return;
     }
     $model_payment =& m('payment');
     $payment_info = $model_payment->get("payment_code='{$order_info['payment_code']}' AND store_id={$order_info['seller_id']}");
     if (empty($payment_info)) {
         /* 没有指定的支付方式 */
         $this->show_warning('no_such_payment');
         return;
     }
     /* 调用相应的支付方式 */
     $payment = $this->_get_payment($order_info['payment_code'], $payment_info);
     /* 获取验证结果 */
     $notify_result = $payment->verify_notify($order_info, true);
     if ($notify_result === false) {
         /* 支付失败 */
         $payment->verify_result(false);
         return;
     }
     //改变订单状态
     $this->_change_order_status($order_id, $order_info['extension'], $notify_result);
     $payment->verify_result(true);
     if ($notify_result['target'] == ORDER_ACCEPTED) {
         /* 发送邮件给卖家,提醒付款成功 */
         $model_member =& m('member');
         $seller_info = $model_member->get($order_info['seller_id']);
         $mail = get_mail('toseller_online_pay_success_notify', array('order' => $order_info));
         $this->_mailto($seller_info['email'], addslashes($mail['subject']), addslashes($mail['message']));
         /* 同步发送 */
         $this->_sendmail(true);
     }
 }
开发者ID:woolh,项目名称:Online,代码行数:57,代码来源:paynotify.app.php


示例4: get_mail

                    <li><a class='logout' href='includes/logout.php'>Log ud</a></li>
                </ul>
            </div>
        </div>

    <div id="main">
        <div class="header">
            <h1>Administrator side</h1>
        </div>

        <div class="content">
            <p>

            Her kan du vælge en ny email adresse, hvor alle emails i kontakt vil blive sendt til.<br>
            Den nuværende email er: <?php 
        echo get_mail($mysqli);
        ?>
<br><br>
            Indtast den nye email adresse, hvis du ønsker at ændre den:<br>
                <form class="pure-form pure-form-stacked" method="POST" action="<?php 
        echo $_SERVER["PHP_SELF"];
        ?>
">
                    <div>
                        <label for="newemail"></label>
                        <input id ="newemail" type="string" name="newemail"/><br>
                        <input class="btn left" name="email" type="submit" value="Godkend"> 
                    </div>
                </form>

                <?php 
开发者ID:michgor26,项目名称:Project,代码行数:31,代码来源:administrator.php


示例5: finished

 /**
  *    完成交易(货到付款的订单)
  *
  *    @author    Garbin
  *    @return    void
  */
 function finished()
 {
     list($order_id, $order_info) = $this->_get_valid_order_info(ORDER_SHIPPED, 'payment_code=\'cod\'');
     if (!$order_id) {
         echo Lang::get('no_such_order');
         return;
     }
     if (!IS_POST) {
         header('Content-Type:text/html;charset=' . CHARSET);
         /* 当前用户中心菜单 */
         $this->_curitem('seller_order');
         /* 当前所处子菜单 */
         $this->_curmenu('finished');
         $this->assign('_curmenu', 'finished');
         $this->assign('order', $order_info);
         $this->display('seller_order.finished.html');
     } else {
         $now = gmtime();
         $model_order =& m('order');
         $model_order->edit($order_id, array('status' => ORDER_FINISHED, 'pay_time' => $now, 'finished_time' => $now));
         if ($model_order->has_error()) {
             $this->pop_warning($model_order->get_error());
             return;
         }
         /* 记录订单操作日志 */
         $order_log =& m('orderlog');
         $order_log->add(array('order_id' => $order_id, 'operator' => addslashes($this->visitor->get('user_name')), 'order_status' => order_status($order_info['status']), 'changed_status' => order_status(ORDER_FINISHED), 'remark' => $_POST['remark'], 'log_time' => gmtime()));
         /* 更新累计销售件数 */
         $model_goodsstatistics =& m('goodsstatistics');
         $model_ordergoods =& m('ordergoods');
         $order_goods = $model_ordergoods->find("order_id={$order_id}");
         foreach ($order_goods as $goods) {
             $model_goodsstatistics->edit($goods['goods_id'], "sales=sales+{$goods['quantity']}");
         }
         /* 发送给买家交易完成通知,提示评论 */
         $model_member =& m('member');
         $buyer_info = $model_member->get($order_info['buyer_id']);
         $mail = get_mail('tobuyer_cod_order_finish_notify', array('order' => $order_info));
         $this->_mailto($buyer_info['email'], addslashes($mail['subject']), addslashes($mail['message']));
         $new_data = array('status' => Lang::get('order_finished'), 'actions' => array());
         $this->pop_warning('ok');
     }
 }
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:49,代码来源:seller_order.app.php


示例6: reply

 function reply()
 {
     if (!IS_POST) {
         $ques_id = isset($_GET['ques_id']) && $_GET['ques_id'] != '' ? intval($_GET['ques_id']) : 0;
         $conditions = ' AND goods_qa.store_id = ' . $_SESSION['user_info']['user_id'] . ' AND ques_id = ' . $ques_id;
         $my_qa_data = $this->my_qa_mod->get(array('fields' => 'question_content,reply_content,goods_qa.user_id,goods_qa.email,time_post,user_name,goods_qa.goods_id,goods_name', 'join' => 'belongs_to_store,belongs_to_user,belongs_to_goods', 'conditions' => '1=1 ' . $conditions));
         if ($my_qa_data['reply_content'] != '') {
             $this->show_warning('already_replied');
             return;
         }
         /* 当前位置 */
         $this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_qa'), 'index.php?app=my_qa', LANG::get('reply'));
         /* 当前用户中心菜单 */
         $this->_curitem('my_qa');
         /* 当前所处子菜单 */
         $this->_curmenu('reply');
         $this->assign('_curmenu', 'reply');
         $this->assign('page_info', $page);
         $this->assign('my_qa_data', $my_qa_data);
         $this->assign('page_title', Lang::get('member_center') . ' - ' . Lang::get('reply'));
         header('Content-Type:text/html;charset=' . CHARSET);
         $this->display('my_qa.form.html');
     } else {
         $act = isset($_POST['act']) && $_POST['act'] != '' ? trim($_POST['act']) : '';
         $ques_id = isset($_POST['ques_id']) && $_POST['ques_id'] != '' ? intval($_POST['ques_id']) : '';
         $content = isset($_POST['content']) && $_POST['content'] != '' ? trim($_POST['content']) : '';
         if ($act != 'reply' || $ques_id == '') {
             $this->show_warning('Hacking Attempt');
             return;
         }
         if ($content == '') {
             $this->show_warning('content_not_null');
             return;
         }
         $user_info = $this->my_qa_mod->get(array('join' => 'belongs_to_goods', 'conditions' => '1 = 1 AND ques_id = ' . $ques_id, 'fields' => 'user_id,email,g.goods_id,goods_name'));
         extract($user_info);
         $data = array('reply_content' => $content, 'time_reply' => gmtime(), 'if_new' => '1');
         if ($this->my_qa_mod->edit($ques_id, $data)) {
             $this->pop_warning('ok', 'my_qa_reply');
             $mail = get_mail('tobuyer_question_replied', array('id' => $goods_id, 'ques_id' => $ques_id, 'goods_name' => $goods_name));
             $this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
         } else {
             $this->pop_warning('reply_failed');
             return;
         }
     }
 }
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:47,代码来源:my_qa.app.php


示例7: edit

 function edit()
 {
     import('image.func');
     import('uploader.lib');
     $id = empty($_GET['id']) ? 0 : intval($_GET['id']);
     if (!IS_POST) {
         /* 传给iframe id */
         $this->assign('id', $id);
         $this->assign('belong', BELONG_GOODS);
         if (!$id || !($goods = $this->_get_goods_info($id))) {
             $this->show_warning('no_such_goods');
             return;
         }
         $goods['tags'] = trim($goods['tags'], ',');
         $this->assign('goods', $goods);
         /* 取到商品关联的图片 */
         $uploadedfiles = $this->_uploadedfile_mod->find(array('fields' => "f.*,goods_image.*", 'conditions' => "store_id=" . $this->_store_id . " AND belong=" . BELONG_GOODS . " AND item_id=" . $id, 'join' => 'belongs_to_goodsimage', 'order' => 'add_time ASC'));
         $default_goods_images = array();
         // 默认商品图片
         $other_goods_images = array();
         // 其他商品图片
         $desc_images = array();
         // 描述图片
         $recommend_image = array();
         //推荐图片
         /*if (!empty($goods['default_image']))
           {
                  $goods_images
           }*/
         foreach ($uploadedfiles as $key => $uploadedfile) {
             if ($uploadedfile['instance'] == 'recommend_image') {
                 $recommend_image = $uploadedfile;
             } else {
                 if ($uploadedfile['goods_id'] == null) {
                     $desc_images[$key] = $uploadedfile;
                 } else {
                     if (!empty($goods['default_image']) && $uploadedfile['thumbnail'] == $goods['default_image']) {
                         $default_goods_images[$key] = $uploadedfile;
                     } else {
                         $other_goods_images[$key] = $uploadedfile;
                     }
                 }
             }
         }
         $this->assign('goods_images', array_merge($default_goods_images, $other_goods_images));
         $this->assign('desc_images', $desc_images);
         $this->assign('recommend_image', $recommend_image);
         /* 取得商品分类 */
         $this->assign('mgcategories', $this->_get_mgcategory_options(0));
         // 商城分类第一级
         $this->assign('sgcategories', $this->_get_sgcategory_options());
         // 店铺分类
         //取得地区信息
         $region_mod =& m('region');
         $this->assign('regions', $region_mod->get_options(0));
         /* 当前页面信息 */
         $this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_goods'), 'index.php?app=my_goods', LANG::get('goods_list'));
         $this->_curitem('my_goods');
         $this->_curmenu('edit_goods');
         $this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('edit_goods'));
         $this->import_resource(array('script' => array(array('path' => 'mlselection.js', 'attr' => 'charset="utf-8"'), array('path' => 'jquery.plugins/jquery.validate.js', 'attr' => 'charset="utf-8"'), array('path' => 'jquery.ui/jquery.ui.js', 'attr' => 'charset="utf-8"'), array('path' => 'my_goods.js', 'attr' => 'charset="utf-8"'), array('attr' => 'id="dialog_js" charset="utf-8"', 'path' => 'dialog/dialog.js')), 'style' => 'jquery.ui/themes/ui-lightness/jquery.ui.css'));
         /* 商品图片批量上传器 */
         $this->assign('images_upload', $this->_build_upload(array('obj' => 'GOODS_SWFU', 'belong' => BELONG_GOODS, 'item_id' => $id, 'button_text' => Lang::get('bat_upload'), 'progress_id' => 'goods_upload_progress', 'upload_url' => 'index.php?app=swfupload&instance=goods_image', 'if_multirow' => 1)));
         /* 编辑器图片批量上传器 */
         $this->assign('editor_upload', $this->_build_upload(array('obj' => 'EDITOR_SWFU', 'belong' => BELONG_GOODS, 'item_id' => $id, 'button_text' => Lang::get('bat_upload'), 'button_id' => 'editor_upload_button', 'progress_id' => 'editor_upload_progress', 'upload_url' => 'index.php?app=swfupload&instance=desc_image', 'if_multirow' => 1, 'ext_js' => false, 'ext_css' => false)));
         /* 所见即所得编辑器 */
         extract($this->_get_theme());
         $this->assign('build_editor', $this->_build_editor(array('name' => 'description', 'content_css' => SITE_URL . "/themes/store/{$template_name}/styles/{$style_name}" . '/shop.css')));
         $this->display('my_goods.form.html');
     } else {
         /* 取得数据 */
         $data = $this->_get_post_data($id);
         $stock =& m("stock");
         $notice_email = $stock->find(array('join' => 'be_stock', 'fields' => 'email,sp_id,goods_id', 'conditions' => 'st.goods_id = ' . $id));
         if ($notice_email) {
             foreach ($data['specs'] as $spec_id => $val) {
                 if ($val['stock'] > 0) {
                     foreach ($notice_email as $sid => $email) {
                         if ($email['sp_id'] == $spec_id) {
                             $mail = get_mail('tobuyer_goods_notice_notify_desc', array('email' => $email));
                             //获取邮件模板,到货通知
                             $this->_mailto($email['email'], addslashes($mail['subject']), addslashes($mail['message']));
                             //发送邮件
                             $stock->drop($sid);
                         }
                     }
                 }
             }
         }
         /* 检查数据 */
         if (!$this->_check_post_data($data, $id)) {
             $this->show_warning($this->get_error());
             return;
         }
         /* 保存商品 */
         if (!$this->_save_post_data($data, $id)) {
             $this->show_warning($this->get_error());
             return;
         }
         $this->show_message('edit_ok', 'back_list', 'index.php?app=my_goods', 'edit_again', 'index.php?app=my_goods&amp;act=edit&amp;id=' . $id);
//.........这里部分代码省略.........
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:101,代码来源:my_goods.app.php


示例8: confirm_order

 /**
  *    确认订单
  *
  *    @author    Garbin
  *    @return    void
  */
 function confirm_order()
 {
     $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
     if (!$order_id) {
         echo Lang::get('no_such_order');
         return;
     }
     $model_order =& m('order');
     /* 只有已发货的订单可以确认 */
     $order_info = $model_order->get("order_id={$order_id} AND buyer_id=" . $this->visitor->get('user_id') . " AND status=" . ORDER_SHIPPED);
     if (empty($order_info)) {
         echo Lang::get('no_such_order');
         return;
     }
     if (!IS_POST) {
         header('Content-Type:text/html;charset=' . CHARSET);
         $this->assign('order', $order_info);
         $this->display('buyer_order.confirm.html');
     } else {
         $model_order->edit($order_id, array('status' => ORDER_FINISHED, 'finished_time' => gmtime()));
         if ($model_order->has_error()) {
             $this->pop_warning($model_order->get_error());
             return;
         }
         /* 记录订单操作日志 */
         $order_log =& m('orderlog');
         $order_log->add(array('order_id' => $order_id, 'operator' => addslashes($this->visitor->get('user_name')), 'order_status' => order_status($order_info['status']), 'changed_status' => order_status(ORDER_FINISHED), 'remark' => Lang::get('buyer_confirm'), 'log_time' => gmtime()));
         /* 发送给卖家买家确认收货邮件,交易完成 */
         $model_member =& m('member');
         $seller_info = $model_member->get($order_info['seller_id']);
         $mail = get_mail('toseller_finish_notify', array('order' => $order_info));
         $this->_mailto($seller_info['email'], addslashes($mail['subject']), addslashes($mail['message']));
         $new_data = array('status' => Lang::get('order_finished'), 'actions' => array('evaluate'));
         /* 更新累计销售件数 */
         $model_goodsstatistics =& m('goodsstatistics');
         $model_ordergoods =& m('ordergoods');
         $order_goods = $model_ordergoods->find("order_id={$order_id}");
         foreach ($order_goods as $goods) {
             $model_goodsstatistics->edit($goods['goods_id'], "sales=sales+{$goods['quantity']}");
         }
         $this->pop_warning('ok', '', 'index.php?app=buyer_order&act=evaluate&order_id=' . $order_id);
     }
 }
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:49,代码来源:buyer_order.app.php


示例9: shipped

 /**
  *    待发货的订单发货
  *
  *    @author    Garbin
  *    @return    void
  */
 function shipped()
 {
     list($order_id, $order_info) = $this->_get_valid_order_info(array(ORDER_ACCEPTED, ORDER_SHIPPED));
     if (!$order_id) {
         echo Lang::get('no_such_order');
         return;
     }
     $model_order =& m('order');
     if (!IS_POST) {
         /* 显示发货表单 */
         header('Content-Type:text/html;charset=' . CHARSET);
         $this->assign('order', $order_info);
         $this->display('fahuo.shipped.html');
     } else {
         if (!$_POST['invoice_no']) {
             $this->show_warning('invoice_no_empty');
             return;
         }
         if (!$_POST['shipping_name']) {
             $this->show_warning('物流方式不存在');
             return;
         }
         $edit_data = array('status' => ORDER_SHIPPED, 'invoice_no' => $_POST['invoice_no'], 'shipping_name' => $_POST['shipping_name']);
         $is_edit = true;
         if (empty($order_info['invoice_no'])) {
             /* 不是修改发货单号 */
             $edit_data['ship_time'] = gmtime();
             $is_edit = false;
         }
         $model_order->edit(intval($order_id), $edit_data);
         if ($model_order->has_error()) {
             $this->show_warning($model_order->get_error());
             return;
         }
         #TODO 发邮件通知
         /* 记录订单操作日志 */
         $order_log =& m('orderlog');
         $order_log->add(array('order_id' => $order_id, 'operator' => addslashes($this->visitor->get('user_name')), 'order_status' => order_status($order_info['status']), 'changed_status' => order_status(ORDER_SHIPPED), 'remark' => $_POST['remark'], 'log_time' => gmtime()));
         /* 发送给买家订单已发货通知 */
         $model_member =& m('member');
         $buyer_info = $model_member->get($order_info['buyer_id']);
         $order_info['invoice_no'] = $edit_data['invoice_no'];
         $mail = get_mail('tobuyer_shipped_notify', array('order' => $order_info));
         $this->_mailto($buyer_info['email'], addslashes($mail['subject']), addslashes($mail['message']));
         $new_data = array('status' => Lang::get('order_shipped'), 'actions' => array('cancel', 'edit_invoice_no'));
         if ($order_info['payment_code'] == 'cod') {
             $new_data['actions'][] = 'finish';
         }
         $this->show_message('发货成功', 'back_list', 'index.php?app=fahuo');
     }
 }
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:57,代码来源:fahuo.app.php


示例10: count

?>
                </span>
                </a>
                <ul class="dropdown-menu">
                    <li class="dropdown-header clearfix">
                        <p class="pull-left">
                            You have <?php 
echo count(get_mail()["inbox"]);
?>
 Messages
                        </p>
                    </li>
                    <li class="dropdown-body">
                        <ul class="dropdown-menu-list withScroll">
                            <?php 
$mails = get_mail()["inbox"];
?>
                            <?php 
foreach ($mails as $mail) {
    ?>
                                <li class="clearfix">
                                    <a href="<?php 
    echo site_url();
    ?>
inbox/show/<?php 
    echo $mail['id'];
    ?>
.html">
                                        <div>
                                            <strong><?php 
    echo substr($mail['subject'], 0, 30);
开发者ID:anggadarkprince,项目名称:surat-web,代码行数:31,代码来源:header.php


示例11: session_start

<?php

session_start();
include "inc/connect.php";
include "inc/functions.php";
if (!$_SESSION && !$_SESSION['user'] == "admin") {
    header('Location: index.php');
}
$all_mail = get_mail($connexion);
if ($_POST) {
    $add_id = nettoyage($_POST['id']);
    $add_mail = nettoyage($_POST['mail']);
    $add_date = nettoyage($_POST['date']);
    $add_privilege = nettoyage($_POST['privilege']);
    $result = update_mail($connexion, $add_id, $add_mail, $add_date, $add_privilege);
    header('Refresh: 2; URL=platform.php');
}
include 'inc/template/header.php';
include 'inc/template/admin_page.php';
include 'inc/template/footer.php';
开发者ID:timserck,项目名称:newsletter,代码行数:20,代码来源:platform.php


示例12: index


//.........这里部分代码省略.........
             }
             $goods_info['total'] += $yun + $goods_info['subtotal'];
             //计算总价格
         }
         //如果有的默认的收货地址
         $this->assign('yunfei', $yun);
         $this->assign('goods_info', $goods_info);
         $this->assign($form['data']);
         if (is_wap()) {
             $this->assign("title", "确认订单");
         }
         $this->display($form['template']);
     } else {
         $_POST['postscript'] = array_combine($_POST['order_id'], $_POST['order_message']);
         //卖家的备忘录
         if ($goods_info === false) {
             /* 购物车是空的 */
             $this->show_no();
             return;
         }
         /* 根据商品类型获取对应的订单类型 */
         $goods_type =& gt($goods_info['type']);
         $order_type =& ot($goods_info['otype']);
         $form = $order_type->get_order_form2($stores_id, 0);
         /* 将这些信息传递给订单类型处理类生成订单(你根据我提供的信息生成一张订单) */
         $order_id = $order_type->submit_order(array('goods_info' => $goods_info, 'post' => $_POST, 'form' => $form));
         if (!$order_id) {
             $this->show_warning($order_type->get_error());
             return;
         }
         /*  检查是否添加收货人地址  */
         if (isset($_POST['save_address']) && intval(trim($_POST['save_address'])) == 1) {
             $data = array('user_id' => $this->visitor->get('user_id'), 'consignee' => trim($_POST['consignee']), 'region_id' => $_POST['region_id'], 'region_name' => $_POST['region_name'], 'address' => trim($_POST['address']), 'zipcode' => trim($_POST['zipcode']), 'phone_tel' => trim($_POST['phone_tel']), 'phone_mob' => trim($_POST['phone_mob']));
             $model_address =& m('address');
             $model_address->add($data);
         }
         /* 下单完成后清理商品,如清空购物车,或将团购拍卖的状态转为已下单之类的 */
         $this->_clear_goods($order_id);
         /* 发送邮件 */
         $model_order =& m('order');
         /* 减去商品库存 */
         foreach ($order_id as $id) {
             $model_order->change_stock('-', $id);
         }
         /* 获取订单信息 */
         foreach ($order_id as $sid => $val) {
             $order_info[$sid] = $model_order->get("order_id=" . $val);
             //3.25
         }
         /* 发送事件 */
         $feed_images = array();
         foreach ($goods_info as $sid => $val) {
             if ($sid > 0) {
                 foreach ($val['items'] as $_gi) {
                     $feed_images[$sid][] = array('url' => SITE_URL . '/' . $_gi['goods_image'], 'link' => SITE_URL . '/' . url('app=goods&id=' . $_gi['goods_id']));
                 }
             }
         }
         foreach ($order_id as $sid => $val) {
             $this->send_feed('order_created', array('user_id' => $this->visitor->get('user_id'), 'user_name' => addslashes($this->visitor->get('user_name')), 'seller_id' => $order_info[$sid]['seller_id'], 'seller_name' => $order_info[$sid]['seller_name'], 'store_url' => SITE_URL . '/' . url('app=store&id=' . $order_info[$sid]['seller_id']), 'images' => $feed_images[$sid]));
         }
         $buyer_address = $this->visitor->get('email');
         $model_member =& m('member');
         foreach ($order_id as $sid => $val) {
             //获取用户信息
             $member_info[$sid] = $model_member->get($sid);
             $seller_address[$sid] = $member_info[$sid]['email'];
         }
         /* 发送给买家下单通知 */
         foreach ($order_id as $sid => $val) {
             $buyer_mail = get_mail('tobuyer_new_order_notify', array('order' => $order_info[$sid]));
             $this->_mailto($buyer_address, addslashes($buyer_mail['subject']), addslashes($buyer_mail['message']));
         }
         /* 发送给卖家新订单通知 */
         foreach ($order_id as $sid => $val) {
             $seller_mail[$sid] = get_mail('toseller_new_order_notify', array('order' => $order_info[$sid]));
             $this->_mailto($seller_address[$sid], addslashes($seller_mail[$sid]['subject']), addslashes($seller_mail[$sid]['message']));
         }
         /* 更新下单次数 */
         $model_goodsstatistics =& m('goodsstatistics');
         $goods_ids = array();
         foreach ($goods_info as $sid => $val) {
             if ($sid > 0) {
                 foreach ($val['items'] as $goods) {
                     $goods_ids[$sid][] = $goods['goods_id'];
                 }
             }
         }
         foreach ($order_id as $sid => $val) {
             $model_goodsstatistics->edit($val, 'orders=orders+1');
         }
         /* 更新下单次数 */
         $order = implode("-", $order_id);
         if (is_wap()) {
             header("location:/cashier-" . $order . ".html");
         } else {
             $this->json_results(array('done' => true, 'url' => "/cashier-" . $order . ".html"));
         }
     }
 }
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:101,代码来源:order.app.php


示例13: confirm_order

 /**
  *    确认订单
  *
  *    @author    Garbin
  *    @return    void
  */
 function confirm_order()
 {
     $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
     if (!$order_id) {
         echo Lang::get('no_such_order');
         return;
     }
     $model_order =& m('order');
     /* 只有已发货的订单可以确认 */
     $order_info = $model_order->get("order_id={$order_id} AND buyer_id=" . $this->visitor->get('user_id') . " AND status=" . ORDER_SHIPPED);
     if (empty($order_info)) {
         echo Lang::get('no_such_order');
         return;
     }
     $model_order->edit($order_id, array('status' => ORDER_FINISHED, 'finished_time' => gmtime()));
     if ($model_order->has_error()) {
         $this->pop_warning($model_order->get_error());
         return;
     }
     /* 记录订单操作日志 */
     $order_log =& m('orderlog');
     $order_log->add(array('order_id' => $order_id, 'operator' => addslashes($this->visitor->get('user_name')), 'order_status' => order_status($order_info['status']), 'changed_status' => order_status(ORDER_FINISHED), 'remark' => Lang::get('buyer_confirm'), 'log_time' => gmtime()));
     /* 发送给卖家买家确认收货邮件,交易完成 */
     $model_member =& m('member');
     $seller_info = $model_member->get($order_info['seller_id']);
     $mail = get_mail('toseller_finish_notify', array('order' => $order_info));
     $this->_mailto($seller_info['email'], addslashes($mail['subject']), addslashes($mail['message']));
     /* 更新累计销售件数 */
     $model_goodsstatistics =& m('goodsstatistics');
     $model_ordergoods =& m('ordergoods');
     $order_goods = $model_ordergoods->find("order_id={$order_id}");
     foreach ($order_goods as $goods) {
         $model_goodsstatistics->edit($goods['goods_id'], "sales=sales+{$goods['quantity']}");
     }
     $this->json_result();
 }
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:42,代码来源:buyer_order.app.php


示例14: sendemail

 function sendemail()
 {
     if (!IS_POST) {
         $this->show_warning('Hacking Attempt');
         return;
     } else {
         $code = trim($_POST['code']);
         $email = trim($_POST['email']);
         $username = trim($_POST['username']);
         $ms =& ms();
         $info = $ms->user->get($username, true);
         $mail = get_mail('touser_send_code', array('user' => $info, 'word' => $code));
         $mailer =& get_mailer();
         $mail_result = $mailer->send($email, addslashes($mail['subject']), addslashes($mail['message']), CHARSET, 1);
         if ($mail_result) {
             $_SESSION['email_code'] = md5($email . $code);
             $_SESSION['last_send_time_email_code'] = time();
             $this->json_result('', 'mail_send_succeed');
         } else {
             $this->json_error('mail_send_failure', implode("\n", $mailer->errors));
         }
     }
 }
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:23,代码来源:find_password.app.php


示例15: spamcheck

        <div>
            <label for="message"><b>Besked</b></label>
            <textarea rows="10" cols="40" name="message" required></textarea>
        </div>
        <br><br><br><br><br><br><br><br><br>
            <input class="btn right" type="submit" name="submit" value="Send mail">
        </form>
        
        <?php 
    } else {
        if (isset($_POST["from"])) {
            $mailcheck = spamcheck($_POST["from"]);
            if ($mailcheck == FALSE) {
                echo "Invalid input";
            } else {
                $to = get_mail($mysqli);
                $from = $_POST["from"];
                $subject = $_POST["subject"];
                $message = $_POST["message"];
                $message = wordwrap($message, 70);
                mail($to, $subject, $message, "From: {$from}\n");
                echo "Tak for mailen - vi svarer tilbage hurtigst muligt!";
            }
        }
    }
    ?>
        </div>
    </div>


<script src="js/ui.js"></script>
开发者ID:michgor26,项目名称:Project,代码行数:31,代码来源:contact.php


示例16: index

 /**
  *    填写收货人信息,选择配送,支付方式。
  *
  *    @author    Garbin
  *    @param    none
  *    @return    void
  */
 function index()
 {
     if (!IS_POST) {
         $goods_info = $this->_get_goods_info();
         if ($goods_info === false) {
             /* 购物车是空的 */
             $this->show_warning('goods_empty');
             return;
         }
         /* 根据商品类型获取对应订单类型 */
         $goods_type =& gt($goods_info['type']);
         $order_type =& ot($goods_type->get_order_type());
         /* 显示订单表单 */
         $form = $order_type->get_order_form($goods_info['store_id']);
         if ($form === false) {
             $this->show_warning($order_type->get_error());
             return;
         }
         $this->_curlocal(LANG::get('create_order'));
         $this->assign('page_title', Lang::get('confirm_order_info') . ' - ' . Conf::get('site_title'));
         $this->assign('goods_info', $goods_info);
         $this->assign($form['data']);
         $this->display($form['template']);
     } else {
         /* 在此获取生成订单的两个基本要素:用户提交的数据(POST),商品信息(包含商品列表,商品总价,商品总数量,类型),所属店铺 */
         $goods_info = $this->_get_goods_info();
         if ($goods_info === false) {
             /* 购物车是空的 */
             $this->show_warning('goods_empty');
             return;
         }
         /* 根据商品类型获取对应的订单类型 */
         $goods_type =& gt($goods_info['type']);
         $order_type =& ot($goods_type->get_order_type());
         /* 将这些信息传递给订单类型处理类生成订单(你根据我提供的信息生成一张订单) */
         $order_id = $order_type->submit_order(array('goods_info' => $goods_info, 'post' => $_POST));
         if (!$order_id) {
             $this->show_warning($order_type->get_error());
             return;
         }
         /*  检查是否添加收货人地址  */
         if (isset($_POST['save_address']) && intval(trim($_POST['save_address'])) == 1) {
             $data = array('user_id' => $this->visitor->get('user_id'), 'consignee' => trim($_POST['consignee']), 'region_id' => $_POST['region_id'], 'region_name' => $_POST['region_name'], 'address' => trim($_POST['address']), 'zipcode' => trim($_POST['zipcode']), 'phone_tel' => trim($_POST['phone_tel']), 'phone_mob' => trim($_POST['phone_mob']));
             $model_address =& m('address');
             $model_address->add($data);
         }
         /* 下单完成后清理商品,如清空购物车,或将团购拍卖的状态转为已下单之类的 */
         $this->_clear_goods();
         /* 发送邮件 */
         $model_order =& m('order');
         /* 减去商品库存 */
         $model_order->change_stock('-', $order_id);
         /* 获取订单信息 */
         $order_info = $model_order->get($order_id);
         /* 发送事件 */
         $feed = array('icon' => 'goods', 'user_id' => $this->visitor->get('user_id'), 'user_name' => addslashes($this->visitor->get('user_name')), 'title' => array('template' => Lang::get('feed_bought_goods_title'), 'data' => array('store' => '<a href="' . SITE_URL . '/index.php?app=store&id=' . $order_info['seller_id'] . '">' . $order_info['seller_name'] . '</a>')), 'body' => array('template' => Lang::get('feed_bought_goods_body')));
         $ms =& ms();
         $ms->feed->add($feed);
         $buyer_address = $this->visitor->get('email');
         $model_member =& m('member');
         $member_info = $model_member->get($goods_info['store_id']);
         $seller_address = $member_info['email'];
         /* 发送给买家下单通知 */
         $buyer_mail = get_mail('tobuyer_new_order_notify', array('order' => $order_info));
         $this->_mailto($buyer_address, addslashes($buyer_mail['subject']), addslashes($buyer_mail['message']));
         /* 发送给卖家新订单通知 */
         $seller_mail = get_mail('toseller_new_order_notify', array('order' => $order_info));
         $this->_mailto($seller_address, addslashes($seller_mail['subject']), addslashes($seller_mail['message']));
         /* 更新下单次数 */
         $model_goodsstatistics =& m('goodsstatistics');
         $goods_ids = array();
         foreach ($goods_info['items'] as $goods) {
             $goods_ids[] = $goods['goods_id'];
         }
         $model_goodsstatistics->edit($goods_ids, 'orders=orders+1');
         /* 到收银台付款 */
         header('Location:index.php?app=cashier&order_id=' . $order_id);
     }
 }
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:86,代码来源:order.app.php


示例17: qa

 function qa()
 {
     $goods_qa =& m('goodsqa');
     if (!IS_POST) {
         //如果是用户第一次查看则将是否为最新设为否
         $new = empty($_GET['new']) ? '' : trim($_GET['new']);
         $update_data = array('if_new' => '0');
         $question_id = empty($_GET['question_id']) ? '' : intval($_GET['question_id']);
         if ($question_id != '' && $new == 'yes') {
             $goods_qa->edit($question_id, $update_data);
         }
         $id = empty($_GET['id']) ? 0 : intval($_GET['id']);
         $ques_id = empty($_GET['ques_id']) ? 0 : intval($_GET['ques_id']);
         if (!$id) {
             $this->show_warning('Hacking Attempt');
             return;
         }
         if ($ques_id != 0) {
             //查出要回复主题的用户名和id
             $answer = $goods_qa->get(array('join' => 'belongs_to_user', 'fields' => 'member.user_id,user_name', 'conditions' => '1 = 1 AND ques_id = ' . $ques_id));
             $this->assign('answer', $answer);
         }
         if (!$this->_assign_common_info($id)) {
             return;
         }
         $this->_assign_goods_qa($id, 10);
    

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_mail_template函数代码示例发布时间:2022-05-15
下一篇:
PHP get_magic_quotes_runtime函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap