} function ShowField($key) { global $cfg; if ($cfg["signon_show_" . $key] > 0) { return 1; } else { return 0; } } if (!($_GET['mod'] == 'signon' and $auth['login'] and $_GET['party_id'])) { $party_user = $db->qry_first("SELECT * FROM %prefix%party_user WHERE user_id = %int% AND party_id= %int%", $_GET["userid"], $party->party_id); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); if ($cfg['signon_def_locked'] and !$_GET['userid']) { $mf->AddFix('locked', 1); } /* if (count($_POST) == 0) $_POST['signon'] = $party_user['party_id']; if (!isset($_POST['price_id'])) $_POST['price_id'] = $party_user['price_id']; if (!isset($_POST['paid'])) $_POST['paid'] = $party_user['paid']; */ if ($auth['type'] >= 2 or !$_GET['userid'] or $auth['userid'] == $_GET['userid'] and ($cfg['user_self_details_change'] or $missing_fields)) { if (!$DoSignon) { // If Admin, Creating a new user, or Missing fields: // Show Username Field $quick_signon ? $optional = 1 : ($optional = 0); if ($auth['type'] >= 2 or !$_GET['userid'] or $missing_fields) { $mf->AddField(t('Benutzername'), 'username', '', '', $optional); } else { $mf->AddField(t('Benutzername'), '', IS_TEXT_MESSAGE, t('Als Benutzer kannst du deinen Benutzernamen, Bezahlt & Platz-Status, Ausweis / Sonstiges und Kommentar NICHT ändern. Wenden dich dazu bitte an einen Administrator.'));
case 10: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('t2_breaks', 'breakid', $_GET['breakid']); break; default: include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('tournament'); $ms2->query['from'] = '%prefix%t2_breaks'; $ms2->query['where'] = 'tournamentid = ' . (int) $_GET['tournamentid']; $ms2->AddResultField(t('Start'), 'start'); $ms2->AddResultField(t('Dauer'), 'duration'); $ms2->AddIconField('edit', 'index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'] . '&breakid=', t('Editieren')); $ms2->AddIconField('delete', 'index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'] . '&step=10&breakid=', t('Löschen')); $ms2->PrintSearch('index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'], 'breakid'); $t = $db->qry_first('SELECT name FROM %prefix%tournament_tournaments WHERE tournamentid = %int%', $_GET['tournamentid']); $dsp->AddFieldSetStart(t('Pause für Turnier %1 festlegen', $t['name'])); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->AddFix('tournamentid', $_GET['tournamentid']); $mf->AddField(t('Pause beginnen um'), 'start'); $mf->AddField(t('Dauer der Pause (in Minuten)'), 'duration'); $mf->SendForm('', 't2_breaks', 'breakid', $_GET['breakid']); $dsp->AddFieldSetEnd(); break; } $buttons = ""; $buttons .= $dsp->FetchSpanButton(t('Paarungen'), "index.php?mod=tournament2&action=games&step=2&tournamentid=" . $_GET['tournamentid']); $buttons .= " " . $dsp->FetchSpanButton(t('Spielbaum'), "index.php?mod=tournament2&action=tree&step=2&tournamentid=" . $_GET['tournamentid']); $dsp->AddDoubleRow("", $buttons); $dsp->AddContent();
} if ($cfg['server_ip_auto_assign'] and $cfg['server_ip_next'] > $IPEnd) { $func->information(t('Es sind keine freien IPs mehr vorhanden. Bitte einen Administrator darum den vorgesehenen Bereich zu erhöhren'), "index.php?mod=server"); } elseif ($cfg["server_admin_only"] and $auth['type'] <= 1) { $func->information(t('Nur Adminsitratoren dürfen Server hinzufügen'), "index.php?mod=server"); } elseif (!$get_paid['paid'] and $auth["type"] <= 1) { $func->information(t('Du musst zuerst bezahlen, um Server hinzufügen zu dürfen'), "index.php?mod=server"); } else { $dsp->NewContent(t('Server'), t('Hinzufügen und Aendern der Server')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); if (!$_GET['serverid']) { if ($auth['type'] > 1) { $mf->AddDropDownFromTable(t('Besitzer'), 'owner', 'userid', 'username', 'user', '', 'type > 0'); } else { $mf->AddFix('owner', $auth['userid']); } } $mf->AddField(t('Name'), 'caption'); //Party-Liste if ($func->isModActive('party')) { $party_list = array('' => t('KEINE')); $row = $db->qry("SELECT party_id, name FROM %prefix%partys"); while ($res = $db->fetch_array($row)) { $party_list[$res['party_id']] = $res['name']; } $db->free_result($row); $mf->AddField(t('Party'), 'party_id', IS_SELECTION, $party_list, $party->party_id); } $selections = array(); $selections['gameserver'] = t('Gameserver');
$mf = new masterform(); $dsp->NewContent(t('Geld überweisen'), t('Hier kannst du anderen Benutzern Geld überweisen')); $AdminFound = 0; $UserFound = 0; $res = $db->qry("SELECT type, userid, username, firstname, name FROM %prefix%user WHERE type >= %string% ORDER BY type DESC, username", $WhereMinType); if (!$_POST['toUserID']) { $selections[-1] = "- Bitte wählen -"; } while ($row = $db->fetch_array($res)) { if (!$AdminFound and $row['type'] > 1) { $selections['-OptGroup-1'] = t('Admins'); $AdminFound = 1; } if (!$UserFound and $row['type'] <= 1) { $selections['-OptGroup-2'] = t('Benutzer'); $UserFound = 1; } if ($auth['type'] >= 2 or !$cfg['sys_internet'] or $cfg['guestlist_shownames']) { $selections[$row['userid']] = $row['username'] . ' (' . $row['firstname'] . ' ' . $row['name'] . ')'; } else { $selections[$row['userid']] = $row['username']; } } $db->free_result($res); $mf->AddField(t('Empfänger'), 'toUserid', IS_SELECTION, $selections, FIELD_OPTIONAL); $mf->AddField('Betreff', 'comment'); $mf->AddField('Betrag', 'movement'); $mf->AddFix('fromUserid', $auth['userid']); $mf->AddFix('modul', 'cashmgr'); $mf->CheckBeforeInserFunction = 'Check'; $mf->SendForm('index.php?mod=cashmgr&action=sendmoney', 'cashmgr_accounting', 'ID', $_GET['cashid']);
<?php $dsp->NewContent(t('Party eintragen'), t('Hier kannst du deine Party der Liste hinzufügen')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->AddField(t('Partyname'), 'name'); $mf->AddField(t('Partymotto'), 'motto', '', '', FIELD_OPTIONAL); $mf->AddField(t('Zusätzliche Infos'), 'text', '', LSCODE_ALLOWED, FIELD_OPTIONAL); $mf->AddGroup(t('Allgemeine Angaben')); $mf->AddField(t('Party-Start'), 'start'); $mf->AddField(t('Party-Ende'), 'end'); $mf->AddGroup(t('Datum')); $mf->AddField(t('Webseite'), 'url'); $mf->AddField(t('Url zum Lansuite-Hauptordner') . HTML_NEWLINE . t('Bsp.: http://deineurl.de/unterordner/'), 'ls_url'); $mf->AddGroup(t('Webseite')); $mf->AddField(t('Ort'), 'city'); $mf->AddField(t('PLZ'), 'plz'); $mf->AddField(t('Straße'), 'street'); $mf->AddField(t('Hausnummer'), 'hnr'); $mf->AddGroup(t('Adresse der Location')); if (!$_GET['partyid']) { $mf->AddFix('userid', $auth['userid']); } $mf->SendForm('index.php?mod=partylist&action=add', 'partylist', 'partyid', $_GET['partyid']); $dsp->AddBackButton('index.php?mod=partylist'); $dsp->AddContent();
$ms2->PrintSearch('index.php?mod=sample&action=show', 'n.newsid'); ### Masterform ### // If you like to insert data to the database, you could use the masterform class $dsp->NewContent(t('News verwalten'), t('Mit Hilfe des folgenden Formulars kannst du Neuigkeiten auf deiner Seite ergänzen und bearbeiten')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); // Define the db filds, which should be written. The second argument must be a valid db field, of the table supplied to SendForm $mf->AddField(t('Überschrift (Knappe Zusammenfassung für die Startseite)'), 'caption'); $mf->AddField(t('Kategorie / Icon'), 'icon', IS_PICTURE_SELECT, 'ext_inc/news_icons', FIELD_OPTIONAL); $mf->AddField(t('Text'), 'text', '', LSCODE_ALLOWED); $selections = array(); $selections['0'] = t('Normal'); $selections['1'] = t('Wichtig'); $mf->AddField(t('Priorität'), 'priority', IS_SELECTION, $selections, FIELD_OPTIONAL); // Maybe some values should not be added by the user, but set to fix values $mf->AddFix('date', time()); $mf->AddFix('poster', $auth['userid']); // Sendform: 1) Current Link; 2) Affected data base table; 3) prim key in table; 4) ID to edit, if this is empty a new record will be added to the data base if ($mf->SendForm('index.php?mod=sample&action=show', 'news', 'newsid', $_GET['newsid'])) { // Add additional actions here, that should be called, after successfully adding an entry } ### Mastercomment ### // There are only two lines needed to add a comment function to the current table include 'inc/classes/class_mastercomment.php'; // Mastercomment: 1) which module should the comment belong to? 2) Which id should the comment referr to? new Mastercomment('news', $_GET['newsid']); ### Masterdelete ### // Use this, to delete entries from the data base include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); // Will delete from the table 'news', where the fild 'newsid' is '$_GET['newsid']'
} } $db->free_result($res); $mf->AddField(t('Empfänger'), 'toUserID', IS_SELECTION, $selections, FIELD_OPTIONAL); if ($auth['userid']) { $selections = array(); $selections[0] = t('Als System-Mail'); if ($cfg['sys_internet']) { $selections[1] = t('An die Email-Adresse. Hinweis: Kein LS-Code möglich!'); } $mf->AddField(t('Mail-Typ'), 'type', IS_SELECTION, $selections, FIELD_OPTIONAL); } else { $mf->AddField('', 'captcha', IS_CAPTCHA); $mf->AddField(t('Absender E-Mail'), 'SenderMail', '', '', '', CheckValidEmail); } $mf->AddField(t('Betreff'), 'Subject'); $mf->AddField(t('Nachricht'), 'msgbody', '', LSCODE_BIG); $mf->AddFix('mail_status', 'active'); $mf->AddFix('des_status', 'new'); $mf->AddFix('fromUserID', $auth['userid']); $mf->AddFix('tx_date', 'NOW()'); $mf->SendButtonText = t('Mail abschicken'); $mf->CheckBeforeInserFunction = 'SendOnlineMail'; if ($mf->SendForm('index.php?mod=mail&action=newmail&reply_message', 'mail_messages', 'mailID', '')) { $url_parts = parse_url($profile_url); $reply_to = strrchr($url_parts['query'], 'replyto'); if ($reply_to) { $reply_to_id = substr(strrchr($reply_to, '='), 1); $setreply = $db->qry("UPDATE %prefix%mail_messages SET des_status = 'reply' WHERE mailID = %int% ", $reply_to_id); } }
<?php // Edit Hardwareinfos for User if ($auth['type'] >= 2 or $_GET['userid'] == $auth['userid'] and $cfg['user_self_details_change']) { include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $dsp->NewContent(t("Hardware ändern"), t("Hier kannst du die Hardware eingeben")); $mf->AddField('CPU', 'cpu', '', '', FIELD_OPTIONAL); $mf->AddField('Ram (in MB)', 'ram', '', '', FIELD_OPTIONAL); $mf->AddField('Grafikkarte', 'graka', '', '', FIELD_OPTIONAL); $mf->AddField('Festplatte 1', 'hdd1', '', '', FIELD_OPTIONAL); $mf->AddField('Festplatte 2', 'hdd2', '', '', FIELD_OPTIONAL); $mf->AddField('Optisches Laufwerk 1', 'cd1', '', '', FIELD_OPTIONAL); $mf->AddField('Optisches Laufwerk 2', 'cd2', '', '', FIELD_OPTIONAL); $mf->AddField('Maus', 'maus', '', '', FIELD_OPTIONAL); $mf->AddField('Tastatur', 'tasta', '', '', FIELD_OPTIONAL); $mf->AddField('Monitor', 'monitor', '', '', FIELD_OPTIONAL); $mf->AddField('Betriebssystem', 'os', '', '', FIELD_OPTIONAL); $mf->AddField('Computername', 'name', '', '', FIELD_OPTIONAL); $mf->AddField('Sonstiges', 'sonstiges', text, '', FIELD_OPTIONAL); $mf->AddFix('userid', $_GET['userid']); $mf->SendForm('index.php?mod=hardware&action=edit&userid=' . $_GET['userid'], 'hardware', 'hardwareid', $_GET['hardwareid']); $dsp->AddContent(); } else { $func->error(t('Du hast keine Berechtigung diese Daten zu ändern')); }
function Mastercomment($mod, $id, $update_table = array()) { global $framework, $dsp, $auth, $db, $func, $cfg; #echo '<ul class="Line">'; $dsp->AddFieldsetStart(t('Kommentare')); // Delete comments if ($_GET['mc_step'] == 10) { include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->LogID = $id; $md->Delete('comments', 'commentid', $_GET['commentid']); unset($_GET['commentid']); } $CurentURLBase = $framework->get_clean_url_query('base'); $CurentURLBase = str_replace('&mc_step=10', '', $CurentURLBase); $CurentURLBase = str_replace('&mf_step=2', '', $CurentURLBase); $CurentURLBase = preg_replace('#&mf_id=[0-9]*#si', '', $CurentURLBase); $CurentURLBase = preg_replace('#&commentid=[0-9]*#si', '', $CurentURLBase); // No Order by in this MS, for it collidates with possible other MS on this page $order_by_tmp = $_GET['order_by']; $_GET['order_by'] = ''; // List current comments include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('bugtracker'); $ms2->query['from'] = "%prefix%comments AS c\n LEFT JOIN %prefix%user AS u ON c.creatorid = u.userid\n "; $ms2->query['where'] = "c.relatedto_item = '{$mod}' AND c.relatedto_id = '{$id}'"; $ms2->config['dont_link_first_line'] = 1; $ms2->AddSelect('UNIX_TIMESTAMP(c.date) AS date'); $ms2->AddSelect('c.creatorid'); $ms2->AddSelect('u.avatar_path'); $ms2->AddSelect('u.signature'); $ms2->AddSelect('u.userid'); $ms2->AddResultField('', 'u.username', 'FetchDataRow', '', 180); $ms2->AddResultField('', 'c.text', 'FetchPostRow'); $ms2->AddIconField('quote', 'javascript:document.getElementById(\'text\').value += \'[quote]\' + document.getElementById(\'post%id%\').innerHTML + \'[/quote]\'', t('Zitieren')); $ms2->AddIconField('edit', $CurentURLBase . '&commentid=%id%#dsp_form2', t('Editieren'), 'EditAllowed'); if ($auth['type'] >= 3) { $ms2->AddIconField('delete', $CurentURLBase . '&mc_step=10&commentid=', t('Löschen')); } $ms2->PrintSearch($CurentURLBase, 'c.commentid'); $_GET['order_by'] = $order_by_tmp; // Add new comments if ($cfg['mc_only_logged_in'] and !$auth['login']) { $func->information(t('Bitte loggen dich ein, bevor du einen Kommentar verfasst'), NO_LINK); } else { if ($_GET['commentid']) { $row = $db->qry_first("SELECT creatorid FROM %prefix%comments WHERE commentid = %int%", $_GET['commentid']); } if (!$_GET['commentid'] or $row['creatorid'] and $row['creatorid'] == $auth['userid'] or $auth['type'] >= 2) { include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->LogID = $id; $mf->AddField(t('Kommentar'), 'text', '', LSCODE_BIG); if (!$auth['login']) { $mf->AddField('', 'captcha', IS_CAPTCHA); } $mf->AddFix('relatedto_item', $mod); $mf->AddFix('relatedto_id', $id); if (!$_GET['commentid']) { $mf->AddFix('date', 'NOW()'); } if (!$_GET['commentid']) { $mf->AddFix('creatorid', $auth['userid']); } if ($mf->SendForm('', 'comments', 'commentid', $_GET['commentid'])) { // Send email-notifications to thread-subscribers $path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php")); include_once "modules/mail/class_mail.php"; $mail = new mail(); if (!$_GET['fid']) { $_GET['fid'] = $thread['fid']; } // Internet-Mail $subscribers = $db->qry('SELECT b.userid, u.firstname, u.name, u.email FROM %prefix%comments_bookmark AS b LEFT JOIN %prefix%user AS u ON b.userid = u.userid WHERE b.email = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id); while ($subscriber = $db->fetch_array($subscribers)) { if ($subscriber['userid'] != $auth['userid']) { $mail->create_inet_mail($subscriber["firstname"] . " " . $subscriber["name"], $subscriber["email"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%')), $cfg["sys_party_mail"]); } } $db->free_result($subscribers); // Sys-Mail $subscribers = $db->qry('SELECT userid FROM %prefix%comments_bookmark AS b WHERE b.sysemail = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id); while ($subscriber = $db->fetch_array($subscribers)) { if ($subscriber['userid'] != $auth['userid']) { $mail->create_sys_mail($subscriber["userid"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%'))); } } $db->free_result($subscribers); // Update LastChange in $update_table, if $update_table is set if ($update_table) { list($key, $val) = each($update_table); $db->qry('UPDATE %prefix%' . $key . ' SET changedate=NOW() WHERE ' . $val . ' = %int%', $id); } } } else { $func->error(t('Du bist nicht berechtigt, diesen Kommentar zu editieren')); } } $dsp->AddFieldsetEnd(); #echo '</ul>'; // Bookmarks and Auto-Mail if ($auth['login'] and $auth['type'] > 1) { if ($_GET['set_bm']) { $db->qry_first('DELETE FROM %prefix%comments_bookmark WHERE relatedto_id = %int% AND relatedto_item = %string%', $id, $mod); if ($_POST["check_bookmark"]) { $db->qry('INSERT INTO %prefix%comments_bookmark SET relatedto_id = %int%, relatedto_item = %string%, userid = %int%, email = %int%, sysemail = %int%', $id, $mod, $auth['userid'], $_POST['check_email'], $_POST['check_sysemail']); } } $bookmark = $db->qry_first('SELECT 1 AS found, email, sysemail FROM %prefix%comments_bookmark WHERE relatedto_id = %int% AND relatedto_item = %string% AND userid = %int%', $id, $mod, $auth['userid']); if ($bookmark['found']) { $_POST['check_bookmark'] = 1; } if ($bookmark['email']) { $_POST['check_email'] = 1; } if ($bookmark['sysemail']) { $_POST['check_sysemail'] = 1; } $dsp->SetForm($_SERVER['REQUEST_URI'] . '&set_bm=1'); $dsp->AddFieldsetStart(t('Monitoring')); $additionalHTML = "onclick=\"CheckBoxBoxActivate('email', this.checked)\""; $dsp->AddCheckBoxRow("check_bookmark", t('Lesezeichen'), t('Diesen Beitrag in meine Lesezeichen aufnehmen<br><i>(Lesezeichen ist Vorraussetzung, um Benachrichtigung per Mail zu abonnieren)</i>'), "", 1, $_POST["check_bookmark"], '', '', $additionalHTML); $dsp->StartHiddenBox('email', $_POST["check_bookmark"]); $dsp->AddCheckBoxRow("check_email", t('E-Mail Benachrichtigung'), t('Bei Antworten auf diesen Beitrag eine Internet-Mail an mich senden'), "", 1, $_POST["check_email"]); $dsp->AddCheckBoxRow("check_sysemail", t('System-E-Mail'), t('Bei Antworten auf diesen Beitrag eine System-Mail an mich senden'), "", 1, $_POST["check_sysemail"]); if ($bookmark["found"]) { $dsp->StopHiddenBox(); } $dsp->AddFormSubmitRow("edit"); if (!$bookmark["found"]) { $dsp->StopHiddenBox(); } $dsp->AddFieldsetEnd(); } }
if ($row['found']) { $nextVersionId = $row['versionid'] + 1; $row = $db->qry_first('SELECT text FROM %prefix%wiki_versions WHERE postid = %int% AND versionid = %int%', $_GET['postid'], $row['versionid']); if ($_GET['mf_step'] != 2) { $_POST['text'] = $row['text']; } } $jscode = "UrlAuswahl = new Array();\n"; $define_url_options = ''; $i = 0; $res = $db->qry('SELECT postid, name FROM %prefix%wiki ORDER BY name'); while ($row = $db->fetch_array($res)) { $jscode .= "UrlAuswahl[{$i}] = new Object(); UrlAuswahl[{$i}]['url'] = 'index.php?mod=wiki&action=show&postid={$row['postid']}'; UrlAuswahl[{$i}]['name'] = '{$row['name']}';\n"; $define_url_options .= '<option value="' . $i . '">' . $row['name'] . '</option>'; $i++; } $db->free_result($res); $framework->add_js_code($jscode); $smarty->assign('define_url_options', $define_url_options); $dsp->AddDoubleRow('', $smarty->fetch('modules/wiki/templates/add_page_link.htm')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->AddField(t('Text'), 'text', '', HTML_ALLOWED); $mf->AddFix('userid', $auth['userid']); $mf->AddFix('postid', $_GET['postid']); $mf->AddFix('versionid', $nextVersionId); $mf->SendForm('index.php?mod=wiki&action=' . $_GET['action'] . '&postid=' . $_GET['postid'], 'wiki_versions'); if ($_GET['mf_step'] == '2') { $_GET['action'] = 'show'; include_once 'modules/wiki/show.php'; }
$games = $xml->get_tag_content_array("game", $xml_file); foreach ($games as $game) { $akt_game_name = $xml->get_tag_content("contest", $game) . ' - ' . $xml->get_tag_content("name", $game); $syscode = $xml->get_tag_content("syscode", $game); $selections[$syscode] = $akt_game_name; } asort($selections); $selections = array('' => t('Kein LGZ-Support für dieses Turnier')) + $selections; $mf->AddField(t('LGZ-Spiel'), 'lgz_gamename', IS_SELECTION, $selections, FIELD_OPTIONAL, 'CheckModeForLeague'); // Rules (Extern) $selections = array(); $verz = opendir('ext_inc/tournament_rules/'); while ($file_name = readdir($verz)) { if (!is_dir('ext_inc/tournament_rules/' . $file_name) and $file_name != 'gameini.xml' and $file_name != 'games.xml' and $file_name != 'info.txt' and $file_name != 'xml_games.xml') { $selections[$file_name] = $file_name; } } closedir($verz); asort($selections); $selections = array('' => t('Keines')) + $selections; $mf->AddField(t('Externes Regelwerk'), 'rules_ext', IS_SELECTION, $selections, FIELD_OPTIONAL); $mf->AddField(t('Bemerkung / Zusätzliche Regeln'), 'comment', '', HTML_ALLOWED, FIELD_OPTIONAL); $mf->AddField(t('Mapcycle (Maps durch Zeilenumbruch trennen)'), 'mapcycle', '', '', FIELD_OPTIONAL); $mf->AddGroup(t('Liga-Support, Regeln und Mapcycle')); $mf->AddPage(t('Liga-Support, Regeln und Mapcycle')); if (!$_GET['tournamentid']) { $mf->AddFix('party_id', (int) $party->party_id); } if ($mf->SendForm('index.php?mod=tournament2&action=' . $_GET['action'], 'tournament_tournaments', 'tournamentid', $_GET['tournamentid'])) { $func->log_event(t('Das Turnier %1 wurde eingetragen', $_POST["name"]), 1, t('Turnier Verwaltung')); }
<?php $dsp->NewContent(t('News verwalten'), t('Mit Hilfe des folgenden Formulars kannst du Neuigkeiten auf deiner Seite ergänzen und bearbeiten')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); // Name $mf->AddField(t('Überschrift (Knappe Zusammenfassung für die Startseite)'), 'caption'); $mf->AddField(t('Kategorie / Icon'), 'icon', IS_PICTURE_SELECT, 'ext_inc/news_icons', FIELD_OPTIONAL); $mf->AddField(t('Text'), 'text', '', $cfg['news_html']); # 0 = HTML, 1 = LSCODE_ALLOWED, 2 = HTML_WYSIWYG $selections = array(); $selections['0'] = t('Normal'); $selections['1'] = t('Wichtig'); $mf->AddField(t('Priorität'), 'priority', IS_SELECTION, $selections, FIELD_OPTIONAL); $selections = array(); $selections['0'] = t('Nein'); $selections['1'] = t('Ja'); $mf->AddField(t('Top-Meldung'), 'top', IS_SELECTION, $selections, FIELD_OPTIONAL); if (!$_GET['newsid']) { $mf->AddFix('date', 'NOW()'); $mf->AddFix('poster', $auth['userid']); } $mf->AddField(t('Link 1'), 'link_1', '', '', FIELD_OPTIONAL); $mf->AddField(t('Link 2'), 'link_2', '', '', FIELD_OPTIONAL); $mf->AddField(t('Link 3'), 'link_3', '', '', FIELD_OPTIONAL); if ($mf->SendForm('index.php?mod=news&action=' . $_GET['action'], 'news', 'newsid', $_GET['newsid'])) { include_once 'modules/news/class_news.php'; $news->GenerateNewsfeed(); }
$func->error('Du darfst nur deine eigenen Beiträge editieren!', NO_LINK); } elseif ($thread) { //Topic erstellen oder auf Topic antworten if ($_GET['tid']) { $dsp->AddFieldsetStart(t('Antworten - Der Beitrag kann anschließend noch editiert werden')); } else { $dsp->AddFieldsetStart(t('Thread erstellen')); } include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); if ($thread['caption'] == '') { $mf->AddField(t('Überschrift'), 'caption', 'varchar(255)'); } $mf->AddField(t('Text'), 'comment', '', LSCODE_BIG); $mf->AddField(t('Bild / Datei anhängen'), 'file', IS_FILE_UPLOAD, 'ext_inc/board_upload/', FIELD_OPTIONAL); $mf->AddFix('tid', $_GET['tid']); if ($_GET['pid'] == '') { $mf->AddFix('date', 'NOW()'); $mf->AddFix('userid', $auth['userid']); $mf->AddFix('ip', $_SERVER['REMOTE_ADDR']); } else { $mf->AddFix('changedate', 'NOW()'); $mf->AddFix('changecount', '++'); } if ($pid = $mf->SendForm('index.php?mod=board&action=thread&fid=' . $_GET['fid'] . '&tid=' . $_GET['tid'] . '&posts_page=' . $_GET['posts_page'], 'board_posts', 'pid', $_GET['pid'])) { $tid = (int) $_GET['tid']; // Update thread-table, if new thread if (!$_GET['tid'] and $_POST['caption'] != '') { $db->qry("INSERT INTO %prefix%board_threads SET\n \t\t\t\tfid = %int%,\n \t\t\t\tcaption = %string%\n \t\t\t\t", $_GET['fid'], $_POST['caption']); $tid = $db->insert_id(); // Assign just created post to this new thread
<?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'])) { }
while ($row = $db->fetch_array($res)) { if ($_GET['mf_step'] != 2 or $row['party_id'] == $_GET['party_id']) { $dsp->AddFieldsetStart($row['name'] . ' (' . $func->unixstamp2date($row['startdate'], 'datetime') . ' - ' . $func->unixstamp2date($row['enddate'], 'datetime') . ')'); $mf = new masterform($MFID); $mf->AdditionalKey = 'party_id = ' . $row['party_id']; // Signon $mf->AddInsertControllField = t('Angemeldet') . '|' . t('Wenn dieses Häckchen gesetzt ist, bist du zu dieser Party angemeldet'); $mf->AddChangeCondition = 'ChangeAllowed'; // Paid if ($auth['type'] >= 2) { $selections = array(); $selections['0'] = t('Nicht bezahlt'); $selections['1'] = t('Bezahlt'); $mf->AddField(t('Bezahltstatus'), 'paid', IS_SELECTION, $selections); } elseif ($cfg['signon_autopaid']) { $mf->AddFix('paid', '1'); } if ($cfg['signon_autopaid'] or $_POST['paid']) { $mf->AddFix('paiddate', 'NOW()'); } // Prices $selections = array(); $res2 = $db->qry("SELECT * FROM %prefix%party_prices WHERE party_id = %int% AND requirement <= %string%", $row['party_id'], $auth['type']); while ($row2 = $db->fetch_array($res2)) { $selections[$row2['price_id']] = $row2['price_text'] . ' [' . $row2['price'] . ' ' . $cfg['sys_currency'] . '] ' . t('Gültig bis : ') . date_format(date_create($row2['enddate']), 'd.m.Y'); } if ($selections) { $mf->AddField(t('Eintrittspreis'), 'price_id', IS_SELECTION, $selections, FIELD_OPTIONAL); } else { $mf->AddField(t('Eintrittspreis'), 'price_id', IS_TEXT_MESSAGE, t('Für diese Party wurden keine Preise definiert')); }
$dsp->AddFieldSetEnd(); } // Comments if ($_GET['mf_step'] != 2 or $_GET['step'] != 10) { include 'inc/classes/class_mastercomment.php'; new Mastercomment('downloads', $row['dirid']); } // Admin functions for dir if ($auth['type'] >= 2 and ($_GET['mf_step'] != 2 or $_GET['step'] == 10)) { $dsp->AddFieldSetStart(t('Ordner Text und Einstellungen editieren')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->AddField(t('Text'), 'text', '', LSCODE_BIG, FIELD_OPTIONAL); $mf->AddField(t('Benutzer-Upload erlauben?'), 'allow_upload', '', '', FIELD_OPTIONAL); if (!$_GET['dirid']) { $mf->AddFix('name', $_GET['dir']); $mf->AddFix('userid', $auth['userid']); } $mf->SendForm('index.php?mod=downloads&step=10&dir=' . $_GET['dir'], 'download_dirs', 'dirid', $row['dirid']); $dsp->AddFieldSetEnd(); } } $dsp->AddContent(); // Try to connect to FTP-Server } elseif (!extension_loaded(ftp)) { $func->error(t('Die PHP-Erweiterung <b>FTP</b> konnte nicht geladen werden. Überprüfe, ob diese in PHP einkompiliert bzw. aktiviert ist')); } else { session_register("downloads_dir"); $server = $cfg['download_server']; $port = $cfg['download_port']; $loginuser = $cfg['download_username'];
if ($z == 5) { $selections[$z] .= ' (' . t('Sehr hoch') . ')'; } if ($z == -5) { $selections[$z] .= ' (' . t('Sehr gering') . ')'; } } $mf->AddField(t('Priorität'), 'priority', IS_SELECTION, $selections, FIELD_OPTIONAL); // Assign bug if ($auth['type'] >= 2) { $mf->AddDropDownFromTable(t('Bearbeiter'), 'agent', 'userid', 'username', 'user', t('Keinem zugeordnet'), 'type >= 2'); $mf->AddField(t('Preis'), 'price', '', '', FIELD_OPTIONAL); $mf->AddField(t('Bereits gespendet'), 'price_payed', '', '', FIELD_OPTIONAL); } if (!$_GET['bugid']) { $mf->AddFix('date', 'NOW()'); if ($_SERVER['SERVER_NAME'] != 'lansuite.orgapage.de') { $mf->AddFix('version', $config['lansuite']['version']); } $mf->AddFix('url', $_SERVER['SERVER_NAME']); $mf->AddFix('reporter', $auth['userid']); $mf->AddFix('state', '0'); } elseif ($auth['type'] >= 2) { $selections = array(); $selections['0'] = t('Neu'); $selections['1'] = t('Bestätigt'); $selections['2'] = t('In Bearbeitung'); $selections['3'] = t('Reporter-Antwort erforderlich'); $selections['4'] = t('Behoben'); $selections['5'] = t('Aufgeschoben'); $selections['6'] = t('Geschlossen');