Пример #1
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');
}
Пример #2
0
         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:
     $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;
Пример #3
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');
Пример #4
0
     $buttons .= $dsp->FetchSpanButton(t('Clan verlassen'), 'index.php?mod=' . $_GET['mod'] . '&step=40&clanid=' . $_GET['clanid'] . '&userid=' . $auth['userid']) . ' ';
 }
 if ($auth['type'] >= 1 and $auth['clanid'] == $_GET['clanid'] and $auth['clanadmin'] == 1 or $auth['type'] >= 2) {
     $buttons .= $dsp->FetchSpanButton(t('Clan editieren'), 'index.php?mod=' . $_GET['mod'] . '&step=30&clanid=' . $_GET['clanid']) . ' ';
 }
 if ($auth['type'] >= 1 and $auth['clanid'] == $_GET['clanid'] and $auth['clanadmin'] == 1 or $auth['type'] >= 2) {
     $buttons .= $dsp->FetchSpanButton(t('Passwort ändern'), 'index.php?mod=' . $_GET['mod'] . '&step=10&clanid=' . $_GET['clanid']) . ' ';
 }
 $dsp->AddDoubleRow('', $buttons);
 $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'] = 100;
 $ms2->AddSelect('u.firstname');
 $ms2->AddSelect('u.name');
 $ms2->AddResultField(t('Benutzername'), 'u.username', 'UserNameAndIcon');
 if (!$cfg['sys_internet'] or $auth['type'] > 1 or $auth['clanid'] == $_GET['clanid']) {
     $ms2->AddResultField(t('Vorname'), 'u.firstname', '');
     $ms2->AddResultField(t('Nachname'), 'u.name', '');
 }
 $ms2->AddResultField(t('Rolle'), 'u.clanadmin', 'ShowRole');
 $ms2->AddIconField('details', 'index.php?mod=usrmgr&action=details&userid=', t('Clan-Details'));
 if ($auth['type'] >= 3 | $auth['clanid'] == $_GET['clanid'] & $auth['clanadmin'] == 1) {
     $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=2', 'u.userid');
 $dsp->AddFieldSetEnd();
 $dsp->AddBackButton('index.php?mod=clanmgr&action=clanmgr');
 include 'inc/classes/class_mastercomment.php';
Пример #5
0
        $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'));
}
$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");
Пример #6
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');
}
Пример #7
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');
Пример #8
0
$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'));
    $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');
}
Пример #9
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);
}
Пример #10
0
<?php

// 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.
Пример #11
0
    $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.');
        break;
Пример #12
0
 function Mastercomment($mod, $id, $update_table = array())
 {
     global $framework, $dsp, $auth, $db, $func, $cfg;
     #echo '<ul class="Line">';
     $dsp->AddFieldsetStart(t('Kommentare'));
     // Delete comments
     if ($_GET['mc_step'] == 10) {
         include_once 'inc/classes/class_masterdelete.php';
         $md = new masterdelete();
         $md->LogID = $id;
         $md->Delete('comments', 'commentid', $_GET['commentid']);
         unset($_GET['commentid']);
     }
     $CurentURLBase = $framework->get_clean_url_query('base');
     $CurentURLBase = str_replace('&mc_step=10', '', $CurentURLBase);
     $CurentURLBase = str_replace('&mf_step=2', '', $CurentURLBase);
     $CurentURLBase = preg_replace('#&mf_id=[0-9]*#si', '', $CurentURLBase);
     $CurentURLBase = preg_replace('#&commentid=[0-9]*#si', '', $CurentURLBase);
     // No Order by in this MS, for it collidates with possible other MS on this page
     $order_by_tmp = $_GET['order_by'];
     $_GET['order_by'] = '';
     // List current comments
     include_once 'modules/mastersearch2/class_mastersearch2.php';
     $ms2 = new mastersearch2('bugtracker');
     $ms2->query['from'] = "%prefix%comments AS c\n      LEFT JOIN %prefix%user AS u ON c.creatorid = u.userid\n      ";
     $ms2->query['where'] = "c.relatedto_item = '{$mod}' AND c.relatedto_id = '{$id}'";
     $ms2->config['dont_link_first_line'] = 1;
     $ms2->AddSelect('UNIX_TIMESTAMP(c.date) AS date');
     $ms2->AddSelect('c.creatorid');
     $ms2->AddSelect('u.avatar_path');
     $ms2->AddSelect('u.signature');
     $ms2->AddSelect('u.userid');
     $ms2->AddResultField('', 'u.username', 'FetchDataRow', '', 180);
     $ms2->AddResultField('', 'c.text', 'FetchPostRow');
     $ms2->AddIconField('quote', 'javascript:document.getElementById(\'text\').value += \'[quote]\' + document.getElementById(\'post%id%\').innerHTML + \'[/quote]\'', t('Zitieren'));
     $ms2->AddIconField('edit', $CurentURLBase . '&commentid=%id%#dsp_form2', t('Editieren'), 'EditAllowed');
     if ($auth['type'] >= 3) {
         $ms2->AddIconField('delete', $CurentURLBase . '&mc_step=10&commentid=', t('Löschen'));
     }
     $ms2->PrintSearch($CurentURLBase, 'c.commentid');
     $_GET['order_by'] = $order_by_tmp;
     // Add new comments
     if ($cfg['mc_only_logged_in'] and !$auth['login']) {
         $func->information(t('Bitte loggen dich ein, bevor du einen Kommentar verfasst'), NO_LINK);
     } else {
         if ($_GET['commentid']) {
             $row = $db->qry_first("SELECT creatorid FROM %prefix%comments WHERE commentid = %int%", $_GET['commentid']);
         }
         if (!$_GET['commentid'] or $row['creatorid'] and $row['creatorid'] == $auth['userid'] or $auth['type'] >= 2) {
             include_once 'inc/classes/class_masterform.php';
             $mf = new masterform();
             $mf->LogID = $id;
             $mf->AddField(t('Kommentar'), 'text', '', LSCODE_BIG);
             if (!$auth['login']) {
                 $mf->AddField('', 'captcha', IS_CAPTCHA);
             }
             $mf->AddFix('relatedto_item', $mod);
             $mf->AddFix('relatedto_id', $id);
             if (!$_GET['commentid']) {
                 $mf->AddFix('date', 'NOW()');
             }
             if (!$_GET['commentid']) {
                 $mf->AddFix('creatorid', $auth['userid']);
             }
             if ($mf->SendForm('', 'comments', 'commentid', $_GET['commentid'])) {
                 // Send email-notifications to thread-subscribers
                 $path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php"));
                 include_once "modules/mail/class_mail.php";
                 $mail = new mail();
                 if (!$_GET['fid']) {
                     $_GET['fid'] = $thread['fid'];
                 }
                 // Internet-Mail
                 $subscribers = $db->qry('SELECT b.userid, u.firstname, u.name, u.email FROM %prefix%comments_bookmark AS b
     		LEFT JOIN %prefix%user AS u ON b.userid = u.userid
     		WHERE b.email = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id);
                 while ($subscriber = $db->fetch_array($subscribers)) {
                     if ($subscriber['userid'] != $auth['userid']) {
                         $mail->create_inet_mail($subscriber["firstname"] . " " . $subscriber["name"], $subscriber["email"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%')), $cfg["sys_party_mail"]);
                     }
                 }
                 $db->free_result($subscribers);
                 // Sys-Mail
                 $subscribers = $db->qry('SELECT userid FROM %prefix%comments_bookmark AS b
         WHERE b.sysemail = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id);
                 while ($subscriber = $db->fetch_array($subscribers)) {
                     if ($subscriber['userid'] != $auth['userid']) {
                         $mail->create_sys_mail($subscriber["userid"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%')));
                     }
                 }
                 $db->free_result($subscribers);
                 // Update LastChange in $update_table, if $update_table is set
                 if ($update_table) {
                     list($key, $val) = each($update_table);
                     $db->qry('UPDATE %prefix%' . $key . ' SET changedate=NOW() WHERE ' . $val . ' = %int%', $id);
                 }
             }
         } else {
             $func->error(t('Du bist nicht berechtigt, diesen Kommentar zu editieren'));
         }
     }
     $dsp->AddFieldsetEnd();
     #echo '</ul>';
     // Bookmarks and Auto-Mail
     if ($auth['login'] and $auth['type'] > 1) {
         if ($_GET['set_bm']) {
             $db->qry_first('DELETE FROM %prefix%comments_bookmark WHERE relatedto_id = %int% AND relatedto_item = %string%', $id, $mod);
             if ($_POST["check_bookmark"]) {
                 $db->qry('INSERT INTO %prefix%comments_bookmark
       SET relatedto_id = %int%, relatedto_item = %string%, userid = %int%, email = %int%, sysemail = %int%', $id, $mod, $auth['userid'], $_POST['check_email'], $_POST['check_sysemail']);
             }
         }
         $bookmark = $db->qry_first('SELECT 1 AS found, email, sysemail FROM %prefix%comments_bookmark WHERE relatedto_id = %int% AND relatedto_item = %string% AND userid = %int%', $id, $mod, $auth['userid']);
         if ($bookmark['found']) {
             $_POST['check_bookmark'] = 1;
         }
         if ($bookmark['email']) {
             $_POST['check_email'] = 1;
         }
         if ($bookmark['sysemail']) {
             $_POST['check_sysemail'] = 1;
         }
         $dsp->SetForm($_SERVER['REQUEST_URI'] . '&set_bm=1');
         $dsp->AddFieldsetStart(t('Monitoring'));
         $additionalHTML = "onclick=\"CheckBoxBoxActivate('email', this.checked)\"";
         $dsp->AddCheckBoxRow("check_bookmark", t('Lesezeichen'), t('Diesen Beitrag in meine Lesezeichen aufnehmen<br><i>(Lesezeichen ist Vorraussetzung, um Benachrichtigung per Mail zu abonnieren)</i>'), "", 1, $_POST["check_bookmark"], '', '', $additionalHTML);
         $dsp->StartHiddenBox('email', $_POST["check_bookmark"]);
         $dsp->AddCheckBoxRow("check_email", t('E-Mail Benachrichtigung'), t('Bei Antworten auf diesen Beitrag eine Internet-Mail an mich senden'), "", 1, $_POST["check_email"]);
         $dsp->AddCheckBoxRow("check_sysemail", t('System-E-Mail'), t('Bei Antworten auf diesen Beitrag eine System-Mail an mich senden'), "", 1, $_POST["check_sysemail"]);
         if ($bookmark["found"]) {
             $dsp->StopHiddenBox();
         }
         $dsp->AddFormSubmitRow("edit");
         if (!$bookmark["found"]) {
             $dsp->StopHiddenBox();
         }
         $dsp->AddFieldsetEnd();
     }
 }
Пример #13
0
}
function IfFinished($tid)
{
    global $line;
    if ($line['status'] == 'closed') {
        return true;
    } else {
        return false;
    }
}
$dsp->NewContent(t('Turnierübersicht'), t('Hier findest du eine Übersicht aller angebotenen Turniere.'));
$ms2->query['from'] = "%prefix%tournament_tournaments AS t LEFT JOIN %prefix%t2_teams AS teams ON t.tournamentid = teams.tournamentid";
$ms2->query['where'] = "(t.status != 'invisible' OR " . (int) $auth['type'] . " > 1) AND t.party_id = " . (int) $party->party_id;
$ms2->query['default_order_by'] = 't.name';
$ms2->config['EntriesPerPage'] = 50;
$ms2->AddSelect('t.over18');
$ms2->AddSelect('t.icon');
$ms2->AddSelect('t.wwcl_gameid');
$ms2->AddSelect('t.ngl_gamename');
$ms2->AddSelect('t.lgz_gamename');
$ms2->AddSelect('COUNT(teams.tournamentid) AS teamanz');
$ms2->AddResultField(t('Turniername'), 't.name', 'GetTournamentName');
$ms2->AddResultField(t('Admin'), 'tournamentadmin', 'GetTournamentUserIcon');
$ms2->AddResultField(t('Tech'), 'techadmin', 'GetTournamentUserIcon');
$ms2->AddResultField(t('Startzeit'), 'UNIX_TIMESTAMP(t.starttime) AS starttime', 'MS2GetDate');
$ms2->AddResultField(t('Team'), 't.maxteams', 'GetTournamentTeamAnz');
$ms2->AddResultField(t('Status'), 't.status', 'GetTournamentStatus');
$ms2->AddIconField('details', 'index.php?mod=tournament2&action=details&tournamentid=', t('Details'));
$ms2->AddIconField('tree', 'index.php?mod=tournament2&action=tree&step=2&tournamentid=', t('Spielbaum'), 'IfGenerated');
$ms2->AddIconField('play', 'index.php?mod=tournament2&action=games&step=2&tournamentid=', t('Paarungen'), 'IfGenerated');
$ms2->AddIconField('ranking', 'index.php?mod=tournament2&action=rangliste&step=2&tournamentid=', t('Rangliste'), 'IfFinished');
Пример #14
0
            break;
    }
}
if (!$_GET['act'] or $_GET['act'] and $_GET['step'] == 2) {
    if ($userid == null) {
        $userid = $auth['userid'];
    }
    $dsp->NewContent(t('Buchhaltung'), t('Übersicht aller meiner Ein- und Ausgaben'));
    include_once 'modules/mastersearch2/class_mastersearch2.php';
    $ms2 = new mastersearch2('accounting');
    $ms2->query['from'] = "%prefix%cashmgr_accounting AS a\r\n                            LEFT JOIN %prefix%user AS fu ON a.fromUserid = fu.userid\r\n                            LEFT JOIN %prefix%user AS tu ON a.toUserid = tu.userid";
    $ms2->query['default_order_by'] = 'actiontime DESC';
    $ms2->query['where'] = "a.toUserid = {$userid} OR a.fromUserid = {$userid}";
    $ms2->config['EntriesPerPage'] = 20;
    $party_list = array('' => 'Alle');
    $row = $db->qry("SELECT party_id, name FROM %prefix%partys");
    while ($res = $db->fetch_array($row)) {
        $party_list[$res['party_id']] = $res['name'];
    }
    $db->free_result($row);
    $ms2->AddTextSearchDropDown('Party', 'a.partyid', $party_list, $party->party_id);
    $ms2->AddTextSearchDropDown('Zahlungsart', 'a.cash', array('' => 'Alle', 0 => 'Nur Online', '1' => 'Nur Bar'));
    $ms2->AddResultField(t('Datum'), 'a.actiontime', 'MS2GetDate');
    $ms2->AddResultField(t('Modul'), 'a.modul');
    $ms2->AddResultField(t('Kommentar'), 'a.comment');
    $ms2->AddSelect('a.fromUserid');
    $ms2->AddSelect("IF(a.fromUserid = {$userid},'1','0') AS my");
    $ms2->AddResultField(t('Bearbeiter'), 'fu.username', 'UserNameAndIcon');
    $ms2->AddResultField(t('Betrag'), 'a.movement', 'getColor');
    $ms2->PrintSearch('index.php?mod=cashmgr&action=myaccounting', 'a.id');
}
Пример #15
0
<?php

/*
 * Created on 12.02.2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
$dsp->NewContent(t('Shoutbox'), t('Shoutbox History'));
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('task');
$ms2->query['from'] = '%prefix%shoutbox';
$ms2->query['default_order_by'] = "id DESC";
$ms2->config['EntriesPerPage'] = 20;
$ms2->AddSelect('id');
$ms2->AddResultField('Name', 'name');
$ms2->AddResultField('Shout Message', 'message');
$ms2->AddResultField('Datum', 'created');
$ms2->PrintSearch('index.php?mod=shoutbox&action=show', 'id');
?>

Пример #16
0
    return $name . HTML_NEWLINE . $line['motto'];
}
if (!$_GET['partyid']) {
    if ($_GET['action'] == 'history') {
        $where = 'p.end < NOW()';
    } else {
        $where = 'p.end >= NOW()';
    }
    $dsp->NewContent(t('Party-Liste'), t('Partys, die Lansuite verwenden'));
    include_once 'modules/mastersearch2/class_mastersearch2.php';
    $ms2 = new mastersearch2('');
    $ms2->query['from'] = "%prefix%partylist AS p";
    $ms2->query['where'] = $where;
    $ms2->query['default_order_by'] = 'p.start ASC';
    $ms2->config['EntriesPerPage'] = 20;
    $ms2->AddSelect('p.motto');
    $ms2->AddSelect('p.userid');
    $ms2->AddResultField(t('Partyname'), 'p.name', 'NameAndMotto');
    $ms2->AddResultField(t('Begin'), 'UNIX_TIMESTAMP(p.start) as start', 'MS2GetDate');
    $ms2->AddResultField(t('Ende'), 'UNIX_TIMESTAMP(p.end) as end', 'MS2GetDate');
    $ms2->AddResultField(t('Anmelde-Status'), 'ls_url', 'AddSignonStatus');
    $ms2->AddIconField('details', 'index.php?mod=partylist&action=' . $_GET['action'] . '&partyid=', t('Details'));
    if ($_GET['action'] != 'history') {
        $ms2->AddIconField('signon', 'nofollow.php?mod=partylist&step=10&design=base&partyid=', t('Anmelden'));
    }
    $ms2->AddIconField('edit', 'index.php?mod=partylist&action=add&partyid=', t('Editieren'), 'EditAllowed');
    if ($auth['type'] >= 3) {
        $ms2->AddIconField('delete', 'index.php?mod=partylist&action=delete&partyid=', t('Löschen'));
    }
    $ms2->PrintSearch('index.php?mod=partylist&action=' . $_GET['action'], 'p.partyid');
} else {