<?php

	include "library.php";

	$cxn = start_code();

	
			/* get variables */

	$id = val( $_SESSION, "id" );

	$block_id = val( $_GET, "blockid" );


		/* if the user is not logged in them direct them to the login page then back to here */

	if ($id == "")
	{
		$_SESSION['nextpage'] = url_encode( "block.php", "blockid", $blockid );

		jump_to_page( "login.php" );		/* must happen before print output */

		exit();
	}

	page_header( "", $cxn );

		/* check parameters */

	crash_if_missing( $id, "id not set in 'block'", $cxn );

	crash_if_missing( $block_id, "block id not set in block", $cxn );


		/* prompt the user */

	echo red( "<br>Are you sure you want to block contact with this member?<br><br><br>" );


		/* yes */

	echo sp(2);

	show_button_h( "yes", "block_go.php", "block", "yes", "blockid", $block_id );


		/* no */

	echo sp(2);

	show_button_h( "no", "block_go.php", "block", "no", "blockid", $block_id );

?>
