- Another GVRSF change. Optionally include registration fee information on the

signature page.
This commit is contained in:
dave 2007-12-23 01:33:09 +00:00
parent ebbac49b4b
commit e74c4ce64d
4 changed files with 52 additions and 3 deletions

View File

@ -36,11 +36,13 @@
if($_POST['useparentdeclaration']) $usepg="1"; else $usepg="0";
if($_POST['useteacherdeclaration']) $usete="1"; else $usete="0";
if($_POST['usepostamble']) $usepa="1"; else $usepa="0";
if($_POST['useregfee']) $userf="1"; else $userf="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'");
mysql_query("UPDATE signaturepage SET `use`='$userf', `text`='' WHERE name='regfee'");
echo happy(i18n("Signature page text successfully saved"));
}
@ -74,6 +76,13 @@ echo "<textarea name=\"teacherdeclaration\" rows=\"8\" cols=\"80\">".$r->text."<
echo "<br />";
echo "<br />";
$q=mysql_query("SELECT * FROM signaturepage WHERE name='regfee'");
$r=mysql_fetch_object($q);
if($r->use) $ch="checked=\"checked\""; else $ch="";
echo "<input $ch type=\"checkbox\" name=\"useregfee\" value=\"1\">".i18n("Include registration fee information on the signature page");
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="";

View File

@ -1 +1 @@
89
90

2
db/db.update.90.sql Normal file
View File

@ -0,0 +1,2 @@
INSERT INTO `sfiab-dave`.`signaturepage` ( `id` , `name` , `use` , `text`) VALUES ( NULL , 'regfee', '0', '');

View File

@ -242,6 +242,44 @@ $pdf->newPage();
$pdf->hr();
}
$q=mysql_query("SELECT * FROM signaturepage WHERE name='regfee'");
$r=mysql_fetch_object($q);
if($r->use)
{
//now for the teacher signature
$pdf->heading(i18n("Registration Fee Summary"));
$pdf->nextLine();
list($regfee, $rfeedata) = computeRegistrationFee($_SESSION['registration_id']);
$pdf->addTextX(i18n('Item'), 3.5);
$pdf->addTextX(i18n('Unit'), 5.1);
$pdf->addTextX(i18n('Qty'), 5.5);
$pdf->addTextX(i18n('Extended'), 5.9);
$pdf->vspace(0.05);
$pdf->hline(1.75,6.75);
foreach($rfeedata as $rf) {
$pdf->nextLine();
$u = "$".sprintf("%.02f", $rf['base']);
$e = "$".sprintf("%.02f", $rf['ext']);
$pdf->addTextX($rf['text'], 2);
$pdf->addTextX("$u", 5);
$pdf->addTextX($rf['num'], 5.6);
$pdf->addTextX("$e", 6);
}
$pdf->vspace(0.05);
$pdf->hline(1.75,6.75);
$pdf->nextLine();
$t = "$".sprintf("%.02f", $regfee);
$pdf->addTextX(i18n('Total (including all taxes)'), 4.2);
$pdf->addTextX("$t", 6);
$pdf->nextLine();
$pdf->hr();
}
$q=mysql_query("SELECT * FROM signaturepage WHERE name='postamble'");
$r=mysql_fetch_object($q);
if($r->use)