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(crypt::hmac(DC_MASTER_KEY,$_POST['pwd']))) { $core->error->add(__('Password verification failed')); } else { try { $core->delBlog($blog_id); http::redirect('blogs.php?del=1'); } catch (Exception $e) { $core->error->add($e->getMessage()); } } } dcPage::open(__('Delete a blog'),'', dcPage::breadcrumb( array( __('System') => '', __('Blogs') => 'blogs.php', ''.__('Delete a blog').'' => '' )) ); if (!$core->error->flag()) { echo '
'. ''.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(); ?>