<?php\r
/*\r
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2010 The Nucleus Group\r
+ * Copyright (C) 2002-2011 The Nucleus Group\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
* those tables.\r
*\r
* Below is a friendly way of letting users on non-php systems know that Nucleus won't run there.\r
- * ?><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\r
+ * ?><div style="font-size: xx-large;">If you see this text in your browser when you open <i>/install/</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\r
*/\r
\r
/**\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2010 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2011 The Nucleus Group\r
* @version $Id$\r
- * $NucleusJP: install.php,v 1.7 2007/02/04 06:28:44 kimitake Exp $\r
+ * $NucleusJP: index.php,v 1.7 2007/02/04 06:28:44 kimitake Exp $\r
*/\r
\r
/*\r
- This part of the install.php code allows for customization of the install process.\r
+ This part of the index.php code allows for customization of the install process.\r
When distributing plugins or skins together with a Nucleus installation, the\r
configuration below will instruct to install them\r
\r
} elseif (phpversion() < '5') {\r
echo ' <span class="warning" style="display:block">' . _TEXT2_WARN3 . '</span>';\r
}\r
- \r
- echo "</li>\n";\r
- /*\r
+?>\r
+\r
+ </li>\r
+ <li>MySQL:\r
+\r
+<?php\r
// note: this piece of code is taken from phpMyAdmin\r
- echo "<li>MySQL\n";\r
$conn = sql_connect_args('localhost','','');\r
- $result = @sql_query('SELECT VERSION() AS version', $conn);\r
- \r
+ $result = @at_sql_query('SELECT VERSION() AS version', $conn);\r
if ($result != FALSE && sql_num_rows($result) > 0) {\r
$row = sql_fetch_array($result);\r
$match = explode('.', $row['version']);\r
} else {\r
- $result = @sql_query('SHOW VARIABLES LIKE \'version\'', $conn);\r
-\r
+ $result = @at_sql_query('SHOW VARIABLES LIKE \'version\'', $conn);\r
if ($result != FALSE && @sql_num_rows($result) > 0) {\r
$row = sql_fetch_row($result);\r
$match = explode('.', $row[1]);\r
}\r
}\r
}\r
+\r
sql_disconnect($conn);\r
$mysqlVersion = implode($match, '.');\r
$minVersion = '3.23';\r
+\r
if ($mysqlVersion == '0.0.0') {\r
echo _NOTIFICATION1;\r
}\r
else {\r
echo $mysqlVersion;\r
}\r
+\r
if ($mysqlVersion < $minVersion) {\r
echo ' <span class="warning" style="display:block">' . sprintf(_TEXT2_WARN2, $minVersion) . '</span>';\r
}\r
- echo "</li>\n";\r
- */\r
- echo "</ul>\n";\r
+?>\r
\r
+ </li>\r
+ </ul>\r
+\r
+<?php\r
// tell people how they can have their config file filled out automatically\r
if (@file_exists('../config.php') && @!is_writable('../config.php')) {\r
?>\r
// <add for garble measure>\r
// 2-2. set DEFAULT CHARSET and COLLATE\r
$mySqlVer = implode('.', array_map('intval', explode('.', sql_get_server_info($MYSQL_CONN))));\r
- if ($mySqlVer >= '5.0.7' && phpversion() >= '5.2.3') {\r
+// if ($mySqlVer >= '5.0.7' && phpversion() >= '5.2.3') {//}\r
+ if ($mySqlVer >= '5.0.7' && function_exists('mysql_set_charset')) {\r
mysql_set_charset($charset);\r
} elseif ($mySqlVer >= '4.1.0') {\r
- sql_query("SET NAMES " . $charset);\r
+ sql_query("SET CHARACTER SET " . $charset);\r
}\r
- $collation = ($charset == 'utf8') ? 'utf8_unicode_ci' : 'ujis_japanese_ci';\r
+ $collation = ($charset == 'utf8') ? 'utf8_general_ci' : 'ujis_japanese_ci';\r
// </add for garble measure>*/\r
\r
// 3. try to create database (if needed)\r
}\r
\r
// 5a make first post\r
- if ($charset == 'ujis') {\r
+ if (strtoupper(_CHARSET) != 'UTF-8') {\r
$itm_title = mb_convert_encoding(_1ST_POST_TITLE, _CHARSET, 'UTF-8');\r
$itm_body = mb_convert_encoding(_1ST_POST, _CHARSET, 'UTF-8');\r
$itm_more = mb_convert_encoding(_1ST_POST2, _CHARSET, 'UTF-8');\r
sql_query($query,$MYSQL_CONN) or _doError(_ERROR20 . ': ' . sql_error($MYSQL_CONN) );\r
\r
// 8-2. update category settings\r
- if ($charset == 'ujis') {\r
+ if (strtoupper(_CHARSET) != 'UTF-8') {\r
$cat_name = mb_convert_encoding(_GENERALCAT_NAME, _CHARSET, 'UTF-8');\r
$cat_desc = mb_convert_encoding(_GENERALCAT_DESC, _CHARSET, 'UTF-8');\r
} else {\r