diff --git a/config/variables.php b/config/variables.php index 6672518..f2460a1 100644 --- a/config/variables.php +++ b/config/variables.php @@ -54,7 +54,14 @@ echo "

".i18n("Global configuration settings")."

"; while($r=mysql_fetch_object($q)) { - echo "$r->var".i18n($r->description)."var]\" value=\"$r->val\" />"; + if($r->var=="FAIRYEAR") + { + echo "$r->var".i18n($r->description)."$r->val"; + } + else + { + echo "$r->var".i18n($r->description)."var]\" value=\"$r->val\" />"; + } } echo "

".i18n("Configuration settings for fair year %1",array($config['FAIRYEAR']))."

"; diff --git a/install3.php b/install3.php new file mode 100644 index 0000000..b854cee --- /dev/null +++ b/install3.php @@ -0,0 +1,79 @@ + + Copyright (C) 2005 James Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +echo "\n"; +?> + + +SFIAB Installation + + + +

SFIAB Installation - Step 3

+SFIAB Installation Step 1 is not yet complete."; + echo "Go back to installation step 1
"; + echo ""; + exit; +} + +require_once("data/config.inc.php"); +mysql_connect($DBHOST,$DBUSER,$DBPASS); +mysql_select_db($DBNAME); + + echo "Checking for existing SFIAB database... "; + if(file_exists("db/db.db.version.txt")) + { + $dbdbversion_file=file("db/db.db.version.txt"); + $dbdbversion=trim($dbdbversion_file[0]); + if(!$dbdbversion) + { + echo "
SFIAB Installation Step 2 is not yet complete.
"; + echo "Go back to installation step 2
"; + echo ""; + exit; + + } + } + else + { + echo "
SFIAB Installation Step 2 is not yet complete.
"; + echo "Go back to installation step 2
"; + echo ""; + exit; + } + +//if there are entries in the config table for year=0, then this is NOT a fresh install, so error out +$q=mysql_query("SELECT * FROM config WHERE year='0'"); +if(mysql_num_rows($q)) +{ + //we say all tables, but really only we check for config where year=0; + echo "
ERROR: Detected existing table data, SFIAB Installation Step 3 requires all tables to be empty.
"; + echo ""; + exit; +} + +?> + +