function Update($id) { global $mf, $db, $auth, $authentication, $party, $usrmgr, $func, $cfg, $signon; // Clan-Management include_once "modules/clanmgr/class_clan.php"; $clan = new Clan(); if (ShowField('clan')) { if ($_POST['new_clan_select']) { $clan->Add($_POST['clan_new'], $id, $_POST["clanurl"], $_POST["newclanpw"]); } elseif ($_POST['clan']) { $clan->AddMember($_POST['clan'], $id); } elseif (isset($_POST['clan'])) { $clan->RemoveMember($id); } } // Update User-Perissions if ($id) { $db->qry("DELETE FROM %prefix%user_permissions WHERE userid = %int%", $id); if ($_POST["permissions"]) { foreach ($_POST["permissions"] as $perm) { $db->qry("INSERT INTO %prefix%user_permissions SET module = %string%, userid = %int%", $perm, $id); } } } // If new user has been added if (!$mf->isChange) { $usrmgr->WriteXMLStatFile(); // If auto generated PW, use PW stored in session, else use PW send by POST field if ($_POST['password_original']) { $_SESSION['tmp_pass'] = $_POST['password_original']; } if ($cfg["signon_password_mail"]) { if ($usrmgr->SendSignonMail(0)) { $func->confirmation(t('Dein Passwort und weitere Informationen wurden an deine angegebene E-Mail-Adresse gesendet.'), NO_LINK); } else { if ($cfg['sys_internet']) { $func->error(t('Es ist ein Fehler beim Versand der Informations-Email aufgetreten.') . '<br />' . t('Dein Passwort lautet: <b>%1</b>', array($_SESSION['tmp_pass'])), NO_LINK); } } } // Send email-verification link if ($cfg['sys_login_verified_mail_only']) { $usrmgr->SendVerificationEmail($id); } // Show passwort, if wanted, or has mail failed if ($cfg['signon_password_view']) { $func->information(t('Dein Passwort lautet: <b>%1</b>', array($_SESSION['tmp_pass'])), NO_LINK); } $_SESSION['tmp_pass'] = ''; } /* // Picture Upload if ($auth["type"] >= 2) if (file_exists($_FILES['picture']['tmp_name'])) { @unlink("ext_inc/user_pics/pic$id.jpg"); @copy($_FILES["picture"]["tmp_name"], "ext_inc/user_pics/pic$id.jpg"); } */ return true; }
<?php function ShowField($key) { global $cfg; if ($cfg["signon_show_" . $key] > 0) { return 1; } else { return 0; } } include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $dsp->NewContent(t('Betrag Buchen'), t('Fixbetrag (z.B Miete oder Sponsoring) oder Geldschiebungen')); $mf->AddField('Betreff', 'comment'); $mf->AddField('Betrag (bei Negativen, minus davor)', 'movement'); $user_list = array('' => '(keine Auswahl)'); $row = $db->qry("SELECT userid, username FROM %prefix%user"); while ($res = $db->fetch_array($row)) { $user_list[$res['userid']] = $res['username']; } $mf->AddDropDownFromTable(t('Party'), 'partyid', 'party_id', 'name', 'partys'); $mf->AddDropDownFromTable(t('Betrifft Benutzer'), 'userid', 'userid', 'username', 'user', t('keine Auswahl')); $mf->AddField('Fix Betrag', 'fix', 'tinyint(1)', FIELD_OPTIONAL); $mf->AddFix('editorid', $auth['userid']); $mf->AddFix('modul', 'cashmgr'); if (ShowField('fix')) { $dsp->AddSingleRow("Der zu buchende Betrag ist kein Fix-Betrag"); } if ($mf->SendForm('index.php?mod=cashmgr&action=booking', 'cashmgr_accounting', 'ID', $_GET['cashid'])) { }