Added an event editor

This commit is contained in:
jacob 2010-06-10 19:50:49 +00:00
parent 6a24618359
commit 4b95aebe8f
2 changed files with 37 additions and 2 deletions

View File

@ -23,6 +23,7 @@
?>
<?
require("../common.inc.php");
require("../tableeditor.class.php");
require_once("../user.inc.php");
user_auth_required('committee', 'admin');
@ -31,8 +32,32 @@
'Administration' => 'admin/index.php'),
"events_scheduling" );
echo "<br />";
echo "<br />";
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();
?>

10
db/db.update.177.sql Normal file
View File

@ -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 ;