forked from science-ation/science-ation
Remove a wackload of debugging stuff from the judge class and remove a few fields that should not be editable
This commit is contained in:
parent
b2c2fdb38b
commit
35e4e3cf22
@ -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."<br>\n");
|
||||
// print($query."<br>\n");
|
||||
mysql_query($query);
|
||||
|
||||
}
|
||||
|
@ -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 "<option value=\"\">-------------</option>";
|
||||
}
|
||||
print_r($this->fieldOptions[$f]);
|
||||
// print_r($this->fieldOptions[$f]);
|
||||
|
||||
while($opt=mysql_fetch_object($optq))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user