|
@@ -18,192 +18,33 @@ $configFile = Absolute_Path."config.php";
|
18
|
18
|
if(file_exists($configFile)){
|
19
|
19
|
require_once($configFile);
|
20
|
20
|
}else{
|
21
|
|
- exit("You need to rename config-sample.php to config.php and fill out the required details.");
|
|
21
|
+ exit('You need to rename config-sample.php to config.php and fill out the required details.');
|
22
|
22
|
}
|
23
|
23
|
|
24
|
24
|
global $user, $conf, $tumble;
|
25
|
25
|
$install = new Install();
|
|
26
|
+if($install->is_gelato_installed()){
|
|
27
|
+ header("location: index.php");
|
|
28
|
+ exit;
|
|
29
|
+}
|
26
|
30
|
$install->data = $_POST;
|
27
|
31
|
$install->check_form();
|
|
32
|
+$theme = new themes;
|
|
33
|
+$theme->set('version',version());
|
|
34
|
+$theme->set('showForm',$install->showForm);
|
|
35
|
+
|
|
36
|
+$theme->set('db_login',isset($install->data['db_login'])? $install->data['db_login'] : '');
|
|
37
|
+$theme->set('db_host',(!empty($install->data['db_host']))? $install->data['db_host'] : 'localhost');
|
|
38
|
+$theme->set('db_name',(!empty($install->data['db_name']))? $install->data['db_name'] : 'gelatocms');
|
|
39
|
+$theme->set('login',isset($install->data['login'])?$install->data['login']:'');
|
|
40
|
+$theme->set('email',isset($install->data['email'])?$install->data['email']:'');
|
|
41
|
+$theme->set('title',isset($install->data['title'])?$install->data['title']:'');
|
|
42
|
+$theme->set('description',isset($install->data['description'])?$install->data['description']:'');
|
|
43
|
+$theme->set('url_installation',isset($_SERVER['SCRIPT_URI'])?substr($_SERVER["SCRIPT_URI"], 0, -12):'');
|
|
44
|
+$theme->set('themes',getThemes());
|
|
45
|
+
|
|
46
|
+for($c=1;$c<=10;$c++)$errores[$c] = $install->mostrarerror($c);
|
|
47
|
+$theme->set('error',$errores);
|
|
48
|
+
|
|
49
|
+$theme->display(Absolute_Path.'admin/themes/admin/install.htm');
|
28
|
50
|
?>
|
29
|
|
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
30
|
|
-<html xmlns="http://www.w3.org/1999/xhtml">
|
31
|
|
-<head>
|
32
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
33
|
|
- <meta name="generator" content="gelato cms <?php echo version();?>" />
|
34
|
|
- <title>gelato :: installation</title>
|
35
|
|
- <link rel="shortcut icon" href="images/favicon.ico" />
|
36
|
|
- <style type="text/css" media="screen">
|
37
|
|
- @import "admin/css/style.css";
|
38
|
|
- </style>
|
39
|
|
-</head>
|
40
|
|
-<body>
|
41
|
|
-<div id="cont">
|
42
|
|
- <div id="head">
|
43
|
|
- <h1><a href="index.php" title="gelato :: home">gelato cms</a></h1>
|
44
|
|
- </div>
|
45
|
|
-
|
46
|
|
- <div id="main">
|
47
|
|
-
|
48
|
|
-<?php
|
49
|
|
-
|
50
|
|
- if ($install->showForm) {
|
51
|
|
-?>
|
52
|
|
-
|
53
|
|
- <div class="box">
|
54
|
|
- <ul class="menu manage">
|
55
|
|
- <h3>gelato :: installation</h3>
|
56
|
|
-
|
57
|
|
- <li class="selected"><a>Install</a></li>
|
58
|
|
- </ul>
|
59
|
|
-
|
60
|
|
- <div class="tabla">
|
61
|
|
- <form action="install.php" method="post" id="config_form" autocomplete="off" class="newpost">
|
62
|
|
- <fieldset class="install">
|
63
|
|
- <legend class="install">Database Settings</legend>
|
64
|
|
- <ul>
|
65
|
|
- <li><label for="login">User:</label>
|
66
|
|
- <input type="text" name="db_login" id="db_login" value="<?php echo isset($install->data['db_login'])?$install->data['db_login']:''?>" class="txt"/><?php echo $install->mostrarerror("10")?></li>
|
67
|
|
- <li><label for="password">Password:</label>
|
68
|
|
- <input type="password" name="db_password" id="db_password" value="" class="txt"/></li>
|
69
|
|
- <li><label for="password2">Re-type password:</label>
|
70
|
|
- <input type="password" name="db_password2" id="db_password2" value="" class="txt"/><?php echo $install->mostrarerror("9")?></li>
|
71
|
|
- <li><label for="email">Database Host:</label>
|
72
|
|
- <input type="text" name="db_host" id="db_host" value="<?php echo (!empty($install->data['db_host']))? $install->data['db_host'] : 'localhost'?>" class="txt"/><?php echo $install->mostrarerror("7")?></li>
|
73
|
|
- <li><label for="email">Database Name:</label>
|
74
|
|
- <input type="text" name="db_name" id="db_name" value="<?php echo (!empty($install->data['db_name']))? $install->data['db_name'] : 'gelatocms'?>" class="txt"/><?php echo $install->mostrarerror("8")?></li>
|
75
|
|
- </ul>
|
76
|
|
- </fieldset><br />
|
77
|
|
- <fieldset class="install">
|
78
|
|
- <legend class="install">Admin user</legend>
|
79
|
|
- <ul>
|
80
|
|
- <li><label for="login">User:</label>
|
81
|
|
- <input type="text" name="login" id="login" value="<?php echo isset($install->data['login'])?$install->data['login']:''?>" class="txt"/><?php echo $install->mostrarerror("1")?></li>
|
82
|
|
- <li><label for="password">Password:</label>
|
83
|
|
- <input type="password" name="password" id="password" value="" class="txt"/><?php echo $install->mostrarerror("2")?></li>
|
84
|
|
- <li><label for="password2">Re-type password:</label>
|
85
|
|
- <input type="password" name="password2" id="password2" value="" class="txt"/><?php echo $install->mostrarerror("3")?></li>
|
86
|
|
- <li><label for="email">E-mail:</label>
|
87
|
|
- <input type="text" name="email" id="email" value="<?php echo isset($install->data['email'])?$install->data['email']:''?>" class="txt"/><?php echo $install->mostrarerror("4")?></li>
|
88
|
|
- </ul>
|
89
|
|
- </fieldset><br />
|
90
|
|
- <fieldset class="install">
|
91
|
|
- <legend class="install">Tumblelog configuration</legend>
|
92
|
|
- <ul>
|
93
|
|
- <li><label for="title">Title:</label>
|
94
|
|
- <input type="text" name="title" id="title" value="<?php echo isset($install->data['title'])?$install->data['title']:''?>" class="txt"/></li>
|
95
|
|
- <li><label for="description">Description:</label>
|
96
|
|
- <input type="text" name="description" id="description" value="<?php echo isset($install->data['description'])?$install->data['description']:''?>" class="txt"/></li>
|
97
|
|
- <li><label for="url_installation">Installation URL</label>
|
98
|
|
- <input type="text" name="url_installation" id="url_installation" value="<?php if(isset($_SERVER['SCRIPT_URI']))echo substr($_SERVER["SCRIPT_URI"], '0', '-12'); ?>" class="txt"/><?php echo $install->mostrarerror("5")?></li>
|
99
|
|
- <li><label for="posts_limit">Post limit:</label>
|
100
|
|
- <input type="text" name="posts_limit" id="posts_limit" value="10" class="txt"/></li>
|
101
|
|
- <li><label for="lang">Language:</label>
|
102
|
|
- <select id="lang" name="lang">
|
103
|
|
- <option value="en" selected="selected">english</option>
|
104
|
|
- </select>
|
105
|
|
- </li>
|
106
|
|
- <li><label for="template">Template:</label>
|
107
|
|
- <select id="template" name="template">
|
108
|
|
-<?php
|
109
|
|
- $themes = getThemes();
|
110
|
|
- foreach ($themes as $theme) {
|
111
|
|
- echo "<option value=\"".$theme."\" selected=\"true\">".$theme."</option>\n";
|
112
|
|
-
|
113
|
|
- }
|
114
|
|
-?> </select>
|
115
|
|
- <li>
|
116
|
|
- <li><label for="time_offsets">Time Offset:</label>
|
117
|
|
- <select id="time_offsets" name="time_offsets">
|
118
|
|
- <option value="-12,Pacific/Kwajalein">(GMT -12:00) International Date Line West</option>
|
119
|
|
- <option value="-11,Pacific/Samoa">(GMT -11:00) Midway Island, Samoa</option>
|
120
|
|
- <option value="-10,Pacific/Honolulu">(GMT -10:00) Hawaii</option>
|
121
|
|
- <option value="-9,US/Alaska">(GMT -9:00) Alaska</option>
|
122
|
|
- <option value="-8,US/Pacific">(GMT -8:00) Pacific Time (US & Canada); Tijuana</option>
|
123
|
|
- <option value="-7,US/Mountain">(GMT -7:00) Mountain Time (US & Canada)</option>
|
124
|
|
- <option value="-7,US/Arizona">(GMT -7:00) Arizona</option>
|
125
|
|
- <option value="-7,Mexico/BajaNorte">(GMT -7:00) Chihuahua, La Paz, Mazatlan</option>
|
126
|
|
- <option value="-6,US/Central">(GMT -6:00) Central Time (US & Canada)</option>
|
127
|
|
- <option value="-6,America/Costa_Rica">(GMT -6:00) Central America</option>
|
128
|
|
- <option value="-6,Mexico/General" selected="selected">(GMT -6:00) Guadalajara, Mexico City, Monterrey</option>
|
129
|
|
- <option value="-6,Canada/Saskatchewan">(GMT -6:00) Saskatchewan</option>
|
130
|
|
- <option value="-5,US/Eastern">(GMT -5:00) Eastern Time (US & Canada)</option>
|
131
|
|
- <option value="-5,America/Bogota">(GMT -5:00) Bogota, Lima, Quito</option>
|
132
|
|
- <option value="-5,US/East-Indiana">(GMT -5:00) Indiana (East)</option>
|
133
|
|
- <option value="-4,Canada/Eastern">(GMT -4:00) Atlantic Time (Canada)</option>
|
134
|
|
- <option value="-4,America/Caracas">(GMT -4:00) Caracas, La Paz</option>
|
135
|
|
- <option value="-4,America/Santiago">(GMT -4:00) Santiago</option>
|
136
|
|
- <option value="-3.50,Canada/Newfoundland">(GMT -3:30) Newfoundland</option>
|
137
|
|
- <option value="-3,Canada/Atlantic">(GMT -3:00) Brasilia, Greenland</option>
|
138
|
|
- <option value="-3,America/Buenos_Aires">(GMT -3:00) Buenos Aires, Georgetown</option>
|
139
|
|
- <option value="-2,Atlantic/Central">(GMT -2:00) Atlantic Central</option>
|
140
|
|
- <option value="-1,Atlantic/Cape_Verde">(GMT -1:00) Cape Verde Is.</option>
|
141
|
|
- <option value="-1,Atlantic/Azores">(GMT -1:00) Azores</option>
|
142
|
|
- <option value="0,Africa/Casablanca">(GMT) Casablanca, Monrovia</option>
|
143
|
|
- <option value="0,Europe/Dublin">(GMT) Greenwich Mean Time : Dublin, Edinburgh, London</option>
|
144
|
|
- <option value="1,Europe/Amsterdam">(GMT +1:00) Amsterdam, Berlin, Rome, Stockholm, Vienna</option>
|
145
|
|
- <option value="1,Europe/Prague">(GMT +1:00) Belgrade, Bratislava, Budapest, Prague</option>
|
146
|
|
- <option value="1,Europe/Paris">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
|
147
|
|
- <option value="1,Europe/Warsaw">(GMT +1:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
|
148
|
|
- <option value="1,Africa/Bangui">(GMT +1:00) West Central Africa</option>
|
149
|
|
- <option value="2,Europe/Istanbul">(GMT +2:00) Athens, Beirut, Bucharest, Cairo, Istanbul </option>
|
150
|
|
- <option value="2,Asia/Jerusalem">(GMT +2:00) Harare, Jerusalem, Pretoria</option>
|
151
|
|
- <option value="2,Europe/Kiev">(GMT +2:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius</option>
|
152
|
|
- <option value="3,Asia/Riyadh">(GMT +3:00) Kuwait, Nairobi, Riyadh</option>
|
153
|
|
- <option value="3,Europe/Moscow">(GMT +3:00) Baghdad, Moscow, St. Petersburg, Volgograd</option>
|
154
|
|
- <option value="3.50,Asia/Tehran">(GMT +3:30) Tehran</option>
|
155
|
|
- <option value="4,Asia/Muscat">(GMT +4:00) Abu Dhabi, Muscat</option>
|
156
|
|
- <option value="4,Asia/Baku">(GMT +4:00) Baku, Tbilsi, Yerevan</option>
|
157
|
|
- <option value="4.50,Asia/Kabul">(GMT +4:30) Kabul</option>
|
158
|
|
- <option value="5,Asia/Yekaterinburg">(GMT +5:00) Yekaterinburg</option>
|
159
|
|
- <option value="5,Asia/Karachi">(GMT +5:00) Islamabad, Karachi, Tashkent</option>
|
160
|
|
- <option value="5.50,Asia/Calcutta">(GMT +5:30) Chennai, Calcutta, Mumbai, New Delhi</option>
|
161
|
|
- <option value="5.75,Asia/Katmandu">(GMT +5:45) Katmandu</option>
|
162
|
|
- <option value="6,Asia/Almaty">(GMT +6:00) Almaty, Novosibirsk</option>
|
163
|
|
- <option value="6,Asia/Dhaka">(GMT +6:00) Astana, Dhaka, Sri Jayawardenepura</option>
|
164
|
|
- <option value="6.50,Asia/Rangoon">(GMT +6:30) Rangoon</option>
|
165
|
|
- <option value="7,Asia/Bangkok">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
|
166
|
|
- <option value="7,Asia/Krasnoyarsk">(GMT +7:00) Krasnoyarsk</option>
|
167
|
|
- <option value="8,Asia/Hong_Kong">(GMT +8:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
|
168
|
|
- <option value="8,Asia/Irkutsk">(GMT +8:00) Irkutsk, Ulaan Bataar</option>
|
169
|
|
- <option value="8,Asia/Singapore">(GMT +8:00) Kuala Lumpar, Perth, Singapore, Taipei</option>
|
170
|
|
- <option value="9,Asia/Tokyo">(GMT +9:00) Osaka, Sapporo, Tokyo</option>
|
171
|
|
- <option value="9,Asia/Seoul">(GMT +9:00) Seoul</option>
|
172
|
|
- <option value="9,Asia/Yakutsk">(GMT +9:00) Yakutsk</option>
|
173
|
|
- <option value="9.50,Australia/Adelaide">(GMT +9:30) Adelaide</option>
|
174
|
|
- <option value="9.50Australia/Darwin">(GMT +9:30) Darwin</option>
|
175
|
|
- <option value="10,Australia/Brisbane">(GMT +10:00) Brisbane, Guam, Port Moresby</option>
|
176
|
|
- <option value="10,Australia/Canberra">(GMT +10:00) Canberra, Hobart, Melbourne, Sydney</option>
|
177
|
|
- <option value="11,Asia/Magadan">(GMT +11:00) Magadan, Soloman Is., New Caledonia</option>
|
178
|
|
- <option value="12,Pacific/Auckland">(GMT +12:00) Auckland, Wellington</option>
|
179
|
|
- <option value="12,Pacific/Fiji">(GMT +12:00) Fiji, Kamchatka, Marshall Is.</option>
|
180
|
|
- </select>
|
181
|
|
- </li>
|
182
|
|
- </ul>
|
183
|
|
- </fieldset>
|
184
|
|
- <p>
|
185
|
|
- <input type="hidden" name="website" id="website" value="" />
|
186
|
|
- <input type="hidden" name="about" id="about" value="" />
|
187
|
|
- <input type="hidden" name="action" id="action" value="config" />
|
188
|
|
- <input type="submit" name="btnsubmit" id="btnsubmit" value="<< Install >>" class="submit"/>
|
189
|
|
- </p>
|
190
|
|
- </form>
|
191
|
|
- </div>
|
192
|
|
- <div class="footer-box"> </div>
|
193
|
|
- </div>
|
194
|
|
-
|
195
|
|
-<?php
|
196
|
|
- } else {
|
197
|
|
- echo "<p><em>Finished!</em></p>";
|
198
|
|
- echo "<p>Now you can <a href=\"login.php\" class=\"inslnl\">log in</a> with your <strong>username</strong> and <strong>password</strong></p>";
|
199
|
|
- }
|
200
|
|
-
|
201
|
|
-?>
|
202
|
|
- </div>
|
203
|
|
- <div id="foot">
|
204
|
|
- <a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
|
205
|
|
- </div>
|
206
|
|
-
|
207
|
|
-</div>
|
208
|
|
-</body>
|
209
|
|
-</html>
|