File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/old-myadmin/ImageGallery/detail.php
<?php
if (!defined('WEB_ROOT')) {
exit;
}
if (isset($_GET['Id']) && $_GET['Id'] > 0) {
$bId = $_GET['Id'];
} else {
header('Location: index.php');
}
$sql = "SELECT * FROM imagegallery WHERE img_id = $bId";
$result = mysql_query($sql) or die('Cannot get product. ' . mysql_error());
$row = mysql_fetch_assoc($result);
extract($row);
if ($img_thumb) {
$image_th = WEB_ROOT . THUMB_IMAGE_DIR . $img_thumb;
} else {
$image_th = WEB_ROOT . 'images/no-image-large.png';
}
if ($img_big) {
$image_big = WEB_ROOT . BIG_IMAGE_DIR . $img_big;
} else {
$image_big = WEB_ROOT . 'images/no-image-large.png';
}
?>
<div id="ptitle">:: Image Gallery >> Detail </div>
<form action="" method="post" enctype="multipart/form-data" name="frmAddBanner" id="frmAddBanner">
<p align="center" class="formTitle"><h2> Detail View </h2> </p>
<table width="70%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
<tr>
<td width="150" class="label">Image Title</td>
<td class="content">
<?php
$sql1 = "SELECT * FROM image_category WHERE category_id=$img_cat_id";
$result1 = dbQuery($sql1);
$row1 = dbFetchRow($result1);
$catName = $row1[1];
echo $catName; ?>
</td>
</tr>
<tr>
<td width="150" class="label">Image Title</td>
<td class="content"><?php echo $img_title; ?> </td>
</tr>
<tr>
<td width="150" class="label">Image Thumbnail</td>
<td class="content"><img src="<?php echo $image_th; ?>" ></td>
</tr>
<tr>
<td width="150" class="label">Big Image</td>
<td class="content"><img src="<?php echo $image_big; ?>" ></td>
</tr>
</table>
<p align="center">
<input name="btnModify" type="button" id="btnModify" value="Modify Detail" onClick="window.location.href='index.php?view=modify&Id=<?php echo $img_id; ?>';" class="box">
<input name="btnBack" type="button" id="btnBack" value=" Back " onClick="window.history.back();" class="box">
</p>
</form>