<?php
/*
* buzzword
* Copyright (c) 2003 Jon Tai
*
* $Id: delcomment.php 267 2004-03-31 03:14:55Z bradt $
*
* This file is part of buzzword.
*
* buzzword is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* buzzword is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with buzzword; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once './config.inc';
force_admin_login();
$entry = new blog_entry(import_blog_entry_key());
if (!$entry->exists())
display_error('entry does not exist');
$comment = new blog_entry_comment($entry, import_blog_entry_comment_key());
if (!$comment->exists())
display_error('comment does not exist');
if (get_request_var('confirm-delete')) {
$comment->destroy();
header('Location: entry.php?e='.$entry->entry_key);
exit;
}
include '../includes/header.inc';
?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td id="content">
<h1>delete comment</h1>
<div class="content-container">
<p>permanently delete "<?php echo $comment->get_display_title(); ?>" by "<?php echo $comment->get_display_author(); ?>"?</p>
<center>
<table>
<tr>
<td>
<form method="get" action="delcomment.php">
<input type="hidden" name="confirm-delete" value="1">
<input type="hidden" name="e" value="<?php echo $entry->entry_key; ?>">
<input type="hidden" name="c" value="<?php echo $comment->comment_key; ?>">
<input type="submit" value="delete" class="submit">
</form>
</td>
<td>
<form method="get" action="entry.php">
<input type="hidden" name="e" value="<?php echo $entry->entry_key; ?>">
<input type="submit" value="cancel" class="submit">
</form>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
<?php
include '../includes/footer.inc';
?>