Esempio n. 1
0
 function form_room(&$RoomObj, &$hotelList, &$TypeList)
 {
     $this->Obj =& $RoomObj;
     $this->hotelList =& $hotelList;
     $this->TypeList =& $TypeList;
     $this->RoomBedTypeList = getModuleArray('room_bed_type', 'order_type', true);
     $this->XoopsThemeForm('酒店客房', "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Esempio n. 2
0
 /**
  * form_room constructor.
  * @param $RoomObj
  * @param $hotelList
  * @param $TypeList
  */
 public function __construct(&$RoomObj, &$hotelList, &$TypeList)
 {
     $this->Obj =& $RoomObj;
     $this->hotelList =& $hotelList;
     $this->TypeList =& $TypeList;
     $this->RoomBedTypeList = getModuleArray('room_bed_type', 'order_type', true);
     parent::__construct(_AM_MARTIN_HOTEL_ROOMS, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Esempio n. 3
0
 function form_order(&$OrderObj)
 {
     //array
     $this->OrderType = getModuleArray('order_type', 'order_type', true);
     $this->OrderMode = getModuleArray('order_mode', 'order_mode', true);
     $this->OrderPayMethod = getModuleArray('order_pay_method', 'order_pay_method', true);
     $this->OrderStatus = getModuleArray('order_status', 'order_status', true);
     $this->OrderDocumentType = getModuleArray('order_document_type', 'order_document_type', true);
     //print_r($this->OrderStatus);exit;
     $this->Obj =& $OrderObj;
     $this->XoopsThemeForm('订单信息', "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Esempio n. 4
0
 /**
  * form_order constructor.
  * @param $OrderObj
  */
 public function __construct(&$OrderObj)
 {
     //array
     $this->OrderType = getModuleArray('order_type', 'order_type', true);
     $this->OrderMode = getModuleArray('order_mode', 'order_mode', true);
     $this->OrderPayMethod = getModuleArray('order_pay_method', 'order_pay_method', true);
     $this->OrderStatus = getModuleArray('order_status', 'order_status', true);
     $this->OrderDocumentType = getModuleArray('order_document_type', 'order_document_type', true);
     //print_r($this->OrderStatus);exit;
     $this->Obj =& $OrderObj;
     parent::__construct(_AM_MARTIN_ORDER_INFORMATION, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Esempio n. 5
0
/**
 * hoel search show function
 * @param $options
 * @return
 */
function martin_hotel_search_show($options)
{
    global $xoopsModuleConfig, $xoopsModule, $xoopsTpl;
    //新闻
    /*if($xoopsModule->dirname() != 'martin')
      {*/
    $module_handler =& xoops_gethandler('module');
    $config_handler =& xoops_gethandler('config');
    $xoopsModule =& $module_handler->getByDirname('martin');
    $xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
    /*}*/
    //var_dump($xoopsModuleConfig);
    include_once XOOPS_ROOT_PATH . '/modules/martin/include/functions.php';
    $hotel_handler =& xoops_getmodulehandler("hotel", 'martin');
    $group_handler =& xoops_getmodulehandler("group", 'martin');
    $auction_handler =& xoops_getmodulehandler("auction", 'martin');
    $news_handler =& xoops_getmodulehandler("hotelnews", 'martin');
    $hotel_guide = explode(",", $xoopsModuleConfig['hotel_guide']);
    $hotel_today_special = explode(",", $xoopsModuleConfig['hotel_today_special']);
    $hotel_news_ids = is_array($hotel_guide) && is_array($hotel_today_special) ? array_merge($hotel_guide, $hotel_today_special) : null;
    $hotelnews = $news_handler->GetHotelNews($hotel_news_ids);
    $hotel_guide_rows = array();
    $hotel_today_special_rows = array();
    foreach ($hotelnews as $key => $row) {
        if (in_array($key, $hotel_guide) && count($hotel_guide_rows) < 6) {
            $hotel_guide_rows[] = $row;
        }
        if (in_array($key, $hotel_today_special) && count($hotel_today_special_rows) < 6) {
            $hotel_today_special_rows[] = $row;
        }
    }
    $block['module_url'] = XOOPS_URL . '/modules/martin/';
    $block['hotelrank'] = getModuleArray('hotelrank', 'hotelrank', true, null, $xoopsModuleConfig);
    $block['groupList'] = $group_handler->GetGroupList();
    $block['auctionList'] = $auction_handler->GetAuctionList();
    $block['hotel_guide_rows'] = $hotel_guide_rows;
    $block['hotel_today_special_rows'] = $hotel_today_special_rows;
    $block['cityList'] = $hotel_handler->GetCityList('WHERE city_parentid = 0');
    $block['hotel_static_prefix'] = $xoopsModuleConfig['hotel_static_prefix'];
    unset($hotel_handler, $group_handler, $auction_handler, $news_handler, $hotel_guide_rows, $hotel_today_special_rows);
    //var_dump($block);
    return $block;
}
Esempio n. 6
0
 /**
  * @get       hotel room
  * @计算平均值
  * @license   http://www.blags.org/
  * @created   :2010年06月14日 20时47分
  * @copyright 1997-2010 The Martin Group
  * @author    Martin <*****@*****.**>
  * @param $hotel_id
  * @return array
  */
 public function GetHotelRoom($hotel_id)
 {
     if (!$hotel_id > 0) {
         return null;
     }
     global $xoopsDB;
     $time = strtotime(date('Y-m-d'));
     $RoomBedTypeList = getModuleArray('room_bed_type', 'order_type', true);
     $sql = "SELECT r.*,rt.room_type_info,rp.*,\n            GROUP_CONCAT(rp.room_price) as room_prices,GROUP_CONCAT(rp.room_date) as room_dates ,\n            GROUP_CONCAT(rp.room_sented_coupon) as room_sented_coupons\n            FROM {$xoopsDB->prefix("martin_room")} r\n            INNER JOIN {$xoopsDB->prefix("martin_room_type")} rt ON (rt.room_type_id = r.room_type_id) ";
     $sql .= "INNER JOIN {$xoopsDB->prefix("martin_room_price")} rp ON (r.room_id = rp.room_id) WHERE ";
     $sql .= $this->check_date ? "rp.room_date BETWEEN {$this->check_date[0]} AND {$this->check_date[1]} " : "rp.room_date = {$time} ";
     $sql .= "AND r.hotel_id = {$hotel_id} AND r.room_status = 1 GROUP BY r.room_id ORDER BY r.room_sented_coupon DESC , r.room_id DESC ";
     //echo $sql;
     $rows = array();
     $result = $xoopsDB->query($sql);
     while ($row = $xoopsDB->fetchArray($result)) {
         $room_dates = array();
         $room_all_price = 0;
         $room_all_sended_coupon = 0;
         $row['room_prices'] = explode(",", $row['room_prices']);
         $row['room_dates'] = explode(",", $row['room_dates']);
         $row['room_sented_coupons'] = explode(",", $row['room_sented_coupons']);
         foreach ($row['room_prices'] as $key => $room_price) {
             $d = $row['room_dates'][$key];
             $room_sented_coupon = $row['room_sented_coupons'][$key];
             if ($d >= $this->check_date[0] && $d < $this->check_date[1]) {
                 $room_all_price += $room_price;
                 $room_all_sended_coupon += $room_sented_coupon;
                 $room_prices[] = array('date' => date('Y-m-d', $d), 'price' => $room_price);
             }
         }
         unset($row['room_prices'], $row['room_dates'], $row['room_sented_coupons']);
         $row['room_prices'] = $room_prices;
         if ($this->check_date) {
             $row['room_price'] = round($room_all_price / $key, 2);
             $row['room_sented_coupon'] = round($room_all_sended_coupon / $key, 2);
         }
         $row['room_bed_type'] = $RoomBedTypeList[$row['room_bed_type']];
         $rows[] = $row;
         unset($row, $room_prices);
     }
     return $rows;
 }
Esempio n. 7
0
            $change_url = XOOPS_URL . '/hotel/';
        } else {
            $pay_file = MARTIN_ROOT_PATH . "pay/{$order_pay}/{$order_pay}.php";
            if (file_exists($pay_file)) {
                include $pay_file;
            }
            exit;
            $msg = _AM_MARTIN_GOING_TO_PAYMENT_PAGE;
            $change_url = XOOPS_URL . '/hotel/';
        }
        redirect_header($change_url, 2, $msg);
        exit;
    } else {
        redirect_header('javascript:history.go(-1);', 1, _AM_MARTIN_NO_CHOICE_OF_PAYMENT);
    }
}
//var_dump($order['order_pay']);
$xoopsOption["template_main"] = "martin_hotel_pay.tpl";
include XOOPS_ROOT_PATH . '/header.php';
include XOOPS_ROOT_PATH . '/modules/martin/HotelSearchLeft.php';
$xoopsOption['xoops_pagetitle'] = _AM_MARTIN_PAYMENT_OPTIONS;
// - '.$xoopsConfig['sitename'];
$xoopsTpl->assign("xoops_pagetitle", $xoopsOption["xoops_pagetitle"]);
$xoopsTpl->assign('hotel_static_prefix', $xoopsModuleConfig['hotel_static_prefix']);
$xoopsTpl->assign('module_url', MODULE_URL);
$xoopsTpl->assign('order_id', $order_id);
$xoopsTpl->assign('order_pay', $order['order_pay']);
$xoopsTpl->assign('order_pay_str', $order['order_pay_str']);
$xoopsTpl->assign('line_pays', getModuleArray('line_pays', 'line_pays', true));
$xoopsTpl->assign('online_pays', getModuleArray('online_pays', 'online_pays', true));
include XOOPS_ROOT_PATH . '/footer.php';
Esempio n. 8
0
         ${$key} = intval($value);
     }
 }
 $pagenav = new XoopsPageNav($Count, $xoopsModuleConfig['perpage'], $start, 'start', $searchStr);
 $pavStr = '<div style="text-align:left;">' . $pagenav->renderNav() . '</div>';
 //html
 $htmlStar = getModuleArray('hotelrank', 'hotel_star');
 $htmlOrderType = getModuleArray('order_type', 's[order_type]', false, $order_type);
 $htmlOrderMode = getModuleArray('order_mode', 's[order_mode]', false, $order_mode);
 $htmlOrderPayMethod = getModuleArray('order_pay_method', 's[order_pay_method]', false, $order_pay_method);
 $htmlOrderStatus = getModuleArray('order_status', 's[order_status]', false, $order_status);
 //array
 $OrderType = getModuleArray('order_type', 'order_type', true);
 $OrderMode = getModuleArray('order_mode', 'order_mode', true);
 $OrderPayMethod = getModuleArray('order_pay_method', 'order_pay_method', true);
 $OrderStatus = getModuleArray('order_status', 'order_status', true);
 $selectedHotel = is_null($hotel_name) ? '' : "\n<option value='{$hotel_id}' selected='selected'>{$hotel_name}</option>";
 $htmlHotel = "<span id='hotel_name_div'><SELECT name='s[hotel_id]' onchange='hotel_select(this)'><option value='0'>----</option>{$selectedHotel}</SELECT></span><span id='hotel_name'></span>";
 $Status = array('<div style="background-color:#FF0000">编辑中</div>', '<div style="background-color:#00FF00">已发布</div>');
 //$htmlStar = getModuleArray('hotelrank','hotel_star');
 $OrderObjs = $Count > 0 ? $order_handler->getOrders($searchData, $xoopsModuleConfig['perpage'], $start, 0) : null;
 // Creating the objects for top categories
 echo "{$pavStr}<table width='100%' cellspacing=1 cellpadding=9 border=0 class = outer>";
 echo "<tr><td class='bg3' align='left'>\n\t\t\t<form action='' id='orderSearch' method='get'>\n\t\t\t酒店区域:{$hotelcity_handler->getTree('hotel_city_id', $_GET['hotel_city_id'])}\n\t\t\t酒店星级:{$htmlStar}\n\t\t\t酒店名称:{$htmlHotel}\n\t\t\t预定方式:{$htmlOrderType}\n\t\t\t支付方式:{$htmlOrderPayMethod}\n\t\t\t订单类型:{$htmlOrderMode}\n\t\t\t订单状态:{$htmlOrderStatus}\n\t\t\t</td></tr><tr><td class='bg3' align='right'>\n\t\t\t<input type='submit' value='搜索'></td>\n\t\t\t</form></tr>";
 echo "</table>";
 echo "<table width='100%' cellspacing=1 cellpadding=14 border=0 class = outer>";
 echo "<td class='bg3' width=10 align='left'><b>ID</b></td>";
 echo "<td class='bg3' align='left'><b>预定方式</b></td>";
 echo "<td class='bg3' align='left'><b>订单模式</b></td>";
 echo "<td class='bg3' align='left'><b>支付方式</b></td>";
 echo "<td class='bg3' align='left'><b>状态</b></td>";
Esempio n. 9
0
<?php

/**
 * @member    coupon list
 * @license   http://www.blags.org/
 * @created   :2010年07月15日 20时25分
 * @copyright 1997-2010 The Martin Group
 * @author    Martin <*****@*****.**>
 * */
$hotel_handler =& xoops_getmodulehandler("hotel", 'martin');
$search_handler =& xoops_getmodulehandler("search", 'martin');
$member_handler =& xoops_getmodulehandler("member", 'martin');
$xoopsOption['xoops_pagetitle'] = '我的现金卷 - 用户中心';
$coupons = $member_handler->GetCouponList($start);
$coupon_types = getModuleArray('coupon_types', 'coupon_types', true);
//var_dump($hotels);
$Count = $coupons['count'];
unset($coupons['count']);
//分页
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($Count, $xoopsModuleConfig['front_perpage'], $start, 'start', "");
$xoopsTpl->assign('coupons', $coupons);
$xoopsTpl->assign('coupon_types', $coupon_types);
$xoopsTpl->assign('pagenav', $pagenav->MartinNav(4, MEMBER_URL . "?{$action}&amp;start="));
Esempio n. 10
0
 /**
  * @get order info
  * @method:
  * @license http://www.blags.org/
  * @created:2010年07月05日 20时22分
  * @copyright 1997-2010 The Martin Group
  * @author Martin <*****@*****.**> 
  * */
 function GetOrderInfo($order_id)
 {
     if (!$order_id || !is_int($order_id)) {
         return $order_id;
     }
     global $xoopsDB, $xoopsModuleConfig;
     $sql = "SELECT * FROM " . $xoopsDB->prefix("martin_order") . " WHERE order_id = " . $order_id;
     $row = $xoopsDB->fetchArray($xoopsDB->query($sql));
     if (empty($row)) {
         return $row;
     }
     $order_pay_method = getModuleArray('order_pay_method', 'order_pay_method', true);
     $row['order_pay_method'] = intval($row['order_pay_method']);
     $pays = (int) $row['order_pay_method'] == 2 ? getModuleArray('line_pays', 'line_pays', true) : getModuleArray('online_pays', 'online_pays', true);
     //var_dump($pays);
     $row['order_pay_str'] = isset($pays[$row['order_pay']]) ? $pays[$row['order_pay']] : null;
     $row['order_pay_method'] = isset($order_pay_method['order_pay_method']) ? $order_pay_method['order_pay_method'] : null;
     //var_dump($row);
     $sql = "SELECT r.room_name,r.room_bed_info,h.hotel_name,h.hotel_alias FROM " . $xoopsDB->prefix("martin_room") . " r \n\t\t\tINNER JOIN " . $xoopsDB->prefix("martin_hotel") . " h ON (r.hotel_id = h.hotel_id) \n\t\t\tINNER JOIN " . $xoopsDB->prefix("martin_order_room") . " mor ON (r.room_id = mor.room_id) WHERE mor.order_id = {$order_id} LIMIT 1";
     $row_room = $xoopsDB->fetchArray($xoopsDB->query($sql));
     $row['room_name'] = $row_room['hotel_name'] . '-' . $row_room['room_name'];
     $row['hotel_name'] = $row_room['hotel_name'];
     $row['room_info'] = $row_room['room_bed_info'];
     $row['room_url'] = XOOPS_URL . "/hotel-" . $row_room['hotel_alias'] . $xoopsModuleConfig['hotel_static_prefix'];
     unset($row_room);
     return $row;
 }
Esempio n. 11
0
<?php

include_once __DIR__ . '/admin_header.php';
/*
 * 处理
 **/
//头部
include "martin.header.php";
$currentFile = basename(__FILE__);
$myModuleAdmin = new ModuleAdmin();
echo $myModuleAdmin->addNavigation($currentFile);
// martin_adminMenu(0, "订房后台 > 支付方式配置");
global $xoopsModuleConfig;
$line_pays = getModuleArray('line_pays', 'line_pays', true);
$online_pays = getModuleArray('online_pays', 'online_pays', true);
$action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action'];
$action = empty($action) ? 'list' : $action;
$key = isset($_POST['key']) ? $_POST['key'] : @$_GET['key'];
$config_path = MARTIN_ROOT_PATH . "pay/{$key}/config/";
$ini_file = $config_path . "ini.php";
$config_file = $config_path . "config.php";
switch ($action) {
    case "list":
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_PAY_BY, '');
        if (is_array($online_pays)) {
            echo "<table width='100%' cellspacing=1 cellpadding=2 border=0 class = outer>";
            echo "<tr>";
            echo "<td class='bg3' align='left'><b>" . _AM_MARTIN_PAYMENT_KEY . "</b></td>";
            echo "<td class='bg3' align='left'><b>" . _AM_MARTIN_PAYMENT_NAME . "</b></td>";
            echo "<td width='60' class='bg3' align='center'><b>_AM_MARTIN_ACTIONS</b></td>";
            echo "</tr>";
Esempio n. 12
0
$hotel_guide = explode(",", $xoopsModuleConfig['hotel_guide']);
$hotel_today_special = explode(",", $xoopsModuleConfig['hotel_today_special']);
$hotel_news_ids = is_array($hotel_guide) && is_array($hotel_today_special) ? array_merge($hotel_guide, $hotel_today_special) : null;
$hotelnews = $news_handler->GetHotelNews($hotel_news_ids);
$hotel_guide_rows = array();
$hotel_today_special_rows = array();
foreach ($hotelnews as $key => $row) {
    if (in_array($key, $hotel_guide) && count($hotel_guide_rows) < 6) {
        $hotel_guide_rows[] = $row;
    }
    if (in_array($key, $hotel_today_special) && count($hotel_today_special_rows) < 6) {
        $hotel_today_special_rows[] = $row;
    }
}
ob_start();
$Tpl = new xoopsTpl();
$Tpl->assign('module_url', XOOPS_URL . '/modules/martin/');
$Tpl->assign("hotelrank", getModuleArray('hotelrank', 'hotelrank', true));
$Tpl->assign('hotelrankcount', $hotel_handler->getHotelRankCount());
$Tpl->assign('ViewedHotels', $hotel_handler->GetViewedHotels($ViewedhotelIDs));
$Tpl->assign('groupList', $group_handler->GetGroupList());
$Tpl->assign('auctionList', $auction_handler->GetAuctionList());
$Tpl->assign('hotel_guide_rows', $hotel_guide_rows);
$Tpl->assign('hotel_today_special_rows', $hotel_today_special_rows);
$Tpl->assign('cityList', $hotel_handler->GetCityList('WHERE city_parentid = 0'));
$Tpl->assign('hotel_static_prefix', $xoopsModuleConfig['hotel_static_prefix']);
$Tpl->assign('isNewsModule', $isNewsModule);
$Tpl->display('db:martin_hotel_search_left.html');
$xoopsTpl->assign('martin_hotel_search_left', ob_get_contents());
ob_end_clean();
unset($Tpl, $news_handler, $hotel_guide_rows, $hotel_today_special_rows);
Esempio n. 13
0
$next_url = $next_url >= $total_p ? 0 : $next_url;
$next_url = $next_url == 0 ? $next_url : $this_url . '&amp;p=' . $next_url;
$xoopsOption["template_main"] = "martin_hotel_search.tpl";
include XOOPS_ROOT_PATH . '/header.php';
include XOOPS_ROOT_PATH . '/modules/martin/HotelSearchLeft.php';
$xoopsOption['xoops_pagetitle'] = $select_title . ' - 酒店搜索预定';
// - '.$xoopsConfig['sitename'];
$xoopsTpl->assign('check_in_date_count', (int) (($check_date[1] - $check_date[0]) / (3600 * 24)));
$xoopsTpl->assign("xoops_pagetitle", $xoopsOption["xoops_pagetitle"]);
$xoopsTpl->assign('hotel_static_prefix', $xoopsModuleConfig['hotel_static_prefix']);
$xoopsTpl->assign('check_date', isset($_GET['CheckDate']) ? $_GET['CheckDate'] : '');
$xoopsTpl->assign('check_in_date', strtotime(isset($_GET['CheckDate']) ? $_GET['CheckDate'][0] : ''));
$xoopsTpl->assign('check_out_date', strtotime(isset($_GET['CheckDate']) ? $_GET['CheckDate'][1] : ''));
$xoopsTpl->assign('module_url', XOOPS_URL . '/modules/martin/');
$xoopsTpl->assign('hotelrank', $hotelrank);
$xoopsTpl->assign('bedtype', getModuleArray('room_bed_type', 'room_bed_type', true));
$xoopsTpl->assign('select_title', $select_title);
$xoopsTpl->assign('count', $HotelData['count']);
unset($HotelData['count']);
$xoopsTpl->assign('hotels', $HotelData);
$xoopsTpl->assign('rooms', $rooms);
$xoopsTpl->assign('this_url', $this_url);
$xoopsTpl->assign('prev_url', $prev_url);
$xoopsTpl->assign('next_url', $next_url);
$xoopsTpl->assign('by', $by);
$xoopsTpl->assign('order', $order);
$xoopsTpl->assign('this_by', $by === 'DESC' ? 'asc' : 'desc');
$xoopsTpl->assign('check_date_str', "?check_in_date={$check_date[0]}&amp;check_out_date={$check_date[1]}");
$xoopsTpl->assign("googleApi", $xoopsModuleConfig['google_api']);
$xoopsTpl->assign("google_w_h", array_filter(explode("|", $xoopsModuleConfig['google_width_height'])));
$xoopsTpl->assign("module_config", $xoopsModuleConfig);
Esempio n. 14
0
<?php

/**
 * @用户资料
 * @license   http://www.blags.org/
 * @created   :2010年07月15日 20时25分
 * @copyright 1997-2010 The Martin Group
 * @author    Martin <*****@*****.**>
 * */
$UserNationnality = getModuleArray('user_nationality', 'user_nationality', true);
$OrderDocumentType = getModuleArray('order_document_type', 'order_document_type', true);
$xoopsOption['xoops_pagetitle'] = '资料修改 - 用户中心';
//数据保存
if ($_POST['uid'] > 0) {
    $_POST['telephone'] = implode('-', $_POST['telephone']);
    $member_handler =& xoops_gethandler('member');
    $edituser =& $member_handler->getUser($xoopsUser->uid());
    if (!empty($_POST['passwd'])) {
        if ($_POST['passwd_check'] != $_POST['passwd']) {
            redirect_header(MEMBER_URL . '?info', 1, '密码输入不一致.');
        } else {
            $edituser->setVar('pass', md5($_POST['passwd']));
        }
    }
    unset($_POST['uid'], $_POST['passwd_check']);
    if (is_array($_POST)) {
        foreach ($_POST as $key => $value) {
            $edituser->setVar($key, $value);
        }
    }
    //var_dump($edituser);exit;
Esempio n. 15
0
$search_handler =& xoops_getmodulehandler("search", 'martin');
$member_handler =& xoops_getmodulehandler("member", 'martin');
$review_handler =& xoops_getmodulehandler("review", 'martin');
$hotel_id = isset($_GET['hotel_id']) ? (int) $_GET['hotel_id'] : (int) $_POST['hotel_id'];
$hotel = $hotel_handler->get($hotel_id);
if (!$hotel_id || !$hotel) {
    redirect_header('javascript:history.go(-1);', 2, '该酒店不存在.');
}
$xoopsOption['xoops_pagetitle'] = '点评 - ' . $hotel->hotel_name() . ' - 用户中心';
if (is_array($_POST) && !empty($_POST)) {
    $review_type = $_POST['review_type'];
    $review_purpose = (int) $_POST['review_purpose'];
    $review_content = trim($_POST['review_content']);
    $review_type_avg = round(array_sum($review_type) / count($review_type), 2);
    $uid = $xoopsUser->uid();
    $Data = array('hotel_id' => $hotel_id, 'uid' => $uid, 'review_type_1' => $review_type[1], 'review_type_2' => $review_type[2], 'review_type_3' => $review_type[3], 'review_type_4' => $review_type[4], 'review_type_avg' => $review_type_avg, 'review_purpose' => $review_purpose, 'review_content' => "'" . $review_content . "'", 'submit_time' => time());
    //var_dump($review_type);exit;
    if ($review_handler->SaveReview($Data)) {
        redirect_header(MEMBER_URL . '?lived', 2, '点评成功.');
    }
}
//$hotels = $member_handler->GetHotelList($start);
//var_dump($hotels);
//$Count = $hotels['count'];
//unset($hotels['count']);
//分页
$xoopsTpl->assign('review', $review_handler->GetReview($hotel_id));
$xoopsTpl->assign('hotel', $hotel);
$xoopsTpl->assign('hotel_review_type', getModuleArray('hotel_review_type', 'hotel_review_type', true));
$xoopsTpl->assign('hotel_trip_purpose', getModuleArray('hotel_trip_purpose', 'hotel_trip_purpose', true));
Esempio n. 16
0
//var_dump($hotel_service);
$hotelrank = getModuleArray('hotelrank', 'hotelrank', true);
$hotel_data['promotion'] = $promotion_handler->getHotelPromotion($hotel_id);
$xoopsOption["template_main"] = $isFind ? "martin_hotel_find_book.tpl" : "martin_hotel_book.tpl";
$select_title = '您选择了 ' . $hotel_data['hotel_name'];
include XOOPS_ROOT_PATH . '/header.php';
include XOOPS_ROOT_PATH . '/modules/martin/HotelSearchLeft.php';
$xoopsOption['xoops_pagetitle'] = $select_title . ' - 酒店预定';
// - '.$xoopsConfig['sitename'];
$xoopsTpl->assign('check_date_count', $check_date_count);
$xoopsTpl->assign("xoops_pagetitle", $xoopsOption["xoops_pagetitle"]);
$xoopsTpl->assign('hotel_static_prefix', $xoopsModuleConfig['hotel_static_prefix']);
$xoopsTpl->assign('module_url', MODULE_URL);
$xoopsTpl->assign('this_url', $this_url);
$xoopsTpl->assign('hotelrank', $hotelrank);
$xoopsTpl->assign('order_document_type', getModuleArray('order_document_type', 'order_document_type', true));
$xoopsTpl->assign('hotel', $hotel_data);
$xoopsTpl->assign('hotel_service', $hotel_service);
$xoopsTpl->assign('room_price', $room_price);
$xoopsTpl->assign('rooms', $rooms);
$xoopsTpl->assign('check_arr', $check_arr);
$xoopsTpl->assign('user', $user);
$xoopsTpl->assign('room_id', $room_id);
$xoopsTpl->assign('hotel_id', $hotel_id);
$xoopsTpl->assign('check_in_date', $check_in_date);
$xoopsTpl->assign('check_out_date', $check_out_date);
$xoopsTpl->assign('person_exchange_price', $xoopsUser->total_coupon());
session_start();
//防止重复提交
$Form_Validate = md5(rand(1000, 10000));
$_SESSION['Form_Validate'] = $Form_Validate;