-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_update.php
64 lines (58 loc) · 1.8 KB
/
db_update.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
<?php
if (file_exists("includes/db_update.txt"))
{
echo "Your database has already been updated!";
exit;
}
if (file_exists("includes/config.inc.php"))
include_once("includes/config.inc.php");
if ($REQUEST_METHOD == "POST")
{
@mysql_pconnect($frm_mysql_addr, $frm_mysql_login, $frm_mysql_password) or die("db connect error");
mysql_select_db($frm_mysql_database);
mysql_query("ALTER TABLE `exo_users` ADD `current_mod` VARCHAR( 2 ) NOT NULL AFTER `unix_password` ;");
mysql_close();
$fd = fopen("includes/db_update.txt", "w+");
fclose($fd);
echo "Database Update Completed Successfully!";
exit;
}
?>
<html>
<head>
<title>exoGameCtl Database Update</title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Verdana" size="2">
<b>exoGameCtl v2.0.7 - Database Update</b>
<br><br>
There have been some minor changes to the database structure of exoGameCtl v2.0.7.
<br><br>
Please enter your database information below and hit the submit button.
<form method="post" action="db_update.php">
<table border=0>
<tr>
<td>Database Host:</td>
<td><input type="text" name="frm_mysql_addr" value="<?php echo $mysql_host ?>"></td>
</tr>
<tr>
<td>Database Login:</td>
<td><input type="text" name="frm_mysql_login" value="<?php echo $mysql_login ?>"></td>
</tr>
<tr>
<td>Database Password:</td>
<td><input type="text" name="frm_mysql_password" value="<?php echo $mysql_password ?>"></td>
</tr>
<tr>
<td>Database Name:</td>
<td><input type="text" name="frm_mysql_database" value="<?php echo $mysql_database ?>"></td>
</tr>
<tr>
<td>Database Table:</td>
<td><input type="text" name="frm_mysql_table" value="<?php echo $mysql_table ?>"></td>
</tr>
<tr>
<td><input type="submit" value="Update Database"></td>
</tr>
</table>
</form>