2005-11-21 19:36:48 +00:00
< ?
2025-01-29 03:30:48 +00:00
/*
* This file is part of the 'Science Fair In A Box' project
* SFIAB Website : http :// www . sfiab . ca
*
* Copyright ( C ) 2005 Sci - Tech Ontario Inc < info @ scitechontario . org >
* Copyright ( C ) 2005 - 2009 James Grant < james @ lightbox . org >
*
* 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 .
*/
2005-11-21 19:36:48 +00:00
?>
< ?
2025-01-29 03:30:48 +00:00
require ( '../common.inc.php' );
require_once ( '../user.inc.php' );
require_once ( '../config_editor.inc.php' );
user_auth_required ( 'committee' , 'config' );
send_header ( 'Year Rollover' ,
array ( 'Committee Main' => 'committee_main.php' ,
'SFIAB Configuration' => 'config/index.php' ),
'rollover_fair_year' );
?>
2005-11-21 19:36:48 +00:00
< script language = " javascript " type = " text/javascript " >
function confirmYearRollover ()
{
2025-01-29 03:30:48 +00:00
var currentyear =< ? = $config [ 'FAIRYEAR' ] ?> ;
2005-11-21 19:36:48 +00:00
var nextyear = document . forms . rollover . nextfairyear . value ;
if ( nextyear < currentyear )
alert ( 'You cannot roll backwards in years!' );
else if ( nextyear == currentyear )
alert ( 'You cannot roll to the same year!' );
else
{
var okay = confirm ( 'Are you sure you want to roll the FAIRYEAR from ' + currentyear + ' to ' + nextyear + '? This can not be undone and should only be done if you are absolutely sure!' );
if ( okay )
return true ;
}
return false ;
}
</ script >
< ?
2025-01-29 03:30:48 +00:00
function roll ( $currentfairyear , $newfairyear , $table , $where = '' , $replace = array ())
{
2024-12-17 01:34:35 -05:00
global $pdo ;
2025-01-29 03:30:48 +00:00
/*
* Field Type Null Key Default Extra
2010-04-16 09:43:26 +00:00
* id int ( 10 ) unsigned NO PRI NULL auto_increment
2025-01-29 03:30:48 +00:00
* sponsors_id int ( 10 ) unsigned NO MUL 0
* award_source_fairs_id int ( 10 ) unsigned YES NULL
*/
2010-04-16 09:43:26 +00:00
/* Get field list for this table */
2025-02-07 03:50:00 +00:00
$q = $pdo -> prepare ( " SHOW COLUMNS IN $table " );
$q -> execute ();
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while (( $c = $q -> fetch ( PDO :: FETCH_ASSOC ))) {
2010-04-16 09:43:26 +00:00
$col [ $c [ 'Field' ]] = $c ;
}
/* Record fields we care about */
$fields = array ();
$keys = array_keys ( $col );
2025-01-29 03:30:48 +00:00
foreach ( $keys as $k ) {
2010-04-16 09:43:26 +00:00
/* Skip id field */
2025-01-29 03:30:48 +00:00
if ( $col [ $k ][ 'Extra' ] == 'auto_increment' )
continue ;
2010-04-16 09:43:26 +00:00
/* Skip year field */
2025-01-29 03:30:48 +00:00
if ( $k == 'year' )
continue ;
2010-04-16 09:43:26 +00:00
$fields [] = $k ;
2025-01-29 03:30:48 +00:00
}
2010-04-16 09:43:26 +00:00
2025-01-29 03:30:48 +00:00
if ( $where == '' )
$where = '1' ;
2010-04-16 09:43:26 +00:00
/* Get data */
2025-02-07 20:36:47 +00:00
$q = $pdo -> prepare ( " SELECT * FROM $table WHERE year=? AND $where " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
$names = '`' . join ( '`,`' , $fields ) . '`' ;
2010-04-16 09:43:26 +00:00
/* Process data */
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_ASSOC )) {
2009-09-09 00:26:12 +00:00
$vals = '' ;
2025-01-29 03:30:48 +00:00
foreach ( $fields as $f ) {
if ( array_key_exists ( $f , $replace ))
$vals .= ',' . $pdo -> quote ( $replace [ $f ]);
else if ( $col [ $f ][ 'Null' ] == 'YES' && $r [ $f ] == NULL )
2010-04-16 09:43:26 +00:00
$vals .= ',NULL' ;
2025-01-29 03:30:48 +00:00
else
$vals .= ',' . $pdo -> quote ( $r [ $f ]);
2009-09-09 00:26:12 +00:00
}
2024-12-17 01:34:35 -05:00
2025-02-07 03:50:00 +00:00
$stmt = $pdo -> prepare ( " INSERT INTO ` $table ` (`year`,?) VALUES (?,?) " );
$stmt -> execute ([ $names , $newfairyear , $vals ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2009-09-09 00:26:12 +00:00
}
2025-01-29 03:30:48 +00:00
}
2009-09-09 00:26:12 +00:00
2025-01-29 03:30:48 +00:00
if ( get_value_from_array ( $_POST , 'action' ) == 'rollover' && get_value_from_array ( $_POST , 'nextfairyear' )) {
$newfairyear = intval ( get_value_from_array ( $_POST , 'nextfairyear' ));
$currentfairyear = intval ( $config [ 'FAIRYEAR' ]);
2005-11-21 19:36:48 +00:00
2010-04-16 09:43:26 +00:00
$cy = $currentfairyear ;
$ny = $newfairyear ;
2025-01-29 03:30:48 +00:00
if ( $newfairyear < $currentfairyear )
echo error ( i18n ( 'You cannot roll backwards in years!' ));
else if ( $newfairyear == $currentfairyear )
echo error ( i18n ( 'You cannot roll to the same year!' ));
else {
// okay here we go! this is going to get to be a pretty big script me thinks!
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
// first, lets do all of the configuration variables
echo i18n ( 'Rolling configuration variables' ) . '<br />' ;
2007-11-25 19:53:15 +00:00
config_update_variables ( $newfairyear , $currentfairyear );
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
// now the dates
echo i18n ( 'Rolling dates' ) . '<br />' ;
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT DATE_ADD(date,INTERVAL 365 DAY) AS newdate,name,description FROM dates WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO dates (date,name,description,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> newdate , $r -> name , $r -> description , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
// page text
echo i18n ( 'Rolling page texts' ) . '<br />' ;
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM pagetext WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO pagetext (textname,textdescription,text,lastupdate,year,lang) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> textname , $r -> textdescription , $r -> text , $r -> lastupdate , $newfairyear , $r -> lang ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling project categories' ) . '<br />' ;
// project categories
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM projectcategories WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> id , $r -> category , $r -> category_shortform , $r -> mingrade , $r -> maxgrade , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling project divisions' ) . '<br />' ;
// project divisions
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM projectdivisions WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO projectdivisions (id,division,division_shortform,cwsfdivisionid,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> id , $r -> division , $r -> division_shortform , $r -> cwsfdivisionid , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling project category-division links' ) . '<br />' ;
// project categories divisions links
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM projectcategoriesdivisions_link WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO projectcategoriesdivisions_link (projectdivisions_id,projectcategories_id,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> projectdivisions_id , $r -> projectcategories_id , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2007-12-07 22:12:16 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling project sub-divisions' ) . '<br />' ;
// project subdivisions
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM projectsubdivisions WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO projectsubdivisions (id,projectdivisions_id,subdivision,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> id , $r -> projectsubdivisions_id , $r -> subdivision , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling safety questions' ) . '<br />' ;
// safety questions
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM safetyquestions WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO safetyquestions (question,type,required,ord,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ,
? " );
$stmt -> execute ([ $r -> question , $r -> type , $r -> required , $r -> ord , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling awards' ) . '<br />' ;
// awards
2010-04-16 09:43:26 +00:00
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM award_awards WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2010-04-16 09:43:26 +00:00
/* Roll the one award */
roll ( $cy , $ny , 'award_awards' , " id=' { $r -> id } ' " );
2025-01-29 03:30:48 +00:00
$award_awards_id = $pdo -> lastInsertId ();
2005-11-21 19:36:48 +00:00
2010-04-16 09:43:26 +00:00
roll ( $cy , $ny , 'award_awards_projectcategories' , " award_awards_id=' { $r -> id } ' " ,
2025-01-29 03:30:48 +00:00
array ( 'award_awards_id' => $award_awards_id ));
2005-11-21 19:36:48 +00:00
2010-04-16 09:43:26 +00:00
roll ( $cy , $ny , 'award_awards_projectdivisions' , " award_awards_id=' { $r -> id } ' " ,
2025-01-29 03:30:48 +00:00
array ( 'award_awards_id' => $award_awards_id ));
echo i18n ( ' Rolling award prizes' ) . '<br />' ;
2010-04-16 09:43:26 +00:00
roll ( $cy , $ny , 'award_prizes' , " award_awards_id=' { $r -> id } ' " ,
2025-01-29 03:30:48 +00:00
array ( 'award_awards_id' => $award_awards_id ));
2005-11-21 19:36:48 +00:00
}
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling award types' ) . '<br />' ;
// award types
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM award_types WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO award_types (id,type,`order`,year) VALUES (
2025-02-05 06:06:13 +00:00
? ,
? ,
? ,
? ) " );
$stmt -> execute ([ $r -> id , $r -> type , $r -> order , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2005-11-21 19:36:48 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling schools' ) . '<br />' ;
// award types
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM schools WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
$puid = ( $r -> principal_uid == null ) ? 'NULL' : ( " ' " . intval ( $r -> principal_uid ) . " ' " );
$shuid = ( $r -> sciencehead_uid == null ) ? 'NULL' : ( " ' " . intval ( $r -> sciencehead_uid ) . " ' " );
2025-02-07 03:50:00 +00:00
$stmt = $pdo -> prepare ( 'INSERT INTO schools (school, schoollang, schoollevel, board, district, phone, fax, address, city, province_code, postalcode, principal_uid, schoolemail, sciencehead_uid, accesscode, lastlogin, junior, intermediate, senior, registration_password, projectlimit, projectlimitper, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, ?)' );
$stmt -> execute ([ $r -> school , $r -> schoollang , $r -> schoollevel , $r -> board , $r -> district , $r -> phone , $r -> fax , $r -> address , $r -> city , $r -> province_code , $r -> postalcode , $puid , $r -> schoolemail , $shuid , $r -> accesscode , $r -> junior , $r -> intermediate , $r -> senior , $r -> registration_password , $r -> projectlimit , $r -> projectlimitper , $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2009-11-30 19:10:14 +00:00
}
2005-11-24 20:12:43 +00:00
2025-01-29 03:30:48 +00:00
echo i18n ( 'Rolling questions' ) . '<br />' ;
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM questions WHERE year=? " );
$q -> execute ([ $currentfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $r = $q -> fetch ( PDO :: FETCH_OBJ )) {
2025-02-07 03:50:00 +00:00
$stmt = $pdo -> prepare ( " INSERT INTO questions (id, year, section, db_heading, question, type, required, ord) VALUES ('', ?, ?, ?, ?, ?, ?, ?) " );
$stmt -> execute ([ $newfairyear , $r -> section , $r -> db_heading , $r -> question , $r -> type , $r -> required , $r -> ord ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-17 01:34:35 -05:00
}
2006-07-11 20:22:42 +00:00
2025-01-29 03:30:48 +00:00
// regfee items
echo i18n ( 'Rolling registration fee items' ) . '<br />' ;
2010-04-16 09:43:26 +00:00
roll ( $cy , $ny , 'regfee_items' );
2009-09-09 00:26:12 +00:00
2025-01-29 03:30:48 +00:00
// volunteer positions
echo i18n ( 'Rolling volunteer positions' ) . '<br />' ;
2010-04-16 09:43:26 +00:00
roll ( $cy , $ny , 'volunteer_positions' );
2009-09-09 00:26:12 +00:00
2025-01-29 03:30:48 +00:00
// timeslots and rounds
echo i18n ( 'Rolling judging timeslots and rounds' ) . '<br />' ;
2025-02-04 06:51:38 +00:00
$q = $pdo -> prepare ( " SELECT * FROM judges_timeslots WHERE year=? AND round_id='0' " );
$q -> execute ([ $currentfairyear ]);
2025-01-29 03:30:48 +00:00
show_pdo_errors_if_any ( $pdo );
while ( $r = $q -> fetch ( PDO :: FETCH_ASSOC )) {
2009-09-09 00:26:12 +00:00
$d = $newfairyear - $currentfairyear ;
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO judges_timeslots (`year`,`round_id`,`type`,`date`,`starttime`,`endtime`,`name`)
2025-02-05 06:06:13 +00:00
VALUES ( ? , '0' , ? , DATE_ADD ( ? , INTERVAL ? YEAR ),
? , ? , ? ) " );
$stmt -> execute ([ $newfairyear , $r [ 'type' ], $r [ 'date' ], $d , $r [ 'starttime' ], $r [ 'endtime' ], $r [ 'name' ]]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2024-12-10 19:40:23 -05:00
$round_id = $pdo -> lastInsertId ();
2025-02-04 06:51:38 +00:00
$qq = $pdo -> prepare ( " SELECT * FROM judges_timeslots WHERE round_id=? " );
$qq -> execute ([ $r [ 'id' ]]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
while ( $rr = $qq -> fetch ( PDO :: FETCH_ASSOC )) {
2024-12-10 19:40:23 -05:00
$stmt = $pdo -> prepare ( " INSERT INTO judges_timeslots (`year`,`round_id`,`type`,`date`,`starttime`,`endtime`)
2025-02-05 06:06:13 +00:00
VALUES ( ? , ? , 'timeslot' , DATE_ADD ( ? , INTERVAL ? YEAR ),
? , ? ) " );
$stmt -> execute ([ $newfairyear , $round_id , $rr [ 'date' ], $d , $rr [ 'starttime' ], $rr [ 'endtime' ]]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2009-09-09 00:26:12 +00:00
}
}
2008-01-23 18:40:59 +00:00
2025-01-29 03:30:48 +00:00
echo '<br /><br />' ;
2025-02-04 06:51:38 +00:00
$stmt = $pdo -> prepare ( " UPDATE config SET val=? WHERE var='FAIRYEAR' AND year=0 " );
$stmt -> execute ([ $newfairyear ]);
2024-12-18 11:48:09 -05:00
show_pdo_errors_if_any ( $pdo );
2025-01-29 03:30:48 +00:00
echo happy ( i18n ( 'Fair year has been rolled over from %1 to %2' , array ( $currentfairyear , $newfairyear )));
2005-11-21 21:30:10 +00:00
send_footer ();
exit ;
2005-11-21 19:36:48 +00:00
}
2025-01-29 03:30:48 +00:00
}
echo '<br />' ;
echo '<a href="backuprestore.php">' . i18n ( 'You should consider making a database backup before rolling over, just in case!' ) . " </a><br /> \n " ;
echo '<br />' ;
echo '<form name="rollover" method="post" action="rollover.php" onsubmit="return confirmYearRollover()">' ;
echo '<input type="hidden" name="action" value="rollover" />' ;
echo i18n ( 'Current Fair Year' ) . ': <b>' . $config [ 'FAIRYEAR' ] . '</b><br />' ;
$nextfairyear = $config [ 'FAIRYEAR' ] + 1 ;
echo i18n ( 'Next Fair Year' ) . " : <input size= \" 8 \" type= \" text \" name= \" nextfairyear \" value= \" $nextfairyear\ " /> " ;
echo '<br />' ;
echo '<input type="submit" value="' . i18n ( 'Rollover Fair Year' ) . '" />' ;
echo '</form>' ;
send_footer ();
2005-11-21 19:36:48 +00:00
?>