. require_once("../inc/util_ops.inc"); $cancel = post_int('cancel', true); $hide_canceled = post_str('hide_canceled', true); $hide_dlerr = post_str('hide_dlerr', true); $appid = post_int('appid', true); $WU = post_arr('WU', true); $back = post_str('back', true); $clause = post_str('clause', true); $limit = post_int('limit', true); if (!$limit || $limit == 0) { $limit = 20; } admin_page_head("Cancel Workunits"); // check for WUs to cancel // $WUs = ""; if ($cancel && ($cancel == 1)) { if ($WU) { foreach ($WU as $key => $value) { if($WUs != "") { $WUs = $WUs . ","; } $WUs = $WUs . $value; } } } // cancel WUs (if not in rops) // if($WUs != "") { echo "\n"; if (!in_rops()) { cancel_wus_where("id IN (" . $WUs . ")"); } } if ($back) { if ($back == "errorwus") { $args = "?refresh_cache=1"; if ($hide_canceled && $hide_canceled=="on") { $args .= "&hide_canceled=on"; } if ($hide_dlerr && $hide_dlerr=="on") { $args .= "&hide_dlerr=on"; } if ($appid) { $args .= "&appid=$appid"; } echo "
Return to All-error Workunits page (refreshes the cache)
"; } else if ($back == "cancelwus") { if ($clause) { $clause=urlencode($clause); echo ""; echo "Cancel next (max $limit) Workunits
"; } echo "Return to Cancel Workunits page
"; } } echo ""; echo "Page last updated "; echo time_str(time()); echo "
\n"; admin_page_tail(); ?>