getBlog($_POST['blog_id']); } catch (Exception $e) { $core->error->add($e->getMessage()); } if ($rs->isEmpty()) { $core->error->add(__('No such blog ID')); } else { $blog_id = $rs->blog_id; $blog_name = $rs->blog_name; } } # Delete the blog if (!$core->error->flag() && $blog_id && !empty($_POST['del'])) { if (!$core->auth->checkPassword($_POST['pwd'])) { $core->error->add(__('Password verification failed')); } else { try { $core->delBlog($blog_id); dcPage::addSuccessNotice(sprintf(__('Blog "%s" successfully deleted'), html::escapeHTML($blog_name))); $core->adminurl->redirect("admin.blogs"); } catch (Exception $e) { $core->error->add($e->getMessage()); } } } dcPage::open(__('Delete a blog'), '', dcPage::breadcrumb( [ __('System') => '', __('Blogs') => $core->adminurl->get("admin.blogs"), __('Delete a blog') => '' ]) ); if (!$core->error->flag()) { echo '
' . __('Warning') . '
' . '' . sprintf(__('You are about to delete the blog %s. Every entry, comment and category will be deleted.'), '' . $blog_id . ' (' . $blog_name . ')') . '
' . __('Please give your password to confirm the blog deletion.') . '
'; echo ''; } dcPage::close();