wargame
hep je info of wil je er iets in veranderen voeg mijn msn toe [email protected] dan kan je me mischien helpen 1 ding de cript van signup hep ik overgenomen en omgebouwd kunnen jullie even kijken hij moet voor http://members.lycos.nl/floor118/ werken dat is mijn wargame
signup :
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
37
38
39
40
41
42
43
44
45
46
47
48
49
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
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php /* ------------------------- */
include("_include-config.php");
$login = $_POST['login'];
$pass = $_POST['pass'];
$passconfirm = $_POST['passconfirm'];
$email = $_POST['email'];
$type = $_POST['type'];
$IP = $_SERVER['REMOTE_ADDR'];
${"select$type"} = "selected";
if(isset($_POST['submit'])) {
$message = Array(
"Je login mag alleen A-Z, a-z, 0-9, _ en - hebben",
"De wachtwoorden die je gaf zijn niet identiek",
"Vul een geldig e-mail adres in",
"Selecteer een type crimineel",
"Er bestaat al iemand met die login",
"Er is al iemand met die e-mail");
$msgnum = -1;
if(preg_match('/^[a-zA-Z0-9_\-]+$/',$login) == 0)
$msgnum = 0;
if($pass == "" || $pass != $passconfirm)
$msgnum = 1;
if(preg_match('/^.+@.+\..+$/',$email) == 0)
$msgnum = 2;
if($type != 1 && $type != 2 && $type != 3)
$msgnum = 3;
else {
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `login`='$login'");
if(mysql_num_rows($dbres) > 0)
$msgnum = 4;
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `email`='$email'");
if(mysql_num_rows($dbres) > 0)
$msgnum = 5;
if($msgnum == -1) {
$code = rand(100000,999999);
mysql_query("INSERT INTO `[users]`(signup,login,pass,IP,email,type) values(NOW(),'$login',MD5('$pass'),'$IP','$email',$type)");
mysql_query("INSERT INTO `[temp]`(login,IP,code,area,time) values('$login','$IP',$code,'signup',NOW())");
$id = mysql_insert_id();
mail($email,"Criminals activatie-code","Klik op de volgende link om je account te activeren:\nhttp://members.lycos.nl/floor118//signup.php?id=$id&code=$code","From: Criminals <[email protected]>\n");
}
}
}
/* ------------------------- */ ?>
include("_include-config.php");
$login = $_POST['login'];
$pass = $_POST['pass'];
$passconfirm = $_POST['passconfirm'];
$email = $_POST['email'];
$type = $_POST['type'];
$IP = $_SERVER['REMOTE_ADDR'];
${"select$type"} = "selected";
if(isset($_POST['submit'])) {
$message = Array(
"Je login mag alleen A-Z, a-z, 0-9, _ en - hebben",
"De wachtwoorden die je gaf zijn niet identiek",
"Vul een geldig e-mail adres in",
"Selecteer een type crimineel",
"Er bestaat al iemand met die login",
"Er is al iemand met die e-mail");
$msgnum = -1;
if(preg_match('/^[a-zA-Z0-9_\-]+$/',$login) == 0)
$msgnum = 0;
if($pass == "" || $pass != $passconfirm)
$msgnum = 1;
if(preg_match('/^.+@.+\..+$/',$email) == 0)
$msgnum = 2;
if($type != 1 && $type != 2 && $type != 3)
$msgnum = 3;
else {
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `login`='$login'");
if(mysql_num_rows($dbres) > 0)
$msgnum = 4;
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `email`='$email'");
if(mysql_num_rows($dbres) > 0)
$msgnum = 5;
if($msgnum == -1) {
$code = rand(100000,999999);
mysql_query("INSERT INTO `[users]`(signup,login,pass,IP,email,type) values(NOW(),'$login',MD5('$pass'),'$IP','$email',$type)");
mysql_query("INSERT INTO `[temp]`(login,IP,code,area,time) values('$login','$IP',$code,'signup',NOW())");
$id = mysql_insert_id();
mail($email,"Criminals activatie-code","Klik op de volgende link om je account te activeren:\nhttp://members.lycos.nl/floor118//signup.php?id=$id&code=$code","From: Criminals <[email protected]>\n");
}
}
}
/* ------------------------- */ ?>
<html>
<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="">
</head>
<body style="background: #AA3C3C; margin: 0px;">
<table align="center" width=100%>
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
37
38
39
40
41
42
43
44
45
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
37
38
39
40
41
42
43
44
45
<?php /* ------------------------- */
if(isset($_GET['id'],$_GET['code'])) {
print " <tr><td class=\"subTitle\"><b>Activatie</b></td></tr>\n";
$id = $_GET['id'];
$code = $_GET['code'];
$dbres = mysql_query("SELECT `login` FROM `[temp]` WHERE `area`='signup' AND `id`='$id' AND `code`='$code'");
if($data = mysql_fetch_object($dbres)) {
mysql_query("UPDATE `[users]` SET `activated`=1,`signup`=NOW() WHERE `login`='{$data->login}'");
mysql_query("DELETE FROM `[temp]` WHERE `id`='$id'");
print " <tr><td class=\"mainTxt\">Activatie voltooid, je kunt nu inloggen</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">Incorrecte activatie-code...</td></tr>\n";
}
else {
if($msgnum != -1) {
print " <tr><td class=\"subTitle\"><b>Aanmelden</b></td></tr>\n";
if(isset($msgnum) && $msgnum != -1)
print " <tr><td class=\"mainTxt\">\n {$message[$msgnum]}\n </td></tr>\n";
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>Login:</td> <td><input type="text" name="login" maxlength=16 style="width: 150;" value="$login"></td></tr>
<tr><td width=100>Wachtwoord:</td> <td><input type="password" name="pass" maxlength=16 style="width: 150;"></td></tr>
<tr><td width=100>Herhaal:</td> <td><input type="password" name="passconfirm" maxlength=16 style="width: 150;"></td></tr>
<tr><td width=100>E-Mail:</td> <td><input type="text" name="email" maxlength=64 style="width: 150;" value="$email"></td></tr>
<tr><td width=100>Type:</td> <td><select name="type" style="width: 150;">
<option value="1" $select1>Drugsdealer</option>
<option value="2" $select2>Wetenschapper</option>
<option value="3" $select3>Politie</option>
</select> <a href="javascript: //" onClick="window.open('help.php#types')">[?]</a></td></tr>
<tr><td></td><td align="right"><input type="submit" name="submit" style="width: 100;" value="Aanmelden"></td></tr>
</table></form>
</td></tr>
ENDHTML;
}
else
print " <tr><td class=\"mainTxt\">Je bent geregistreerd, er is een e-mail gestuurd naar $email met een activatie-code...</td></tr>\n";
}
/* ------------------------- */ ?>
if(isset($_GET['id'],$_GET['code'])) {
print " <tr><td class=\"subTitle\"><b>Activatie</b></td></tr>\n";
$id = $_GET['id'];
$code = $_GET['code'];
$dbres = mysql_query("SELECT `login` FROM `[temp]` WHERE `area`='signup' AND `id`='$id' AND `code`='$code'");
if($data = mysql_fetch_object($dbres)) {
mysql_query("UPDATE `[users]` SET `activated`=1,`signup`=NOW() WHERE `login`='{$data->login}'");
mysql_query("DELETE FROM `[temp]` WHERE `id`='$id'");
print " <tr><td class=\"mainTxt\">Activatie voltooid, je kunt nu inloggen</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">Incorrecte activatie-code...</td></tr>\n";
}
else {
if($msgnum != -1) {
print " <tr><td class=\"subTitle\"><b>Aanmelden</b></td></tr>\n";
if(isset($msgnum) && $msgnum != -1)
print " <tr><td class=\"mainTxt\">\n {$message[$msgnum]}\n </td></tr>\n";
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>Login:</td> <td><input type="text" name="login" maxlength=16 style="width: 150;" value="$login"></td></tr>
<tr><td width=100>Wachtwoord:</td> <td><input type="password" name="pass" maxlength=16 style="width: 150;"></td></tr>
<tr><td width=100>Herhaal:</td> <td><input type="password" name="passconfirm" maxlength=16 style="width: 150;"></td></tr>
<tr><td width=100>E-Mail:</td> <td><input type="text" name="email" maxlength=64 style="width: 150;" value="$email"></td></tr>
<tr><td width=100>Type:</td> <td><select name="type" style="width: 150;">
<option value="1" $select1>Drugsdealer</option>
<option value="2" $select2>Wetenschapper</option>
<option value="3" $select3>Politie</option>
</select> <a href="javascript: //" onClick="window.open('help.php#types')">[?]</a></td></tr>
<tr><td></td><td align="right"><input type="submit" name="submit" style="width: 100;" value="Aanmelden"></td></tr>
</table></form>
</td></tr>
ENDHTML;
}
else
print " <tr><td class=\"mainTxt\">Je bent geregistreerd, er is een e-mail gestuurd naar $email met een activatie-code...</td></tr>\n";
}
/* ------------------------- */ ?>
</table>
</body>
</html>
en dubbelpost...
Gewijzigd op 26/06/2005 13:58:00 door Han eev