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(generateAdminNavigationBar($doc)); */ $_SESSION['subNav'] = 1; $body->appendChild(generateSelectedMenuBar($doc, 1)); /* * Insert content here. */ if (isset($_GET['id'])) { $id = cleanInput($_GET['id']); if (is_numeric($id)) { $id = (int) $id; $body->appendChild(generateTransactionDetail($doc, $id)); } } $body->appendChild(generateTransactionEditorForm($doc, $targetMemberID, $targetTransactionID)); $bodyDiv = $doc->createElement('div'); $tableDiv = $doc->createElement('div'); $tableDiv->appendChild(generateMemberLookupForm($doc, 'transactionEditor.php')); /* if (!isset($_SESSION['TargetMemberID'])) $_SESSION['TargetMemberID'] = 0;*/ $tableDiv->appendChild(generateTransactionTable($doc, $targetMemberID)); $bodyDiv->appendChild($tableDiv); /* $editorDiv = $doc->createElement('div'); $editorDiv->setAttribute('id', 'MemberEditorDiv'); $form = $doc->createElement('form'); $form->setAttribute('action', 'transactionEditor.php'); $form->setAttribute('method', 'post'); $label = $doc->createElement('H3'); $label->appendChild($doc->createTextNode("Transaction Editor")); $form->appendChild($label); $label = $doc->createElement('input'); $label->setAttribute('type', 'hidden'); $label->setAttribute('name', 'id'); $label->setAttribute('readonly', 'readonly'); $form->appendChild($label); $label = $doc->createElement('input'); $label->setAttribute('type', 'hidden'); $label->setAttribute('name', 'first_name'); $label->setAttribute('readonly', 'readonly'); $form->appendChild($label); $label = $doc->createElement('input'); $label->setAttribute('type', 'hidden'); $label->setAttribute('name', 'last_name'); $label->setAttribute('readonly', 'readonly'); $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', 'Member ID:'); $label->setAttribute('for', 'member_id'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'number'); $input->setAttribute('name', 'member_id'); if ($targetMemberID > 0) { $input->setAttribute('value', "$targetMemberID"); $input->setAttribute('readonly', 'readonly'); } $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Price:'); $label->setAttribute('for', 'total_price'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'number'); $input->setAttribute('name', 'total_price'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Reference:'); $label->setAttribute('for', 'reference_number'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'number'); $input->setAttribute('name', 'reference_number'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Quantity:'); $label->setAttribute('for', 'quantity'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'number'); $input->setAttribute('name', 'quantity'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Category:'); $label->setAttribute('for', 'category'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'text'); $input->setAttribute('name', 'category'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Account Type:'); $label->setAttribute('for', 'account_type'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'text'); $input->setAttribute('name', 'account_type'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Info-Source:'); $label->setAttribute('for', 'info_source'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'text'); $input->setAttribute('name', 'info_source'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Months Added:'); $label->setAttribute('for', 'months_added'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'number'); $input->setAttribute('name', 'months_added'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $label = $doc->createElement('label', 'Memo:'); $label->setAttribute('for', 'memo'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSetDiv->appendChild($label); $input = $doc->createElement('input'); $input->setAttribute('type', 'text'); $input->setAttribute('name', 'memo'); $input->setAttribute('autocomplete', 'off'); $fieldSetDiv->appendChild($input); $label = $doc->createElement('br'); $fieldSetDiv->appendChild($label); $fieldSet->appendChild($fieldSetDiv); $form->appendChild($fieldSet); $input = $doc->createElement('input'); $input->setAttribute('type', 'reset'); $form->appendChild($input); $input = $doc->createElement('input'); $input->setAttribute('type', 'submit'); $form->appendChild($input); $editorDiv->appendChild($form); */ $body->appendChild($bodyDiv); $body->appendChild(generateFooter($doc)); outputDoc($doc); } else generateIndexRedirect(); ?>