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 admBackup(&$session, $with_header, $message) { $session->trace(TC_Gui1, 'admBackup'); if ($with_header) { admStandardHeader($session, 'Datenbank-Backup'); } if (!empty($message)) { guiParagraph($session, $message, false); } if (empty($_POST['backup_file'])) { $_POST['backup_file'] = $session->fDbTablePrefix . strftime("_%Y_%m_%d") . '.sql'; } guiHeadLine($session, 1, 'Backup'); guiStartForm($session); outTableAndRecord(); outTableTextField($session, 'Dateiname:', 'backup_file', null, 64, 64); outTableRecordDelim(); outTableCell('Tabelle:'); outTableDelim(); outTextField($session, 'backup_table', null, 64, 64); echo ' (leer: alle Tabellen)'; outTableDelimEnd(); outTableRecordDelim(); outTableCheckBox($session, ' ', 'backup_compressed', 'komprimiert', null); outTableRecordDelim(); outTableButton($session, ' ', 'backup_save', 'Sichern'); outTableAndRecordEnd(); guiFinishForm($session); admFinishBody($session); }