<?php

	include "library.php";

	$cxn = start_code( true );

	log_source( val( $_GET, "source" ), $cxn );

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

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

	$query = "SELECT count(*) as num FROM (SELECT DISTINCT country FROM profile WHERE deleted = 'no') x";
	$result = run_query( $query, $cxn );
	$data = get_row( $result );

	echo "<br>";

	echo "<p align='center'><span style='font-size:22pt'><font color='#ff0000'>Welcome to ".$_SESSION['sitename']."</font></span></p>";

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

	$s1 = "<p align='center'><font color='#ff0000'>What is ".$_SESSION['sitename']."</font><br>";
	$s1 .= "<font color='#00a600'>".$_SESSION['sitename']." is a social and dating website. ";
	$s1 .= " ".$_SESSION['sitename']." hosts members from";
	$s1 .= " many countries of the world.</font>";

	$s2 = "<p align='center'><font color='#ff0000'>Costs</font><br>";
	$s2 .= "<font color='#00a600'>To see information about costs click </font> ";
	$s2 .= "<a href='".url_encode( "charges.php" )."'><font color='#00a600'>costs</font></a>";

	$s4 = "<p align='center'><font color='#ff0000'>Overseas friends</font><br>";
//	$s4 .= "<font color='#00a600'>".$_SESSION['sitename']." has members from ".$data['num']." countries around the world. This is a great";
	$s4 .= "<font color='#00a600'>".$_SESSION['sitename']." has members from many countries around the world. This is a great";
	$s4 .= " way to get to know people in other countries and cultures and develop";
	$s4 .= " new friendshsips</font>";

	$s5 = "<p align='center'><font color='#ff0000'>Relationships</font><br>";
	$s5 .= "<font color='#00a600'>Most people on ".$_SESSION['sitename']." are looking for a relationship</font>";

	$s7 = "<p align='center'><font color='#ff0000'><b>Home Page</b></font><br>";
	$s7 .= "<font color='#00a600'>To explore the site<br>";
	$s7 .= show_link( "click&nbsp;here", "index.php", "source", "welcome_redirect" );

	echo "<table width='100%'><tr>";
	echo "<td width='14.2%'></td>";
	echo "<td width='14.2%' valign='top'>".$s5."</td>";
	echo "<td width='24.2%'></td>";
	echo "<td width='14.2%' valign='center'>".$s7."</td>";
	echo "<td width='4.2%'></td>";
	echo "<td width='14.2%' valign='top'>".""."</td>";
	echo "<td width='14.8%'></td>";
	echo "</tr></table>";

	echo "<br><br>";

	echo "<table width='100%'><tr>";
	echo "<td width='14.2%'></td>";
	echo "<td width='14.2%'>".$s4."</td>";
	echo "<td width='14.2%'></td>";
	echo "<td width='14.2%'>".$s1."</td>";
	echo "<td width='14.2%'></td>";
	echo "<td width='14.2%'>".$s2."</td>";
	echo "<td width='14.8%'></td>";
	echo "</tr></table>";

?>
