- Add a 4th text section to the signature page (of course, it's optional, and

off by default).  It's a postamble.. just a space for "Additional
  Information" after all the signatures.
This commit is contained in:
dave 2007-01-31 00:48:24 +00:00
parent e71d3c0bbb
commit 42b60170a4
5 changed files with 38 additions and 1 deletions

View File

@ -32,10 +32,12 @@
if($_POST['useexhibitordeclaration']) $useex="1"; else $useex="0";
if($_POST['useparentdeclaration']) $usepg="1"; else $usepg="0";
if($_POST['useteacherdeclaration']) $usete="1"; else $usete="0";
if($_POST['usepostamble']) $usepa="1"; else $usepa="0";
mysql_query("UPDATE signaturepage SET `use`='$useex', `text`='".mysql_escape_string(stripslashes($_POST['exhibitordeclaration']))."' WHERE name='exhibitordeclaration'");
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'");
mysql_query("UPDATE signaturepage SET `use`='$usepa', `text`='".mysql_escape_string(stripslashes($_POST['postamble']))."' WHERE name='postamble'");
echo happy(i18n("Signature page text successfully saved"));
}
@ -69,6 +71,16 @@ echo "<br />";
echo "<textarea name=\"teacherdeclaration\" rows=\"8\" cols=\"80\">".$r->text."</textarea>";
echo "<br />";
echo "<br />";
$q=mysql_query("SELECT * FROM signaturepage WHERE name='postamble'");
$r=mysql_fetch_object($q);
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 />";
echo "<input type=\"submit\" value=\"".i18n("Save Signature Page")."\">";
echo "</form>";

View File

@ -1 +1 @@
40
41

3
db/db.update.41.sql Normal file
View File

@ -0,0 +1,3 @@
INSERT INTO `signaturepage` ( `id` , `name` , `use` , `text` ) VALUES ( '', 'postamble', '0', 'Please send the signed signature form and any required payment to:
[Insert Address Here]');

View File

@ -214,6 +214,18 @@ $pdf->newPage();
$pdf->hr();
}
$q=mysql_query("SELECT * FROM signaturepage WHERE name='postamble'");
$r=mysql_fetch_object($q);
if($r->use)
{
//now for the teacher signature
$pdf->heading(i18n("Additional Information"));
$box=$r->text;
$pdf->addText($box);
}
/*
header("Content-type: application/pdf");

View File

@ -172,6 +172,16 @@ echo mysql_error();
}
$q=mysql_query("SELECT * FROM signaturepage WHERE name='postamble'");
$r=mysql_fetch_object($q);
if($r->use)
{
//now for the teacher signature
$pagetext="<h2>".i18n("Additional Information")."</h2>";
$pagetext.=nl2br($r->text);
$pdf->WriteHTML($pagetext);
}
$pdf->Output();
exit;
?>