if(!check_perms('users_mod') || !check_perms('admin_clear_cache')) { error(403); } View::show_header('Clear a cache key'); //Make sure the form was sent if(!empty($_GET['key']) && $_GET['type'] == "clear") { if(preg_match('/(.*?)(\d+)\.\.(\d+)$/', $_GET['key'], $Matches) && is_number($Matches[2]) && is_number($Matches[3])) { for($i=$Matches[2]; $i<=$Matches[3]; $i++) { $Cache->delete_value($Matches[1].$i); } echo '
'; } else { $Cache->delete_value($_GET['key']); echo ' '; } } ?>