<?php 
require_once('scripts/sb_functions.php');
global $logged_in;
$logged_in = logged_in( true, true );
	
read_config();	
sb_language( 'comments' );
	
// Delete selected comment file.
$ok = false;
if ( array_key_exists( 'comment', $_GET ) ) {
    $ok = delete_comment( $_GET[ 'comment' ] );
}	

if ( $ok === true ) {
    $relative_url = 'comments.php?y='.$_GET[ 'y' ].'&m='.$_GET[ 'm' ].'&entry='.$_GET[ 'entry' ];
    redirect_to_url( $relative_url );
}

html_header('',false);

function page_content() {
    global $lang_string, $user_colors;
		
    if ( $ok !== true ) {
	echo $lang_string[ 'error_delete' ] . $ok . '<p />';
    }
		
    echo( '<a href="index.php">' . $lang_string[ 'home' ] . '</a><br /><br />' );
}
global $blog_config;
if ( $blog_config[ 'blog_comments_popup' ] == 1 ) {
    theme_popuplayout();
} else {
    theme_pagelayout();
}

html_footer();

?>
