forked from science-ation/science-ation
add config options:
regfee = number regfee_per = (student,project) hide things to do with registration/payment if regfee == 0
This commit is contained in:
parent
c03aaf07a3
commit
f7d40b115a
@ -16,8 +16,13 @@
|
||||
echo "<option $sel value=\"\">".i18n("Any Status")."</option>\n";
|
||||
if($_GET['showstatus']=="complete") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"complete\">".i18n("Complete")."</option>\n";
|
||||
if($_GET['showstatus']=="paymentpending") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"paymentpending\">".i18n("Payment Pending")."</option>\n";
|
||||
|
||||
//if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
||||
if($config['regfee']>0)
|
||||
{
|
||||
if($_GET['showstatus']=="paymentpending") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"paymentpending\">".i18n("Payment Pending")."</option>\n";
|
||||
}
|
||||
if($_GET['showstatus']=="open") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"open\">".i18n("Open")."</option>\n";
|
||||
if($_GET['showstatus']=="new") $sel="selected=\"selected\""; else $sel="";
|
||||
|
@ -108,17 +108,31 @@ echo mysql_Error();
|
||||
echo "<input type=submit value=\"".i18n("No, this is the wrong form")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<form method=\"post\" action=\"registration_receivedforms.php\">";
|
||||
echo "<input type=\"hidden\" name=\"registration_number\" value=\"$reg_num\" />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"receivedyes\" />";
|
||||
echo "<input type=submit value=\"".i18n("Yes, right form with registration fee")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
if($config['regfee']>0)
|
||||
{
|
||||
|
||||
echo "<form method=\"post\" action=\"registration_receivedforms.php\">";
|
||||
echo "<input type=\"hidden\" name=\"registration_number\" value=\"$reg_num\" />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"receivedyesnocash\" />";
|
||||
echo "<input type=submit value=\"".i18n("Yes, right form without registration fee")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
echo "<form method=\"post\" action=\"registration_receivedforms.php\">";
|
||||
echo "<input type=\"hidden\" name=\"registration_number\" value=\"$reg_num\" />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"receivedyes\" />";
|
||||
echo "<input type=submit value=\"".i18n("Yes, right form with registration fee")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<form method=\"post\" action=\"registration_receivedforms.php\">";
|
||||
echo "<input type=\"hidden\" name=\"registration_number\" value=\"$reg_num\" />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"receivedyesnocash\" />";
|
||||
echo "<input type=submit value=\"".i18n("Yes, right form without registration fee")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<form method=\"post\" action=\"registration_receivedforms.php\">";
|
||||
echo "<input type=\"hidden\" name=\"registration_number\" value=\"$reg_num\" />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"receivedyes\" />";
|
||||
echo "<input type=submit value=\"".i18n("Yes, this is the right form")."\" style=\"width: 400px;\"/>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}
|
||||
echo "<br />";
|
||||
|
||||
echo "</td>\n";
|
||||
|
@ -31,18 +31,22 @@ if($catr=mysql_fetch_object($catq))
|
||||
|
||||
$table=array();
|
||||
|
||||
$table['header']=array(i18n("Paid?"),i18n("Proj #"),i18n("Project Title"),i18n("Student(s)"),i18n("Div"));
|
||||
$table['widths']=array(0.5, 0.6, 3.5, 2.4, 0.5);
|
||||
$table['dataalign']=array("center","left","left","left","center");
|
||||
//only show the 'paid' column if the regfee > 0. if registration is fee, then we dont care about the 'paid' column!
|
||||
if($config['regfee']>0)
|
||||
{
|
||||
$table['header']=array(i18n("Paid?"),i18n("Proj #"),i18n("Project Title"),i18n("Student(s)"),i18n("Div"));
|
||||
$table['widths']=array(0.5, 0.6, 3.5, 2.4, 0.5);
|
||||
$table['dataalign']=array("center","left","left","left","center");
|
||||
}
|
||||
else
|
||||
{
|
||||
$table['header']=array(i18n("Proj #"),i18n("Project Title"),i18n("Student(s)"),i18n("Div"));
|
||||
$table['widths']=array( 0.6, 3.7, 2.7, 0.5);
|
||||
$table['dataalign']=array("left","left","left","center");
|
||||
|
||||
}
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
switch($r->status)
|
||||
{
|
||||
case "paymentpending": $status_text="No"; break;
|
||||
case "complete": $status_text=""; break;
|
||||
}
|
||||
$status_text=i18n($status_text);
|
||||
|
||||
$divq=mysql_query("SELECT division,division_shortform FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' AND id='".$r->projectdivisions_id."'");
|
||||
$divr=mysql_fetch_object($divq);
|
||||
|
||||
@ -63,7 +67,21 @@ if($catr=mysql_fetch_object($catq))
|
||||
$studnum++;
|
||||
}
|
||||
|
||||
$table['data'][]=array($status_text,$r->proj_num,$r->title,$students,i18n($divr->division_shortform));
|
||||
//only show the paid column if regfee >0
|
||||
if($config['regfee']>0)
|
||||
{
|
||||
switch($r->status)
|
||||
{
|
||||
case "paymentpending": $status_text="No"; break;
|
||||
case "complete": $status_text=""; break;
|
||||
}
|
||||
$status_text=i18n($status_text);
|
||||
|
||||
$table['data'][]=array($status_text,$r->proj_num,$r->title,$students,i18n($divr->division_shortform));
|
||||
}
|
||||
else
|
||||
$table['data'][]=array($r->proj_num,$r->title,$students,i18n($divr->division_shortform));
|
||||
|
||||
}
|
||||
|
||||
$pdf->addTable($table);
|
||||
|
Loading…
Reference in New Issue
Block a user