diff --git a/judge.class.php b/judge.class.php index f0518f2c..b3fdb0e8 100644 --- a/judge.class.php +++ b/judge.class.php @@ -2,6 +2,11 @@ class person { + var $id; + +function person($person_id) { + $this->id = $person_id; +} }; @@ -53,18 +58,23 @@ function editor_setup($editor) /* Functions for $this */ -function judge() +function judge($judge_id) { + person::person($judge_id); + } -function load($id) +function load() { + $id = $this->id; + + print("Loading Judge ID $id\n"); + $q=mysql_query("SELECT judges.* FROM judges WHERE judges.id='$id'"); echo mysql_error(); - print("Loading Judge ID $id\n"); /* We assume that the field names in the array we want to return * are the same as those in the database, so we'll turn the entire @@ -82,7 +92,11 @@ function load($id) print_r($j); return $j; +} +function save() +{ + } }; diff --git a/tableeditor.class.php b/tableeditor.class.php index 36a3a064..f23be62e 100644 --- a/tableeditor.class.php +++ b/tableeditor.class.php @@ -598,8 +598,8 @@ class TableEditor echo "

".i18n("Edit %1",array($this->recordType))."

"; echo ""; echo ""; - $person = new $this->classname(); - $e = $person->load($_GET['edit']); + $person = new $this->classname($_GET['edit']); + $e = $person->load(); /* $query="SELECT {$this->primaryKey}"; foreach($this->editfields AS $f=>$n) $query.=", `$f`";