registratie script

Gestart doorJordymen11 reacties130 weergaven

12 berichten · pagina 1 van 1

Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spoiler tonen
error_reporting(E_ALL);
session_start();

include("includes/_mysql_connection.php");

include("includes/_functions.php");
$limiet = 25000;

$limiet_online = 1500;

$ledennu = mysql_query("SELECT `id` FROM `users`");

$ledennu = mysql_num_rows($ledennu);

$ledenonline = mysql_query("SELECT `id` FROM `users` WHERE `lastclick`>".(time() - 999)) or die(mysql_error());

$ledenonline = mysql_num_rows($ledenonline);

$landen = array();

$landenQ = mysql_query("SELECT * FROM `landen`");

while($res = mysql_fetch_assoc($landenQ)){

$landen[$res[id]] = $res[land];

}

$regged = false;

$username = "";

$email = "";

if(isset($_POST[submit])){

$username = trim($_POST[username]);

$email = trim($_POST[mailadres]);

$pass = $_POST[password];

$pass_check = $_POST[password_check];

$code = $_POST[code];

$land = $_POST[land];

if(!is_name($username)){

$error = "Je hebt een ongeldige gebruikersnaam ingevoerd!";

}

if(!is_email($email)){

$error = "Je hebt een ongelige e-mail ingevoerd!";

}

if(strlen($pass) < 5){

$error = "Je wachtwoord moet minimaal 5 tekens zijn!";

}

if($pass != $pass_check){

$error = "De opgegeven wachtwoorden zijn ongelijk!";

}

$host = gethostbyaddr($_SERVER[REMOTE_ADDR]);

if(!ereg("nl$", $host) && !ereg("be$", $host) && !ereg("arpa$", $host) && $_SERVER[REMOTE_ADDR] != "127.0.0.1"){

$error = "IPs buiten Nederland en België zijn geblockt!";

}

if($_SESSION[code_captcha] != $code){

$error = "De code was niet gelijk aan het plaatje!";

}

if(!array_key_exists($land, $landen)){

$error = "Het land dat je hebt opgegeven bestaat niet!";

}

$nameSet = mysql_query("SELECT `id` FROM `users` WHERE `username`=".mr($username)." LIMIT 1") or die(mysql_error());

$emailSet = mysql_query("SELECT `id` FROM `users` WHERE `email`=".$email." LIMIT 1") or die(mysql_error());

if(mysql_num_rows($nameSet) == 1){

$error = "Er is al iemand met deze gebruikersnaam!";

}

if(mysql_num_rows($emailSet) == 1){

$error = "Er is al iemand met dit e-mailadres!";

}

if($ledennu >= $limiet){

$error = "Het ledenlimiet is bereikt! Probeer het later weer.";

}

$isRg = mysql_query("SELECT `id` FROM `users` WHERE `ip`=".$_SERVER[REMOTE_ADDR]." LIMIT 1") or die(mysql_error());

$isRegged = mysql_num_rows($isRg);

if(($isRegged >= 1 || ( isset($_COOKIE[regged]) && $_COOKIE[regged] == "yes" )) && $_SERVER[REMOTE_ADDR] != 86.80.199.252){

$error = "Er is al geregistreerd vanaf deze computer!";

}

if(!isset($error)){

if(isset($_POST[rec]) && ctype_digit($_POST[rec])){

mysql_query("UPDATE `status` SET `refs`=`refs`+1 WHERE `id`=".$_POST[rec]) or die(mysql_error());
mysql_query("UPDATE `count_missions_hour` SET `m_9`=`m_9`+1 WHERE `id`=".$_POST[rec]) or die(mysql_error());
mysql_query("UPDATE `speldata` SET `bankmoney`=`bankmoney`+1000000 WHERE `id`=".$_POST[rec]) or die(mysql_error());

}

$sql = mysql_query("INSERT INTO `users`(`username`, `password`, `email`,`ip`, `registerDate`) VALUES (".$username.", ".md5($pass).", ".$email.", ".$_SERVER[REMOTE_ADDR].", NOW())") or die(mysql_error());

$_SESSION[__id] = mysql_insert_id();

$tabellen = array(
"status" => "id",
"userstats" => "id",
"usertimes" => "id",
"profiel" => "id",
"uitrust" => "id",
"count_missions_all" => "id",
"count_missions_hour" => "id",
"count_missions" => "id"

);

foreach($tabellen AS $tabel => $id){

mysql_query("INSERT INTO `".$tabel."`(`".$id."`) VALUES (".$_SESSION[__id].")") or die(mysql_error());

}

mysql_query("INSERT INTO `speldata`(`id`, `land_id`) VALUES (".$_SESSION[__id].", ".$_POST[land].")") or die(mysql_error());

setcookie("regged", "yes", (time() + (60*60*24*365)) );

$regged = true;

}

}

$_SESSION[code_captcha] = rand(1000, 9999);

?>



Criminalmaffia

» stats

Leden:
/

Online:
/


Reset: Onbekend

Prijs: Ipad 2


 





[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL[COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/_mysql_connection.php"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/_functions.php"[/COLOR][COLOR= #007700]);[/COLOR]



[COLOR= #0000BB]$limiet[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]25000[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$limiet_online[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1500[/COLOR][COLOR= #007700];[/COLOR]



[COLOR= #0000BB]$ledennu[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users`"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$ledennu[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ledennu[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$ledenonline[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users` WHERE `lastclick`>"[/COLOR][COLOR= #007700].([/COLOR][URL="http://www.php.net/time"]time[/URL][COLOR= #007700]() -[/COLOR] [COLOR= #0000BB]999[/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]

[COLOR= #0000BB]$ledenonline[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ledenonline[/COLOR][COLOR= #007700]);[/COLOR]



[COLOR= #0000BB]$landen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]

[COLOR= #0000BB]$landenQ[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `landen`"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$landenQ[/COLOR][COLOR= #007700])){[/COLOR]

    [COLOR= #0000BB]$landen[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]] =[/COLOR] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]land[/COLOR][COLOR= #007700]];

}[/COLOR]



[COLOR= #0000BB]$regged[/COLOR] [COLOR= #007700]=[/COLOR] false[COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]])){[/COLOR]



    [COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]);[/COLOR]

    [COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mailadres[/COLOR][COLOR= #007700]]);[/COLOR]

    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]];[/COLOR]

    [COLOR= #0000BB]$pass_check[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password_check[/COLOR][COLOR= #007700]];[/COLOR]

    [COLOR= #0000BB]$code[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]];[/COLOR]

    [COLOR= #0000BB]$land[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]land[/COLOR][COLOR= #007700]];[/COLOR]



    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR]is_name[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700])){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je hebt een ongeldige gebruikersnaam ingevoerd!"[/COLOR][COLOR= #007700];

    }[/COLOR]



    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR]is_email[COLOR= #007700]([/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700])){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je hebt een ongelige e-mail ingevoerd!"[/COLOR][COLOR= #007700];

    }[/COLOR]



    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Je wachtwoord moet minimaal 5 tekens zijn!"[/COLOR][COLOR= #007700];

    }[/COLOR]







    







    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]$pass_check[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"De opgegeven wachtwoorden zijn ongelijk!"[/COLOR][COLOR= #007700];

    }[/COLOR]





    [COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/gethostbyaddr"]gethostbyaddr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]]);[/COLOR]

    

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"nl$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$host[/COLOR][COLOR= #007700]) && ![/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"be$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$host[/COLOR][COLOR= #007700]) && ![/COLOR][URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"arpa$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$host[/COLOR][COLOR= #007700]) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"127.0.0.1"[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"IPs buiten Nederland en Belgi&euml; zijn geblockt!"[/COLOR][COLOR= #007700];

    }[/COLOR]

    



    







    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code_captcha[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]$code[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"De code was niet gelijk aan het plaatje!"[/COLOR][COLOR= #007700];

    }[/COLOR]







    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/array_key_exists"]array_key_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$land[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$landen[/COLOR][COLOR= #007700])){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Het land dat je hebt opgegeven bestaat niet!"[/COLOR][COLOR= #007700];

    }[/COLOR]







    [COLOR= #0000BB]$nameSet[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users` WHERE `username`="[/COLOR][COLOR= #007700].[/COLOR]mr[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]" LIMIT 1"[/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]

    [COLOR= #0000BB]$emailSet[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users` WHERE `email`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" LIMIT 1"[/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]





    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameSet[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Er is al iemand met deze gebruikersnaam!"[/COLOR][COLOR= #007700];

    }[/COLOR]



    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$emailSet[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]



        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Er is al iemand met dit e-mailadres!"[/COLOR][COLOR= #007700];



    }[/COLOR]





    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ledennu[/COLOR] [COLOR= #007700]>=[/COLOR] [COLOR= #0000BB]$limiet[/COLOR][COLOR= #007700]){[/COLOR]

        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Het ledenlimiet is bereikt! Probeer het later weer."[/COLOR][COLOR= #007700];

    }[/COLOR]





    [COLOR= #0000BB]$isRg[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users` WHERE `ip`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" LIMIT 1"[/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]





    [COLOR= #0000BB]$isRegged[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$isRg[/COLOR][COLOR= #007700]);[/COLOR]



    



    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$isRegged[/COLOR] [COLOR= #007700]>=[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]|| ([/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]regged[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]regged[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"yes"[/COLOR] [COLOR= #007700])) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]86.80.199.252[/COLOR][COLOR= #007700]){[/COLOR]



        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Er is al geregistreerd vanaf deze computer!"[/COLOR][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]$error[/COLOR][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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/ctype_digit"]ctype_digit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/COLOR][COLOR= #007700]])){[/COLOR]

            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `status` SET `refs`=`refs`+1 WHERE `id`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/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]
                                                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `count_missions_hour` SET `m_9`=`m_9`+1 WHERE `id`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/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]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `speldata` SET `bankmoney`=`bankmoney`+1000000 WHERE `id`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/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]

        



         [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `users`(`username`, `password`, `email`,`ip`, `registerDate`) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW())"[/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]







         



         [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]__id[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/mysql_insert_id"]mysql_insert_id[/URL][COLOR= #007700]();[/COLOR]



         [COLOR= #0000BB]$tabellen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
         [COLOR= #DD0000]"status"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"userstats"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"usertimes"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"profiel"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"uitrust"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"count_missions_all"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"count_missions_hour"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR]
         [COLOR= #DD0000]"count_missions"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"id"[/COLOR]

         [COLOR= #007700]);[/COLOR]

         

         [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tabellen[/COLOR] [COLOR= #007700]AS[/COLOR] [COLOR= #0000BB]$tabel[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700]){[/COLOR]

             [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$tabel[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"`(`"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"`) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]__id[/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]

            

        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `speldata`(`id`, `land_id`) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]__id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", "[/COLOR][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]





         [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"regged"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"yes"[/COLOR][COLOR= #007700], ([/COLOR][URL="http://www.php.net/time"]time[/URL][COLOR= #007700]() + ([/COLOR][COLOR= #0000BB]60[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]60[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]24[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]365[/COLOR][COLOR= #007700])) );[/COLOR]



         [COLOR= #0000BB]$regged[/COLOR] [COLOR= #007700]=[/COLOR] true[COLOR= #007700];





    }





}[/COLOR]





[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code_captcha[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]9999[/COLOR][COLOR= #007700]);[/COLOR]



?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
 
 
<head> 
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
    <link rel="shortcut icon" href="images/favicon.ico"> 
    <link rel="icon" href="images/favicon.ico"> 
    <link href="/css/homepage.css" rel="stylesheet" type="text/css" />
    <title>Criminalmaffia</title> 
</head> 
<body>  
<div id="container"> 
    <div id="header" style="background-image: url(/homepage/images/header_bg_cc.jpg);">        
        <div id="display"> 
            <div id="navigation">
                <ul id="menu">
                    <li><a href="/" >home</a></li>
                    <li><a href="/register.php" class="active">registreren</a></li>
                    <li><a href="/screenshots.php" >screenshots</a></li>
                </ul>
            </div> 
            <div id="login"> 
                <form method="post" action="/login.php"> 
                User: <input type="text" class="login" name="username" maxlength="25" /> &nbsp; Pass: <input type="password" class="login" name="password" /> 
                <br /><br /> 
                <a href="passlost.php" class="darkred">Wachtwoord vergeten?</a> &nbsp; <input type="submit" name="submit_login" class="submit" value="login" />
                </form> 
            </div> 
        </div> 
    </div> 
    <div id="content"> 
        <div id="stats"> 
            <h2>&raquo; stats</h2> 
            <p> 
                Leden:<b> 
                <b><?=$ledennu?></b> / <?=$limiet?><br />
                Online:<b> 
                <b><?=$ledenonline?></b> / <?=$limiet_online?>            </b><br><br>
                            Reset: <b>Onbekend</b><br /> 
                Prijs: <b>Ipad 2</b>
            </p> 
        </div><form method="post" action="register.php"> 
<h1>Registreren</h1> 
<table width="432" cellspacing="3"> 
        [COLOR= #0000BB]<?php[/COLOR]



                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$regged[/COLOR][COLOR= #007700]){[/COLOR]



                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent aangemeld bij Criminalmaffia!<br />

                    Je kan direct beginnen met spelen!<br /><br />

                    Klik <a href=nieuws.php><b>hier</b></a> om naar het spel te gaan!"[/COLOR][COLOR= #007700];



                }[/COLOR] 





                    ?>




                [COLOR= #0000BB]<?php[/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]rec[/COLOR][COLOR= #007700]])){[/COLOR]

                    

                    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id` FROM `users` WHERE `username`="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rec[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]" LIMIT 1"[/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]

                    

                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]

                        [COLOR= #0000BB]$r[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input type=hidden name=rec value="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$r[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">"[/COLOR][COLOR= #007700];

                    }

                    

                }[/COLOR]

                

 

                ?>

<tr> Lukt registeren niet? Stuur een mail na info@Criminalmaffia.nl</tr>
<tr> 
      <td><table align="left" width="96%"> 
          <tr> 
    <td width="46%" align="left"><img src=images/icons/user.png alt= border=0 /> Gebruikersnaam:</td> 
    <td width="54%"><input type=text name=username maxlength=25 value=<?=$username?> /><a href="#" title="Letters, getallen of een streepje, minimaal 1 letter. 3-25 tekens." style="text-decoration: underline">?</a> </td> 
  </tr> 
  <tr> 
    <td align="left"><img src=images/icons/email.png alt= border=0 /> E-mail:</td> 
    <td><input type=text name=mailadres value=<?=$email?>/><a href="#" title="Vul een geldig e-mailadres in! Nodig voor onder andere wachtwoord vergeten." style="text-decoration: underline">?</a> </td> 
  </tr> 
  <tr> 
    <td align="left"><img src=images/icons/key.png alt= border=0 /> Wachtwoord:</td> 
    <td><input type=password name=password /></td> 
  </tr> 
  <tr> 
    <td align="left"><img src=images/icons/key.png alt= border=0 /> Herhaal: </td> 
    <td><input type=password name=password_check /></td> 
  </tr> 
  <tr> 
    <td align="left"><img src=images/icons/world.png alt= border=0 /> Staat:</td> 
    <td><select name=land>







                            [COLOR= #0000BB]<?php[/COLOR]







                            [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$landen[/COLOR] [COLOR= #007700]AS[/COLOR] [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$land[/COLOR][COLOR= #007700]){[/COLOR]







                                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<option value="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$land[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</option>"[/COLOR][COLOR= #007700];







                            }[/COLOR]







                            ?>







                            </select>
  </tr> 
  <tr> 
    <td align="left"><img src=images/icons/database_gear.png alt= border=0 /> Code:</td> 
    <td><img src=IMG/captcha.php alt= border="0" /> 
      <input type=text name=code style=width: 70px; maxlength=4/></td> 
  </tr> 
  <tr> 
    <td align="right" valign="top">&nbsp;</td> 
    <td><input type=submit name=submit value=Registreren! /></td> 
  </tr> 
        </table> 
        <br /></td> 
      </tr> 
</table> 
<br /> 
        </form> 
    </div> 
    <div id="content-bottom"> 
    </div> 
</div> 
<center> 
  &nbsp;
</center> 
</body> 
   
</html>


werkt niet. kan wel registreren komt ook bij de leden.
maar als degene dan wilt aanmelden lukt het niet.
staat er wachtwoord verkeerd.
moet je nieuw wachtwoord opvragen.
die invoeren.
dan pas kan je inloggen?

kan iemand mij hier mee helpen?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Wat is het verschil tussen aanmelden en registreren emo
En wat een goede titel, kan je de code gelijk ook in een spoiler gooien? Scheelt weer 20 min scrollen.
0
Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
het inloggen werkt dus niet mensen kunnen wel registreren maar hij pakt hem niet.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Registreren werkt?
Inloggen werkt niet?
0
Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
allebei heel raar
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Jordymen schreef:
allebei heel raar
En wat is raar?

Leg nu eens uit wat het probleem isemo
0
Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
niet kunnen registreren?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Jordymen schreef:
niet kunnen registreren?
En de foutmelding is? Of insert hij die niet?emoemo
Ik snap niets van wat je typt emo
0
Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hij insert die niet
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Sevvlor schreef:
Wat is het verschil tussen aanmelden en registreren emo
En wat een goede titel, kan je de code gelijk ook in een spoiler gooien? Scheelt weer 20 min scrollen.
Of beter relevante code geven. Want 300 regels code gaat echt niemand maar ook echt bijna niemand doorspitten.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Sevvlor schreef:
Wat is het verschil tussen aanmelden en registreren emo
En wat een goede titel, kan je de code gelijk ook in een spoiler gooien? Scheelt weer 20 min scrollen.

Of beter relevante code geven. Want 300 regels code gaat echt niemand maar ook echt bijna niemand doorspitten.
Er zitten dingen in waar ik mijn vraagtekens bij zet bijv. regel 398 tot 403 wrm sluiten en openen... en overal DIE();
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En waarom ontiegelijk veel spaties? emo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren