forked from science-ation/science-ation
Add the option to collect teacher signatures on the signature page
This commit is contained in:
parent
7e79a9dd9e
commit
0ebd709a13
@ -31,10 +31,11 @@
|
||||
{
|
||||
if($_POST['useexhibitordeclaration']) $useex="1"; else $useex="0";
|
||||
if($_POST['useparentdeclaration']) $usepg="1"; else $usepg="0";
|
||||
if($_POST['useteacherdeclaration']) $usete="1"; else $usete="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'");
|
||||
mysql_query("UPDATE signaturepage SET `use`='$usete', `text`='".mysql_escape_string(stripslashes($_POST['teacherdeclaration']))."' WHERE name='teacherdeclaration'");
|
||||
echo happy(i18n("Signature page text successfully saved"));
|
||||
}
|
||||
|
||||
@ -50,6 +51,7 @@ 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="";
|
||||
@ -58,6 +60,15 @@ echo "<br />";
|
||||
echo "<textarea name=\"parentdeclaration\" rows=\"8\" cols=\"80\">".$r->text."</textarea>";
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
|
||||
$q=mysql_query("SELECT * FROM signaturepage WHERE name='teacherdeclaration'");
|
||||
$r=mysql_fetch_object($q);
|
||||
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 />";
|
||||
echo "<input type=\"submit\" value=\"".i18n("Save Signature Page")."\">";
|
||||
echo "</form>";
|
||||
|
||||
|
@ -1 +1 @@
|
||||
23
|
||||
24
|
||||
|
2
db/db.update.24.sql
Normal file
2
db/db.update.24.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (3, 'teacherdeclaration', 0, 'The following section is to be read and signed by the teacher.\r\n\r\nI certify that:\r\n - The preparation of this project is mainly the student(s)\' own work.\r\n - The student(s) have read the rules and regulations and agree to abide by them.\r\n - I agree that the decision of the judges will be final.');
|
||||
|
@ -179,8 +179,41 @@ $pdf->newPage();
|
||||
$pdf->nextLine();
|
||||
|
||||
}
|
||||
$pdf->hr();
|
||||
}
|
||||
|
||||
$q=mysql_query("SELECT * FROM signaturepage WHERE name='teacherdeclaration'");
|
||||
$r=mysql_fetch_object($q);
|
||||
if($r->use)
|
||||
{
|
||||
//now for the teacher signature
|
||||
$pdf->heading(i18n("Teacher Declaration"));
|
||||
|
||||
$teacherbox=$r->text;
|
||||
$pdf->addText($teacherbox);
|
||||
|
||||
//we only need 1 teacher signature line, we can assume (maybe incorrectly) that both students
|
||||
//have the same teacher.. if they are not the same, then they can get the best teacher to sign
|
||||
//it doesnt matter.
|
||||
$pdf->vspace($height['sigspace']);
|
||||
|
||||
//signature line
|
||||
$pdf->hline(1,4.5);
|
||||
|
||||
//date line
|
||||
$pdf->hline(5,7);
|
||||
$pdf->nextLine();
|
||||
|
||||
//show their name
|
||||
$pdf->addTextX(i18n("Teacher Signature"),1.25);
|
||||
|
||||
//show the Date text
|
||||
$pdf->addTextX(i18n("Date"),5.25);
|
||||
$pdf->nextLine();
|
||||
|
||||
$pdf->hr();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
header("Content-type: application/pdf");
|
||||
|
Loading…
Reference in New Issue
Block a user