-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.php
78 lines (53 loc) · 1.54 KB
/
setup.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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Project Jupiter</title>
</head>
<body>
<?php
/*
Julien Roger
http://www.julienroger.com
November 3, 2011
Last updated: November 16, 2011
*/
include("includes/db.php");
#######################
## Create table ##
#######################
$sql = "CREATE TABLE sphere_memberships (
user_id INT(11) REFERENCES users (user_id),
sphere_id INT(11) REFERENCES spheres (sphere_id),
timestamp INT(12) NOT NULL,
PRIMARY KEY (user_id, sphere_id)
)";
$sqlcm = "CREATE TABLE cookiemonster (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(64) NOT NULL,
token VARCHAR(64) NOT NULL,
timestamp INT(12) NOT NULL,
used BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(id)
)";
#######################
## Insert Fields ##
#######################
$sql1 = "ALTER TABLE users (
ADD COLUMN `joindate` DATETIME NOT NULL AFTER `salt`
)";
/* ADD COLUMN `firstname` VARCHAR(64) AFTER `joindate`,
ADD COLUMN `lastname` VARCHAR(64) AFTER `firstname`,
ADD COLUMN `displayname` VARCHAR(64) AFTER `lastname`,
ADD COLUMN `birthday` DATE AFTER `displayname` */
echo time() . "<br />";
mysql_query($sql);
printf('<br /> Executing query... ' . mysql_error());
mysql_close($connection);
//$email = "[email protected]";
//$email = base64_encode($email);
//mkdir("assets/". $email);
die("<br /><br />Done.");
?>
</body>
</html>