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)',
|
'phonework' => 'Phone (Work)',
|
||||||
'phoneworkext' => 'Phone Ext. (Work)',
|
'phoneworkext' => 'Phone Ext. (Work)',
|
||||||
'organization' => 'Organization',
|
'organization' => 'Organization',
|
||||||
'created' => 'Created',
|
// 'created' => 'Created',
|
||||||
'lastlogin' => 'Last Login',
|
// 'lastlogin' => 'Last Login',
|
||||||
'address' =>"Address 1",
|
'address' =>"Address 1",
|
||||||
'address2' =>"Address 2",
|
'address2' =>"Address 2",
|
||||||
'city' => 'City',
|
'city' => 'City',
|
||||||
'province' => 'Province',
|
'province' => 'Province',
|
||||||
'postalcode' => 'Postal Code',
|
'postalcode' => 'Postal Code',
|
||||||
'deleted' => 'Deleted',
|
// 'deleted' => 'Deleted',
|
||||||
'deleteddatetime' => 'Deleted Date/Time',
|
// 'deleteddatetime' => 'Deleted Date/Time',
|
||||||
'expertise_other' => 'Other Expertise/Notes',
|
'expertise_other' => 'Other Expertise/Notes',
|
||||||
'complete' => "Complete");
|
'complete' => "Complete");
|
||||||
|
|
||||||
@ -30,10 +30,10 @@ class person {
|
|||||||
function person($person_id=NULL)
|
function person($person_id=NULL)
|
||||||
{
|
{
|
||||||
if($person_id == NULL) {
|
if($person_id == NULL) {
|
||||||
print("Empty constructor called\n");
|
// print("Empty constructor called\n");
|
||||||
$this->id = FALSE;
|
$this->id = FALSE;
|
||||||
} else {
|
} else {
|
||||||
print("ID $person_id construction called\n");
|
// print("ID $person_id construction called\n");
|
||||||
$this->id = $person_id;
|
$this->id = $person_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,6 +89,7 @@ function tableEditorSetup($editor)
|
|||||||
$editor->setRecordType('Judge');
|
$editor->setRecordType('Judge');
|
||||||
$editor->setListFields($l);
|
$editor->setListFields($l);
|
||||||
$editor->setEditFields($e);
|
$editor->setEditFields($e);
|
||||||
|
|
||||||
$editor->setFieldOptions('complete', array(
|
$editor->setFieldOptions('complete', array(
|
||||||
array('key' => 'yes', 'val' => 'Yes'),
|
array('key' => 'yes', 'val' => 'Yes'),
|
||||||
array('key' => 'no', 'val' => 'No')));
|
array('key' => 'no', 'val' => 'No')));
|
||||||
@ -148,7 +149,7 @@ function tableEditorLoad()
|
|||||||
|
|
||||||
$id = $this->id;
|
$id = $this->id;
|
||||||
|
|
||||||
print("Loading Judge ID $id\n");
|
// print("Loading Judge ID $id\n");
|
||||||
|
|
||||||
$q=mysql_query("SELECT judges.*
|
$q=mysql_query("SELECT judges.*
|
||||||
FROM judges
|
FROM judges
|
||||||
@ -224,7 +225,7 @@ function tableEditorSave($data)
|
|||||||
|
|
||||||
$query .= " WHERE id='{$this->id}'";
|
$query .= " WHERE id='{$this->id}'";
|
||||||
|
|
||||||
echo $query;
|
// echo $query;
|
||||||
mysql_query($query);
|
mysql_query($query);
|
||||||
|
|
||||||
|
|
||||||
@ -240,7 +241,7 @@ function tableEditorSave($data)
|
|||||||
$query = "INSERT INTO
|
$query = "INSERT INTO
|
||||||
judges_languages (judges_id,languages_lang)
|
judges_languages (judges_id,languages_lang)
|
||||||
VALUES ('{$this->id}','$k')";
|
VALUES ('{$this->id}','$k')";
|
||||||
print("$query");
|
// print("$query");
|
||||||
mysql_query($query);
|
mysql_query($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +274,7 @@ function tableEditorSave($data)
|
|||||||
$query = "INSERT INTO judges_expertise
|
$query = "INSERT INTO judges_expertise
|
||||||
(judges_id,projectdivisions_id,val,year)
|
(judges_id,projectdivisions_id,val,year)
|
||||||
values ('{$this->id}','{$regs[1]}',{$data[$k]},'{$config['FAIRYEAR']}')";
|
values ('{$this->id}','{$regs[1]}',{$data[$k]},'{$config['FAIRYEAR']}')";
|
||||||
print($query."<br>\n");
|
// print($query."<br>\n");
|
||||||
mysql_query($query);
|
mysql_query($query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -494,14 +494,14 @@ class TableEditor
|
|||||||
$data = new $this->classname();
|
$data = new $this->classname();
|
||||||
$insert_mode = 1;
|
$insert_mode = 1;
|
||||||
} else {
|
} else {
|
||||||
print("Insesrt mode=0\n");
|
// print("Insesrt mode=0\n");
|
||||||
$data = new $this->classname($_POST['editsave']);
|
$data = new $this->classname($_POST['editsave']);
|
||||||
$insert_mode = 0;
|
$insert_mode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$editdata = array();
|
$editdata = array();
|
||||||
|
|
||||||
print_r($_POST);
|
// print_r($_POST);
|
||||||
foreach($this->editfields AS $f=>$n)
|
foreach($this->editfields AS $f=>$n)
|
||||||
{
|
{
|
||||||
$inputtype = '';
|
$inputtype = '';
|
||||||
@ -752,7 +752,7 @@ class TableEditor
|
|||||||
}
|
}
|
||||||
echo "<option value=\"\">-------------</option>";
|
echo "<option value=\"\">-------------</option>";
|
||||||
}
|
}
|
||||||
print_r($this->fieldOptions[$f]);
|
// print_r($this->fieldOptions[$f]);
|
||||||
|
|
||||||
while($opt=mysql_fetch_object($optq))
|
while($opt=mysql_fetch_object($optq))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user