diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php index 33d5c81..6077995 100644 --- a/admin/registration_receivedforms.php +++ b/admin/registration_receivedforms.php @@ -54,7 +54,10 @@ $showformatbottom=true; $statusstudent=studentStatus($reg_id); $statusemergencycontact=emergencycontactStatus($reg_id); $statusproject=projectStatus($reg_id); - $statusmentor=mentorStatus($reg_id); + if($config['participant_mentor']=="yes") + $statusmentor=mentorStatus($reg_id); + else + $statusmentor="complete"; $statussafety=safetyStatus($reg_id); if( @@ -199,13 +202,30 @@ echo mysql_Error(); $q=mysql_query("SELECT id FROM registrations WHERE num='".$_POST['registration_number']."'"); $r=mysql_fetch_object($q); $reg_id=$r->id; - $q=mysql_query("SELECT projects.projectcategories_id, projects.projectdivisions_id FROM projects WHERE registrations_id='$reg_id'"); + $q=mysql_query("SELECT projects.projectcategories_id, + projects.projectdivisions_id, + projectcategories.category_shortform, + projectdivisions.division_shortform + FROM + projects, + projectcategories, + projectdivisions + WHERE + registrations_id='$reg_id' + AND projects.projectdivisions_id=projectdivisions.id + AND projects.projectcategories_id=projectcategories.id + AND projectcategories.year='{$config['FAIRYEAR']}' + AND projectdivisions.year='{$config['FAIRYEAR']}' + "); + echo mysql_error(); $r=mysql_fetch_object($q); $projectnumber=$config['project_num_format']; //first replace the division and category $projectnumber=str_replace('D',$r->projectdivisions_id,$projectnumber); $projectnumber=str_replace('C',$r->projectcategories_id,$projectnumber); + $projectnumber=str_replace('d',$r->division_shortform,$projectnumber); + $projectnumber=str_replace('c',$r->category_shortform,$projectnumber); //now change the N to a % so we can use it as a wildcard $querynum=str_replace('N','%',$projectnumber); diff --git a/config/categories.php b/config/categories.php index 70fd291..b93a9bd 100644 --- a/config/categories.php +++ b/config/categories.php @@ -44,6 +44,7 @@ mysql_query("UPDATE projectcategories SET ". "id='".$_POST['id']."', ". "category='".mysql_escape_string(stripslashes($_POST['category']))."', ". + "category_shortform='".mysql_escape_string(stripslashes($_POST['category_shortform']))."', ". "mingrade='".$_POST['mingrade']."', ". "maxgrade='".$_POST['maxgrade']."' ". "WHERE id='".$_POST['saveid']."'"); @@ -68,9 +69,10 @@ } else { - mysql_query("INSERT INTO projectcategories (id,category,mingrade,maxgrade,year) VALUES ( ". + mysql_query("INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,year) VALUES ( ". "'".$_POST['id']."', ". "'".mysql_escape_string(stripslashes($_POST['category']))."', ". + "'".mysql_escape_string(stripslashes($_POST['category_shortform']))."', ". "'".$_POST['mingrade']."', ". "'".$_POST['maxgrade']."', ". "'".$config['FAIRYEAR']."')"); @@ -103,6 +105,7 @@ echo "
"; echo outputStatus($statusproject); echo " | |
"; - echo ""; - echo i18n("Mentor Information"); - echo ""; - echo " | "; - //check to see if its complete - $statusmentor=mentorStatus(); - echo outputStatus($statusmentor); - echo " |
"; + echo ""; + echo i18n("Mentor Information"); + echo ""; + echo " | "; + //check to see if its complete + $statusmentor=mentorStatus(); + echo outputStatus($statusmentor); + echo " |
"; diff --git a/version.txt b/version.txt index e9307ca..50ffc5a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.2 +2.0.3 |