3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4 * Copyright (C) 2002-2007 The Nucleus Group
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 * (see nucleus/documentation/index.html#license for more info)
11 * This script will install the Nucleus tables in your SQL-database, and initialize the data in
14 * Below is a friendly way of letting users on non-php systems know that Nucleus won't run there.
15 * ?><div style="font-size: xx-large;">If you see this text in your browser when you open <i>install.php</i>, your web server is not able to run PHP-scripts, and therefor Nucleus will not be able to run there. </div><div style="display: none"><?php
19 * @license http://nucleuscms.org/license.txt GNU General Public License
20 * @copyright Copyright (C) 2002-2007 The Nucleus Group
21 * @version $Id: install.php,v 1.6 2007-04-25 06:34:13 kimitake Exp $
22 * $NucleusJP: install.php,v 1.5 2007/04/04 07:52:04 kimitake Exp $
26 This part of the install.php code allows for customization of the install process.
27 When distributing plugins or skins together with a Nucleus installation, the
28 configuration below will instruct to install them
30 -- Start Of Configurable Part --
33 // array with names of plugins to install. Plugin files must be present in the nucleus/plugin/
37 // array('NP_TrackBack', 'NP_MemberGoodies')
38 $aConfPlugsToInstall = array('NP_SkinFiles');
41 // array with skins to install. skins must be present under the skins/ directory with
42 // a subdirectory having the same name that contains a skinbackup.xml file
45 // array('base','rsd')
46 $aConfSkinsToImport = array('default');
49 -- End Of Configurable Part --
52 // don't give warnings for uninitialized vars
53 error_reporting(E_ERROR | E_WARNING | E_PARSE);
55 // make sure there's no unnecessary escaping:
56 set_magic_quotes_runtime(0);
58 // if there are some plugins or skins to import, do not include vars
59 // in globalfunctions.php again... so set a flag
60 if ((count($aConfPlugsToInstall) > 0) || (count($aConfSkinsToImport) > 0) ) {
62 $CONF['installscript'] = 1;
65 if (phpversion() >= '4.1.0') {
66 include_once('nucleus/libs/vars4.1.0.php');
68 include_once('nucleus/libs/vars4.0.6.php');
71 include_once('nucleus/libs/mysql.php');
73 // check if mysql support is installed
74 if (!function_exists('mysql_query') ) {
75 _doError('Your PHP version does not have support for MySQL :(');
78 if (postVar('action') == 'go') {
86 function showInstallForm() {
87 // 0. pre check if all necessary files exist
91 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
92 <html xmlns="http://www.w3.org/1999/xhtml">
94 <meta http-equiv="content-type" content="application/xhtml+xml; charset=EUC-JP" />
95 <title>Nucleus¤Î¥¤¥ó¥¹¥È¡¼¥ë</title>
96 <style type="text/css"><!--
97 @import url('nucleus/documentation/styles/manual.css');
99 <script type="text/javascript"><!--
102 // function to make sure the submit button only gets pressed once
103 function checkSubmit() {
104 if (submitcount == 0) {
114 <div style="text-align:center"><img src="./nucleus/styles/logo.gif" /></div> <!-- Nucleus logo -->
115 <form method="post" action="install.php">
117 <h1>Install Nucleus</h1>
119 <p>¤³¤Î¥¹¥¯¥ê¥×¥È¤ÏNucleus¤Î¥¤¥ó¥¹¥È¡¼¥ë¤ò¼ê½õ¤±¤·¤Þ¤¹¡£MySQL¥Æ¡¼¥Ö¥ë¤Î¥»¥Ã¥È¥¢¥Ã¥×¤È¡¢<i>config.php</i>¤ËÆþÎϤ¹¤ë¤¿¤á¤Î¾ðÊó¤òɽ¼¨¤·¤Þ¤¹¡Êconfig.php¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò0666¤Ë¤·¤Æ¤ª¤±¤Ð¡¢¸å¼Ô¤Îºî¶È¤Ï¼«Æ°Åª¤Ë¹Ô¤ï¤ì¤Þ¤¹¡Ë¡£¤³¤ì¤ò¤Ê¤¹°Ù¤Ë¡¢¤¤¤¯¤Ä¤«¤Î¾ðÊó¤òÆþÎϤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£</p>
121 <p>¤¹¤Ù¤Æ¤ÎÍó¤ÎÆþÎϤ¬É¬ÍפǤ¹¡£¥ª¥×¥·¥ç¥ó¾ðÊó¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤¬´°Î»¤·¤¿¤é¡¢Nucleus¤Î´ÉÍýÎΰ褫¤éÀßÄê²Äǽ¤Ç¤¹¡£</p>
123 <h1>PHP & MySQL Versions</h1>
125 <p>°Ê²¼¤Ï¤¢¤Ê¤¿¤Î¥¦¥§¥Ö¥Û¥¹¥È¤Ë¤ª¤±¤ëPHP¥¤¥ó¥¿¡¼¥×¥ê¥¿¡¼¤ÈMySQL¥µ¡¼¥Ð¡¼¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤¹¡£Nucleus¤Î¥µ¥Ý¡¼¥È¥Õ¥©¡¼¥é¥à¤ËÌäÂê¤òÊó¹ð¤¹¤ë¤È¤¤Ï¡¢¤³¤Î¾ðÊó¤ò½ñ¤Åº¤¨¤Æ¤¯¤À¤µ¤¤¡£</p>
132 $minVersion = '4.0.6';
134 if (phpversion() < $minVersion) {
135 echo ' <span class="warning">Ãí°Õ: Nucleus¤ÎÆ°ºî¤Ë¤Ï¾¯¤Ê¤¯¤È¤â¥Ð¡¼¥¸¥ç¥ó ',$minVersion,' ¤¬É¬ÍפȤµ¤ì¤Þ¤¹</span>';
143 // note: this piece of code is taken from phpMyAdmin
144 $result = @mysql_query('SELECT VERSION() AS version');
146 if ($result != FALSE && @mysql_num_rows($result) > 0) {
147 $row = mysql_fetch_array($result);
148 $match = explode('.', $row['version']);
150 $result = @mysql_query('SHOW VARIABLES LIKE \'version\'');
152 if ($result != FALSE && @mysql_num_rows($result) > 0) {
153 $row = mysql_fetch_row($result);
154 $match = explode('.', $row[1]);
162 if (!isset($match) || !isset($match[0]) ) {
166 if (!isset($match[1]) ) {
170 if (!isset($match[2]) ) {
174 if ($match[0] != '?') {
175 $match[0] = intval($match[0]);
176 $match[1] = intval($match[1]);
179 $mysqlVersion = implode($match, '.');
180 $minVersion = '3.23';
184 if ($mysqlVersion < $minVersion) {
185 echo ' <span class="warning">Ãí°Õ: Nucleus¤ÎÆ°ºî¤Ë¤Ï¾¯¤Ê¤¯¤È¤â¥Ð¡¼¥¸¥ç¥ó ',$minVersion,' ¤¬É¬ÍפȤµ¤ì¤Þ¤¹</span>';
193 // tell people how they can have their config file filled out automatically
194 if (@file_exists('config.php') && @!is_writable('config.php') ) {
197 <h1><i>config.php</i>¤Î¼«Æ°¥¢¥Ã¥×¥Ç¡¼¥È</h1>
199 <p>¤â¤·<em>config.php</em>¤ò¼«Æ°Åª¤Ë¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿¤¤¤Ê¤é¡¢½ñ¤¹þ¤ß²Äǽ¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£<em>config.php</em>¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò<strong>666</strong>¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£Nucleus¤Î¥¤¥ó¥¹¥È¡¼¥ëÀ®¸ù¸å¤Ë¡¢¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò<strong>444</strong>¤ËÌᤵ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡Ê<a href="nucleus/documentation/tips.html#filepermissions">¥Ñ¡¼¥ß¥Ã¥·¥ç¥óÊѹ¹¤Î´Ê°×¥¬¥¤¥É</a>¡Ë¡£</p>
201 <p>¤â¤·¥Õ¥¡¥¤¥ë¤Ë½ñ¤¹þ¤Þ¤Ê¤¤¤È¤¤¤¦ÁªÂò¤ò¤·¤¿¡Ê¤¢¤ë¤¤¤Ï¹Ô¤¨¤Ê¤¤¡Ë¾ì¹ç¡§¤´¿´Çۤʤ¯¡£¥¤¥ó¥¹¥È¡¼¥ë¤Î²áÄø¤Ç<em>config.php</em>¤ÎÃæ¿È¤¬Ä󶡤µ¤ì¤Þ¤¹¡£¤Ç¤¹¤«¤é¡¢¤½¤ì¤ò¤´¼«¿È¤Ç¥¢¥Ã¥×¥í¡¼¥É¤·¤Æ¤¯¤À¤µ¤¤¡£</p>
205 <h1>MySQL¤Î¥í¥°¥¤¥ó¥Ç¡¼¥¿</h1>
207 <p>MySQL¤Î¥Ç¡¼¥¿¤ò°Ê²¼¤ËÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤é¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥Æ¡¼¥Ö¥ë¤òºîÀ®¤·¾ðÊó¤òÆþÎϤ¹¤ë¤¿¤á¤ËɬÍפʤâ¤Î¤Ç¤¹¡£¸å¤Ç¡¢<i>config.php</i>¤Ë¤âµÆþ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡Ê¾åµ¤Î¼«Æ°¥¢¥Ã¥×¥Ç¡¼¥È¤òÍøÍѤ¹¤ë¾ì¹ç¡¢¤½¤Î¼ê½ç¤Ï¾Êά¤µ¤ì¤Þ¤¹¡Ë¡£</p>
209 <p>¤â¤·¤³¤Î¾ðÊ󤬤狼¤é¤Ê¤±¤ì¤Ð¡¢¥·¥¹¥Æ¥à´ÉÍý¼Ô¤«¥Û¥¹¥Æ¥£¥ó¥°¸µ¤ËÏ¢Íí¤ò¤È¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤Û¤È¤ó¤É¤Î¾ì¹ç¡¢¥Û¥¹¥È̾¤Ï'localhost'¤Ç¤¹¡£¤â¤·Nucleus¤¬¤¢¤Ê¤¿¤Î¥µ¡¼¥Ð¤ÎPHPÀßÄ꤫¤é'default MySQL host'¤ò¸¡ÃΤ·¤¿¤Ê¤é¡¢'¥Û¥¹¥È̾'¤Ë´û¤ËµÆþ¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£¤â¤Ã¤È¤â¡¢¤³¤Î¾ðÊó¤¬Àµ³Î¤Ç¤¢¤ë¤È¤¤¤¦ÊݾڤϤ¢¤ê¤Þ¤»¤ó¡£</p>
212 <legend>´ðËܤΥǡ¼¥¿¥Ù¡¼¥¹ÀßÄê</legend>
216 <td><input name="mySQL_host" value="<?php echo htmlspecialchars(@ini_get('mysql.default_host') )?>" /></td>
219 <td>¥æ¡¼¥¶¡¼Ì¾¡§</td>
220 <td><input name="mySQL_user" /></td>
223 <td>¥Ñ¥¹¥ï¡¼¥É¡§</td>
224 <td><input name="mySQL_password" type="password" /></td>
227 <td>¥Ç¡¼¥¿¥Ù¡¼¥¹Ì¾¡§</td>
228 <td><input name="mySQL_database" /> (<input name="mySQL_create" value="1" type="checkbox" id="mySQL_create"><label for="mySQL_create" />¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ë</label>)</td>
234 <legend>¹âÅù¤Ê¥Ç¡¼¥¿¥Ù¡¼¥¹ÀßÄê</legend>
237 <td><input name="mySQL_usePrefix" value="1" type="checkbox" id="mySQL_usePrefix"><label for="mySQL_usePrefix" />¥Æ¡¼¥Ö¥ë¡¦¥×¥ê¥Õ¥£¥Ã¥¯¥¹¤òÍøÍÑ</label></td>
238 <td><input name="mySQL_tablePrefix" value="" /></td>
242 <p>°ì¤Ä¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÊ£¿ô¤ÎNucleus¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤ª¤ê¡¢¼«Ê¬¤¬²¿¤ò¤ä¤Ã¤Æ¤¤¤ë¤Î¤«Íý²ò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤ò½ü¤¤¤Æ¤Ï¡¢<strong>¤³¤ì¤òÊѹ¹¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó</strong>¡£</p>
243 <p>Nucleus¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥Æ¡¼¥Ö¥ë¤Ï¡¢¤³¤Î¥×¥ê¥Õ¥£¥Ã¥¯¥¹¤¬Æ¬¤Ë¤Ä¤¤Þ¤¹¡£</p>
246 <h1>¥Ç¥£¥ì¥¯¥È¥ê¤ÈURL</h1>
248 <p>¤³¤Î¥¤¥ó¥¹¥È¡¼¥ë¥¹¥¯¥ê¥×¥È¤ÏNucleus¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ÈURL¤ò¸«¤Ä¤±¤è¤¦¤È¤·¤Þ¤·¤¿¡£²¼¤ÎÃͤò¥Á¥§¥Ã¥¯¤·¤ÆɬÍפʤéÄûÀµ¤·¤Æ¤¯¤À¤µ¤¤¡£¥Õ¥¡¥¤¥ë¤Ø¤Î¥Ñ¥¹¤ÈURL¤Ï¥¹¥é¥Ã¥·¥å'/'¤Ç½ª¤ï¤é¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£</p>
252 // no need to this all! dirname(__FILE__) is all we need -- moraes
254 // discover full path
255 $fullPath = serverVar('PATH_TRANSLATED');
257 if ($fullPath == '') {
258 $fullPath = serverVar('SCRIPT_FILENAME');
261 $basePath = str_replace('install.php', '', $fullPath);
262 $basePath = replaceDoubleBackslash($basePath);
263 $basePath = replaceDoubleBackslash($basePath);
265 // add slash at end if necessary
266 if (!endsWithSlash($basePath) ) {
271 $basePath = dirname(__FILE__) . '/';
275 <legend>URLs and directories</legend>
278 <td>Site <strong>URL</strong>:</td>
279 <td><input name="IndexURL" size="60" value="<?php
280 $url = 'http://' . serverVar('HTTP_HOST') . serverVar('PHP_SELF');
281 $url = str_replace('install.php', '', $url);
282 $url = replaceDoubleBackslash($url);
284 // add slash at end if necessary
285 if (!endsWithSlash($url) ) {
289 echo $url; ?>" /></td>
292 <td>Admin-area <strong>URL</strong>:</td>
293 <td><input name="AdminURL" size="60" value="<?php
295 echo $url, 'nucleus/';
299 <td>Admin-area <strong>path</strong>:</td>
300 <td><input name="AdminPath" size="60" value="<?php
302 echo $basePath, 'nucleus/';
306 <td>Media files <strong>URL</strong>:</td>
307 <td><input name="MediaURL" size="60" value="<?php
313 <td>Media directory <strong>path</strong>:</td>
314 <td><input name="MediaPath" size="60" value="<?php
316 echo $basePath, 'media/';
320 <td>Extra skin files <strong>URL</strong>:</td>
321 <td><input name="SkinsURL" size="60" value="<?php
325 <br />(¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤¿¥¹¥¥ó¤¬»ÈÍÑ)
329 <td>Extra skin files directory <strong>path</strong>:</td>
330 <td><input name="SkinsPath" size="60" value="<?php
332 echo $basePath, 'skins/';
334 <br />(¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤¿¥¹¥¥ó¤Î¥Õ¥¡¥¤¥ëÎà¤òÃÖ¤¯¾ì½ê)
338 <td>Plugin files <strong>URL</strong>:</td>
339 <td><input name="PluginURL" size="60" value="<?php
341 echo $url, 'nucleus/plugins/';
345 <td>Action <strong>URL</strong>:</td>
346 <td><input name="ActionURL" size="60" value="<?php
348 echo $url, 'action.php';
350 <br />(<tt>action.php</tt>¤Ø¤Îhttp://¤«¤é»Ï¤Þ¤ëURL)
356 <p class="note"><strong>ÉÕµ:</strong> ÁêÂХѥ¹¤Ç¤Ï¤Ê¤¯<strong>ÀäÂХѥ¹¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤</strong>¡£Ä̾ÀäÂХѥ¹¤Ï<tt>/home/username/public_html/</tt>¤Î¤è¤¦¤Ê·Á¤ò¤È¤ê¤Þ¤¹¡£Unix¥·¥¹¥Æ¥à¡Ê¤Û¤È¤ó¤É¤Î¥µ¡¼¥Ð¡¼¤¬¤½¤¦¤Ç¤¹¡Ë¤Ë¤ª¤¤¤Æ¡¢¥Ñ¥¹¤Ï¥¹¥é¥Ã¥·¥å¤«¤é»Ï¤Þ¤ê¤Þ¤¹¡£¤â¤·¤³¤ì¤é¤Î¾ðÊóÆþÎϤËÌäÂ꤬À¸¤¸¤¿¤é¡¢¤¢¤Ê¤¿¤Î¥µ¡¼¥Ð´ÉÍý¼Ô¤Ë¤¿¤º¤Í¤ë¤Ù¤¤Ç¤¹¡£</p>
358 <h1>´ÉÍý¸¢¸Â¤ò¤â¤Ä¥æ¡¼¥¶¡¼</h1>
360 <p>°Ê²¼¤Ë¡¢¥µ¥¤¥È¤ÎºÇ½é¤Î¥æ¡¼¥¶¡¼¤òºîÀ®¤¹¤ë¤¿¤á¤Î¤¤¤¯¤Ä¤«¤Î¾ðÊó¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£</p>
363 <legend>´ÉÍý¸¢¸Â¤ò»ý¤Ä¥æ¡¼¥¶¡¼</legend>
366 <td>ɽ¼¨¤µ¤ì¤ë̾Á°¡§</td>
367 <td><input name="User_name" value="" /> <small>(µö²Ä¤µ¤ì¤ëʸ»ú¡§a-z ¤È 0-9¡¢ºÇ½é¤ÈºÇ¸å°Ê³°¤Î¥¹¥Ú¡¼¥¹)</small></td>
370 <td>ËÜ̾¡Ê¥Ï¥ó¥É¥ë̾¡Ë¡§</td>
371 <td><input name="User_realname" value="" /></td>
374 <td>¥Ñ¥¹¥ï¡¼¥É¡§</td>
375 <td><input name="User_password" type="password" value="" /></td>
378 <td>¥Ñ¥¹¥ï¡¼¥É¤Î³Îǧ¡§</td>
379 <td><input name="User_password2" type="password" value="" /></td>
382 <td>¥á¡¼¥ë¥¢¥É¥ì¥¹¡§</td>
383 <td><input name="User_email" value="" /> <small>(ÍøÍѲÄǽ¤Ê¥á¡¼¥ë¥¢¥É¥ì¥¹¤òÆþ¤ì¤Æ¤¯¤À¤µ¤¤)</small></td>
388 <h1>¥¦¥§¥Ö¥í¥°¤Î¥Ç¡¼¥¿</h1>
390 <p>°Ê²¼¤Ë¡¢¥Ç¥Õ¥©¥ë¥È¤Îweblog¤òºîÀ®¤¹¤ë¤¿¤á¤Ë¤¤¤¯¤Ä¤«¤Î¾ðÊó¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Îweblog¤Î̾Á°¤Ï¡¢¥µ¥¤¥È̾¤È¤·¤Æ¤âÍøÍѤµ¤ì¤Þ¤¹¡£</p>
393 <legend>¥¦¥§¥Ö¥í¥°¤Î¥Ç¡¼¥¿</legend>
397 <td><input name="Blog_name" size="60" value="My Nucleus CMS" /></td>
400 <td>Blog¤Îû½Ì̾¡§</td>
401 <td><input name="Blog_shortname" value="mynucleuscms" /> <small>(µö²Ä¤µ¤ì¤ëʸ»ú¡§a-z ¤È 0-9¡¢¥¹¥Ú¡¼¥¹¤ÏÉÔ²Ä)</small></td>
406 <h1>¥Ç¡¼¥¿¤ÎÁ÷¿®</h1>
408 <p>¾å¤Ë½ñ¤¤¤Æ¤¤¿¥Ç¡¼¥¿¤¬Àµ¤·¤¤¤«³Î¤«¤á¤Æ¤¯¤À¤µ¤¤¡£¤è¤±¤ì¤Ð¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥Æ¡¼¥Ö¥ë¤ÈºÇ½é¤Î¥Ç¡¼¥¿¤òÀßÄꤹ¤ë¤¿¤á¤Ë²¼¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£¾¯¤·»þ´Ö¤¬¤«¤«¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¤´¿ÉÊú¤ò¡£<b>¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤Î¤Ï°ì²ó¤À¤±¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£</b></p>
410 <p><input name="action" value="go" type="hidden" /> <input type="submit" value="Nucleus CMS¤Î¥¤¥ó¥¹¥È¡¼¥ë" onclick="return checkSubmit();" /></p>
418 function tableName($unPrefixed) {
419 global $mysql_usePrefix, $mysql_prefix;
421 if ($mysql_usePrefix == 1) {
422 return $mysql_prefix . $unPrefixed;
428 function doInstall() {
429 global $mysql_usePrefix, $mysql_prefix;
431 // 0. put all POST-vars into vars
432 $mysql_host = postVar('mySQL_host');
433 $mysql_user = postVar('mySQL_user');
434 $mysql_password = postVar('mySQL_password');
435 $mysql_database = postVar('mySQL_database');
436 $mysql_create = postVar('mySQL_create');
437 $mysql_usePrefix = postVar('mySQL_usePrefix');
438 $mysql_prefix = postVar('mySQL_tablePrefix');
439 $config_indexurl = postVar('IndexURL');
440 $config_adminurl = postVar('AdminURL');
441 $config_adminpath = postVar('AdminPath');
442 $config_mediaurl = postVar('MediaURL');
443 $config_skinsurl = postVar('SkinsURL');
444 $config_pluginurl = postVar('PluginURL');
445 $config_actionurl = postVar('ActionURL');
446 $config_mediapath = postVar('MediaPath');
447 $config_skinspath = postVar('SkinsPath');
448 $user_name = postVar('User_name');
449 $user_realname = postVar('User_realname');
450 $user_password = postVar('User_password');
451 $user_password2 = postVar('User_password2');
452 $user_email = postVar('User_email');
453 $blog_name = postVar('Blog_name');
454 $blog_shortname = postVar('Blog_shortname');
455 $config_adminemail = $user_email;
456 $config_sitename = $blog_name;
458 $config_indexurl = replaceDoubleBackslash($config_indexurl);
459 $config_adminurl = replaceDoubleBackslash($config_adminurl);
460 $config_mediaurl = replaceDoubleBackslash($config_mediaurl);
461 $config_skinsurl = replaceDoubleBackslash($config_skinsurl);
462 $config_pluginurl = replaceDoubleBackslash($config_pluginurl);
463 $config_actionurl = replaceDoubleBackslash($config_actionurl);
464 $config_adminpath = replaceDoubleBackslash($config_adminpath);
465 $config_skinspath = replaceDoubleBackslash($config_skinspath);
466 $config_mediapath = replaceDoubleBackslash($config_mediapath);
468 // 1. check all the data
471 if (!$mysql_database) {
472 array_push($errors, 'mySQL database name missing');
475 if (($mysql_usePrefix == 1) && (strlen($mysql_prefix) == 0) ) {
476 array_push($errors, 'mySQL prefix was selected, but prefix is empty');
479 if (($mysql_usePrefix == 1) && (!eregi('^[a-zA-Z0-9_]+$', $mysql_prefix) ) ) {
480 array_push($errors, 'mySQL prefix should only contain characters from the ranges A-Z, a-z, 0-9 or underscores');
483 // TODO: add action.php check
484 if (!endsWithSlash($config_indexurl) || !endsWithSlash($config_adminurl) || !endsWithSlash($config_mediaurl) || !endsWithSlash($config_pluginurl) || !endsWithSlash($config_skinsurl) ) {
485 array_push($errors, 'One of the URLs does not end with a slash, or action url does not end with \'action.php\'');
488 if (!endsWithSlash($config_adminpath) ) {
489 array_push($errors, 'The path of the administration area does not end with a slash');
492 if (!endsWithSlash($config_mediapath) ) {
493 array_push($errors, 'The media path does not end with a slash');
496 if (!endsWithSlash($config_skinspath) ) {
497 array_push($errors, 'The skins path does not end with a slash');
500 if (!is_dir($config_adminpath) ) {
501 array_push($errors, 'The path of the administration area does not exist on your server');
504 if (!_isValidMailAddress($user_email) ) {
505 array_push($errors, 'Invalid e-mail address given for user');
508 if (!_isValidDisplayName($user_name) ) {
509 array_push($errors, 'User name is not a valid display name (allowed chars: a-zA-Z0-9 and spaces)');
512 if (!$user_password || !$user_password2) {
513 array_push($errors, 'User password is empty');
516 if ($user_password != $user_password2) {
517 array_push($errors, 'User password do not match');
520 if (!_isValidShortName($blog_shortname) ) {
521 array_push($errors, 'Invalid short name given for blog (allowed chars: a-z0-9, no spaces)');
524 if (sizeof($errors) > 0) {
525 showErrorMessages($errors);
528 // 2. try to log in to mySQL
530 $MYSQL_CONN = @mysql_connect($mysql_host, $mysql_user, $mysql_password);
532 if ($MYSQL_CONN == false) {
533 _doError('Could not connect to mySQL server: ' . mysql_error() );
536 // 3. try to create database (if needed)
537 if ($mysql_create == 1) {
538 mysql_query('CREATE DATABASE ' . $mysql_database) or _doError('Could not create database. Make sure you have the rights to do so. SQL error was: ' . mysql_error() );
541 // 4. try to select database
542 mysql_select_db($mysql_database) or _doError('Could not select database. Make sure it exists');
544 // 5. execute queries
545 $filename = 'install.sql';
546 $fd = fopen($filename, 'r');
547 $queries = fread($fd, filesize($filename) );
550 $queries = split("(;\n|;\r)", $queries);
552 $aTableNames = array(
566 'nucleus_activation',
569 // these are unneeded (one of the replacements above takes care of them)
570 // 'nucleus_plugin_event',
571 // 'nucleus_plugin_option',
572 // 'nucleus_plugin_option_desc',
573 // 'nucleus_skin_desc',
574 // 'nucleus_template_desc',
576 $aTableNamesPrefixed = array(
577 $mysql_prefix . 'nucleus_actionlog',
578 $mysql_prefix . 'nucleus_ban',
579 $mysql_prefix . 'nucleus_blog',
580 $mysql_prefix . 'nucleus_category',
581 $mysql_prefix . 'nucleus_comment',
582 $mysql_prefix . 'nucleus_config',
583 $mysql_prefix . 'nucleus_item',
584 $mysql_prefix . 'nucleus_karma',
585 $mysql_prefix . 'nucleus_member',
586 $mysql_prefix . 'nucleus_plugin',
587 $mysql_prefix . 'nucleus_skin',
588 $mysql_prefix . 'nucleus_template',
589 $mysql_prefix . 'nucleus_team',
590 $mysql_prefix . 'nucleus_activation',
591 $mysql_prefix . 'nucleus_tickets'
593 // these are unneeded (one of the replacements above takes care of them)
594 // $mysql_prefix . 'nucleus_plugin_event',
595 // $mysql_prefix . 'nucleus_plugin_option',
596 // $mysql_prefix . 'nucleus_plugin_option_desc',
597 // $mysql_prefix . 'nucleus_skin_desc',
598 // $mysql_prefix . 'nucleus_template_desc',
600 $count = count($queries);
602 for ($idx = 0; $idx < $count; $idx++) {
603 $query = trim($queries[$idx]);
604 // echo "QUERY = <small>" . htmlspecialchars($query) . "</small><p>";
608 if ($mysql_usePrefix == 1) {
609 $query = str_replace($aTableNames, $aTableNamesPrefixed, $query);
612 mysql_query($query) or _doError('Error while executing query (<small>' . htmlspecialchars($query) . '</small>): ' . mysql_error() );
616 // 6. update global settings
617 updateConfig('IndexURL', $config_indexurl);
618 updateConfig('AdminURL', $config_adminurl);
619 updateConfig('MediaURL', $config_mediaurl);
620 updateConfig('SkinsURL', $config_skinsurl);
621 updateConfig('PluginURL', $config_pluginurl);
622 updateConfig('ActionURL', $config_actionurl);
623 updateConfig('AdminEmail', $config_adminemail);
624 updateConfig('SiteName', $config_sitename);
626 // 7. update GOD member
627 $query = 'UPDATE ' . tableName('nucleus_member')
628 . " SET mname='" . addslashes($user_name) . "',"
629 . " mrealname='" . addslashes($user_realname) . "',"
630 . " mpassword='" . md5(addslashes($user_password) ) . "',"
631 . " murl='" . addslashes($config_indexurl) . "',"
632 . " memail='" . addslashes($user_email) . "',"
633 . " madmin=1, mcanlogin=1"
634 . " WHERE mnumber=1";
636 mysql_query($query) or _doError('Error while setting member settings: ' . mysql_error() );
638 // 8. update weblog settings
639 $query = 'UPDATE ' . tableName('nucleus_blog')
640 . " SET bname='" . addslashes($blog_name) . "',"
641 . " bshortname='" . addslashes($blog_shortname) . "',"
642 . " burl='" . addslashes($config_indexurl) . "'"
643 . " WHERE bnumber=1";
645 mysql_query($query) or _doError('Error while setting weblog settings: ' . mysql_error() );
647 // 9. update item date
648 $query = 'UPDATE ' . tableName('nucleus_item')
649 . " SET itime='" . date('Y-m-d H:i:s', time() ) ."'"
650 . " WHERE inumber=1";
652 mysql_query($query) or _doError('Error with query: ' . mysql_error() );
654 global $aConfPlugsToInstall, $aConfSkinsToImport;
655 $aSkinErrors = array();
656 $aPlugErrors = array();
658 if ((count($aConfPlugsToInstall) > 0) || (count($aConfSkinsToImport) > 0) ) {
659 // 10. set global variables
660 global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_PREFIX;
662 $MYSQL_HOST = $mysql_host;
663 $MYSQL_USER = $mysql_user;
664 $MYSQL_PASSWORD = $mysql_password;
665 $MYSQL_DATABASE = $mysql_database;
666 $MYSQL_PREFIX = ($mysql_usePrefix == 1)?$mysql_prefix:'';
668 global $DIR_NUCLEUS, $DIR_MEDIA, $DIR_SKINS, $DIR_PLUGINS, $DIR_LANG, $DIR_LIBS;
670 $DIR_NUCLEUS = $config_adminpath;
671 $DIR_MEDIA = $config_mediapath;
672 $DIR_SKINS = $config_skinspath;
673 $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/';
674 $DIR_LANG = $DIR_NUCLEUS . 'language/';
675 $DIR_LIBS = $DIR_NUCLEUS . 'libs/';
677 // close database connection (needs to be closed if we want to include globalfunctions.php)
681 include_once($DIR_LIBS . 'globalfunctions.php');
683 // 11. install custom skins
684 $aSkinErrors = installCustomSkins($manager);
686 // 12. install custom plugins
687 $aPlugErrors = installCustomPlugs($manager);
690 // 12. Write config file ourselves (if possible)
693 if (@file_exists('config.php') && is_writable('config.php') && $fp = @fopen('config.php', 'w') ) {
694 $config_data = '<' . '?php' . "\n\n";
695 //$config_data .= "\n"; (extraneous, just added extra \n to previous line
696 $config_data .= " // mySQL connection information\n";
697 $config_data .= " \$MYSQL_HOST = '" . $mysql_host . "';\n";
698 $config_data .= " \$MYSQL_USER = '" . $mysql_user . "';\n";
699 $config_data .= " \$MYSQL_PASSWORD = '" . $mysql_password . "';\n";
700 $config_data .= " \$MYSQL_DATABASE = '" . $mysql_database . "';\n";
701 $config_data .= " \$MYSQL_PREFIX = '" . (($mysql_usePrefix == 1)?$mysql_prefix:'') . "';\n";
702 $config_data .= "\n";
703 $config_data .= " // main nucleus directory\n";
704 $config_data .= " \$DIR_NUCLEUS = '" . $config_adminpath . "';\n";
705 $config_data .= "\n";
706 $config_data .= " // path to media dir\n";
707 $config_data .= " \$DIR_MEDIA = '" . $config_mediapath . "';\n";
708 $config_data .= "\n";
709 $config_data .= " // extra skin files for imported skins\n";
710 $config_data .= " \$DIR_SKINS = '" . $config_skinspath . "';\n";
711 $config_data .= "\n";
712 $config_data .= " // these dirs are normally sub dirs of the nucleus dir, but \n";
713 $config_data .= " // you can redefine them if you wish\n";
714 $config_data .= " \$DIR_PLUGINS = \$DIR_NUCLEUS . 'plugins/';\n";
715 $config_data .= " \$DIR_LANG = \$DIR_NUCLEUS . 'language/';\n";
716 $config_data .= " \$DIR_LIBS = \$DIR_NUCLEUS . 'libs/';\n";
717 $config_data .= "\n";
718 $config_data .= " // include libs\n";
719 $config_data .= " include(\$DIR_LIBS.'globalfunctions.php');\n";
720 $config_data .= " if (!extension_loaded('mbstring')) {\n";
721 $config_data .= " include(\$DIR_LIBS.'mb_emulator/mb-emulator.php');\n";
722 $config_data .= " }\n";
723 $config_data .= "?" . ">";
725 $result = @fputs($fp, $config_data, strlen($config_data) );
734 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
735 <html xmlns="http://www.w3.org/1999/xhtml">
737 <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
738 <title>Nucleus¤Î¥¤¥ó¥¹¥È¡¼¥ë</title>
739 <style>@import url('nucleus/styles/manual.css');</style>
742 <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo -->
745 $aAllErrors = array_merge($aSkinErrors, $aPlugErrors);
747 if (count($aAllErrors) > 0) {
748 echo '<h1>Skin/Plugin Install errors</h1>';
749 echo '<ul><li>' . implode('</li><li>', $aAllErrors) . '</li></ul>';
752 if (!$bConfigWritten) { ?>
753 <h1>¥¤¥ó¥¹¥È¡¼¥ë¤Ï¤Û¤Ü´°Î»¤·¤Þ¤·¤¿¡ª</h1>
755 <p>¥Ç¡¼¥¿¥Ù¡¼¥¹¥Æ¡¼¥Ö¥ë¤Î½é´üÃÍÆþÎϤ¬À®¸ù¤·¤Þ¤·¤¿¡£¸å¤Ï<i>config.php</i>¤ò½ñ¤´¹¤¨¤ë¤À¤±¤Ç¤¹¡£°Ê²¼¤Ë½ñ¤´¹¤¨¤ë¤Ù¤ÆâÍƤòɽ¼¨¤·¤Þ¤¹¡Êmysql¤Î¥Ñ¥¹¥ï¡¼¥É¤Ï¥Þ¥¹¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤³¤Ï¼ÂºÝ¤Î¤â¤Î¤Ë½ñ¤´¹¤¨¤Æ¤¯¤À¤µ¤¤¡Ë</p>
758 // mySQL connection information
759 $MYSQL_HOST = '<b><?php echo $mysql_host?></b>';
760 $MYSQL_USER = '<b><?php echo $mysql_user?></b>';
761 $MYSQL_PASSWORD = '<i><b>xxxxxxxxxxx</b></i>';
762 $MYSQL_DATABASE = '<b><?php echo $mysql_database?></b>';
763 $MYSQL_PREFIX = '<b><?php echo ($mysql_usePrefix == 1)?$mysql_prefix:''?></b>';
765 // main nucleus directory
766 $DIR_NUCLEUS = '<b><?php echo $config_adminpath?></b>';
769 $DIR_MEDIA = '<b><?php echo $config_mediapath?></b>';
771 // extra skin files for imported skins
772 $DIR_SKINS = '<b><?php echo $config_skinspath?></b>';
774 // these dirs are normally sub dirs of the nucleus dir, but
775 // you can redefine them if you wish
776 $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/';
777 $DIR_LANG = $DIR_NUCLEUS . 'language/';
778 $DIR_LIBS = $DIR_NUCLEUS . 'libs/';
781 include($DIR_LIBS.'globalfunctions.php');
782 if (!extension_loaded('mbstring')) {
783 include($DIR_LIBS.'mb_emulator/mb-emulator.php');
787 <p>¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤Î¥Õ¥¡¥¤¥ë¤ò½ñ¤´¹¤¨¤¿¤é¡¢FTP¤ò»È¤Ã¤Æ¥¦¥§¥Ö¥µ¡¼¥Ð¤Ë¥¢¥Ã¥×¥í¡¼¥É¤·¤Æ¤¯¤À¤µ¤¤¡£ASCII¥â¡¼¥É¤ÇÁ÷¿®¤·¤Æ¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤¤·¤Þ¤¹¡£</p>
790 <b>ÉÕµ:</b> <i>config.php</i>¤ÎºÇ½é¤ä½ª¤ï¤ê¤Ë¥¹¥Ú¡¼¥¹¤ò¶õ¤±¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤·¤ç¤¦¡£¼Â¹Ô»þ¤Ë¥¨¥é¡¼¤ò°ú¤µ¯¤³¤¹¸¶°ø¤È¤Ê¤ê¤Þ¤¹¡£<br />
791 ¤·¤¿¤¬¤Ã¤Æ¡¢config.php¤ÎºÇ½é¤Îʸ»ú¤Ï "<"¤ÇºÇ¸å¤Îʸ»ú¤Ï">"¤È¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
796 <h1>¥¤¥ó¥¹¥È¡¼¥ë¤Ï´°Î»¤·¤Þ¤·¤¿¡ª</h1>
798 <p>Nucleus¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¡¢<code>config.php</code>¤Ï¥¢¥Ã¥×¥Ç¡¼¥È¤µ¤ì¤Þ¤·¤¿¡£</p>
800 <p>¥»¥¥å¥ê¥Æ¥£¤Î¤¿¤á<code>config.php</code>¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò444¤ËÌ᤹¤³¤È¤ò˺¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤(<a href="nucleus/documentation/tips.html#filepermissions">¥Ñ¡¼¥ß¥Ã¥·¥ç¥óÊѹ¹¤Î´Ê°×¥¬¥¤¥É</a>)¡£</p>
804 <h1>¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥¡¥¤¥ë¤Îºï½ü</h1>
806 <p>¥¦¥§¥Ö¥µ¡¼¥Ð¤«¤é¼¡¤Î¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤Æ¤¯¤À¤µ¤¤¡§</p>
809 <li><b>install.sql</b>¡§¥Æ¡¼¥Ö¥ë¤Î¹½Â¤¤òÆâÊñ¤¹¤ë¥Õ¥¡¥¤¥ë</li>
810 <li><b>install.php</b>¡§¤³¤Î¥Õ¥¡¥¤¥ë</li>
813 <p>¤â¤·¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢´ÉÍýÎΰè¤ò³«¤¯¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¡£</p>
815 <h1>¥¦¥§¥Ö¥µ¥¤¥È¤Î³Îǧ</h1>
817 <p>¥¦¥§¥Ö¥µ¥¤¥È¤ò»È¤¦½àÈ÷¤¬À°¤¤¤Þ¤·¤¿¡£
819 <li><a href="<?php echo $config_adminurl?>">´ÉÍýÎΰè¤Ë¥í¥°¥¤¥ó¤·¤Æ¥µ¥¤¥È¤ÎÀßÄê¤ò¹Ô¤¦</a></li>
820 <li><a href="<?php echo $config_indexurl?>">¤¹¤°¤Ë¥µ¥¤¥È¤Ø¹Ô¤Ã¤Æ¤ß¤ë</a></li>
830 function installCustomPlugs(&$manager) {
831 global $aConfPlugsToInstall, $DIR_LIBS;
835 if (count($aConfPlugsToInstall) == 0) {
839 $res = sql_query('SELECT * FROM ' . sql_table('plugin') );
840 $numCurrent = mysql_num_rows($res);
842 foreach ($aConfPlugsToInstall as $plugName) {
843 // do this before calling getPlugin (in case the plugin id is used there)
844 $query = 'INSERT INTO ' . sql_table('plugin') . ' (porder, pfile) VALUES (' . (++$numCurrent) . ', "' . addslashes($plugName) . '")';
847 // get and install the plugin
848 $plugin =& $manager->getPlugin($plugName);
851 sql_query('DELETE FROM ' . sql_table('plugin') . ' WHERE pfile=\'' . addslashes($plugName) . '\'');
853 array_push($aErrors, 'Unable to install plugin ' . $plugName);
860 // SYNC PLUGIN EVENT LIST
861 sql_query('DELETE FROM ' . sql_table('plugin_event') );
863 // loop over all installed plugins
864 $res = sql_query('SELECT pid, pfile FROM ' . sql_table('plugin') );
866 while($o = mysql_fetch_object($res) ) {
868 $plug =& $manager->getPlugin($o->pfile);
871 $eventList = $plug->getEventList();
873 foreach ($eventList as $eventName) {
874 sql_query('INSERT INTO ' . sql_table('plugin_event') . ' (pid, event) VALUES (' . $pid . ', \'' . $eventName . '\')');
882 function installCustomSkins(&$manager) {
883 global $aConfSkinsToImport, $DIR_LIBS, $DIR_SKINS;
887 if (count($aConfSkinsToImport) == 0) {
892 include_once($DIR_LIBS . 'skinie.php');
894 $importer = new SKINIMPORT();
896 foreach ($aConfSkinsToImport as $skinName) {
898 $skinFile = $DIR_SKINS . $skinName . '/skinbackup.xml';
900 if (!@file_exists($skinFile) ) {
901 array_push($aErrors, 'Unable to import ' . $skinFile . ' : file does not exist');
905 $error = $importer->readFile($skinFile);
908 array_push($aErrors, 'Unable to import ' . $skinName . ' : ' . $error);
912 $error = $importer->writeToDatabase(1);
915 array_push($aErrors, 'Unable to import ' . $skinName . ' : ' . $error);
923 // give an error if one or more nucleus are not accessible
924 function doCheckFiles() {
925 $missingfiles = array();
931 'nucleus/libs/globalfunctions.php',
932 'nucleus/libs/ADMIN.php',
933 'nucleus/libs/BLOG.php',
934 'nucleus/libs/COMMENT.php',
935 'nucleus/libs/COMMENTS.php',
936 'nucleus/libs/ITEM.php',
937 'nucleus/libs/MEMBER.php',
938 'nucleus/libs/SKIN.php',
939 'nucleus/libs/TEMPLATE.php',
940 'nucleus/libs/MEDIA.php',
941 'nucleus/libs/ACTIONLOG.php',
945 $count = count($files);
947 for ($i = 0; $i < $count; $i++) {
948 if (!is_readable($files[$i]) ) {
949 array_push($missingfiles, 'File <b>' . $files[$i] . '</b> is missing or not readable.');
953 // The above code replaces several if statements of the form:
955 // if (!is_readable('install.sql') ) {
956 // array_push($missingfiles, 'File <b>install.sql</b> is missing or not readable');
959 if (count($missingfiles) > 0) {
960 showErrorMessages($missingfiles);
964 function updateConfig($name, $val) {
965 $name = addslashes($name);
966 $val = trim(addslashes($val) );
968 $query = 'UPDATE ' . tableName('nucleus_config')
969 . " SET value='$val'"
970 . " WHERE name='$name'";
972 mysql_query($query) or _doError('Query error while trying to update config: ' . mysql_error() );
973 return mysql_insert_id();
976 function replaceDoubleBackslash($input) {
977 return str_replace('\\', '/', $input);
980 function endsWithSlash($s) {
981 return (strrpos($s, '/') == strlen($s) - 1);
985 * Checks if email address is valid
987 function _isValidMailAddress($address) {
988 if (preg_match("/^[a-zA-Z0-9\._-]+@+[A-Za-z0-9\._-]+\.+[A-Za-z]{2,4}$/", $address) ) {
995 // returns true if the given string is a valid shortname
996 // (to check short blog names and nicknames)
997 // logic: starts and ends with a non space, can contain spaces in between
999 function _isValidShortName($name) {
1000 if (eregi("^[a-z0-9]+$", $name) ) {
1009 // returns true if the given string is a valid display name
1010 // (to check nicknames)
1011 function _isValidDisplayName($name) {
1012 if (eregi("^[a-z0-9]+[a-z0-9 ]*[a-z0-9]+$", $name) ) {
1019 function _doError($msg) {
1021 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1022 <html xmlns="http://www.w3.org/1999/xhtml">
1024 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
1025 <title>Nucleus Install</title>
1026 <style>@import url('nucleus/styles/manual.css');</style>
1029 <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo -->
1032 <p>Error message was: "<?php echo $msg?>";</p>
1034 <p><a href="install.php" onclick="history.back();return false;">Go Back</a></p>
1042 function showErrorMessages($errors) {
1044 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1045 <html xmlns="http://www.w3.org/1999/xhtml">
1047 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
1048 <title>Nucleus Install</title>
1049 <style>@import url('nucleus/styles/manual.css');</style>
1052 <div style='text-align:center'><img src='./nucleus/styles/logo.gif' /></div> <!-- Nucleus logo -->
1055 <p>Errors were found:</p>
1060 while($msg = array_shift($errors) ) {
1061 echo '<li>', $msg, '</li>';
1067 <p><a href="install.php" onclick="history.back();return false;">Go Back</a></p>
1075 /* for the non-php systems that decide to show the contents: