Пример #1
0
 if ($auth['type'] >= 3) {
     $dsp->StartTab(t('Sessions'), 'generate');
     include_once 'modules/mastersearch2/class_mastersearch2.php';
     $ms2 = new mastersearch2('usrmgr');
     $ms2->query['from'] = "%prefix%stats_auth a";
     $ms2->query['where'] = "a.userid = " . (int) $_GET['userid'];
     $ms2->config['EntriesPerPage'] = 50;
     $ms2->AddResultField(t('Session-ID'), 'a.sessid');
     $ms2->AddResultField(t('IP'), 'a.ip');
     #$ms2->AddResultField(t('Login?'), 'a.login');
     $ms2->AddResultField(t('Hits'), 'a.hits');
     $ms2->AddResultField(t('Visits'), 'a.visits');
     #$ms2->AddResultField(t('Letzter Aufruf'), 'a.logtime', 'MS2GetDate');
     $ms2->AddResultField(t('Eingeloggt'), 'a.logintime', 'MS2GetDate');
     $ms2->AddResultField(t('Letzter Aufruf'), 'a.lasthit', 'MS2GetDate');
     $ms2->PrintSearch('index.php?mod=usrmgr&action=details&userid=' . $_GET['userid'] . '&headermenuitem=5', 'a.sessid');
     $dsp->EndTab();
 }
 $plugin = new plugin('usrmgr_details_tab');
 while (list($caption, $inc, $icon) = $plugin->fetch()) {
     $dsp->StartTab($caption, $icon);
     include_once $inc;
     $dsp->EndTab();
 }
 $dsp->EndTabs();
 $db->free_result($user_fields);
 if ($auth['type'] >= 2) {
     $buttons = $dsp->FetchSpanButton(t('Benutzerübersicht'), 'index.php?mod=' . $_GET['mod'] . '&action=search') . ' ';
 } else {
     $buttons = $dsp->FetchSpanButton(t('Benutzerübersicht'), 'index.php?mod=guestlist&action=guestlist') . ' ';
 }
Пример #2
0
<?php

$dsp->NewContent(t('Ränge'));
$out = '';
$lines = explode("\n", $cfg['board_rank']);
foreach ($lines as $line) {
    list($num, $name) = explode('->', $line);
    $out .= t('Ab %1 Posts: %2', array($num, $name)) . HTML_NEWLINE;
}
$dsp->AddSingleRow($out);
$dsp->AddFieldSetStart(t('Aktuelle Rangliste'));
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%board_posts AS p\n    LEFT JOIN %prefix%user AS u ON u.userid = p.userid";
$ms2->query['default_order_by'] = 'posts DESC';
$ms2->AddResultField(t('Benutzername'), 'u.username', 'UserNameAndIcon');
$ms2->AddResultField(t('Beiträge'), 'COUNT(*) as posts');
$ms2->PrintSearch('index.php?mod=board&action=ranking', 'p.userid');
$dsp->AddFieldsetEnd();
$dsp->AddBackButton($func->internal_referer);
Пример #3
0
switch ($_GET['step']) {
    // Delete
    case 10:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->MultiDelete('cron', 'jobid');
        break;
        // Run now
    // Run now
    case 20:
        include_once "modules/cron2/class_cron2.php";
        $cron2 = new cron2();
        $dsp->AddDoubleRow(t('Folgender SQL-Befehl wurde ausgeführt'), $cron2->Run($_GET['jobid']));
        $dsp->AddBackButton('index.php?mod=cron2');
        break;
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('cron2');
        $ms2->query['from'] = "%prefix%cron AS c";
        $ms2->AddResultField(t('Name'), 'c.name');
        $ms2->AddResultField(t('Geplant um'), 'runat');
        $ms2->AddResultField(t('Aktiv'), 'active', 'TrueFalse');
        $ms2->AddResultField(t('Letzte Ausführung'), 'UNIX_TIMESTAMP(c.lastrun) AS lastrun', 'MS2GetDate');
        $ms2->AddIconField('edit', 'index.php?mod=cron2&action=add&jobid=', t('Editieren'));
        $ms2->AddIconField('generate', 'index.php?mod=cron2&step=20&jobid=', t('Jetzt ausführen'));
        $ms2->AddMultiSelectAction('Löschen', 'index.php?mod=cron2&step=10&jobid=', 1);
        $ms2->PrintSearch('index.php?mod=cron2', 'c.jobid');
        $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=cron2&action=add'));
        break;
}
$dsp->AddContent();
$ms2->query['where'] = 'b.party_id = ' . $party->party_id;
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddResultField(t('Blockname'), 'b.name');
$ms2->AddResultField(t('Plätze'), 'b.blockid', 'SeatsAvailable');
$ms2->AddResultField(t('Belegt'), 'b.blockid', 'SeatsOccupied');
$ms2->AddResultField(t('Auslastung'), 'b.blockid', 'SeatLoad');
if (!$target_icon) {
    $target_icon = 'details';
}
if ($target_url) {
    $ms2->AddIconField($target_icon, $target_url, t($target_icon));
} else {
    $ms2->AddIconField('details', 'index.php?mod=seating&action=show&step=2&blockid=', t('Details'));
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('ip_generate', 'index.php?mod=seating&action=ipgen&blockid=', t('IPs generieren'));
    }
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('ip_edit', 'index.php?mod=seating&action=ip&step=2&blockid=', t('IPs editieren'));
    }
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('ip_del', 'index.php?mod=seating&action=ipgen&step=20&blockid=', t('IPs löschen'));
    }
    if ($auth['type'] >= 2) {
        $ms2->AddIconField('edit', 'index.php?mod=seating&action=edit&step=2&blockid=', t('Editieren'));
    }
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('delete', 'index.php?mod=seating&action=delete&step=2&blockid=', t('Löschen'));
    }
}
$ms2->PrintSearch($current_url, 'b.blockid');
Пример #5
0
     if ($auth['type'] >= 2) {
         $ms2->AddResultField('Aktiv', 'p.party_id', 'GetActiveState');
     }
     $ms2->AddIconField('details', 'index.php?mod=party&action=show&step=1&party_id=', t('Details'));
     $ms2->AddIconField('signon', 'index.php?mod=usrmgr&action=party&user_id=' . $auth['userid'] . '&party_id=', t('Partyanmeldung'));
     if ($auth['type'] >= 2) {
         $ms2->AddIconField('edit', 'index.php?mod=party&action=edit&party_id=', t('Editieren'));
     }
     if ($auth['type'] >= 2) {
         $ms2->AddIconField('delete', 'index.php?mod=party&action=delete&party_id=', t('Editieren'));
     }
     if ($auth['type'] >= 2) {
         $ms2->AddIconField('paid', 'index.php?mod=party&action=price&step=2&party_id=');
     }
     #if ($auth['type'] >= 3) $ms2->AddMultiSelectAction(t('Löschen'), 'index.php?mod=party&action=delete', 1);
     $ms2->PrintSearch('index.php?mod=party', 'p.party_id');
     $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=party&action=edit'));
     if ($auth['type'] >= 2 and isset($_SESSION['party_id'])) {
         $func->information(t('Der Status "Aktiv" zeigt an, welche Party standardmäßig für alle aktiviert ist, die nicht selbst eine auf der Startseite, oder in der Party-Box ausgewählt haben. In deinem Browser ist jedoch aktuell die Party mit der ID %1 aktiv. Welche Party für dich persöhnlich die aktivie ist, kannst du auf der Startseite, oder in der Party-Box einstellen', $_SESSION['party_id']), NO_LINK);
     }
     break;
 case 1:
     $row = $db->qry_first("SELECT p.*, UNIX_TIMESTAMP(p.startdate) AS startdate, UNIX_TIMESTAMP(p.enddate) AS enddate, UNIX_TIMESTAMP(p.sstartdate) AS sstartdate, UNIX_TIMESTAMP(p.senddate) AS senddate FROM %prefix%partys AS p WHERE party_id=%int%", $_GET["party_id"]);
     $dsp->AddDoubleRow(t('Partyname'), $row['name']);
     $dsp->AddDoubleRow(t('Anzahl Plätze'), $row['max_guest']);
     $dsp->AddDoubleRow(t('Mindestalter'), GetMinimumAgeString($row['minage']));
     $dsp->AddDoubleRow(t('PLZ'), $row['plz']);
     $dsp->AddDoubleRow(t('Ort'), $row['ort']);
     $dsp->AddDoubleRow(t('Party startet am'), $func->unixstamp2date($row['startdate'], "datetime"));
     $dsp->AddDoubleRow(t('Party endet am'), $func->unixstamp2date($row['enddate'], "datetime"));
     $dsp->AddDoubleRow(t('Anmeldung startet am'), $func->unixstamp2date($row['sstartdate'], "datetime"));
Пример #6
0
         $ms2->NoItemsText = t('Es müssen keine Produkte bestellt werden.');
         break;
     case 3:
         $dsp->NewContent(t('Diese Produkte wurden bestellt. Auf die Lieferung wird gewartet.'), '');
         $ms2->NoItemsText = t('Es wird auf keine Lieferung gewartet.');
         break;
     case 4:
         $dsp->NewContent(t('Fertiggestellte Küchengerichte zur Abholung/Lieferung'), '');
         $ms2->NoItemsText = t('Derzeit gibt es keine fertiggestellten Gerichte aus der Küche.');
         break;
     case 5:
         $dsp->NewContent(t('Abgeholt'), '');
         $ms2->NoItemsText = t('Du hast alle Produkte abgeholt.');
         break;
 }
 $ms2->PrintSearch('index.php?mod=foodcenter&action=statchange', 'a.id');
 $handle = opendir("ext_inc/foodcenter_templates");
 while ($file = readdir($handle)) {
     if ($file != "." and $file != ".." and $file != ".svn" and !is_dir($file)) {
         if (substr($file, -3, 3) == "htm" && substr($file, -7, 7) != "row.htm" || substr($file, -4, 4) == "html" && substr($file, -8, 8) != "row.html") {
             $file_array[] .= "<option value=\"{$file}\">{$file}</option>";
         }
     }
 }
 $dsp->SetForm("index.php?mod=foodcenter&action=print&design=base\" target=\"_blank\"", "print");
 $dsp->AddDropDownFieldRow("file", t('Bitte Template auswählen:'), $file_array, "");
 $MainContent .= "<input type=\"hidden\" name=\"search_input[0]\" value=\"{$_POST['search_input'][0]}\">\n";
 $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[0]\" value=\"{$_POST['search_dd_input'][0]}\">\n";
 $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[1]\" value=\"{$_POST['search_dd_input'][1]}\">\n";
 $MainContent .= "<input type=\"hidden\" name=\"search_dd_input[2]\" value=\"{$_POST['search_dd_input'][2]}\">\n";
 $dsp->AddFormSubmitRow(t('Drucken'));
Пример #7
0
        }
        break;
        // Highscoreliste
    // Highscoreliste
    case 5:
        $dsp->AddSingleRow(t('Highscoreliste'));
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('games');
        //Anzeige der Aufgaben
        $ms2->query['from'] = "%prefix%game_hs AS g";
        $ms2->query['where'] = "game='hm'";
        $ms2->query['default_order_by'] = "g.score";
        $ms2->config['EntriesPerPage'] = 50;
        $ms2->AddSelect('g.userid');
        $ms2->AddResultField(t('Name'), 'g.nick', 'UserNameAndIcon');
        $ms2->AddResultField(t('Fehlversuche'), 'g.score');
        $ms2->AddResultField(t('Kommentar'), 'g.comment');
        $ms2->PrintSearch('index.php?mod=games&action=hangman&headermenuitem=2', 'g.id');
        $dsp->AddBackButton("index.php?mod=games", "games/hangman");
        break;
        // Startscreen
    // Startscreen
    default:
        $dsp->SetForm("index.php?mod=games&action=hangman&step=1");
        $dsp->AddDoubleRow("", "Um ein zufälliges Wort zu erhalten, bitte kein Wort eingeben.<br>Nur bei zufälligen Wörtern gibt es einen Highscoreeintrag");
        $dsp->AddTextFieldRow("word", t('Folgendes Wort erraten'), "", "");
        $dsp->AddFormSubmitRow(t('Weiter'));
        $dsp->AddBackButton("index.php?mod=games", "games/hangman");
        break;
}
$dsp->AddContent();
Пример #8
0
        return '<a href="index.php?mod=clanmgr&action=clanmgr&step=2&clanid=' . $line['clanid'] . '">' . $clan_name . '</a>';
    } elseif ($clan_name != '' and $line['clanurl'] != '' and $line['clanurl'] != 'http://') {
        if (substr($line['clanurl'], 0, 7) != 'http://') {
            $line['clanurl'] = 'http://' . $line['clanurl'];
        }
        return '<a href="' . $line['clanurl'] . '" target="_blank">' . $clan_name . '</a>';
    } else {
        return $clan_name;
    }
}
if (!$party->party_id) {
    $func->information(t('Bitte setzte zuerst eine aktive Party.'));
} else {
    $ms2->query['from'] = "%prefix%party_user pu\n\tINNER JOIN %prefix%user u ON u.userid = pu.user_id\n\tLEFT JOIN %prefix%clan c ON c.clanid = u.clanid";
    $ms2->query['where'] = 'pu.party_id = ' . (int) $party->party_id . ' AND (exported IS NULL OR exported = 0)';
    $ms2->config['EntriesPerPage'] = 100;
    $ms2->AddResultField(t('Benutzername'), 'u.username');
    if ($auth['type'] >= 2 or !$cfg['sys_internet'] or $cfg['guestlist_shownames']) {
        $ms2->AddResultField(t('Vorname'), 'u.firstname');
        $ms2->AddResultField(t('Nachname'), 'u.name');
    }
    $ms2->AddSelect('c.url AS clanurl');
    $ms2->AddSelect('c.clanid AS clanid');
    $ms2->AddResultField('Clan', 'c.name AS clan', 'ClanURLLink');
    $ms2->AddIconField('details', 'index.php?mod=guestlist&action=details&userid=', t('Details'));
    if ($auth['type'] >= 2) {
        $ms2->AddMultiSelectAction(t('Exportieren'), "index.php?mod=guestlist&action=export&step=10", 1, 'export');
        $ms2->AddMultiSelectAction(t('Als exportiert markieren'), "index.php?mod=guestlist&action=export&step=11", 1, 'setexported');
    }
    $ms2->PrintSearch('index.php?mod=guestlist', 'u.userid');
}
Пример #9
0
            return "<div class=\"tbl_red\">Port Offline</div>";
        } else {
            return "<div class=\"tbl_red\">IP Offline</div>";
        }
    } else {
        return "-";
    }
}
$ms2->query['from'] = "%prefix%server AS s LEFT JOIN %prefix%user AS u ON s.owner = u.userid";
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddTextSearchField(t('Name'), array('s.caption' => 'like', 's.ip' => 'like'));
$ms2->AddTextSearchField(t('Besitzer'), array('u.username' => '1337', 'u.name' => 'like', 'u.firstname' => 'like'));
$ms2->AddTextSearchDropDown(t('Servertyp'), 's.type', array('' => t('Alle'), 'gameserver' => 'Game', 'ftp' => 'FTP', 'irc' => 'IRC', 'web' => 'Web', 'proxy' => 'Proxy', 'misc' => 'Misc'));
$ms2->AddTextSearchDropDown('PW', 's.pw', array('' => t('Alle'), '0' => t('Nein'), '1' => t('Ja')));
$ms2->AddSelect('u.userid');
$ms2->AddResultField(t('Name'), 's.caption');
$ms2->AddResultField(t('Servertyp'), 's.type', 'ServerType');
$ms2->AddResultField(t('IP-Adresse / Domain'), 's.ip');
$ms2->AddResultField(t('Port'), 's.port');
$ms2->AddResultField(t('Besitzer'), 'u.username', 'UserNameAndIcon');
$ms2->AddResultField('PW', 's.pw', 'PWIcon');
$ms2->AddResultField(t('Status'), 's.available', 'ServerStatus');
$ms2->AddIconField('details', 'index.php?mod=server&action=show_details&serverid=', t('Details'));
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=server&action=change&step=2&serverid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=server&action=delete&step=2&serverid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=server&action=show', 's.serverid');
Пример #10
0
    }
    function p_price($price_text)
    {
        global $line, $cfg;
        if ($line['price']) {
            return $price_text . '<br /> (' . $line['price'] . ' ' . $cfg['sys_currency'] . ')';
        } else {
            return $price_text;
        }
    }
    include_once 'modules/mastersearch2/class_mastersearch2.php';
    $ms2 = new mastersearch2('usrmgr');
    $ms2->query['from'] = "%prefix%partys p\n    LEFT JOIN %prefix%party_user u ON p.party_id = u.party_id AND u.user_id = " . (int) $_GET['userid'] . "\n    LEFT JOIN %prefix%party_prices i ON i.party_id = p.party_id AND i.price_id = u.price_id";
    $ms2->query['where'] = "u.user_id = " . (int) $_GET['userid'] . " OR u.user_id is NULL";
    $ms2->config['EntriesPerPage'] = 50;
    $ms2->AddSelect('p.party_id');
    $ms2->AddResultField(t('Party'), 'p.name', 'p_getactive');
    $ms2->AddResultField(t('Angemeldet'), 'u.user_id', 'TrueFalse');
    $ms2->AddSelect('i.price');
    $ms2->AddResultField(t('Preis'), 'i.price_text', 'p_price');
    $ms2->AddResultField(t('Bezahlt'), 'u.paid', 'TrueFalse');
    $ms2->AddResultField(t('Bezahltdatum'), 'UNIX_TIMESTAMP(u.paiddate) AS paiddate', 'MS2GetDate');
    $ms2->AddResultField(t('Eingecheckt'), 'UNIX_TIMESTAMP(u.checkin) AS checkin', 'MS2GetDate');
    $ms2->AddResultField(t('Ausgecheckt'), 'UNIX_TIMESTAMP(u.checkout) AS checkout', 'MS2GetDate');
    if ($auth['type'] >= 2) {
        $ms2->AddIconField('edit', 'index.php?mod=usrmgr&action=party&user_id=' . $_GET['userid'] . '&party_id=', t('Editieren'), 'active');
    }
    $ms2->PrintSearch('index.php?mod=usrmgr&action=details&userid=' . $_GET['userid'] . '&headermenuitem=6', 'p.party_id');
} else {
    $func->information(NO_LOGIN);
}
Пример #11
0
        return false;
    }
}
switch ($_GET['step']) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('usrmgr');
        $ms2->query['from'] = "%prefix%user_fields AS f";
        $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);
Пример #12
0
     }
     $db->free_result($row);
     $ms2->AddTextSearchDropDown(t('Gruppe'), 'l.sort_tag', $list);
     $ms2->AddTextSearchDropDown(t('Prioritat'), 'l.type', array('' => 'Alle', '1' => 'Niedrig', '2' => 'Normal', '3' => 'Hoch'));
     $ms2->AddSelect('u.userid');
     $ms2->AddResultField(t('Meldung'), 'l.description', '', 140);
     $ms2->AddResultField(t('IP'), 'INET_NTOA(l.ip) AS ip');
     $ms2->AddResultField(t('Gruppe'), 'l.sort_tag');
     $ms2->AddResultField(t('Datum'), 'UNIX_TIMESTAMP(l.date) AS date', 'MS2GetDate');
     $ms2->AddResultField(t('Auslöser'), 'u.username', 'UserNameAndIcon');
     $ms2->AddResultField(t('Prio.'), 'l.type');
     $ms2->AddIconField('details', 'index.php?mod=install&action=log&step=2&logid=', t('Details'));
     if ($auth['type'] >= 3) {
         $ms2->AddMultiSelectAction(t('Löschen'), "index.php?mod=install&action=log&step=10", 1);
     }
     $ms2->PrintSearch('index.php?mod=install&action=log', 'l.logid');
     break;
 case 2:
     $log = $db->qry_first("SELECT l.type, l.sort_tag, l.description, l.script, l.referer, l.userid, UNIX_TIMESTAMP(l.date) AS date,\n      INET_NTOA(l.ip) AS ip, u.username\n      FROM %prefix%log AS l\n      LEFT JOIN %prefix%user AS u ON l.userid = u.userid\n      WHERE l.logid = %int%\n      ", $_GET['logid']);
     $dsp->NewContent($log['sort_tag']);
     $dsp->AddDoubleRow(t('Meldung'), $log['description']);
     $dsp->AddDoubleRow(t('Zeitpunkt'), $func->unixstamp2date($log['date'], 'datetime'));
     $dsp->AddDoubleRow(t('Priorität'), $log['type']);
     $dsp->AddDoubleRow(t('IP'), $log['ip']);
     $dsp->AddDoubleRow(t('Referer'), $log['referer']);
     $dsp->AddDoubleRow(t('Script'), '<a href="' . $log['script'] . '">' . $log['script'] . '</a>');
     $dsp->AddDoubleRow(t('Auslöser'), $dsp->FetchUserIcon($log['userid'], $log['username']));
     $dsp->AddBackButton("index.php?mod=install&action=log", '');
     $dsp->AddContent();
     break;
 case 10:
Пример #13
0
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('news');
$ms2->query['from'] = "%prefix%sponsor AS s";
$ms2->AddResultField('Titel', 's.name');
$ms2->AddResultField('Autor', 's.url');
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=sponsor&amp;action=change&amp;sponsorid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=sponsor&amp;action=delete&amp;step=2&sponsorid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=sponsor&amp;action=change', 's.sponsorid');
Пример #14
0
        }
        $db->free_result($res);
        $ms2->AddMultiSelectAction(t('Markierung entfernen'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=40', 0, 'selection_none');
        $ms2->AddMultiSelectAction(t('Markieren: Rot'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=41', 0, 'selection_all');
        $ms2->AddMultiSelectAction(t('Markieren: Blau'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=42', 0, 'selection_all');
        $ms2->AddMultiSelectAction(t('Markieren: Grün'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=43', 0, 'selection_all');
        $ms2->AddMultiSelectAction(t('Markieren: Gelb'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=44', 0, 'selection_all');
        $ms2->AddMultiSelectAction(t('Markieren: Lila'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=45', 0, 'selection_all');
        $ms2->AddMultiSelectAction(t('Als Top Thread setzen'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=50', 0, 'important');
        $ms2->AddMultiSelectAction(t('Top Thread Marker entfernen'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=51', 0, 'del_important');
        $ms2->AddMultiSelectAction(t('Schliessen'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=52', 1);
    }
} else {
    $ms2->AddIconField('delete', 'index.php?mod=board&action=bookmark&step=30&tid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=board&action=' . $_GET['action'] . '&fid=' . $_GET['fid'], 't.tid');
if ($_GET['fid'] != '') {
    $dsp->AddSingleRow($new_thread . " " . $dsp->FetchIcon("index.php?mod=board", "back"));
}
// Bookmarks and Auto-Mail
if ($_GET['fid'] and $auth['login']) {
    if ($_GET["set_bm"]) {
        $db->qry_first("DELETE FROM %prefix%board_bookmark WHERE fid = %int% AND userid = %int%", $_GET['fid'], $auth['userid']);
        if ($_POST["check_bookmark"]) {
            $db->qry_first("INSERT INTO %prefix%board_bookmark SET fid = %int%, userid = %int%, email = %string%, sysemail = %string%", $_GET['fid'], $auth['userid'], $_POST["check_email"], $_POST["check_sysemail"]);
        }
    }
    $bookmark = $db->qry_first("SELECT 1 AS found, email, sysemail FROM %prefix%board_bookmark WHERE fid = %int% AND userid = %int%", $_GET['fid'], $auth['userid']);
    if ($bookmark["found"]) {
        $_POST["check_bookmark"] = 1;
    }
Пример #15
0
$ms2->AddTextSearchField(t('Autor'), array('u.username' => '1337', 'u.name' => 'like', 'u.firstname' => 'like'));
// Which columns should be displayed?
$ms2->AddResultField(t('Titel'), 'n.caption');
$ms2->AddSelect('u.userid');
$ms2->AddResultField(t('Autor'), 'u.username', 'UserNameAndIcon');
$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());
Пример #16
0
<?php

$dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=guestbook&action=add') . HTML_NEWLINE);
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%guestbook AS g";
$ms2->query['default_order_by'] = 'g.date';
$ms2->query['default_order_dir'] = 'DESC';
$ms2->config['EntriesPerPage'] = 50;
$ms2->AddSelect('g.userid');
$ms2->AddResultField(t('Autor'), 'g.poster', 'UserNameAndIcon');
$ms2->AddResultField(t('Eintrag'), 'g.text', 'Text2LSCode');
$ms2->AddResultField(t('Datum'), 'g.date', 'MS2GetDate');
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=guestbook&action=add&guestbookid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddMultiSelectAction(t('Löschen'), 'index.php?mod=guestbook&action=delete&guestbookid=', 1);
}
$ms2->PrintSearch('index.php?mod=guestbook', 'g.guestbookid');
$dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=guestbook&action=add'));
$dsp->AddContent();
Пример #17
0
        $ms2->AddTextSearchDropDown(t('Benutzer'), 'a.userid', $list);
        $list = array('' => t('Alle'));
        $res = $db->qry('SELECT ip FROM %prefix%stats_auth GROUP BY ip ORDER BY ip');
        while ($row = $db->fetch_array($res)) {
            if ($row['ip']) {
                $list[$row['ip']] = $row['ip'];
            }
        }
        $db->free_result($res);
        $ms2->AddTextSearchDropDown(t('IP'), 'a.ip', $list);
        $ms2->AddSelect('u.userid');
        $ms2->AddResultField(t('Session-ID'), 'a.sessid');
        $ms2->AddResultField(t('Benutzername'), 'u.username', 'UserNameAndIcon');
        $ms2->AddResultField(t('IP'), 'a.ip');
        #$ms2->AddResultField(t('Login?'), 'a.login');
        $ms2->AddResultField(t('Hits'), 'a.hits');
        $ms2->AddResultField(t('Visits'), 'a.visits');
        #$ms2->AddResultField(t('Letzter Aufruf'), 'a.logtime', 'MS2GetDate');
        $ms2->AddResultField(t('Eingeloggt'), 'a.logintime', 'MS2GetDate');
        $ms2->AddResultField(t('Letzter Aufruf'), 'a.lasthit', 'MS2GetDate');
        if ($auth['type'] >= 3) {
            $ms2->AddMultiSelectAction(t('Session beenden'), "index.php?mod=install&action=sessions&step=10", 1);
        }
        $ms2->PrintSearch('index.php?mod=install&action=sessions', 'a.sessid');
        break;
    case 10:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->MultiDelete('stats_auth', 'sessid');
        break;
}
Пример #18
0
            $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');
    $ms2->AddResultField('', 'u.username', 'UserNameAndIcon');
    $ms2->AddResultField('', 'UNIX_TIMESTAMP(l.date) AS date', 'MS2GetDate');
    $ms2->PrintSearch('index.php?mod=bugtracker&bugid=' . $_GET['bugid'], 'logid');
    $dsp->EndTab();
    $dsp->EndTabs();
}
$dsp->AddContent();
Пример #19
0
    } else {
        return $dsp->FetchIcon('', 'no', '-');
    }
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%board_forums AS f\n    LEFT JOIN %prefix%board_threads AS t ON f.fid = t.fid\n    LEFT JOIN %prefix%board_posts AS p ON t.tid = p.tid";
$ms2->query['where'] = 'f.need_type <= ' . ((int) ($auth['type'] + 1) . ' AND (!f.need_group OR f.need_group = ' . (int) $auth['group_id'] . ')');
$ms2->query['default_order_by'] = 'f.board_group, f.pos';
$ms2->AddSelect('f.description');
$ms2->AddSelect('f.board_group');
$ms2->AddResultField(t('Forum'), 'f.name', 'NameAndDesc');
$ms2->AddResultField(t('Beiträge'), 'COUNT(p.pid) AS posts');
$ms2->AddResultField(t('Letzter Beitrag'), 'UNIX_TIMESTAMP(MAX(p.date)) AS LastPost', 'LastPostDetails');
$ms2->AddIconField('details', 'index.php?mod=board&action=forum&fid=', t('Details'));
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=board&action=add&var=change&fid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=board&action=delete&step=2&fid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=board', 'f.fid');
// Statistics
$total_threads = $db->qry_first("SELECT COUNT(tid) as threads FROM %prefix%board_threads");
$total_posts = $db->qry_first("SELECT COUNT(pid) as posts FROM %prefix%board_posts");
$info_line = t('Es wurden bereits %1 Beiträge in %2 Threads geschrieben', array($total_posts['posts'], $total_threads['threads'])) . HTML_NEWLINE . '<a href="index.php?mod=board&action=forum&fid=&order_by=LastPost&order_dir=DESC">' . t('Die neusten Beiträge anzeigen') . '</a>';
if ($auth['login']) {
    $info_line .= HTML_NEWLINE . '<a href="index.php?mod=board&action=forum&fid=&search_input[2]=' . $auth['username'] . '&order_by=LastPost&order_dir=DESC">' . t('Threads, in denen ich mitgeschrieben habe, anzeigen') . '</a>';
}
$dsp->AddSingleRow($info_line);
$dsp->AddContent();
Пример #20
0
<?php

function RentCount($quantity)
{
    global $line, $db;
    $row = $db->qry_first('SELECT COUNT(*) AS back FROM %prefix%rentuser WHERE stuffid = %int% AND back_orgaid > 0', $line['stuffid']);
    return $line['rented'] - $row['back'] . ' / ' . $quantity;
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('news');
$ms2->query['from'] = "%prefix%rentstuff AS s\n  LEFT JOIN %prefix%user AS o ON s.ownerid = o.userid\n  LEFT JOIN %prefix%rentuser AS u ON u.stuffid = s.stuffid";
$ms2->AddTextSearchField('Titel', array('s.caption' => 'like'));
$ms2->AddSelect('o.userid');
$ms2->AddSelect('COUNT(u.rentid) AS rented');
$ms2->AddResultField('Titel', 's.caption');
$ms2->AddResultField('Verliehen', 's.quantity', 'RentCount');
$ms2->AddResultField('Besitzer', 'o.username', 'UserNameAndIcon');
if ($auth['type'] >= 2) {
    $ms2->AddIconField('assign', 'index.php?mod=rent&action=show&step=10&stuffid=', t('Zuweisen'));
}
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=rent&action=add&stuffid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=rent&action=delete&stuffid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=rent&action=show', 's.stuffid');
Пример #21
0
<?php

/*
 * Created on 16.05.2010 02:50
 * 
 * @package lansuite_core
 * @author Mexz
 * 
 */
$dsp->NewContent(t('Admin Loginübersicht'), '');
// Einbinden der MasterSearch2 (Eigene Engine zum Suchen in Lansuite)
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('lastlogin');
// Normale Queryabfrage in MS2, prefix wird automatisch durch den tabellen-Vornamen ersetzt. Bei uns "lansuite_"
// Es wird also lansuite_user in MySQL aufgerufen
$ms2->query['from'] = "%prefix%user AS u";
$ms2->query['where'] = "u.type > 1";
$ms2->query['default_order_by'] = "u.lastlogin DESC";
// AddResultField fügt eine Ausgabespalte hinzu, hier mit dem Namen "Letzter Login". Der zweite Parameter ist die
// Tabellenspalte in der Datenbank, hier lastlogin. MS2GetDate ist eine Funktion die den Wert in ein normales deutsches
// Datum umwandelt
$ms2->AddResultField('Letzter Login', 'UNIX_TIMESTAMP(u.lastlogin) AS lastlogin', 'MS2GetDate');
// Ebenfalls ein Ausgabefeld mit Name Benutzer. Greift auf die Spalte username in der Tabelle zu. Der dritte Parameter ist
// wieder eine vorgegebene Funktion die den Benutzernamen mit Icon und Link zurück gibt.
$ms2->AddResultField(t('Benutzer'), 'u.username', 'UserNameAndIcon');
// PrintSearch gibt deine Suche aus. Der erste Parameter ist der aktuelle Link.
// Der zweite Parameter ist die ID an der sich die Suche orientiert. Hier suchen wir nach verschiedenen usern also gehts um die userid.
$ms2->PrintSearch('index.php?mod=stats&action=lastlogin', 'u.userid');
$dsp->AddContent();
Пример #22
0
<?php

function GetPollStatus($endtime)
{
    if ($endtime == 0 or $endtime > time()) {
        return "offen";
    } else {
        return "geschlossen";
    }
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('news');
$ms2->query['from'] = "%prefix%polls AS p\n  LEFT JOIN %prefix%polloptions AS o ON p.pollid = o.pollid\n  LEFT JOIN %prefix%pollvotes AS v ON o.polloptionid = v.polloptionid";
$ms2->query['default_order_by'] = 'p.changedate ASC';
$ms2->query['where'] = (int) $auth['type'] . ' >= 2 OR !p.group_id OR p.group_id = ' . (int) $auth['group_id'];
$ms2->AddTextSearchField(t('Titel'), array('p.caption' => 'like'));
$ms2->AddResultField(t('Titel'), 'p.caption');
$ms2->AddResultField(t('Status'), 'UNIX_TIMESTAMP(p.endtime) AS endtime', 'GetPollStatus');
$ms2->AddResultField(t('Stimmen'), 'COUNT(v.polloptionid) AS Votes');
$ms2->AddIconField('details', 'index.php?mod=poll&action=show&step=2&pollid=', t('Details'));
if ($auth['type'] >= 2) {
    $ms2->AddIconField('signon', 'index.php?mod=poll&action=result&pollid=', t('Ergebnis'));
}
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=poll&action=change&step=2&pollid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=poll&action=delete&step=2&pollid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=poll', 'p.pollid');
Пример #23
0
    // Delete
    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);
Пример #24
0
         $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();
         }
         $dsp->AddBackButton('index.php?mod=clanmgr&action=clanmgr');
     }
     break;
     // Delete Member
 // Delete Member
 case 40:
     if ($_GET['clanid'] == '') {
         $func->error(t('Keine Clan-ID angegeben!'), "index.php?mod=home");
     } elseif (CountAdmins() == 1 and $auth['clanadmin'] == 1) {
         $func->information(t('Löschen nicht möglich. Du bist der einzige Clan-Admin in diesem Clan. Benne bitte vorher einen weiteren Admin.'), 'index.php?mod=clanmgr&action=clanmgr&step=2&clanid=' . $_GET['clanid']);
     } elseif ($_GET['clanid'] == $auth['clanid'] and $auth['clanadmin'] == 1 or $_GET['clanid'] == $auth['clanid'] and $_GET['userid'] = $auth['userid'] or $auth['type'] > 2) {
         $db->qry("UPDATE %prefix%user SET clanid = 0 WHERE userid = %int%", $_GET['userid']);
         $func->confirmation(t('Löschen erfolgreich'), 'index.php?mod=clanmgr&action=clanmgr&step=2&clanid=' . $_GET['clanid']);
Пример #25
0
     if ($team1['comment'] != "") {
         $score_comment = $team1['comment'];
     }
     $dsp->AddTextAreaPlusRow("score_comment", t('Bemerkung'), $score_comment, "", "", "", 1);
     $dsp->AddFieldSetEnd();
     $dsp->AddFormSubmitRow(t('Ergebnis'));
     $dsp->AddFieldsetStart('Log');
     include_once 'modules/mastersearch2/class_mastersearch2.php';
     $ms2 = new mastersearch2('t2_games');
     $ms2->query['from'] = "%prefix%log AS l LEFT JOIN %prefix%user AS u ON l.userid = u.userid";
     $ms2->query['where'] = "(sort_tag = 'Turnier Ergebnise' AND target_id = " . (int) $_GET['gameid1'] . ')';
     $ms2->AddResultField('', 'l.description');
     $ms2->AddSelect('u.userid');
     $ms2->AddResultField('', 'u.username', 'UserNameAndIcon');
     $ms2->AddResultField('', 'UNIX_TIMESTAMP(l.date) AS date', 'MS2GetDate');
     $ms2->PrintSearch('index.php?mod=tournament2&action=submit_result&step=1&tournamentid=' . $_GET['tournamentid'] . '&gameid1=' . $_GET['gameid1'] . '&gameid2=' . $_GET['gameid2'], 'logid');
     $dsp->AddFieldsetEnd();
     $buttons = "";
     $buttons .= $dsp->FetchSpanButton(t('Paarungen'), "index.php?mod=tournament2&action=games&step=2&tournamentid={$tournamentid}");
     $buttons .= " " . $dsp->FetchSpanButton(t('Spielbaum'), "index.php?mod=tournament2&action=tree&step=2&tournamentid={$tournamentid}");
     $dsp->AddDoubleRow("", $buttons);
     break;
     // Formular in Datenbank eintragen
 // Formular in Datenbank eintragen
 case 2:
     ## Berechtigungsprüfung
     $berechtigt = 0;
     if ($auth["type"] > 1) {
         $berechtigt = 1;
     }
     // Admin always
Пример #26
0
     }
     $db->free_result($res);
     $ms2->AddTextSearchDropDown(t('Fundstelle'), 'file', $selections);
     $ms2->AddTextSearchDropDown(t('Englisch'), 'en', array('' => t('Egal'), '>0' => t('Vorhanden')));
     $ms2->AddTextSearchDropDown(t('Veraltet'), 'obsolete', array('' => t('Alle'), '0' => t('Nur neue'), '1' => t('Nur veraltete')));
     $ms2->AddTextSearchField(t('Text'), array('org' => 'like'));
     $ms2->AddResultField(t('Text'), 'org');
     $ms2->AddResultField(t('Fundstelle'), 'file');
     $ms2->AddResultField(t('De'), 'de', 'YesNo');
     $ms2->AddResultField(t('En'), 'en', 'YesNo');
     $ms2->AddResultField(t('Es'), 'es', 'YesNo');
     $ms2->AddResultField(t('Nl'), 'nl', 'YesNo');
     $ms2->AddResultField(t('Fr'), 'fr', 'YesNo');
     $ms2->AddResultField(t('It'), 'it', 'YesNo');
     $ms2->AddIconField('edit', 'index.php?mod=install&action=translation&step=3&tid=', t('Edit'));
     $ms2->PrintSearch('index.php?mod=install&action=translation&step=2', 'tid');
     break;
 case 3:
     $dsp->NewContent(t('Übersetzen'), t('Es müssen nur Einträge eingetragen werden, die sich in der Zielsprache vom Orginal unterscheiden'));
     include_once 'inc/classes/class_masterform.php';
     $mf = new masterform();
     // Name
     $mf->AddField(t('Orginal-Text'), 'org');
     $mf->AddField($dsp->FetchIcon('', 'de'), 'de', '', '', FIELD_OPTIONAL);
     $mf->AddField($dsp->FetchIcon('', 'en'), 'en', '', '', FIELD_OPTIONAL);
     $mf->AddField($dsp->FetchIcon('', 'es'), 'es', '', '', FIELD_OPTIONAL);
     $mf->AddField($dsp->FetchIcon('', 'nl'), 'nl', '', '', FIELD_OPTIONAL);
     $mf->AddField($dsp->FetchIcon('', 'fr'), 'fr', '', '', FIELD_OPTIONAL);
     $mf->AddField($dsp->FetchIcon('', 'it'), 'it', '', '', FIELD_OPTIONAL);
     $mf->SendForm('index.php?mod=install&action=translation&step=3', 'translation', 'tid', $_GET['tid']);
     $dsp->AddBackButton('index.php?mod=install&action=translation');
Пример #27
0
                $tx_status = $db->qry_first("SELECT fromUserID, tx_deleted FROM %prefix%mail_messages WHERE mailID = %int%", $key);
                // Ist eMail vom Sender gelöscht? JA: Lösche aus DB, NEIN: Setze rx flag
                if ($tx_status['tx_deleted'] == 1 or $tx_status['fromUserID'] == 0) {
                    $db->qry("DELETE FROM %prefix%mail_messages WHERE mailID = %int%", $key);
                } else {
                    $db->qry("UPDATE %prefix%mail_messages SET rx_deleted = 1 WHERE mailID = %int%", $key);
                }
            }
            break;
    }
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%mail_messages AS m LEFT JOIN %prefix%user AS u ON m.FromUserID = u.userid";
$ms2->query['where'] = "m.toUserID = '{$auth['userid']}' AND m.mail_status = 'delete' AND rx_deleted = 0";
$ms2->query['default_order_by'] = 'm.tx_date';
$ms2->query['default_order_dir'] = 'DESC';
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddTextSearchField('Mail', array('m.subject' => 'fulltext', 'm.msgbody' => 'fulltext'));
$ms2->AddTextSearchField(t('Nachricht von'), array('u.userid' => 'exact', 'u.username' => '1337', 'u.name' => 'like', 'u.firstname' => 'like'));
$ms2->AddSelect('u.userid');
$ms2->AddResultField(t('Betreff'), 'm.subject', '', 160);
$ms2->AddResultField(t('Nachricht von'), 'u.username', 'UserNameAndIcon', '', 100);
$ms2->AddResultField('Status', 'm.des_status', 'MailStatus', '', 80);
$ms2->AddResultField(t('Gesendet'), 'UNIX_TIMESTAMP(m.tx_date) AS tx_date', 'MS2GetDate', '', 70);
$ms2->AddResultField(t('Gelesen'), 'UNIX_TIMESTAMP(m.rx_date) AS rx_date', 'MS2GetDate', '', 60);
$ms2->AddIconField('details', 'index.php?mod=mail&action=showmail&ref=trash&mailID=', t('Details'));
$ms2->AddIconField('delete', 'index.php?mod=mail&action=trashcan&step=20&mailid=', t('Entgültig löschen'), '', 10);
$ms2->AddMultiSelectAction(t('Entgültig löschen'), 'index.php?mod=mail&action=trashcan&step=20', 1, 'delete');
$ms2->PrintSearch('index.php?mod=mail&action=trash', 'm.mailid');
Пример #28
0
    $md = new masterdelete();
    $md->Delete('download_stats', 'file', $_GET['delfile']);
}
// List
if (!$_GET['file']) {
    include_once 'modules/mastersearch2/class_mastersearch2.php';
    $ms2 = new mastersearch2('news');
    $ms2->query['from'] = "%prefix%download_stats AS s";
    $ms2->query['default_order_by'] = 's.file';
    $ms2->AddResultField(t('Datei'), 's.file');
    $ms2->AddResultField(t('Downloads'), 'SUM(s.hits) AS hits');
    $ms2->AddIconField('details', 'index.php?mod=downloads&action=stats&file=', t('Details'));
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('delete', 'index.php?mod=downloads&action=stats&delfile=', t('Löschen'));
    }
    $ms2->PrintSearch('index.php?mod=downloads&action=stats', 's.file');
    // Details
} else {
    switch ($_GET['time']) {
        default:
            $link = 'y';
            $back = '';
            $group_by = '%Y-00-00-00-00-00';
            $where = '0000-00-00-00-00-00';
            $where_back = '';
            $_GET['timeframe'] = '0000-00-00-00-00-00';
            break;
        case 'y':
            $link = 'm';
            $back = '';
            $group_by = '%Y-%m-00-00-00-00';
Пример #29
0
                break;
            case 'ban':
                echo $item . "b" . HTML_NEWLINE;
                break;
        }
    }
} else {
    include_once 'modules/mastersearch2/class_mastersearch2.php';
    $ms2 = new mastersearch2();
    $ms2->query['from'] = "%prefix%board_posts AS p\n      LEFT JOIN %prefix%user AS u ON p.userid = u.userid\n      LEFT JOIN %prefix%board_threads AS t ON p.tid = t.tid\n      LEFT JOIN %prefix%board_forums AS f ON t.fid = f.fid\n      ";
    $ms2->query['where'] = 'f.need_type <= ' . (int) ($auth['type'] + 1);
    $ms2->query['default_order_by'] = 'LastPost DESC';
    $ms2->AddTextSearchField(t('Forum'), array('f.name' => 'like'));
    $ms2->AddTextSearchField(t('Titel'), array('t.caption' => 'like'));
    $ms2->AddTextSearchField(t('Text'), array('p.comment' => 'fulltext'));
    $ms2->AddTextSearchField(t('Autor'), array('u.username' => '1337', 'u.name' => 'like', 'u.firstname' => 'like'));
    $ms2->AddSelect('p.userid');
    $ms2->AddSelect('f.fid');
    $ms2->AddSelect('MAX(p.date) AS LastPost');
    $ms2->AddResultField(t('Text'), 'CONCAT(\'<b>\', f.name, \'</b> (\', t.caption, \')<br />\', p.comment) AS ThreadName', '', 140);
    $ms2->AddResultField(t('Autor'), 'u.username', 'UserNameAndIcon');
    $ms2->AddResultField(t('IP'), 'INET_NTOA(p.ip) AS ip');
    $ms2->AddResultField(t('Datum'), 'p.date', 'MS2GetDate');
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('delete', 'index.php?mod=board&action=delete&step=10&pid=', t('Delete'));
    }
    if ($auth['type'] >= 3) {
        $ms2->AddMultiSelectAction(t('Delete'), 'index.php?mod=board&action=admin_search&mode=del', 1);
    }
    $ms2->PrintSearch('index.php?mod=board&action=admin_search', 'p.pid');
}
Пример #30
0
<?php

$dsp->NewContent(t('Suchmaschinen'), t('Hier siehst du, &uuml;ber welche Suchbegriffe Besucher &uuml;ber Suchmaschinenen auf deiner Seite gelandet sind'));
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%stats_se";
$ms2->query['default_order_by'] = 'hits DESC';
$ms2->config['EntriesPerPage'] = 50;
$ms2->AddTextSearchField(t('Suchbegriff'), array('term' => 'like'));
$list = array('' => 'Alle');
$res = $db->qry('SELECT se FROM %prefix%stats_se GROUP BY se ORDER BY se');
while ($row = $db->fetch_array($res)) {
    $list[$row['se']] = $row['se'];
}
$db->free_result($res);
$ms2->AddTextSearchDropDown('Suchmaschiene', 'se', $list);
$ms2->AddResultField(t('Suchbegriff'), 'term', '', 80);
$ms2->AddResultField(t('Anzahl'), 'hits');
$ms2->AddResultField(t('Erstmalig'), 'UNIX_TIMESTAMP(first) AS first', 'MS2GetDate');
$ms2->AddResultField(t('Zuletzt'), 'UNIX_TIMESTAMP(last) AS last', 'MS2GetDate');
#$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'));
$ms2->PrintSearch('index.php?mod=stats&action=search_engines', '1');
$dsp->AddBackButton("index.php?mod=stats", "stats/se");
$dsp->AddContent();