Wie kan mij helpen met een refferal script?
aanmelden.php
En als het zal kunnen ook zn linkje met bijvoorbeeld:
http://www.fskproductie.nl/aanmelden.php&refferal=naam
aanmelden.php
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"global.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]ingelogd[COLOR= #007700]() ==[/COLOR] FALSE[COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]])[/COLOR] AND [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"controleren"[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Gebruikersnaam is al in gebruik<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen geldige gebruikersnaam ingevuld<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen wachtwoord ingevuld<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord2[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen controle wachtwoord ingevuld<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord2[/COLOR][COLOR= #007700]]){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- De twee wachtwoorden zijn niet gelijk aan elkaar"[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE email="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Emailadres is al in gebruik<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/eregi"]eregi[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"^([a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen geldig emailadres ingevuld<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"- Geen emailadres ingevuld<br>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]){[/COLOR]
begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutmelding"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Bij het aanmaken van een account is/zijn de volgende fout(en) opgetreden:<br>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
eindetabel[COLOR= #007700]();
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{
@[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden (gebruikersnaam, wachtwoord, email, aangemeldop, ip, roepnaam, hobbys, geslacht, woonplaats, land) VALUES ("[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-y"[/COLOR][COLOR= #007700])).[/COLOR][COLOR= #DD0000]" - "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H:i"[/COLOR][COLOR= #007700])).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]roepnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hobbys[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]geslacht[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]woonplaats[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]land[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Succesvol aangemeld"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gefelictieerd! U heeft succesvol een account aangemaakt op FSKproductie.nl Hieronder staan uw logingegevens vermeldt, bewaar deze goed!:<br><br><br>
<b>Gebruikersnaam:</b> "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"<br>
<b>Wachtwoord:</b> "[/COLOR][COLOR= #007700].[/COLOR]lekubb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"<br><br><br>
Alvast veel plezier met uw account,<br>
De crew"[/COLOR][COLOR= #007700];[/COLOR]
eindetabel[COLOR= #007700]();
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
begintabel[COLOR= #007700]([/COLOR][COLOR= #DD0000]"Aanmelden"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form action="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"?actie=controleren method=POST>
Op deze pagina kunt u een account aanmaken voor FSKproductie. U krijgt dan o.a. een eigen profiel en u zult beschikken over een controlpanel, waar u vele instellingen kunt veranderen. De velden met een sterretje(*) zijn verplicht om in te vullen...<br> Je kan gebruik maken van de wachtwoord generator: <br><?php
$version = "[/COLOR][COLOR= #0000BB]20041107[/COLOR][COLOR= #007700]-[/COLOR]a[COLOR= #DD0000]";
if (!isset($wwlen)) {
// first-time through
$wwlen = 8;
$checked1 = "[/COLOR]checked[COLOR= #DD0000]";
$checked2 = "";
$checked3 = "";
$melding = "";
} else {
$checked1 = "";
$checked2 = "";
$checked3 = "";
if ($sterkte == "[/COLOR]s1[COLOR= #DD0000]") {
$pattern = "[/COLOR][COLOR= #007700][[/COLOR]a[COLOR= #007700]-[/COLOR]zA[COLOR= #007700]-[/COLOR]Z0[COLOR= #007700]-[/COLOR][COLOR= #0000BB]9[/COLOR][COLOR= #007700]][/COLOR][COLOR= #DD0000]";
$checked1 = "[/COLOR]checked[COLOR= #DD0000]";
} elseif($sterkte == "[/COLOR]s2[COLOR= #DD0000]") {
$pattern = "[/COLOR][COLOR= #007700][[/COLOR]a[COLOR= #007700]-[/COLOR]zA[COLOR= #007700]-[/COLOR]Z[COLOR= #007700]][/COLOR][COLOR= #DD0000]";
$checked2 = "[/COLOR]checked[COLOR= #DD0000]";
} else {
$pattern = "[/COLOR][COLOR= #007700][[/COLOR]abcdefghijklmnopqrstuvwxyz[COLOR= #007700]][/COLOR][COLOR= #DD0000]";
$checked3 = "[/COLOR]checked[COLOR= #DD0000]";
}
// validate
if ($wwlen < 1 or $wwlen > 16) {
$melding = "[/COLOR]Wachtwoordlengte ligt buiten de toegestane waarde [COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]16[/COLOR][COLOR= #007700])[/COLOR][COLOR= #DD0000]";
} else {
// generate
$genpass = NULL;
for ($i=0; $i<$wwlen; $i++) {
$char = chr(rand(48,122));
while (!ereg($pattern, $char)) {
$char = chr(rand(48,122));
}
$genpass .= $char;
}
$melding = "[/COLOR]WachtWoord[COLOR= #007700]: <[/COLOR]input type[COLOR= #007700]=[/COLOR][COLOR= #DD0000]text[/COLOR] size[COLOR= #007700]=[/COLOR][COLOR= #DD0000]25[/COLOR] value[COLOR= #007700]=[/COLOR][COLOR= #DD0000]$genpass[/COLOR][COLOR= #007700]>[/COLOR][COLOR= #DD0000]";
}
}
// # debug
// echo "[/COLOR][COLOR= #007700]<[/COLOR]br[COLOR= #007700]>[/COLOR]wwlen [COLOR= #007700]:[/COLOR] [COLOR= #0000BB]$wwlen[/COLOR][COLOR= #007700]<[/COLOR]br[COLOR= #007700]>[/COLOR]
[COLOR= #FF8000]// sterkte: $sterkte<br>
// pattern: $pattern<br>
// checked1 $checked1<br>
// checked2 $checked2<br>
// checked3 $checked3<br>";[/COLOR]
?>
<html>
<head>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<!versie=$version>"[/COLOR] ?>
<script language=JavaScript>
<!--
function initialFocus(){document.myForm.wwlen.focus();}
// -->
</script>
<link rel=stylesheet type=text/css href=jtzondag.css>
</head>
<body bgcolor=#000000 text=ffffff onload=initialFocus()>
<div align=center>
<table border=0 width=760 cellspacing=0 cellpadding=0><tr><td>
<h1>WachtWoord Generator</h1>
<p>Vul de gewenste lengte in, kies een sterkte en klik op Genereer.</p>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form name=myForm method=POST action=$PHP_SELF>
<table border=0>
<tr>
<td >WachtWoord lengte</td>
<td ><input type=text name=wwlen size=2 value=$wwlen maxlength=2></td>
</tr>
<tr>
<td ></td>
<td ></td>
</tr>
<tr>
<td >Sterk (a - z, A - Z en 0 - 9)</td>
<td ><input type=radio name=sterkte value=s1 $checked1></td>
</tr>
<tr>
<td >Middel (a - z en A - Z)</td>
<td ><input type=radio name=sterkte value=s2 $checked2></td>
</tr>
<tr>
<td >Zwak (a - z)</td>
<td ><input type=radio name=sterkte value=s3 $checked3></td>
</tr>
<tr>
<td ></td>
<td ></td>
</tr>
<tr>
<td ><input type=submit value=Genereer name=Button1></td>
</tr>
</table>
</form>
"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$melding[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br><br><br><font size=-3>Versie $version</font>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<p align=center class=Footer><u>(c) 2002-2004 John Zondag. Laatst gewijzigd:"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d M Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/filemtime"]filemtime[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"wwgen.php"[/COLOR][COLOR= #007700])).[/COLOR][COLOR= #DD0000]"</u></p>"[/COLOR][COLOR= #007700];[/COLOR]
?>
</td></tr></table></div>
</body>
</html> <br>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=50% height=24>Gebruikersnaam*</td>
<td width=50% height=24><input type=text name=gebruikersnaam></td>
</tr>
Kunt u geen wachtwoord bedenken? Gebruik dan dit: <br>
<tr>
<td width=50% height=24>Wachtwoord*</td>
<td width=50% height=24><input type=password name=wachtwoord></td>
</tr>
<tr>
<td width=50% height=24>Wachtwoord nogmaals*</td>
<td width=50% height=24><input type=password name=wachtwoord2></td>
</tr>
<tr>
<td width=50% height=24>Emailadres*</td>
<td width=50% height=24><input type=text name=email></td>
</tr>
<tr>
<td width=50% height=24>Roepnaam</td>
<td width=50% height=24><input type=text name=roepnaam></td>
</tr>
<tr>
<td width=50% height=24>Hobbys</td>
<td width=50% height=24><input type=text name=hobbys></td>
</tr>
<tr>
<td width=50% height=24>Geslacht</td>
<td width=50% height=24><select size=1 name=geslacht>
<option value=Man>Man</option>
<option value=Vrouw>Vrouw</option>
</select></td>
</tr>
<tr>
<td width=50% height=24>Woonplaats</td>
<td width=50% height=24><input type=text name=woonplaats></td>
</tr>
<tr>
<td width=50% height=24>Land</td>
<td width=50% height=24><select size=1 name=land>
<option value=Nederland>Nederland</option>
<option value=Belgi>Belgi</option>
<option value=Overig>Overig</option>
</select></td>
</tr>
<tr>
<td width=50% height=24> </td>
<td width=50% height=24> </td>
</tr>
<tr>
<td width=50% height=24>Bevestigen</td>
<td width=50% height=24><input type=submit value=Aanmelden></td>
</tr>
</table>";
eindetabel();
}
} else {
begintabel("Foutmelding");
echo "U bent al ingelogd op een andere account!";
eindetabel();
}
include("footer.php");
?> En als het zal kunnen ook zn linkje met bijvoorbeeld:
http://www.fskproductie.nl/aanmelden.php&refferal=naam
