Yam Code
Sign up
Login
New paste
Home
Trending
Archive
English
English
Tiếng Việt
भारत
Sign up
Login
New Paste
Browse
<?php require_once("entities/product.class.php"); require_once("entities/category.class.php"); ?> <?php include_once("header.php"); if(!isset($_GET["id"])){ header('Location: not_found.php'); }else{ $id = $_GET["id"]; $temp_prod = Product::get_product($id); $prod = reset($temp_prod); $prods_relate = Product::list_product_relate($prod["CateID"], $id); } $cates = Category::list_category(); ?> <style> table { width: 60%; border: 0px solid; } .center { margin-left: auto; margin-right: auto; } .textnor{ padding: 10px 0 10px 0; font-family: tahoma; font-size: 18px; } .textnorbold{ padding: 10px 0 10px 0; font-weight: bold; } .productname{ font-size: 24px; color: #770000; } .price{ color: #770000; } div.scrollmenu { background-color: #F8F8FF; overflow: auto; white-space: nowrap; } div.scrollmenu a { display: inline-block; color: white; text-align: center; padding: 10px; text-decoration: none; } div.scrollmenu a:hover { background-color: #777; } .lqname{ padding-left: 20px; font-family: tahoma; font-size: 18px; font-weight: bolder; } </style> <main> <div class="container"> <!-- Danh mục sản phẩm --> <div class="row tm-gallery"> <div id="tm-gallery-page-pizza" class="tm-gallery-page"> <h2 class="col-12 text-center tm-section-title" style="padding-top:20px;"><b>Danh mục sản phẩm</b></h2> <div class="col-12 text-center tm-section-title"> <ul> <?php foreach($cates as $item){ echo "<li class='tm-btn tm-btn-default' style='text-align: center;'> <a href=/Lab03/list_product.php?cateid=".$item["CateID"]." class='textlist-custom'> ".$item["CategoryName"]." </a></li>"; } ?> </ul> </div> </div> </div> <hr style="width: 80%;"/><br /> <h2 class="col-12 text-center tm-section-title"><b>Thông tin sản phẩm</b></h2> <table class="center"> <tr> <td><img src="<?php echo "/Lab03/".$prod["Picture"];?>" alt="Image"></td> <td> <div class="textnor textnorbold productname"><?php echo $prod["ProductName"]; ?></div><br /> <div class="textnor textnorbold">Mô tả sản phẩm </div> <div class="textnor"><?php echo $prod["Description"]; ?></div><br /> <label class="textnor textnorbold">Giá :</label> <label class="textnor price"><?php echo number_format($prod["Price"]) ?> VNĐ</label><br /> <input type="button" class="tm-btn tm-btn-primary" style="margin-top: 15px;" onclick=" location.href='/lab03/shopping_cart.php?id=<?php echo $prod['ProductID']; ?>'" value="Mua hàng" /> <input type="button" class="tm-btn tm-btn-primary" style="margin-top: 15px;" onclick=" location.href='/lab03/edit_product.php?id=<?php echo $prod['ProductID']; ?>'" value="Sửa" /> <input type="button" class="tm-btn tm-btn-primary" style="margin-top: 15px;" onclick=" location.href='/lab03/delete_product.php?id=<?php echo $prod['ProductID']; ?>'" value="Xóa" /> </td> </tr> </table><br /> <hr style="width: 80%"/><br /> <h2 class="col-12 text-center tm-section-title"><b>Sản phẩm liên quan</b></h2> <div class="scrollmenu"> <table class="center"> <tr> <?php foreach($prods_relate as $item){ ?> <td> <table class="center"> <tr> <td> <a href="/Lab03/product_detail.php?id=<?php echo $item["ProductID"]; ?>"> <img src="<?php echo "/Lab03/".$item["Picture"];?>" alt="Image"> </a> </td> </tr> <tr> <td><div class="lqname"><?php echo $item["ProductName"]; ?></div><br /></td> </tr> <tr> <td><label class="lqname">Giá :</label> <label class="textnor price"><?php echo number_format($item["Price"]) ?> VNĐ</label><br /></td> </tr> </table> </td> <?php } ?> </tr> </table> </div> <br /> <br /> </div> </main> <?php include_once("footer.php"); ?>
Paste Settings
Paste Title :
[Optional]
Paste Folder :
[Optional]
Select
Syntax Highlighting :
[Optional]
Select
Markup
CSS
JavaScript
Bash
C
C#
C++
Java
JSON
Lua
Plaintext
C-like
ABAP
ActionScript
Ada
Apache Configuration
APL
AppleScript
Arduino
ARFF
AsciiDoc
6502 Assembly
ASP.NET (C#)
AutoHotKey
AutoIt
Basic
Batch
Bison
Brainfuck
Bro
CoffeeScript
Clojure
Crystal
Content-Security-Policy
CSS Extras
D
Dart
Diff
Django/Jinja2
Docker
Eiffel
Elixir
Elm
ERB
Erlang
F#
Flow
Fortran
GEDCOM
Gherkin
Git
GLSL
GameMaker Language
Go
GraphQL
Groovy
Haml
Handlebars
Haskell
Haxe
HTTP
HTTP Public-Key-Pins
HTTP Strict-Transport-Security
IchigoJam
Icon
Inform 7
INI
IO
J
Jolie
Julia
Keyman
Kotlin
LaTeX
Less
Liquid
Lisp
LiveScript
LOLCODE
Makefile
Markdown
Markup templating
MATLAB
MEL
Mizar
Monkey
N4JS
NASM
nginx
Nim
Nix
NSIS
Objective-C
OCaml
OpenCL
Oz
PARI/GP
Parser
Pascal
Perl
PHP
PHP Extras
PL/SQL
PowerShell
Processing
Prolog
.properties
Protocol Buffers
Pug
Puppet
Pure
Python
Q (kdb+ database)
Qore
R
React JSX
React TSX
Ren'py
Reason
reST (reStructuredText)
Rip
Roboconf
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Soy (Closure Template)
Stylus
Swift
TAP
Tcl
Textile
Template Toolkit 2
Twig
TypeScript
VB.Net
Velocity
Verilog
VHDL
vim
Visual Basic
WebAssembly
Wiki markup
Xeora
Xojo (REALbasic)
XQuery
YAML
HTML
Paste Expiration :
[Optional]
Never
Self Destroy
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Status :
[Optional]
Public
Unlisted
Private (members only)
Password :
[Optional]
Description:
[Optional]
Tags:
[Optional]
Encrypt Paste
(
?
)
Create New Paste
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Site Languages
×
English
Tiếng Việt
भारत