<?php $dsp->NewContent(t('Turnier - Pausenverwaltung'), t('Trage Startzeitpunkt und dauer der Pause ein. Lansuite wird entsprechend spätere Rundenzeiten berechnen')); switch ($_GET['step']) { // Delete case 10: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('t2_breaks', 'breakid', $_GET['breakid']); break; default: include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('tournament'); $ms2->query['from'] = '%prefix%t2_breaks'; $ms2->query['where'] = 'tournamentid = ' . (int) $_GET['tournamentid']; $ms2->AddResultField(t('Start'), 'start'); $ms2->AddResultField(t('Dauer'), 'duration'); $ms2->AddIconField('edit', 'index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'] . '&breakid=', t('Editieren')); $ms2->AddIconField('delete', 'index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'] . '&step=10&breakid=', t('Löschen')); $ms2->PrintSearch('index.php?mod=tournament2&action=breaks&tournamentid=' . (int) $_GET['tournamentid'], 'breakid'); $t = $db->qry_first('SELECT name FROM %prefix%tournament_tournaments WHERE tournamentid = %int%', $_GET['tournamentid']); $dsp->AddFieldSetStart(t('Pause für Turnier %1 festlegen', $t['name'])); include_once 'inc/classes/class_masterform.php'; $mf = new masterform(); $mf->AddFix('tournamentid', $_GET['tournamentid']); $mf->AddField(t('Pause beginnen um'), 'start'); $mf->AddField(t('Dauer der Pause (in Minuten)'), 'duration'); $mf->SendForm('', 't2_breaks', 'breakid', $_GET['breakid']); $dsp->AddFieldSetEnd(); break; }
$ms2->AddTextSearchDropDown(t('Benutzer'), 'a.userid', $list); $list = array('' => t('Alle')); $res = $db->qry('SELECT ip FROM %prefix%stats_auth GROUP BY ip ORDER BY ip'); while ($row = $db->fetch_array($res)) { if ($row['ip']) { $list[$row['ip']] = $row['ip']; } } $db->free_result($res); $ms2->AddTextSearchDropDown(t('IP'), 'a.ip', $list); $ms2->AddSelect('u.userid'); $ms2->AddResultField(t('Session-ID'), 'a.sessid'); $ms2->AddResultField(t('Benutzername'), 'u.username', 'UserNameAndIcon'); $ms2->AddResultField(t('IP'), 'a.ip'); #$ms2->AddResultField(t('Login?'), 'a.login'); $ms2->AddResultField(t('Hits'), 'a.hits'); $ms2->AddResultField(t('Visits'), 'a.visits'); #$ms2->AddResultField(t('Letzter Aufruf'), 'a.logtime', 'MS2GetDate'); $ms2->AddResultField(t('Eingeloggt'), 'a.logintime', 'MS2GetDate'); $ms2->AddResultField(t('Letzter Aufruf'), 'a.lasthit', 'MS2GetDate'); if ($auth['type'] >= 3) { $ms2->AddMultiSelectAction(t('Session beenden'), "index.php?mod=install&action=sessions&step=10", 1); } $ms2->PrintSearch('index.php?mod=install&action=sessions', 'a.sessid'); break; case 10: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->MultiDelete('stats_auth', 'sessid'); break; }
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); // Delete post if ($_GET['pid']) { $md->DeleteIfEmpty['board_threads'] = 'tid'; $md->Delete('board_posts', 'pid', $_GET['pid']); // Delete thread } elseif ($_GET['tid']) { #$md->References['board_posts'] = ''; #$md->References['board_bookmark'] = ''; $md->Delete('board_threads', 'tid', $_GET['tid']); // Delete board } else { #$md->References['board_threads'] = ''; #$md->SubReferences['board_posts'] = 'tid'; #$md->SubReferences['board_bookmark'] = 'tid'; switch ($_GET['step']) { default: include_once 'modules/board/show.php'; break; case 2: $md->Delete('board_forums', 'fid', $_GET['fid']); break; case 10: $md->MultiDelete('board_forums', 'fid'); break; } }
<?php $dsp->NewContent(t('Statistiken'), $_GET['file']); // Delete if ($_GET['delfile'] and $auth['type'] >= 3) { include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('download_stats', 'file', $_GET['delfile']); } // List if (!$_GET['file']) { include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2('news'); $ms2->query['from'] = "%prefix%download_stats AS s"; $ms2->query['default_order_by'] = 's.file'; $ms2->AddResultField(t('Datei'), 's.file'); $ms2->AddResultField(t('Downloads'), 'SUM(s.hits) AS hits'); $ms2->AddIconField('details', 'index.php?mod=downloads&action=stats&file=', t('Details')); if ($auth['type'] >= 3) { $ms2->AddIconField('delete', 'index.php?mod=downloads&action=stats&delfile=', t('Löschen')); } $ms2->PrintSearch('index.php?mod=downloads&action=stats', 's.file'); // Details } else { switch ($_GET['time']) { default: $link = 'y'; $back = ''; $group_by = '%Y-00-00-00-00-00'; $where = '0000-00-00-00-00-00'; $where_back = '';
// 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'); $mf->AddField(t('Kategorie / Icon'), 'icon', IS_PICTURE_SELECT, 'ext_inc/news_icons', FIELD_OPTIONAL); $mf->AddField(t('Text'), 'text', '', LSCODE_ALLOWED); $selections = array(); $selections['0'] = t('Normal'); $selections['1'] = t('Wichtig'); $mf->AddField(t('Priorität'), 'priority', IS_SELECTION, $selections, FIELD_OPTIONAL); // Maybe some values should not be added by the user, but set to fix values $mf->AddFix('date', time()); $mf->AddFix('poster', $auth['userid']); // Sendform: 1) Current Link; 2) Affected data base table; 3) prim key in table; 4) ID to edit, if this is empty a new record will be added to the data base if ($mf->SendForm('index.php?mod=sample&action=show', 'news', 'newsid', $_GET['newsid'])) { // Add additional actions here, that should be called, after successfully adding an entry } ### Mastercomment ### // There are only two lines needed to add a comment function to the current table include 'inc/classes/class_mastercomment.php'; // Mastercomment: 1) which module should the comment belong to? 2) Which id should the comment referr to? new Mastercomment('news', $_GET['newsid']); ### Masterdelete ### // Use this, to delete entries from the data base include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); // Will delete from the table 'news', where the fild 'newsid' is '$_GET['newsid']' // However a security question will be displayed first $md->Delete('news', 'newsid', $_GET['newsid']);
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->References['t2_teams'] = ''; $md->References['t2_teammembers'] = ''; $md->References['t2_games'] = ''; switch ($_GET['step']) { default: include_once 'modules/tournament2/search.inc.php'; break; case 2: $md->Delete('tournament_tournaments', 'tournamentid', $_GET['tournamentid']); break; case 10: $md->MultiDelete('tournament_tournaments', 'tournamentid'); break; }
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('partylist', 'partyid', $_GET['partyid']);
$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'])); $dsp->AddBackButton("index.php?mod=install&action=log", ''); $dsp->AddContent(); break; case 10: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->MultiDelete('log', 'logid'); break; }
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->References['rentuser'] = ''; $md->Delete('rentstuff', 'stuffid', $_GET['stuffid']);
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(); } }
// Comment $dsp->AddDoubleRow(t('Kommentar'), $user_data['comment'] == "" ? "" : $func->text2html($user_data['comment'])); $dsp->AddFieldsetEnd(); $plugin = new plugin('usrmgr_details_main'); while (list($caption, $inc) = $plugin->fetch()) { $dsp->AddFieldsetStart($caption); include_once $inc; $dsp->AddFieldsetEnd(); } $dsp->EndTab(); $dsp->StartTab(t('Lesezeichen'), 'details'); $dsp->AddFieldsetStart(t('In Kommentaren')); switch ($_GET['step']) { case 10: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->MultiDelete('comments_bookmark', 'bid'); break; } include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2(); $ms2->query['from'] = "%prefix%comments_bookmark AS b"; $ms2->query['where'] = 'b.userid = ' . (int) $_GET['userid']; $ms2->query['default_order_by'] = 'b.relatedto_item'; $ms2->config['EntriesPerPage'] = 20; $ms2->AddResultField(t('Modul'), 'b.relatedto_item'); $ms2->AddResultField(t('Beitrags ID'), 'b.relatedto_id'); $ms2->AddResultField(t('Internet-Mail'), 'b.email'); $ms2->AddResultField(t('System-Mail'), 'b.sysemail'); if ($auth['type'] >= 3) { $ms2->AddMultiSelectAction(t('Löschen'), 'index.php?mod=usrmgr&action=details&userid=' . $_GET['userid'] . '&step=10&tab=1', 1);
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); /* Checks which MD does not perform */ function CheckDeleteUser($userid) { global $db, $auth, $lang, $func; $get_data = $db->qry_first("SELECT username, type FROM %prefix%user WHERE userid = %int%", $userid); $get_party_data = $db->qry_first('SELECT 1 AS found FROM %prefix%party_user AS pu LEFT JOIN %prefix%partys AS p ON p.party_id = pu.party_id WHERE pu.user_id = %int% AND UNIX_TIMESTAMP(p.enddate) > UNIX_TIMESTAMP(NOW())', $userid); if ($auth["type"] == 2 and $get_data["type"] >= 2) { $func->error(t('Du hast nicht die erforderlichen Rechte, um einen Admin zu löschen'), "index.php?mod=usrmgr"); } elseif ($get_party_data["found"]) { $func->error(t('Dieser Benutzer ist noch zu einer Party angemeldet. Melden sie ihn zuerst ab'), "index.php?mod=usrmgr"); } elseif ($get_data["type"] < 0) { $func->error(t('Dieser Benutzer wurde bereits gelöscht'), "index.php?mod=usrmgr"); } elseif ($auth["userid"] == $userid) { $func->error(t('Du kannst dich nicht selbst löschen'), "index.php?mod=usrmgr"); } else { $db->qry("UPDATE %prefix%seat_seats SET status = '1', userid='0' WHERE userid = %int%", $userid); return true; } return false; } switch ($_GET['step']) { default: include_once 'modules/usrmgr/search.inc.php'; break; case 2:
<?php include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('partys', 'party_id', $_GET['party_id']);
$selections['0'] = t('Egal'); $selections['1'] = t('Nur für ausgeloggte'); $selections['2'] = t('Nur für eingeloggte'); $selections['3'] = t('Nur für Admins + Superadmins'); $selections['4'] = t('Nur für Superadmins'); $mf->AddField(t('Login benötigt'), 'login', IS_SELECTION, $selections, FIELD_OPTIONAL); $mf->AddField(t('Modul benötigt'), 'module', '', '', FIELD_OPTIONAL); $mf->AddField(t('Quelldatei'), 'source'); $mf->AddField(t('Callback'), 'callback', '', '', FIELD_OPTIONAL); $mf->SendForm('index.php?mod=boxes&step=20', 'boxes', 'boxid', $_GET['boxid']); break; // Delete // Delete case 30: include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('boxes', 'boxid', $_GET['boxid']); break; } $dsp->NewContent(t('Box-Manager'), t('Hier kannst du die Anzeige und Position der Boxen verwalten')); include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2(''); $ms2->query['from'] = "%prefix%boxes AS b"; $ms2->query['default_order_by'] = 'place ASC, pos ASC, name ASC'; $ms2->AddTextSearchDropDown(t('Internet-Modus'), 'b.internet', array('' => t('Egal'), '1' => t('Nur im Intranet-Modus'), '2' => t('Nur im Internet-Modus'))); $ms2->AddTextSearchDropDown(t('Login'), 'b.login', array('' => t('Egal'), '1' => t('Nur für ausgeloggte'), '2' => t('Nur für eingeloggte'), '3' => t('Nur für Admins + Superadminen'), '4' => t('Nur für Superadminen'))); function PlaceName($place) { if ($place == 0) { return t('Linke Seite'); } elseif ($place == 1) {
<?php 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;
} elseif ($auth['login']) { // Change state if ($_GET['state'] != '' and ($_GET['state'] == 1 or $_GET['state'] == 2 or $_GET['state'] == 7)) { $bugtracker->SetBugState($key, $_GET['state']); } } } } if ($_GET['action'] == 'delete' and $auth['type'] >= 2) { if ($_GET['bugid'] != '') { include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->Delete('bugtracker', 'bugid', $_GET['bugid']); } else { include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->MultiDelete('bugtracker', 'bugid'); } } function FetchState($state) { global $bugtracker; return $bugtracker->stati[$state]; } function FetchType($type) { global $types, $line; $ret = $types[$type]; if ($line['price']) { $ret .= '<br /><span style="white-space:nowrap;">' . (int) $line['price_payed'] . '€ / ' . $line['price'] . '€ [' . round((int) $line['price_payed'] / (int) $line['price'] * 100, 1) . '%]</span>'; }
<?php if ($_POST['action']) { foreach ($_POST['action'] as $key => $val) { switch ($_GET['mode']) { case 'del': include_once 'inc/classes/class_masterdelete.php'; $md = new masterdelete(); $md->MultiDelete('board_posts', 'pid'); break; case 'ban': echo $item . "b" . HTML_NEWLINE; break; } } } else { include_once 'modules/mastersearch2/class_mastersearch2.php'; $ms2 = new mastersearch2(); $ms2->query['from'] = "%prefix%board_posts AS p\n LEFT JOIN %prefix%user AS u ON p.userid = u.userid\n LEFT JOIN %prefix%board_threads AS t ON p.tid = t.tid\n LEFT JOIN %prefix%board_forums AS f ON t.fid = f.fid\n "; $ms2->query['where'] = 'f.need_type <= ' . (int) ($auth['type'] + 1); $ms2->query['default_order_by'] = 'LastPost DESC'; $ms2->AddTextSearchField(t('Forum'), array('f.name' => 'like')); $ms2->AddTextSearchField(t('Titel'), array('t.caption' => 'like')); $ms2->AddTextSearchField(t('Text'), array('p.comment' => 'fulltext')); $ms2->AddTextSearchField(t('Autor'), array('u.username' => '1337', 'u.name' => 'like', 'u.firstname' => 'like')); $ms2->AddSelect('p.userid'); $ms2->AddSelect('f.fid'); $ms2->AddSelect('MAX(p.date) AS LastPost'); $ms2->AddResultField(t('Text'), 'CONCAT(\'<b>\', f.name, \'</b> (\', t.caption, \')<br />\', p.comment) AS ThreadName', '', 140); $ms2->AddResultField(t('Autor'), 'u.username', 'UserNameAndIcon'); $ms2->AddResultField(t('IP'), 'INET_NTOA(p.ip) AS ip');
<?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'];