<?php

	include "library.php";

	$cxn = start_code();
	
	$cxn_common = db_common_login();
	

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

	echo "<br><br>We have a full list of country entry-pages to the site, see below, so that members and prospective members of the site can easly locate us.<br><br><br>";

	$last_capital_letter = "";
	
	$query = "SELECT display_name, flag_file_name, php_file_name FROM country ORDER BY display_name";
	
	$result = run_query( $query, $cxn );

	for ($i=0; $i < mysql_num_rows($result); $i++)
	{
		$data = get_row( $result );	

		if (substr( $data['display_name'], 0, 1 ) != $last_capital_letter)
		{
			$last_capital_letter = substr( $data['display_name'], 0, 1 );
			
			echo "<br><br>".$last_capital_letter."<br><br>";
		}
		
		if ($data['php_file_name'] != "")
	    		echo "<a href='http://www.intbusinessesforsale.net/country/".$data['php_file_name']."'>".$data['display_name']."</a>";
	    	else
		    	echo $data['display_name'];
    		
    		if ($data['flag_file_name'] != "")
			echo "&nbsp;&nbsp;<img src='flags/".$data['flag_file_name']."' height=15>";
			
		echo "<br>";
	}
	




/*

	TODO: fill in missing PHP country files and 'country' table database entries
	
    echo "A<br><br>";
    	
    echo "<a href='http://www.academicdating.net/country/Afghanistan.php'> Afghanistan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Albania.php'> Albania </a><br>";

    echo "<a href='http://www.academicdating.net/country/Algeria.php'> Algeria </a><br>";

    echo "<a href='http://www.academicdating.net/country/Andorra.php'> Andorra </a><br>";

    echo "<a href='http://www.academicdating.net/country/Angola.php'> Angola </a><br>";

    echo "<a href='http://www.academicdating.net/country/Antigua_and_Barbuda.php'> Antigua and Barbuda </a><br>";

    echo "<a href='http://www.academicdating.net/country/Argentina.php'> Argentina </a><br>";

    echo "<a href='http://www.academicdating.net/country/Armenia.php'> Armenia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Aruba.php'> Aruba </a><br>";

    echo "<a href='http://www.academicdating.net/country/Australia.php'> Australia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Austria.php'> Austria </a><br>";

    echo "<a href='http://www.academicdating.net/country/Azerbaijan.php'> Azerbaijan </a><br>";

    echo "<br><br>B<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Bahamas.php'> The Bahamas </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bahrain.php'> Bahrain </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bangladesh.php'> Bangladesh </a><br>";

    echo "<a href='http://www.academicdating.net/country/Barbados.php'> Barbados </a><br>";

    echo "<a href='http://www.academicdating.net/country/Belarus.php'> Belarus </a><br>";

    echo "<a href='http://www.academicdating.net/country/Belgium.php'> Belgium </a><br>";

    echo "<a href='http://www.academicdating.net/country/Belize.php'> Belize </a><br>";

    echo "<a href='http://www.academicdating.net/country/Benin.php'> Benin </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bhutan.php'> Bhutan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bolivia.php'> Bolivia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bosnia_and_Herzegovina.php'> Bosnia and Herzegovina </a><br>";

    echo "<a href='http://www.academicdating.net/country/Botswana.php'> Botswana </a><br>";

    echo "<a href='http://www.academicdating.net/country/Brazil.php'> Brazil </a><br>";

    echo "<a href='http://www.academicdating.net/country/Brunei.php'> Brunei </a><br>";

    echo "<a href='http://www.academicdating.net/country/Bulgaria.php'> Bulgaria </a><br>";

    echo "<a href='http://www.academicdating.net/country/Burkina_Faso.php'> Burkina Faso </a><br>";

    echo "<a href='http://www.academicdating.net/country/Burundi.php'> Burundi </a><br>";

    echo "<br><br>C<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Cambodia.php'> Cambodia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Cameroon.php'> Cameroon </a><br>";

    echo "<a href='http://www.academicdating.net/country/Canada.php'> Canada </a><br>";

    echo "<a href='http://www.academicdating.net/country/Cabo_Verde.php'> Cabo Verde </a><br>";

    echo "<a href='http://www.academicdating.net/country/Central_African_Republic.php'> Central African Republic </a><br>";

    echo "<a href='http://www.academicdating.net/country/Chad.php'> Chad </a><br>";

    echo "<a href='http://www.academicdating.net/country/Chile.php'> Chile </a><br>";

    echo "<a href='http://www.academicdating.net/country/China.php'> China </a><br>";

    echo "<a href='http://www.academicdating.net/country/Colombia.php'> Colombia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Comoros.php'> Comoros </a><br>";

    echo "<a href='http://www.academicdating.net/country/Democratic_Republic_of_the_Congo.php'> The Democratic Republic of the Congo </a><br>";

    echo "<a href='http://www.academicdating.net/country/Costa_Rica.php'> Costa Rica </a><br>";

    echo "<a href='http://www.academicdating.net/country/Cote_d_Ivoire.php'> Cote d'Ivoire </a><br>";

    echo "<a href='http://www.academicdating.net/country/Croatia.php'> Croatia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Cuba.php'> Cuba </a><br>";

    echo "<a href='http://www.academicdating.net/country/Curacao.php'> Curacao </a><br>";

    echo "<a href='http://www.academicdating.net/country/Cyprus.php'> Cyprus </a><br>";

    echo "<a href='http://www.academicdating.net/country/Czechia.php'> Czechia </a><br>";

    echo "<br><br>D<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Denmark.php'> Denmark </a><br>";

    echo "<a href='http://www.academicdating.net/country/Djibouti.php'> Djibouti </a><br>";

    echo "<a href='http://www.academicdating.net/country/Dominica.php'> Dominica </a><br>";

    echo "<a href='http://www.academicdating.net/country/Dominican_Republic.php'> Dominican Republic </a><br>";

    echo "<br><br>E<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/East_Timor.php'> East Timor </a><br>";

    echo "<a href='http://www.academicdating.net/country/Ecuador.php'> Ecuador </a><br>";

    echo "<a href='http://www.academicdating.net/country/Egypt.php'> Egypt </a><br>";

    echo "<a href='http://www.academicdating.net/country/El_Salvador.php'> El Salvador </a><br>";

    echo "<a href='http://www.academicdating.net/country/Equatorial_Guinea.php'> Equatorial Guinea </a><br>";

    echo "<a href='http://www.academicdating.net/country/Eritrea.php'> Eritrea </a><br>";

    echo "<a href='http://www.academicdating.net/country/Estonia.php'> Estonia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Ethiopia.php'> Ethiopia </a><br>";

    echo "<br><br>F<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Fiji.php'> Fiji </a><br>";

    echo "<a href='http://www.academicdating.net/country/Finland.php'> Finland </a><br>";

    echo "<a href='http://www.academicdating.net/country/France.php'> France </a><br>";

    echo "<br><br>G<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Gabon.php'> Gabon </a><br>";

    echo "<a href='http://www.academicdating.net/country/Gambia_The.php'> The Gambia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Georgia.php'> Georgia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Germany.php'> Germany </a><br>";

    echo "<a href='http://www.academicdating.net/country/Ghana.php'> Ghana </a><br>";

    echo "<a href='http://www.academicdating.net/country/Greece.php'> Greece </a><br>";

    echo "<a href='http://www.academicdating.net/country/Grenada.php'> Grenada </a><br>";

    echo "<a href='http://www.academicdating.net/country/Guatemala.php'> Guatemala </a><br>";

    echo "<a href='http://www.academicdating.net/country/Guinea.php'> Guinea </a><br>";

    echo "<a href='http://www.academicdating.net/country/Guinea_Bissau.php'> Guinea-Bissau </a><br>";

    echo "<a href='http://www.academicdating.net/country/Guyana.php'> Guyana </a><br>";

    echo "<br><br>H<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Haiti.php'> Haiti </a><br>";

    echo "<a href='http://www.academicdating.net/country/Holy_See.php'> Holy See </a><br>";

    echo "<a href='http://www.academicdating.net/country/Honduras.php'> Honduras </a><br>";

    echo "<a href='http://www.academicdating.net/country/Hong_Kong.php'> Hong Kong </a><br>";

    echo "<a href='http://www.academicdating.net/country/Hungary.php'> Hungary </a><br>";

    echo "<br><br>I<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Iceland.php'> Iceland </a><br>";

    echo "<a href='http://www.academicdating.net/country/India.php'> India </a><br>";

    echo "<a href='http://www.academicdating.net/country/Indonesia.php'> Indonesia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Iran.php'> Iran </a><br>";

    echo "<a href='http://www.academicdating.net/country/Iraq.php'> Iraq </a><br>";

    echo "<a href='http://www.academicdating.net/country/Ireland.php'> Ireland </a><br>";

    echo "<a href='http://www.academicdating.net/country/Israel.php'> Israel </a><br>";

    echo "<a href='http://www.academicdating.net/country/Italy.php'> Italy </a><br>";

    echo "<br><br>J<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Jamaica.php'> Jamaica </a><br>";

    echo "<a href='http://www.academicdating.net/country/Japan.php'> Japan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Jordan.php'> Jordan </a><br>";

    echo "<br><br>K<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Kazakhstan.php'> Kazakhstan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Kenya.php'> Kenya </a><br>";

    echo "<a href='http://www.academicdating.net/country/Kiribati.php'> Kiribati </a><br>";

    echo "<a href='http://www.academicdating.net/country/Kosovo.php'> Kosovo </a><br>";

    echo "<a href='http://www.academicdating.net/country/Kuwait.php'> Kuwait </a><br>";

    echo "<a href='http://www.academicdating.net/country/Kyrgyzstan.php'> Kyrgyzstan </a><br>";

    echo "<br><br>L<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Laos.php'> Laos </a><br>";

    echo "<a href='http://www.academicdating.net/country/Latvia.php'> Latvia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Lebanon.php'> Lebanon </a><br>";

    echo "<a href='http://www.academicdating.net/country/Lesotho.php'> Lesotho </a><br>";

    echo "<a href='http://www.academicdating.net/country/Liberia.php'> Liberia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Libya.php'> Libya </a><br>";

    echo "<a href='http://www.academicdating.net/country/Liechtenstein.php'> Liechtenstein </a><br>";

    echo "<a href='http://www.academicdating.net/country/Lithuania.php'> Lithuania </a><br>";

    echo "<a href='http://www.academicdating.net/country/Luxembourg.php'> Luxembourg </a><br>";

    echo "<br><br>M<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Macau.php'> Macau </a><br>";

    echo "<a href='http://www.academicdating.net/country/Macedonia.php'> Macedonia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Madagascar.php'> Madagascar </a><br>";

    echo "<a href='http://www.academicdating.net/country/Malawi.php'> Malawi </a><br>";

    echo "<a href='http://www.academicdating.net/country/Malaysia.php'> Malaysia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Maldives_The.php'> The Maldives </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mali.php'> Mali </a><br>";

    echo "<a href='http://www.academicdating.net/country/Malta.php'> Malta </a><br>";

    echo "<a href='http://www.academicdating.net/country/Marshall_Islands_The.php'> The Marshall Islands </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mauritania.php'> Mauritania </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mauritius.php'> Mauritius </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mexico.php'> Mexico </a><br>";

    echo "<a href='http://www.academicdating.net/country/Micronesia.php'> Micronesia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Moldova.php'> Moldova </a><br>";

    echo "<a href='http://www.academicdating.net/country/Monaco.php'> Monaco </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mongolia.php'> Mongolia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Montenegro.php'> Montenegro </a><br>";

    echo "<a href='http://www.academicdating.net/country/Morocco.php'> Morocco </a><br>";

    echo "<a href='http://www.academicdating.net/country/Mozambique.php'> Mozambique </a><br>";
    
    echo "<a href='http://www.academicdating.net/country/Myanmar.php'> Myanmar </a><br>";

    echo "<br><br>N<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Namibia.php'> Namibia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Nauru.php'> Nauru </a><br>";

    echo "<a href='http://www.academicdating.net/country/Nepal.php'> Nepal </a><br>";

    echo "<a href='http://www.academicdating.net/country/Netherlands_The.php'> The Netherlands </a><br>";

    echo "<a href='http://www.academicdating.net/country/New_Zealand.php'> New Zealand </a><br>";

    echo "<a href='http://www.academicdating.net/country/Nicaragua.php'> Nicaragua </a><br>";

    echo "<a href='http://www.academicdating.net/country/Niger.php'> Niger </a><br>";

    echo "<a href='http://www.academicdating.net/country/Nigeria.php'> Nigeria </a><br>";

    echo "<a href='http://www.academicdating.net/country/Norway.php'> Norway </a><br>";

    echo "<br><br>O<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Oman.php'> Oman </a><br>";

    echo "<br><br>P<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Pakistan.php'> Pakistan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Palau.php'> Palau </a><br>";

    echo "<a href='http://www.academicdating.net/country/Palestinian_Territories_The.php'> The Palestinian Territories </a><br>";

    echo "<a href='http://www.academicdating.net/country/Panama.php'> Panama </a><br>";

    echo "<a href='http://www.academicdating.net/country/Papua_New_Guinea.php'> Papua New Guinea </a><br>";

    echo "<a href='http://www.academicdating.net/country/Paraguay.php'> Paraguay </a><br>";

    echo "<a href='http://www.academicdating.net/country/Peru.php'> Peru </a><br>";

    echo "<a href='http://www.academicdating.net/country/Philippines_The.php'> The Philippines </a><br>";

    echo "<a href='http://www.academicdating.net/country/Poland.php'> Poland </a><br>";

    echo "<a href='http://www.academicdating.net/country/Portugal.php'> Portugal </a><br>";

    echo "<br><br>Q<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Qatar.php'> Qatar </a><br>";

    echo "<br><br>R<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Romania.php'> Romania </a><br>";

    echo "<a href='http://www.academicdating.net/country/Russia.php'> Russia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Rwanda.php'> Rwanda </a><br>";
    
    echo "<br><br>S<br><br>";
        
    echo "<a href='http://www.academicdating.net/country/Saint_Kitts_and_Nevis.php'> Saint Kitts and Nevis </a><br>";

    echo "<a href='http://www.academicdating.net/country/Saint_Lucia.php'> Saint Lucia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Saint_Vincent_and_the_Grenadines.php'> Saint Vincent and the Grenadines</a><br>";

    echo "<a href='http://www.academicdating.net/country/Samoa.php'> Samoa </a><br>";

    echo "<a href='http://www.academicdating.net/country/San_Marino.php'> San Marino </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sao_Tome_and_Principe.php'> Sao Tome and Principe </a><br>";

    echo "<a href='http://www.academicdating.net/country/Saudi_Arabia.php'> Saudi Arabia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Senegal.php'> Senegal </a><br>";

    echo "<a href='http://www.academicdating.net/country/Serbia.php'> Serbia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Seychelles.php'> Seychelles </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sierra_Leone.php'> Sierra Leone </a><br>";

    echo "<a href='http://www.academicdating.net/country/Singapore.php'> Singapore </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sint_Maarten.php'> Sint Maarten </a><br>";

    echo "<a href='http://www.academicdating.net/country/Slovakia.php'> Slovakia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Slovenia.php'> Slovenia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Solomon_Islands_The.php'> The Solomon Islands </a><br>";

    echo "<a href='http://www.academicdating.net/country/Somalia.php'> Somalia </a><br>";

    echo "<a href='http://www.academicdating.net/country/South_Africa.php'> South Africa </a><br>";

    echo "<a href='http://www.academicdating.net/country/South_Korea.php'> South Korea </a><br>";
    
    echo "<a href='http://www.academicdating.net/country/South_Sudan.php'> South Sudan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Spain.php'> Spain </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sri_Lanka.php'> Sri Lanka </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sudan_The.php'> The Sudan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Suriname.php'> Suriname </a><br>";

    echo "<a href='http://www.academicdating.net/country/Swaziland.php'> Swaziland </a><br>";

    echo "<a href='http://www.academicdating.net/country/Sweden.php'> Sweden </a><br>";

    echo "<a href='http://www.academicdating.net/country/Switzerland.php'> Switzerland </a><br>";

    echo "<a href='http://www.academicdating.net/country/Syria.php'> Syria </a><br>";

    echo "<br><br>T<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Taiwan.php'> Taiwan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Tajikistan.php'> Tajikistan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Tanzania.php'> Tanzania </a><br>";

    echo "<a href='http://www.academicdating.net/country/Thailand.php'> Thailand </a><br>";

    echo "<a href='http://www.academicdating.net/country/Timor_Leste.php'> Timor-Leste </a><br>";

    echo "<a href='http://www.academicdating.net/country/Togo.php'> Togo </a><br>";

    echo "<a href='http://www.academicdating.net/country/Tonga.php'> Tonga </a><br>";

    echo "<a href='http://www.academicdating.net/country/Trinidad_and_Tobago.php'> Trinidad and Tobago </a><br>";

    echo "<a href='http://www.academicdating.net/country/Tunisia.php'> Tunisia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Turkey.php'> Turkey </a><br>";

    echo "<a href='http://www.academicdating.net/country/Turkmenistan.php'> Turkmenistan </a><br>";

    echo "<a href='http://www.academicdating.net/country/Tuvalu.php'> Tuvalu </a><br>";

    echo "<br><br>U<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Uganda.php'> Uganda </a><br>";

    echo "<a href='http://www.academicdating.net/country/UK_The.php'> The UK </a><br>";
    
    echo "<a href='http://www.academicdating.net/country/Ukraine_The.php'> The Ukraine </a><br>";

    echo "<a href='http://www.academicdating.net/country/United_Arab_Emirates_The.php'> The United Arab Emirates </a><br>";

    echo "<a href='http://www.academicdating.net/country/Uruguay.php'> Uruguay </a><br>";

    echo "<a href='http://www.academicdating.net/country/USA_The.php'> The USA </a><br>";

    echo "<a href='http://www.academicdating.net/country/Uzbekistan.php'> Uzbekistan </a><br>";

    echo "<br><br>V<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Vanuatu.php'> Vanuatu </a><br>";

    echo "<a href='http://www.academicdating.net/country/Venezuela.php'> Venezuela </a><br>";

    echo "<a href='http://www.academicdating.net/country/Vietnam.php'> Vietnam </a><br>";
    
    echo "<br><br>Y<br><br>";

    echo "<a href='http://www.academicdating.net/country/Yemen.php'> Yemen </a><br>";

    echo "<br><br>Z<br><br>";
    
    echo "<a href='http://www.academicdating.net/country/Zambia.php'> Zambia </a><br>";

    echo "<a href='http://www.academicdating.net/country/Zimbabwe.php'> Zimbabwe</a><br>";
*/
    
?>


