$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'); if ($auth['type'] >= 2) { $ms2->AddIconField('generate', 'index.php?mod=tournament2&action=generate_pairs&step=2&tournamentid=', t('Generieren'), 'IfNotGenerated'); } if ($auth['type'] >= 2) { $ms2->AddIconField('edit', 'index.php?mod=tournament2&action=change&step=1&tournamentid=', t('Editieren')); } if ($auth['type'] >= 3) { $ms2->AddIconField('delete', 'index.php?mod=tournament2&action=delete&step=2&tournamentid=', t('Löschen')); } if ($auth['type'] >= 3) { $ms2->AddMultiSelectAction('Anmeldung öffnen', 'index.php?mod=tournament2&action=changestat&step=open', 1); }
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')); } if ($auth['type'] >= 2) { $ms2->AddIconField('paid', 'index.php?mod=party&action=price&step=2&party_id='); } #if ($auth['type'] >= 3) $ms2->AddMultiSelectAction(t('Löschen'), 'index.php?mod=party&action=delete', 1); $ms2->PrintSearch('index.php?mod=party', 'p.party_id'); $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=party&action=edit')); if ($auth['type'] >= 2 and isset($_SESSION['party_id'])) { $func->information(t('Der Status "Aktiv" zeigt an, welche Party standardmäßig für alle aktiviert ist, die nicht selbst eine auf der Startseite, oder in der Party-Box ausgewählt haben. In deinem Browser ist jedoch aktuell die Party mit der ID %1 aktiv. Welche Party für dich persöhnlich die aktivie ist, kannst du auf der Startseite, oder in der Party-Box einstellen', $_SESSION['party_id']), NO_LINK);
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();
$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); $ms2->AddMultiSelectAction($fc_ordered_status_quest[1], 'index.php?mod=foodcenter&action=statchange&step=2&status=5', 1); $ms2->AddMultiSelectAction($fc_ordered_status_quest[2], 'index.php?mod=foodcenter&action=statchange&step=2&status=3', 1); $ms2->AddMultiSelectAction($fc_ordered_status_quest[3], 'index.php?mod=foodcenter&action=statchange&step=2&status=7', 1); $ms2->AddMultiSelectAction($fc_ordered_status_quest[4], 'index.php?mod=foodcenter&action=statchange&step=2&status=8', 1); switch ($_POST['search_dd_input'][0]) { case 1: $dsp->NewContent(t('Bestellte Produkte'), ''); $ms2->NoItemsText = t('Keine aktuellen Bestellungen vorhanden.');
$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"> </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')); } if ($auth['type'] >= 3) { $ms2->AddIconField('ip_del', 'index.php?mod=seating&action=ipgen&step=20&blockid=', t('IPs löschen')); } if ($auth['type'] >= 2) { $ms2->AddIconField('edit', 'index.php?mod=seating&action=edit&step=2&blockid=', t('Editieren')); } if ($auth['type'] >= 3) {
} $mf->AdditionalDBUpdateFunction = 'Update'; $mf->SendForm('index.php?mod=clanmgr&step=' . $_GET['step'], 'clan', 'clanid', $_GET['clanid']); $dsp->AddFieldsetEnd(); if ($_GET['clanid'] != '') { $dsp->AddFieldsetStart(t('Mitglieder')); include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('clanmgr'); $ms2->query['from'] = "%prefix%user AS u"; $ms2->query['where'] = 'u.clanid = ' . (int) $_GET['clanid']; $ms2->config['EntriesPerPage'] = 20; $ms2->AddResultField(t('Vorname'), 'u.firstname'); $ms2->AddResultField(t('Nachname'), 'u.name'); $ms2->AddResultField(t('Benutzername'), 'u.username'); $ms2->AddResultField(t('Rolle'), 'u.clanadmin', 'ShowRole'); $ms2->AddIconField('delete', 'index.php?mod=clanmgr&action=clanmgr&step=40&clanid=' . $_GET['clanid'] . '&userid=', t('Löschen')); $ms2->PrintSearch('index.php?mod=clanmgr&action=clanmgr&step=30&clanid=' . $_GET['clanid'] . '&userid=', 'u.userid'); $dsp->AddFieldsetEnd(); } $dsp->AddBackButton('index.php?mod=clanmgr&action=clanmgr'); } break; // Delete Member // Delete Member case 40: if ($_GET['clanid'] == '') { $func->error(t('Keine Clan-ID angegeben!'), "index.php?mod=home"); } elseif (CountAdmins() == 1 and $auth['clanadmin'] == 1) { $func->information(t('Löschen nicht möglich. Du bist der einzige Clan-Admin in diesem Clan. Benne bitte vorher einen weiteren Admin.'), 'index.php?mod=clanmgr&action=clanmgr&step=2&clanid=' . $_GET['clanid']); } elseif ($_GET['clanid'] == $auth['clanid'] and $auth['clanadmin'] == 1 or $_GET['clanid'] == $auth['clanid'] and $_GET['userid'] = $auth['userid'] or $auth['type'] > 2) { $db->qry("UPDATE %prefix%user SET clanid = 0 WHERE userid = %int%", $_GET['userid']);
$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 = ''; $_GET['timeframe'] = '0000-00-00-00-00-00'; break;
$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') { if ($auth['type'] >= 2) { $ms2->AddIconField('edit', 'index.php?mod=board&action=forum&step=10&fid=' . $_GET['fid'] . '&tid=', t('Überschrift editieren')); } if ($auth['type'] >= 3) { $ms2->AddIconField('delete', 'index.php?mod=board&action=delete&step=11&tid=', t('Löschen')); } if ($auth['type'] >= 2) { $res = $db->qry("SELECT fid, name FROM %prefix%board_forums"); while ($row = $db->fetch_array($res)) { $ms2->AddMultiSelectAction(t('Verschieben nach ') . $row['name'], 'index.php?mod=board&action=forum&step=20&to_fid=' . $row['fid'] . '&fid=' . $_GET['fid'], 1, 'in'); } $db->free_result($res); $ms2->AddMultiSelectAction(t('Markierung entfernen'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=40', 0, 'selection_none'); $ms2->AddMultiSelectAction(t('Markieren: Rot'), 'index.php?mod=board&action=forum&fid=' . $_GET['fid'] . '&step=41', 0, 'selection_all');
<?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&action=change&sponsorid=', t('Editieren')); } if ($auth['type'] >= 3) { $ms2->AddIconField('delete', 'index.php?mod=sponsor&action=delete&step=2&sponsorid=', t('Löschen')); } $ms2->PrintSearch('index.php?mod=sponsor&action=change', 's.sponsorid');
<?php switch ($_GET['step']) { default: include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('seating'); $ms2->query['from'] = "%prefix%seat_block AS b LEFT JOIN %prefix%partys AS p on b.party_id = p.party_id"; $ms2->AddResultField('Blockname', 'b.name'); $ms2->AddResultField('Party', 'p.name AS partyname'); $ms2->AddIconField('in', 'index.php?mod=seating&action=copy&step=2&blockid=', t('Kopieren')); $ms2->AddIconField('edit', 'index.php?mod=seating&action=edit&step=2&blockid=', t('Editieren')); $ms2->PrintSearch($current_url, 'b.blockid'); break; case 2: $row = $db->qry_first('SELECT * FROM %prefix%seat_block WHERE blockid = %int%', $_GET['blockid']); $db->qry('INSERT INTO %prefix%seat_block SET party_id = %int%, rows = %int%, cols = %int%, name = %string%, orientation = %int%, u18 = %int%, remark = %string%, text_tl = %string%, text_tc = %string%, text_tr = %string%, text_lt = %string%, text_lc = %string%, text_lb = %string%, text_rt = %string%, text_rc = %string%,
$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']) { $ms2->AddResultField(t('In'), 'UNIX_TIMESTAMP(p.checkin) AS checkin', 'MS2GetDate'); $ms2->AddResultField(t('Out'), 'UNIX_TIMESTAMP(p.checkout) AS checkout', 'MS2GetDate'); } } $ms2->AddIconField('details', 'index.php?mod=guestlist&action=details&userid=', t('Details')); $ms2->AddIconField('send_mail', 'index.php?mod=mail&action=newmail&step=2&userID=', t('Mail senden')); if ($auth['type'] >= 2) { $ms2->AddMultiSelectAction(t('Auf "Bezahlt" setzen'), "index.php?mod=guestlist&step=10", 1, 'paid'); $ms2->AddMultiSelectAction(t('Auf "Nicht Bezahlt" setzen'), "index.php?mod=guestlist&step=11", 1, 'not_paid'); $ms2->AddMultiSelectAction(t('Einchecken'), "index.php?mod=guestlist&step=20", 1, 'in'); $ms2->AddMultiSelectAction(t('Auschecken'), "index.php?mod=guestlist&step=21", 1, 'out'); $ms2->AddMultiSelectAction(t('Ein- und Auschecken rückgängig'), "index.php?mod=guestlist&step=22", 1, 'not_out'); } $ms2->PrintSearch('index.php?mod=guestlist', 'u.userid');
} foreach ($_POST['action'] as $key => $val) { $rx_status = $db->qry_first("SELECT rx_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 ($rx_status['rx_deleted']) { $db->qry("DELETE FROM %prefix%mail_messages WHERE mailID = %int%", $key); } else { $db->qry("UPDATE %prefix%mail_messages SET tx_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.ToUserID = u.userid"; $ms2->query['where'] = "m.FromUserID = '{$auth['userid']}' AND m.mail_status != 'disabled' AND tx_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('Empfänger'), 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('Empfänger'), 'u.username', 'UserNameAndIcon', '', 100); $ms2->AddResultField(t('Gesendet'), 'UNIX_TIMESTAMP(m.tx_date) AS tx_date', 'MS2GetDate', '', 75); $ms2->AddResultField(t('Gelesen'), 'UNIX_TIMESTAMP(m.rx_date) AS rx_date', 'MS2GetDate', '', 45); $ms2->AddIconField('details', 'index.php?mod=mail&action=showmail&ref=out&mailID=', t('Details')); $ms2->AddIconField('delete', 'index.php?mod=mail&action=outbox&step=20&mailid=', t('Entgültig löschen')); $ms2->AddMultiSelectAction(t('Entgültig löschen'), 'index.php?mod=mail&action=outbox&step=20', 1, 'delete'); $ms2->PrintSearch('index.php?mod=mail&action=outbox', 'm.mailid');
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(); } }
function viewContent() { global $dsp, $lang, $beamermodul, $bcid, $beamerid; // private ms2 funktionen function formatContentType($var) { if ($var == "text") { return '<img src="design/images/icon_text.png" alt="Text" border="0">'; } if ($var == "wrapper") { return '<img src="design/images/icon_url.png" alt="Bild" border="0">'; } if ($var == "turnier") { return '<img src="design/images/icon_tree.png" alt="Bild" border="0">'; } } function formatBStatus($var, $bcid, $beamerid) { if ($var == "1") { return '<a href="index.php?mod=beamer&action=togglebeameractive&bcid=' . $bcid . '&beamerid=' . $beamerid . '"><img src="design/images/icon_active_sm.png" alt="Aktiv" border="0"></a>'; } if ($var == "0") { return '<a href="index.php?mod=beamer&action=togglebeameractive&bcid=' . $bcid . '&beamerid=' . $beamerid . '"><img src="design/images/icon_deactive_sm.png" alt="Deaktiv" border="0"></a>'; } } function formatBeamer1Status($var, $bcid) { return formatBStatus($var, $bcid, "1"); } function formatBeamer2Status($var, $bcid) { return formatBStatus($var, $bcid, "2"); } function formatBeamer3Status($var, $bcid) { return formatBStatus($var, $bcid, "3"); } function formatBeamer4Status($var, $bcid) { return formatBStatus($var, $bcid, "4"); } function formatBeamer5Status($var, $bcid) { return formatBStatus($var, $bcid, "5"); } function formatActiveStatus($var, $var2) { if ($var == "1") { return '<a href="index.php?mod=beamer&action=toggleactive&bcid=' . $var2 . '"><img src="design/images/icon_active.png" alt="Aktiv" border="0"></a>'; } if ($var == "0") { return '<a href="index.php?mod=beamer&action=toggleactive&bcid=' . $var2 . '"><img src="design/images/icon_deactive.png" alt="Deaktiv" border="0"></a>'; } } $dsp->NewContent(t('Auflistung der Inhalte')); $dsp->AddSingleRow("<br/><div align=\"middle\">" . $dsp->FetchCssButton(t('Inhalte hinzufügen'), 'index.php?mod=beamer&action=newcontent', 'Ein neues Inhaltselement hinzufügen.' . "</div>")); include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('beamer'); $ms2->query['from'] = '%prefix%beamer_content'; $ms2->AddResultField('-A-', 'active', 'formatActiveStatus', '', 35); $ms2->AddResultField(t('Typ'), 'contentType', 'formatContentType', "", 35); $ms2->AddResultField(t('Titel'), 'caption'); $ms2->AddResultField(t('Zuletzt angezeigt'), 'lastView', 'MS2GetTime', '', 80); $ms2->AddResultField('B.1', 'b1', 'formatBeamer1Status', '', 25); $ms2->AddResultField('B.2', 'b2', 'formatBeamer2Status', '', 25); $ms2->AddResultField('B.3', 'b3', 'formatBeamer3Status', '', 25); $ms2->AddResultField('B.4', 'b4', 'formatBeamer4Status', '', 25); $ms2->AddResultField('B.5', 'b5', 'formatBeamer5Status', '', 25); $ms2->AddIconField('reset_timestamp', 'index.php?mod=beamer&action=set2first&bcid=', t('An den Anfang der Spielliste setzen')); $ms2->AddIconField('edit', 'index.php?mod=beamer&action=editcontent&bcid=', t('Bearbeiten')); $ms2->AddIconField('delete', 'index.php?mod=beamer&action=askfordelete&bcid=', t('Löschen')); $ms2->PrintSearch('index.php?mod=beamer&action=content', 'bcID'); $dsp->AddSingleRow("<br/><div align=\"middle\">" . "Das Beamermodul zeigt immer den ältesten Eintrag von \"Zuletzt angezeigt\". Durch Klick auf das Icon <img src=\"design/images/icon_reset_timestamp.png\" alt=\"Set2First\" border=\"0\"> setzt man den Zeitstempel, wann das Element zuletzt angezeigt wurde, auf Null.</div>"); $dsp->AddSingleRow("<br/><div align=\"middle\">" . $dsp->FetchCssButton(t('Inhalte hinzufügen'), 'index.php?mod=beamer&action=newcontent', 'Ein neues Inhaltselement hinzufügen.' . "</div>")); $dsp->AddContent(); }
<?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');
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']); $dsp->AddDoubleRow(t('Zeitpunkt'), $func->unixstamp2date($log['date'], 'datetime')); $dsp->AddDoubleRow(t('Priorität'), $log['type']); $dsp->AddDoubleRow(t('IP'), $log['ip']); $dsp->AddDoubleRow(t('Referer'), $log['referer']); $dsp->AddDoubleRow(t('Script'), '<a href="' . $log['script'] . '">' . $log['script'] . '</a>'); $dsp->AddDoubleRow(t('Auslöser'), $dsp->FetchUserIcon($log['userid'], $log['username']));
<?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');
} 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); }
$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 $mf->AddField(t('Orginal-Text'), 'org'); $mf->AddField($dsp->FetchIcon('', 'de'), 'de', '', '', FIELD_OPTIONAL); $mf->AddField($dsp->FetchIcon('', 'en'), 'en', '', '', FIELD_OPTIONAL); $mf->AddField($dsp->FetchIcon('', 'es'), 'es', '', '', FIELD_OPTIONAL); $mf->AddField($dsp->FetchIcon('', 'nl'), 'nl', '', '', FIELD_OPTIONAL); $mf->AddField($dsp->FetchIcon('', 'fr'), 'fr', '', '', FIELD_OPTIONAL); $mf->AddField($dsp->FetchIcon('', 'it'), 'it', '', '', FIELD_OPTIONAL); $mf->SendForm('index.php?mod=install&action=translation&step=3', 'translation', 'tid', $_GET['tid']);
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'); $mf->AddField('Bezeichnung', 'caption'); $selections = array(); $selections['0'] = t('Ausblenden'); $selections['1'] = t('Optional');
$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 $dsp->NewContent(t('News verwalten'), t('Mit Hilfe des folgenden Formulars kannst du Neuigkeiten auf deiner Seite ergänzen und bearbeiten')); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); // Define the db filds, which should be written. The second argument must be a valid db field, of the table supplied to SendForm $mf->AddField(t('Überschrift (Knappe Zusammenfassung für die Startseite)'), 'caption');
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'); }
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']) { $info_line .= HTML_NEWLINE . '<a href="index.php?mod=board&action=forum&fid=&search_input[2]=' . $auth['username'] . '&order_by=LastPost&order_dir=DESC">' . t('Threads, in denen ich mitgeschrieben habe, anzeigen') . '</a>'; } $dsp->AddSingleRow($info_line);
} 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');
$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; } $buttons = ""; $buttons .= $dsp->FetchSpanButton(t('Paarungen'), "index.php?mod=tournament2&action=games&step=2&tournamentid=" . $_GET['tournamentid']);
<?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();
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');
$ms2->AddTextSearchDropDown('Typ', 'b.type', $list); */ $ms2->AddResultField(t('Titel'), 'b.caption'); $ms2->AddSelect('r.userid'); $ms2->AddSelect('b.price'); $ms2->AddSelect('b.price_payed'); $ms2->AddResultField(t('Typ'), 'b.type', 'FetchType'); $ms2->AddResultField(t('Prio.'), 'b.priority'); $ms2->AddResultField(t('Status'), 'b.state', 'FetchState'); $ms2->AddResultField(t('Reporter'), 'r.username AS reporter', 'UserNameAndIcon'); $ms2->AddResultField(t('Bearbeiter'), 'a.username AS agent'); $ms2->AddResultField(t('Antw.'), 'COUNT(c.relatedto_id) AS comments'); $ms2->AddResultField(t('Datum'), 'UNIX_TIMESTAMP(b.date) AS date', 'MS2GetDate'); $ms2->AddResultField(t('Letzte Änderung'), 'UNIX_TIMESTAMP(b.changedate) AS changedate', 'MS2GetDate'); $ms2->SetTargetPage('comments', 20); $ms2->AddIconField('details', 'index.php?mod=bugtracker&bugid=%id%&ms_page=%page%', t('Details')); if ($auth['type'] >= 2) { $ms2->AddIconField('edit', 'index.php?mod=bugtracker&action=add&bugid=', t('Editieren')); } if ($auth['type'] >= 3) { $ms2->AddIconField('delete', 'index.php?mod=bugtracker&action=delete&bugid=', t('Löschen')); } if ($auth['type'] >= 2) { foreach ($bugtracker->stati as $key => $val) { $ms2->AddMultiSelectAction(t('Status') . ' -> ' . $val, 'index.php?mod=bugtracker&state=' . $key); } $ms2->AddMultiSelectAction(t('Bearbeiter löschen'), 'index.php?mod=bugtracker&userid=0'); $res = $db->qry("SELECT userid, username FROM %prefix%user WHERE type >= 2"); while ($row = $db->fetch_array($res)) { $ms2->AddMultiSelectAction(t('Bearbeiter') . ' -> ' . $row['username'], 'index.php?mod=bugtracker&userid=' . $row['userid']); }
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'); }
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'); }