Пример #1
0
 if ($auth["login"] == 1) {
     include 'inc/classes/class_mastercomment.php';
     new Mastercomment('User', $_GET['userid']);
 }
 $dsp->EndTab();
 if ($hasUserFields) {
     $dsp->StartTab(t('Eigene Felder'), 'database');
     while ($user_field = $db->fetch_array($user_fields)) {
         $dsp->AddDoubleRow($user_field['caption'], $user_data[$user_field['name']]);
     }
     $dsp->EndTab();
 }
 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');
Пример #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();
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('seating');
// Get number of seats in block
function SeatsAvailable($blockid)
{
    global $db;
    $row = $db->qry_first("SELECT COUNT(*) AS SeatsAvailable FROM %prefix%seat_seats WHERE blockid=%int% AND status > 0 AND status < 7", $blockid);
    return $row['SeatsAvailable'];
}
// Get number of seats in block
function SeatsOccupied($blockid)
{
    global $db;
    $row = $db->qry_first("SELECT COUNT(*) AS SeatsOccupied FROM %prefix%seat_seats WHERE blockid=%int% AND status = 2", $blockid);
    return $row['SeatsOccupied'];
}
// Get number of seats in block
function SeatLoad($blockid)
{
    $width = 100;
    $seats = SeatsAvailable($blockid);
    if ($seats != 0) {
        $SeatLoad = SeatsOccupied($blockid) / $seats * 100;
    } else {
        $SeatLoad = 0;
    }
    $SeatLoad ? $score = ceil($width / SeatsAvailable($blockid) * SeatsOccupied($blockid)) : ($score = 0);
    $score_rest = $width - $score;
    $votebar = '<ul class="BarOccupied infolink" style="width:' . (int) $score . 'px;"></ul><ul id="infobox" class="BarFree" style="width:' . $score_rest . 'px;"></ul><ul class="BarClear">&nbsp;</ul>';
Пример #5
0
if ($_GET['step'] == 10 and is_numeric($_GET['party_id'])) {
    $db->qry("UPDATE %prefix%config SET cfg_value = %int% WHERE cfg_key = 'signon_partyid'", $_GET['party_id']);
    $cfg['signon_partyid'] = $_GET['party_id'];
}
function GetGuests($max_guest)
{
    global $db, $func, $line;
    $row = $db->qry_first('SELECT COUNT(*) AS anz FROM %prefix%party_user WHERE party_id = %int%', $line['party_id']);
    $row2 = $db->qry_first('SELECT COUNT(*) AS anz FROM %prefix%party_user WHERE paid > 0 AND party_id = %int%', $line['party_id']);
    return $func->CreateSignonBar($row['anz'], $row2['anz'], $max_guest);
}
$dsp->NewContent(t('Unsere Partys'), t('Hier siehst du eine Liste aller geplanten Partys'));
switch ($_GET['step']) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('party');
        $ms2->query['from'] = "%prefix%partys AS p";
        $ms2->query['default_order_by'] = 'p.startdate DESC';
        $ms2->config['EntriesPerPage'] = 20;
        $ms2->AddResultField('Name', 'p.name');
        $ms2->AddResultField('Gäste', 'p.max_guest', 'GetGuests');
        $ms2->AddResultField('Von', 'p.startdate');
        $ms2->AddResultField('Bis', 'p.enddate');
        $ms2->AddResultField(t('Mindestalter'), 'p.minage', 'GetMinimumAgeString');
        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'));
Пример #6
0
                    $db->qry_first("UPDATE %prefix%food_ordering SET pice = %int% WHERE id = %int%", $pice, $_GET['id']);
                }
            }
        } else {
            $db->qry("UPDATE %prefix%food_ordering SET status = %string%, lastchange = %string% WHERE id = %int%", $_GET['status'], $time, $_GET['id']);
            if ($_GET['status'] == 3) {
                $user_id = $db->qry_first("SELECT userid FROM %prefix%food_ordering WHERE id = %int%", $_GET['id']);
                $func->setainfo(t('Deine bestellten Produkte sind abholbereit'), $user_id['userid'], 2, "foodcenter", $_GET['id']);
            }
        }
        break;
}
switch ($_GET['step']) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('news');
        $ms2->query['from'] = "%prefix%food_ordering AS a\n    \t  LEFT JOIN %prefix%food_option AS o ON a.opts = o.id\n\t\t  LEFT JOIN %prefix%food_product AS p ON a.productid = p.id\n\t\t  LEFT JOIN %prefix%food_supp AS s ON p.supp_id = s.supp_id\n\t\t  LEFT JOIN %prefix%user AS u ON u.userid = a.userid";
        // Array Abfragen für DropDowns
        $status_list = array('' => 'Alle');
        $row = $db->qry("SELECT * FROM %prefix%food_status");
        while ($res = $db->fetch_array($row)) {
            $status_list[$res['id']] = $res['statusname'];
        }
        $db->free_result($row);
        $supp_list = array('' => 'Alle');
        $row = $db->qry("SELECT * FROM %prefix%food_supp");
        while ($res = $db->fetch_array($row)) {
            $supp_list[$res['supp_id']] = $res['name'];
        }
        $db->free_result($row);
        $party_list = array('' => 'Alle');
Пример #7
0
         unset($_SESSION["losungswort"]);
         unset($_SESSION["do_highscore"]);
     } else {
         $db->qry("INSERT INTO %prefix%game_hs SET game = 'hm', nick = %string%, score = %string%, comment = %string%", $_POST["nick"], $_SESSION["versuche"], $_POST["comment"]);
         $func->confirmation(t('Highscore wurde eingetragen'), "index.php?mod=games&action=hangman&headermenuitem=2");
         unset($_SESSION["ratewort"]);
         unset($_SESSION["losungswort"]);
         unset($_SESSION["do_highscore"]);
     }
     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:
Пример #8
0
        // Set Exported
    // Set Exported
    case 11:
        if (!$_POST['action'] and $_GET['userid']) {
            $_POST['action'][$_GET['userid']] = 1;
        }
        if ($auth['type'] >= 2 and $_POST['action']) {
            foreach ($_POST['action'] as $key => $val) {
                $guestlist->SetExported($key, $party->party_id);
            }
            $func->confirmation(t('Die User wurden für die aktuelle Party als exportiert markiert.'));
        }
        break;
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
function ClanURLLink($clan_name)
{
    global $line, $func;
    if ($clan_name == '') {
        return '';
    } elseif ($func->isModActive('clanmgr')) {
        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;
    }
Пример #9
0
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
function PWIcon($pw)
{
    global $dsp, $templ;
    if ($pw) {
        return $dsp->FetchIcon('', 'locked', t('Geschützt'));
    } else {
        return $dsp->FetchIcon('', 'unlocked', t('Nicht geschützt'));
    }
}
function ServerType($type)
{
    switch ($type) {
        default:
            return "???";
            break;
        case "gameserver":
            return "Game";
            break;
        case "ftp":
            return "FTP";
            break;
        case "irc":
            return "IRC";
            break;
        case "web":
            return "Web";
            break;
Пример #10
0
         return true;
     } else {
         return false;
     }
 }
 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');
 }
Пример #11
0
    global $db;
    $db->qry("ALTER TABLE %prefix%user ADD %plain% VARCHAR(255) NOT NULL;", $_POST['name']);
    return true;
}
function check_no_space($val)
{
    if (strpos($val, ' ') !== false) {
        return t('Der Feldname darf kein Leerzeichen enthalten');
    } else {
        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:
Пример #12
0
<?php

switch ($_GET["step"]) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2();
        $ms2->query['from'] = "%prefix%log AS l\n      LEFT JOIN %prefix%user AS u ON u.userid = l.userid";
        $ms2->query['default_order_by'] = 'l.date DESC';
        $ms2->config['EntriesPerPage'] = 50;
        $ms2->AddTextSearchField(t('Meldung'), array('l.description' => 'like'));
        $ms2->AddTextSearchField(t('IP'), array('ip' => 'aton'));
        $list = array('' => t('Alle'), '0' => t('System'));
        $res = $db->qry("SELECT l.userid, u.username FROM %prefix%log AS l\n      LEFT JOIN %prefix%user AS u ON u.userid = l.userid\n      GROUP BY l.userid");
        while ($row = $db->fetch_array($res)) {
            if ($row['userid']) {
                $list[$row['userid']] = $row['username'];
            }
        }
        $db->free_result($res);
        $ms2->AddTextSearchDropDown(t('Auslöser'), 'l.userid', $list);
        $list = array('' => t('Alle'));
        $row = $db->qry("SELECT sort_tag FROM %prefix%log GROUP BY sort_tag");
        while ($res = $db->fetch_array($row)) {
            if ($res['sort_tag']) {
                $list[$res['sort_tag']] = $res['sort_tag'];
            }
        }
        $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');
Пример #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
            }
        }
        break;
}
$colors = array();
$colors[0] = '';
$colors[1] = 'red';
$colors[2] = 'blue';
$colors[3] = 'green';
$colors[4] = 'yellow';
$colors[5] = 'purple';
if ($_POST['search_input'][1] != '' or $_POST['search_input'][2] != '' or $_GET['search_input'][1] != '' or $_GET['search_input'][2] != '') {
    $dsp->AddSingleRow('<b>' . t('Achtung: du hast als Suche einen Autor, bzw. Text angegeben. Die Ergebnis-Felder Antworten, sowie erster und letzter Beitrag beziehen sich daher nur noch auf Posts, in denen diese Eingaben gefunden wurden, nicht mehr auf den ganzen Thread!') . '</b>');
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%board_threads AS t\n    LEFT JOIN %prefix%board_forums AS f ON t.fid = f.fid\n    LEFT JOIN %prefix%board_posts AS p ON t.tid = p.tid\n    LEFT JOIN %prefix%lastread AS r ON t.tid = r.entryid AND r.tab = 'board' AND r.userid = " . (int) $auth['userid'] . "\n    LEFT JOIN %prefix%user AS u ON p.userid = u.userid\n    LEFT JOIN %prefix%board_bookmark AS b ON (b.fid = t.fid OR b.tid = t.tid) AND b.userid = " . (int) $auth['userid'] . "\n    ";
$ms2->query['where'] = 'f.need_type <= ' . (int) ($auth['type'] + 1 . " AND (!need_group OR need_group = {$auth['group_id']})");
if ($_GET['fid'] != '') {
    $ms2->query['where'] .= ' AND t.fid = ' . (int) $_GET['fid'];
}
if ($_GET['action'] == 'bookmark') {
    $ms2->query['where'] .= ' AND b.bid IS NOT NULL';
}
$ms2->query['default_order_by'] = 't.sticky DESC, LastPost DESC';
$ms2->AddBGColor('label', $colors);
#$ms2->AddBGColor('sticky', array('', 'red'));
if ($_GET['fid'] == '') {
    $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'));
Пример #15
0
// Lets use the database - This will simply read all usernames from the database and display them
$res = $db->qry("SELECT username FROM %prefix%user");
while ($user = $db->fetch_array($res)) {
    $user_out .= $user["username"] . ", ";
}
$dsp->AddSingleRow($user_out);
$user_insg = $db->num_rows($res);
$db->free_result($res);
$dsp->AddSingleRow(t('Benutzer insgesamt') . ": " . $user_insg);
// This will finaly output all the $dsp-Rows
$dsp->AddContent();
### Mastersearch ###
// There is a quite simple way in lansuite to list and search data within data base tables, called mastersearch
// In this exapmle we will list all news
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('news');
// Define the source table and join all tables, which should be attached
$ms2->query['from'] = "%prefix%news n LEFT JOIN %prefix%user u ON n.poster=u.userid";
$ms2->query['default_order_by'] = 'DATE DESC';
// How many entries will be displayed per page? defaults to 20, if not set
$ms2->config['EntriesPerPage'] = 20;
// If at least one AddTextSearchField is called, a form will be displayed to search within the results
// exact = exact match; like = search musst be contained; fulltext = fulltext search; 1337 = like search with replacement of ! -> 1, 3 -> e, $ -> s, ...
$ms2->AddTextSearchField(t('Titel'), array('n.caption' => 'like'));
$ms2->AddTextSearchField(t('Text'), array('n.text' => 'fulltext'));
$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');
Пример #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
<?php

switch ($_GET["step"]) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('install');
        $ms2->query['from'] = "%prefix%stats_auth AS a\n      LEFT JOIN %prefix%user AS u ON a.userid = u.userid";
        $ms2->config['EntriesPerPage'] = 50;
        $ms2->query['default_order_by'] = 'a.lasthit DESC';
        $list = array('' => t('Alle'), '0' => t('System'));
        $res = $db->qry("SELECT l.userid, u.username FROM %prefix%log AS l\n      LEFT JOIN %prefix%user AS u ON u.userid = l.userid\n      GROUP BY l.userid");
        while ($row = $db->fetch_array($res)) {
            if ($row['userid']) {
                $list[$row['userid']] = $row['username'];
            }
        }
        $db->free_result($res);
        $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');
Пример #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
{
    global $db, $line, $dsp, $templ, $cfg;
    if ($date) {
        $row = $db->qry_first("SELECT t.caption, p.userid, p.tid, p.pid FROM %prefix%board_posts AS p\n      LEFT JOIN %prefix%board_threads AS t ON p.tid = t.tid\n      WHERE UNIX_TIMESTAMP(p.date) = %string% AND t.fid = %int%", $date, $line['fid']);
        $row2 = $db->qry_first("SELECT COUNT(*) AS cnt FROM %prefix%board_posts AS p\n        WHERE p.tid = %int%\n        GROUP BY p.tid", $row['tid']);
        $page = floor(($row2['cnt'] - 1) / $cfg['board_max_posts']);
        if (strlen($row['caption']) > 18) {
            $row['caption'] = substr($row['caption'], 0, 16) . '...';
        }
        return '<a href="index.php?mod=board&action=thread&tid=' . $row['tid'] . '&posts_page=' . $page . '#pid' . $row['pid'] . '" class="menu">' . $row['caption'] . '<br />' . date('d.m.y H:i', $date) . '</a> ' . $dsp->FetchUserIcon($row['userid']);
    } 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'));
}
Пример #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
<?php

$dsp->NewContent(t('Turnier - Pausenverwaltung'), t('Trage Startzeitpunkt und dauer der Pause ein. Lansuite wird entsprechend spätere Rundenzeiten berechnen'));
switch ($_GET['step']) {
    // 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;
}
Пример #24
0
     $mf->AddField(t('Clanname'), 'name');
     if (!$_GET['clanid']) {
         $mf->AddField(t('Beitritts Passwort'), 'password', IS_NEW_PASSWORD);
     }
     $mf->AddField(t('Webseite'), 'url', '', '', FIELD_OPTIONAL);
     $mf->AddField(t('Clanlogo'), 'clanlogo_path', IS_FILE_UPLOAD, 'ext_inc/clan/' . $auth['userid'] . '_', FIELD_OPTIONAL);
     if (!$_GET['clanid']) {
         $mf->CheckBeforeInserFunction = 'CheckExistingClan';
     }
     $mf->AdditionalDBUpdateFunction = 'Update';
     $mf->SendForm('index.php?mod=clanmgr&step=' . $_GET['step'], 'clan', 'clanid', $_GET['clanid']);
     $dsp->AddFieldsetEnd();
     if ($_GET['clanid'] != '') {
         $dsp->AddFieldsetStart(t('Mitglieder'));
         include_once 'modules/mastersearch2/class_mastersearch2.php';
         $ms2 = new mastersearch2('clanmgr');
         $ms2->query['from'] = "%prefix%user AS u";
         $ms2->query['where'] = 'u.clanid = ' . (int) $_GET['clanid'];
         $ms2->config['EntriesPerPage'] = 20;
         $ms2->AddResultField(t('Vorname'), 'u.firstname');
         $ms2->AddResultField(t('Nachname'), 'u.name');
         $ms2->AddResultField(t('Benutzername'), 'u.username');
         $ms2->AddResultField(t('Rolle'), 'u.clanadmin', 'ShowRole');
         $ms2->AddIconField('delete', 'index.php?mod=clanmgr&action=clanmgr&step=40&clanid=' . $_GET['clanid'] . '&userid=', t('Löschen'));
         $ms2->PrintSearch('index.php?mod=clanmgr&action=clanmgr&step=30&clanid=' . $_GET['clanid'] . '&userid=', 'u.userid');
         $dsp->AddFieldsetEnd();
     }
     $dsp->AddBackButton('index.php?mod=clanmgr&action=clanmgr');
 }
 break;
 // Delete Member
Пример #25
0
     $dsp->AddFieldSetEnd();
     // Write Comment
     $dsp->AddFieldSetStart(t('Anmerkungen'));
     $dsp->AddFileSelectRow('screenshot', t('Screenshot anhängen'), '', '', '', 1);
     if (file_exists('ext_inc/tournament_screenshots/' . $_GET['gameid1'] . '.png')) {
         $dsp->AddDoubleRow(t('Aktuelles Bild'), '<img src="ext_inc/tournament_screenshots/' . $_GET['gameid1'] . '.png" />');
     }
     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
Пример #26
0
     }
     $dsp->AddFieldSetStart(t('Module übersetzen'));
     include_once 'modules/mastersearch2/class_mastersearch2.php';
     $ms2 = new mastersearch2('install');
     $ms2->query['from'] = "%prefix%translation";
     $ms2->config['EntriesPerPage'] = 100;
     $ms2->AddResultField(t('Modul'), 'file');
     $ms2->AddIconField('edit', 'index.php?mod=install&action=translation&step=20&file=', t('Edit'));
     $ms2->AddIconField('download', 'index.php?mod=install&action=translation&step=30&design=base&file=', t('Download'));
     $ms2->PrintSearch('index.php?mod=install&action=translation', 'file');
     $dsp->AddFieldSetEnd();
     break;
 case 2:
     $dsp->NewContent(t('Übersetzen'), t('Es müssen nur Einträge eingetragen werden, die sich in der Zielsprache vom Orginal unterscheiden'));
     include_once 'modules/mastersearch2/class_mastersearch2.php';
     $ms2 = new mastersearch2('install');
     $ms2->query['from'] = "%prefix%translation";
     $ms2->config['EntriesPerPage'] = 50;
     $selections = array('' => t('Alle'));
     $res = $db->qry("SELECT file FROM %prefix%translation GROUP BY file");
     while ($row = $db->fetch_array($res)) {
         $selections[$row['file']] = $row['file'];
     }
     $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');
Пример #27
0
                $_POST['action'][$_GET['mailid']] = 1;
            }
            foreach ($_POST['action'] as $key => $val) {
                $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);
Пример #28
0
<?php

$dsp->NewContent(t('Statistiken'), $_GET['file']);
// Delete
if ($_GET['delfile'] and $auth['type'] >= 3) {
    include_once 'inc/classes/class_masterdelete.php';
    $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 = '';
Пример #29
0
if ($_POST['action']) {
    foreach ($_POST['action'] as $key => $val) {
        switch ($_GET['mode']) {
            case 'del':
                include_once 'inc/classes/class_masterdelete.php';
                $md = new masterdelete();
                $md->MultiDelete('board_posts', 'pid');
                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) {
Пример #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();