當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonController::currencyConverter方法代碼示例

本文整理匯總了PHP中CommonController::currencyConverter方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonController::currencyConverter方法的具體用法?PHP CommonController::currencyConverter怎麽用?PHP CommonController::currencyConverter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonController的用法示例。


在下文中一共展示了CommonController::currencyConverter方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

        ?>
' 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>
開發者ID:aniketbasu14,項目名稱:snoozeover,代碼行數:31,代碼來源:listing.php

示例2: number_format

			<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'];
?>
開發者ID:aniketbasu14,項目名稱:snoozeover,代碼行數:31,代碼來源:process.php

示例3: array

     $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);
開發者ID:aniketbasu14,項目名稱:snoozeover,代碼行數:31,代碼來源:ajax_get_map_listing.php

示例4: number_format

			<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'];
?>
開發者ID:aniketbasu14,項目名稱:snoozeover,代碼行數:31,代碼來源:booking_process.php


注:本文中的CommonController::currencyConverter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。