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'];?>

0)? $_GET['page'] : ''; $thumbsPerPage = 20; $exclude = array('add', 'remove'); $dirArray = walkDir(CC_ROOT_DIR .CC_DS."images".CC_DS."uploads", true, $thumbsPerPage, $page, false, $int = 0); $pagination = paginate($dirArray['max'], $thumbsPerPage, $page, 'page', $class="txtLink", 10,$exclude); if (isset($msg)) echo msg($msg); echo '

'.$pagination.'

'; ?>