<?php

	include "library.php";

	$cxn = start_code();

	$cxn_common = db_common_login();


	
			/* get variables */

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

	$id1 = val( $_GET, 'id1' );

	$id2 = val( $_GET, 'id2' );


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

	if ($id == "")
	{
		$_SESSION['nextpage'] = url_encode( "chat_request_check.php", "id1", $id1, "id2", $id2 );

	    jump_to_page( val( $_SESSION, "login_page" ) );		/* must happen before print output */

		exit();
	}

	page_header( "", $cxn, $cxn_common );


		/* check the parameters */

	crash_if_missing( $id1, "id1 missing in chat_request_check", $cxn );

	crash_if_missing( $id2, "id2 missing in chat_request_check", $cxn );


		/* prompt the user */

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

		
		/* yes  */

	echo sp(2);

//	show_button_h( "yes", "chat.php", "chat", "yes", "id1", $id1, "id2", $id2, "newchat", "true" );

	show_green_button( "yes", 100, "chat.php", "chat", "yes", "id1", $id1, "id2", $id2, "newchat", "true" );

		/* no */

	echo sp(2);

//	show_button_h( "no", "chat.php", "chat", "no", "id1", $id1, "id2", $id2, "newchat", "true" );
	
	show_green_button( "no", 100, "chat.php", "chat", "no", "id1", $id1, "id2", $id2, "newchat", "true" );	

?>