diff --git a/admin/judges_judges.php b/admin/judges_judges.php index f49e7f4..ec850aa 100644 --- a/admin/judges_judges.php +++ b/admin/judges_judges.php @@ -66,14 +66,12 @@ function openjudgeinfo(id) judges.email, judges.complete, judges_years.year - FROM judges - LEFT JOIN judges_years ON judges.id=judges_years.judges_id + JOIN judges_years ON judges.id=judges_years.judges_id WHERE - (judges_years.year='".$config['FAIRYEAR']."' - OR - judges_years.year IS NULL) + judges_years.year='".$config['FAIRYEAR']."' + AND judges.deleted='no' ORDER BY lastname, firstname"; @@ -81,12 +79,10 @@ function openjudgeinfo(id) $num=mysql_num_rows($q); echo i18n("Listing %1 judges total. See the bottom for breakdown of judges by complete status",array($num),array("the number of judges")); - echo mysql_error(); echo ""; echo " ".i18n("Judge Name").""; echo " ".i18n("Email Address").""; - echo " ".i18n("Active").""; echo " ".i18n("Complete").""; echo " ".i18n("Actions").""; echo ""; @@ -98,16 +94,6 @@ function openjudgeinfo(id) echo "id)\">$r->firstname $r->lastname"; echo ""; echo "$r->email"; - if($r->year) - { - echo "".i18n("yes").""; - $active++; - } - else - { - echo "".i18n("no").""; - $inactive++; - } if($r->complete=="yes" && $r->year) { @@ -121,14 +107,16 @@ function openjudgeinfo(id) $completeno++; } echo ""; - echo "id\">"; + echo "id\">"; echo ""; echo ""; } echo ""; + echo i18n("Note: Deleting judges from this list only deactivates the judge for this year's fair. To completely delete a judge, use the 'Manage Judges' page"); echo "
"; - echo i18n("There are %1 total judges, %2 of which are active for this year, %3 are inactive.",array($num,$active,$inactive),array("the number of judges","number of active judges","number of inactive judges")); + echo "
"; + echo i18n("There are %1 total active judges.",array($num),array("the number of judges")); echo "
"; echo i18n("There are %1 complete judges.",array($completeyes),array("the number of judges")); echo "
"; diff --git a/admin/judges_manager.php b/admin/judges_manager.php index 4809773..b65d9bd 100644 --- a/admin/judges_manager.php +++ b/admin/judges_manager.php @@ -73,7 +73,7 @@ function openjudgeinfo(id) print(""); print(""); - echo i18n("Note: Deleting a judge from this screen only unlinks them from the current fairyear"); +// echo i18n("Note: Deleting a judge from this screen only unlinks them from the current fairyear"); $editor = new TableEditor('judge'); diff --git a/judge.class.php b/judge.class.php index 3a36628..a238f78 100644 --- a/judge.class.php +++ b/judge.class.php @@ -166,6 +166,9 @@ function tableEditorGetList($editor) $where[] = "judges.complete='yes'"; break; } + //only show non-deleted judges + $where[] = "judges.deleted='no'"; + return array($sel, $from, $where); } @@ -327,8 +330,9 @@ function tableEditorDelete() mysql_query("DELETE FROM judges_teams_link WHERE judges_id='$id' AND year=".$config['FAIRYEAR']."'"); mysql_query("DELETE FROM judges_years WHERE judges_id='$id' AND year='".$config['FAIRYEAR']."'"); + mysql_query("UPDATE judges SET deleted='yes', deleteddatetime=NOW() WHERE id='$id'"); - echo happy(i18n("Successfully removed judge from this year's fair")); + echo happy(i18n("Successfully deleted the judge")); } diff --git a/register_judges_main.php b/register_judges_main.php index 6c83ec2..8b02a87 100644 --- a/register_judges_main.php +++ b/register_judges_main.php @@ -41,8 +41,8 @@ if($_GET['action']=="delete") { //okay here we go, lets get rid of them completely, since this is what theyve asked for - echo happy(i18n("Judge account successfully deactivated. Goodbye!",array($config['FAIRYEAR']))); - mysql_query("UPDATE judges SET deleted='Y', deleteddatetime=NOW() WHERE id='".$_SESSION['judges_id']."'"); + echo happy(i18n("Judge account successfully deleted. Goodbye!",array($config['FAIRYEAR']))); + mysql_query("UPDATE judges SET deleted='yes', deleteddatetime=NOW() WHERE id='".$_SESSION['judges_id']."'"); unset($_SESSION['judges_id']); unset($_SESSION['email']); diff --git a/register_judges_personal.php b/register_judges_personal.php index 72f256d..6389921 100644 --- a/register_judges_personal.php +++ b/register_judges_personal.php @@ -145,7 +145,7 @@ echo " \n"; echo "\n"; -echo " ".i18n("I can judge in the following languages").""; +echo " ".i18n("I can judge in the following languages")." ".REQUIREDFIELD.""; echo " "; //grab the current languages that are selected @@ -161,7 +161,7 @@ while($r=mysql_fetch_object($q)) { if(in_array($r->lang,$currentlanguages)) $ch="checked=\"checked\""; else $ch=""; - echo "lang\" /> $r->langname ".REQUIREDFIELD."
"; + echo "lang\" /> $r->langname
"; } echo " \n";