Example #1
0
function getPiaoDetail($spotid, $tickettypeid, $kindname)
{
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__spot_ticket');
    $arr = $_model->getAll("spotid='{$spotid}' and tickettypeid='{$tickettypeid}' and number!=0", "displayorder asc");
    $out = '';
    foreach ($arr as $row) {
        $savemoney = $row['sellprice'] - $row['ourprice'];
        $award1 = !empty($row['jifentprice']) ? $row['jifentprice'] : '无';
        $award2 = !empty($row['jifenbook']) ? $row['jifenbook'] : '无';
        $award3 = !empty($row['jifencomment']) ? $row['jifencomment'] : '无';
        $bookurl = "booking.php?spotid={$row['spotid']}&ticketid={$row['id']}";
        $out .= '<dl>
			<dt class="dl_title"><a href="javascript:void()">' . $row['title'] . '</a></dt>
			<dd class="dd1">&yen;' . $row['sellprice'] . '</dd>
			<dd class="dd2">&yen;' . $row['ourprice'] . '</dd>
			<dd class="dd3"><span>' . $award1 . '</span></dd>
			<dd class="dd4"><span>' . $award2 . '</span></dd>
			<dd class="dd5"><span>' . $award3 . '</span></dd>
			<dd class="dd6"><a href="' . $bookurl . '" class="btn_ding" data-ticketid="' . $row['id'] . '">预定</a></dd>
			</dl>
			<div class="con_hide">
			<s class="s_bg"></s>
			<p>' . $row['description'] . '</p>
			</div>';
    }
    return $out;
}
Example #2
0
function getNickName($mid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__member');
    $membername = $model->getField('nickname', "mid='{$mid}'");
    return $membername ? $membername : '匿名';
}
Example #3
0
function getTemplet($spotid)
{
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__spot_ticket');
    $arr = $_model->getAll("spotid='{$spotid}'");
    $num = count($arr);
    $templet = $num > 0 ? 'spot_show_ticket.htm' : 'spot_show.htm';
    return $templet;
}
Example #4
0
function getDestChildHtml($pid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__destinations');
    $arr = $model->getAll("pid='{$pid}' and isopen=1", "displayorder asc");
    $out = '';
    foreach ($arr as $row) {
        $num = $model->getCount("pid='{$row['id']}'");
        $class = $num ? " class='haschild'" : "";
        $url = $GLOBALS['cfg_basehost'] . '/' . $row['pinyin'] . '/';
        $out .= '<dd><a href="' . $url . '" target="_blank"' . $class . ' data-id="' . $row['id'] . '">' . $row['kindname'] . '</a></dd>';
    }
    return $out;
}
Example #5
0
 public function getMobileShowUrl($type, $aid)
 {
     $info = Helper_Archive::getSlineWebInfo();
     if (!empty($info['webid'])) {
         $table = $this->tables[$type][0];
         $where = "aid='{$aid}' and webid='{$info['webid']}'";
         Helper_Archive::loadModule('common');
         $model = new CommonModule($table);
         $id = $model->getField('id', $where);
         $url = $GLOBALS['cfg_basehost'] . '/shouji/' . $this->tables[$type][1] . '/show/id/' . $id;
     } else {
         //子战跳转
         $table = $this->tables[$type][0];
         $where = "aid='{$aid}' and webid='{$info['id']}'";
         Helper_Archive::loadModule('common');
         $model = new CommonModule($table);
         $id = $model->getField('id', $where);
         $url = $GLOBALS['cfg_basehost'] . '/shouji/' . $this->tables[$type][1] . '/show/id/' . $id;
     }
     return $url;
 }
Example #6
0
function refundStorage($orderid, $op)
{
    global $dsql;
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__member_order');
    $row = $_model->getOne("id='{$orderid}'");
    if (isset($row)) {
        $dingnum = intval($row['dingnum']) + intval($row['childnum']);
        $suitid = $row['suitid'];
        $productid = $row['productautoid'];
        $typeid = $row['typeid'];
        $usedate = strtotime($row['usedate']);
        $storage_table = array('1' => 'sline_line_suit_price', '2' => 'sline_hotel_room_price', '3' => 'sline_car_suit_price', '5' => 'sline_spot_ticket', '8' => 'sline_visa', '13' => 'sline_tuan');
        $table = $storage_table[$typeid];
        //加库存
        if ($op == 'plus') {
            if ($typeid == 1 || $typeid == 2 || $typeid == 3) {
                $sql = "update {$table} set number=number+{$dingnum} where day='{$usedate}' and suitid='{$suitid}'";
            } else {
                $sql = "update {$table} set number=number+{$dingnum} where id={$productid}";
            }
        } else {
            if ($op == 'minus') {
                if ($typeid == 1 || $typeid == 2 || $typeid == 3) {
                    $sql = "update {$table} set number=number-{$dingnum} where day='{$usedate}' and suitid='{$suitid}'";
                } else {
                    $sql = "update {$table} set number=number-{$dingnum} where id={$productid}";
                }
            }
        }
        $dsql->ExecNoneQuery($sql);
    }
}
Example #7
0
function getSuitNumberByDay($suitid, $day)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__car_suit_price');
    $number = $model->getField('number', "day='" . strtotime($day) . "' and suitid=" . $suitid);
    return intval($number);
}
Example #8
0
            }
        }
    } else {
        $orderlist = Helper_Archive::getChildOrder($orderid);
        $price = 0;
        $totalnum = 0;
        foreach ($orderlist as $row) {
            $price += intval($row['dingnum']) * intval($row['price']);
            $totalnum += $row['dingnum'];
        }
        if (!empty($order['dingjin'])) {
            $dingjin = $totalnum * $order['dingjin'];
        }
    }
    if ($order['typeid'] == 1) {
        $insModel = new CommonModule('#@__insurance_booking');
        $insInfo = $insModel->getOne("bookordersn='{$order['ordersn']}'");
        if ($insInfo['payprice']) {
            $price += $insInfo['payprice'];
        }
        $price += $order['roombalancenum'] * $order['roombalance'];
    }
    $price = !empty($dingjin) ? $dingjin : $price;
    if (empty($price)) {
        $url = "{$GLOBALS['cfg_basehost']}/member/";
        header("location:{$url}");
        exit;
    }
    echo Helper_Archive::payOnline($order['ordersn'], $order['productname'], $price, $choosepay);
}
if ($dopost == 'checkaccount') {
function getExtendModelInfo($typeid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__model');
    $row = $model->getOne("id='{$typeid}'");
    return $row;
}
Example #10
0
$leaveArr['nickname'] = empty($leaveArr['nickname']) ? '匿名' : $leaveArr['nickname'];
$leaveArr['ip'] = GetIP();
$leaveArr['questype'] = 1;
if ($User->IsLogin()) {
    $leaveArr['memberid'] = $User->uid;
}
$checkcode = GetCkVdValue();
try {
    if ($checkcode != $_POST['checkcode']) {
        throw new Exception('验证码错误');
    }
    $_SESSION['total_value'] = '';
    if (empty($leaveArr['title'])) {
        throw new Exception('标题不能为空');
    }
    if (empty($leaveArr['content'])) {
        throw new Exception('内容不能为空');
    }
    if (empty($leaveArr['qq']) && empty($leaveArr['phone']) && empty($leaveArr['email']) && empty($leaveArr['weixin'])) {
        throw new Exception('请至少填写一种联系方式');
    }
    $model = new CommonModule('sline_question');
    $result = $model->add($leaveArr);
    if (!$result) {
        throw new Exception('系统错误,请重试');
    }
    echo json_encode(array('status' => true, 'msg' => '提交成功'));
} catch (Exception $excep) {
    $msg = $excep->getMessage();
    echo json_encode(array('status' => false, 'msg' => $msg));
}
Example #11
0
//获取目的地ID
if ($dopost == 'getDestId') {
    $sql = "select id from #@__destinations where kindname='{$destname}'";
    $row = $dsql->GetOne($sql);
    echo $row['id'] ? $row['id'] : 36;
}
//获取目的地拼音
if ($dopost == 'getDestPinYin') {
    $sql = "select pinyin from #@__destinations where kindname='{$destname}'";
    $row = $dsql->GetOne($sql);
    echo $row['pinyin'] ? $row['pinyin'] : '';
}
//获取目的地下级html
if ($dopost == 'getMddChild') {
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__destinations');
    $arr = $model->getAll("pid='{$dest_id}' and isopen=1");
    foreach ($arr as $row) {
        $url = $GLOBALS['cfg_basehost'] . '/' . $row['pinyin'] . '/';
        $out .= "<a href='{$url}' target='_blank'>{$row['kindname']}</a>";
    }
    echo ' <div class="pf">' . $out . "</div>";
    exit;
}
function matchPinyin($keyword)
{
    global $dsql;
    $sql = "select kindname as matchname from #@__destinations where isopen=1";
    $res = $dsql->getAll($sql);
    $str = '';
    foreach ($res as $row) {
Example #12
0
    $tableorder = " ifnull(b.isding,0) desc,ifnull(b.isjian,0) desc,ifnull(b.displayorder,9999) asc,a.modtime desc,a.addtime desc";
    $destinfo = getPhotoDestInfo($dest_id);
    $pv->Fields['seokeyword'] = !empty($destinfo['keyword']) ? "<meta name=\"keywords\" content=\"" . $destinfo['keyword'] . "\"/>" : "";
    $pv->Fields['seodescription'] = !empty($destinfo['description']) ? "<meta name=\"description\" content=\"" . $destinfo['description'] . "\"/>" : "";
    $pv->Fields['seotitle'] = !empty($destinfo['seotitle']) ? $destinfo['seotitle'] : $destinfo['shortname'];
} else {
    $join = " #@__allorderlist b on(a.id = b.aid and b.typeid='6') ";
    $tableorder = " ifnull(b.isding,0) desc,ifnull(b.isjian,0) desc,ifnull(b.displayorder,9999) asc,a.modtime desc,a.addtime desc";
}
if (!empty($attrid)) {
    $attrid_arr = explode('_', $attrid);
    foreach ($attrid_arr as $k => $v) {
        $where .= !empty($v) ? " and FIND_IN_SET({$v},a.attrid)" : '';
    }
}
$_photoModule = new CommonModule('sline_photo as a');
//获取目的地列表
$destlist = getPhotoChildDest($dest_id);
//获取目的地面包屑
$mianbao = getPhotoMianbao($dest_id);
//获取结果集
$pagesize = 12;
//每页数量
$pageno = empty($pageno) ? 1 : $pageno;
//第几页
$offset = ($pageno - 1) * $pagesize;
$count = $_photoModule->getCount($where);
$photolist = $_photoModule->getAll($where, $tableorder, "{$offset},{$pagesize}", "a.*", $join);
$page = getPhotoPage($count, $pageno, $pagesize, array('dest_id' => $dest_id, 'attrid' => $attrid));
//获取分页结果
foreach ($photolist as $k => $v) {
Example #13
0
//栏目
$pageno = $_GET['page'];
$html = dirname(__FILE__) . '/index.html';
if (file_exists($html) && $genpage != 1) {
    include $html;
    exit;
}
require_once SLINEINC . "/listview.class.php";
$pv = new View($typeid);
$pv->GetChannelKeywords($typeid);
$pv->Fields['seokeyword'] = !empty($pv->Fields['seokeyword']) ? "<meta name=\"keywords\" content=\"" . $pv->Fields['seokeyword'] . "\"/>" : "";
$pv->Fields['seodescription'] = !empty($pv->Fields['seodescription']) ? "<meta name=\"description\" content=\"" . $pv->Fields['seodescription'] . "\"/>" : "";
$pv->Fields['seotitle'] = !empty($pv->Fields['seotitle']) ? $pv->Fields['seotitle'] : $pv->Fields['shortname'];
Helper_Archive::loadModule('common');
$typename = GetTypeName($typeid);
$_leaveModule = new CommonModule('sline_question');
//获取结果集
$where = 'status=1 and webid=' . $GLOBALS['sys_child_webid'];
$tableorder = "replytime desc";
$pagesize = 12;
//每页数量
$pageno = empty($pageno) ? 1 : $pageno;
//第几页
$offset = ($pageno - 1) * $pagesize;
$count = $_leaveModule->getCount($where);
$totalcount = $_leaveModule->getCount("id is not null and webid={$GLOBALS['sys_child_webid']}");
$list = $_leaveModule->getAll($where, $tableorder, "{$offset},{$pagesize}");
foreach ($list as $k => $v) {
    $list[$k]['title'] = $v['questype'] == 0 ? get_productname($v['typeid'], $v['productid']) : $v['title'];
}
$pagestr = page($count, $pageno, $pagesize, '/questions/{page}', 5, '/questions');
Example #14
0
function getLeftNav($where, $typeid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__search');
    $arr = array(array('typeid' => 1, 'channelname' => '线路'), array('typeid' => 2, 'channelname' => '酒店'), array('typeid' => 3, 'channelname' => '车辆'), array('typeid' => 4, 'channelname' => '攻略'), array('typeid' => 5, 'channelname' => '门票'), array('typeid' => 6, 'channelname' => '相册'), array('typeid' => 8, 'channelname' => '签证'), array('typeid' => 13, 'channelname' => '团购'));
    // $where = "title like'%{$keyword}%'";
    //取得全部的查询数量
    $allnum = $model->getCount($where);
    //全部数量
    $out = array();
    $out[] = array('channelname' => '全部', 'num' => $allnum, 'typeid' => 0);
    foreach ($arr as $row) {
        $wh = " ({$where}) and typeid = '{$row['typeid']}'";
        $num = $model->getCount($wh);
        $out[] = array('channelname' => $row['channelname'], 'num' => $num, 'typeid' => $row['typeid']);
    }
    return $out;
}
Example #15
0
function get_productname($typeid, $id)
{
    global $dsql;
    $channeltable = array(1 => 'line', 2 => 'hotel', 3 => 'car', 4 => 'article', 5 => 'spot', 6 => 'photo', 8 => 'tuan', 13 => 'tuan');
    $tablename = 'sline_' . $channeltable[$typeid];
    $fields = array('1' => array('field' => 'title', 'link' => 'lines'), '2' => array('field' => 'title', 'link' => 'hotels'), '3' => array('field' => 'title', 'link' => 'cars'), '4' => array('field' => 'title', 'link' => 'article'), '5' => array('field' => 'title', 'link' => 'spots'), '6' => array('field' => 'title', 'link' => 'photos'), '8' => array('field' => 'title', 'link' => 'visa'), '13' => array('field' => 'title', 'link' => 'tuan'));
    $field = $fields[$typeid]['field'];
    $link = $fields[$typeid]['link'];
    if ($typeid > 13) {
        $itemModel = new CommonModule('sline_model');
        $module_info = $itemModel->getOne('id=' . $typeid);
        $tablename = "sline_model_archive";
        $field = 'title';
        $link = $module_info['pinyin'];
    }
    $sql = "select aid,{$field} as title from {$tablename} where id='{$id}'";
    $row = $dsql->GetOne($sql);
    return $row['title'];
}
Example #16
0
function getPeopleGroup($suitid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__line_suit');
    $group = $model->getOne("id='{$suitid}'", null, 'propgroup,jifentprice,jifenbook');
    return $group;
}
Example #17
0
}
$typeid = 10;
//栏目
$id = $_GET['id'];
if (!is_numeric($id)) {
    exit('wrong ID');
}
$html = dirname(__FILE__) . '/questions_show.html';
if (file_exists($html) && $genpage != 1) {
    include $html;
    exit;
}
require_once SLINEINC . "/listview.class.php";
$pv = new View($typeid);
Helper_Archive::loadModule('common');
$_leaveModule = new CommonModule('sline_question');
$row = $_leaveModule->getOne('id=' . $id);
$where = 'status=1 and webid=' . $GLOBALS['sys_child_webid'];
$count = $_leaveModule->getCount($where);
$totalcount = $_leaveModule->getCount("id is not null and webid={$GLOBALS['sys_child_webid']}");
$row['title'] = $row['questype'] == 0 ? get_productname($row['typeid'], $row['productid']) : $row['title'];
$pv->Fields['seotitle'] = $row['title'];
foreach ($row as $k => $v) {
    $pv->Fields[$k] = $v;
    //模板变量赋值
}
//模板选择
$templet = Helper_Archive::getUseTemplet('questions_show');
//获取使用模板
$templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "questions/" . "questions_show.htm";
//默认模板
Example #18
0
<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/5/13 0013
 * Time: 14:31
 */
require_once dirname(__FILE__) . "/../include/common.inc.php";
$xmlStr = $_POST['XmlStr'];
$xmlObj = new SimpleXMLElement($xmlStr);
$isSuccess = (string) $xmlObj->IsSuccess;
if ($isSuccess == 'false') {
    exit('fail');
}
$transrNo = (string) $xmlObj->TransrNo;
$row = $dsql->GetOne("select * from #@__insurance_booking where ordersn='{$transrNo}'");
if (empty($row)) {
    exit('not exist');
}
var_dump($row);
Helper_Archive::loadModule('common');
$curtime = time();
$model = new CommonModule('#@__insurance_booking');
$arr['status'] = 2;
$arr['insureno'] = (string) $xmlObj->InsureNo;
$arr['policyno'] = (string) $xmlObj->PolicyNo;
$arr['policyfileid'] = (string) $xmlObj->PolicyFileId;
$arr['payedtime'] = $curtime;
$result = $model->update($arr, array('id' => $row['id']));
Example #19
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
Helper_Archive::loadModule('common');
$_leaveModule = new CommonModule('sline_leave');
$questionModel = new CommonModule('sline_question');
$leaveAll = $_leaveModule->getAll();
foreach ($leaveAll as $k => $v) {
    $_arr['title'] = $v['title'];
    $_arr['content'] = $v['content'];
    $_arr['replycontent'] = $v['reply'];
    $_arr['replytime'] = $v['retime'];
    $_arr['nickname'] = $v['leavename'];
    $_arr['ip'] = $v['ip'];
    $_arr['status'] = $v['approval'] ? 1 : 0;
    $_arr['addtime'] = $v['addtime'];
    $_arr['qq'] = $v['qq'];
    $_arr['webid'] = $v['webid'];
    $_arr['weixin'] = $v['weixin'];
    $_arr['email'] = $v['email'];
    $_arr['phone'] = $v['phone'];
    $questionModel->add($_arr);
}
Example #20
0
updateVisit($aid, $typeid);
//更新访问量
$row = getCarInfo($aid);
if (empty($row['id'])) {
    head404();
}
$row['price'] = getCarNewRealPrice($aid, $row['webid']);
//当月报价;
$prenext = GetPreNext($aid, $getmonth);
//获取上一条,下一条
foreach ($prenext as $k => $v) {
    $pv->Fields[$k] = $v;
}
//声明各个模型
$_startModule = new CommonModule('sline_startplace');
$_suitModule = new CommonModule('sline_car_suit');
//支付方式
$paytypeArr = explode(',', $GLOBALS['cfg_pay_type']);
if (in_array(1, $paytypeArr)) {
    $GLOBALS['condition']['_haszhifubao'] = 1;
}
if (in_array(2, $paytypeArr)) {
    $GLOBALS['condition']['_haskuaiqian'] = 1;
}
if (in_array(3, $paytypeArr)) {
    $GLOBALS['condition']['_hashuicao'] = 1;
}
if (in_array(4, $paytypeArr)) {
    $GLOBALS['condition']['_hasyinlian'] = 1;
}
if (in_array(5, $paytypeArr)) {
Example #21
0
    }
    echo json_encode(array('status' => $status));
    exit;
}
//加入结伴
if ($action == 'addjoin') {
    $status = 0;
    //手机号码验证
    $preg = '/13[1-9]{1}\\d{8}|15[1-9]\\d{8}|1\\d{10}/';
    if (!preg_match($preg, $mobile)) {
        exit('wrong mobile');
    }
    $memberid = Helper_Archive::autoReg($mobile);
    $memberinfo = Helper_Archive::getMemberInfo($memberid);
    Helper_Archive::loadModule('common');
    $join = new CommonModule('#@__jieban_join');
    $arr = array('jiebanid' => $jiebanid, 'linkman' => $memberinfo['nickname'], 'mobile' => $mobile, 'memberid' => $memberid, 'adultnum' => $adultnum, 'childnum' => $childnum, 'addtime' => time());
    $id = $join->add($arr);
    if ($id) {
        $status = 1;
    }
    echo json_encode(array('status' => $status));
}
//保存session信息
if ($action == 'savesession') {
    @session_start();
    $_SESSION[$key] = $value;
}
if ($action == 'getsession') {
    @session_start();
    return $_SESSION[$key];
Example #22
0
 $ordersn = get_order_sn('05');
 //订单号
 $memberid = $User->uid ? $User->uid : 0;
 $info = getSpotInfo($productautoid);
 $ticketinfo = getTicketInfo($suitid);
 $status = $paytype == 1 ? 1 : 0;
 $total_store = intval($ticketinfo['number']);
 $total_dingnum = intval(Helper_Archive::pregReplace($dingnum, 2));
 if ($total_store != -1 && $total_store < $total_dingnum) {
     echo 'nonumber';
     exit;
 }
 $linktel = Helper_Archive::pregReplace($linktel, 2);
 $arr = array('ordersn' => $ordersn, 'webid' => $webid, 'typeid' => $typeid, 'productautoid' => $productautoid, 'productaid' => $productaid, 'productname' => $productname, 'price' => $ticketinfo['ourprice'], 'childprice' => 0, 'dingnum' => Helper_Archive::pregReplace($dingnum, 2), 'usedate' => $usedate, 'childnum' => $childnum, 'linkman' => Helper_Archive::pregReplace($linkman, 5), 'linktel' => Helper_Archive::pregReplace($linktel, 2), 'linkemail' => Helper_Archive::pregReplace($linkemail, 5), 'linkqq' => '', 'jifentprice' => $ticketinfo['jifentprice'], 'jifenbook' => $ticketinfo['jifenbook'], 'jifencomment' => $ticketinfo['jifencomment'], 'addtime' => time(), 'memberid' => $memberid, 'dingjin' => $dingjin, 'suitid' => $suitid, 'paytype' => $paytype, 'usejifen' => $usejifen, 'needjifen' => $needjifen, 'status' => $status, 'haschild' => 0, 'pid' => 0, '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'] . '/spots/booking.php?dopost=payonline&id=' . $orderid . "&paytype=" . $choosepay;
     } else {
         //$url = "{$GLOBALS['cfg_basehost']}/spots/show_{$arr['productaid']}.html";
         $url = "{$GLOBALS['cfg_basehost']}/member/query.php?dopost=search&mobile={$linktel}";
     }
     $mailto = $cfg_Email139;
     $title = $productname . "门票订单";
     $content = $linkman . "预定" . $usedate . $productname . "(价格:" . $price . ")" . "门票,数量:" . $dingnum . "张" . "联系电话:" . $linktel . "-----" . $GLOBALS['cfg_webname'];
     if (!empty($mailto)) {
         ordermaill($mailto, $title, $content);
     }
     //扣除积分
Example #23
0
function addInsurance($productcasecode, $bookordersn, $num, $memberid, $usedate, $lineday, $tourer)
{
    global $dsql;
    $info = $dsql->GetOne("select * from #@__insurance where productcode='{$productcasecode}'");
    if (empty($info)) {
        return false;
    }
    Helper_Archive::loadModule('common');
    $curtime = time();
    $model = new CommonModule('#@__insurance_booking');
    $arr['bookordersn'] = $bookordersn;
    $arr['productcasecode'] = $productcasecode;
    $arr['insurednum'] = $num;
    $arr['memberid'] = $memberid;
    $arr['payprice'] = $info['ourprice'] * $num * $lineday;
    $arr['begindate'] = $usedate;
    $arr['enddate'] = date('Y-m-d', strtotime($usedate) + ($lineday - 1) * 24 * 3600);
    $arr['ordersn'] = 'INS' . $curtime . mt_rand(11, 99);
    $arr['addtime'] = $curtime;
    $arr['modtime'] = $curtime;
    $result = $model->add($arr);
    if ($result) {
        $index = 1;
        foreach ($tourer as $k => $v) {
            $insuredModel = new CommonModule('#@__insurance_booking_tourer');
            $row = array();
            $row['name'] = $v['tourername' . $index];
            $row['sex'] = $v['tourersex' . $index] == '女' ? 0 : 1;
            $row['mobile'] = $v['tourermobile' . $index];
            $row['cardcode'] = $v['tourercard' . $index];
            $row['cardtype'] = getCardType($v['tourercardtype' . $index]);
            $row['orderid'] = $result;
            $row['count'] = 1;
            $row['insurantrelation'] = 6;
            $insuredModel->add($row);
            $index++;
        }
    }
    return $result;
}
Example #24
0
function getHotelExistAttr($attrid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__hotel_attr');
    $arr = explode(',', $attrid);
    $group = array();
    foreach ($arr as $id) {
        $row = $model->getOne("id='{$id}'");
        $attrname = $row['attrname'];
        $groupname = $model->getField('attrname', "id='{$row['pid']}'");
        $group[$groupname][] = $attrname;
    }
    foreach ($group as $key => $value) {
        $out .= "<p>" . $key . ":" . implode(',', $value) . '</p>';
    }
    return $out;
}
Example #25
0
function getHotelService($attrid, $groupid)
{
    global $dsql;
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__hotel_attr');
    $attr = explode(',', $attrid);
    foreach ($attr as $id) {
        $name = $_model->getField('attrname', "pid='{$groupid}' and id='{$id}'");
        $out .= !empty($name) ? $name . '|' : '';
    }
    return $out;
}