<?php
ob_start();
include("config.php");
	if(! check_login()) { 
	exit;
	}

?>

<html>
<head>
<title>Ultimatecrime</title>
<link rel="stylesheet" type="text/css" href="style_general.css">

</head>
<body background="layout/images/layout_12.gif" bgproperties="fixed">
<br>
<br>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" align="center">
		<b>Ultimatecrime - VIP Shop</b>
		</td>
	</tr>
	<tr>
		<td align="center" class="maintxts">

<?php

	if($_GET['betaling'] == 1){

	require('class.php');

	$m	=	new micropayment();
	$m->setPartnerID(37545);
	if ($_GET['c']) 
	$m->setCountry($_GET['c']);
	$m->setAmount(1.30);
    
		if ($_GET['servicenumber'] and $_GET['paycode']) {
		$m->setServicenumber($_GET['servicenumber']);
		$m->setPaycode($_GET['paycode']);
		$m->checkPayment();
        
			if($m->payed){
			mysql_query("INSERT INTO `betalingen`(`login`,`soort`) VALUES('{$data->login}','Bellen')");
			mysql_query("UPDATE `gebruiker` SET `vipster`=`vipster`+'1' WHERE `login`='{$data->login}'");
			echo 'De betaling is afegerond, Bedankt voor jouw steun.' ;
			} else {
			echo '<font color=red><b>Betaling is niet afgerond,<br />volg de onderstaande instructies!</b></font><br /><br />';
			}
		}
    
		if (!$m->payed) {
		include('include.php');
		}

	} else if($_GET['betaling'] == 2){

	} else if($_GET['betaling'] == 3){

	require('class.mollie.ideal.php');
	$partnerid='37545';
	$uwsite='http://www.Ultimatecrime.nl';
	$reportscript = $uwsite . '/report.php';
	$returnscript = $uwsite . '/return.php';

		if($_GET[bankid]){
		$ideal = new ideal();
		$ideal->setPartnerid($partnerid);
		$ideal->setDescription('dit is een testbetaling..');
		$ideal->setReturnURL($returnscript);
		$ideal->setReportURL($reportscript);
		$ideal->setAmount('1000');
		$ideal->setBankid($_GET[bankid]);

			if(!$ideal->createPayment())
			die('aanmaak payment niet gelukt: '.$ideal->statusmessage);

		header("Location: $ideal->bankurl");
		} else {

		$ideal = new ideal();
		$ideal->fetchBanks();

		echo('<form><select name="bankid">');
			foreach($ideal->banks as $bank_id=>$bank_name)
			echo('<option value="' . $bank_id . '">' . $bank_name . '</option>');
		echo('</select><input type=hidden name=betaling value=3><input type="submit" value="kies bank"></form><p>(Dit proces kost €10,- het leverd 10 VIP sterren op.)</p>');
		}

	} else {

?>

Selecteer de betaalmethode die je wilt gebruiken: 
<table>
	<tr>
		<td>
		<a href="algemeen-vip-getstar.php?betaling=1"><img src="images/exl-logo.jpg" width="120" height="66" border="1" style="border: 1px solid black"></a>
		</td>
		<td>
		<b>Micropayments (IVR / 0909)</b><br>
		Met deze methode kun je doneren via telefoon.<br><br>
		<b>Prijs: €1,30 voor 1 VIP ster</b>
		</td>
	</tr>
	</table>
<?php

	}

?>

		</td>
	</tr>
	<tr>
		<td class="subTitle">&nbsp;</td>
	</tr>
</table>
</body>
</html>