Beispiel #1
0
<?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();
}
Beispiel #2
0
    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();
Beispiel #3
0
<?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'])) {
}
Beispiel #4
0
<?php

$dsp->NewContent(t('Cronjob hinzufügen'), '');
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->AddField(t('Name'), 'name');
$mf->AddField(t('SQL-Statement'), 'function');
$mf->AddField(t('Aktiv'), 'active');
$mf->AddField(t('Ausführen täglich, um'), 'runat');
$mf->SendForm('index.php?mod=cron2&action=add', 'cron', 'jobid', $_GET['jobid']);
Beispiel #5
0
$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']);
Beispiel #6
0
     $func->information(t('Du bist nicht berechtigt diesen Clan zu ändern'), "index.php?mod=home");
 } else {
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $dsp->AddFieldsetStart(t('Clan-Daten'));
     $mf->AddField(t('Clanname'), 'name');
     if (!$_GET['clanid']) {
         $mf->AddField(t('Beitritts Passwort'), 'password', IS_NEW_PASSWORD);
     }
     $mf->AddField(t('Webseite'), 'url', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Clanlogo'), 'clanlogo_path', IS_FILE_UPLOAD, 'ext_inc/clan/' . $auth['userid'] . '_', FIELD_OPTIONAL);
     if (!$_GET['clanid']) {
         $mf->CheckBeforeInserFunction = 'CheckExistingClan';
     }
     $mf->AdditionalDBUpdateFunction = 'Update';
     $mf->SendForm('index.php?mod=clanmgr&step=' . $_GET['step'], 'clan', 'clanid', $_GET['clanid']);
     $dsp->AddFieldsetEnd();
     if ($_GET['clanid'] != '') {
         $dsp->AddFieldsetStart(t('Mitglieder'));
         include_once 'modules/mastersearch2/class_mastersearch2.php';
         $ms2 = new mastersearch2('clanmgr');
         $ms2->query['from'] = "%prefix%user AS u";
         $ms2->query['where'] = 'u.clanid = ' . (int) $_GET['clanid'];
         $ms2->config['EntriesPerPage'] = 20;
         $ms2->AddResultField(t('Vorname'), 'u.firstname');
         $ms2->AddResultField(t('Nachname'), 'u.name');
         $ms2->AddResultField(t('Benutzername'), 'u.username');
         $ms2->AddResultField(t('Rolle'), 'u.clanadmin', 'ShowRole');
         $ms2->AddIconField('delete', 'index.php?mod=clanmgr&action=clanmgr&step=40&clanid=' . $_GET['clanid'] . '&userid=', t('Löschen'));
         $ms2->PrintSearch('index.php?mod=clanmgr&action=clanmgr&step=30&clanid=' . $_GET['clanid'] . '&userid=', 'u.userid');
         $dsp->AddFieldsetEnd();
Beispiel #7
0
// 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']'
// However a security question will be displayed first
$md->Delete('news', 'newsid', $_GET['newsid']);
Beispiel #8
0
<?php

include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
if ($_POST['poster'] == '') {
    $_POST['poster'] = $auth['username'];
}
$mf->AddField(t('Autor'), 'poster', '', '');
if (!$auth['login']) {
    $mf->AddField('', 'captcha', IS_CAPTCHA);
}
$mf->AddField(t('Eintrag'), 'text', '', LSCODE_ALLOWED);
$mf->AddGroup(t('Eintrag'));
$mf->AddFix('date', time());
if (!$_GET['guestbookid']) {
    $mf->AddFix('userid', $auth['userid']);
}
$mf->SendForm('index.php?mod=guestbook&action=add', 'guestbook', 'guestbookid', $_GET['guestbookid']);
Beispiel #9
0
{
    global $db, $func, $cfg;
    if (!$cfg['signon_partyid']) {
        $db->qry("UPDATE %prefix%config SET cfg_value = %int% WHERE cfg_key = 'signon_partyid'", $id);
    }
    $_SESSION['party_id'] = $id;
    $func->confirmation(t('Die Daten wurden erfolgreich geändert.'), 'index.php?mod=party');
}
$mf->AddField(t('Partyname'), 'name');
$mf->AddField(t('Anzahl Plätze'), 'max_guest');
$mf->AddField(t('PLZ'), 'plz');
$mf->AddField(t('Ort'), 'ort');
$mf->AddField(t('Mindestalter (0 = keine Altersbeschr&auml;nkung)'), 'minage');
$mf->AddField(t('Party startet am'), 'startdate');
$mf->AddField(t('Party endet am'), 'enddate', '', '', '', 'CheckEndDate');
$mf->AddField(t('Anmeldung startet am'), 'sstartdate', '', '', '', 'CheckSignonStartDate');
$mf->AddField(t('Anmeldung endet am'), 'senddate', '', '', '', 'CheckSignonEndDate');
/*
		// erster Preis einfügen
		if($_GET['var'] == "new"){
			$dsp->AddTextFieldRow("price_text",t('Text für Eintrittspreis'),$_POST['price_text'],$signon_error['price_text']);
			$dsp->AddTextFieldRow("price",t('Preis'),$_POST['price'],$signon_error['price']);
		}
*/
$mf->AdditionalDBUpdateFunction = 'UpdatePartyID';
$mf->SendForm('index.php?mod=party&action=edit', 'partys', 'party_id', $_GET['party_id']);
// Write ext_inc/party_infos/infos.xml on Change
if ($_GET['mf_step'] == '2') {
    include_once "modules/usrmgr/class_usrmgr.php";
    $usrmgr->WriteXMLStatFile();
}
Beispiel #10
0
$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'));
}
 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();
     }
 }
Beispiel #12
0
        $selections = array();
        $selections['0'] = t('Egal');
        $selections['1'] = t('Nur in Intranet Version');
        $selections['2'] = t('Nur in Internet Verrsion');
        $mf->AddField(t('Nur online / offline'), 'internet', IS_SELECTION, $selections, FIELD_OPTIONAL);
        $selections = array();
        $selections['0'] = t('Egal');
        $selections['1'] = t('Nur für ausgeloggte');
        $selections['2'] = t('Nur für eingeloggte');
        $selections['3'] = t('Nur für Admins + Superadmins');
        $selections['4'] = t('Nur für Superadmins');
        $mf->AddField(t('Login benötigt'), 'login', IS_SELECTION, $selections, FIELD_OPTIONAL);
        $mf->AddField(t('Modul benötigt'), 'module', '', '', FIELD_OPTIONAL);
        $mf->AddField(t('Quelldatei'), 'source');
        $mf->AddField(t('Callback'), 'callback', '', '', FIELD_OPTIONAL);
        $mf->SendForm('index.php?mod=boxes&amp;step=20', 'boxes', 'boxid', $_GET['boxid']);
        break;
        // Delete
    // Delete
    case 30:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->Delete('boxes', 'boxid', $_GET['boxid']);
        break;
}
$dsp->NewContent(t('Box-Manager'), t('Hier kannst du die Anzeige und Position der Boxen verwalten'));
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('');
$ms2->query['from'] = "%prefix%boxes AS b";
$ms2->query['default_order_by'] = 'place ASC, pos ASC, name ASC';
$ms2->AddTextSearchDropDown(t('Internet-Modus'), 'b.internet', array('' => t('Egal'), '1' => t('Nur im Intranet-Modus'), '2' => t('Nur im Internet-Modus')));
Beispiel #13
0
<?php

switch ($_GET['step']) {
    default:
        $dsp->NewContent(t('Gruppen verwalten'), t('Uebersicht'));
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('cashmgr');
        $ms2->query['from'] = "%prefix%cashmgr_group AS g\n\t\t\t\t\t\t\t\tLEFT JOIN %prefix%cashmgr_accounting AS a ON g.id = a.groupid";
        $ms2->query['default_order_by'] = 'actiontime DESC';
        $ms2->config['EntriesPerPage'] = 20;
        $ms2->AddResultField(t('Name'), 'g.caption');
        $ms2->AddIconField('edit', 'index.php?mod=cashmgr&action=managegroup&step=1&id=', t('Editieren'));
        $ms2->AddIconField('delete', 'index.php?mod=cashmgr&action=managegroup&step=2&id=', t('Löschen'));
        $ms2->PrintSearch('index.php?mod=cashmgr&action=managegroup', 'g.id');
        $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=cashmgr&action=managegroup&step=1'));
        break;
    case 1:
        include_once 'inc/classes/class_masterform.php';
        $mf = new masterform();
        $dsp->NewContent(t('Gruppe anlegen/ editieren '), t(''));
        $mf->AddField('Bezeichnung', 'caption');
        $mf->SendForm('index.php?mod=cashmgr&action=managegroup&step=1', 'cashmgr_group', 'id', $_GET['id']);
        break;
    case 2:
        $db->qry("DELETE FROM %prefix%cashmgr_group WHERE id = %int%", $_GET['id']);
        $func->confirmation('Erfolgreich gelöscht', 'index.php?mod=cashmgr&action=managegroup');
        break;
}
Beispiel #14
0
 $dsp->StartTab(t('Menü'), 'tree');
 if ($_GET['step'] == 31) {
     $db->qry("INSERT INTO %prefix%menu SET caption = 'Neuer Eintrag', requirement = '0', hint = '', link = 'index.php?mod=', needed_config = '', module=%string%, level = 1", $_GET["module"]);
 }
 include_once 'inc/classes/class_masterform.php';
 $mf = new masterform();
 $res = $db->qry('SELECT * FROM %prefix%menu WHERE module = %string% AND caption != \'\' ORDER BY level, requirement, pos', $_GET['module']);
 while ($row = $db->fetch_array($res)) {
     $mf->AddDBLineID($row['id']);
     $mf->AddField(t('Titel'), 'caption');
     $mf->AddField(t('Link'), 'link');
     $mf->AddField(t('Popup-Hinweis'), 'hint', '', '', FIELD_OPTIONAL);
     $mf->AddGroup($row['caption']);
 }
 $db->free_result($res);
 $mf->SendForm('', 'menu', 'id', "module = '" . $_GET['module'] . "' AND caption != ''");
 $dsp->AddDoubleRow('', $dsp->FetchSpanButton(t('Link hinzufügen'), 'index.php?mod=install&action=mod_cfg&step=31&module=' . $_GET['module'] . '&tab=3'));
 $dsp->EndTab();
 $dsp->StartTab(t('Übersetzung'), 'translate');
 $dsp->AddFieldSetStart(t('Sprache wechseln. Achtung, nicht gesicherte &Auml;nderungen gehen verloren.'));
 if ($_POST['target_language']) {
     $_SESSION['target_language'] = $_POST['target_language'];
 }
 if ($_SESSION['target_language'] == '') {
     $_SESSION['target_language'] = 'en';
 }
 $dsp->SetForm('index.php?mod=install&action=mod_cfg&module=' . $_GET['module'] . '&tab=4');
 $list = array();
 $res = $db->qry("SELECT cfg_value, cfg_display FROM %prefix%config_selections WHERE cfg_key = 'language'");
 while ($row = $db->fetch_array($res)) {
     $_SESSION['target_language'] == $row['cfg_value'] ? $selected = 'selected' : ($selected = '');
Beispiel #15
0
<?php

include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->AddField(t('Titel'), 'name');
if ($_GET['postid'] = $mf->SendForm('index.php?mod=wiki&action=add', 'wiki', 'postid', $_GET['postid'])) {
    $_GET['action'] = 'edit';
    $_GET['mf_step'] = '1';
    include_once 'modules/wiki/edit.php';
}
Beispiel #16
0
}
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
// Designs
if ($cfg['user_design_change']) {
    $selections = array();
    $selections[''] = t('System-Vorgabe');
    include_once "inc/classes/class_xml.php";
    $xml = new xml();
    $ResDesign = opendir('design/');
    while ($dir = readdir($ResDesign)) {
        if (is_dir("design/{$dir}") and file_exists("design/{$dir}/design.xml") and $dir != 'beamer') {
            $file = "design/{$dir}/design.xml";
            $ResFile = fopen($file, "rb");
            $XMLFile = fread($ResFile, filesize($file));
            fclose($ResFile);
            $DesignName = $xml->get_tag_content('name', $XMLFile);
            $selections[$dir] = $DesignName;
        }
    }
    closedir($ResDesign);
    $mf->AddField(t('Design'), 'design', IS_SELECTION, $selections, FIELD_OPTIONAL);
}
$mf->AddField(t('Mich auf der Karte zeigen') . '|' . t('Meine Adresse in der Besucherkarte anzeigen?'), 'show_me_in_map', '', '', FIELD_OPTIONAL);
$mf->AddField(t('LS-Mail Alert') . '|' . t('Mir eine E-Mail senden, wenn eine neue LS-Mail eingegangen ist'), 'lsmail_alert', '', '', FIELD_OPTIONAL);
if ($cfg['user_avatarupload']) {
    $mf->AddField(t('Avatar'), 'avatar_path', IS_FILE_UPLOAD, 'ext_inc/avatare/' . $auth['userid'] . '_', FIELD_OPTIONAL, 'CheckAndResizeUploadPic');
}
$mf->AddField(t('Signatur'), 'signature', '', LSCODE_ALLOWED, FIELD_OPTIONAL);
$mf->SendForm('', 'user', 'userid', $auth['userid']);
Beispiel #17
0
<?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();
Beispiel #18
0
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&amp;action=' . $_GET['action'] . '&postid=' . $_GET['postid'], 'wiki_versions');
if ($_GET['mf_step'] == '2') {
    $_GET['action'] = 'show';
    include_once 'modules/wiki/show.php';
}
Beispiel #19
0
     $export->LSTableFoot();
     break;
     // Translate Item
 // Translate Item
 case 40:
     $dsp->NewContent(t('Modul Übersetzen'), '');
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->AddField(t('Orginal-Text'), 'org', IS_NOT_CHANGEABLE);
     $mf->AddField(t('Deutsch'), 'de', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Englisch'), 'en', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Spanisch'), 'es', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Französisch'), 'fr', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Holländisch'), 'nl', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Italienisch'), 'it', '', '', FIELD_OPTIONAL);
     $mf->SendForm('index.php?mod=install&action=translation&step=40', 'translation', 'id', $_GET['id']);
     $dsp->AddBackButton('index.php?mod=install&action=translation');
     break;
     // Export Translation to Files
 // Export Translation to Files
 case 50:
     if (!$_GET['confirm'] == "yes") {
         $func->question(t('Achtung!!! Alle vorhandenen Übersetzungen in den XML-Dateien werden überschrieben'), 'index.php?mod=install&action=translation&step=50&confirm=yes', 'index.php?mod=install&action=translation');
     } else {
         $modules = array();
         $res = $db->qry("SELECT name FROM %prefix%modules");
         while ($row = $db->fetch_array($res)) {
             $modules[] = $row['name'];
         }
         $db->free_result($res);
         // Add Systemtranslations
Beispiel #20
0
    // Board Headline
    $hyperlink = '<a href="%s" class="menu">%s</a>';
    $overview_capt = '<b>' . sprintf($hyperlink, "index.php?mod=board", t('Forum')) . '</b>';
    $dsp->NewContent($row['name'], "<br />" . t('Du bist hier » ') . $overview_capt . ' » ' . $row['name']);
    $framework->AddToPageTitle($row['name']);
    $dsp->AddSingleRow($new_thread . " " . $dsp->FetchIcon("index.php?mod=board", "back"));
}
switch ($_GET['step']) {
    // Edit headline
    case 10:
        if ($auth['type'] >= 2) {
            $dsp->AddFieldsetStart(t('Thread bearbeiten'));
            include_once 'inc/classes/class_masterform.php';
            $mf = new masterform();
            $mf->AddField(t('Überschrift'), 'caption', 'varchar(255)');
            $pid = $mf->SendForm('index.php?mod=board&action=forum&step=10&fid=' . $_GET['fid'] . '&tid=' . $_GET['tid'], 'board_threads', 'tid', $_GET['tid']);
            $dsp->AddFieldsetEnd();
        }
        break;
    case 20:
        if ($auth['type'] >= 2) {
            foreach ($_POST['action'] as $key => $val) {
                $db->qry_first("UPDATE %prefix%board_threads SET fid = %int% WHERE tid = %int%", $_GET['to_fid'], $key);
            }
        }
        break;
        // Delete Bookmark
    // Delete Bookmark
    case 30:
        $GetFid = $db->qry_first('SELECT fid FROM %prefix%board_threads WHERE tid = %int%', $_GET['tid']);
        $db->qry('DELETE FROM %prefix%board_bookmark WHERE fid = 0 AND tid = %int% AND userid = %int%', $_GET['tid'], $auth['userid']);
Beispiel #21
0
<?php

$dsp->NewContent(t('Verleih'), t('Neuen Artikel zum Verleih eintragen'));
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->AddField(t('Bezeichnung'), 'caption');
$mf->AddField(t('Beschreibung'), 'comment', '', '', FIELD_OPTIONAL);
$mf->AddField(t('Menge'), 'quantity');
$mf->AddDropDownFromTable(t('Besitzer'), 'ownerid', 'userid', 'username', 'user', t('Keinem zugeordnet'), 'type >= 2');
$mf->SendForm('index.php?mod=rent&action=add', 'rentstuff', 'stuffid', $_GET['stuffid']);
$dsp->AddBackButton('index.php?mod=rent');
$dsp->AddContent();
Beispiel #22
0
    }
}
$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);
    }
}
Beispiel #23
0
        $db->free_result($row);
        $mf->AddField(t('Party'), 'party_id', IS_SELECTION, $party_list, $party->party_id);
    }
    $selections = array();
    $selections['gameserver'] = t('Gameserver');
    $selections['ftp'] = t('FTP Server');
    $selections['irc'] = t('IRC Server');
    $selections['web'] = t('Web Server');
    $selections['proxy'] = t('Proxy Server');
    $selections['misc'] = t('Sonstiger Server');
    $mf->AddField(t('Servertyp'), 'type', IS_SELECTION, $selections, FIELD_OPTIONAL);
    if ($cfg['server_ip_auto_assign']) {
        $mf->AddFix('ip', $IPBase . '.' . $cfg['server_ip_next']);
    } else {
        $mf->AddField(t('IP / Domain'), 'ip', '', '', '', 'CheckIP');
    }
    $mf->AddField(t('Port'), 'port', '', '', '', 'CheckPort');
    $mf->AddField(t('MAC-Adresse'), 'mac', '', '', FIELD_OPTIONAL, 'CheckMAC');
    $mf->AddField(t('Betriebssystem'), 'os', '', '', FIELD_OPTIONAL);
    $mf->AddField(t('CPU (MHz)'), 'cpu', '', '', FIELD_OPTIONAL);
    $mf->AddField(t('RAM (MB)'), 'ram', '', '', FIELD_OPTIONA);
    $mf->AddField(t('HDD (GB)'), 'hdd', '', '', FIELD_OPTIONA);
    $mf->AddField(t('Passwort geschützt'), 'pw', '', '', FIELD_OPTIONA);
    $mf->AddField(t('Beschreibung'), 'text', '', LSCODE_ALLOWED, FIELD_OPTIONA);
    if ($mf->SendForm('index.php?mod=server&action=add', 'server', 'serverid', $_GET['serverid'])) {
        // Increase auto IP
        if ($cfg['server_ip_auto_assign']) {
            $db->qry('UPDATE %prefix%config SET cfg_value = %int% WHERE cfg_key = \'server_ip_next\'', $cfg['server_ip_next'] + 1);
        }
    }
}
Beispiel #24
0
        if ($auth['type'] >= 3) {
            $ms2->AddIconField('delete', 'index.php?mod=usrmgr&action=user_fields&step=20&fieldid=', t('Löschen'));
        }
        $ms2->PrintSearch('index.php?mod=usrmgr&action=user_fields', 'f.fieldid');
        $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), "index.php?mod=usrmgr&action=user_fields&step=10"));
        $dsp->AddContent();
        break;
        // Add new entry
    // Add new entry
    case 10:
        include_once 'inc/classes/class_masterform.php';
        $mf = new masterform();
        $mf->AddField('Feldname', 'name', '', '', '', 'check_no_space');
        $mf->AddField('Bezeichnung', 'caption');
        $selections = array();
        $selections['0'] = t('Ausblenden');
        $selections['1'] = t('Optional');
        $selections['2'] = t('Pflichtfeld');
        $mf->AddField(t('Optional'), 'optional', IS_SELECTION, $selections);
        $mf->AdditionalDBUpdateFunction = 'Update';
        $mf->SendForm('index.php?mod=usrmgr&action=user_fields&step=10', 'user_fields', 'fieldid', $_GET['fieldid']);
        break;
        // Delete entry
    // Delete entry
    case 20:
        $fild_row = $db->qry_first("SELECT name FROM %prefix%user_fields WHERE fieldid = %int%", $_GET['fieldid']);
        $db->qry("ALTER TABLE %prefix%user DROP %plain%", $fild_row['name']);
        $db->qry("DELETE FROM %prefix%user_fields WHERE fieldid = %int%", $_GET['fieldid']);
        $func->confirmation('Gelöscht', 'index.php?mod=usrmgr&action=user_fields');
        break;
}
Beispiel #25
0
            $mf->AddField(t('LS-Mail Alert') . '|' . t('Mir eine E-Mail senden, wenn eine neue LS-Mail eingegangen ist'), 'lsmail_alert', '', '', FIELD_OPTIONAL);
            if ($cfg['user_avatarupload']) {
                $mf->AddField(t('Avatar'), 'avatar_path', IS_FILE_UPLOAD, 'ext_inc/avatare/' . $_GET['userid'] . '_', FIELD_OPTIONAL, 'CheckAndResizeUploadPic');
            }
            $mf->AddField(t('Signatur'), 'signature', '', LSCODE_ALLOWED, FIELD_OPTIONAL);
            $mf->AddGroup(t('Einstellungen'));
        }
    }
    if ($_GET['mod'] == 'signon') {
        $mf->SendButtonText = 'Benutzer anlegen';
    } elseif ($_GET['mod'] == 'usrmgr' and $_GET['action'] == 'entrance' and $_GET['step'] == 3) {
        $mf->SendButtonText = 'Edit. + Einchecken';
    }
    $AddUserSuccess = 0;
    $mf->AdditionalDBUpdateFunction = 'Update';
    if ($mf->SendForm('index.php?mod=' . $_GET['mod'] . '&action=' . $_GET['action'] . '&step=' . $_GET['step'] . '&signon=' . $_GET['signon'], 'user', 'userid', $_GET['userid'])) {
        // Log in new user
        if (!$auth['login']) {
            $_POST['login'] = 1;
            $_POST['email'] = $_POST['email'];
            $_POST['password'] = $_POST['password_original'];
            $auth = $authentication->login($_POST['email'], $_POST['password_original'], 0);
            initializeDesign();
        }
        $AddUserSuccess = 1;
    }
}
if ($_GET['mod'] == 'signon' and $auth['login']) {
    $_GET['mf_step'] = 1;
    $_GET['user_id'] = $auth['userid'];
    $mf_number--;
Beispiel #26
0
         }
         #if ($auth['type'] >= 2) {
         //$mf->AddField('Seatcontrol', 'seatcontrol', IS_TEXT_MESSAGE, '', FIELD_OPTIONAL);
         #$mf->AddField(t('Bezahltdatum'), 'paiddate', '', '', FIELD_OPTIONAL);
         #$mf->AddField(t('Eingecheckt'), 'checkin', '', '', FIELD_OPTIONAL);
         #$mf->AddField(t('Ausgecheckt'), 'checkout', '', '', FIELD_OPTIONAL);
         #$mf->AddField(t('Anmeldedatum'), 'signondate', '', '', FIELD_OPTIONAL);
         #}
         #else
         $mf->AddFix('signondate', 'NOW()');
         if ($auth['type'] >= 2) {
             $mf->AddField(t('Mail versenden?') . '|' . t('Den Benutzer per Mail über die Änderung informieren'), 'sendmail', 'tinyint(1)', '', FIELD_OPTIONAL);
         }
         $mf->SendButtonText = 'An-/Abmelden';
         $mf->AdditionalDBUpdateFunction = 'PartyMail';
         $mf->SendForm('index.php?mod=' . $_GET['mod'] . '&action=' . $_GET['action'] . '&party_id=' . $row['party_id'], 'party_user', 'user_id', $_GET['user_id']);
         $dsp->AddFieldsetEnd();
     } else {
         // F*****g bad Bugfix. $mf_number is a Globalvar in Masterform
         $mf_number++;
     }
     $MFID++;
 }
 $db->free_result($res);
 // ShowHistory
 $dsp->AddFieldsetStart(t('Vergangene Partys'));
 $res = $db->qry("SELECT p.*, pu.user_id, pu.paid, pu.checkin, pu.checkout, UNIX_TIMESTAMP(p.enddate) AS enddate, UNIX_TIMESTAMP(p.sstartdate) AS sstartdate, UNIX_TIMESTAMP(p.senddate) AS senddate, UNIX_TIMESTAMP(p.startdate) AS startdate FROM %prefix%partys AS p\n      LEFT JOIN %prefix%party_user AS pu ON p.party_id = pu.party_id\n      WHERE UNIX_TIMESTAMP(p.enddate) < UNIX_TIMESTAMP(NOW()) AND (pu.user_id = %int% OR pu.user_id IS NULL)\n      ORDER BY p.startdate", $_GET['user_id']);
 while ($row = $db->fetch_array($res)) {
     $text = '';
     if ($row['user_id']) {
         $text .= t('Du warst angemeldet');
Beispiel #27
0
     $db->free_result($res);
 }
 $dsp->NewContent(t('Details der Partie %1 vs %2', $team1['name'], $team2['name']), t('Hier siehst du Details zu dieser Partie und kannst das Ergebnis eintragen.'));
 // Write Start and Enddate for each round
 $round_start = $tfunc->GetGameStart($tournament, $team1['round'], $team1['group_nr']);
 $round_end = $tfunc->GetGameEnd($tournament, $team1['round'], $team1['group_nr']);
 $dsp->AddDoubleRow(t('Spielzeit'), $func->unixstamp2date($round_start, "datetime") . " - " . $func->unixstamp2date($round_end, "datetime"));
 $dsp->AddDoubleRow(t('Map'), $map[abs(floor($team1['round'])) % count($map)]);
 if ($func->isModActive('server')) {
     $dsp->AddDoubleRow(t('Server'), '<a href="index.php?mod=server&action=show_details&serverid=' . $team1['server_id'] . '">' . $selections[$team1['server_id']] . '</a>');
 }
 if ($func->isModActive('server') and $auth['type'] >= 2) {
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->AddField(t('Server Zuweisen'), 'server_id', IS_SELECTION, $selections, FIELD_OPTIONAL);
     if ($mf->SendForm("index.php?mod=tournament2&action=submit_result&step=1&tournamentid=" . $tournamentid . "&gameid1=" . $gameid1 . "&gameid2=" . $gameid2, 't2_games', 'gameid', $gameid1)) {
         $db->qry("UPDATE %prefix%t2_games SET server_id = %int% WHERE gameid = %int%", $_POST['server_id'], $gameid2);
     }
 }
 $dsp->AddHRuleRow();
 $dsp->AddSingleRow("<b>" . t('Ergebnis melden') . "</b>");
 $dsp->SetForm("index.php?mod=tournament2&action=submit_result&step=2&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}", '', '', 'multipart/form-data');
 // Write Team 1
 $disqualify_link = "";
 /*  // Disquallifiy droped, due to errors
 			if ($auth["type"] > 1 and $tournament['status'] == "process") {
 				if ($team1['disqualified']) $disqualify_link = "<font color=\"#ff0000\">".t('Disqualifiziert')."</font> ". $dsp->FetchSpanButton(t('Disqualifizieren rückgängig'), "index.php?mod=tournament2&action=disqualify&teamid={$team1['teamid']}&step=10");
 				else $disqualify_link = $dsp->FetchSpanButton(t('Disqualifizieren'), "index.php?mod=tournament2&action=disqualify&teamid={$team1['teamid']}");
 			}
 */
 $dsp->AddFieldSetStart(t('Team') . ' 1' . $tfunc->button_team_details($team1['teamid'], $tournamentid) . " " . $disqualify_link);
Beispiel #28
0
 }
 $dsp->AddDoubleRow('', $dsp->FetchSpanButton(t('Editieren'), 'index.php?mod=bugtracker&action=add&bugid=' . $row['bugid']) . $dsp->FetchSpanButton(t('Zurück zur Übersicht'), 'index.php?mod=bugtracker'));
 if ($auth['login']) {
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->ManualUpdate = 1;
     if ($auth['type'] >= 2) {
         $mf->AddField(t('Status'), 'state', IS_SELECTION, $bugtracker->stati);
     } elseif ($row['state'] == 0) {
         $mf->AddField(t('Status'), 'state', IS_SELECTION, array('1' => $bugtracker->stati['1']));
     } elseif ($row['state'] == 4) {
         $mf->AddField(t('Status'), 'state', IS_SELECTION, array('7' => $bugtracker->stati['7']));
     } elseif ($row['state'] == 3) {
         $mf->AddField(t('Status'), 'state', IS_SELECTION, array('2' => $bugtracker->stati['2']));
     }
     if ($mf->SendForm('', 'bugtracker', 'bugid', $_GET['bugid'])) {
         $bugtracker->SetBugState($_GET['bugid'], $_POST['state']);
         $func->confirmation(t('Geändert'), $mf->LinkBack);
     }
 }
 include 'inc/classes/class_mastercomment.php';
 new Mastercomment('BugEintrag', $_GET['bugid'], array('bugtracker' => 'bugid'));
 $dsp->EndTab();
 $dsp->StartTab(t('Log'), 'save');
 include_once 'modules/mastersearch2/class_mastersearch2.php';
 $ms2 = new mastersearch2('bugtracker');
 $ms2->query['from'] = "%prefix%log AS l LEFT JOIN %prefix%user AS u ON l.userid = u.userid";
 $ms2->query['where'] = "(sort_tag = 'bugtracker' AND target_id = " . (int) $_GET['bugid'] . ')';
 $ms2->config['EntriesPerPage'] = 50;
 $ms2->AddResultField('', 'l.description');
 $ms2->AddSelect('u.userid');
Beispiel #29
0
        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. &Uuml;berpr&uuml;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'];
    $loginpassword = $cfg['download_password'];
    $subdir = $cfg['download_subdir'];
    $connect = @ftp_connect($server, $port, "2");
Beispiel #30
0
 $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
         $db->qry("UPDATE %prefix%board_posts SET tid = %int% WHERE pid = %int%", $tid, $pid);
     }
     // 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'];
     }