forked from science-ation/science-ation
Add the signature page editor
And insert the defaults to the database
This commit is contained in:
parent
caa1f593af
commit
5518a2272f
@ -33,6 +33,7 @@
|
||||
echo "<a href=\"divisions.php\">".i18n("Project Divisions")."</a> <br />";
|
||||
echo "<a href=\"subdivisions.php\">".i18n("Project Sub-Divisions")."</a> <br />";
|
||||
echo "<a href=\"pagetexts.php\">".i18n("Page Texts")."</a> <br />";
|
||||
echo "<a href=\"signaturepage.php\">".i18n("Exhibitor Signature Page")."</a> <br />";
|
||||
echo "<a href=\"safetyquestions.php\">".i18n("Project Safety Questions")."</a> <br />";
|
||||
echo "<a href=\"images.php\">".i18n("Images (Fair Logo)")."</a> <br />";
|
||||
echo "<hr />";
|
||||
|
65
config/signaturepage.php
Normal file
65
config/signaturepage.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?
|
||||
/*
|
||||
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");
|
||||
auth_required('config');
|
||||
send_header("Configuration - Signature Page");
|
||||
echo "<a href=\"index.php\"><< ".i18n("Back to Configuration")."</a><br />";
|
||||
|
||||
if($_POST['action']=="save")
|
||||
{
|
||||
if($_POST['useexhibitordeclaration']) $useex="1"; else $useex="0";
|
||||
if($_POST['useparentdeclaration']) $usepg="1"; else $usepg="0";
|
||||
|
||||
mysql_query("UPDATE signaturepage SET `use`='$useex', `text`='".mysql_escape_string(stripslashes($_POST['exhibitordeclaration']))."' WHERE name='exhibitordeclaration'");
|
||||
echo mysql_error();
|
||||
mysql_query("UPDATE signaturepage SET `use`='$usepg', `text`='".mysql_escape_string(stripslashes($_POST['parentdeclaration']))."' WHERE name='parentdeclaration'");
|
||||
echo happy(i18n("Signature page text successfully saved"));
|
||||
}
|
||||
|
||||
echo "<br />";
|
||||
|
||||
$q=mysql_query("SELECT * FROM signaturepage WHERE name='exhibitordeclaration'");
|
||||
$r=mysql_fetch_object($q);
|
||||
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 />";
|
||||
$q=mysql_query("SELECT * FROM signaturepage WHERE name='parentdeclaration'");
|
||||
$r=mysql_fetch_object($q);
|
||||
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 />";
|
||||
echo "<input type=\"submit\" value=\"".i18n("Save Signature Page")."\">";
|
||||
echo "</form>";
|
||||
|
||||
send_footer();
|
||||
?>
|
@ -1,2 +1,5 @@
|
||||
ALTER TABLE `judges` DROP `catpref`, DROP `divpref`;
|
||||
ALTER TABLE `registrations` ADD `schools_id` INT UNSIGNED DEFAULT NULL ;
|
||||
CREATE TABLE `signaturepage` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `name` VARCHAR( 32 ) NOT NULL , `use` TINYINT DEFAULT '1' NOT NULL , `text` TEXT NOT NULL , PRIMARY KEY ( `id` )) TYPE = MYISAM ;
|
||||
INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.');
|
||||
INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.');
|
||||
|
@ -63,7 +63,7 @@ $pdf=new lpdf( i18n($config['fairname']),
|
||||
);
|
||||
|
||||
$pdf->newPage();
|
||||
$height['sigspace']=0.50;
|
||||
$height['sigspace']=0.40;
|
||||
$pdf->setFontSize(11);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user