Esempio n. 1
0
            break;
    }
    if ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW' && $column_list[$col] != 'PRODUCT_LIST_IMAGE') {
        $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col + 1, $lc_text);
    }
    $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' ');
}
//  echo "test   :".$room_number."dddddddddd". $listing2['1'] ;
if ($listing_split->number_of_rows > 0) {
    $rows = 0;
    $listing_query = tep_db_query($listing_split->sql_query);
    while ($listing = tep_db_fetch_array($listing_query)) {
        $rows++;
        $room_type_id = $listing['room_type_id'];
        //if(getroomtype($listing['room_type_id'],$listing2[$room_type_id])>=(int)$room_number){
        if (testAllDay($room_type_id, $room_number, $dayto, $daygo) == 1) {
            if ($rows / 2 == floor($rows / 2)) {
                $list_box_contents[] = array('params' => 'class="productListing-even"');
            } else {
                $list_box_contents[] = array('params' => 'class="productListing-odd"');
            }
            $cur_row = sizeof($list_box_contents) - 1;
            for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) {
                $lc_align = '';
                $flag1 = 1;
                switch ($column_list[$col]) {
                    case 'PRODUCT_LIST_NAME':
                        $lc_align = '';
                        if (isset($HTTP_GET_VARS['room_type_categories'])) {
                            $p_name = $lc_text = '<a href="' . tep_href_link("chitietphong.php", 'room_type_id=' . $listing['room_type_id']) . '">' . $listing['room_type_name'] . '</a>';
                        } else {
Esempio n. 2
0
} else {
    $songayo = 1;
}
$dayto = $HTTP_GET_VARS['dayto'];
$daygo = $HTTP_GET_VARS['daygo'];
if (isset($daygo)) {
    $ngayden = $dayto;
    $ngaydi = $daygo;
    $songayo = NumDayStay($ngayden, $ngaydi);
    $sofong = $HTTP_GET_VARS['count_room'];
} else {
    $ngayden = date("Y-m-d", mktime(0, 0, 0, $_GET['comingmonth'], $_GET['comingdate'], $_GET['comingyear']));
    $ngaydi = date("Y-m-d", mktime(0, 0, 0, $_GET['leavingmonth'], $_GET['leavingdate'], $_GET['leavingyear']));
    $sofong = 1;
}
if (testAllDay($id, $songayo, $ngayden, $ngaydi) == 1) {
    if (isset($_SESSION['cart_room'])) {
        $flag = 0;
        foreach ($_SESSION['cart_room'] as $cartItems) {
            if ($cartItems['roomtypeId'] == $id) {
                $flag = 1;
                $keys = array_search($cartItems, $_SESSION['cart_room']);
                $qty = $cartItems['qty'] + $sofong;
                $cartItems['qty'] = $qty;
                $cartItems['staydate'] = $songayo;
                $cartItems['dayto'] = $ngayden;
                $cartItems['daygo'] = $ngaydi;
                $_SESSION['cart_room'][$keys] = $cartItems;
            }
        }
        if ($flag == 0) {