<?php

	include "library.php";

	$cxn = start_code( true, "academi1_monashconnect" );

	$screen_graphics = true;

	$_SESSION['sitename'] = 'Monash Connect';


		/* log the hits. remember the original source for conversions */

	if (val( $_GET, "internaljump" ) != "true")
	{
		$source = val( $_GET, "source" ).".".val( $_GET, "ad" );

		if ($source == ".")
			$source = ".blank";

		$_SESSION['source'] = $source;

		log_hits( $source, $cxn );
	}

	if (val( $_GET, "noncharging" ) == "true")
		$_SESSION['non_charging_override'] = true;

	$_SESSION['availableoverride'] = val( $_GET, 'availableoverride' );

	$_SESSION['validation_error'] = "false";
	$_SESSION['validation_errors'] = "";

	$_SESSION['session_active'] = "yes";

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

	$domain = val( $_SERVER, "HTTP_HOST" );

	$ip_country = get_ip_country( $cxn );
	$ip_country = str_replace( "'", "", $ip_country );
	$country = rawurlencode( $ip_country );

	if ($screen_graphics)
//		echo "<table width='100%'><td width='10%'></td><td align='left' width='20%'><img src='images/couple1a.jpg' width='100' height='150'></td>";
		echo "<table width='100%'><td width='10%'></td><td align='left' width='20%'><img src='images/beach1a.jpg' height='140'></td>";
	else
		echo "<table width='100%'><td width='10%'></td><td align='left' width='20%'></td>";

	echo "<td width='40%' align='center' valign='top'><span class='homeheading'><br>".$_SESSION['sitename']."</span>";
//	echo "<td width='40%' align='center' valign='top'><span class='homeheading'><br><img src='home_heading.gif'></span>";

	echo "<br><br><br><br><br><br>";

	echo "<a class='pinklink' href='".url_encode( "search_profiles.php", "country", $country )."'>to start click here</a>";

	echo "</td>";

	echo "<td width='15%' align='center' valign='bottom'>";

	if ($screen_graphics)
	{
		echo "<span class='gblue'>".$_SESSION['sitename']." is a social website for the Monash student community</span>";
//		echo "<a class='bluelink' href='".url_encode( "display_profile.php", "sample", "true", "returnpoint", "main"  )."'>click&nbsp;here</a>";
	}

	echo "</td><td width='15%'></td></tr></table>";

	if ($domain != "www.academicdating.net")
		echo "<p align='center'>".red( "<b>WARNING: This is a test environment this is not a live internet site. Live site -> </b>" ).show_link( "click here", "http://www.academicdating.net" )."</p>";

	if (! low_res_screen())
		echo "<br><br><br>";

	echo "<table width='100%'><tr><td width='20%'></td><td width='15%' align='center' valign='top'>";

	if (! $screen_graphics)
		echo pink( "<br>To get started click on 'Search' below" );

	echo "</td><td width='30%'></td><td width='15%' align='center'>";

	if (! $screen_graphics)
	{
		echo midgreen( "Academic Dating is a social and dating website. To view an example profile " );
		echo show_link( "<br>click here", "display_profile.php", "sample", "true", "returnpoint", "main" );
	}

	echo "</td><td width='20%'></td></tr></table>";

//	if (low_res_screen())
//		echo "";
//	else
//		echo "<br>";

//	if (! $screen_graphics)
//		echo "<br><br><br>";

	echo "<table width='100%'><tr><td width='8%'></td>";

	echo "<td width='16%'>".mainmenuheading( "&nbsp;&nbsp;Profiles" )."</td><td width='7%'></td>";
	echo "<td width='16%'>".mainmenuheading( "&nbsp;&nbsp;Messages" )."</td><td width='7%'></td>";
	echo "<td width='16%'>".mainmenuheading( "&nbsp;&nbsp;Other" )."</td><td width='7%'></td>";
	echo "<td width='16%'>".mainmenuheading( "&nbsp;&nbsp;Information" )."</td><td width='7%'></td>";
	echo "<td width='16%'>".mainmenuheading( "" )."</td><td width='7%'></td>";

	echo "</tr><tr><td width='8%'></td>";


		/* first line of options */

	show_menu_option( "id1", "Search&nbsp;Profiles", "search_profiles.php", "country", $country );
	show_menu_option( "id2", "Messages", "mailboxes.php", "box", "inbox" );
	show_menu_option( "id3", "Manage&nbsp;Photos", "manage_photos.php" );
	show_menu_option( "id4", "Information", "policies.php" );

	echo "</tr><tr><td width='8%'></td>";


		/* second line of options */

	show_menu_option( "id5", "View&nbsp;a&nbsp;Profile", "view_one_profile.php" );
	show_menu_option( "id6", "Contacts", "mailboxes.php", "box", "contacts" );
	show_menu_option( "id7", "Logout", "session_kill.php" );
//	show_menu_option( "id7", "Buy&nbsp;Credits", "buy_credits.php" );
//	show_menu_option( "id7", "Monthly&nbsp;Membership", "subscribe.php" );
//	show_menu_option( "id7", "Logout", "session_kill.php" );
	echo "<td width='16%'></td><td width='7%'></td>";

	echo "</tr><tr><td width='8%'></td>";


		/* third line of options */

	show_menu_option( "id8", "View&nbsp;Your&nbsp;Profile", "display_profile.php", "showid", "-1", "returnpoint", "main" );
	echo "<td width='16%'></td><td width='7%'></td>";
//	show_menu_option( "id9", "Buy&nbsp;Credits", "buy_credits.php" );
//	show_menu_option( "id9", "Logout", "session_kill.php" );
	echo "<td width='16%'></td><td width='7%'></td>";

	echo "</tr><tr><td width='8%'></td>";


		/* fourth line of options */

	show_menu_option( "id10", "Create&nbsp;a&nbsp;Profile", "edit_profile.php", "newprofile", "true" );
	echo "<td width='16%'></td><td width='7%'></td>";
//	show_menu_option( "id11", "Logout", "session_kill.php" );
	echo "<td width='16%'></td><td width='7%'></td>";

	echo "</tr><tr><td width='8%'></td>";


		/* fifth line of options */

	show_menu_option( "id12", "Edit&nbsp;Your&nbsp;Profile", "edit_profile.php", "newprofile", "false" );
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "</tr><tr><td width='8%'></td>";


		/* sixth line of options */

	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "<td width='16%'></td><td width='7%'></td>";
	echo "</tr><tr><td width='8%'></td>";

	echo "</tr></table>";

//	if (! low_res_screen())
//		echo "<br>";

	if ($screen_graphics)
		show_ads( $cxn, true, true );


	echo "<br><br><br>";

	function show_menu_option( $menu_id, $prompt, $option1="", $option2="", $option3="", $option4="", $option5="" )
	{
		echo "<td id='".$menu_id."' onmouseover='hl(\"".$menu_id."\");' onmouseout='uhl(\"".$menu_id."\");' width='16%'>";
		echo show_linkm( "&nbsp;&nbsp;".$prompt."&nbsp;&nbsp;", $option1, $option2, $option3, $option4, $option5 )."</td><td width='7%'></td>";
	}

?>
