Пример #1
0
        ?>
' displayText='Email'></span>
							</div>
						</div> 
					</div>
					<div class="item-price">
					<?php 
        $roomsResult = $commonController->getTableData(array('select' => 'MIN(rate) as min_rate', 'table' => 'establishment_rooms', 'where' => array('establishment_id=' . $row['id'], 'status=1'), 'groupBy' => 'establishment_id'));
        if (mysql_num_rows($roomsResult)) {
            $rowRooms = mysql_fetch_array($roomsResult);
            ?>
						<div class="price-cell">
							<div class="price-cols green right-border">
								<div class="price-label">Availabe / From</div>    
								<div class="price-final"><?php 
            echo $_SESSION['currency_symbol'] . ' ' . number_format($commonController->currencyConverter('ZAR', $_SESSION['currency'], $rowRooms['min_rate']), 2);
            ?>
</div>
								<div class="price-per">per room</div>
							</div>
							<?php 
            if (!empty($rowDeal['discount'])) {
                ?>
							<div class="price-cols orange">
								<div class="price-label">Last Minute Deal Price</div>    
								<div class="price-final"><?php 
                echo $_SESSION['currency_symbol'] . ' ' . number_format($commonController->currencyConverter('ZAR', $_SESSION['currency'], $rowRooms['min_rate'] - $rowRooms['min_rate'] * $rowDeal['discount'] / 100), 2);
                ?>
								</div>
								<div class="price-per">per room</div>
							</div>
Пример #2
0
			<td><input type="text" name="product_name" value="<?php 
echo $rowPackages['name'];
?>
" /></td>
		</tr>
		<tr>
			<td><label>Product Quantity</label></td>
			<td><input type="text" name="product_quantity" value="<?php 
echo 1;
?>
" /></td>
		</tr>
		<tr>
			<td><label>Product Amount</label></td>
			<td><input type="text" name="product_amount" value="<?php 
echo number_format($commonController->currencyConverter('ZAR', 'USD', $rowPackages['price']), 2);
?>
" /></td>
		</tr>
		<tr>
			<td><label>Payer First Name</label></td>
			<td><input type="text" name="payer_fname" value="<?php 
echo $user['firstname'];
?>
" /></td>
		</tr>
		<tr>
			<td><label>Payer Last Name</label></td>
			<td><input type="text" name="payer_lname" value="<?php 
echo $user['lastname'];
?>
     $dataAccommodation['table'] = 'accommodations a LEFT JOIN establishments_accommodations ea ON ea.accommodation_id = a.id';
     $dataAccommodation['where'] = array('ea.establishment_id = ' . $row['id']);
     $dataAccommodation['order'] = 'a.name ASC';
     $resultAccommodation = $commonController->getTableData($dataAccommodation);
     if (mysql_num_rows($resultAccommodation)) {
         while ($rowAccommodation = mysql_fetch_array($resultAccommodation)) {
             $accommodationName[] = $rowAccommodation['name'];
         }
         if (!empty($accommodationName)) {
             $mapResult[$index]['accommodation'] = implode(", ", $accommodationName);
         }
     }
     $roomsResult = $commonController->getTableData(array('select' => 'MIN(rate) as min_rate', 'table' => 'establishment_rooms', 'where' => array('establishment_id=' . $row['id'], 'status=1'), 'groupBy' => 'establishment_id'));
     if (mysql_num_rows($roomsResult)) {
         $rowRooms = mysql_fetch_array($roomsResult);
         $mapResult[$index]['price'] = $_SESSION['currency_symbol'] . ' ' . number_format($commonController->currencyConverter('ZAR', $_SESSION['currency'], $rowRooms['min_rate']), 2);
         if (!empty($rowDeal['discount'])) {
             $mapResult[$index]['discounted_price'] = $_SESSION['currency_symbol'] . ' ' . number_format($commonController->currencyConverter('ZAR', $_SESSION['currency'], $rowRooms['min_rate'] - $rowRooms['min_rate'] * $rowDeal['discount'] / 100), 2);
         }
         $mapResult[$index]['discounted_price'] = $mapResult[$index]['price'];
         $mapResult[$index]['ratings'] = 0;
         $resultRatings = $commonController->getTableData(array('select' => 'AVG(ratings) avgRating', 'table' => 'establishment_ratings', 'where' => array('establishment_id=' . $row['id'])));
         if (mysql_num_rows($resultRatings)) {
             $rowRatings = mysql_fetch_array($resultRatings);
             $mapResult[$index]['ratings'] = round($rowRatings['avgRating']);
         }
     }
     $index++;
 }
 $mapResult['total_length'] = $index;
 echo json_encode($mapResult, JSON_FORCE_OBJECT);
Пример #4
0
			<td><input type="text" name="product_name" value="<?php 
echo $rowRooms['name'];
?>
" /></td>
		</tr>
		<tr>
			<td><label>Product Quantity</label></td>
			<td><input type="text" name="product_quantity" value="<?php 
echo 1;
?>
" /></td>
		</tr>
		<tr>
			<td><label>Product Amount</label></td>
			<td><input type="text" name="product_amount" value="<?php 
echo number_format($commonController->currencyConverter('ZAR', 'USD', $price), 2);
?>
" /></td>
		</tr>
		<tr>
			<td><label>Payer First Name</label></td>
			<td><input type="text" name="payer_fname" value="<?php 
echo $user['firstname'];
?>
" /></td>
		</tr>
		<tr>
			<td><label>Payer Last Name</label></td>
			<td><input type="text" name="payer_lname" value="<?php 
echo $user['lastname'];
?>