<?
//Zeitcheck

$time_2=base64_decode($_GET['ch_time']);
$time_2=$time_2+$forced['aufendhalt']-1;



$row= mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_vklicks_einst WHERE kamp_als='".$forced['sponsor']."'"));




// Hier Sponsoren ausklammern die eine Werbeart nicht anbieten im Vcheck, wie z.b. ads-im-net. (bietet keinen Vcheck bei Paidlinks)

if($forced['werbeart'] =='highforced' and (($row['what'] =='000') or ($row['what'] =='001') or ($row['what'] =='010') or ($row['what'] =='011'))){$row['status']='0';}
if($forced['werbeart'] =='paidlinks'  and (($row['what'] =='000') or ($row['what'] =='001') or ($row['what'] =='100') or ($row['what'] =='101'))){$row['status']='0';}
if($forced['werbeart'] =='paidmail'  and (($row['what'] =='000') or ($row['what'] =='010') or ($row['what'] =='100') or ($row['what'] =='100'))){$row['status']='0';}

//Aufenthaltszeit prüfen
if($time_2 < $time_1)
{

	if($row['status']=='1')

	{

	$v1= addslashes ($_GET['v1']);
	$check= mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_vcheck_codes WHERE code='$v1'"));

	if($check['status']=='0')
		{
		$forced['verdienst']='0';
		$v_message='Keine Verguetung beim Sponsor';
		}
		else if(empty($check['status']))
    		{
     		$forced['verdienst']='0';
        	$v_message='ungültiger Kampagnenaufruf';
        	}	
		else
		{		
		$v_message='Kampagne beim Sponsor verguetet';
		
		}
	
	
	}
	else
	{
	$v_message='Kampagne verguetet';
	}

}
else
{
$forced['verdienst']='0';
$v_message='Aufenthaltszeit umgangen';

}

?>

