Beste cp'ers,
Ik wil een bericht inzetten bij aanmelden,
hiermee bedoel ik,
Als je je hebt aangemeld, en daarna hebt ingelogd,
dat je een mailtje krijgt van de crimesite,
Bijv,
Welkom op .....
aantal regels enz.
Maar ik kom er niet uit kan iemand mij helpen?
want hij geeft steeds fouten aan,
hieis het script:
PHP
<?php
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
include("./inc/config.inc.php");
include(FUNCS_PATH."html.func.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Criminal Investigative</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="<?=STYLE_PATH;?>" />
</head>
<body>
<div id="container">
<div id="header">
<p id="links"><a href="index.php" class="underline">Nederlands</a> | Engels</p>
<p id="rechts_small">Criminal Investigative</p>
</div>
<div id="banner">
<div id="banner_content"></div>
</div>
<div id="container_linker_menu">
<?php
showLinksAlgemeen();
showPartners();
?>
<div class="linker_menu">
<ul>
<?php
$Query = mysql_query("SELECT url, naam
FROM linkpartners");
while($link = mysql_fetch_assoc($Query)) {
echo '<li>- <a href="'. $link['url'] .'" title="'. $link['naam'] .'">'. $link['naam'] .'</a></li>';
}
?>
</ul>
</div>
</div>
<div id="container_content">
<form method="post" action="" class="formaanmelden">
<div class="content_titel">» Aanmelden</div>
<?php
if($_SERVER['REQUEST_METHOD'] == "POST")
{
echo '<div class="submit_content">';
$checkIPQuery = mysql_query("
SELECT IP
FROM `[users]`
WHERE IP='". $_SERVER['REMOTE_ADDR'] ."'
");
$IPfound = mysql_num_rows($checkIPQuery);
$checkQuery = mysql_query("
SELECT login
FROM `[users]`
WHERE login='". addslashes($_POST['login']) ."'
");
$checkName = mysql_num_rows($checkQuery);
$checkIfMailExist = mysql_num_rows(mysql_query("SELECT email FROM `[users]` WHERE email='". addslashes($_POST['email']) ."'"));
$regexp = "/^[a-z0-9_]+([_\\.-][a-z0-9_]+)*@([a-z0-9_]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
if($IPfound == 1)
{
echo '- Je hebt al een account op Criminal Investigative';
}
elseif(empty($_POST['login']) || empty($_POST['pass']) || empty($_POST['pass2']) || empty($_POST['email']))
{
echo '- Je moet alle velden invullen';
}
elseif($checkName == 1)
{
echo '- Deze gebruikersnaam is al gekozen';
}
elseif(!preg_match('/^[a-zA-Z0-9_\-]+$/', $_POST['login']))
{
echo '- Je gebruikersnaam mag enkel A-Z, a-z, 0-9 en - bevatten';
}
elseif(strlen($_POST['login']) > 16)
{
echo '- Je gebruikersnaam mag maximum 16 letters bevatten';
}
elseif($_POST['pass'] != $_POST['pass2'])
{
echo '- Je wachtwoorden zijn verschillend';
}
elseif($_POST['login'] == $_POST['pass'])
{
echo '- Je wachtwoord mag niet gelijk zijn aan je gebruikersnaam';
}
elseif(!preg_match($regexp, $_POST['email']))
{
echo '- Je emailadres is niet geldig';
}
elseif($checkIfMailExist == 1)
{
echo '- Deze emailadres is al in gebruik';
}
else
{
$mailbericht = "Beste ".addslashes($_POST['login']) .",
Je account gegevens:
Gebruikersnaam: ". addslashes($_POST['login']) ."
Wachtwoord: ".$_POST['pass']."
Activatielink: http://www.CriminalInvestigative.nl/activatie.php?login=". addslashes($_POST['login']) ."&code=".md5($_POST['pass'])."
Met Vriendelijke Groeten,
Criminal Investigative Staff
http://CriminalInvestigative.nl";
mysql_query("
INSERT INTO `[users]`
(signup,
login,
pass,
IP,
email,
activated
)
VALUES
(NOW(),
'". addslashes($_POST['login']) ."',
'". md5($_POST['pass']) ."',
'". $_SERVER['REMOTE_ADDR'] ."',
'". addslashes($_POST['email']) ."',
'0')
");
mail($_POST['email'], "Criminal Investigative activatie", $mailbericht, "From: Criminal Investigative<[email protected]>");
echo 'Je bent succesvol aangemeld op Criminal Investigative, je moet nu alleen nog je account activeren.<br>
Let op! het kan tot 20 minuten duren en kijk ook in je (SPAM/ongewenste berichten).';
}
echo '</div>';
}
mysql_close();
?>
<div class="content">
<label for="naam" id="naam">Gebruikersnaam:</label>
<input type="text" name="login" class="veld" /><br />
<label for="ww" id="ww">Wachtwoord:</label>
<input type="password" name="pass" class="veld" /><br />
<label for="ww2" id="ww2">Wachtwoord (controle):</label>
<input type="password" name="pass2" class="veld" /><br />
<label for="mail" id="mail">Email:</label>
<input type="text" name="email" class="veld" size="24" /><br />
<input type="submit" name="submit" value="Aanmelden" class="submit" />
<br />
<br />
</div>
</form>
<?php
showAd();
?>
</div>
<div class="clear"></div>
<?php
showFooter();
?>
</div>
<div align="center" style="margin-top: 5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-1846048526836194";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
//2007-02-04: onder
google_ad_channel = "5489730911";
google_color_border = "2A2A2A";
google_color_bg = "2A2A2A";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "FFFFFF";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
</body>
</html>
Toon Meer