<?php
session_start ();
$adsessionid = 'cashsolos' . $_GET ['adid'];
if ($_SESSION ['adclickid'] != $adsessionid) {
	$divdata = "<font size=\"2\" face=\"$fonttype\" color=\"red\"><b><center>Only one ad at a time please..</b></font><center>";
	$_SESSION ['adclickid'] = 'done';
} else {
	$divdata = '<div id="coord" onclick="submitform(xcoord(event))" class="cd"></div>';
	// afloat = base64_encoded random string
	$afloat = base64_encode ( " " . $num1 = rand ( 0, 3 ) . "." . $num2 = rand ( 100, 999 ) . " IDEuNzg3IEZsb2F0IDMuODc5IAcashsolos " . $num3 = rand ( 1, 4 ) . "." . $num4 = rand ( 100, 999 ) . " " );
	
	// rectangle x coord
	

	$aler = "> 78";
	if (round ( $num1 . "." . $num2 ) <= round ( $num3 . "." . $num4 )) {
		$aler = "< 105";
	}
	
	// create random image
	$_SESSION ['igif'] = "surfimage.php?n=" . $afloat . "";
	$_SESSION ['afloat'] = $afloat;
}
?>
<html>
<head>
<style type="text/css">
/* click image */
.cd {
	width: 185px;
	height: 15px;
	background-image: url(members/<?=$_SESSION ['igif'];?>);
	background-repeat: no-repeat;
	position: relative;
	z-index: 2;
	margin: 0px;
	padding: 0px;
	float: center;
}
</style>
<script language="JavaScript">
function submitform() {

	if (document.xcoords.x.value <?=$aler;?>) {
		document.xcoords.submit();

	} else {
		alert("Click number in square identicale to number in rectangle to submit.");
	}
}
// image x value
function xcoord(event) {
	image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
	document.xcoords.x.value = image;
}
</script>
</head>
<body background="images/Back-1.gif">

<center>
<?
if ($_GET ['message']) {
	
	if ($_GET ['url']) {
		?>
	<div style="float: left; padding-top: 100px;"><a
	href="<?
		echo $_GET ['url'];
		?>" target="_top">Remove This Frame</a></div>

<div style="float: right; padding-top: 100px;"><a
	href="<?
		echo $_GET ['url'];
		?>" target="_top">Remove This Frame</a></div>

	<?
	}
	
	echo $_GET ['message'];

} else {
	?>
<form name="xcoords" style="display: inline;" method="post"
	target="_self"
	action="<?php
	echo "cashsolos3.php?seed=" . $_GET ['seed'] . "&adid=" . $_GET ['adid'] . "&userid=" . $_GET ['userid'] . "&url=" . urlencode ( $_GET ['url'] );
	?>">
<input type="hidden" name="x"></form>
<br>
<span id="plzwait">You Will Earn <?
	echo $_GET ['credit'];
	?> Cash After 20 seconds</span>
<script type="text/javascript">
	counter = 20;
	function countdown() {
		if ((0 <= 100) || (0 > 0)) {
			counter--;
			if(counter > 0) {
				document.getElementById("plzwait").innerHTML = 'You Will Earn <?
	echo $_GET ['credit'];
	?> Cash After <b>'+counter+'<\/b> seconds';
				setTimeout('countdown()',1000);

			} else if(counter==0) {

				document.getElementById("plzwait").innerHTML = '<?php
	echo $divdata;
	?>';


			}
		}
	}
	<?php
	if ($_GET ['seed'])
		echo 'countdown();';
	?>
	
	</script>
<noscript>
<h2>You need a javascript enable browser to surf</h2>
</noscript>
<?
}
?>
<br>

<?
include "config.php";
include ("banners2.php");
mysql_close ( $dblink );
?>
</center>

</body>
</html>