if (!current_user_can('manage_sites')) { nxt_die(__('You do not have permission to access this page.')); } if ($_GET['action'] != -1 || $_POST['action2'] != -1) { $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; } $blogfunction = ''; foreach ((array) $_POST['allblogs'] as $key => $val) { if ($val != '0' && $val != $current_site->blog_id) { switch ($doaction) { case 'delete': if (!current_user_can('delete_site', $val)) { nxt_die(__('You are not allowed to delete the site.')); } $blogfunction = 'all_delete'; nxtmu_delete_blog($val, true); break; case 'spam': $blogfunction = 'all_spam'; update_blog_status($val, 'spam', '1'); set_time_limit(60); break; case 'notspam': $blogfunction = 'all_notspam'; update_blog_status($val, 'spam', '0'); set_time_limit(60); break; } } else { nxt_die(__('You are not allowed to change the current site.')); }
* * @package NXTClass * @subpackage Multisite * @since 3.0.0 */ require_once './admin.php'; if (!is_multisite()) { nxt_die(__('Multisite support is not enabled.')); } // @todo Create a delete blog cap. if (!current_user_can('manage_options')) { nxt_die(__('You do not have sufficient permissions to delete this site.')); } if (isset($_GET['h']) && $_GET['h'] != '' && get_option('delete_blog_hash') != false) { if (get_option('delete_blog_hash') == $_GET['h']) { nxtmu_delete_blog($nxtdb->blogid); nxt_die(sprintf(__('Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.'), $current_site->site_name)); } else { nxt_die(__("I'm sorry, the link you clicked is stale. Please select another option.")); } } $title = __('Delete Site'); $parent_file = 'tools.php'; require_once './admin-header.php'; echo '<div class="wrap">'; screen_icon(); echo '<h2>' . esc_html($title) . '</h2>'; if (isset($_POST['action']) && $_POST['action'] == 'deleteblog' && isset($_POST['confirmdelete']) && $_POST['confirmdelete'] == '1') { check_admin_referer('delete-blog'); $hash = nxt_generate_password(20, false); update_option('delete_blog_hash', $hash);