Example #1
0
             $dsp->AddCheckBoxRow('e_cont', t('Inhalt exportieren'), '', '', 1, 1);
             $dsp->AddFormSubmitRow(t('DB exportieren'));
             $dsp->AddFieldsetEnd();
             $dsp->AddFieldsetStart(t('Weitere Aktionen'));
             $dsp->AddDoubleRow('', $dsp->FetchSpanButton('Modul-Datenbank zurücksetzen', 'index.php?mod=install&action=mod_cfg&step=41&module=' . $_GET['module'] . '&tab=2'));
             $dsp->AddFieldsetEnd();
             break;
     }
 }
 $dsp->EndTab();
 $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 Änderungen gehen verloren.'));
 if ($_POST['target_language']) {
Example #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();
Example #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'])) {
}
Example #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']);
Example #5
0
        $func->information(t("Bitte wähle einen Empfänger für deine Transaktion aus"));
        $ret = false;
    } elseif ($_POST['toUserid'] == $auth['userid']) {
        $func->information(t("Du kannst dir nicht selbst Geld überweisen"));
        $ret = false;
    } elseif ((double) $_POST['movement'] <= 0) {
        $func->information(t("Du kannst keine negativen oder neutralen  Beträge überweisen"));
        $ret = false;
    } elseif ($_POST['comment'] == "") {
        $func->information(t("Bitte gib einen Kommentar zu ihrer Überweisung an."));
        $ret = false;
    }
    return $ret;
}
include_once 'inc/classes/class_masterform.php';
$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;
Example #6
0
     break;
     // Export Module Translations
 // Export Module Translations
 case 30:
     include "modules/install/class_export.php";
     $export = new Export();
     $export->LSTableHead();
     $export->ExportMod($_GET['file'], 0, 0, 1);
     $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');
Example #7
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();
Example #8
0
<?php

include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
function CheckEndDate($enddate)
{
    global $func;
    if ($func->str2time($enddate) < $func->str2time($_POST['startdate'])) {
        return t('Der Endzeitpunkt muss nach dem Startzeitpunkt liegen');
    } else {
        return false;
    }
}
function CheckSignonStartDate($sstartdate)
{
    global $func;
    if ($func->str2time($sstartdate) > $func->str2time($_POST['startdate'])) {
        return t('Der Anmeldestart muss vor dem Partystart liegen');
    } else {
        return false;
    }
}
function CheckSignonEndDate($senddate)
{
    global $func;
    if ($func->str2time($senddate) < $func->str2time($_POST['sstartdate'])) {
        return t('Der Anmeldeschluss muss nach dem Anmeldestart liegen');
    }
    if ($func->str2time($senddate) > $func->str2time($_POST['startdate'])) {
        return t('Der Anmeldeschluss muss vor dem Partystart liegen');
    } else {
Example #9
0
#if (!$row['found']) $db->qry("INSERT INTO %prefix%user SET userid = %int%", $auth['userid']);
function CheckAndResizeUploadPic($AvatarName)
{
    global $gd;
    if ($AvatarName == '') {
        return false;
    }
    $FileEnding = strtolower(substr($AvatarName, strrpos($AvatarName, '.'), 5));
    if ($FileEnding != '.png' and $FileEnding != '.gif' and $FileEnding != '.jpg' and $FileEnding != '.jpeg') {
        return t('Bitte eine Grafikdatei auswählen');
    }
    $gd->CreateThumb($AvatarName, $AvatarName, 100, 100);
    return false;
}
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;
Example #10
0
 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();
     }
 }
Example #11
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']);
Example #12
0
}
function CheckStateChangeAllowed($state)
{
    if ($state == 'process') {
        return t('Dieser Status kann nicht manuell gesetzt werden. Zum setzen, bitte "Generieren" verwenden');
    }
    if ($state == 'closed') {
        return t('Dieser Status kann nicht manuell gesetzt werden. Er wird automatisch gesetzt, sobald das letzte Ergebnis im Turnier eingetragen wurde');
    }
    return false;
}
#$dsp->SetForm('index.php?mod=tournament2&action=add&step=10');
#$dsp->AddDropDownFieldRow('template', t('Von Vorlage laden'), $selections, '');
#$dsp->AddFormSubmitRow(t('Weiter'));
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
// Name
$mf->AddField(t('Turniername'), 'name');
$mf->AddField(t('Spiel'), 'game');
$mf->AddField(t('Version'), 'version', '', '', FIELD_OPTIONAL);
$mf->AddDropDownFromTable(t('Turniermanagement'), 'tournamentadmin', 'userid', 'username', 'user', t('Keinem zugeordnet'), 'type >= 2');
$mf->AddDropDownFromTable(t('Technik/Server'), 'techadmin', 'userid', 'username', 'user', t('Keinem zugeordnet'), 'type >= 2');
$t_state = $db->qry_first('SELECT status FROM %prefix%tournament_tournaments WHERE tournamentid=%int%', $_GET['tournamentid']);
if ($t_state['status'] == 'process') {
    $mf->AddField(t('Status'), '', IS_TEXT_MESSAGE, t('Turnier wird gerade gespielt'));
} elseif ($t_state['status'] == 'closed') {
    $mf->AddField(t('Status'), '', IS_TEXT_MESSAGE, t('Turnier wurde beendet'));
} else {
    $selections = array();
    if ($_POST['status'] == '') {
        $_POST['status'] = 'open';
Example #13
0
     foreach ($_POST['action'] as $key => $val) {
         $db->qry("UPDATE %prefix%boxes SET active = 1 WHERE boxid = %int%", $key);
     }
     break;
     // Deactivate
 // Deactivate
 case 11:
     foreach ($_POST['action'] as $key => $val) {
         $db->qry("UPDATE %prefix%boxes SET active = 0 WHERE boxid = %int%", $key);
     }
     break;
     // Edit
 // Edit
 case 20:
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->AddField(t('Titel'), 'name');
     $selections = array();
     $selections['0'] = t('Links');
     $selections['1'] = t('Rechts');
     $mf->AddField(t('Seite'), 'place', IS_SELECTION, $selections, FIELD_OPTIONAL);
     $mf->AddField(t('Position'), 'pos');
     $mf->AddField(t('Aktiv'), 'active', '', '', FIELD_OPTIONAL);
     $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');
Example #14
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;
}
Example #15
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();
Example #16
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';
}
Example #17
0
                 $db->qry("DELETE FROM %prefix%clan WHERE clanid = %string%", $key);
                 $db->qry("UPDATE %prefix%user SET clanid = 0 WHERE clanid = %string%", $key);
             }
         }
         $func->confirmation(t('Löschen erfolgreich'), 'index.php?mod=clanmgr&action=clanmgr');
     }
     break;
     // Add - Edit
 // Add - Edit
 case 30:
     // if ($_GET['clanid'] == '') $func->error(t('Keine Clan-ID angegeben!'), "index.php?mod=home");
     if ($_GET['clanid'] != '' and !($_GET['clanid'] == $auth['clanid'] and $auth['clanadmin'] == 1) and $auth['type'] < 2) {
         $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'));
Example #18
0
    $row = $db->qry_first("SELECT name, need_type, need_group FROM %prefix%board_forums WHERE fid=%int%", $_GET["fid"]);
    $new_thread = $dsp->FetchIcon("index.php?mod=board&action=thread&fid=" . $_GET['fid'], "add");
    // 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:
Example #19
0
$ms2->AddResultField(t('Datum'), 'n.date', 'MS2GetDate');
// These functions could be accessed for each row. To each link the group-by id is attached. See PrintSearch
$ms2->AddIconField('details', 'index.php?mod=news&action=comment&newsid=', t('Details'));
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=news&action=change&step=2&newsid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=news&action=delete&step=2&newsid=', t('Löschen'));
}
// Use this to finaly print the search. first argument: the current url; second argument: the group-by-id this id will be unique in the result and will be attached to each AddIconField-link
$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
}
Example #20
0
        // Inet-Mail
    } else {
        $row = $db->qry_first("SELECT name, firstname, email FROM %prefix%user WHERE userid = %int%", $_POST['toUserID']);
        if ($auth['userid']) {
            $row2 = $db->qry_first("SELECT email FROM %prefix%user WHERE userid = %int%", $auth['userid']);
            $_POST['SenderMail'] = $row2['email'];
        }
        $mail->create_inet_mail($row['firstname'] . ' ' . $row['name'], $row['email'], $__POST['Subject'], $__POST['msgbody'], $_POST['SenderMail']);
        $func->confirmation('Die Mail wurde versendet', '');
        unset($_SESSION['tmpmsgbody']);
        unset($_SESSION['tmpmsgsubject']);
        return false;
    }
}
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
if ($_GET['userID']) {
    $_POST['toUserID'] = $_GET['userID'];
}
if ($_GET['replyto']) {
    $row = $db->qry_first("SELECT m.mailID, m.Subject, m.msgbody, UNIX_TIMESTAMP(m.tx_date) AS tx_date, u.username FROM %prefix%mail_messages AS m\n    LEFT JOIN %prefix%user AS u ON m.fromUserID = u.userid\n    WHERE m.mailID = %int%", $_GET['replyto']);
    $reply_message = $row[mailID];
    if (!$_POST['toUserID'] and $_GET['replyto']) {
        $_POST['Subject'] = 'WG: ' . $row['Subject'];
    } elseif (substr($row['Subject'], 0, 4) == 'Re: ') {
        $_POST['Subject'] = $row['Subject'];
    } else {
        $_POST['Subject'] = 'Re: ' . $row['Subject'];
    }
    $_POST['msgbody'] = '
Example #21
0
<?php

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');
$party_list = array();
$row = $db->qry("SELECT party_id, name FROM %prefix%partys");
while ($res = $db->fetch_array($row)) {
    $party_list[$res['party_id']] = $res['name'];
}
$group_list = array();
$row = $db->qry("SELECT id, caption FROM %prefix%cashmgr_group");
while ($res = $db->fetch_array($row)) {
    $group_list[$res['id']] = $res['caption'];
}
$mf->AddDropDownFromTable(t('Party'), 'partyid', 'party_id', 'name', 'partys');
$mf->AddDropDownFromTable(t('Gruppe'), 'groupid', 'id', 'caption', 'cashmgr_group');
$mf->AddFix('fix', '1');
$mf->AddFix('editorid', $auth['userid']);
$mf->AddFix('modul', 'cashmgr');
$mf->SendForm('index.php?mod=cashmgr&action=fixbooking', 'cashmgr_accounting', 'ID', $_GET['cashid']);
Example #22
0
     $ms2->config['EntriesPerPage'] = 20;
     $ms2->AddResultField('Feldname', 'f.name');
     $ms2->AddResultField('Bezeichnung', 'f.caption');
     $ms2->AddResultField('Optional', 'f.optional');
     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']);
Example #23
0
    $IPStart = substr($IPArea, 0, strrpos($IPArea, '-'));
    if (!$cfg['server_ip_next']) {
        $cfg['server_ip_next'] = $IPStart;
    }
    $IPEnd = substr($IPArea, strrpos($IPArea, '-') + 1, strlen($IPArea));
}
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'];
        }
Example #24
0
     }
     $row2 = $db->qry_first("SELECT paid FROM %prefix%party_user WHERE party_id = %int% AND user_id = %int%", $_GET['party_id'], $id);
     // Free seats if the user hasn't paid already
     if ($row2['paid'] == 0) {
         $seat2->FreeSeatAllMarkedByUser($id);
     }
     return false;
 }
 // Show Upcomming
 include_once 'inc/classes/class_masterform.php';
 $MFID = 1;
 $res = $db->qry("SELECT *, UNIX_TIMESTAMP(enddate) AS enddate, UNIX_TIMESTAMP(sstartdate) AS sstartdate, UNIX_TIMESTAMP(senddate) AS senddate, UNIX_TIMESTAMP(startdate) AS startdate FROM %prefix%partys WHERE UNIX_TIMESTAMP(enddate) >= UNIX_TIMESTAMP(NOW()) ORDER BY startdate");
 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()');
Example #25
0
        return 0;
    }
}
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);
Example #26
0
     $dsp->AddDoubleRow(t('SVN-Revision'), $row['revision'] . ' (<a href="http://code.google.com/p/lansuite/source/detail?r=' . $row['revision'] . '" target="_blank">' . t('Änderungen anzeigen') . '</a>)');
 }
 if ($auth['type'] >= 2) {
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     $mf->AddField(t('Fix in SVN-Revision'), 'revision');
     $mf->SendForm('', 'bugtracker', 'bugid', $_GET['bugid']);
 }
 $dsp->AddDoubleRow(t('Text'), $func->text2html($row['text']));
 if ($row['file']) {
     $dsp->AddDoubleRow(t('Anhang'), $dsp->FetchAttachmentRow($row['file']));
 }
 $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);
     }
 }
Example #27
0
         $selections[$row['serverid']] = $row['caption'];
     }
     $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']}");
 			}
Example #28
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';
}
Example #29
0
            $mf = new masterform();
            $mf->AddField(t('URL'), 'link');
            $mf->AddFix('dir', $_GET['dir']);
            $mf->SendForm('index.php?mod=downloads&dir=' . $_GET['dir'], 'download_urls', 'urlid', $row['urlid']);
            $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. &Uuml;berpr&uuml;fe, ob diese in PHP einkompiliert bzw. aktiviert ist'));
} else {
Example #30
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();
}