<?php set_time_limit(0); include 'inc.db.php'; include 'ebayFunctions.php'; include "simple_html_dom.php"; delete_item_prime(); echo '<script> window.location.href = "view_ebay_data.php"; </script>'; function delete_item_prime() { $result = array(); $cron_file = 'commandsync.txt'; $sql = "SELECT * FROM ebay_cron"; $res = mysql_query($sql) or die('Something Wrong...!'); $minute = 0; $hour = 0; while ($row = mysql_fetch_array($res)) { $url = $row['url']; if ($hour > 23) { $hour = 0; } if ($minute >= 60) { $minute = 0; } $hour1 = $hour; $hour2 = $hour1 + 4; if ($hour2 > 23) { $hour2 = $hour2 - 24; }
<?php set_time_limit(0); include 'inc.db.php'; include 'ebayFunctions.php'; include "simple_html_dom.php"; $itemid = $_GET['itemid']; delete_item_prime($itemid); function delete_item($item_id) { $remove_request = end_item($item_id); $xml = simplexml_load_string($remove_request); return true; } function delete_item_prime($itemid) { $result = array(); $active_user = 8; $sql = "SELECT * FROM user_products where UserID={$active_user} and ItemID={$itemid}"; $res = mysql_query($sql) or die('Something Wrong...!'); while ($row = mysql_fetch_array($res)) { $sku = trim($row['SKU']); $sku = str_replace(' ', '', $sku); $pattern = '/^AMZ/'; $posamaz = preg_match($pattern, $sku, $matches, PREG_OFFSET_CAPTURE); $pattern = '/^WM/'; $poswm = preg_match($pattern, $sku, $matches, PREG_OFFSET_CAPTURE); $pattern = '/^OS/'; $posos = preg_match($pattern, $sku, $matches, PREG_OFFSET_CAPTURE); $pattern = '/^AL/'; $posal = preg_match($pattern, $sku, $matches, PREG_OFFSET_CAPTURE);