forked from science-ation/science-ation
Add "complete or paymentpending" dropdown as options when viewing the registration list or registration stats
This commit is contained in:
parent
9d79e2fe98
commit
81461c0601
@ -319,6 +319,7 @@ $(document).ready(function() {
|
||||
//if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
||||
$status_str = array('' => 'Any Status', 'complete' => 'Complete',
|
||||
'paymentpending' => ($config['regfee']>0) ? 'Payment Pending' : '',
|
||||
'completeorpaymentpending' => ($config['regfee']>0) ? 'Complete or Payment Pending' : '',
|
||||
'open' => 'Open', 'new' => 'New');
|
||||
|
||||
$showstatus = $_GET['showstatus'];
|
||||
@ -334,7 +335,16 @@ $(document).ready(function() {
|
||||
</tr></table>
|
||||
<?
|
||||
|
||||
if($showstatus) $wherestatus="AND status='$showstatus' ";
|
||||
if($showstatus) {
|
||||
switch($showstatus) {
|
||||
case "complete": $wherestatus="AND status='complete' "; break;
|
||||
case "paymentpending": $wherestatus="AND status='paymentpending' "; break;
|
||||
case "completeorpaymentpending": $wherestatus="AND (status='complete' OR status='paymentpending') "; break;
|
||||
case "open": $wherestatus="AND status='open' "; break;
|
||||
case "new": $wherestatus="AND status='new' "; break;
|
||||
default: $wherestatus="";
|
||||
}
|
||||
}
|
||||
else $wherestatus="";
|
||||
|
||||
$q = list_query($year, $wherestatus, false);
|
||||
|
@ -45,7 +45,10 @@
|
||||
$status_str[''] = i18n("Any Status");
|
||||
$status_str['complete'] = i18n("Complete");
|
||||
//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) $status_str['paymentpending'] = i18n("Payment Pending");
|
||||
if($config['regfee']>0) {
|
||||
$status_str['paymentpending'] = i18n("Payment Pending");
|
||||
$status_str['completeorpaymentpending'] = i18n("Complete or Payment Pending");
|
||||
}
|
||||
$status_str['open'] = i18n("Open");
|
||||
$status_str['new'] = i18n("New");
|
||||
|
||||
@ -66,10 +69,18 @@ $q=mysql_query("SELECT * FROM projectdivisions WHERE year='$year' ORDER BY id");
|
||||
while($r=mysql_fetch_object($q))
|
||||
$divs[$r->id]=$r->division;
|
||||
|
||||
if($showstatus) $wherestatus="AND status='$showstatus' ";
|
||||
if($showstatus) {
|
||||
switch($showstatus) {
|
||||
case "complete": $wherestatus="AND status='complete' "; break;
|
||||
case "paymentpending": $wherestatus="AND status='paymentpending' "; break;
|
||||
case "completeorpaymentpending": $wherestatus="AND (status='complete' OR status='paymentpending') "; break;
|
||||
case "open": $wherestatus="AND status='open' "; break;
|
||||
case "new": $wherestatus="AND status='new' "; break;
|
||||
default: $wherestatus="";
|
||||
}
|
||||
}
|
||||
else $wherestatus="";
|
||||
switch($_GET['sort'])
|
||||
{
|
||||
switch($_GET['sort']) {
|
||||
case 'status': $ORDERBY="registrations.status DESC, projects.title"; break;
|
||||
case 'num': $ORDERBY="registrations.num"; break;
|
||||
case 'projnum': $ORDERBY="projects.projectsort, projects.projectnumber"; break;
|
||||
@ -77,7 +88,6 @@ else $wherestatus="";
|
||||
case 'cat': $ORDERBY="projects.projectcategories_id, projects.title"; break;
|
||||
case 'div': $ORDERBY="projects.projectdivisions_id, projects.title"; break;
|
||||
default: $ORDERBY="registrations.status DESC, projects.title"; break;
|
||||
|
||||
}
|
||||
|
||||
$q=mysql_query("SELECT registrations.id AS reg_id,
|
||||
|
Loading…
Reference in New Issue
Block a user