0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
admin
/
pages
/
[
Home
]
File: edit_product_images.php
<? if($_GET['action']=="del") { $q_find="select * from product_images where product_image_id='".$_GET['image_id']."'"; $r_find=mysql_query($q_find); $row_find=mysql_fetch_array($r_find); $small_image_path="../".$row_find['product_small_image_path']; $large_image_path="../".$row_find['product_large_image_path']; $q_del="delete from product_images where product_image_id='".$_GET['image_id']."'"; $r_del=mysql_query($q_del); unlink($small_image_path); unlink($large_image_path); } $q_catalog="select * from catalog where catalog_id='".$_GET['catalog_id']."'"; $r_catalog=mysql_query($q_catalog); $row_catalog=mysql_fetch_array($r_catalog); $catalog_name=$row_catalog['catalog_name']; $q_product="select * from product_details where product_id='".$_GET['product_id']."'"; $r_product=mysql_query($q_product); $row_product=mysql_fetch_array($r_product); $product_name=$row_product['product_name']; ?> <link href="../css/admin-style.css" rel="stylesheet" type="text/css"> <table width="800" border="0" cellspacing="0" cellpadding="2"> <tr> <td height="32" align="left" valign="middle" class="create-catalog-header"><strong>Uploaded Images Details</strong></td> </tr> <tr> <td height="25" align="left" valign="middle" class="left-links">Catalog you are in :: <b><?=$catalog_name?></b></td> </tr> <tr> <td height="25" align="left" valign="middle" class="left-links">Products You are viewing :: <?=$product_name?></td> </tr> <tr> <td height="32" align="left" valign="middle"><table width="800" border="0" cellpadding="0" cellspacing="0"> <tr class="create-catalog-header"> <td width="150" align="center" valign="middle"><strong>Image Name</strong></td> <td width="150" height="32" align="center" valign="middle"><strong>Small Image</strong></td> <td width="400" align="center" valign="middle"><strong>Large Image</strong></td> <td align="center" valign="middle"><strong>Delete</strong></td> </tr> <? $q_images="select * from product_images where catalog_id='".$_GET['catalog_id']."' and product_id='".$_GET['product_id']."'"; $r_images=mysql_query($q_images); while($row_images=mysql_fetch_array($r_images)) { ?> <tr class="left-links"> <td align="center" valign="middle" style="padding-top:5px;padding-bottom:5px;"> </td> <td height="32" align="center" valign="top" style="padding-top:5px;padding-bottom:5px;"><img src="../<?=$row_images['product_small_image_path']?>"></td> <td align="center" valign="top" style="padding-top:5px;padding-bottom:5px;"><img src="../<?=$row_images['product_large_image_path']?>"></td> <td align="center" valign="top" style="padding-top:5px;padding-bottom:5px;"><a href="index.php?page=edit_product_images&&catalog_id=<?=$_GET['catalog_id']?>&&product_id=<?=$_GET['product_id']?>&&action=del&&image_id=<?=$row_images['product_image_id']?>" class="left-links"><strong><font color="#FF0000">Delete</font></strong></a></td> </tr> <? } ?> </table></td> </tr> </table>