function baseAccount(&$session, $message) { $session->trace(TC_Gui1, 'baseAccount'); $reload = false; if (isset($_POST['account_user']) && !empty($_POST['account_user'])) { $account_user = $_POST['account_user']; } else { $account_user = $session->fUserName; $reload = true; } if (!empty($_POST['account_user2']) && $account_user != $_POST['account_user2']) { $account_user = $_POST['account_user2']; $reload = true; } if (!$reload) { $id = dbUserId($session, $account_user); } else { list($id, $_POST['account_locked'], $_POST['account_width'], $_POST['account_height'], $_POST['account_maxhits'], $_POST['account_theme'], $_POST['account_startpage'], $_POST['account_email']) = dbGetRecordByClause($session, T_User, 'id,locked,width,height,maxhits,theme,startpage,email', 'name=' . dbSqlString($session, $account_user)); } guiStandardHeader($session, 'Einstellungen für ' . $account_user, Th_StandardHeader, Th_StandardBodyStart); if (!empty($message)) { guiParagraph($session, $message, false); } guiStartForm($session); outDivision($session); outHiddenField($session, 'account_user', $account_user); outTable(); outTableRecordCells('Benutzername', $account_user); outTableRecord(); outTablePasswordField($session, 'Passwort:', 'account_code', '', 64, 32); outTableRecordDelim(); outTablePasswordField($session, 'Wiederholung:', 'account_code2', '', 64, 32); outTableRecordDelim(); outTableTextField($session, 'EMail:', 'account_email', null, 64, 64); outTableRecordDelim(); outTableCheckBox($session, 'Gesperrt', 'account_locked', 'Gesperrt'); outTableRecordDelim(); dbGetThemes($session, $theme_names, $theme_numbers); outTableComboBox($session, 'Oberfläche (Skin):', 'account_theme', $theme_names, $theme_numbers, array_search($_POST['account_theme'], $theme_numbers)); outTableRecordDelim(); outTableTextField($session, 'Eingabefeldbreite:', 'account_width', null, 64, 3); outTableRecordDelim(); outTableTextField($session, 'Eingabefeldhöhe:', 'account_height', null, 64, 3); outTableRecordDelim(); outTableTextField($session, 'Zahl Suchergebnisse:', 'account_maxhits', null, 64, 3); outTableRecordDelim(); $names = array('WikiSeite:', 'Übersicht', 'Einstellungen', 'Wikisuche', 'Letze Änderungen', 'StartSeite', 'Hilfe'); $values = array('', P_Home, P_Account, P_Search, P_LastChanges, 'StartSeite', 'Hilfe'); if (($pos = strpos($_POST['account_startpage'], '!')) == 0 && is_int($pos)) { $ix = array_search($_POST['account_startpage'], $values); } else { $ix = 0; } outTableCell('Startseite:'); outTableDelim(); outComboBox($session, 'account_startpageoffer', $names, $values, $ix); echo ' '; outTextField($session, 'account_startpage', null, 45, 128); outTableDelimAndRecordEnd(); modUserTableData($session, $id); outTableEnd(); modUserOwnData($session, $id); outNewline(); outButton($session, "account_change", "Ändern"); outNewline(); outNewline(); $change = $session->hasRight(R_User, R_Put); $new = $session->hasRight(R_User, R_New); $new = $session->fUserId <= 2 || $session->fUserName == 'wk' || $session->fUserName == 'admin' || $session->testFeature(FEATURE_SIMPLE_USER_MANAGEMENT) || strpos($session->fUserName, $session->fAdmins) > 0; $change = $new; if ($change || $new) { guiLine($session, 2); outTableAndRecord(); outTableTextField($session, 'Name:', "account_user2", null, 32, 32); outTableRecordDelim(); outTableCell(''); outTableDelim(); if ($change) { outButton($session, "account_other", "Benutzer wechseln"); } if ($new) { echo " "; outButton($session, "account_new", "Neu"); } } outTableDelimEnd(); outTableAndRecordEnd(); outDivisionEnd($session); guiFinishForm($session, $session); guiStandardBodyEnd($session, Th_StandardBodyEnd); }
function baseAccount(&$session, $message) { global $account_user, $account_code, $account_code2, $account_rights, $account_email, $account_locked, $account_user2, $account_theme, $account_width, $account_height, $account_maxhits, $account_right_posting, $account_right_user, $account_right_pages, $account_right_rights, $account_startpage, $account_startpageoffer; global $login_user, $login_passw; $session->trace(TC_Gui1, 'baseAccount'); $reload = false; if (empty($account_user)) { $account_user = $session->fUserName; $reload = true; } if (!empty($account_user2) && $account_user != $account_user2) { $account_user = $account_user2; $reload = true; } if (!$reload) { $id = dbUserId($session, $account_user); } else { list($id, $account_rights, $account_locked, $account_width, $account_height, $account_maxhits, $account_theme, $account_startpage, $account_email) = dbGetRecordByClause($session, T_User, 'id,rights,locked,width,height,maxhits,theme,startpage,email', 'name=' . dbSqlString($session, $account_user)); baseSplitRights($session, $account_right_user, $account_right_rights, $account_rights_posting, $account_rights_pages); } guiStandardHeader($session, 'Einstellungen für ' . $account_user, Th_StandardHeader, Th_StandardBodyStart); if (!empty($message)) { guiParagraph($session, $message, false); } guiStartForm($session, 'account', P_Account); echo "<table border=\"0\">\n<tr><td>Benutzername:</td><td>"; guiHiddenField('account_user', $account_user); guiHeadline($session, 2, $account_user); echo '</td></tr>' . "\n" . '<tr><td>Passwort:</td><td>'; guiPasswordField('account_code', '', 64, 32); echo '</td></tr>' . "\n" . '<tr><td>Wiederholung:</td><td>'; guiPasswordField('account_code2', '', 64, 32); echo '</td></tr>' . "\n" . '<tr><td>EMail:</td><td>'; guiTextField('account_email', $account_email, 64, 64); echo "</td></tr>\n<tr><td>Gesperrt:</td><td>"; guiCheckBox("account_locked", "Gesperrt", $account_locked == C_CHECKBOX_TRUE); echo "</td></tr>\n<tr><td>Design:</td><td>"; dbGetThemes($session, $theme_names, $theme_numbers); guiComboBox('account_theme', $theme_names, $theme_numbers, array_search($account_theme, $theme_numbers)); echo "</td></tr>\n<tr><td>Eingabefeldbreite:</td><td>"; guiTextField("account_width", $account_width, 64, 3); echo "</td></tr>\n<tr><td>Eingabefeldhöhe:</td><td>"; guiTextField("account_height", $account_height, 64, 3); echo "</td></tr>\n<tr><td>Zahl Suchergebnisse:</td><td>"; guiTextField("account_maxhits", $account_maxhits, 64, 3); echo "</td></tr><tr><td>\nStartseite:</td><td>"; $names = array('WikiSeite:', 'Übersicht', 'Einstellungen', 'Wikisuche', 'Letze Änderungen', 'StartSeite', 'Hilfe'); $values = array('', P_Home, P_Account, P_Search, P_LastChanges, 'StartSeite', 'Hilfe'); if (($pos = strpos($account_startpage, '!')) == 0 && is_int($pos)) { $ix = array_search($account_startpage, $values); } else { $ix = 0; } guiComboBox('account_startpageoffer', $names, $values, $ix); echo ' '; guiTextField("account_startpage", $account_startpage, 32, 128); echo "</td></tr>\n"; modUserTableData($session, $id); echo "</table>\n"; modUserOwnData($session, $id); echo "<br>\n"; guiButton("account_change", "Ändern"); echo "<br>\n<br>\n"; $change = $session->hasRight(R_User, R_Put); $new = $session->hasRight(R_User, R_New); $new = $session->fUserId <= 2 || $session->fUserName == 'wk' || $session->fUserName == 'admin'; $change = $new; if ($change || $new) { guiLine($session, 2); echo "<table border=\"0\"></td></tr><tr></tr>\n<tr><td>Name:</td><td>"; guiTextField("account_user2", $account_user2, 32, 32); echo "</td></tr>\n<tr><td></td><td>"; if ($change) { guiButton("account_other", "Benutzer wechseln"); } if ($new) { echo " "; guiButton("account_new", "Neu"); } } echo "</td></tr>\n</table>\n"; guiFinishForm($session, $session); guiStandardBodyEnd($session, Th_StandardBodyEnd); }