appendChild($root); $root->appendChild(generateHead($doc)); $body = $doc->createElement('body'); $root->appendChild($body); $body->appendChild(generateMastHead($doc, $baseDir)); //$body->appendChild($doc->createElement('hr')); /* $body->appendChild(generateMemberNavigationBar($doc)); $body->appendChild(generateTrainingNavigationBar($doc)); */ $_SESSION['subNav'] = "0"; $body->appendChild(generateSelectedMenuBar($doc, 0)); $myClassesDiv = createDiv($doc, NULL, 'ClassTableDiv'); $tableTitle = $doc->createElement('H3'); $tableTitle->appendChild($doc->createTextNode("Classes I'm Teaching")); $myClassesDiv->appendChild($tableTitle); $myClassesDiv->appendChild(generateTrainingTable($doc, NULL, $sort_order, $sort_field, '', NULL, $_SESSION['MemberID'])); $newClassDiv = createDiv($doc, 'NewClassDiv'); $form = createForm($doc, 'training.php'); $fieldSet = $doc->createElement('fieldset'); $h3 = $doc->createElement('h3'); $h3->appendChild($doc->createTextNode('Configure a New Class')); $fieldSet->appendChild($h3); $fieldSet->appendChild(createLabel($doc, "New class: ", 'newClass')); if (returnAdminStatus($_SESSION['MemberID']) || returnDirectorStatus($_SESSION['MemberID'])) { $fieldSet->appendChild(generateCourseSelector($doc, 'newClass', NULL)); $fieldSet->appendChild(createBr($doc)); $fieldSet->appendChild(createLabel($doc, 'Instructor: ', 'instructor')); $fieldSet->appendChild(generateMemberSelector($doc, 'instructor', $_SESSION['MemberID'])); } else $fieldSet->appendChild(generateCourseSelector($doc, 'newClass', $_SESSION['MemberID'])); $fieldSet->appendChild(createBr($doc)); $fieldSet->appendChild(createLabel($doc, "Starting at: ", 'startdate')); $fieldSet->appendChild(createDateInput($doc, 'startdate', (string)date('Y-m-d'), NULL, NULL, date($dbDateFormat))); $fieldSet->appendChild(createTimeInput($doc, 'starttime', '08:00')); $fieldSet->appendChild(createBr($doc)); $fieldSet->appendChild(createLabel($doc, 'Cost: ', 'cost')); $fieldSet->appendChild(createNumberInput($doc, 'cost', '0.00', NULL, NULL, '0')); $fieldSet->appendChild(createBr($doc)); $fieldSet->appendChild(createLabel($doc, 'Seats: ', 'seats')); $seats = createNumberInput($doc, 'seats', '12', NULL, NULL, 1, 120); $seats->setAttribute('step', '1'); $fieldSet->appendChild($seats); $fieldSet->appendChild(createBr($doc)); $fieldSet->appendChild(createSubmitInput($doc, 'addClass', 'Add A Class')); $form->appendChild($fieldSet); $newClassDiv->appendChild($form); $myClassesDiv->appendChild($newClassDiv); $body->appendChild($myClassesDiv); $myClassesDiv = $doc->createElement('div'); $myClassesDiv->setAttribute('id', 'ClassTableDiv'); $tableTitle = $doc->createElement('H3'); $tableTitle->appendChild($doc->createTextNode("Upcoming Classes")); $myClassesDiv->appendChild($tableTitle); $myClassesDiv->appendChild(generateTrainingTable($doc, 'training.php', $sort_order, $sort_field)); $body->appendChild($myClassesDiv); /* if (isset($_SESSION['FirstName']) && isset($_SESSION['LastName'])) { } $myClassesDiv->appendChild(generateBriefTrainingTable($doc, $baseDir)); */ $body->appendChild(generateFooter($doc)); outputDoc($doc); } else generateIndexRedirect(); ?>