From 35e4e3cf22f2bbaa9107c6d5c76b8ffe1a803c88 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Oct 2006 18:49:06 +0000 Subject: [PATCH] Remove a wackload of debugging stuff from the judge class and remove a few fields that should not be editable --- judge.class.php | 21 +++++++++++---------- tableeditor.class.php | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/judge.class.php b/judge.class.php index dedaab0..dbc6fda 100644 --- a/judge.class.php +++ b/judge.class.php @@ -11,15 +11,15 @@ $judges_fields = array( 'firstname' => 'First Name', 'phonework' => 'Phone (Work)', 'phoneworkext' => 'Phone Ext. (Work)', 'organization' => 'Organization', - 'created' => 'Created', - 'lastlogin' => 'Last Login', +// 'created' => 'Created', +// 'lastlogin' => 'Last Login', 'address' =>"Address 1", 'address2' =>"Address 2", 'city' => 'City', 'province' => 'Province', 'postalcode' => 'Postal Code', - 'deleted' => 'Deleted', - 'deleteddatetime' => 'Deleted Date/Time', +// 'deleted' => 'Deleted', +// 'deleteddatetime' => 'Deleted Date/Time', 'expertise_other' => 'Other Expertise/Notes', 'complete' => "Complete"); @@ -30,10 +30,10 @@ class person { function person($person_id=NULL) { if($person_id == NULL) { - print("Empty constructor called\n"); +// print("Empty constructor called\n"); $this->id = FALSE; } else { - print("ID $person_id construction called\n"); +// print("ID $person_id construction called\n"); $this->id = $person_id; } } @@ -89,6 +89,7 @@ function tableEditorSetup($editor) $editor->setRecordType('Judge'); $editor->setListFields($l); $editor->setEditFields($e); + $editor->setFieldOptions('complete', array( array('key' => 'yes', 'val' => 'Yes'), array('key' => 'no', 'val' => 'No'))); @@ -148,7 +149,7 @@ function tableEditorLoad() $id = $this->id; - print("Loading Judge ID $id\n"); +// print("Loading Judge ID $id\n"); $q=mysql_query("SELECT judges.* FROM judges @@ -224,7 +225,7 @@ function tableEditorSave($data) $query .= " WHERE id='{$this->id}'"; - echo $query; +// echo $query; mysql_query($query); @@ -240,7 +241,7 @@ function tableEditorSave($data) $query = "INSERT INTO judges_languages (judges_id,languages_lang) VALUES ('{$this->id}','$k')"; - print("$query"); +// print("$query"); mysql_query($query); } @@ -273,7 +274,7 @@ function tableEditorSave($data) $query = "INSERT INTO judges_expertise (judges_id,projectdivisions_id,val,year) values ('{$this->id}','{$regs[1]}',{$data[$k]},'{$config['FAIRYEAR']}')"; - print($query."
\n"); +// print($query."
\n"); mysql_query($query); } diff --git a/tableeditor.class.php b/tableeditor.class.php index 6caa1b8..f70a8cb 100644 --- a/tableeditor.class.php +++ b/tableeditor.class.php @@ -494,14 +494,14 @@ class TableEditor $data = new $this->classname(); $insert_mode = 1; } else { - print("Insesrt mode=0\n"); +// print("Insesrt mode=0\n"); $data = new $this->classname($_POST['editsave']); $insert_mode = 0; } $editdata = array(); - print_r($_POST); +// print_r($_POST); foreach($this->editfields AS $f=>$n) { $inputtype = ''; @@ -752,7 +752,7 @@ class TableEditor } echo ""; } - print_r($this->fieldOptions[$f]); +// print_r($this->fieldOptions[$f]); while($opt=mysql_fetch_object($optq)) {