<?php 
	require_once('scripts/sb_functions.php');
	global $logged_in;
	$logged_in = logged_in( false, true );
	
	read_config();
	
	require_once('languages/' . $blog_config[ 'blog_language' ] . '/strings.php');
	sb_language( 'trackbacks' );
	
	// Delete selected comment file.
	$ok = false;
	if ( array_key_exists( 'trackback', $_GET ) ) {
		$ok = delete_trackback( $_GET[ 'trackback' ] );	
	}
	
	if ( $ok === true ) {
		$relative_url = 'trackback.php?y='.$_GET[ 'y' ].'&m='.$_GET[ 'm' ].'&entry='.$_GET[ 'entry' ].'&__mode=html';
		redirect_to_url( $relative_url );
	}

html_header();

	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();
?>
