HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers44/ledubtoernooi.nl/wwwroot/inschrijven/succes.php
<?php
/**
 * Created by PhpStorm.
 * User: joepvanhunsel
 * Date: 13-02-14
 * Time: 16:53
 */
include("all_kms_con.php");
require_once "sisow.cls5.php";

$merchentid = "2537723439";
$merchantkey = "58a69f47656a8ab496e199b51917b9b5941f920f";

$Sisow = new sisow("2537723439", "58a69f47656a8ab496e199b51917b9b5941f920f");

$trxid = $_GET['trxid'];

 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="Author" content="Komma, (c) Komma Mediadesign, 2013. All Rights Reserved." />
    <meta name="Subject" content="Ledub Volleybal Festival Budel Cranendonck" />
    <meta name="Description" content="Inschrijving Ledub Volleybal Festival" />
    <meta name="Language" content="Nederlands" />
    <meta name="Expires" content="14" />
    <meta name="Robots" content="All" />
    <title>Inschrijving Ledûb Volleybal Festival</title>
    <link href="css-js/screen.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="centerAlign">
    <div id="mainframe">
        <div class="logo"><img src="img/logo.jpg" width="250" height="111" /></div>
<?php

$Sisow->StatusRequest($trxid);
if ($Sisow->status == sisow::statusSuccess)
{
    $q_cases = sprintf("UPDATE kms_inschrijvingen SET betaald = 'yes' WHERE kms_inschrijvingen.sisow_id='%s'", $trxid);
    $r_cases = mysql_query($q_cases);
    if ($r_cases){
        echo "Uw betaling is succesvol verwerkt en u bent ingeschreven voor het <br />Ledûb Volleybal Festival 2021!<br /><br />
		Na 1 juli 2021 zal aan de ingeschreven teams nadere festival-informatie worden toegestuurd. Daarnaast wordt ook dit jaar gespeeld volgens een vast tijdschema.<br><br>
		Met vriendelijk groet,<br />Led&ucirc;b Volleybal Festival";
        //echo $q_cases . "<br /><br />";
        //echo $trxid;
		
		require_once 'css-js/phpmailer/class.phpmailer.php';
		
		$from = "info@ledubtoernooi.nl";
		$from_naam = "Ledûb Volleybal";
		$onderwerp = "Betaling succesvol";
		
		$q_inschrijving = sprintf("SELECT kms_inschrijvingen.teamnaam, kms_inschrijvingen.tussenvoegsel, kms_inschrijvingen.achternaam, kms_inschrijvingen.geslacht, 
		kms_inschrijvingen.emailadres FROM kms_inschrijvingen WHERE kms_inschrijvingen.sisow_id='%s'", $trxid);
		$r_inschrijving = mysql_query($q_inschrijving);
		$rec_inschrijving = mysql_fetch_array($r_inschrijving);
		
		$geslacht = $rec_inschrijving['geslacht'];
		$teamnaam = html_entity_decode($rec_inschrijving['teamnaam']);
		$tussenvoegsel = html_entity_decode($rec_inschrijving['tussenvoegsel']);
		$achternaam = html_entity_decode($rec_inschrijving['achternaam']);
		$emailadres = html_entity_decode($rec_inschrijving['emailadres']);
				
		if($geslacht == "man"){
			$aanhef = "heer";
		}else{
			$aanhef = "mevrouw";	
		}
		if(!empty($tussenvoegsel)){
			$achternaam_volledig = ucfirst($tussenvoegsel)." ".$achternaam;
		}else{
			$achternaam_volledig = $achternaam;
		}
		
		
		$bericht = "
<body style=\"margin: 10px; background-color:#fff;\" >

<style>
a{
	color:#00A6D6;
	text-decoration:underline;
}
</style>
<div style=\"color:#231f20; font-family:Verdana,Geneva,sans-serif; font-size:11px; line-height:18px; padding-bottom:23px; width: 800px;\">

Beste $aanhef $achternaam_volledig,<br><br>

Uw betaling is succesvol verwerkt! Uw inschrijving voor het team: $teamnaam is hiermee volledig afgerond.<br>
Na 1 juli 2021 zal aan de nadere toernooi-informatie worden toegestuurd.<br><br><br>
Met vriendelijke groet,<br>
Led&ucirc;b Volleybal Festival<br><br>
www.ledubvolleybalfestival.nl
</div>
</body>";

		
		$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch

		try {
			$mail->AddAddress($emailadres, $naam);
			$mail->SetFrom($from, $from_naam);
			$mail->AddReplyTo($from, $from_naam);
			$mail->Subject = $onderwerp;
			$mail->MsgHTML($bericht);
			$mail->Send();
			$send_message = true;
		} catch (phpmailerException $e) {
			$send_message = false;
			echo $e->errorMessage(); //Pretty error messages from PHPMailer
		} catch (Exception $e) {
			$send_message = false;
			echo $e->getMessage(); //Boring error messages from anything else!
		}		
		
    }else{
        echo "Er is iets mis gegaan met het schrijven naar de database, de betaling is wel verwerkt maar uw aanmelding zal later definitief worden gemaakt.";
    }
}else{
    echo "<h1>Betaling mislukt</h1><br /><br /><br />
            Helaas is de betaling niet correct verwerkt. Er zal contact opgenomen worden met u om de inschrijving af te kunnen ronden.<br />
            U kunt uiteraard ook zelf contact opnemen met <a href=\"mailto:info@ledubvolleybalfestival.nl\">info@ledubvolleybalfestival.nl</a><br /><br />
            Met vriendelijk groet,<br />Led&ucirc;b Volleybal Festival";
}

?>
    </div>
</div>
</body>
</html>