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


PHP Products::getImage方法代碼示例

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


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

示例1: if

<? include ROOT.'/views/layouts/header.php';?>
<div class="container-fluid">
        <ol class="breadcrumb bread-primary ">
          <a href="/" class="btn btn-primary"><i class="fa fa-newspaper-1"></i> МАГАЗИН </a>
            <li><a href="/catalog/"> КАТАЛОГ </a></li>
            <li><a href="/platform/<?=$platform['id'];?>"><?=$platform['name_platforms'];?></a></li>
            <li class="active"><?=$product['name'];?></li>
        </ol>
    <div class="content-wrapper">	
		<div class="item-container">	
			<div class="container">
				<div class="col-md-13">
					<div class="product col-md-4 service-image-left">
                    
						<center>
							<img id="item-display" src="<?=Products::getImage($product['id']); ?>" alt=""></img>
						</center>
					</div>
					<div class="product-title"><?=$product['name'];?></div><br>
						<div class="ratings on-view">
						<a href="" class="pull-left">&nbsp<?=Comment::countCommentsByProduct($product['id']);?> отзывов</a>
						</div>
					<hr>
					<div class="product-price"><?=$product['price'];?> грн</div>
					<div class="product-stock"><?php if($product['status'] == 1) echo "В наличии";?></div>
					<hr>
					<div class="btn-group cart">
						<a href="#" data-id="<?=$product['id'];?>" class="btn btn-success add-to-basket">Купить</a>
					</div>
				</div>
			</div> 
開發者ID:Evkazolinium,項目名稱:Eshop_for_example,代碼行數:31,代碼來源:view.php

示例2: foreach

						</a>
						<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
							<span class="glyphicon glyphicon-chevron-right"></span>
						</a>
					</div>
				</div>

			</div>
	
			<div class="row">
				
				<?php $i=0; foreach($productList as $productItem) :?>
				
				<div class="col-sm-4 col-lg-4 col-md-4">
					<div class="thumbnail">
					<img src="<?=Products::getImage($productItem['id']); ?>">
						<div class="caption">
							<h5><a href="/product/<?=$productItem['id']?>"><?=$productItem['name']?></a></h5>
							<p><h4 ><?=$productItem['price']?> грн.</h4></p>
						<a href="#" data-id="<?=$productItem['id'];?>" class="btn btn-success add-to-basket">Купить</a>
						</div>
                        <div class="ratings">
							<a href="/product/<?=$productItem['id']?>" class="pull-right">&nbsp<?=Comment::countCommentsByProduct($productItem['id']);?> отзывов</a>
                        </div>
					</div>
				</div>
				<?php $i++; endforeach;?>
			</div>

		</div>
開發者ID:Evkazolinium,項目名稱:Eshop_for_example,代碼行數:30,代碼來源:index.php

示例3: foreach

        ?>
                           </option>
                        <?php 
    }
    ?>
                    <?php 
}
?>
                </select>
              </div>
            </div>
            <div class="form-group">
              <label class="col-md-3 control-label" for="image">Изображение</label>
              <div class="col-md-9">
                <img src="<?php 
echo Products::getImage($product['id']);
?>
" alt="">
                <input id="image" name="image" type="file"  class="form-control">
              </div>
            </div>
            <div class="form-group">
              <label class="col-md-3 control-label" for="platform_id">Платформа</label>
              <div class="col-md-9">
                <select id="platform_id" name="platform_id"  class="form-control">
                    <?php 
if (is_array($platformList)) {
    ?>
                        <?php 
    foreach ($platformList as $platform) {
        ?>
開發者ID:Evkazolinium,項目名稱:Eshop_for_example,代碼行數:31,代碼來源:update.php


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