Ejemplo n.º 1
0
function getPeopleGroup($suitid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__line_suit');
    $group = $model->getOne("id='{$suitid}'", null, 'propgroup,jifentprice,jifenbook');
    return $group;
}
Ejemplo n.º 2
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;
}
Ejemplo n.º 3
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'];
}
Ejemplo n.º 4
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);
    }
}
Ejemplo n.º 5
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') {
    if ($type == 'phone') {
Ejemplo n.º 6
0
function getExtendModelInfo($typeid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__model');
    $row = $model->getOne("id='{$typeid}'");
    return $row;
}
Ejemplo n.º 7
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";
//默认模板
$pv->SetTemplet($templet);