= 0 && $cleaned <= 1) $set_style = $cleaned; } try { $dbh = returnDatabaseHandel(); $dbh->beginTransaction(); $sth = $dbh->prepare($statement255); $sth->execute(array($set_lang, $set_xml, $set_mobi, $set_style, $_SESSION['MemberID'])); $dbh->commit(); } catch (Exception $e) { print("Failed ut update user_options " . $e->getMessage()); $dbh->rollBack(); } } } $root = $doc->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. */ $db_lang = 'en'; $db_xml = TRUE; $db_mobi = TRUE; $db_set = 0; try { $dbh = returnDatabaseHandel(); $sth = $dbh->prepare($statement254); $count = 0; if ($sth->execute(array($_SESSION['MemberID']))) { while ($row = $sth->fetch(PDO::FETCH_ASSOC)) // && ($row['start_datetime'] > date(''))) { $count++; $db_lang = $row['language']; $db_xml = $row['prefer_xml']; $db_mobi = $row['despize_mobile']; $db_set = $row['prefered_css']; } } } catch (Exception $e) { } $h3 = $doc->createElement('h3'); $h3->appendChild($doc->createTextNode($text0100)); $body->appendChild($h3); $form = createForm($doc, "preferences.php"); $fieldSet = $doc->createElement('fieldset'); $label = $doc->createElement('label', $text0101); $label->setAttribute('for', 'xml'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input = $doc->createElement('select'); $input->setAttribute('name', 'language'); $option = $doc->createElement('option'); $option->setAttribute('value', 'zz'); if (isset($_SESSION['language']) && $_SESSION['language'] === 'zz') $option->setAttribute('selected', 'selected'); $option->appendChild($doc->createTextNode('Browser')); $input->appendChild($option); $option = $doc->createElement('option'); $option->setAttribute('value', 'en'); if (isset($_SESSION['language']) && $_SESSION['language'] === 'en') $option->setAttribute('selected', 'selected'); $option->appendChild($doc->createTextNode('English')); $input->appendChild($option); $option = $doc->createElement('option'); $option->setAttribute('value', 'fr'); if (isset($_SESSION['language']) && $_SESSION['language'] === 'fr') $option->setAttribute('selected', 'selected'); $option->appendChild($doc->createTextNode('French')); $input->appendChild($option); $option = $doc->createElement('option'); $option->setAttribute('value', 'es'); if (isset($_SESSION['language']) && $_SESSION['language'] === 'es') $option->setAttribute('selected', 'selected'); $option->appendChild($doc->createTextNode('Spanish')); $input->appendChild($option); $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); $label = $doc->createElement('label', $text0102); $label->setAttribute('for', 'xml'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input = createCheckboxInput($doc, 'xml', 'xml', NULL, NULL, FALSE); /* $input = $doc->createElement('input'); $input->setAttribute('type', 'checkbox'); $input->setAttribute('name', 'xml'); $input->setAttribute('value', 'xml'); $input->setAttribute('autocomplete', 'off'); */ if ($_SESSION['prefXML'] === TRUE) $input->setAttribute('checked', 'checked'); // else // $input->setAttribute('checked', ''); $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); $label = $doc->createElement('label', $text0103); $label->setAttribute('for', 'mobile'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input = createCheckboxInput($doc, 'mobile', 'mobile', NULL, NULL, FALSE); /* $input = $doc->createElement('input'); $input->setAttribute('type', 'checkbox'); $input->setAttribute('name', 'mobile'); $input->setAttribute('value', 'mobile'); $input->setAttribute('autocomplete', 'off'); */ if ($_SESSION['despizeMobile'] === TRUE) $input->setAttribute('checked', 'checked'); // else // $input->setAttribute('checked', ''); $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); $label = $doc->createElement('label', $text0104); $label->setAttribute('for', 'style'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input = $doc->createElement('select'); $input->setAttribute('name', 'style'); $input->setAttribute('autocomplete', 'off'); for ($i = 0; $i < 2; $i++) { $option = $doc->createElement('option'); $option->setAttribute('value', $i); if ($i === $_SESSION['prefCSS']) $option->setAttribute('selected', 'selected'); $option->appendChild($doc->createTextNode($i)); $input->appendChild($option); } $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); /* * The order of this is unusual to provide for special labeling. */ $extendedText = $text0105; $input = createCheckboxInput($doc,'customCSS', 'customCSS', NULL, NULL, FALSE); if (userHasRegisteredCustomCSS($_SESSION['MemberID'])) { /* * SECURITE - if the original file name was not properly sterilized, this * is where the injection attack can occur. */ $extendedText .= "(" . returnUserCSSOriginalFileName($_SESSION['MemberID']) . ")"; if ($_SESSION['useCustomCSS'] === TRUE) $input->setAttribute('checked', 'checked'); } else { $input->setAttribute('disabled', 'disabled'); $extendedText .= "($text0107)"; } $label = $doc->createElement('label', $extendedText); $label->setAttribute('for', 'customCSS'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); $label = $doc->createElement('label', $text0106); $label->setAttribute('for', 'cssfile'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input =$doc->createElement('input'); $input->setAttribute('type', 'file'); $input->setAttribute('name', 'cssfile'); $fieldSet->appendChild($input); $input = createSubmitInput($doc, $text0007, $text0007); /* $input = $doc->createElement('input'); $input->setAttribute('type', 'submit'); $input->setAttribute('name', $text0007); $input->setAttribute('value', $text0007); */ $fieldSet->appendChild($input); $label = $doc->createElement('br'); $fieldSet->appendChild($label); if (returnMemberUseEncryptions($_SESSION['MemberID'])) $label = createLabel($doc, $text0130, 'encryptEmail', 'MemberEditorInputLabel', 'Checked'); else $label = createLabel($doc, $text0130, 'encryptEmail', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $label = createCheckboxInput($doc, 'encryptEmail'); $fieldSet->appendChild($label); $label = createBr($doc); $fieldSet->appendChild($label); $label = $doc->createElement('label', $text0131); $label->setAttribute('for', 'pgpkeyfile'); $label->setAttribute('class', 'MemberEditorInputLabel'); $fieldSet->appendChild($label); $input =$doc->createElement('input'); $input->setAttribute('type', 'file'); $input->setAttribute('name', 'pgpkeyfile'); $fieldSet->appendChild($input); $input = createSubmitInput($doc, $text0007, $text0007); $form->appendChild($fieldSet); $input = createSubmitInput($doc, $text0005, $text0005); /* $input = $doc->createElement('input'); $input->setAttribute('type', 'submit'); $input->setAttribute('name', $text0005); $input->setAttribute('value', $text0005);*/ $form->appendChild($input); if ($changed) { $input = createSubmitInput($doc, $text0006, $text0006); /* $input = $doc->createElement('input'); $input->setAttribute('type', 'submit'); $input->setAttribute('name', $text0006); $input->setAttribute('value', $text0006); */ $form->appendChild($input); } $body->appendChild($form); $body->appendChild(generateFooter($doc)); if ($prettyPretty) $doc->formatOutput = true; outputDoc($doc); } else generateIndexRedirect(); ?>