本文整理汇总了PHP中product::getProductById方法的典型用法代码示例。如果您正苦于以下问题:PHP product::getProductById方法的具体用法?PHP product::getProductById怎么用?PHP product::getProductById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类product
的用法示例。
在下文中一共展示了product::getProductById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: product
<?php
require_once "models/class-product.php";
require_once "models/class-cat-product.php";
?>
<div style=" width:700px;" class="news-detail">
<!--lấy bài viết-->
<?php
$pro_obj = new product();
$temp = $pro_obj->getProductById($_GET['n_id']);
?>
<div class="doc-tintuc" style=" padding-top:20px;border:#287FA2 solid 1px; margin-top:10px; line-height:20px; padding-left:10px;padding-right:10px;">
<ul>
<li style=" text-align:center; font-size:2em; font-weight:bold; color:#287FA2; margin-top:5px; margin-bottom:10px;">
<?php
echo $temp['pro_name'];
?>
</li>
<li>
<p style="padding-top:3px; float:right;"><?php
$date_int = strtotime($temp['ngaydangbai']);
$time_vietnam = date('d-m-Y', $date_int);
echo $time_vietnam;
?>
</p>
</li>
<li style=" padding-top:20px;font-size:1.2em; font-weight:bold; margin-top:25px; margin-bottom:10px;">
<b><?php
echo $temp['tomtat'];
?>
</b>
示例2: product
<?php
require_once '../models/class-cat-product.php';
require_once '../models/class-product.php';
if (isset($_GET['id'])) {
$product_obj = new product();
$temp = $product_obj->getProductById($_GET['id']);
//print_r($temp);
}
?>
<ul class="nav nav-tabs ">
<li class="active">
<a href="#tab1" data-toggle="tab">
<i class="livicon" data-name="apple" data-size="16" data-c="#000" data-hc="#000" data-loop="true"></i>
Thông tin cơ bản</a>
</li>
<li>
<a href="#tab2" data-toggle="tab">
<i class="livicon" data-name="laptop" data-size="16" data-loop="true" data-c="#000" data-hc="#000"></i>
Thông số kỹ thuật</a>
</li>
<li>
<a href="#tab3" data-toggle="tab">
<i class="livicon" data-name="image" data-size="16" data-loop="true" data-c="#000" data-hc="#000"></i>
Ảnh bổ sung</a>
</li>
</ul>
<form action="control/proccess-product.php" method="post" id="form_product" class="form-horizontal form-bordered" enctype="multipart/form-data">
<div class="tab-content mar-top">
<div id="tab1" class="tab-pane fade active in">
示例3: product
<?php
require_once "models/class-product.php";
require_once "models/class-cat.php";
require_once "models/function.php";
$cat_pro_id = $_GET['p_id'];
$pro_obj = new product();
$kien = $pro_obj->getProductById($cat_pro_id);
?>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div style="padding-left:10px; width:700px;float:left" id="content-right">
<div class="center-tren">
<img id="zoom" src="uploads/<?php
echo $kien['image'];
?>
" data-magnify-src="uploads/<?php
echo $kien['image'];
?>