From 4b95aebe8f632d99e488a0baced24c3867c51523 Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 10 Jun 2010 19:50:49 +0000 Subject: [PATCH] Added an event editor --- admin/events.php | 29 +++++++++++++++++++++++++++-- db/db.update.177.sql | 10 ++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 db/db.update.177.sql diff --git a/admin/events.php b/admin/events.php index 772e1af0..9184a496 100644 --- a/admin/events.php +++ b/admin/events.php @@ -23,6 +23,7 @@ ?> 'admin/index.php'), "events_scheduling" ); - echo "
"; +echo "
"; - send_footer(); +$editor = new TableEditor('events', + array( + "name" => "Event Name", + "summary" => "Summary", + "description_link" => "Link to Description" + ), + array( + "name" => "Event Name", + "summary" => "Summary", + "description_link" => "Link to Description", + "suggested_grades" => "Suggested Grades", + "min_judges" => "Minimum Number of Judges", + "max_judges" => "Maximum Number of Judges" + ), + array( + "conferences_id" => $conference['id'] + ) +); + +$editor->setPrimaryKey("id"); +$editor->setRecordType("Event"); +$editor->setDefaultSortField("name"); +$editor->execute(); + +send_footer(); ?> diff --git a/db/db.update.177.sql b/db/db.update.177.sql new file mode 100644 index 00000000..23a5f6ba --- /dev/null +++ b/db/db.update.177.sql @@ -0,0 +1,10 @@ +CREATE TABLE `events` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `conferences_id` INT NOT NULL , + `name` VARCHAR( 64 ) NOT NULL , + `summary` TEXT NULL , + `description_link` VARCHAR( 256 ) NULL , + `suggested_grades` VARCHAR( 64 ) NULL , + `min_judges` INT NULL , + `max_judges` INT NULL +) ENGINE = MYISAM ;