예제 #1
0
<?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');
예제 #2
0
파일: delete.php 프로젝트: eistr2n/lansuite
<?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;
    }
}
예제 #3
0
파일: show.php 프로젝트: eistr2n/lansuite
<?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;
예제 #4
0
파일: show.php 프로젝트: eistr2n/lansuite
            // 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'] . '&euro; / ' . $line['price'] . '&euro; [' . round((int) $line['price_payed'] / (int) $line['price'] * 100, 1) . '%]</span>';
    }
    return $ret;
예제 #5
0
        $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;
}
예제 #6
0
파일: log.php 프로젝트: eistr2n/lansuite
        $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;
}
예제 #7
0
 $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);
 }
예제 #8
0
파일: delete.php 프로젝트: eistr2n/lansuite
    case 2:
        // Do some checks, before calling MD
        if (CheckDeleteUser($_GET['userid'])) {
            $md->Delete('user', 'userid', $_GET['userid']);
        }
        break;
    case 10:
        $success = 1;
        // Do some checks, before calling MD
        foreach ($_POST['action'] as $key => $val) {
            if (!CheckDeleteUser($key)) {
                $success = 0;
            }
        }
        if ($success) {
            $md->MultiDelete('user', 'userid');
        }
        break;
}
/*
$userid 	= $_GET["userid"];

switch ($_GET["step"]) {
	default:
    include_once('modules/usrmgr/search.inc.php');
	break;

	case 2:
		$get_data = $db->qry_first("SELECT username FROM %prefix%user WHERE userid = %int%", $userid);
		$username = $get_data["username"];
예제 #9
0
<?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;
}
예제 #10
0
<?php

switch ($_GET['step']) {
    case 10:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->MultiDelete('comments', 'commentid');
        break;
}
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2();
$ms2->query['from'] = "%prefix%comments AS c\n  LEFT JOIN %prefix%user AS u ON u.userid = c.creatorid";
$ms2->query['default_order_by'] = 'c.date DESC';
$ms2->config['EntriesPerPage'] = 30;
$ms2->AddTextSearchField(t('Kommentar'), array('c.text' => 'like'));
$list = array('' => t('Alle'), '0' => t('System'));
$res = $db->qry('SELECT u.userid, u.username FROM %prefix%comments AS c
  LEFT JOIN %prefix%user AS u ON u.userid = c.creatorid
  GROUP BY c.creatorid');
while ($row = $db->fetch_array($res)) {
    if ($row['userid']) {
        $list[$row['userid']] = $row['username'];
    }
}
$db->free_result($res);
$ms2->AddTextSearchDropDown(t('Auslöser'), 'c.creatorid', $list);
$list = array('' => t('Alle'));
$row = $db->qry('SELECT relatedto_item FROM %prefix%comments GROUP BY relatedto_item');
while ($res = $db->fetch_array($row)) {
    if ($res['relatedto_item']) {
        $list[$res['relatedto_item']] = $res['relatedto_item'];