Пример #1
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();
Пример #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();
    $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>';
    return round($SeatLoad, 1) . '% ' . $votebar . ' ';
}
$ms2->query['from'] = '%prefix%seat_block AS b';
$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'));
Пример #5
0
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'));
        }
        if ($auth['type'] >= 2) {
            $ms2->AddIconField('delete', 'index.php?mod=party&action=delete&party_id=', t('Editieren'));
        }
Пример #6
0
     $party_list[$res['party_id']] = $res['name'];
 }
 $db->free_result($row);
 $ms2->AddTextSearchDropDown('Status', 'a.status', $status_list, '1');
 $ms2->AddTextSearchDropDown('Lieferant', 's.supp_id', $supp_list);
 $ms2->AddTextSearchDropDown('Party', 'a.partyid', $party_list, $party->party_id);
 /*
   	$userquery = $db->qry("SELECT * FROM %prefix%food_ordering AS a LEFT JOIN %prefix%user AS u ON a.userid=u.userid");
   	$user_array[''] = t('');
   	while ($userrows = $db->fetch_array($userquery)) {
   		$user_array[$userrows['userid']] = $userrows['username'];
   	}
     $ms2->AddTextSearchDropDown('Besteller', 'a.userid', $user_array);
 */
 $ms2->AddSelect('u.userid');
 $ms2->AddResultField('Titel', 'p.caption');
 //$ms2->AddResultField('Option', 'o.caption');
 $ms2->AddResultField('Einheit', 'o.unit');
 $ms2->AddResultField('Anzahl', 'a.pice');
 $ms2->AddResultField('Lieferant', 's.name');
 $ms2->AddResultField('Besteller', 'u.username', 'UserNameAndIcon');
 $ms2->AddResultField('Bestellt', 'a.ordertime', 'MS2GetDate');
 $ms2->AddResultField('Geliefert', 'a.supplytime', 'MS2GetDate');
 $ms2->AddIconField('details', 'index.php?mod=foodcenter&action=statchange&step=2&id=', t('Details'));
 $fc_ordered_status_quest[0] = t('Status ändern: Abgeholt');
 $fc_ordered_status_quest[1] = t('Status ändern: Abholbereit');
 $fc_ordered_status_quest[2] = t('Status ändern: Lieferung erwartet');
 $fc_ordered_status_quest[3] = t('Status ändern: An Platz geliefert');
 $fc_ordered_status_quest[4] = t('Produkt abbestellen und Geld zurücküberweisen.');
 $fc_ordered_status_quest[5] = t('Zurück');
 $ms2->AddMultiSelectAction($fc_ordered_status_quest[0], 'index.php?mod=foodcenter&action=statchange&step=2&status=6', 1);
Пример #7
0
            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:
        $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;
}
Пример #8
0
}
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:
        include_once 'inc/classes/class_masterform.php';
        $mf = new masterform();
        $mf->AddField('Feldname', 'name', '', '', '', 'check_no_space');
Пример #9
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');
}
Пример #10
0
         }
     }
     $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');
     $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']);
Пример #11
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);
}
Пример #12
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');
Пример #13
0
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'));
    $list = array();
    $list[''] = t('Alle');
    $res = $db->qry("SELECT fid, name FROM %prefix%board_forums");
    while ($row = $db->fetch_array($res)) {
        $list[$row['fid']] = $row['name'];
    }
    $ms2->AddTextSearchDropDown(t('Forum'), 'f.fid', $list);
    $db->free_result($res);
}
$ms2->AddSelect('t.closed');
$ms2->AddSelect('t.sticky');
$ms2->AddResultField(t('Status'), 'UNIX_TIMESTAMP(r.date) AS date', 'NewPosts');
if ($_GET['fid'] != '') {
    $ms2->AddResultField(t('Thread'), 't.caption', 'FormatTitle');
} else {
    $ms2->AddResultField(t('Thread'), 'CONCAT(\'<b>\', f.name, \'</b><br />\', t.caption) AS ThreadName', 'FormatTitle');
}
$ms2->AddResultField(t('Aufrufe'), 't.views');
$ms2->AddResultField(t('Antworten'), '(COUNT(p.pid) - 1) AS posts');
//$ms2->AddResultField(t('Erster Beitrag'), 'UNIX_TIMESTAMP(MIN(p.date)) AS FirstPost', 'LastPostDetails');
$ms2->AddResultField(t('Letzter Beitrag'), 'UNIX_TIMESTAMP(MAX(p.date)) AS LastPost', 'LastPostDetails');
if ($_GET['action'] == 'bookmark') {
    $ms2->AddResultField(t('E-Mail'), 'b.email', 'TrueFalse');
    $ms2->AddResultField(t('System-Mail'), 'b.sysemail', 'TrueFalse');
}
$ms2->AddIconField('details', 'index.php?mod=board&action=thread&tid=', t('Details'));
if ($_GET['action'] != 'bookmark') {
Пример #14
0
 $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');
 while (list($caption, $inc, $icon) = $plugin->fetch()) {
     $dsp->StartTab($caption, $icon);
     include_once $inc;
     $dsp->EndTab();
Пример #15
0
// 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');
// 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
Пример #16
0
        } elseif ($line['available'] == 2) {
            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');
Пример #17
0
             $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');
     #$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';
Пример #18
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();
Пример #19
0
        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'));
}
$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']) {
Пример #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('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
 // Delete Member
 case 40:
     if ($_GET['clanid'] == '') {
         $func->error(t('Keine Clan-ID angegeben!'), "index.php?mod=home");
Пример #25
0
     $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
 case 2:
     ## Berechtigungsprüfung
     $berechtigt = 0;
Пример #26
0
     $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');
     $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
Пример #27
0
            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);
$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
<?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
                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
    $ms2->query['where'] = '1 = 1';
}
$cfg['guestlist_showorga'] ? $ms2->query['where'] .= ' AND u.type >= 1' : ($ms2->query['where'] .= ' AND u.type = 1');
$ms2->config['EntriesPerPage'] = 20;
$ms2->AddTextSearchField(t('Benutzername'), array('u.username' => '1337'));
$ms2->AddTextSearchField(t('Userid'), array('u.userid' => 'exact'));
$ms2->AddTextSearchField(t('Name'), array('u.name' => 'like', 'u.firstname' => 'like'));
if ($party->party_id) {
    $ms2->AddTextSearchDropDown(t('Bezahlt'), 'p.paid', array('' => 'Alle', '0' => 'Nicht bezahlt', '>1' => 'Bezahlt'));
    if (!$cfg['sys_internet']) {
        $ms2->AddTextSearchDropDown(t('Eingecheckt'), 'p.checkin', array('' => t('Alle'), '0' => t('Nicht Eingecheckt'), '>1' => t('Eingecheckt')));
        $ms2->AddTextSearchDropDown(t('Ausgecheckt'), 'p.checkout', array('' => t('Alle'), '0' => t('Nicht Ausgecheckt'), '>1' => t('Ausgecheckt')));
    }
}
$ms2->AddTextSearchField(t('Clan'), array('c.name' => 'like'));
$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');
if ($party->party_id) {
    $ms2->AddResultField(t('Bez.'), 'p.paid', 'PaidIconLink');
    $ms2->AddSelect('i.price');
    $ms2->AddResultField(t('Preis'), 'i.price_text', 'p_price');
    if ($func->isModActive('seating')) {
        $ms2->AddResultField(t('Sitz'), 'u.userid', 'SeatNameLink');
    }
    if (!$cfg['sys_internet']) {