-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
executable file
·66 lines (56 loc) · 1.96 KB
/
install.php
File metadata and controls
executable file
·66 lines (56 loc) · 1.96 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
<?php
require 'includes/constant/config.inc.php';
return_meta();
?>
</head>
<body>
<div class="well">
<?php include 'includes/constant/nav.inc.php'; ?>
<?php
$go = mysql_query("CREATE TABLE IF NOT EXISTS ".USERS." (
id bigint(20) NOT NULL AUTO_INCREMENT,
md5_id varchar(200) NOT NULL DEFAULT '',
full_name longblob,
user_name varchar(200) NOT NULL DEFAULT '',
usr_email longblob,
user_level tinyint(4) NOT NULL DEFAULT '1',
usr_pwd varchar(220) NOT NULL DEFAULT '',
date date NOT NULL DEFAULT '0000-00-00',
users_ip varchar(200) NOT NULL DEFAULT '',
approved int(1) NOT NULL DEFAULT '0',
activation_code int(10) NOT NULL DEFAULT '0',
ckey varchar(220) NOT NULL DEFAULT '',
ctime varchar(220) NOT NULL DEFAULT '',
num_logins int(11) NOT NULL DEFAULT '0',
last_login timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
last_logout timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
photo longblob,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or die('Invalid query: ' . mysql_error());
$details = mysql_query("CREATE TABLE IF NOT EXISTS ".USER_DETAILS." (
details_id int(11) unsigned NOT NULL AUTO_INCREMENT,
detail_user_id int(11) DEFAULT NULL,
detail_notes text,
PRIMARY KEY (details_id)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;") or die('Invalid query: ' . mysql_error());
$game = mysql_query("CREATE TABLE IF NOT EXISTS ".GAME_DETAILS." (
user_name varchar(200) NOT NULL DEFAULT '',
games_played int(11) NOT NULL DEFAULT '0',
games_won int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;") or die('Invalid query: ' . mysql_error());
$detail_insert = mysql_query("INSERT IGNORE INTO ".USER_DETAILS." (details_id, detail_user_id, detail_notes)
VALUES
(10,1,'You are an ordinary user '),
(12,4,'You are an administrator');") or die('Invalid query: ' . mysql_error());
if($go && $details && $game && $detail_insert)
{
echo "<h4>Installed table successfully</h4>";
}
else
{
echo "<h4>Unable to install tables</h4>";
}
?>
</div>
</body>
</html>