+++ /dev/null
-<?php
-/*******************************************
-* mysql_xxx => nucleus_mysql_xxx converter *
-* for Nucleus *
-* ver 0.6.1b Written by Katsumi *
-*******************************************/
-
-// The license of this script is GPL
-
-// Check lanuage
-if (strpos(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']),'ja')===0) {
- $charset='EUC-JP';
-} else {
- $charset='iso-8859-1';
-}
-header("Content-Type: text/html; charset=$charset");
-
-if (!file_exists('./nucleus/sqlite/convert.php')) exit;
-include('./nucleus/sqlite/convert.php');
-
-?><html><body><?php
-
-$myself='installsqlite.php';
-if ((@$_GET['go'])!='yes') {
-
- if ($charset=='EUC-JP') {
- ?>¤³¤Î¥Ú¡¼¥¸¤Ç¤Ï¡¢SQLite ¤Ç»ÈÍѤ¹¤ë¤¿¤á¤Î Nucleus ¤Î³Æ¥Õ¥¡¥¤¥ë¤ÎÊѹ¹¤ò¹Ô¤¤¤Þ¤¹¡£<br /><br />
- ¤¹¤Ù¤Æ¤Î "mysql_xxx" ´Ø¿ô¸Æ¤Ó½Ð¤·¤Îɽµ¤¬ "nucleus_mysql_xxx"¤ËÊѹ¹¤µ¤ì¤Þ¤¹.<br /><br />
- <?php if (!function_exists('mysql_query')) {?>
- ¤³¤ÎÊѹ¹¤Ï¡¢MySQL ´Ø¿ô¤¬ PHP ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢É¬¿Ü¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£<br />
- ¤³¤Î¾ì¹ç "install.php" ¤È "config.php" ¤À¤±¤ËÊѹ¹¤¬É¬ÍפǤ¹¡£<br />
- ¤â¤·MySQL ´Ø¿ô¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤ª¤é¤º¡¢¾ÍèŪ¤Ë¤â¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Ê¤¤¤³¤È¤¬³Î¼Â¤Ê¾ì¹ç¡¢<br />
- <a href="?go=yes&modify=no">¤³¤³¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤</a>(install.php ¤È config.php ¤¬Êѹ¹¤µ¤ì¤Þ¤¹)¡£<br /><br />
- ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢²¼¤Î¥ê¥ó¥¯¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£<br /><br />
- <?php } ?>
- <a href="?go=yes&modify=yes">Êѹ¹¤ò³«»Ï</a>(¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¤¹¤Ù¤Æ¤Î PHP ¥Õ¥¡¥¤¥ë¤¬Êѹ¹¤µ¤ì¤Þ¤¹)¡£<br /><br />
- »Ï¤á¤ëÁ°¤Ë¡¢Êѹ¹¤µ¤ì¤ë¤Ù¤ PHP ¥Õ¥¡¥¤¥ë¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤¬¡¢Æɤ߽ñ¤²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
- </body></html><?php
- } else {
- ?>This page is to modify Nucleus core files for using SQLite as database engine.<br /><br />
- All the "mysql_xxx" functions will be converted to "nucleus_mysql_xxx".<br /><br />
- <?php if (!function_exists('mysql_query')) {?>
- This modification is not required if MySQL functions of PHP are not installed in the server.<br />
- In this case, only the "install.php" and "config.php" must be modified.<br />
- If you are sure that the MySQL function is never (now and in future) installed, <br />
- <a href="?go=yes&modify=no">please click here</a>(install.php and config.php will be changed).<br /><br />
- Otherwise, please click following link.<br /><br />
- <?php } ?>
- <a href="?go=yes&modify=yes">Start modification</a>(all the PHP files in this directory will be changed).<br /><br />
- Please make sure that all PHP files to be modified are readable and writable.
- </body></html><?php
- }
- exit;
-}
-
-if ((@$_GET['modify'])=='yes') {
- // Obtain all PHP files in current and child directories.
- $phpfiles=array();
- seekPhpFiles('./',$phpfiles,$myself);
-
- // Modify all PHP files; mysql_xxxx is replaced by nucleus_mysql_XXXX.
- $allok=true;
- foreach ($phpfiles as $file) $allok=$allok && changeFunctions($file);
- if (!$allok) ExitWithError();
-}
-
-// Modify config.php, install.php and backup.php
-modifyConfigInstall();
-
-if ($charset=='EUC-JP') {
- ?>¤¹¤Ù¤Æ¤ÎÊѹ¹¤¬½ªÎ»¤·¤Þ¤·¤¿¡£<hr />
- <a href="install.php">¤³¤³¤ò¥¯¥ê¥Ã¥¯¤·¤Æ Nucleus w/SQLite ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤ò³«»Ï¤·¤Æ¤¯¤À¤µ¤¤¡£</a><br />
- <?php
-} else {
- ?>All modificatios are sccesfully done.<hr />
- <a href="install.php">Click here to install Nucleus w/SQLite</a><br />
- <?php
-}
-if (@rename('installsqlite.php','installsqlite.php~')) {
- if ($charset=='EUC-JP') {
- echo '("installsqlite.php" ¤Ï "installsqlite.php~" ¤Ë¥Õ¥¡¥¤¥ë̾¤¬Êѹ¹¤µ¤ì¤Æ¤¤¤Þ¤¹¡£)';
- } else {
- echo '("installsqlite.php" has been renamed to "installsqlite.php~".)';
- }
-}
-?></body></html>
\ No newline at end of file