<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?PHP
	session_start(); // Initialize session data
	if(! isset($_SESSION['useBT'])){ #If started in the middle go to 1st page
		header("Location: index.php");
	}

	if($_SERVER['REQUEST_METHOD'] == 'POST') {
		if(isset($_POST['sitesKnow'])){ //Result selected
			$siteTypes = $_POST['sitesKnow'];
			if (array_search("Other", $siteTypes)){
				$siteTypes[count($siteTypes) - 1] = $_POST['Other'];
			}
            elseif (count($siteTypes) == 1){
                if ($siteTypes[0] == 'Other'){
                    $siteTypes[0] = $_POST['Other'];
                }
            }
			$_SESSION['sitesKnow'] = $siteTypes;
			header("Location: pg5.php");
		}
	}
?>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="css.css" />
<title>BitTorrent Search Engine Survey</title>
<style type="text/css">
.auto-style1 {
	text-align: center;
}
.auto-style2 {
	text-align: right;
}
.auto-style3 {
	text-align: center;
	font-size: small;
}
</style>

<script type="text/javascript">

function checkForm()
{
	//Check whether Other is selected
	var multiSites = document.sitesForm.elements["sitesKnow[]"];
	var count = multiSites.length;
	if (multiSites[count - 1].checked){
		if (document.sitesForm.Other.value == "") //If so textbox can't be empty
		{
			alert('Please specify "Other" site(s).');
			return false;
		}
		else
		{
			return true;
		}
	}
	for(var i = 0; i < count - 1; i++)
	{
		if (multiSites[i].checked)
		{
			return true;
		}
	}
	alert("Please select at least one site that you are aware of.");
	return false;
}
</script>

</head>

<body>
<table style="width: 800px" align="center">
	<tr>
		<td>
<h1 class="auto-style1">BitTorrent Search Engine/Site Survey&nbsp;</h1>
		</td>
	</tr>
	<tr>
		<td style="height: 21px"></td>
	</tr>
	<tr>
		<td>
<p>Which of the following BitTorrent sites (search engines) <strong>are you aware of</strong> (select all that apply)?</p>
		<p>
		<form name="sitesForm" method="post" action="pg4.php" onsubmit="return checkForm()">
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="1337x"/><a href="http://1337x.org" target="_blank">1337x</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Bing"/><a href="http://www.bing.com" target="_blank">Bing</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BitGamer.su"/><a href="http://bitgamer.su" target="_blank">BitGamer.su</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BitSnoop"/><a href="http://bitsnoop.com" target="_blank">BitSnoop</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BitTorrent.com"/><a href="http://www.bittorrent.com/get-started" target="_blank">BitTorrent.com (or search box in client)</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BitTorrent Search Engine"/><a href="http://www.bittorrentsearchengine.com" target="_blank">BitTorrent Search Engine</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BitToxic.com"/><a href="http://www.bittoxic.com" target="_blank">BitToxic.com</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Blues Brothers"/><a href="http://www.blues-brothers.biz" target="_blank">Blues Brothers</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="BTscene"/><a href="http://www.btscene.eu" target="_blank">BTscene</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Bush Torrent"/><a href="http://bushtorrent.com" target="_blank">Bush Torrent</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="ClearBits"/><a href="http://www.clearbits.net" target="_blank">ClearBits</a><br />	
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Demonoid.me"/><a href="http://www.demonoid.me" target="_blank">Demonoid.me</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Entertane.com"/><a href="http://www.entertane.com/" target="_blank">Entertane.com</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Extra Torrent"/><a href="http://eztv.it" target="_blank">Extra Torrent</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="EZ-TV"/><a href="http://extratorrent.com" target="_blank">EZ-TV</a><br />	
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="fenopy"/><a href="http://fenopy.eu" target="_blank">fenopy</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="GamesTorrents"/><a href="http://gamestorrents.com" target="_blank">GamesTorrents</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="gameupdates.org"/><a href="http://gameupdates.org" target="_blank">gameupdates.org</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Google"/><a href="http://www.Google.com" target="_blank">Google</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="jamendo"/><a href="http://www.jamendo.com" target="_blank">jamendo</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Kickass Torrents (KAT)"/><a href="http://kat.ph/" target="_blank">Kickass Torrents (KAT)</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="isoHunt"/><a href="http://isohunt.com" target="_blank">isoHunt</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Linux23"/><a href="http://linux23.com" target="_blank">LINUX23</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="linux TRACKER"/><a href="http://linuxtracker.org" target="_blank">linux TRACKER</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Mininova"/><a href="http://mininova.org" target="_blank">Mininova</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="NowTorrents"/><a href="http://www.nowtorrents.com" target="_blank">NowTorrents</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Scrape Torrent"/><a href="http://scrapetorrent.com" target="_blank">Scrape Torrent</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Seedpeer"/><a href="http://www.seedpeer.me" target="_blank">Seedpeer</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="SUMO TORRENT"/><a href="http://www.sumotorrent.com" target="_blank">SUMO TORRENT</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="The Pirate Bay"/><a href="http://www.thepiratebay.se" target="_blank">The Pirate Bay</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="ThunderBytes"/><a href="http://www.thunderbytes.net" target="_blank">ThunderBytes</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torlock"/><a href="http://torlock.com" target="_blank">Torlock</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Toorgle"/><a href="http://www.toorgle.com" target="_blank">Toorgle</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrentbit"/><a href="http://www.torrentbit.net" target="_blank">Torrentbit</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="TorrentCafe"/><a href="http://torrentcafe.com" target="_blank">TorrentCafe</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrent Download"/><a href="http://www.torrentdownload.ws" target="_blank">Torrent Download</a><br />			
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrent Downloads"/><a href="http://www.torrentdownloads.net" target="_blank">Torrent Downloads</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrent Funk"/><a href="http://www.torrentfunk.com" target="_blank">Torrent Funk</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="torrentGamez"/><a href="http://www.torrentgamez.eu" target="_blank">torrentGamez</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrent Root"/><a href="http://www.torrentroot.com" target="_blank">Torrent Root</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="torrents.to"/><a href="http://torrents.to" target="_blank">torrents.to</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="TORRENTScan"/><a href="http://torrentscan.com" target="_blank">TORRENTScan</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrentz"/><a href="http://torrentz.eu" target="_blank">Torrentz</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Torrent Reactor"/><a href="http://torrentreactor.net" target="_blank">Torrent Reactor</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="torrentzap"/><a href="http://www.torrentzap.com" target="_blank">torrentzap</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Underground-Gamer"/><a href="http://underground-gamer.com" target="_blank">Underground-Gamer</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="uTorrent"/><a href="http://search.utorrent.com/search.php" target="_blank">uTorrent (or search box in client)</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="YouTorrent"/><a href="http://www.youtorrent.com/" target="_blank">YouTorrent</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="YourBittorrent"/><a href="http://yourbittorrent.com" target="_blank">YourBittorrent</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Vertor"/><a href="http://www.vertor.com" target="_blank">Vertor</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="VODO"/><a href="http://www.vodo.net" target="_blank">VODO</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="WiiTorrents"/><a href="http://www.wiitorrents.com" target="_blank">WiiTorrents</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Xunlei"/><a href="http://www.xunlei.com/" target="_blank">Xunlei (or search box in client)</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px"  class="radio" value="Yahoo"/><a href="http://www.Yahoo.com" target="_blank">Yahoo</a><br />
			<input name="sitesKnow[]" type="checkbox" style="width: 40px" class="radio" value="Other"/>Other(s) – please specify&nbsp;&nbsp;
				<input name="Other" type="text" style="width:200px" maxlength="128"/><br />
			<br />
			<div class="auto-style2">
			<input name="Next" type="submit" value="Next >>" /></div>
		</form>
		<p class="auto-style3">Progress 4/8</p>
		</td>
	</tr>
	<tr>
		<td>
		&nbsp;</td>
	</tr>
</table>
</body>

</html>
