Esempio n. 1
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'])) {
}
Esempio n. 2
0
    }
    $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'];
        }
        $db->free_result($row);
        $mf->AddField(t('Party'), 'party_id', IS_SELECTION, $party_list, $party->party_id);
    }
Esempio n. 3
0
         // Module-Permissions
         $selections = array();
         $res = $db->qry("SELECT module.name, module.caption FROM %prefix%modules AS module\n              LEFT JOIN %prefix%menu AS menu ON menu.module = module.name\n              WHERE menu.file != ''\n              GROUP BY menu.module");
         while ($row = $db->fetch_array($res)) {
             $selections[$row['name']] = $row['caption'];
         }
         $db->free_result($res);
         if (!$_GET['mf_step'] and $_GET['userid']) {
             $res = $db->qry("SELECT module FROM %prefix%user_permissions WHERE userid = %int%", $_GET['userid']);
             while ($row = $db->fetch_array($res)) {
                 $_POST["permissions"][] = $row["module"];
             }
             $db->free_result($res);
         }
         $mf->AddField(t('Zugriffsberechtigung') . HTML_NEWLINE . HTML_NEWLINE . '(' . t('Der Benutzertyp muss zusätzlich Admin, oder Superadmin sein.') . ')' . HTML_NEWLINE . HTML_NEWLINE . '(' . t('Solange kein Admim einem Modul zugeordnet ist, hat dort jeder Admin Berechtigungen.') . ')', 'permissions', IS_MULTI_SELECTION, $selections, FIELD_OPTIONAL);
         $mf->AddDropDownFromTable(t('Gruppe'), 'group_id', 'group_id', 'group_name', 'party_usergroups', t('Keine'));
         $mf->AddGroup('Rechte');
     }
 }
 // If not admin and user is created (not changed)
 // or if quick sign on is enabled
 if ($quick_signon or $auth['type'] < 2 and !$_GET['userid']) {
     $mf->AddFix('type', 1);
 }
 $mf->AddField(t('E-Mail'), 'email', '', '', '', CheckValidEmail);
 if ($_GET['action'] != 'change' and $_GET['action'] != 'entrance' or $_GET['action'] == 'entrance' and !$_GET['userid']) {
     if ($cfg['signon_autopw']) {
         $_SESSION['tmp_pass'] = $usrmgr->GeneratePassword();
         $mf->AddFix('password', md5($_SESSION['tmp_pass']));
     } else {
         $mf->AddField(t('Passwort'), 'password', IS_NEW_PASSWORD);
Esempio n. 4
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();
Esempio n. 5
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']);
Esempio n. 6
0
    }
    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';
    }
    $selections['invisible'] = t('Unsichtbar (nur Admins können das Turnier sehen)');
    $selections['locked'] = t('Anmeldung geschlossen (Turnier ist sichtbar, jedoch kann sich keiner anmelden)');
    $selections['open'] = t('Anmeldung geöffnet');
    $selections['process'] = t('Turnier wird gerade gespielt (Status wird automatisch durch Klick auf "Generieren" gesetzt)');
Esempio n. 7
0
$row = $db->qry_first('SELECT reporter FROM %prefix%bugtracker WHERE bugid = %int%', $_GET['bugid']);
if ($_GET['bugid'] and $auth['type'] < 2 and $row['reporter'] != $auth['userid']) {
    $func->error(t('Nur Admins und der Reporter dürfen Bug-Einträge im Nachhinein editieren'), 'index.php?mod=bugtracker');
} else {
    include_once 'inc/classes/class_masterform.php';
    $mf = new masterform();
    $mf->AddField(t('Überschrift'), 'caption');
    $selections = array();
    $selections[''] = t('Bitte auswählen');
    $selections['1'] = t('Feature Wunsch');
    $selections['2'] = t('Schreibfehler');
    $selections['3'] = t('Kleiner Fehler');
    $selections['4'] = t('Schwerer Fehler');
    $selections['5'] = t('Absturz');
    $mf->AddField(t('Typ'), 'type', IS_SELECTION, $selections);
    $mf->AddDropDownFromTable(t('Betrifft Modul'), 'module', 'name', 'name', 'modules', t('Nicht Modul-spezifisch'));
    if ($_SERVER['SERVER_NAME'] == 'lansuite.orgapage.de') {
        $mf->AddField(t('Betrifft Version'), 'version');
    }
    $selections = array();
    for ($z = 5; $z >= -5; $z--) {
        $selections[$z] = $z;
        if ($z == 5) {
            $selections[$z] .= ' (' . t('Sehr hoch') . ')';
        }
        if ($z == -5) {
            $selections[$z] .= ' (' . t('Sehr gering') . ')';
        }
    }
    $mf->AddField(t('Priorität'), 'priority', IS_SELECTION, $selections, FIELD_OPTIONAL);
    // Assign bug
Esempio n. 8
0
<?php

$selectrequire = array();
$selectrequire['0'] = t('Alle');
$selectrequire['2'] = t('Admins und Superadmins');
$selectrequire['3'] = t('Superadmins');
if (!$_GET['party_id']) {
    $_GET['party_id'] = $party->party_id;
}
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->AdditionalKey = 'party_id = ' . (int) $_GET['party_id'];
$dsp->AddDoubleRow('Party', $party->data['name']);
$mf->AddField(t('Text für Eintrittspreis'), 'price_text');
$mf->AddField(t('Preis'), 'price');
$mf->AddDropDownFromTable(t('Gruppenname'), 'group_id', 'group_id', 'group_name', 'party_usergroups');
$mf->AddField(t('Sichtbar für'), 'requirement', IS_SELECTION, $selectrequire, 1);
$mf->AddField(t('Gültig bis'), 'enddate');
$mf->SendForm('index.php?mod=party&action=price_edit&party_id=' . $_GET['party_id'], 'party_prices', 'price_id', $_GET['price_id']);
$dsp->AddBackButton('index.php?mod=party&action=price&party_id=' . $_GET['party_id']);
$dsp->AddContent();
Esempio n. 9
0
    <li><a href="javascript:OpenHelplet(\'sponsor\', \'adsense_box\');">Google Anzeigen</a></li>
    </ul>';
    $mf->AddField(t('Auf Sponsorenseite') . '|' . t('Der Banner wird auf der Sponsorenseite angezeigt'), 'sponsor', 'tinyint(1)', '', FIELD_OPTIONAL, '', 3);
    $mf->AddField(t('Bild-Upload'), 'pic_upload', IS_FILE_UPLOAD, 'ext_inc/banner/', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-URL'), 'pic_path', 'varchar(255)', '', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-Code (z.B. Flash)') . $code_popup_link_banner, 'pic_code', 'text', '', FIELD_OPTIONAL);
    $mf->AddGroup('Sponsorenseite');
    $mf->AddField('', '', IS_TEXT_MESSAGE, t('Wenn du hier keine Datei angibst, wird der Banner/Button automatisch durch verkleinern der oben angegebenen Datei erzeugt (Funktioniert nur bei heraufgeladenen Dateien).'));
    $mf->AddGroup('');
    $mf->AddField(t('In Rotations-Banner') . '|' . t('Der Banner wird oben in den Rotations-Banner aufgenommen'), 'rotation', 'tinyint(1)', '', FIELD_OPTIONAL, '', 4);
    $mf->AddField(t('Bild-Upload'), 'pic_upload_banner', IS_FILE_UPLOAD, 'ext_inc/banner/', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-URL'), 'pic_path_banner', 'varchar(255)', '', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-Code (z.B. Flash)') . $code_popup_link_banner, 'pic_code_banner', 'text', '', FIELD_OPTIONAL);
    $mf->AddField(t('Bei HTTPS verstecken') . '|' . t('Diese Option solltest du aktivieren, wenn du den Banner-Code von einer externen Webseite lädst und er dort nur als HTTP Version verfügbar ist, du deine Webseite aber als HTTPS ausliefern möchtest.'), 'ssl_hide_banner', '', '', FIELD_OPTIONAL);
    $mf->AddGroup('Rotation Banner');
    $mf->AddField(t('In Sponsoren-Box') . '|' . t('Der Banner wird in der Sponsoren-Box angezeigt'), 'active', 'tinyint(1)', '', FIELD_OPTIONAL, '', 4);
    $mf->AddField(t('Bild-Upload'), 'pic_upload_button', IS_FILE_UPLOAD, 'ext_inc/banner/', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-URL'), 'pic_path_button', 'varchar(255)', '', FIELD_OPTIONAL);
    $mf->AddField(t('Oder: Bild-Code (z.B. Flash)') . $code_popup_link_box, 'pic_code_button', 'text', '', FIELD_OPTIONAL);
    $mf->AddField(t('Bei HTTPS verstecken') . '|' . t('Diese Option solltest du aktivieren, wenn du den Banner-Code von einer externen Webseite lädst und er dort nur als HTTP Version verfügbar ist, du deine Webseite aber als HTTPS ausliefern möchtest.'), 'ssl_hide_button', '', '', FIELD_OPTIONAL);
    $mf->AddGroup('Sponsoren Box');
    if ($func->isModActive('tournament2')) {
        $mf->AddDropDownFromTable(t('Sponsor einem Turnier zuordnen'), 'tournamentid', 'tournamentid', 'name', 'tournament_tournaments', t('Keine'), 'party_id = ' . (int) $party->party_id);
    }
    $mf->AddField(t('Position'), 'pos');
    $mf->AddField(t('Text'), 'text', '', HTML_ALLOWED, FIELD_OPTIONAL);
    $mf->AddGroup('Misc.');
    $mf->AdditionalDBAfterSelectFunction = 'RewriteFields';
    $mf->AdditionalDBPreUpdateFunction = 'UploadFiles';
    $mf->SendForm('index.php?mod=sponsor&amp;action=' . $_GET['action'], 'sponsor', 'sponsorid', $_GET['sponsorid']);
}
Esempio n. 10
0
                    $db->qry('INSERT INTO %prefix%polloptions SET caption = %string%, pollid = %int%', $val, $id);
                }
            }
        }
    }
    return true;
}
$dsp->NewContent(t('Poll hinzufügen / ändern'), t('Um den Poll hinzuzufügen / zu ändern, fülle bitte das folgende Formular vollständig aus.'));
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->AddField(t('Name'), 'caption');
$mf->AddField(t('Bemerkung'), 'comment', '', LSCODE_ALLOWED, FIELD_OPTIONAL);
$mf->AddField(t('Anonym'), 'anonym', '', '', FIELD_OPTIONAL);
$mf->AddField(t('Mehrfachauswahl möglich'), 'multi', '', '', FIELD_OPTIONAL);
$mf->AddField(t('Zeitlich begrenzen'), 'endtime', '', '', FIELD_OPTIONAL);
$mf->AddDropDownFromTable(t('Benutzergruppe'), 'group_id', 'group_id', 'group_name', 'party_usergroups', t('Keine bestimmte Gruppe'));
$mf->AddField(t('Nur eingeloggt?'), 'requirement', 'tinyint(1)', '', FIELD_OPTIONAL);
// Poll Options
if ($_POST['poll_option']) {
    foreach ($_POST['poll_option'] as $key => $val) {
        $_POST["poll_option[{$key}]"] = $val;
    }
} elseif ($_GET['pollid']) {
    $res = $db->qry('SELECT caption FROM %prefix%polloptions WHERE pollid = %int% ORDER BY polloptionid', $_GET['pollid']);
    for ($z = 1; $row = $db->fetch_array($res); $z++) {
        if (!$_POST["poll_option[{$z}]"]) {
            $_POST["poll_option[{$z}]"] = $row['caption'];
        }
    }
    $db->free_result($res);
}