当前位置: 首页>>代码示例>>PHP>>正文


PHP getPrice函数代码示例

本文整理汇总了PHP中getPrice函数的典型用法代码示例。如果您正苦于以下问题:PHP getPrice函数的具体用法?PHP getPrice怎么用?PHP getPrice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getPrice函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的getPrice函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。