本文整理汇总了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>
示例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'];
?>
示例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);
示例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'];
?>