$_SESSION['total_value'] = ''; $needjifen = $usejifen ? Helper_Archive::getNeedJifen($jifentprice) : 0; $userinfo = $User->getInfoByMid($User->uid); //获取用户信息 //这里再次判断用户积分是否满足条件. if ($userinfo['jifen'] < $needjifen) { $usejifen = 0; $needjifen = 0; } $productaid = Helper_Archive::pregReplace($productaid, 2); $suitid = Helper_Archive::pregReplace($suitid, 2); $ordersn = get_order_sn($typeid); //订单号 $memberid = $User->uid ? $User->uid : 0; $row = TongYong::getProductInfo($productaid, $typeid); $suitinfo = TongYong::getSuitInfo($suitid); $status = $paytype == 1 ? 1 : 0; //'linktel'=>Helper_Archive::pregReplace($linktel,2); $arr = array('ordersn' => $ordersn, 'webid' => $webid, 'typeid' => $typeid, 'productautoid' => $row['articleid'], 'productaid' => $row['aid'], 'productname' => $row['title'], 'price' => $suitinfo['ourprice'], 'childprice' => 0, 'dingnum' => Helper_Archive::pregReplace($dingnum, 2), 'usedate' => $usedate, 'childnum' => 0, 'linkman' => Helper_Archive::pregReplace($linkman, 5), 'linktel' => Helper_Archive::pregReplace($linktel, 2), 'linkemail' => Helper_Archive::pregReplace($linkemail, 5), 'linkqq' => '', 'jifentprice' => $suitinfo['jifentprice'], 'jifenbook' => $suitinfo['jifenbook'], 'jifencomment' => $suitinfo['jifencomment'], 'addtime' => time(), 'memberid' => $memberid, 'dingjin' => Helper_Archive::pregReplace($dingjin, 5), 'paytype' => $paytype, 'usejifen' => $usejifen, 'needjifen' => $needjifen, 'status' => $status, 'remark' => Helper_Archive::pregReplace($remarkinfo, 5)); if (Helper_Archive::addOrder($arr)) { $model = new CommonModule('#@__member_order'); $orderid = $model->getField('id', "ordersn='{$ordersn}'"); //判断是否开启在线支付 if (!empty($choosepay) && $paytype != '3' && $choosepay != '6') { $url = $GLOBALS['cfg_basehost'] . '/' . $module_pinyin . '/booking.php?dopost=payonline&id=' . $orderid . '&paytype=' . $choosepay; } else { //是二次支付将跳转到订单咨询页面 //$url = "{$GLOBALS['cfg_basehost']}/".$module_pinyin."/show_{$arr['productaid']}.html"; $url = "{$GLOBALS['cfg_basehost']}/member/query.php?dopost=search&mobile={$linktel}"; } $mailto = $cfg_Email139;
$attrwhere = Helper_Archive::getAttrWhere($attrid); //属性条件 $where .= $attrwhere; $wherecount .= $attrwhere; } //如果选择目的地 if (!empty($dest_id)) { $where .= " and find_in_set({$dest_id},a.kindlist)"; $wherecount .= " and find_in_set({$dest_id},a.kindlist)"; $sql = "select a.* from sline_model_archive a left join sline_kindorderlist b on(a.id=b.aid and b.typeid={$typeid} and b.classid={$dest_id} ) {$where} order by b.displayorder asc, a.modtime desc,a.addtime desc "; } else { $sql = "select a.* from sline_model_archive a left join sline_allorderlist b on(a.id=b.aid and b.typeid={$typeid} ) {$where} order by b.displayorder asc, a.modtime desc,a.addtime desc "; } $destinfo = TongYong::getDestSeoInfo($module_dest_table, $dest_id); //目的地优化信息; $seoinfo = TongYong::getSeoInfo($destinfo, $attrid, $typeid); //组合搜索标题 //下级目的地 $destlist = Helper_Archive::getChildDest($dest_id, $typeid); $pv = new ListView($typeid); $pv->pagesize = 16; //分页条数. $pv->SetSql($sql); //seo变量赋值 foreach ($destinfo as $k => $v) { $pv->Fields[$k] = $v; } foreach ($seoinfo as $k => $v) { $pv->Fields[$k] = $v; } $pv->Fields['typeid'] = $typeid;
$row['pkname'] = get_par_value($row['kindlist'], $typeid); $row['destid'] = array_remove_value($row['kindlist']); $row['pinyin'] = Helper_Archive::getDestPinyin($row['destid']); $row['kindid'] = $row['destid']; //是否设置了目的地条件,便于展示推荐线路 if (!empty($row['destid'])) { $GLOBALS['condition']['_hasdest'] = 1; } foreach ($row as $k => $v) { $pv->Fields[$k] = $v; } } $pv->Fields['typeid'] = $typeid; $pv->Fields['modulename'] = $module_name; $pv->Fields['modulepinyin'] = $module_pinyin; $piclist = TongYong::handlePicture($row['piclist']); $firstpic = isset($piclist) ? array($piclist[0]) : array('litpic' => getDefaultImage(), 'desc' => $row['title']); unset($piclist[0]); //获取上级开启了导航的目的地 getTopNavDest($row['kindlist']); $typename = GetTypeName($typeid); //获取栏目名称. $pv->Fields['typename'] = $typename; $pv->Fields['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title']; $pv->Fields['addtime'] = empty($row['modtime']) ? $row['addtime'] : $row['modtime']; //兼容win linux $filename = str_replace("\\", '/', dirname(__FILE__)); //获取当前文件夹名 $filename = explode("/", $filename); $key = count($filename) - 1; $url = $filename[$key] . "_show";