本文整理汇总了PHP中getPrice函数的典型用法代码示例。如果您正苦于以下问题:PHP getPrice函数的具体用法?PHP getPrice怎么用?PHP getPrice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPrice函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _getPrice
protected function _getPrice($productId)
{
$percent = fruitframe_get_user_percent();
$summ = getPrice($productId);
if (is_user_logged_in() && $percent) {
return calcSumm($summ, $percent);
}
return $summ;
}
开发者ID:slavic18,项目名称:cats,代码行数:9,代码来源:fruitframe-cart.php
示例2: rest_get
function rest_get($req)
{
global $JSON;
if (checkPrivileges($req[0]) == false) {
return;
}
$resp = reqRouter($req, "GET");
$response;
switch ($resp) {
case 1:
global $routes;
$order = @$routes[$req[0]]["orderBy"];
if (isset($order)) {
$response = sql_GET_ALL($req[0], [$order, "ASC"]);
} else {
$response = sql_GET_ALL($req[0], [$routes[$req[0]]['identifier'], "ASC"]);
}
break;
case 2:
$response = sql_GET($req);
break;
case 3:
$response = sql_GET_ROW($req);
break;
case 4:
$response = sql_GET_SORT($req, true);
break;
case 5:
$response = sql_GET_SORT($req, false);
break;
case 6:
$response = sql_GET_COLUMNS();
break;
case 7:
$response = sql_GET_JOIN($JSON);
break;
case 8:
$response = getPrice($JSON);
break;
case 9:
$response = getByTime($req, $JSON);
break;
case 0:
default:
rest_error("Mal-Formed request, check url params", 400);
return;
}
if (isset($response) && (is_array($response) && count($response) > 0)) {
rest_success(json_encode($response));
} else {
rest_error("Empty Results, Check if item exists in dataBase, Check Url requested.", 404);
}
return 0;
}
开发者ID:nperez0111,项目名称:Pizza,代码行数:54,代码来源:get.php
示例3: processNode
/**
* The core processing logic (not reusable)
* @return \Closure
*
*/
public function processNode()
{
return function ($node) {
$link = $node->filter('h3 > a')->link();
$name = $node->filter('h3 > a')->text();
$price = $node->filter('.pricePerUnit')->text();
// We need to load the next page to get size and description
$nextPage = $this->client->click($link);
$description = $nextPage->filter('.productText')->first()->text();
$html = $nextPage->html();
$size = round(mb_strlen($html, '8bit') / 1024) . "kb";
$this->results['results'][] = ['name' => c($name), 'price' => getPrice($price), 'description' => c($description), 'size' => $size];
};
}
开发者ID:SainsburysTests,项目名称:sainsburys-test,代码行数:19,代码来源:Scraper.php
示例4: getProductPicture
echo $product['name'];
?>
">
<span class="item">
<span class="item-left">
<img src="<?php
echo getProductPicture($product['picture']);
?>
" width="50" alt="" />
<span class="item-info">
<span><strong><?php
echo cutString($product['name'], 15);
?>
</strong></span>
<span><?php
echo getPrice($product['price']);
?>
</span>
</span>
</span>
<span class="item-right">
<button class="btn-remove-cart-product" data-id="<?php
echo $product['id'];
?>
" class="btn btn-xs btn-danger pull-right">
<span class="glyphicon glyphicon-trash"></span>
</button>
</span>
</span>
</li>
<?php
开发者ID:vincenthib,项目名称:shop,代码行数:31,代码来源:ajax-cart-products.php
示例5: getPrice
<button name="logOut" value="out" class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-log-out"></span> Log Out</button>
</form>
</div><!--/.navbar-collapse -->
</div>
</nav>
<div class="jumbotron">
</div>
';
//if(isset($_SESSION["Email"])){
$userEmail = $_GET["UserEmail"];
$hotelName = $_GET['HotelName'];
$hotelAddr = $_GET['HotelAddr'];
//can be change, before confirmation
$roomType = $_GET['RoomType'];
$roomQuant = $_GET['RoomQuant'];
$roomPrice = getPrice($hotelName, $hotelAddr, $roomType);
$startDate = $_GET['StartDate'];
$endDate = $_GET['EndDate'];
//left is room quantity
//}
?>
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<a><h4>Booking information:</h4></a>
<hr>
<div class="container">
<form action="edit2.php" class="form-signin" role="form" method="post">
<?php
echo "\n <input type='hidden' name='HotelAddr' value='{$hotelAddr}' />\n <input type='hidden' name='HotelQuant' value='{$hotelQuant}' />\n <input type='hidden' name='OldStartDate' value='{$startDate}' />\n <input type='hidden' name='OldEndDate' value='{$endDate}' />\n <input type='hidden' name='RoomType' value='{$roomType}' />\n <input type='hidden' name='RoomQuant' value='{$roomQuant}' />";
开发者ID:lxqlx,项目名称:Hotel_Booking_System,代码行数:31,代码来源:edit.php
示例6: foreach
<?php
ActiveForm::end();
NavBar::end();
?>
</div>
<div class="row">
<div class="col-sm-12">
<?php
$i = 1;
$endTag = 0;
foreach ($freeObj as $model) {
if ($i == 1) {
echo Html::beginTag('div', ['class' => 'row row-flex row-flex-wrap']);
$endTag = 1;
}
echo Html::tag('div', Html::tag('div', Html::tag('div', Html::tag('div', Html::tag('h2', Html::a($model->name, Url::to(['/tour/view', 'id' => $model->id, 'datebegin' => $dateBegin]), []), []) . Html::img(getPhoto($model), ['class' => 'main-tour-image']), ['class' => 'col-sm-12']), ['class' => 'row']) . Html::tag('div', Html::tag('div', Html::tag('div', Html::tag('p', 'Продолжительность ' . $model->duration . ' часов', ['class' => 'duration']) . Html::tag('p', 'Цена от ' . getPrice($model) . ' руб.', ['class' => 'duration']) . Html::a('Подробнее', Url::to(['/tour/view', 'id' => $model->id, 'datebegin' => $dateBegin]), ['class' => 'btn btn-success bottom-preview']), ['class' => 'flex-description-tour']), ['class' => 'col-sm-12']), ['class' => 'row']), ['class' => 'item-card']), ['class' => 'col-sm-4']);
if ($i == 3) {
echo Html::endTag('div');
$endTag = 2;
$i = 0;
}
$i++;
}
if ($endTag == 1) {
echo Html::tag('div', '', ['class' => 'col-sm-6']);
echo Html::endTag('div');
}
?>
</div><!-- /.col-sm-12 -->
</div><!-- /.row -->
开发者ID:ni032mas,项目名称:emtol_yii2,代码行数:30,代码来源:index.php
示例7: getNextDay
} else {
$date = getNextDay($date);
addNode($doc, $stocks, 'nextdate', $date);
if (isToday($date) == true) {
if (isMarketOpen() == true) {
$rc = '4';
$message = 'The Stock Market is Still Open.';
}
}
}
break;
case '2':
// Get Price
$symbol = $_GET[s];
$date = $_GET[d];
$price = getPrice($symbol, $date);
if ($price == -1) {
$rc = '4';
$message = 'Error getting price for ' . $symbol . ' on ' . $date . '.';
break;
}
// Get Stock ID
$sql = "select id from stocks where symbol = '" . $symbol . "'";
$rows = mysql_query($sql);
$cols = mysql_fetch_array($rows);
$stock = $cols['id'];
// Delete Old Price
$sql = "delete from prices where stock = " . $stock . " and thedate = '" . $date . "'";
if (!mysql_query($sql)) {
$rc = '4';
$message = mysql_error();
开发者ID:RobertBohn,项目名称:Bully-Bully,代码行数:31,代码来源:process.php
示例8: the_title
<td>
<div style="font-size: 1.45em; width: 400px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
<?php
the_title();
?>
</div>
<div style="font-size: 0.95em; margin-top: 4px; color: #666666; width: 400px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
<?php
echo $address;
?>
</div>
</td>
<td>
<div style="font-size: 1.45em; color: #005826; text-align: right;">
<?php
echo getPrice();
?>
</div>
<div style="font-size: 0.95em; margin-top: 4px; color: #666666; text-align: right;">
<?php
echo getMetaData('et_er_rent_tenure');
?>
</div>
</td>
<td style="width: 20px;">
</td>
<td style="padding-left: 20px; border-left: 1px solid #eeeeee;">
<div class="font-size-90 bold view-details-button">
<a href="/terrerohomes/property/?p_id=<?php
echo get_the_ID();
?>
开发者ID:aneudy1702,项目名称:terreroHomes,代码行数:31,代码来源:sidebar-featured-item.php
示例9: getPaidSystemConfig
<?php
echo TImage::displayImageUploader($this->conf, $this->content, $this->adext);
?>
<?php
if (PAIDSYSTEM) {
$paidconfig = getPaidSystemConfig();
if (isset($paidconfig->enable_image_pack) && $paidconfig->enable_image_pack == 1) {
?>
<input type="checkbox" id="images_pack" value="1" <?php
if (@$this->adext->images == 1) {
echo "checked";
}
?>
name="images_pack" />
<span class="option_photo"><?php
echo sprintf(JText::_('PAIDSYSTEM_IMAGE_PACK_NB_IMAGES'), $paidconfig->num_images, getPrice($paidconfig->image_price));
?>
</span>
<script type="text/javascript">
<?php
$maximages = $this->conf->nb_images + $paidconfig->num_images;
?>
function updateImagesPackPrice() {
if(jQ('#images_pack').is(':checked')) {
jQ('#totalcount').html('<?php
echo $maximages;
?>
');
max_total_file_count = <?php
echo $maximages;
?>
开发者ID:networksoft,项目名称:seekerplus.com,代码行数:31,代码来源:editcontent.php
示例10: getPrice
<td> </td>
<td> </td>
<td> </td>
<td><h5>Estimated shipping</h5></td>
<td class="text-right"><h5><strong id="cart-shipping"><?php
echo getPrice($shipping);
?>
</strong></h5></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h3>Total</h3></td>
<td class="text-right"><h3><strong id="cart-total"><?php
echo getPrice($total);
?>
</strong></h3></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>
<a href="index.php" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-shopping-cart"></span> Continue Shopping
</a>
</td>
<td>
<button type="button" class="btn btn-success">
Checkout <span class="glyphicon glyphicon-play"></span>
开发者ID:vincenthib,项目名称:shop,代码行数:31,代码来源:cart-summary.php
示例11: max
$p = 2900 * $area;
}
}
return max(450, $p);
}
function getPrice($area, $detail)
{
if ($detail == "High") {
$price = getHighPrice($area);
} else {
$price = getStandardPrice($area);
}
return number_format($price, 2);
}
$price = getPrice($area, "Standed");
$hprice = getPrice($area, "High");
$mail->Body = "From: " . $name_field . "\r\nEmail: " . $email_field . "\r\n";
$mail->Body .= "Company: " . $company . "\r\nTelephone: " . $tel . "\r\n\r\n";
$mail->Body .= "Level of detail:\r\n";
$mail->Body .= "Standard: " . $detail . ", High: " . $detailhigh . "\r\n";
$mail->Body .= "Request Sample Data: " . $sample . "\r\n\r\n";
if ($additional != "") {
$mail->Body .= "Additional Instructions:\r\n" . $additional . "\r\n\r\n";
}
$mail->Body .= "Area: " . $area . " km2\r\n";
$mail->Body .= "Standard Price: £" . $price . "\r\n";
$mail->Body .= "High Price: £" . $hprice . "\r\n\r\n";
if ($detail == "Yes") {
$mail->Body .= "Quote requested Standard level of detail\r\n";
}
if ($detailhigh == "Yes") {
开发者ID:jamesatother,项目名称:3dcm,代码行数:31,代码来源:email.php
示例12: PDO
$pass = LeeLee431;
try {
//create PDO connection
$db = new PDO('mysql:host=localhost;dbname=Software', $user, $pass);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
//show error
echo '<p class="bg-danger">' . $e->getMessage() . '</p>';
exit;
}
if ($_GET['func'] == 'getImage') {
getImage($_GET['ID'], $db);
} elseif ($_GET['func'] == 'getName') {
getName($_GET['ID'], $db);
} elseif ($_GET['func'] == 'getPrice') {
getPrice($_GET['ID'], $db);
} elseif ($_GET['func'] == 'getDesc') {
getDesc($_GET['ID'], $db);
}
function getImage($id, $db)
{
$sql = "SELECT * FROM Product WHERE ID={$id}";
$query = $db->prepare($sql);
$query->execute();
$results = $query->fetchAll(PDO::FETCH_ASSOC);
foreach ($results as $row) {
}
echo $row['Picture'];
}
function getName($id, $db)
{
开发者ID:rajaybitter,项目名称:Software,代码行数:31,代码来源:shop.php
示例13: setMoneyBalances
function setMoneyBalances($sElement, $sMethod, $userId)
{
$userFunds = getStat($sMethod, $userId);
$elementP = getPrice($sElement, $sMethod);
$balance = $userFunds - $elementP;
if ($balance >= 0) {
setStat($sMethod, $userId, $balance);
return 'success';
}
}
开发者ID:Knixd,项目名称:JPDrills,代码行数:10,代码来源:stats.php
示例14: get_contact_by_supplier_id
break;
case 'get_contact_by_supplier_id':
$resp = get_contact_by_supplier_id($param1, $param2, $param3, $pgIndex, $recordPerPage);
break;
case 'get_supplier_contact_by_id':
$resp = get_supplier_contact_by_id($param1);
break;
case 'get_all_stock':
$resp = getAllStockMaster($param1, $pgIndex, $recordPerPage);
break;
case 'get_stock_by_stock_id':
$resp = getStockMasterById($param1);
break;
case 'get_price':
$arrObj = Zend_Json::decode(htmlspecialchars_decode($param1), Zend_Json::TYPE_ARRAY);
$resp = getPrice($arrObj, $module);
break;
case 'get_stock_status':
$arrObj = Zend_Json::decode(htmlspecialchars_decode($param1), Zend_Json::TYPE_ARRAY);
$resp = getStockStatus($arrObj);
break;
case 'get_all_purchase_order':
$resp = getAllPurchaseOrder($param1, $pgIndex, $recordPerPage);
break;
case 'get_purchase_order_by_order_no':
$resp = getPurchaseOrderByOrderNo($param1);
break;
case 'get_purchase_order_item_details_by_order_no':
$resp = getPurchaseOrderItemDetailsByOrderNo($param1);
break;
case 'get_purchase_order_item_details':
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:api.php
示例15: getProductPicture
<?php
include 'sidebar-product.php';
?>
<div class="col-md-9">
<div class="product-full">
<div class="thumbnail">
<img class="img-responsive" src="<?php
echo getProductPicture($full_product['picture']);
?>
" alt="">
<div class="caption-full">
<h4 class="pull-right"><?php
echo getPrice($full_product['price']);
?>
</h4>
<h4><?php
echo $full_product['name'];
?>
</h4>
<?php
echo nl2br($full_product['description']);
?>
</div>
<div class="ratings">
<?php
echo getProductRating($full_product['rating']);
?>
</div>
开发者ID:vincenthib,项目名称:shop,代码行数:30,代码来源:product.php
示例16: header
require_once "../service/db_connect.php";
if (!isset($_POST["method"]) || empty($_POST["method"])) {
header("Content-Type: application/json");
echo json_encode(array("result" => "fail"));
die;
}
$method = $_POST["method"];
switch ($method) {
case 'insert':
insertSizePrice();
break;
case 'delete':
deleteSizePrice();
break;
case 'getPrice':
getPrice();
break;
default:
header("Content-Type: application/json");
echo json_encode(array("result" => "no_method"));
break;
}
function getPrice()
{
try {
$dbh = dbConnect::getInstance()->dbh;
} catch (PDOException $e) {
echo "Error!: " . $e->getMessage() . "<br/>";
die;
}
$sql = 'SELECT min(price) as price from size_price where size_area >= :area ';
开发者ID:pkManee,项目名称:couple-master-project,代码行数:31,代码来源:ManageSizePrice.data.php
示例17: getPrice
<!-- Countdown -->
<div class="countdown" id="countdown">
<div class="container">
<div class="row">
<div class="form-and-links-container col-sm-8 col-sm-offset-2">
<div class="countdown-label">
<div id="price">
<p class="text-center"><strong>We Buy</strong> : RM<?php
getPrice('1', 'we_buy');
?>
/g <i class=<?php
getStats('1', 'we_buy');
?>
></i></p>
<p class="text-center"><strong>We Sell</strong> : RM<?php
getPrice('1', 'we_sell');
?>
/g <i class=<?php
getStats('1', 'we_sell');
?>
></i></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /Countdown -->
<div class="container">
<!-- Description -->
<div class="row">
开发者ID:anocriny,项目名称:mks-indicative-price,代码行数:31,代码来源:index.php
示例18: getDeckVstylesAss
}
//if(getOwnershipStatus($value, $pid)){//firefox needs this otherwise it displays unowned decks
/****************Deck Prices**********************/
$dkVstyleAssArr = getDeckVstylesAss($value);
$sDeck = getDeckInfoFromId($value, 'short_name');
$deckMxLv = getDeckInfo($sDeck, 'levels');
//$userDks = getUserDecks($userID);
$pkanjiRE = getPrice('kanjiRE', 'gc');
$pkanjiH = getPrice('kanjiH', 'gc');
$pkanjiE = getPrice('kanjiE', 'gc');
$pengKR = getPrice('engKR', 'gc');
$pengH = getPrice('engH', 'gc');
$pengK = getPrice('engK', 'gc');
$paudioR = getPrice('audioR', 'gc');
$paudioE = getPrice('audioE', 'gc');
$paudioK = getPrice('audioK', 'gc');
//Set Cell Contents
$ownsRE = getDeckInfoFromId($value, 'kanjiRE') ? getOwnershipDeckVstyle($key, 'kanjiRE', $pid) : '';
$ownsE = getDeckInfoFromId($value, 'kanjiE') ? getOwnershipDeckVstyle($key, 'kanjiE', $pid) : '';
$ownsH = getDeckInfoFromId($value, 'kanjiH') ? getOwnershipDeckVstyle($key, 'kanjiH', $pid) : '';
$ownsAudR = getDeckInfoFromId($value, 'audioR') ? getOwnershipDeckVstyle($key, 'audioR', $pid) : '';
$ownsAudE = getDeckInfoFromId($value, 'audioE') ? getOwnershipDeckVstyle($key, 'audioE', $pid) : '';
$ownsAudK = getDeckInfoFromId($value, 'audioK') ? getOwnershipDeckVstyle($key, 'audioK', $pid) : '';
//$ownsE = (isHKid($value) == FALSE ? getOwnershipDeckVstyle($key,'kanjiE',$pid) : '');
//$ownsH = (isHKid($value) == FALSE ? getOwnershipDeckVstyle($key,'kanjiH',$pid) : '');
if ($ownsRE == TRUE) {
// If own this decks KanjiRE
$clvRE = getSkill($sDeck . '_kanjiRE_lv', $pid);
$percRE = $clvRE == 1 ? 0 : round($clvRE / $deckMxLv * 100, 0);
$finRE = $percRE == 100 ? "success sparkley" : ($percRE <= 25 && $percRE != 0 ? "warning" : ($percRE == 0 ? "danger" : ""));
//Style it based off their progress
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:mydecks.php
示例19: getDeckInfo
onClick="buyVstyle('<?php echo $cvset; ?>','<?php echo getDeckInfo($cvset, 'id'); ?>','<?php echo $userID; ?>','gc', 'audioE')" >
<a href="#2">
Audio Flashcards: Learn English. <span class="text-info">Click to buy for <?php echo getPrice('audioE', 'gc');?> Gold</span>
</a>
</li><?php
}?>
</li><!-- END MEDIUM AUDIO FLASHCARDS-->
<!--***************HARD AUDIO MODE OWNED OR NOT OWNED*************-->
<li><?
if(getOwnershipDeckVstyle($cvset,'audioK',$userID)==TRUE && getDeckInfo($cvset, 'audioK')==1){?>
<li
role="presentation"
class="<?php if($vstyle == 'audioK'){echo "";}?>"
onClick="vsChange('vStyle','audioK')" >
<a href="#3">
Audio Flashcards: Learn Kanji <span class="badge"><small><i>Lv.<?= $vsLvAHard; if($vsLvAHard==$mxDkLv){echo " (Max)";}?></i></small></span>
</a>
</li><?
}else if(getOwnershipDeckVstyle($cvset,'audioK',$userID)==FALSE && getDeckInfo($cvset, 'audioK')==1){?>
<li
role="presentation"
class="vsBuy"
onClick="buyVstyle('<?php echo $cvset; ?>','<?php echo getDeckInfo($cvset, 'id'); ?>','<?php echo $userID; ?>','gc', 'audioK')" >
<a href="#3">
Audio Flashcards: Learn Kanji. Click to buy <span class="text-default"><?php echo getPrice('audioK', 'gc');?> Gold
</a>
</li><?php
}?>
</li><!--END HARD MODE AUDIO-->
</ul>
</div>
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:vstyle-kanji.php
示例20: getPrice
<?php
require 'shape.php';
function getPrice(shape $shape)
{
return $shape->getArea() * 0.25;
}
$rect = new rect(5, 7);
$circ = new circle(5);
echo getPrice($rect) . "\n";
echo getPrice($circ) . "\n";
开发者ID:ben-hopps,项目名称:example-code,代码行数:11,代码来源:index.php
注:本文中的getPrice函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论