Bevestiging e-mail. Link stuurt naar lege pagina.
Dit is de tekst van confirm.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once ('include.php');
require_once ('include/functions.php');
require_once ('lang.php');
if($_REQUEST["ac"]=="subscribe"){
$Options = getOptions();
$sql = "SELECT * FROM ".$TABLES["subscribers"]." WHERE name = '".SaveToDB($_REQUEST["u"])."' AND email = '".SaveToDB($_REQUEST["e"])."'";
$sql_result = mysql_query ($sql, $connection ) or die ('Could not execute SQL query:<br />'.$sql.'<br /><strong>'.mysql_error().'</strong>');
if(mysql_num_rows($sql_result)>0){
$Subscriber = mysql_fetch_assoc($sql_result);
if($Subscriber["subscriber_id"]==$_REQUEST["s"]){
if(md5(mysql_escape_string(utf8_encode($_REQUEST["u"]))."-".mysql_escape_string(utf8_encode($_REQUEST["e"]))."-".$_REQUEST["s"]) == $_REQUEST["h"]){
$sql = "UPDATE ".$TABLES["subscribers"]." SET subscriber_status = '1' WHERE subscriber_id = '".SaveToDB($Subscriber["subscriber_id"])."'";
$sql_result = mysql_query ($sql, $connection ) or die ('Could not execute SQL query:<br />'.$sql.'<br /><strong>'.mysql_error().'</strong>');
if ($Options["auto_send"]=='1') {
$subject = ReadHTMLFromDB($Options["auto_subject"]);
$message_body = ReadHTMLFromDB(nl2br($Options["auto_message"]));
if (ReadFromDB($Options["send_using"])=='php'){
$isSent = sendPHPEmail(ReadFromDB($Options["admin_email"]), SaveToDB($Subscriber["email"]), $subject, $message_body);
} elseif(ReadFromDB($Options["send_using"])=='smtp') {
$isSent = sendSMTPEmail(ReadFromDB($Options["admin_email"]), SaveToDB($Subscriber["email"]), $subject, $message_body);
}
}
redirect(ReadFromDB($Options["optin_url"]));
exit;
}
}
}
}
?>
require_once ('include.php');
require_once ('include/functions.php');
require_once ('lang.php');
if($_REQUEST["ac"]=="subscribe"){
$Options = getOptions();
$sql = "SELECT * FROM ".$TABLES["subscribers"]." WHERE name = '".SaveToDB($_REQUEST["u"])."' AND email = '".SaveToDB($_REQUEST["e"])."'";
$sql_result = mysql_query ($sql, $connection ) or die ('Could not execute SQL query:<br />'.$sql.'<br /><strong>'.mysql_error().'</strong>');
if(mysql_num_rows($sql_result)>0){
$Subscriber = mysql_fetch_assoc($sql_result);
if($Subscriber["subscriber_id"]==$_REQUEST["s"]){
if(md5(mysql_escape_string(utf8_encode($_REQUEST["u"]))."-".mysql_escape_string(utf8_encode($_REQUEST["e"]))."-".$_REQUEST["s"]) == $_REQUEST["h"]){
$sql = "UPDATE ".$TABLES["subscribers"]." SET subscriber_status = '1' WHERE subscriber_id = '".SaveToDB($Subscriber["subscriber_id"])."'";
$sql_result = mysql_query ($sql, $connection ) or die ('Could not execute SQL query:<br />'.$sql.'<br /><strong>'.mysql_error().'</strong>');
if ($Options["auto_send"]=='1') {
$subject = ReadHTMLFromDB($Options["auto_subject"]);
$message_body = ReadHTMLFromDB(nl2br($Options["auto_message"]));
if (ReadFromDB($Options["send_using"])=='php'){
$isSent = sendPHPEmail(ReadFromDB($Options["admin_email"]), SaveToDB($Subscriber["email"]), $subject, $message_body);
} elseif(ReadFromDB($Options["send_using"])=='smtp') {
$isSent = sendSMTPEmail(ReadFromDB($Options["admin_email"]), SaveToDB($Subscriber["email"]), $subject, $message_body);
}
}
redirect(ReadFromDB($Options["optin_url"]));
exit;
}
}
}
}
?>
Ga ik proberen. Dank je voor je suggestie.