HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/old-myadmin/mypdf/detail.php
<?php
if (!defined('WEB_ROOT')) {
	exit;
}


if (isset($_GET['productId']) && $_GET['productId'] > 0) {
	$productId = $_GET['productId'];
} else {

	header('Location: index.php');
}
//PID 	PTitle 	PSKU 	PImage 	PQty 	PDesc 	PNPrice 	PGPrice
//DateAdded 	DateModify 	IsBannnerSet 	IsActive
$sql = "SELECT PID, PTitle, PSKU, PImage, PQty, PDesc, PNPrice, PGPrice, IsActive
        FROM chproduct WHERE PID = $productId";
$result = mysql_query($sql) or die('Cannot get product. ' . mysql_error());

$row = mysql_fetch_assoc($result);
extract($row);

if ($PImage) {
	$pd_image = WEB_ROOT . 'images/product/' . $PImage;
} else {
	$pd_image = WEB_ROOT . 'images/no-image-large.png';
}

//PID 	PTitle 	PSKU 	PImage 	PQty 	PDesc 	PNPrice 	PGPrice
//DateAdded 	DateModify 	IsBannnerSet 	IsActive
?>
<script type="text/javascript" src="<?php echo WEB_ROOT;?>myadmin/library/product.js"> </script>
<form action="processProduct.php?action=addProduct" method="post" enctype="multipart/form-data" name="frmAddProduct" id="frmAddProduct">
 <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
 <tr> 
   <td width="150" class="label">Product Name</td>
   <td class="content"><?php echo $PTitle; ?></td>
  </tr>
  <tr> 
   <td width="150" class="label">Product SKU</td>
   <td class="content"> <?php echo $PSKU; ?></td>
  </tr>
  <tr> 
   <td width="150" class="label">Qty In Stock</td>
   <td class="content"><?php echo number_format($PQty); ?> </td>
  </tr>
  <tr> 
   <td width="150" class="label">Description</td>
   <td class="content"><?php echo nl2br($PDesc); ?> </td>
  </tr>
  <tr> 
   <td width="150" height="36" class="label">Net Price</td>
   <td class="content"><?php echo number_format($PNPrice, 2); ?> </td>
  </tr>
  <tr> 
   <td width="150" class="label">Qty In Stock</td>
   <td class="content"><?php echo number_format($PGPrice, 2); ?> </td>
  </tr>
  <tr> 
   <td width="150" class="label">Image</td>
   <td class="content"><img src="<?php echo $pd_image; ?>"></td>
  </tr>
 </table>
 <p align="center"> 
  <input name="btnModifyProduct" type="button" id="btnModifyProduct" value="Modify Product" onClick="window.location.href='index.php?view=modify&productId=<?php echo $productId; ?>';" class="box">
  &nbsp;&nbsp;
  <input name="btnBack" type="button" id="btnBack" value=" Back " onClick="window.history.back();" class="box">
 </p>
</form>