forked from jakubmalusevic/network_owner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
88 lines (76 loc) · 2.5 KB
/
signup.php
File metadata and controls
88 lines (76 loc) · 2.5 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?
include 'common/config.php';
if($_REQUEST[tryout]==1)
{
if ($_SERVER[REMOTE_ADDR] == '46.146.232.230') {
$ip_addr = '78.80.3.70';
} else {
$ip_addr = $_SERVER[REMOTE_ADDR];
//$ip_addr = '78.80.3.70';
}
//var_dump($_REQUEST);exit;
//$country = get_country($ip_addr); //david
$ip_addr = '61.176.96.70';
$country = "CN"; //david
//var_dump($_REQUEST);exit;
$sql = "SELECT count(id) FROM `users` WHERE LOWER(`user_email`)='" . strtolower($_REQUEST['email']) . "'";
$users_count = mysql_result(mysql_query($sql), 0);
//var_dump($users_count);exit;
if ($users_count != 0) {
echo 'Email is already existed, please use other email';
exit;
}
$user_status = $_REQUEST[user_type];
$subid = 0;
$sql = "SELECT MAX(u.subid)+1 as subid FROM users u WHERE u.user_status={$user_status}";
$q = mysql_query($sql);
$ret = mysql_fetch_assoc($q);
if($ret[subid] == NULL)
{
$subid = 1000;
}
else
{
$subid = $ret[subid];
}
$sql = "INSERT INTO `users` (
subid,
user_first_name,
user_last_name,
user_email,
user_name,
user_phone,
user_company_name,
website,
user_aim,
user_skype,
user_pass,
network_id,
user_status,
user_system_status,
user_revenue,
user_manager
) values (
{$subid},
'{$_REQUEST[first_name]}',
'{$_REQUEST[last_name]}',
'{$_REQUEST[email]}',
'',
'{$_REQUEST[phone]}',
'{$_REQUEST[company]}',
'{$_REQUEST[company_website]}',
'{$_REQUEST[aim]}',
'{$_REQUEST[skype]}',
md5('{$_REQUEST[pass]}'),
'-1',
'{$user_status}',
'2',
'0',
'-1'
)";
//echo($sql);exit;
$q = mysql_query($sql);
echo("Thank you for signing up with us. Your application is being reviewed and will hear back from us within 48 hours.");
//break;
}
?>