appendChild($root); $root->appendChild(generateHead($doc)); $body = $doc->createElement('body'); $root->appendChild($body); $body->appendChild(generateMastHead($doc, $baseDir)); //$body->appendChild($doc->createElement('hr')); $_SESSION['subNav'] = NULL; $body->appendChild(generateSelectedMenuBar($doc)); /* * Insert content here. */ $editorDiv = $doc->createElement('div'); //$editorDiv->setAttribute('id', 'CourseEditorDiv'); $form = createForm($doc, 'addPicture.php'); $img = NULL; if (is_null($targetID)) $img = returnPictureForMember($_SESSION['MemberID']); else if (returnAdminStatus($_SESSION['MemberID']) || returnDirectorStatus($_SESSION['MemberID'])) { $img = returnPictureForMember($targetID); $form->appendChild(createHiddenInput($doc, 'target', $targetID)); } if (!is_null($img)) { $label = $doc->createElement('H3'); $label->appendChild($doc->createTextNode("Current picture")); $form->appendChild($label); $form->appendChild(createBr($doc)); $form->appendChild(createImg($doc, $pictureDir . $img)); } $label = $doc->createElement('H3'); $label->appendChild($doc->createTextNode("Add a picture")); $form->appendChild($label); $fieldSet = $doc->createElement('fieldset'); //$fieldSet->setAttribute('style', 'width:200px; max-width:300px;'); //margin-top:0.5em;'); $fieldSetDiv = $doc->createElement('div'); $label = $doc->createElement('label', 'File:'); $label->setAttribute('for', 'filename'); $label->setAttribute('class', 'CourseEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'file'); $input->setAttribute('name', 'filename'); $input->setAttribute('autocomplete', 'off'); $input->setAttribute('required', 'required'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $input = $doc->createElement('input'); $input->setAttribute('type', 'submit'); $input->setAttribute('value', 'upload'); $input->setAttribute('name', 'submit'); $fieldSetDiv->appendChild($input); $form->appendChild($fieldSetDiv); $editorDiv->appendChild($form); $body->appendChild($editorDiv); $body->appendChild(generateFooter($doc)); if ($prettyPretty) $doc->formatOutput = true; outputDoc($doc); } else generateIndexRedirect(); ?>