author | Dan |
Sun, 06 Apr 2008 00:28:50 -0400 | |
changeset 7 | 98bbc533541c |
permissions | -rw-r--r-- |
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
2 |
/*********************************************************************** |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
3 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
4 |
Copyright (C) 2002-2008 PunBB.org |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
5 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
6 |
This file is part of PunBB. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
7 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
8 |
PunBB is free software; you can redistribute it and/or modify it |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
9 |
under the terms of the GNU General Public License as published |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
10 |
by the Free Software Foundation; either version 2 of the License, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
11 |
or (at your option) any later version. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
12 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
13 |
PunBB is distributed in the hope that it will be useful, but |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
16 |
GNU General Public License for more details. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
17 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
18 |
You should have received a copy of the GNU General Public License |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
19 |
along with this program; if not, write to the Free Software |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
21 |
MA 02111-1307 USA |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
22 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
23 |
************************************************************************/ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
24 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
25 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
26 |
define('PUN_VERSION', '1.3 Beta'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
27 |
define('MIN_PHP_VERSION', '4.3.0'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
28 |
define('MIN_MYSQL_VERSION', '4.1.2'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
29 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
30 |
define('PUN_ROOT', './'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
31 |
define('PUN', 1); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
32 |
define('PUN_DEBUG', 1); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
33 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
34 |
if (file_exists(PUN_ROOT.'config.php')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
35 |
exit('The file \'config.php\' already exists which would mean that PunBB is already installed. You should go <a href="index.php">here</a> instead.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
36 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
37 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
38 |
// Make sure we are running at least MIN_PHP_VERSION |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
39 |
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
40 |
exit('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP '.MIN_PHP_VERSION.' to run properly. You must upgrade your PHP installation before you can continue.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
41 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
42 |
// Disable error reporting for uninitialized variables |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
43 |
error_reporting(E_ALL); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
44 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
45 |
// Turn off PHP time limit |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
46 |
@set_time_limit(0); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
47 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
48 |
// We need some stuff from functions.php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
49 |
require PUN_ROOT.'include/functions.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
50 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
51 |
// Load the language file |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
52 |
require PUN_ROOT.'lang/English/install.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
53 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
54 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
55 |
if (isset($_POST['generate_config'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
56 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
57 |
header('Content-Type: text/x-delimtext; name="config.php"'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
58 |
header('Content-disposition: attachment; filename=config.php'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
59 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
60 |
$db_type = $_POST['db_type']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
61 |
$db_host = $_POST['db_host']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
62 |
$db_name = $_POST['db_name']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
63 |
$db_username = $_POST['db_username']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
64 |
$db_password = $_POST['db_password']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
65 |
$db_prefix = $_POST['db_prefix']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
66 |
$base_url = $_POST['base_url']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
67 |
$cookie_name = $_POST['cookie_name']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
68 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
69 |
echo get_config_file(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
70 |
exit; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
71 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
72 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
73 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
74 |
if (!isset($_POST['form_sent'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
75 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
76 |
// Determine available database extensions |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
77 |
$dual_mysql = false; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
78 |
$db_extensions = array(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
79 |
if (function_exists('mysqli_connect')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
80 |
$db_extensions[] = array('mysqli', 'MySQL Improved'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
81 |
if (function_exists('mysql_connect')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
82 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
83 |
$db_extensions[] = array('mysql', 'MySQL Standard'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
84 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
85 |
if (count($db_extensions) > 1) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
86 |
$dual_mysql = true; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
87 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
88 |
if (function_exists('sqlite_open')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
89 |
$db_extensions[] = array('sqlite', 'SQLite'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
90 |
if (function_exists('pg_connect')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
91 |
$db_extensions[] = array('pgsql', 'PostgreSQL'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
92 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
93 |
if (empty($db_extensions)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
94 |
error('This PHP environment does not have support for any of the databases that PunBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for PunBB to be installed.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
95 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
96 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
97 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
98 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
99 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
100 |
<head> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
101 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
102 |
<title>PunBB Installation</title> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
103 |
<link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen.css" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
104 |
<link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_cs.css" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
105 |
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_ie6.css" /><![endif]--> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
106 |
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_ie7.css" /><![endif]--> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
107 |
</head> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
108 |
<body> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
109 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
110 |
<div id="pun-install" class="pun-page"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
111 |
<div class="pun"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
112 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
113 |
<div id="pun-title"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
114 |
<div><strong><?php printf($lang_install['Install PunBB'], PUN_VERSION) ?></strong></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
115 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
116 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
117 |
<div id="pun-desc"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
118 |
<div><?php printf ($lang_install['Install welcome'], PUN_VERSION) ?></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
119 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
120 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
121 |
<div id="pun-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
122 |
<div id="pun-visit"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
123 |
<p><?php echo $lang_install['Install intro'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
124 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
125 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
126 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
127 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
128 |
<div id="pun-main" class="main"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
129 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
130 |
<div class="main-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
131 |
<h1><span><?php printf($lang_install['Install PunBB'], PUN_VERSION) ?></span></h1> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
132 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
133 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
134 |
<div class="main-content frm parted"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
135 |
<div class="frm-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
136 |
<h2><span><?php echo $lang_install['Install head'] ?></span></h2> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
137 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
138 |
<form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
139 |
<div class="hidden"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
140 |
<input type="hidden" name="form_sent" value="1" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
141 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
142 |
<div class="frm-part part1"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
143 |
<h3><span><?php echo $lang_install['Part1'] ?></span></h3> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
144 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
145 |
<p><?php echo $lang_install['Part1 intro'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
146 |
<ul class="pair"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
147 |
<li><strong><?php echo $lang_install['Database type'] ?></strong> <span><?php echo $lang_install['Database type info'] ?><?php if ($dual_mysql) echo ' '.$lang_install['Mysql type info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
148 |
<li><strong><?php echo $lang_install['Database server'] ?></strong> <span><?php echo $lang_install['Database server info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
149 |
<li><strong><?php echo $lang_install['Database name'] ?></strong> <span><?php echo $lang_install['Database name info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
150 |
<li><strong><?php echo $lang_install['Database user pass'] ?></strong> <span><?php echo $lang_install['Database username info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
151 |
<li><strong><?php echo $lang_install['Table prefix'] ?></strong> <span><?php echo $lang_install['Table prefix info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
152 |
</ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
153 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
154 |
<fieldset class="frm-set set1"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
155 |
<legend class="frm-legend"><strong><?php echo $lang_install['Part1 legend'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
156 |
<div class="frm-fld select required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
157 |
<label for="fld1"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
158 |
<span class="fld-label"><?php echo $lang_install['Database type'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
159 |
<span class="fld-input"><select id="fld1" name="req_db_type"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
160 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
161 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
162 |
foreach ($db_extensions as $db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
163 |
echo "\t\t\t\t\t\t\t".'<option value="'.$db_type[0].'">'.$db_type[1].'</option>'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
164 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
165 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
166 |
</select></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
167 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
168 |
<span class="fld-help"><?php echo $lang_install['Database type help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
169 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
170 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
171 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
172 |
<label for="fld2"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
173 |
<span class="fld-label"><?php echo $lang_install['Database server'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
174 |
<span class="fld-input"><input id="fld2" type="text" name="req_db_host" value="localhost" size="50" maxlength="100" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
175 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
176 |
<span class="fld-help"><?php echo $lang_install['Database server help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
177 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
178 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
179 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
180 |
<label for="req_db_name"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
181 |
<span class="fld-label"><?php echo $lang_install['Database name'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
182 |
<span class="fld-input"><input id="req_db_name" type="text" name="req_db_name" size="35" maxlength="50" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
183 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
184 |
<span class="fld-help"><?php echo $lang_install['Database name help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
185 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
186 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
187 |
<div class="frm-fld text"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
188 |
<label for="fld3"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
189 |
<span class="fld-label"><?php echo $lang_install['Database username'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
190 |
<span class="fld-input"><input id="fld3" type="text" name="db_username" size="35" maxlength="50" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
191 |
<span class="fld-help"><?php echo $lang_install['Database username help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
192 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
193 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
194 |
<div class="frm-fld text"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
195 |
<label for="fld4"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
196 |
<span class="fld-label"><?php echo $lang_install['Database password'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
197 |
<span class="fld-input"><input id="fld4" type="text" name="db_password" size="35" maxlength="50" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
198 |
<span class="fld-help"><?php echo $lang_install['Database password help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
199 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
200 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
201 |
<div class="frm-fld text"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
202 |
<label for="fld5"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
203 |
<span class="fld-label"><?php echo $lang_install['Table prefix'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
204 |
<span class="fld-input"><input id="fld5" type="text" name="db_prefix" size="20" maxlength="30" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
205 |
<span class="fld-help"><?php echo $lang_install['Table prefix help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
206 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
207 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
208 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
209 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
210 |
<div class="frm-part part2"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
211 |
<h3><span><?php echo $lang_install['Part2'] ?></span></h3> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
212 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
213 |
<p><?php echo $lang_install['Part2 intro'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
214 |
<ul class="pair"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
215 |
<li><strong><?php echo $lang_install['Admin username'] ?></strong> <span><?php echo $lang_install['Admin username info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
216 |
<li><strong><?php echo $lang_install['Admin password'] ?></strong> <span><?php echo $lang_install['Admin password info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
217 |
<li><strong><?php echo $lang_install['Admin e-mail'] ?></strong> <span><?php echo $lang_install['Admin e-mail info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
218 |
</ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
219 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
220 |
<fieldset class="frm-set set1"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
221 |
<legend class="frm-legend"><strong><?php echo $lang_install['Part2 legend'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
222 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
223 |
<label for="fld6"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
224 |
<span class="fld-label"><?php echo $lang_install['Username'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
225 |
<span class="fld-input"><input type="text" name="req_username" size="35" maxlength="25" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
226 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
227 |
<span class="fld-help"><?php echo $lang_install['Username help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
228 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
229 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
230 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
231 |
<label for="fld7"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
232 |
<span class="fld-label"><?php echo $lang_install['Password'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
233 |
<span class="fld-input"><input id="fld7" type="text" name="req_password1" size="35" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
234 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
235 |
<span class="fld-help"><?php echo $lang_install['Password help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
236 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
237 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
238 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
239 |
<label for="fld8"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
240 |
<span class="fld-label"><?php echo $lang_install['Admin confirm password'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
241 |
<span class="fld-input"><input id="fld8" type="text" name="req_password2" size="35" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
242 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
243 |
<span class="fld-help"><?php echo $lang_install['Confirm password help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
244 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
245 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
246 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
247 |
<label for="fld9"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
248 |
<span class="fld-label"><?php echo $lang_install['E-mail address'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
249 |
<span class="fld-input"><input id="fld9" type="text" name="req_email" size="50" maxlength="80" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
250 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
251 |
<span class="fld-help"><?php echo $lang_install['E-mail address help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
252 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
253 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
254 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
255 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
256 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
257 |
<div class="frm-part part3"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
258 |
<h3><span><?php echo $lang_install['Part3'] ?></span></h3> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
259 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
260 |
<p><?php echo $lang_install['Part3 intro'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
261 |
<ul class="pair"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
262 |
<li><strong><?php echo $lang_install['Board title and desc'] ?></strong> <span><?php echo $lang_install['Board title info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
263 |
<li><strong><?php echo $lang_install['Base URL'] ?></strong> <span><?php echo $lang_install['Base URL info'] ?></span></li> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
264 |
</ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
265 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
266 |
<fieldset class="frm-set set1"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
267 |
<legend class="frm-legend"><strong><?php echo $lang_install['Part3 legend'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
268 |
<div class="frm-fld text"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
269 |
<label for="fld10"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
270 |
<span class="fld-label"><?php echo $lang_install['Board title'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
271 |
<span class="fld-input"><input id="fld10" type="text" name="board_title" size="50" maxlength="255" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
272 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
273 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
274 |
<div class="frm-fld text"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
275 |
<label for="fld11"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
276 |
<span class="fld-label"><?php echo $lang_install['Board description'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
277 |
<span class="fld-input"><input id="fld11" type="text" name="board_descrip" size="50" maxlength="255" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
278 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
279 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
280 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
281 |
<label for="fld12"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
282 |
<span class="fld-label"><?php echo $lang_install['Base URL'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
283 |
<span class="fld-input"><input id="fld12" type="text" name="req_base_url" value="<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://').preg_replace('/:80$/', '', $_SERVER['HTTP_HOST']).str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])) ?>" size="60" maxlength="100" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
284 |
<em class="req-text"><?php echo $lang_install['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
285 |
<span class="fld-help"><?php echo $lang_install['Base URL help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
286 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
287 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
288 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
289 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
290 |
<div class="frm-buttons"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
291 |
<span class="submit"><input type="submit" name="start" value="Start install" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
292 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
293 |
</form> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
294 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
295 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
296 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
297 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
298 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
299 |
</body> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
300 |
</html> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
301 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
302 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
303 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
304 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
305 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
306 |
// |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
307 |
// Strip slashes only if magic_quotes_gpc is on. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
308 |
// |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
309 |
function unescape($str) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
310 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
311 |
return (get_magic_quotes_gpc() == 1) ? stripslashes($str) : $str; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
312 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
313 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
314 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
315 |
$db_type = $_POST['req_db_type']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
316 |
$db_host = trim($_POST['req_db_host']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
317 |
$db_name = trim($_POST['req_db_name']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
318 |
$db_username = unescape(trim($_POST['db_username'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
319 |
$db_password = unescape(trim($_POST['db_password'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
320 |
$db_prefix = trim($_POST['db_prefix']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
321 |
$username = unescape(trim($_POST['req_username'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
322 |
$email = unescape(strtolower(trim($_POST['req_email']))); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
323 |
$password1 = unescape(trim($_POST['req_password1'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
324 |
$password2 = unescape(trim($_POST['req_password2'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
325 |
$board_title = unescape(trim($_POST['board_title'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
326 |
$board_descrip = unescape(trim($_POST['board_descrip'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
327 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
328 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
329 |
// Make sure base_url doesn't end with a slash |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
330 |
if (substr($_POST['req_base_url'], -1) == '/') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
331 |
$base_url = substr($_POST['req_base_url'], 0, -1); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
332 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
333 |
$base_url = $_POST['req_base_url']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
334 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
335 |
// Validate form |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
336 |
if (pun_strlen($db_name) == 0) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
337 |
error('You must enter a database name. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
338 |
if (pun_strlen($username) < 2) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
339 |
error('Usernames must be at least 2 characters long. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
340 |
if (pun_strlen($password1) < 4) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
341 |
error('Passwords must be at least 4 characters long. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
342 |
if ($password1 != $password2) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
343 |
error('Passwords do not match. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
344 |
if (strtolower($username) == 'guest') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
345 |
error('The username guest is reserved. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
346 |
if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
347 |
error('Usernames may not be in the form of an IP address. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
348 |
if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
349 |
error('Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
350 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
351 |
// Validate email |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
352 |
if (strlen($email) > 80 || !preg_match('/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $email)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
353 |
error('The administrator e-mail address you entered is invalid. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
354 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
355 |
// Make sure board title and description aren't left blank |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
356 |
if ($board_title == '') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
357 |
$board_title = 'My PunBB forum'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
358 |
if ($board_descrip == '') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
359 |
$board_descrip = 'Unfortunately no one can be told what PunBB is - you have to see it for yourself.'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
360 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
361 |
if (pun_strlen($base_url) == 0) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
362 |
error('You must enter a base URL. Please go back and correct.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
363 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
364 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
365 |
// Load the appropriate DB layer class |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
366 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
367 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
368 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
369 |
require PUN_ROOT.'include/dblayer/mysql.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
370 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
371 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
372 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
373 |
require PUN_ROOT.'include/dblayer/mysqli.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
374 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
375 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
376 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
377 |
require PUN_ROOT.'include/dblayer/pgsql.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
378 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
379 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
380 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
381 |
require PUN_ROOT.'include/dblayer/sqlite.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
382 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
383 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
384 |
default: |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
385 |
error('\''.$db_type.'\' is not a valid database type.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
386 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
387 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
388 |
// Create the database object (and connect/select db) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
389 |
$pun_db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, false); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
390 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
391 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
392 |
// If MySQL, make sure it's at least 4.1.2 |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
393 |
if ($db_type == 'mysql' || $db_type == 'mysqli') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
394 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
395 |
$result = $pun_db->query('SELECT VERSION()') or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
396 |
$mysql_version = $pun_db->result($result); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
397 |
if (version_compare($mysql_version, MIN_MYSQL_VERSION, '<')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
398 |
error('You are running MySQL version '.$mysql_version.'. PunBB requires at least MySQL '.MIN_MYSQL_VERSION.' to run properly. You must upgrade your MySQL installation before you can continue.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
399 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
400 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
401 |
// Validate prefix |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
402 |
if (strlen($db_prefix) > 0 && (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $db_prefix) || strlen($db_prefix) > 40)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
403 |
error('The table prefix \''.$db_prefix.'\' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
404 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
405 |
// Check SQLite prefix collision |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
406 |
if ($db_type == 'sqlite' && strtolower($db_prefix) == 'sqlite_') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
407 |
error('The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
408 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
409 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
410 |
// Make sure PunBB isn't already installed |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
411 |
$result = $pun_db->query('SELECT 1 FROM '.$db_prefix.'users WHERE id=1'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
412 |
if ($pun_db->num_rows($result)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
413 |
error('A table called "'.$db_prefix.'users" is already present in the database "'.$db_name.'". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
414 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
415 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
416 |
// Create all tables |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
417 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
418 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
419 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
420 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
421 |
$sql = 'CREATE TABLE '.$db_prefix."bans ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
422 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
423 |
username VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
424 |
ip VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
425 |
email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
426 |
message VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
427 |
expire INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
428 |
ban_creator INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
429 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
430 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
431 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
432 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
433 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
434 |
$pun_db->start_transaction(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
435 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
436 |
$sql = 'CREATE TABLE '.$db_prefix."bans ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
437 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
438 |
username VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
439 |
ip VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
440 |
email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
441 |
message VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
442 |
expire INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
443 |
ban_creator INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
444 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
445 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
446 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
447 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
448 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
449 |
$pun_db->start_transaction(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
450 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
451 |
$sql = 'CREATE TABLE '.$db_prefix."bans ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
452 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
453 |
username VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
454 |
ip VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
455 |
email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
456 |
message VARCHAR(255), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
457 |
expire INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
458 |
ban_creator INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
459 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
460 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
461 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
462 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
463 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
464 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
465 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
466 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
467 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
468 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
469 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
470 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
471 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
472 |
$sql = 'CREATE TABLE '.$db_prefix."categories ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
473 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
474 |
cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
475 |
disp_position INT(10) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
476 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
477 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
478 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
479 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
480 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
481 |
$sql = 'CREATE TABLE '.$db_prefix."categories ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
482 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
483 |
cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
484 |
disp_position INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
485 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
486 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
487 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
488 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
489 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
490 |
$sql = 'CREATE TABLE '.$db_prefix."categories ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
491 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
492 |
cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
493 |
disp_position INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
494 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
495 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
496 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
497 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
498 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
499 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
500 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
501 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
502 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
503 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
504 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
505 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
506 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
507 |
$sql = 'CREATE TABLE '.$db_prefix."censoring ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
508 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
509 |
search_for VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
510 |
replace_with VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
511 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
512 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
513 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
514 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
515 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
516 |
$sql = 'CREATE TABLE '.$db_prefix."censoring ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
517 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
518 |
search_for VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
519 |
replace_with VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
520 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
521 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
522 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
523 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
524 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
525 |
$sql = 'CREATE TABLE '.$db_prefix."censoring ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
526 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
527 |
search_for VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
528 |
replace_with VARCHAR(60) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
529 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
530 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
531 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
532 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
533 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
534 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
535 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
536 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
537 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
538 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
539 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
540 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
541 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
542 |
$sql = 'CREATE TABLE '.$db_prefix."config ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
543 |
conf_name VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
544 |
conf_value TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
545 |
PRIMARY KEY (conf_name) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
546 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
547 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
548 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
549 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
550 |
$sql = 'CREATE TABLE '.$db_prefix."config ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
551 |
conf_name VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
552 |
conf_value TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
553 |
PRIMARY KEY (conf_name) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
554 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
555 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
556 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
557 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
558 |
$sql = 'CREATE TABLE '.$db_prefix."config ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
559 |
conf_name VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
560 |
conf_value TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
561 |
PRIMARY KEY (conf_name) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
562 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
563 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
564 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
565 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
566 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
567 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
568 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
569 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
570 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
571 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
572 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
573 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
574 |
$sql = 'CREATE TABLE '.$db_prefix."extensions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
575 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
576 |
title VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
577 |
version VARCHAR(25) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
578 |
description TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
579 |
author VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
580 |
uninstall TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
581 |
uninstall_note TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
582 |
disabled TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
583 |
PRIMARY KEY(id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
584 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
585 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
586 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
587 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
588 |
$sql = 'CREATE TABLE '.$db_prefix."extensions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
589 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
590 |
title VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
591 |
version VARCHAR(25) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
592 |
description TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
593 |
author VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
594 |
uninstall TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
595 |
uninstall_note TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
596 |
disabled SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
597 |
PRIMARY KEY(id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
598 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
599 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
600 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
601 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
602 |
$sql = 'CREATE TABLE '.$db_prefix."extensions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
603 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
604 |
title VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
605 |
version VARCHAR(25) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
606 |
description TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
607 |
author VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
608 |
uninstall TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
609 |
uninstall_note TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
610 |
disabled INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
611 |
PRIMARY KEY(id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
612 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
613 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
614 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
615 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
616 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
617 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
618 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
619 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
620 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
621 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
622 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
623 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
624 |
$sql = 'CREATE TABLE '.$db_prefix."extension_hooks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
625 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
626 |
extension_id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
627 |
code TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
628 |
installed INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
629 |
PRIMARY KEY(id, extension_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
630 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
631 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
632 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
633 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
634 |
$sql = 'CREATE TABLE '.$db_prefix."extension_hooks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
635 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
636 |
extension_id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
637 |
code TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
638 |
installed INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
639 |
PRIMARY KEY(id, extension_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
640 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
641 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
642 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
643 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
644 |
$sql = 'CREATE TABLE '.$db_prefix."extension_hooks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
645 |
id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
646 |
extension_id VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
647 |
code TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
648 |
installed INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
649 |
PRIMARY KEY(id, extension_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
650 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
651 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
652 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
653 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
654 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
655 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
656 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
657 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
658 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
659 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
660 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
661 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
662 |
$sql = 'CREATE TABLE '.$db_prefix."forum_perms ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
663 |
group_id INT(10) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
664 |
forum_id INT(10) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
665 |
read_forum TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
666 |
post_replies TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
667 |
post_topics TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
668 |
PRIMARY KEY (group_id, forum_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
669 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
670 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
671 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
672 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
673 |
$sql = 'CREATE TABLE '.$db_prefix."forum_perms ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
674 |
group_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
675 |
forum_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
676 |
read_forum SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
677 |
post_replies SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
678 |
post_topics SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
679 |
PRIMARY KEY (group_id, forum_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
680 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
681 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
682 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
683 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
684 |
$sql = 'CREATE TABLE '.$db_prefix."forum_perms ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
685 |
group_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
686 |
forum_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
687 |
read_forum INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
688 |
post_replies INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
689 |
post_topics INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
690 |
PRIMARY KEY (group_id, forum_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
691 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
692 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
693 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
694 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
695 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
696 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
697 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
698 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
699 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
700 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
701 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
702 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
703 |
$sql = 'CREATE TABLE '.$db_prefix."forums ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
704 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
705 |
forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
706 |
forum_desc TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
707 |
redirect_url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
708 |
moderators TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
709 |
num_topics MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
710 |
num_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
711 |
last_post INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
712 |
last_post_id INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
713 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
714 |
sort_by TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
715 |
disp_position INT(10) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
716 |
cat_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
717 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
718 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
719 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
720 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
721 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
722 |
$sql = 'CREATE TABLE '.$db_prefix."forums ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
723 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
724 |
forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
725 |
forum_desc TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
726 |
redirect_url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
727 |
moderators TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
728 |
num_topics INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
729 |
num_posts INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
730 |
last_post INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
731 |
last_post_id INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
732 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
733 |
sort_by SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
734 |
disp_position INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
735 |
cat_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
736 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
737 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
738 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
739 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
740 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
741 |
$sql = 'CREATE TABLE '.$db_prefix."forums ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
742 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
743 |
forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
744 |
forum_desc TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
745 |
redirect_url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
746 |
moderators TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
747 |
num_topics INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
748 |
num_posts INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
749 |
last_post INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
750 |
last_post_id INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
751 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
752 |
sort_by INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
753 |
disp_position INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
754 |
cat_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
755 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
756 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
757 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
758 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
759 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
760 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
761 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
762 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
763 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
764 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
765 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
766 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
767 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
768 |
$sql = 'CREATE TABLE '.$db_prefix."groups ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
769 |
g_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
770 |
g_title VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
771 |
g_user_title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
772 |
g_moderator TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
773 |
g_mod_edit_users TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
774 |
g_mod_rename_users TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
775 |
g_mod_change_passwords TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
776 |
g_mod_ban_users TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
777 |
g_read_board TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
778 |
g_view_users TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
779 |
g_post_replies TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
780 |
g_post_topics TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
781 |
g_edit_posts TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
782 |
g_delete_posts TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
783 |
g_delete_topics TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
784 |
g_set_title TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
785 |
g_search TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
786 |
g_search_users TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
787 |
g_edit_subjects_interval SMALLINT(6) NOT NULL DEFAULT 300, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
788 |
g_post_flood SMALLINT(6) NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
789 |
g_search_flood SMALLINT(6) NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
790 |
PRIMARY KEY (g_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
791 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
792 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
793 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
794 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
795 |
$sql = 'CREATE TABLE '.$db_prefix."groups ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
796 |
g_id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
797 |
g_title VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
798 |
g_user_title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
799 |
g_moderator SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
800 |
g_mod_edit_users SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
801 |
g_mod_rename_users SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
802 |
g_mod_change_passwords SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
803 |
g_mod_ban_users SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
804 |
g_read_board SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
805 |
g_view_users SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
806 |
g_post_replies SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
807 |
g_post_topics SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
808 |
g_edit_posts SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
809 |
g_delete_posts SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
810 |
g_delete_topics SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
811 |
g_set_title SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
812 |
g_search SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
813 |
g_search_users SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
814 |
g_edit_subjects_interval SMALLINT NOT NULL DEFAULT 300, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
815 |
g_post_flood SMALLINT NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
816 |
g_search_flood SMALLINT NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
817 |
PRIMARY KEY (g_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
818 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
819 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
820 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
821 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
822 |
$sql = 'CREATE TABLE '.$db_prefix."groups ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
823 |
g_id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
824 |
g_title VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
825 |
g_user_title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
826 |
g_moderator INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
827 |
g_mod_edit_users INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
828 |
g_mod_rename_users INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
829 |
g_mod_change_passwords INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
830 |
g_mod_ban_users INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
831 |
g_read_board INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
832 |
g_view_users INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
833 |
g_post_replies INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
834 |
g_post_topics INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
835 |
g_edit_posts INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
836 |
g_delete_posts INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
837 |
g_delete_topics INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
838 |
g_set_title INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
839 |
g_search INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
840 |
g_search_users INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
841 |
g_edit_subjects_interval INTEGER NOT NULL DEFAULT 300, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
842 |
g_post_flood INTEGER NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
843 |
g_search_flood INTEGER NOT NULL DEFAULT 30, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
844 |
PRIMARY KEY (g_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
845 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
846 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
847 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
848 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
849 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
850 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
851 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
852 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
853 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
854 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
855 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
856 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
857 |
$sql = 'CREATE TABLE '.$db_prefix."online ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
858 |
user_id INT(10) UNSIGNED NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
859 |
ident VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
860 |
logged INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
861 |
idle TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
862 |
csrf_token VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
863 |
prev_url VARCHAR(255) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
864 |
) TYPE=HEAP;"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
865 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
866 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
867 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
868 |
$sql = 'CREATE TABLE '.$db_prefix."online ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
869 |
user_id INT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
870 |
ident VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
871 |
logged INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
872 |
idle SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
873 |
csrf_token VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
874 |
prev_url VARCHAR(255) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
875 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
876 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
877 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
878 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
879 |
$sql = 'CREATE TABLE '.$db_prefix."online ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
880 |
user_id INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
881 |
ident VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
882 |
logged INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
883 |
idle INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
884 |
csrf_token VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
885 |
prev_url VARCHAR(255) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
886 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
887 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
888 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
889 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
890 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
891 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
892 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
893 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
894 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
895 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
896 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
897 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
898 |
$sql = 'CREATE TABLE '.$db_prefix."posts ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
899 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
900 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
901 |
poster_id INT(10) UNSIGNED NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
902 |
poster_ip VARCHAR(15), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
903 |
poster_email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
904 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
905 |
hide_smilies TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
906 |
posted INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
907 |
edited INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
908 |
edited_by VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
909 |
topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
910 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
911 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
912 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
913 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
914 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
915 |
$sql = 'CREATE TABLE '.$db_prefix."posts ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
916 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
917 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
918 |
poster_id INT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
919 |
poster_ip VARCHAR(15), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
920 |
poster_email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
921 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
922 |
hide_smilies SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
923 |
posted INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
924 |
edited INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
925 |
edited_by VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
926 |
topic_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
927 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
928 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
929 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
930 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
931 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
932 |
$sql = 'CREATE TABLE '.$db_prefix."posts ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
933 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
934 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
935 |
poster_id INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
936 |
poster_ip VARCHAR(15), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
937 |
poster_email VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
938 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
939 |
hide_smilies INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
940 |
posted INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
941 |
edited INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
942 |
edited_by VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
943 |
topic_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
944 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
945 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
946 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
947 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
948 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
949 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
950 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
951 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
952 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
953 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
954 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
955 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
956 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
957 |
$sql = 'CREATE TABLE '.$db_prefix."ranks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
958 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
959 |
rank VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
960 |
min_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
961 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
962 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
963 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
964 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
965 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
966 |
$sql = 'CREATE TABLE '.$db_prefix."ranks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
967 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
968 |
rank VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
969 |
min_posts INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
970 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
971 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
972 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
973 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
974 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
975 |
$sql = 'CREATE TABLE '.$db_prefix."ranks ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
976 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
977 |
rank VARCHAR(50) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
978 |
min_posts INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
979 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
980 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
981 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
982 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
983 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
984 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
985 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
986 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
987 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
988 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
989 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
990 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
991 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
992 |
$sql = 'CREATE TABLE '.$db_prefix."reports ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
993 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
994 |
post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
995 |
topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
996 |
forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
997 |
reported_by INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
998 |
created INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
999 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1000 |
zapped INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1001 |
zapped_by INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1002 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1003 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1004 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1005 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1006 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1007 |
$sql = 'CREATE TABLE '.$db_prefix."reports ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1008 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1009 |
post_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1010 |
topic_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1011 |
forum_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1012 |
reported_by INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1013 |
created INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1014 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1015 |
zapped INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1016 |
zapped_by INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1017 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1018 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1019 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1020 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1021 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1022 |
$sql = 'CREATE TABLE '.$db_prefix."reports ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1023 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1024 |
post_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1025 |
topic_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1026 |
forum_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1027 |
reported_by INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1028 |
created INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1029 |
message TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1030 |
zapped INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1031 |
zapped_by INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1032 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1033 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1034 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1035 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1036 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1037 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1038 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1039 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1040 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1041 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1042 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1043 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1044 |
$sql = 'CREATE TABLE '.$db_prefix."search_cache ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1045 |
id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1046 |
ident VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1047 |
search_data TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1048 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1049 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1050 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1051 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1052 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1053 |
$sql = 'CREATE TABLE '.$db_prefix."search_cache ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1054 |
id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1055 |
ident VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1056 |
search_data TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1057 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1058 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1059 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1060 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1061 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1062 |
if ($db_type != 'mysql' && $db_type != 'mysqli') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1063 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1064 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1065 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1066 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1067 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1068 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1069 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1070 |
$sql = 'CREATE TABLE '.$db_prefix."search_matches ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1071 |
post_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1072 |
word_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1073 |
subject_match SMALLINT NOT NULL DEFAULT 0 |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1074 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1075 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1076 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1077 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1078 |
$sql = 'CREATE TABLE '.$db_prefix."search_matches ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1079 |
post_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1080 |
word_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1081 |
subject_match INTEGER NOT NULL DEFAULT 0 |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1082 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1083 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1084 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1085 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1086 |
if ($db_type != 'mysql' && $db_type != 'mysqli') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1087 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1088 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1089 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1090 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1091 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1092 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1093 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1094 |
$sql = 'CREATE TABLE '.$db_prefix."search_words ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1095 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1096 |
word VARCHAR(20) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1097 |
PRIMARY KEY (word) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1098 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1099 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1100 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1101 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1102 |
$sql = 'CREATE TABLE '.$db_prefix."search_words ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1103 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1104 |
word VARCHAR(20) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1105 |
PRIMARY KEY (id), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1106 |
UNIQUE (word) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1107 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1108 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1109 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1110 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1111 |
if ($db_type != 'mysql' && $db_type != 'mysqli') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1112 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1113 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1114 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1115 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1116 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1117 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1118 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1119 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1120 |
$sql = 'CREATE TABLE '.$db_prefix."subscriptions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1121 |
user_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1122 |
topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1123 |
PRIMARY KEY (user_id, topic_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1124 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1125 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1126 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1127 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1128 |
$sql = 'CREATE TABLE '.$db_prefix."subscriptions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1129 |
user_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1130 |
topic_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1131 |
PRIMARY KEY (user_id, topic_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1132 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1133 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1134 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1135 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1136 |
$sql = 'CREATE TABLE '.$db_prefix."subscriptions ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1137 |
user_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1138 |
topic_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1139 |
PRIMARY KEY (user_id, topic_id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1140 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1141 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1142 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1143 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1144 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1145 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1146 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1147 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1148 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1149 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1150 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1151 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1152 |
$sql = 'CREATE TABLE '.$db_prefix."topics ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1153 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1154 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1155 |
subject VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1156 |
posted INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1157 |
first_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1158 |
last_post INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1159 |
last_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1160 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1161 |
num_views MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1162 |
num_replies MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1163 |
closed TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1164 |
sticky TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1165 |
moved_to INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1166 |
forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1167 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1168 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1169 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1170 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1171 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1172 |
$sql = 'CREATE TABLE '.$db_prefix."topics ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1173 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1174 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1175 |
subject VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1176 |
posted INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1177 |
first_post_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1178 |
last_post INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1179 |
last_post_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1180 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1181 |
num_views INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1182 |
num_replies INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1183 |
closed SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1184 |
sticky SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1185 |
moved_to INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1186 |
forum_id INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1187 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1188 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1189 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1190 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1191 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1192 |
$sql = 'CREATE TABLE '.$db_prefix."topics ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1193 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1194 |
poster VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1195 |
subject VARCHAR(255) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1196 |
posted INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1197 |
first_post_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1198 |
last_post INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1199 |
last_post_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1200 |
last_poster VARCHAR(200), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1201 |
num_views INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1202 |
num_replies INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1203 |
closed INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1204 |
sticky INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1205 |
moved_to INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1206 |
forum_id INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1207 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1208 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1209 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1210 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1211 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1212 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1213 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1214 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1215 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1216 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1217 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1218 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1219 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1220 |
$sql = 'CREATE TABLE '.$db_prefix."users ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1221 |
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1222 |
group_id INT(10) UNSIGNED NOT NULL DEFAULT 4, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1223 |
username VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1224 |
password VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1225 |
salt VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1226 |
email VARCHAR(80) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1227 |
title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1228 |
realname VARCHAR(40), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1229 |
url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1230 |
jabber VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1231 |
icq VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1232 |
msn VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1233 |
aim VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1234 |
yahoo VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1235 |
location VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1236 |
signature TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1237 |
disp_topics TINYINT(3) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1238 |
disp_posts TINYINT(3) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1239 |
email_setting TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1240 |
save_pass TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1241 |
notify_with_post TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1242 |
auto_notify TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1243 |
show_smilies TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1244 |
show_img TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1245 |
show_img_sig TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1246 |
show_avatars TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1247 |
show_sig TINYINT(1) NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1248 |
timezone FLOAT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1249 |
dst TINYINT(1) NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1250 |
time_format INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1251 |
date_format INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1252 |
language VARCHAR(25) NOT NULL DEFAULT 'English', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1253 |
style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1254 |
num_posts INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1255 |
last_post INT(10) UNSIGNED, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1256 |
registered INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1257 |
registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1258 |
last_visit INT(10) UNSIGNED NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1259 |
admin_note VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1260 |
activate_string VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1261 |
activate_key VARCHAR(8), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1262 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1263 |
) ENGINE = MyISAM CHARACTER SET utf8"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1264 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1265 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1266 |
case 'pgsql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1267 |
$sql = 'CREATE TABLE '.$db_prefix."users ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1268 |
id SERIAL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1269 |
group_id INT NOT NULL DEFAULT 4, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1270 |
username VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1271 |
password VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1272 |
salt VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1273 |
email VARCHAR(80) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1274 |
title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1275 |
realname VARCHAR(40), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1276 |
url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1277 |
jabber VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1278 |
icq VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1279 |
msn VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1280 |
aim VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1281 |
yahoo VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1282 |
location VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1283 |
signature TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1284 |
disp_topics SMALLINT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1285 |
disp_posts SMALLINT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1286 |
email_setting SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1287 |
save_pass SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1288 |
notify_with_post SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1289 |
auto_notify SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1290 |
show_smilies SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1291 |
show_img SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1292 |
show_img_sig SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1293 |
show_avatars SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1294 |
show_sig SMALLINT NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1295 |
timezone REAL NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1296 |
dst SMALLINT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1297 |
time_format INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1298 |
date_format INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1299 |
language VARCHAR(25) NOT NULL DEFAULT 'English', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1300 |
style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1301 |
num_posts INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1302 |
last_post INT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1303 |
registered INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1304 |
registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1305 |
last_visit INT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1306 |
admin_note VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1307 |
activate_string VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1308 |
activate_key VARCHAR(8), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1309 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1310 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1311 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1312 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1313 |
case 'sqlite': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1314 |
$sql = 'CREATE TABLE '.$db_prefix."users ( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1315 |
id INTEGER NOT NULL, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1316 |
group_id INTEGER NOT NULL DEFAULT 4, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1317 |
username VARCHAR(200) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1318 |
password VARCHAR(40) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1319 |
salt VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1320 |
email VARCHAR(80) NOT NULL DEFAULT '', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1321 |
title VARCHAR(50), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1322 |
realname VARCHAR(40), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1323 |
url VARCHAR(100), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1324 |
jabber VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1325 |
icq VARCHAR(12), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1326 |
msn VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1327 |
aim VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1328 |
yahoo VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1329 |
location VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1330 |
signature TEXT, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1331 |
disp_topics INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1332 |
disp_posts INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1333 |
email_setting INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1334 |
save_pass INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1335 |
notify_with_post INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1336 |
auto_notify INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1337 |
show_smilies INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1338 |
show_img INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1339 |
show_img_sig INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1340 |
show_avatars INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1341 |
show_sig INTEGER NOT NULL DEFAULT 1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1342 |
timezone FLOAT NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1343 |
dst INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1344 |
time_format INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1345 |
date_format INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1346 |
language VARCHAR(25) NOT NULL DEFAULT 'English', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1347 |
style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1348 |
num_posts INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1349 |
last_post INTEGER, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1350 |
registered INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1351 |
registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1352 |
last_visit INTEGER NOT NULL DEFAULT 0, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1353 |
admin_note VARCHAR(30), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1354 |
activate_string VARCHAR(80), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1355 |
activate_key VARCHAR(8), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1356 |
PRIMARY KEY (id) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1357 |
)"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1358 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1359 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1360 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1361 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1362 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1363 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1364 |
// Add some indexes |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1365 |
switch ($db_type) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1366 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1367 |
case 'mysql': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1368 |
case 'mysqli': |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1369 |
// We use MySQL's ALTER TABLE ... ADD INDEX syntax instead of CREATE INDEX to avoid problems with users lacking the INDEX privilege |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1370 |
$queries[] = 'ALTER TABLE '.$db_prefix.'online ADD UNIQUE INDEX '.$db_prefix.'online_user_id_ident_idx(user_id,ident(25))'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1371 |
$queries[] = 'ALTER TABLE '.$db_prefix.'online ADD INDEX '.$db_prefix.'online_user_id_idx(user_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1372 |
$queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_topic_id_idx(topic_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1373 |
$queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_multi_idx(poster_id, topic_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1374 |
$queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD FULLTEXT '.$db_prefix.'posts_message_idx(message)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1375 |
$queries[] = 'ALTER TABLE '.$db_prefix.'reports ADD INDEX '.$db_prefix.'reports_zapped_idx(zapped)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1376 |
$queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_forum_id_idx(forum_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1377 |
$queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_moved_to_idx(moved_to)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1378 |
$queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_last_post_idx(last_post)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1379 |
$queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_first_post_id_idx(first_post_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1380 |
$queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD FULLTEXT '.$db_prefix.'topics_subject_idx(subject)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1381 |
$queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_registered_idx(registered)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1382 |
$queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_username_idx(username(8))'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1383 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1384 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1385 |
default: |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1386 |
$queries[] = 'CREATE UNIQUE INDEX '.$db_prefix.'online_user_id_ident_idx ON '.$db_prefix.'online(user_id,ident)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1387 |
$queries[] = 'CREATE INDEX '.$db_prefix.'online_user_id_idx ON '.$db_prefix.'online(user_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1388 |
$queries[] = 'CREATE INDEX '.$db_prefix.'posts_topic_id_idx ON '.$db_prefix.'posts(topic_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1389 |
$queries[] = 'CREATE INDEX '.$db_prefix.'posts_multi_idx ON '.$db_prefix.'posts(poster_id, topic_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1390 |
$queries[] = 'CREATE INDEX '.$db_prefix.'reports_zapped_idx ON '.$db_prefix.'reports(zapped)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1391 |
$queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_word_id_idx ON '.$db_prefix.'search_matches(word_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1392 |
$queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_post_id_idx ON '.$db_prefix.'search_matches(post_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1393 |
$queries[] = 'CREATE INDEX '.$db_prefix.'topics_forum_id_idx ON '.$db_prefix.'topics(forum_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1394 |
$queries[] = 'CREATE INDEX '.$db_prefix.'topics_moved_to_idx ON '.$db_prefix.'topics(moved_to)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1395 |
$queries[] = 'CREATE INDEX '.$db_prefix.'topics_last_post_idx ON '.$db_prefix.'topics(last_post)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1396 |
$queries[] = 'CREATE INDEX '.$db_prefix.'topics_first_post_id_idx ON '.$db_prefix.'topics(first_post_id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1397 |
$queries[] = 'CREATE INDEX '.$db_prefix.'users_registered_idx ON '.$db_prefix.'users(registered)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1398 |
$queries[] = 'CREATE INDEX '.$db_prefix.'users_username_idx ON '.$db_prefix.'users(username)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1399 |
$queries[] = 'CREATE INDEX '.$db_prefix.'search_cache_ident_idx ON '.$db_prefix.'search_cache(ident)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1400 |
$queries[] = 'CREATE INDEX '.$db_prefix.'search_words_id_idx ON '.$db_prefix.'search_words(id)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1401 |
break; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1402 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1403 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1404 |
@reset($queries); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1405 |
while (list(, $sql) = @each($queries)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1406 |
$pun_db->query($sql) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1407 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1408 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1409 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1410 |
$now = time(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1411 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1412 |
// Insert the four preset groups |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1413 |
$pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Administrators', 'Administrator', 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1414 |
$pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Guest', NULL, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1415 |
$pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Members', NULL, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1416 |
$pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1417 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1418 |
// Insert guest and first admin user |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1419 |
$pun_db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email) VALUES(2, 'Guest', 'Guest', 'Guest')") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1420 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1421 |
$salt = random_key(12); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1422 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1423 |
$pun_db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, last_visit, salt) VALUES(1, '".$pun_db->escape($username)."', '".sha1($salt.sha1($password1))."', '$email', 1, ".$now.", ".$now.", '127.0.0.1', ".$now.", '".$pun_db->escape($salt)."')") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1424 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1425 |
// Enable/disable avatars depending on file_uploads setting in PHP configuration |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1426 |
$avatars = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1')) ? 1 : 0; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1427 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1428 |
// Enable/disable automatic check for updates depending on PHP environment (require cURL, fsockopen or allow_url_fopen) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1429 |
$check_for_updates = (function_exists('curl_init') || function_exists('fsockopen') || in_array(strtolower(@ini_get('allow_url_fopen')), array('on', 'true', '1'))) ? 1 : 0; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1430 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1431 |
// Insert config data |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1432 |
$config = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1433 |
'o_cur_version' => "'".PUN_VERSION."'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1434 |
'o_board_title' => "'".$pun_db->escape($board_title)."'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1435 |
'o_board_desc' => "'".$pun_db->escape($board_descrip)."'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1436 |
'o_default_timezone' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1437 |
'o_time_format' => "'H:i:s'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1438 |
'o_date_format' => "'Y-m-d'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1439 |
'o_check_for_updates' => "'$check_for_updates'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1440 |
'o_timeout_visit' => "'1800'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1441 |
'o_timeout_online' => "'300'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1442 |
'o_redirect_delay' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1443 |
'o_show_version' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1444 |
'o_show_user_info' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1445 |
'o_show_post_count' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1446 |
'o_signatures' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1447 |
'o_smilies' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1448 |
'o_smilies_sig' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1449 |
'o_make_links' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1450 |
'o_default_lang' => "'English'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1451 |
'o_default_style' => "'Oxygen'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1452 |
'o_default_user_group' => "'3'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1453 |
'o_topic_review' => "'15'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1454 |
'o_disp_topics_default' => "'30'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1455 |
'o_disp_posts_default' => "'25'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1456 |
'o_indent_num_spaces' => "'4'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1457 |
'o_quickpost' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1458 |
'o_users_online' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1459 |
'o_censoring' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1460 |
'o_ranks' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1461 |
'o_show_dot' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1462 |
'o_topic_views' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1463 |
'o_quickjump' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1464 |
'o_gzip' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1465 |
'o_additional_navlinks' => "''", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1466 |
'o_report_method' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1467 |
'o_regs_report' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1468 |
'o_mailing_list' => "'$email'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1469 |
'o_avatars' => "'$avatars'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1470 |
'o_avatars_dir' => "'img/avatars'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1471 |
'o_avatars_width' => "'60'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1472 |
'o_avatars_height' => "'60'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1473 |
'o_avatars_size' => "'10240'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1474 |
'o_search_all_forums' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1475 |
'o_sef' => "'Default'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1476 |
'o_admin_email' => "'$email'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1477 |
'o_webmaster_email' => "'$email'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1478 |
'o_subscriptions' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1479 |
'o_smtp_host' => "NULL", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1480 |
'o_smtp_user' => "NULL", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1481 |
'o_smtp_pass' => "NULL", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1482 |
'o_smtp_ssl' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1483 |
'o_regs_allow' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1484 |
'o_regs_verify' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1485 |
'o_announcement' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1486 |
'o_announcement_heading' => "'Sample announcement'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1487 |
'o_announcement_message' => "'<p>Enter your announcement here.</p>'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1488 |
'o_rules' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1489 |
'o_rules_message' => "'Enter your rules here.'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1490 |
'o_maintenance' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1491 |
'o_maintenance_message' => "'The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1492 |
'p_message_bbcode' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1493 |
'p_message_img_tag' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1494 |
'p_message_all_caps' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1495 |
'p_subject_all_caps' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1496 |
'p_sig_all_caps' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1497 |
'p_sig_bbcode' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1498 |
'p_sig_img_tag' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1499 |
'p_sig_length' => "'400'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1500 |
'p_sig_lines' => "'4'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1501 |
'p_allow_banned_email' => "'1'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1502 |
'p_allow_dupe_email' => "'0'", |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1503 |
'p_force_guest_email' => "'1'" |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1504 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1505 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1506 |
while (list($conf_name, $conf_value) = @each($config)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1507 |
$pun_db->query('INSERT INTO '.$db_prefix."config (conf_name, conf_value) VALUES('$conf_name', $conf_value)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1508 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1509 |
// Insert some other default data |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1510 |
$pun_db->query('INSERT INTO '.$db_prefix."categories (cat_name, disp_position) VALUES('Test category', 1)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1511 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1512 |
$pun_db->query('INSERT INTO '.$db_prefix."forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES('Test forum', 'This is just a test forum', 1, 1, ".$now.", 1, '".$pun_db->escape($username)."', 1, 1)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1513 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1514 |
$subject = 'Test post'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1515 |
$pun_db->query('INSERT INTO '.$db_prefix.'topics (poster, subject, posted, first_post_id, last_post, last_post_id, last_poster, forum_id) VALUES(\''.$pun_db->escape($username).'\', \''.$subject.'\', '.$now.', 1, '.$now.', 1, \''.$pun_db->escape($username).'\', 1)') or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1516 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1517 |
$message = 'If you are looking at this (which I guess you are), the install of PunBB appears to have worked! Now log in and head over to the administration control panel to configure your forum.'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1518 |
$pun_db->query('INSERT INTO '.$db_prefix.'posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES(\''.$pun_db->escape($username).'\', 2, \'127.0.0.1\', \''.$message.'\', '.$now.', 1)') or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1519 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1520 |
// Add new post to search table |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1521 |
if ($db_type != 'mysql' && $db_type != 'mysqli') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1522 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1523 |
require PUN_ROOT.'include/search_idx.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1524 |
update_search_index('post', $pun_db->insert_id(), $message, $subject); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1525 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1526 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1527 |
$pun_db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('New member', 0)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1528 |
$pun_db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('Member', 10)") or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1529 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1530 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1531 |
if ($db_type == 'pgsql' || $db_type == 'sqlite') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1532 |
$pun_db->end_transaction(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1533 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1534 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1535 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1536 |
$alerts = array(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1537 |
// Check if the cache directory is writable |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1538 |
if (!@is_writable('./cache/')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1539 |
$alerts[] = '<li>'.$lang_install['No cache write'].'</li>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1540 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1541 |
// Check if default avatar directory is writable |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1542 |
if (!@is_writable('./img/avatars/')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1543 |
$alerts[] = '<li>'.$lang_install['No avatar write'].'</li>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1544 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1545 |
// Check if we disabled uploading avatars because file_uploads was disabled |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1546 |
if ($avatars == '0') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1547 |
$alerts[] = '<li>'.$lang_install['File upload alert'].'</li>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1548 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1549 |
// Add some random bytes at the end of the cookie name to prevent collisions |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1550 |
$cookie_name = 'punbb_cookie_'.random_key(6, false, true); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1551 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1552 |
/// Generate the config.php file data |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1553 |
$config = get_config_file(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1554 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1555 |
// Attempt to write config.php and serve it up for download if writing fails |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1556 |
$written = false; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1557 |
if (is_writable(PUN_ROOT)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1558 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1559 |
$fh = @fopen(PUN_ROOT.'config.php', 'wb'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1560 |
if ($fh) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1561 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1562 |
fwrite($fh, $config); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1563 |
fclose($fh); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1564 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1565 |
$written = true; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1566 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1567 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1568 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1569 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1570 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1571 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1572 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1573 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1574 |
<head> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1575 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1576 |
<title>PunBB Installation</title> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1577 |
<link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen.css" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1578 |
<link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_forms.css" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1579 |
<link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_cs.css" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1580 |
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="style/Oxygen/Oxygen_ie.css" /><![endif]--> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1581 |
</head> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1582 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1583 |
<body> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1584 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1585 |
<div id="pun-install" class="pun-page"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1586 |
<div class="pun"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1587 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1588 |
<div id="pun-title"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1589 |
<div id="logo"><strong><?php printf($lang_install['Install PunBB'], PUN_VERSION) ?></strong></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1590 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1591 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1592 |
<div id="pun-desc"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1593 |
<div id="desc"><?php printf($lang_install['Success description'], PUN_VERSION) ?></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1594 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1595 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1596 |
<div id="pun-visit"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1597 |
<p><?php echo $lang_install['Success welcome'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1598 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1599 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1600 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1601 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1602 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1603 |
<div id="pun-main" class="main"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1604 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1605 |
<div class="main-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1606 |
<h1><span><?php echo $lang_install['Final instructions'] ?></span></h1> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1607 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1608 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1609 |
<div class="main-content frm"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1610 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1611 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1612 |
if (!$written) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1613 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1614 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1615 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1616 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1617 |
<p class="warn"><?php echo $lang_install['No write info 1'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1618 |
<p class="warn"><?php printf($lang_install['No write info 2'], '<a href="index.php">'.$lang_install['Go to index'].'</a>') ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1619 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1620 |
<?php if (!empty($alerts)): ?> <div class="frm-error"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1621 |
<?php echo $lang_install['Warning'] ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1622 |
<ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1623 |
<?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1624 |
</ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1625 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1626 |
<?php endif; ?> <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1627 |
<div class="hidden"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1628 |
<input type="hidden" name="generate_config" value="1" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1629 |
<input type="hidden" name="db_type" value="<?php echo $db_type; ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1630 |
<input type="hidden" name="db_host" value="<?php echo $db_host; ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1631 |
<input type="hidden" name="db_name" value="<?php echo htmlspecialchars($db_name); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1632 |
<input type="hidden" name="db_username" value="<?php echo htmlspecialchars($db_username); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1633 |
<input type="hidden" name="db_password" value="<?php echo htmlspecialchars($db_password); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1634 |
<input type="hidden" name="db_prefix" value="<?php echo htmlspecialchars($db_prefix); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1635 |
<input type="hidden" name="base_url" value="<?php echo htmlspecialchars($base_url); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1636 |
<input type="hidden" name="cookie_name" value="<?php echo htmlspecialchars($cookie_name); ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1637 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1638 |
<div class="frm-buttons"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1639 |
<span class="submit"><input type="submit" value="<?php echo $lang_install['Download config'] ?>" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1640 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1641 |
</form> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1642 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1643 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1644 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1645 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1646 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1647 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1648 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1649 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1650 |
<p class="warn"><?php printf($lang_install['Write info'], '<a href="index.php">'.$lang_install['Go to index'].'</a>') ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1651 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1652 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1653 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1654 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1655 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1656 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1657 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1658 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1659 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1660 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1661 |
</body> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1662 |
</html> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1663 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1664 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1665 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1666 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1667 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1668 |
function get_config_file () |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1669 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1670 |
global $db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $base_url, $cookie_name; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1671 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1672 |
return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$base_url = \''.$base_url.'\';'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n\ndefine('PUN', 1);"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1673 |
} |