Пример #1
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');
Пример #2
0
    if ($clan_url == '') {
        return '';
    }
    if (substr($clan_url, 0, 7) != 'http://' and substr($clan_url, 0, 8) != 'https://') {
        $clan_url = "http://" . $clan_url;
    }
    return '<a href="' . $clan_url . '" target="_blank">' . $clan_url . '</a>';
}
switch ($_GET['step']) {
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('clanmgr');
        $ms2->query['from'] = "%prefix%clan AS c\n        LEFT JOIN %prefix%user AS u ON c.clanid = u.clanid";
        $ms2->config['EntriesPerPage'] = 20;
        #$ms2->AddBGColor('c.clanid', array($auth['clanid'] => 'ff0000'));
        $ms2->AddTextSearchField(t('Clanname'), array('c.name' => '1337', 'c.url' => 'like'));
        $ms2->AddTextSearchDropDown(t('Mitglieder'), 'COUNT(u.clanid)', array('' => t('Alle'), '0' => t('Ohne Mitglieder'), '>1' => t('Mit Mitglieder')));
        $ms2->AddResultField(t('Clanname'), 'c.name');
        $ms2->AddResultField(t('Webseite'), 'c.url', 'link_to_clan');
        $ms2->AddResultField(t('Mitglieder'), 'COUNT(u.clanid) AS members');
        $ms2->AddIconField('details', 'index.php?mod=clanmgr&step=2&clanid=', t('Clan-Details'));
        if ($auth['type'] >= 2) {
            $ms2->AddIconField('change_pw', 'index.php?mod=clanmgr&step=10&clanid=', t('Passwort ändern'));
        }
        if ($auth['type'] >= 2) {
            $ms2->AddIconField('edit', 'index.php?mod=clanmgr&step=30&clanid=', t('Editieren'));
        }
        if ($auth['type'] >= 3) {
            $ms2->AddIconField('delete', 'index.php?mod=clanmgr&step=20&clanid=', t('Löschen'));
        }
        if ($auth['type'] >= 3) {
Пример #3
0
 include_once 'modules/mastersearch2/class_mastersearch2.php';
 $ms2 = new mastersearch2('bugtracker');
 $quicklink = array();
 $quicklink['name'] = 'Fehler (offen)';
 $quicklink['link'] = 'index.php?mod=bugtracker&order_by=&order_dir=&EntsPerPage=&search_input%5B0%5D=&search_input%5B1%5D=&search_dd_input%5B0%5D=&search_dd_input%5B1%5D=&search_dd_input%5B2%5D=&search_dd_input%5B3%5D=&search_dd_input%5B4%5D%5B%5D=0&search_dd_input%5B4%5D%5B%5D=1&search_dd_input%5B4%5D%5B%5D=2&search_dd_input%5B4%5D%5B%5D=3&search_dd_input%5B4%5D%5B%5D=5&search_dd_input%5B4%5D%5B%5D=7&search_dd_input%5B5%5D%5B%5D=2&search_dd_input%5B5%5D%5B%5D=3&search_dd_input%5B5%5D%5B%5D=4&search_dd_input%5B5%5D%5B%5D=5&suchen=Suchen';
 $ms2->quicklinks[] = $quicklink;
 $quicklink['name'] = 'Wünsche (offen)';
 $quicklink['link'] = 'index.php?mod=bugtracker&order_by=&order_dir=&EntsPerPage=&search_input%5B0%5D=&search_input%5B1%5D=&search_dd_input%5B0%5D=&search_dd_input%5B1%5D=&search_dd_input%5B2%5D=&search_dd_input%5B3%5D=&search_dd_input%5B4%5D%5B%5D=0&search_dd_input%5B4%5D%5B%5D=1&search_dd_input%5B4%5D%5B%5D=2&search_dd_input%5B4%5D%5B%5D=3&search_dd_input%5B4%5D%5B%5D=5&search_dd_input%5B4%5D%5B%5D=7&search_dd_input%5B5%5D%5B%5D=1&suchen=Suchen';
 $ms2->quicklinks[] = $quicklink;
 $ms2->query['from'] = "%prefix%bugtracker AS b\n    LEFT JOIN %prefix%user AS r ON b.reporter = r.userid\n    LEFT JOIN %prefix%user AS a ON b.agent = a.userid\n    LEFT JOIN %prefix%comments AS c ON (c.relatedto_id = b.bugid AND c.relatedto_item = 'BugEintrag')\n    ";
 $ms2->query['where'] = '(!private OR ' . (int) $auth['type'] . ' >= 2)';
 #  $ms2->query['default_order_by'] = 'FIND_IN_SET(state, \'0,7,1,2,3,4,5,6\'), date DESC';
 $ms2->query['default_order_by'] = 'changedate DESC, FIND_IN_SET(state, \'0,7,1,2,3,4,5,6\'), date DESC';
 $ms2->config['EntriesPerPage'] = 50;
 $ms2->AddBGColor('state', $colors);
 $ms2->AddTextSearchField(t('Überschrift'), array('b.caption' => 'like'));
 $ms2->AddTextSearchField(t('Text'), array('b.text' => 'fulltext', 'c.text' => 'fulltext'));
 $list = array('' => 'Alle');
 $row = $db->qry('SELECT b.reporter, u.username FROM %prefix%bugtracker AS b LEFT JOIN %prefix%user AS u ON b.reporter = u.userid WHERE b.reporter > 0 ORDER BY u.username');
 while ($res = $db->fetch_array($row)) {
     $list[$res['reporter']] = $res['username'];
 }
 $db->free_result($row);
 $ms2->AddTextSearchDropDown('Reporter', 'b.reporter', $list);
 $list = array('' => 'Alle');
 $row = $db->qry('SELECT module FROM %prefix%bugtracker WHERE module != "" GROUP BY module ORDER BY module');
 while ($res = $db->fetch_array($row)) {
     $list[$res['module']] = $res['module'];
 }
 $db->free_result($row);
 $ms2->AddTextSearchDropDown('Modul', 'module', $list);
Пример #4
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');
Пример #5
0
<?php

switch ($_GET['step']) {
    case 10:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->MultiDelete('comments', 'commentid');
        break;
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%comments AS c\n  LEFT JOIN %prefix%user AS u ON u.userid = c.creatorid";
$ms2->query['default_order_by'] = 'c.date DESC';
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddTextSearchField(t('Kommentar'), array('c.text' => 'like'));
$list = array('' => t('Alle'), '0' => t('System'));
$res = $db->qry('SELECT u.userid, u.username FROM %prefix%comments AS c
  LEFT JOIN %prefix%user AS u ON u.userid = c.creatorid
  GROUP BY c.creatorid');
while ($row = $db->fetch_array($res)) {
    if ($row['userid']) {
        $list[$row['userid']] = $row['username'];
    }
}
$db->free_result($res);
$ms2->AddTextSearchDropDown(t('Auslöser'), 'c.creatorid', $list);
$list = array('' => t('Alle'));
$row = $db->qry('SELECT relatedto_item FROM %prefix%comments GROUP BY relatedto_item');
while ($res = $db->fetch_array($row)) {
    if ($res['relatedto_item']) {
        $list[$res['relatedto_item']] = $res['relatedto_item'];
Пример #6
0
        include_once "modules/server/ping_server.inc.php";
        ping_server($line['ip'], $line['port']);
        if ($line['available'] == 1) {
            return "<div class=\"tbl_green\">Online</div>";
        } 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'));
}
Пример #7
0
    }
    if ($ret) {
        return '<a href="index.php?mod=usrmgr&action=party&user_id=' . $line['userid'] . '">' . $ret . '</a>';
    } else {
        return '';
    }
}
$ms2->query['from'] = "%prefix%user AS u\n    LEFT JOIN %prefix%clan AS c ON u.clanid = c.clanid\n    LEFT JOIN %prefix%party_user AS p ON u.userid = p.user_id\n    LEFT JOIN %prefix%party_prices AS i ON i.party_id = p.party_id AND i.price_id = p.price_id";
if ($party->party_id) {
    $ms2->query['where'] = 'p.party_id = ' . (int) $party->party_id;
} else {
    $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');
}
Пример #8
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');
Пример #9
0
// Searchform for all Configsettings
function get_modullink($modul)
{
    return "<a href=\"index.php?mod=install&action=mod_cfg&step=10&module=" . $modul . "\">" . $modul . "</a>";
}
$dsp->NewContent('Suche Configschl&uuml;ssel', 'Zum bearbeiten auf den Modullink klicken');
// Init Mastersearch
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%config l";
// Add Searchfields
$ms2->AddSelect('l.cfg_key');
$ms2->AddSelect('l.cfg_value');
$ms2->AddSelect('l.cfg_desc');
$ms2->AddTextSearchField(t('Alle Felder'), array('l.cfg_key' => 'like', 'l.cfg_value' => 'like', 'l.cfg_desc' => 'like', 'l.cfg_module' => 'like'));
$list = array('' => 'Alle');
$row = $db->qry('SELECT cfg_module FROM %prefix%config WHERE cfg_module != "" GROUP BY cfg_module ORDER BY cfg_module');
while ($res = $db->fetch_array($row)) {
    $list[$res['cfg_module']] = $res['cfg_module'];
}
$db->free_result($row);
$ms2->AddTextSearchDropDown('Modul', 'l.cfg_module', $list);
// Which columns should be displayed?
$ms2->AddResultField(t('Key'), 'l.cfg_key');
$ms2->AddResultField(t('Modul'), 'l.cfg_module', 'get_modullink');
$ms2->AddResultField(t('Value'), 'l.cfg_value');
$ms2->AddResultField(t('Beschreibung'), 'l.cfg_desc');
// Functionbuttons
// Einzeledit muss noch integriert werden.
//if ($auth['type'] >= 2) $ms2->AddIconField('edit', 'index.php?mod=install&action=mod_cfg&step=10&cfg_key=', t('Editieren'));
Пример #10
0
    $return .= "<a href='index.php?mod=foodcenter&headermenuitem=" . $data[cat_id] . "&info=" . $id . "'><b>" . $data[caption] . "</b>";
    $return .= " <br />" . $data[p_desc] . "</a>";
    return $return;
}
$product_list = new product_list();
$dsp->NewContent(t('Produktsuche'), t('Hier findest du alles was das Herz begehrt'));
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%food_product AS p\n\t\t\tLEFT JOIN %prefix%food_option AS o ON o.parentid = p.id";
$cat_list = array('' => 'Alle');
$row = $db->qry("SELECT * FROM %prefix%food_cat");
while ($res = $db->fetch_array($row)) {
    $cat_list[$res['cat_id']] = $res['name'];
}
$db->free_result($row);
$ms2->AddTextSearchDropDown('Produktkategorie', 'p.cat_id', $cat_list);
$ms2->AddTextSearchField('Produktsuche', array('p.caption' => 'like', 'p.p_desc' => 'like'));
$ms2->AddSelect('p.cat_id');
$ms2->AddResultField('Titel', 'p.id', 'GetTitelName');
//$ms2->AddIconField('basket', 'index.php?mod=foodcenter&headermenuitem='=', t('Details'));
switch ($_POST['search_dd_input'][0]) {
    case 1:
        $ms2->NoItemsText = t('Keine aktuellen Bestellungen vorhanden.');
        break;
    case 2:
        $ms2->NoItemsText = t('Es müssen keine Produkte bestellt werden.');
        break;
    case 3:
        $ms2->NoItemsText = t('Es wird auf keine Lieferung gewartet.');
        break;
    case 4:
        $ms2->NoItemsText = t('Derzeit gibt es keine fertiggestellten Gerichte aus der Küche.');
Пример #11
0
        case 2:
            return t('Überprüft / Akzeptiert');
            break;
        case 3:
            return t('In Arbeit');
            break;
        case 4:
            return t('Abgeschlossen');
            break;
        case 5:
            return t('Abgelehnt');
            break;
    }
}
$ms2->query['from'] = "%prefix%troubleticket AS t\n  LEFT JOIN %prefix%user AS u ON t.target_userid = u.userid";
$ms2->query['where'] = "status > '0'";
$ms2->config['EntriesPerPage'] = 20;
$ms2->AddTextSearchField('Ticket', array('t.caption' => 'like'));
$ms2->AddResultField('Ticket', 't.caption');
$ms2->AddResultField('Zuständig', 'u.username');
$ms2->AddResultField('Status', 't.status', 'TTStatus');
$ms2->AddIconField('details', 'index.php?mod=troubleticket&action=show&step=2&ttid=', 'Details');
if ($auth['type'] >= 2) {
    $ms2->AddIconField('assign', 'index.php?mod=troubleticket&action=assign&step=2&ttid=', 'Assign');
}
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=troubleticket&action=change&step=2&ttid=', 'Edit');
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=troubleticket&action=delete&step=2&ttid=', 'Delete');
}
Пример #12
0
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('wiki');
$ms2->query['from'] = "%prefix%wiki AS w\n  LEFT JOIN %prefix%wiki_versions AS v ON w.postid = v.postid\n  LEFT JOIN %prefix%user AS u ON v.userid = u.userid";
$ms2->query['default_order_by'] = 'v.date DESC';
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddTextSearchField(t('Titel'), array('w.name' => 'like'));
$ms2->AddTextSearchField(t('Text'), array('v.text' => 'fulltext'));
$ms2->AddResultField(t('Titel'), 'w.name');
$ms2->AddResultField(t('Version'), 'MAX(v.versionid) AS versionid');
$ms2->AddResultField(t('Letzer Autor'), 'u.username', 'UserNameAndIcon');
$ms2->AddResultField(t('Letzte Änderung'), 'UNIX_TIMESTAMP(v.date) AS date', 'MS2GetDate');
$ms2->AddIconField('details', 'index.php?mod=wiki&action=show&postid=', t('Details'));
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=wiki&action=delete&step=2&postid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=wiki&action=search', 'w.postid');
Пример #13
0
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('news');
$ms2->query['from'] = "%prefix%noc_devices AS n";
$ms2->AddTextSearchField('Device', array('n.name' => 'like', 'n.ip' => 'like'));
$ms2->AddResultField('Autor', 'n.name');
$ms2->AddResultField('Titel', 'n.id');
$ms2->AddResultField('Datum', 'n.ip');
$ms2->AddIconField('details', 'index.php?mod=noc&action=details_device&deviceid=', t('Details'));
if ($auth['type'] >= 2) {
    $ms2->AddIconField('edit', 'index.php?mod=noc&action=change_device&step=2&deviceid=', t('Editieren'));
}
if ($auth['type'] >= 3) {
    $ms2->AddIconField('delete', 'index.php?mod=noc&action=delete_device&step=2&deviceid=', t('Löschen'));
}
$ms2->PrintSearch('index.php?mod=noc&action=show_device', 'n.id');
Пример #14
0
 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');
     $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();
Пример #15
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();
Пример #16
0
$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');
// 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'));
}
Пример #17
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');
Пример #18
0
                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) {
        $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);
Пример #19
0
<?php

include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('usrmgr');
$ms2->query['from'] = "%prefix%user AS u\n    LEFT JOIN %prefix%clan AS c ON u.clanid = c.clanid\n    LEFT JOIN %prefix%party_user AS p ON u.userid = p.user_id\n    LEFT JOIN %prefix%party_prices AS i ON i.party_id = p.party_id AND i.price_id = p.price_id";
$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' => 'multiword', 'u.firstname' => 'multiword'));
$ms2->AddTextSearchField(t('E-Mail'), array('u.email' => 'like'));
$ms2->AddResultField(t('Benutzername'), 'u.username');
$ms2->AddResultField(t('Vorname'), 'u.firstname');
$ms2->AddResultField(t('Nachname'), 'u.name');