private function special_keyword($key, $data) { $return = array(); if ($key == "附近团购" || $key == "附近订餐") { $dateline = time() - 3600 * 2; if ($long_lat = D("User_long_lat")->field(true)->where("`open_id`='{$data["FromUserName"]}' AND `dateline`>'{$dateline}'")->find()) { import("@.ORG.longlat"); $longlat_class = new longlat(); $location2 = $longlat_class->gpsToBaidu($long_lat["lat"], $long_lat["long"]); $x = $location2["lat"]; $y = $location2["lng"]; if ($key == "附近订餐") { $meals = D("Merchant_store")->field("*, ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN(({$x}*PI()/180-`lat`*PI()/180)/2),2)+COS({$x}*PI()/180)*COS(`lat`*PI()/180)*POW(SIN(({$y}*PI()/180-`long`*PI()/180)/2),2)))*1000) AS juli")->where("`have_meal`=1")->order("juli ASC")->limit("0, 10")->select(); $store_image_class = new store_image(); foreach ($meals as $meal) { $images = $store_image_class->get_allImage_by_path($meal["pic_info"]); $meal["image"] = $images ? array_shift($images) : ""; $len = 1000 <= $meal["juli"] ? number_format($meal["juli"] / 1000, 1) . "千米" : $meal["juli"] . "米"; $return[] = array($meal["name"] . "[" . $meal["adress"] . "]约{$len}", $meal["txt_info"], $meal["image"], $this->config["site_url"] . "/wap.php?g=Wap&c=Meal&a=menu&mer_id=" . $meal["mer_id"] . "&store_id=" . $meal["store_id"] . ""); } } else { $meals = D("Merchant_store")->field("*, ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN(({$x}*PI()/180-`lat`*PI()/180)/2),2)+COS({$x}*PI()/180)*COS(`lat`*PI()/180)*POW(SIN(({$y}*PI()/180-`long`*PI()/180)/2),2)))*1000) AS juli")->where("`have_group`=1")->order("juli ASC")->limit("0, 10")->select(); $store_image_class = new store_image(); foreach ($meals as $meal) { $images = $store_image_class->get_allImage_by_path($meal["pic_info"]); $meal["image"] = $images ? array_shift($images) : ""; $len = 1000 <= $meal["juli"] ? number_format($meal["juli"] / 1000, 1) . "千米" : $meal["juli"] . "米"; $return[] = array($meal["name"] . "[" . $meal["adress"] . "]约{$len}", $meal["txt_info"], $meal["image"], $this->config["site_url"] . "/wap.php?g=Wap&c=Group&a=shop&store_id=" . $meal["store_id"] . ""); } } } if ($return) { return array($return, "news"); } else { return array("主人【微赢】已经接收到你的指令请发送您的地理位置(对话框右下角点击+号,然后点击“位置”)给我哈", "text"); } } if ($key == "交友") { $return[] = array("交友约会", "结交一些朋友吃喝玩乐", $this->config["site_url"] . "/static/images/jiaoyou.jpg", $this->config["site_url"] . "/wap.php?c=Invitation&a=datelist"); return array($return, "news"); } $platform = D("Platform")->field(true)->where(array("key" => $key))->find(); if ($platform) { $return[] = array($platform["title"], $platform["info"], $this->config["site_url"] . $platform["pic"], $platform["url"]); } else { $keys = D("Keywords")->field(true)->where(array("keyword" => $key))->order("id DESC")->limit("0,9")->select(); $lotteryids = $mealids = $groupids = array(); foreach ($keys as $k) { if ($k["third_type"] == "group") { $groupids[] = $k["third_id"]; } else { if ($k["third_type"] == "Merchant_store") { $mealids[] = $k["third_id"]; } else { if ($k["third_type"] == "lottery") { $lotteryids[] = $k["third_id"]; } } } } if ($groupids) { $list = D("Group")->field(true)->where(array("group_id" => array("in", $groupids)))->select(); $group_image_class = new group_image(); foreach ($list as $li) { $image = $group_image_class->get_image_by_path($li["pic"], "s"); $return[] = array($li["s_name"], $li["name"], $image, $this->config["site_url"] . "/wap.php?g=Wap&c=Group&a=detail&group_id=" . $li["group_id"] . ""); } } if ($mealids) { $list = D("Merchant_store")->field(true)->where(array("store_id" => array("in", $mealids)))->select(); $store_image_class = new store_image(); foreach ($list as $now_store) { $images = $store_image_class->get_allImage_by_path($now_store["pic_info"]); $now_store["image"] = $images ? array_shift($images) : ""; if ($now_store["have_meal"]) { $return[] = array($now_store["name"], $now_store["txt_info"], $now_store["image"], $this->config["site_url"] . "/wap.php?g=Wap&c=Meal&a=menu&mer_id=" . $now_store["mer_id"] . "&store_id=" . $now_store["store_id"] . ""); } else { $return[] = array($now_store["name"], $now_store["txt_info"], $now_store["image"], $this->config["site_url"] . "/wap.php?g=Wap&c=Group&a=shop&store_id=" . $now_store["store_id"] . ""); } } } if ($lotteryids) { $lotterys = D("Lottery")->field(true)->where(array("id" => array("in", $lotteryids), "statdate" => array("lt", time()), "enddate" => array("gt", time())))->select(); foreach ($lotterys as $lottery) { switch ($lottery["type"]) { case 1: $return[] = array("[活动]" . $lottery["title"], $lottery["info"], $this->config["site_url"] . $lottery["starpicurl"], $this->config["site_url"] . "/wap.php?c=Lottery&a=index&token=" . $lottery["token"] . "&id=" . $lottery["id"] . ""); break; case 2: $return[] = array("[活动]" . $lottery["title"], $lottery["info"], $this->config["site_url"] . $lottery["starpicurl"], $this->config["site_url"] . "/wap.php?c=Guajiang&a=index&token=" . $lottery["token"] . "&id=" . $lottery["id"] . ""); break; case 3: $return[] = array("[活动]" . $lottery["title"], $lottery["info"], $this->config["site_url"] . $lottery["starpicurl"], $this->config["site_url"] . "/wap.php?c=Coupon&a=index&token=" . $lottery["token"] / "&id=" . $lottery["id"] . ""); break; case 4: $return[] = array("[活动]" . $lottery["title"], $lottery["info"], $this->config["site_url"] . $lottery["starpicurl"], $this->config["site_url"] . "/wap.php?c=LuckyFruit&a=index&token=" . $lottery["token"] . "&id=" . $lottery["id"] . ""); break; case 5: $return[] = array("[活动]" . $lottery["title"], $lottery["info"], $this->config["site_url"] . $lottery["starpicurl"], $this->config["site_url"] . "/wap.php?c=GoldenEgg&a=index&token=" . $lottery["token"] . "&id=" . $lottery["id"] . ""); break; } } } } if ($return) { return array($return, "news"); } return array("亲,暂时没有找到与“" . $key . "”相关的内容!请更换内容。", "text"); }
public function index() { $where['token'] = $this->token; // $allflash = M('Flash')->where($where)->order('id DESC')->select(); $allflash = $this->convertLinks($allflash); if ($allflash == NULL) { $allflash = array(array("info" => "广告位描述", "img" => "/tpl/Wap/static/images/tour/4.jpg", "url" => "", "tip" => 1), array("info" => "广告位描述", "img" => "/tpl/Wap/static/images/tour/3.jpg", "url" => "", "tip" => 1)); } // dump($allflash); // $flash = array(); $flashbg = array(); foreach ($allflash as $af) { if ($af['url'] == '') { $af['url'] = 'javascript:void(0)'; } if ($af['tip'] == 1) { array_push($flash, $af); } elseif ($af['tip'] == 2) { array_push($flashbg, $af); } } $this->assign('flashbg', $flashbg); if (!$flashbg && $this->homeInfo['homeurl']) { $flash_db = M('Flash'); $arr = array(); $arr['token'] = $this->token; $arr['img'] = $this->homeInfo['homeurl']; $arr['url'] = ''; $arr['info'] = ''; $arr['tip'] = 2; if ($arr['img']) { $flash_db->add($arr); } } $info = $this->info; //$info = $this->convertLinks($info); $tpldata = $this->merchant_info; $tpldata['color_id'] = intval($tpldata['color_id']); //获取模板信息 include './cms/Lib/ORG/index.Tpl.php'; foreach ($tpl as $k => $v) { if ($v['tpltypeid'] == $tpldata['tpltypeid']) { $tplinfo = $v; } } $tpldata['tpltypeid'] = $tplinfo['tpltypeid']; $tpldata['tpltypename'] = $tplinfo['tpltypename']; foreach ($info as $k => $v) { if ($info[$k]['url'] == '') { $info[$k]['url'] = U('Index/lists', array('classid' => $v['id'], 'token' => $where['token'])); } //解决二级分类 if ($v['sub'] != NULL) { foreach ($v['sub'] as $ke => $va) { if ($v['sub'][$ke]['url'] == '') { $info[$k]['sub'][$ke]['url'] = U('Index/lists', array('classid' => $v['sub'][$ke]['id'], 'token' => $where['token'])); } } } } if ($tpldata['tpltypename'] == 'ktv_list' || $tpldata['tpltypename'] == 'yl_list') { //控制模板中的不同字段 foreach ($info as $key => $val) { $info[$key]['title'] = $val['name']; $info[$key]['pic'] = $val['img']; if ($info[$key]['url'] == '') { $info[$key]['url'] = U('Index/lists', array('classid' => $val['id'], 'token' => $where['token'])); } $info[$key]['info'] = strip_tags(htmlspecialchars_decode($val['info'])); } } if (empty($info)) { //$info = array(array('url' => '', 'name' => '', 'info' => '')); //1.看商家支持订餐还是团购 $stores = D("Merchant_store")->field(true)->where(array('mer_id' => $this->token, 'status' => 1))->select(); $store_image_class = new store_image(); foreach ($stores as $store) { if ($store['have_meal']) { $images = $store_image_class->get_allImage_by_path($store['pic_info']); $img = array_shift($images); $info[] = array('url' => U('Meal/menu', array('mer_id' => $store['mer_id'], 'store_id' => $store['store_id'])), 'name' => $store['name'], 'info' => $store['txt_info'], 'img' => $img); } } $groups = D("Group")->field(true)->where(array('mer_id' => $this->token, 'begin_time' => array('lt', time()), 'end_time' => array('gt', time()), 'status' => 1))->select(); $group_image_class = new group_image(); foreach ($groups as $group) { $tmp_pic_arr = explode(';', $group['pic']); $img = $group_image_class->get_image_by_path($tmp_pic_arr[0], 's'); $info[] = array('url' => U('Group/detail', array('group_id' => $group['group_id'])), 'name' => $group['s_name'], 'info' => $group['name'], 'img' => $img); } //2.会员卡 $card = D("Member_card_set")->field(true)->where(array('token' => $this->token))->limit("0,1")->find(); if ($card) { $info[] = array('url' => U('Card/index', array('token' => $this->token)), 'name' => $card['cardname'], 'info' => $card['msg'], 'img' => $this->config['site_url'] . $card['logo']); } //3.活动 $lotterys = D("Lottery")->field(true)->where(array('token' => $this->token, 'statdate' => array('lt', time()), 'enddate' => array('gt', time())))->select(); foreach ($lotterys as $lottery) { switch ($lottery['type']) { case 1: $info[] = array('url' => U('Lottery/index', array('token' => $this->token, 'id' => $lottery['id'])), 'name' => $lottery['title'], 'info' => $lottery['info'], 'img' => $lottery['starpicurl']); break; case 2: $info[] = array('url' => U('Guajiang/index', array('token' => $this->token, 'id' => $lottery['id'])), 'name' => $lottery['title'], 'info' => $lottery['info'], 'img' => $lottery['starpicurl']); break; case 3: $info[] = array('url' => U('Coupon/index', array('token' => $this->token, 'id' => $lottery['id'])), 'name' => $lottery['title'], 'info' => $lottery['info'], 'img' => $lottery['starpicurl']); break; case 4: $info[] = array('url' => U('LuckyFruit/index', array('token' => $this->token, 'id' => $lottery['id'])), 'name' => $lottery['title'], 'info' => $lottery['info'], 'img' => $lottery['starpicurl']); break; case 5: $info[] = array('url' => U('GoldenEgg/index', array('token' => $this->token, 'id' => $lottery['id'])), 'name' => $lottery['title'], 'info' => $lottery['info'], 'img' => $lottery['starpicurl']); break; } } } if (empty($info)) { $info[] = array('url' => '', 'name' => '商家餐饮店铺', 'info' => '描述店铺简介', 'img' => '/tpl/Wap/static/images/tour/meal.jpg'); $info[] = array('url' => '', 'name' => '商家发布的' . $this->config['group_alias_name'], 'info' => '描述' . $this->config['group_alias_name'] . '内容', 'img' => '/tpl/Wap/static/images/tour/group.jpg'); $info[] = array('url' => '', 'name' => '商家创建的会员卡', 'info' => '描述会员卡详情', 'img' => '/tpl/Wap/static/images/tour/card.png'); $info[] = array('url' => '', 'name' => '商家发布的促销活动', 'info' => '介绍活动内容', 'img' => '/tpl/Wap/static/images/tour/lottery.jpg'); } D('Merchant')->where(array('mer_id' => $this->token))->setInc('hits', 1); $count = count($flash); $this->assign('flash', $flash); $this->assign('homeInfo', $this->homeInfo); $this->assign('info', $info); $this->assign('num', $count); $this->assign('flashbgcount', count($flashbg)); $this->assign('tpl', $this->tpl); $this->assign('copyright', $this->copyright); $this->display($this->tpl['tpltypename']); }
public function get_rate_order_list($uid, $is_rate = false, $is_wap = false) { $condition_where = "`o`.`uid`='{$uid}' AND `o`.`group_id`=`g`.`group_id`"; if ($is_rate) { $condition_where .= " AND `o`.`paid`='1'"; $condition_where .= " AND `o`.`status`='2'"; $condition_where .= " AND `r`.`order_type`='0' AND `r`.`order_id`=`o`.`order_id`"; $condition_table = array(C('DB_PREFIX') . 'group' => 'g', C('DB_PREFIX') . 'group_order' => 'o', C('DB_PREFIX') . 'reply' => 'r'); $condition_field = '`o`.*,`g`.`s_name`,`g`.`pic` `group_pic`,`g`.`end_time`,`r`.*'; $condition_order = '`r`.`pigcms_id` DESC'; } else { $condition_where .= " AND `o`.`paid`='1'"; $condition_where .= " AND `o`.`status`='1'"; $condition_table = array(C('DB_PREFIX') . 'group' => 'g', C('DB_PREFIX') . 'group_order' => 'o'); $condition_field = '`o`.*,`g`.`s_name`,`g`.`pic` `group_pic`,`g`.`end_time`'; $condition_order = '`o`.`add_time` DESC'; } $order_list = $this->field($condition_field)->where($condition_where)->table($condition_table)->order($condition_order)->select(); if (!empty($order_list)) { $group_image_class = new group_image(); foreach ($order_list as $k => $v) { $tmp_pic_arr = explode(';', $v['group_pic']); $order_list[$k]['list_pic'] = $group_image_class->get_image_by_path($tmp_pic_arr[0], 's'); $order_list[$k]['url'] = $this->get_group_url($v['group_id'], $is_wap); $order_list[$k]['price'] = floatval($v['price']); $order_list[$k]['total_money'] = floatval($v['total_money']); if ($is_rate) { $order_list[$k]['comment'] = stripslashes($v['comment']); if ($v['pic']) { $tmp_array = explode(',', $v['pic']); $order_list[$k]['pic_count'] = count($tmp_array); } } } } return $order_list; }
private function special_keyword($key, $data = array()) { $return = array(); if ($key == '附近团购' || $key == '附近订餐') { $dateline = time() - 3600 * 2; if ($_lat = D("User__lat")->field(true)->where("`open_id`='{$data['FromUserName']}' AND `dateline`>'{$dateline}'")->find()) { import('@.ORG.lat'); $lat_class = new lat(); $location2 = $lat_class->gpsToBaidu($_lat['lat'], $_lat['']); //转换腾讯坐标到百度坐标 $x = $location2['lat']; $y = $location2['lng']; if ($key == '附近订餐') { $meals = D("Merchant_store")->field("*, ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN(({$x}*PI()/180-`lat`*PI()/180)/2),2)+COS({$x}*PI()/180)*COS(`lat`*PI()/180)*POW(SIN(({$y}*PI()/180-``*PI()/180)/2),2)))*1000) AS juli")->where('`have_meal`=1')->order("juli ASC")->limit("0, 10")->select(); $store_image_class = new store_image(); foreach ($meals as $meal) { $images = $store_image_class->get_allImage_by_path($meal['pic_info']); $meal['image'] = $images ? array_shift($images) : ''; $len = $meal['juli'] >= 1000 ? number_format($meal['juli'] / 1000, 1) . '千米' : $meal['juli'] . '米'; $return[] = array($meal['name'] . "[{$meal['adress']}]约{$len}", $meal['txt_info'], $meal['image'], $this->config['site_url'] . "/wap.php?g=Wap&c=Meal&a=menu&mer_id={$meal['mer_id']}&store_id={$meal['store_id']}"); } } else { $meals = D("Merchant_store")->field("*, ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN(({$x}*PI()/180-`lat`*PI()/180)/2),2)+COS({$x}*PI()/180)*COS(`lat`*PI()/180)*POW(SIN(({$y}*PI()/180-``*PI()/180)/2),2)))*1000) AS juli")->where('`have_group`=1')->order("juli ASC")->limit("0, 10")->select(); $store_image_class = new store_image(); foreach ($meals as $meal) { $images = $store_image_class->get_allImage_by_path($meal['pic_info']); $meal['image'] = $images ? array_shift($images) : ''; $len = $meal['juli'] >= 1000 ? number_format($meal['juli'] / 1000, 1) . '千米' : $meal['juli'] . '米'; $return[] = array($meal['name'] . "[{$meal['adress']}]约{$len}", $meal['txt_info'], $meal['image'], $this->config['site_url'] . "/wap.php?g=Wap&c=Group&a=shop&store_id={$meal['store_id']}"); } } } if ($return) { return array($return, 'news'); } else { return array("主人【小猪猪】已经接收到你的指令请发送您的地理位置(对话框右下角点击+号,然后点击“位置”)给我哈", 'text'); } } if ($key == '交友') { $return[] = array("交友约会", "结交一些朋友吃喝玩乐", $this->config['site_url'] . '/static/images/jiaoyou.jpg', $this->config['site_url'] . "/wap.php?c=Invitation&a=datelist"); return array($return, 'news'); } $platform = D("Platform")->field(true)->where(array('key' => $key))->find(); if ($platform) { $return[] = array($platform['title'], $platform['info'], getAttachmentUrl($platform['pic']), $platform['url']); } else { $keys = D("Keywords")->field(true)->where(array('keyword' => $key))->order('id DESC')->limit('0,9')->select(); $lotteryids = $mealids = $groupids = array(); foreach ($keys as $k) { if ($k['third_type'] == 'group') { $groupids[] = $k['third_id']; } elseif ($k['third_type'] == 'Merchant_store') { $mealids[] = $k['third_id']; } elseif ($k['third_type'] == 'lottery') { $lotteryids[] = $k['third_id']; } } if ($groupids) { $list = D("Group")->field(true)->where(array('group_id' => array('in', $groupids)))->select(); $group_image_class = new group_image(); foreach ($list as $li) { $image = $group_image_class->get_image_by_path($li['pic'], 's'); $return[] = array($li['s_name'], $li['name'], $image, $this->config['site_url'] . "/wap.php?g=Wap&c=Group&a=detail&group_id={$li['group_id']}"); } } if ($mealids) { $list = D("Merchant_store")->field(true)->where(array('store_id' => array('in', $mealids)))->select(); $store_image_class = new store_image(); foreach ($list as $now_store) { $images = $store_image_class->get_allImage_by_path($now_store['pic_info']); $now_store['image'] = $images ? array_shift($images) : ''; if ($now_store['have_meal']) { $return[] = array($now_store['name'], $now_store['txt_info'], $now_store['image'], $this->config['site_url'] . "/wap.php?g=Wap&c=Meal&a=menu&mer_id={$now_store['mer_id']}&store_id={$now_store['store_id']}"); } else { $return[] = array($now_store['name'], $now_store['txt_info'], $now_store['image'], $this->config['site_url'] . "/wap.php?g=Wap&c=Group&a=shop&store_id={$now_store['store_id']}"); } } } if ($lotteryids) { $lotterys = D("Lottery")->field(true)->where(array('id' => array('in', $lotteryids), 'statdate' => array('lt', time()), 'enddate' => array('gt', time())))->select(); foreach ($lotterys as $lottery) { switch ($lottery['type']) { case 1: $return[] = array('[活动]' . $lottery['title'], $lottery['info'], $this->config['site_url'] . $lottery['starpicurl'], $this->config['site_url'] . "/wap.php?c=Lottery&a=index&token={$lottery['token']}&id={$lottery['id']}"); break; case 2: $return[] = array('[活动]' . $lottery['title'], $lottery['info'], $this->config['site_url'] . $lottery['starpicurl'], $this->config['site_url'] . "/wap.php?c=Guajiang&a=index&token={$lottery['token']}&id={$lottery['id']}"); break; case 3: $return[] = array('[活动]' . $lottery['title'], $lottery['info'], $this->config['site_url'] . $lottery['starpicurl'], $this->config['site_url'] . "/wap.php?c=Coupon&a=index&token={$lottery['token']}&id={$lottery['id']}"); break; case 4: $return[] = array('[活动]' . $lottery['title'], $lottery['info'], $this->config['site_url'] . $lottery['starpicurl'], $this->config['site_url'] . "/wap.php?c=LuckyFruit&a=index&token={$lottery['token']}&id={$lottery['id']}"); break; case 5: $return[] = array('[活动]' . $lottery['title'], $lottery['info'], $this->config['site_url'] . $lottery['starpicurl'], $this->config['site_url'] . "/wap.php?c=GoldenEgg&a=index&token={$lottery['token']}&id={$lottery['id']}"); break; } } } } if ($return) { return array($return, 'news'); } return array('亲,暂时没有找到与“' . $key . '”相关的内容!请更换内容。', 'text'); }
public function ajax_upload_pic() { if ($_FILES['imgFile']['error'] != 4) { $img_mer_id = sprintf("%09d", $this->merchant_session['mer_id']); $rand_num = mt_rand(10, 99) . '/' . substr($img_mer_id, 0, 3) . '/' . substr($img_mer_id, 3, 3) . '/' . substr($img_mer_id, 6, 3); $upload_dir = './upload/group/' . $rand_num . '/'; if (!is_dir($upload_dir)) { mkdir($upload_dir, 0777, true); } import('ORG.Net.UploadFile'); $upload = new UploadFile(); $upload->maxSize = $this->config['group_pic_size'] * 1024 * 1024; $upload->allowExts = array('jpg', 'jpeg', 'png', 'gif'); $upload->allowTypes = array('image/png', 'image/jpg', 'image/jpeg', 'image/gif'); $upload->savePath = $upload_dir; $upload->thumb = true; $upload->imageClassPath = 'ORG.Util.Image'; $upload->thumbPrefix = 'm_,s_'; $upload->thumbMaxWidth = $this->config['group_pic_width']; $upload->thumbMaxHeight = $this->config['group_pic_height']; $upload->thumbRemoveOrigin = false; $upload->saveRule = 'uniqid'; if ($upload->upload()) { $uploadList = $upload->getUploadFileInfo(); $title = $rand_num . ',' . $uploadList[0]['savename']; $group_image_class = new group_image(); $url = $group_image_class->get_image_by_path($title, 's'); exit(json_encode(array('error' => 0, 'url' => $url, 'title' => $title))); } else { exit(json_encode(array('error' => 1, 'message' => $upload->getErrorMsg()))); } } else { exit(json_encode(array('error' => 1, 'message' => '没有选择图片'))); } }
public function get_order_detail_by_id($uid, $order_id, $is_wap = false, $check_user = true) { $condition_table = array(C('DB_PREFIX') . 'group' => 'g', C('DB_PREFIX') . 'group_order' => 'o'); if ($check_user) { $condition_where = "`o`.`uid`='{$uid}' AND "; } else { $condition_where = ''; } $condition_where .= "`o`.`order_id`='{$order_id}' AND `o`.`group_id`=`g`.`group_id`"; $now_order = $this->field('`o`.*,`g`.`s_name`,`g`.`pic`,`g`.`end_time`,`g`.`reply_count`,`g`.`score_all`,`g`.`score_mean`')->where($condition_where)->table($condition_table)->find(); if (!empty($now_order)) { $group_image_class = new group_image(); $tmp_pic_arr = explode(';', $now_order['pic']); $now_order['list_pic'] = $group_image_class->get_image_by_path($tmp_pic_arr[0], 's'); $now_order['url'] = D('Group')->get_group_url($now_order['group_id'], $is_wap); $now_order['order_url'] = $this->get_order_url($now_order['group_id'], $is_wap); $now_order['price'] = floatval($now_order['price']); $now_order['total_money'] = floatval($now_order['total_money']); $now_order['pay_type_txt'] = D('Pay')->get_pay_name($now_order['pay_type'], $now_order['is_mobile_pay']); if ($now_order['group_pass']) { $now_order['group_pass_txt'] = preg_replace('#(\\d{4})#', '$1 ', $now_order['group_pass']); } if ($now_order['express_type']) { $now_order['express_info'] = D('Express')->get_express($now_order['express_id']); } } return $now_order; }