$image_exists = false; $fn = strtolower($product['sku'] . ".jpg"); if (is_file("{$p1}/{$fn}")) { $image_exists = true; } else { if (is_file("{$p2}/{$fn}")) { $image_exists = true; } } if ($image_exists) { $user_id = $product['user_id']; $user_role = $db->select('users_in_roles', "`user_id`='{$user_id}'", '*', 1); if ($user_role['role_id'] !== 3) { $db->update("products", "approved", 1, $product['id']); } } } } $unchecked['collections'] = $db->select("collections", "`checked` = '0'"); $unchecked['products'] = $db->select("products", "`checked` = '0'"); if ($unchecked['products'] or $unchecked['collections']) { $blacklist = new Blacklist(); $errors = $blacklist->check($unchecked); if ($errors) { $alerts->display("warning", null, "All collections and their products have been checked against <span class=\\'text-danger\\'>blacklisted</span> words. Please check flagged items on the <span class=\\'text-danger\\'>blacklisted</span> reports page before continuing. Items to ammend:{$errors} <a class=\\'btn btn-default\\' href=\\'blacklist.php\\' role=\\'button\\'>Blacklist Report</a>", null); } } $html->title("Export", "select collection", "left"); $export->listing(); } require_once 'footer.php';