2006-02-24 17:42:11 +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 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 .
*/
?>
< ?
require ( " ../common.inc.php " );
2015-04-08 21:13:02 +00:00
require ( " signaturepage_or_permissionform.php " );
2007-11-21 17:04:35 +00:00
require_once ( " ../user.inc.php " );
2007-11-19 00:33:38 +00:00
user_auth_required ( 'committee' , 'config' );
2015-04-08 21:13:02 +00:00
send_header ( " $participationform " ,
2007-11-19 00:33:38 +00:00
array ( 'Committee Main' => 'committee_main.php' ,
'SFIAB Configuration' => 'config/index.php' )
2008-08-22 20:34:38 +00:00
, " exhibitor_signature_page "
2007-11-19 00:33:38 +00:00
);
2006-02-24 17:42:11 +00:00
2024-12-18 19:27:47 +00:00
if ( get_value_from_array ( $_POST , 'action' ) == " save " )
2006-02-24 17:42:11 +00:00
{
2024-12-17 06:34:35 +00:00
if ( get_value_from_array ( $_POST , 'useexhibitordeclaration' )) $useex = " 1 " ; else $useex = " 0 " ;
if ( get_value_from_array ( $_POST , 'useparentdeclaration' )) $usepg = " 1 " ; else $usepg = " 0 " ;
if ( get_value_from_array ( $_POST , 'useteacherdeclaration' )) $usete = " 1 " ; else $usete = " 0 " ;
if ( get_value_from_array ( $_POST , 'usepostamble' )) $usepa = " 1 " ; else $usepa = " 0 " ;
if ( get_value_from_array ( $_POST , 'useregfee' )) $userf = " 1 " ; else $userf = " 0 " ;
2006-02-24 17:42:11 +00:00
2024-12-17 06:34:35 +00:00
$stmt = $pdo -> prepare ( " UPDATE signaturepage SET `use`=' $useex ', `text`=' " . get_value_from_array ( $_POST , 'exhibitordeclaration' ) . " ' WHERE name='exhibitordeclaration' " );
2024-12-11 00:40:23 +00:00
$stmt -> execute ();
2024-12-17 06:34:35 +00:00
$stmt = $pdo -> prepare ( " UPDATE signaturepage SET `use`=' $usepg ', `text`=' " . get_value_from_array ( $_POST , 'parentdeclaration' ) . " ' WHERE name='parentdeclaration' " );
2024-12-11 00:40:23 +00:00
$stmt -> execute ();
2024-12-17 06:34:35 +00:00
$stmt = $pdo -> prepare ( " UPDATE signaturepage SET `use`=' $usete ', `text`=' " . get_value_from_array ( $_POST , 'teacherdeclaration' ) . " ' WHERE name='teacherdeclaration' " );
2024-12-11 00:40:23 +00:00
$stmt -> execute ();
2024-12-17 06:34:35 +00:00
$stmt = $pdo -> prepare ( " UPDATE signaturepage SET `use`=' $usepa ', `text`=' " . get_value_from_array ( $_POST , 'postamble' ) . " ' WHERE name='postamble' " );
2024-12-11 00:40:23 +00:00
$stmt -> execute ();
$stmt = $pdo -> prepare ( " UPDATE signaturepage SET `use`=' $userf ', `text`='' WHERE name='regfee' " );
$stmt -> execute ();
echo happy ( i18n ( " $sentence_begin_participationform text successfully saved " ));
2006-02-24 17:42:11 +00:00
}
2008-01-28 23:01:41 +00:00
echo " <a href= \" ../register_participants_signature.php?sample=true \" >Preview your signature form as a PDF (as a student would see it)</a><br /> " ;
2024-11-25 23:06:33 +00:00
$q = $pdo -> prepare ( " SELECT * FROM signaturepage WHERE name='exhibitordeclaration' " );
$q -> execute ();
$r = $q -> fetch ( PDO :: FETCH_OBJ );
2006-02-24 17:42:11 +00:00
echo " <form method= \" post \" action= \" signaturepage.php \" > " ;
echo " <input type= \" hidden \" name= \" action \" value= \" save \" > \n " ;
if ( $r -> use ) $ch = " checked= \" checked \" " ; else $ch = " " ;
echo " <input $ch type= \" checkbox \" name= \" useexhibitordeclaration \" value= \" 1 \" > " . i18n ( " Use the exhibitor declaration and obtain exhibitor signatures " );
echo " <br /> " ;
echo " <textarea name= \" exhibitordeclaration \" rows= \" 8 \" cols= \" 80 \" > " . $r -> text . " </textarea> " ;
echo " <br /> " ;
echo " <br /> " ;
2006-09-18 19:33:48 +00:00
2024-11-25 23:06:33 +00:00
$q = $pdo -> prepare ( " SELECT * FROM signaturepage WHERE name='parentdeclaration' " );
$q -> execute ();
$r = $q -> fetch ( PDO :: FETCH_OBJ );
2006-02-24 17:42:11 +00:00
if ( $r -> use ) $ch = " checked= \" checked \" " ; else $ch = " " ;
echo " <input $ch type= \" checkbox \" name= \" useparentdeclaration \" value= \" 1 \" > " . i18n ( " Use the parent/guardian declaration and obtain parent/guardian signatures " );
echo " <br /> " ;
echo " <textarea name= \" parentdeclaration \" rows= \" 8 \" cols= \" 80 \" > " . $r -> text . " </textarea> " ;
echo " <br /> " ;
echo " <br /> " ;
2006-09-18 19:33:48 +00:00
2024-11-25 23:06:33 +00:00
$q = $pdo -> prepare ( " SELECT * FROM signaturepage WHERE name='teacherdeclaration' " );
$q -> execute ();
$r = $q -> fetch ( PDO :: FETCH_OBJ );
2006-09-18 19:33:48 +00:00
if ( $r -> use ) $ch = " checked= \" checked \" " ; else $ch = " " ;
echo " <input $ch type= \" checkbox \" name= \" useteacherdeclaration \" value= \" 1 \" > " . i18n ( " Use the teacher declaration and obtain teacher's signature " );
echo " <br /> " ;
echo " <textarea name= \" teacherdeclaration \" rows= \" 8 \" cols= \" 80 \" > " . $r -> text . " </textarea> " ;
echo " <br /> " ;
echo " <br /> " ;
2007-01-31 00:48:24 +00:00
2024-11-25 23:06:33 +00:00
$q = $pdo -> prepare ( " SELECT * FROM signaturepage WHERE name='regfee' " );
$q -> execute ();
$r = $q -> fetch ( PDO :: FETCH_OBJ );
2007-12-23 01:33:09 +00:00
if ( $r -> use ) $ch = " checked= \" checked \" " ; else $ch = " " ;
2015-04-08 21:13:02 +00:00
echo " <input $ch type= \" checkbox \" name= \" useregfee \" value= \" 1 \" > " . i18n ( " Include registration fee information on the $non_capital_participationform " );
2007-12-23 01:33:09 +00:00
echo " <br /> " ;
echo " <br /> " ;
2024-11-25 23:06:33 +00:00
$q = $pdo -> prepare ( " SELECT * FROM signaturepage WHERE name='postamble' " );
$q -> execute ();
$r = $q -> fetch ( PDO :: FETCH_OBJ );
2007-01-31 00:48:24 +00:00
if ( $r -> use ) $ch = " checked= \" checked \" " ; else $ch = " " ;
echo " <input $ch type= \" checkbox \" name= \" usepostamble \" value= \" 1 \" > " . i18n ( " Place Additional Information after all the required signatures " );
echo " <br /> " ;
echo " <textarea name= \" postamble \" rows= \" 8 \" cols= \" 80 \" > " . $r -> text . " </textarea> " ;
echo " <br /> " ;
echo " <br /> " ;
2015-04-08 21:13:02 +00:00
echo " <input type= \" submit \" value= \" " . i18n ( " Save $non_capital_participationform " ) . " \" > " ;
2006-02-24 17:42:11 +00:00
echo " </form> " ;
send_footer ();
?>