File: /home/wbwebdes/domains/domain.wb-webdesign.com/private_html/portal/contact-verification.php
<?php
// Initialize variables for feedback
$message = '';
$message_class = '';
// Process form submission
if (isset($_GET['submit'])) {
if (!empty($_GET['email']) && !empty($_GET['authCode']) && isset($_GET['approval'])) {
$email = urlencode($_GET['email']);
$authCode = $_GET['authCode'];
$approval = $_GET['approval'];
$url = 'https://cp.openprovider.eu/misc.php/email/emailVerificationCallback/'
. '?email=' . $email
. '&authCode=' . $authCode
. '&approve=' . $approval;
// Use cURL to get response
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if(curl_errno($ch)) {
$message = "Er is een fout opgetreden: " . curl_error($ch);
$message_class = 'error';
} else {
$message = $response;
$message_class = 'success';
}
curl_close($ch);
} else {
$message = 'Vul alstublieft alle velden in.';
$message_class = 'error';
}
}
?>
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Verifieer e-mailadres - WB Webdesign</title>
<style>
/* WB Webdesign Style */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f9faff;
color: #333;
margin: 0; padding: 0;
display: flex;
justify-content: center;
align-items: flex-start;
min-height: 100vh;
padding: 40px 20px;
}
.container {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
padding: 30px 40px;
max-width: 400px;
width: 100%;
}
h1 {
font-weight: 600;
color: #0073e6;
margin-bottom: 20px;
text-align: center;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 600;
font-size: 0.9rem;
}
input[type="text"] {
width: 100%;
padding: 10px 12px;
margin-bottom: 18px;
border: 1.5px solid #ccc;
border-radius: 5px;
font-size: 1rem;
transition: border-color 0.3s ease;
}
input[type="text"]:focus {
border-color: #0073e6;
outline: none;
}
.radio-group {
margin-bottom: 18px;
font-size: 1rem;
color: #555;
}
.radio-group input[type="radio"] {
margin-right: 8px;
vertical-align: middle;
}
.radio-label {
margin-right: 25px;
cursor: pointer;
user-select: none;
}
input[type="submit"] {
background-color: #0073e6;
color: white;
font-weight: 600;
padding: 12px;
border: none;
border-radius: 6px;
width: 100%;
font-size: 1.1rem;
cursor: pointer;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #005bb5;
}
.message {
margin-bottom: 20px;
padding: 15px 20px;
border-radius: 5px;
font-weight: 600;
font-size: 1rem;
}
.message.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.message.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
@media (max-width: 450px) {
.container {
padding: 25px 20px;
}
}
</style>
</head>
<body>
<div class="container" role="main">
<h1>Verifieer e-mailadres</h1>
<?php if ($message): ?>
<div class="message <?php echo htmlspecialchars($message_class); ?>">
<?php echo nl2br(htmlspecialchars($message)); ?>
</div>
<?php endif; ?>
<form method="get" action="">
<label for="email">E-mail adres</label>
<input
type="text"
id="email"
name="email"
value="<?php echo isset($_GET['email']) ? htmlspecialchars($_GET['email']) : ''; ?>"
placeholder="bijv. [email protected]"
required
/>
<label for="authCode">Verificatiecode</label>
<input
type="text"
id="authCode"
name="authCode"
value="<?php echo isset($_GET['authCode']) ? htmlspecialchars($_GET['authCode']) : ''; ?>"
placeholder="Voer uw code in"
required
/>
<div class="radio-group">
<label class="radio-label">
<input
type="radio"
name="approval"
value="yes"
<?php echo (isset($_GET['approval']) && $_GET['approval'] === 'yes') ? 'checked' : ''; ?>
/>
Goedkeuren
</label>
<label class="radio-label">
<input
type="radio"
name="approval"
value="no"
<?php echo (isset($_GET['approval']) && $_GET['approval'] === 'no') ? 'checked' : ''; ?>
/>
Afwijzen
</label>
</div>
<input type="submit" name="submit" value="Verzenden" />
</form>
</div>
</body>
</html>