mySQLSafe(urldecode($_GET['add'])); $record['productId'] = $db->mySQLSafe($_GET['productId']); $insert = $db->insert($glob['dbprefix']."CubeCart_img_idx", $record); unset($record); if($insert == TRUE){ $msg = "

".$lang['admin']['products']['img_added_to_prod']."

"; } else { $msg = "

".$lang['admin']['products']['img_not_added_to_prod']."

"; } $count['noImages'] = "noImages + 1"; $db->update($glob['dbprefix']."CubeCart_inventory", $count, "productId = ".$db->mySQLSafe($_GET['productId'])); } elseif(isset($_GET['remove']) && !empty($_GET['remove'])){ $where = "img=".$db->mySQLSafe(urldecode($_GET['remove']))." AND productId=".$db->mySQLSafe($_GET["productId"]); $delete = $db->delete($glob['dbprefix']."CubeCart_img_idx", $where); if($delete == TRUE){ $msg = "

".$lang['admin']['products']['img_removed']."

"; } else { $msg = "

".$lang['admin']['products']['img_not_removed']."

"; } $count['noImages'] = "noImages - 1"; $db->update($glob['dbprefix']."CubeCart_inventory", $count, "productId = ".$db->mySQLSafe($_GET['productId'])); } $query = "SELECT img FROM ".$glob['dbprefix']."CubeCart_img_idx WHERE productId=".$db->mySQLsafe($_GET['productId']); $imgArray = $db->select($query); if($imgArray == TRUE){ for ($i=0; $i <?php echo $lang['admin']['products']['image_management'];?>

 
" alt="" title="" />