예제 #1
0
        } else {
            error($lang->phrase('goboardpw_wrong_password'));
        }
    } else {
        $slog->updatelogged();
        $db->close();
        viscacha_header('Location: showforum.php?id=' . $board . SID2URL_JS_x);
        exit;
    }
} elseif ($_GET['action'] == "download_code") {
    if (strlen($_GET['fid']) != 32) {
        error($lang->phrase('query_string_error'));
    }
    $scache->loadClass('UniversalCodeCache');
    $cache = new UniversalCodeCache();
    if (!$cache->setHash($_GET['fid'])) {
        error($lang->phrase('no_upload_found'));
    }
    $sourcecode = $cache->get();
    $slog->updatelogged();
    $db->close();
    viscacha_header('Content-Type: text/plain');
    viscacha_header('Content-Length: ' . strlen($sourcecode['source']));
    viscacha_header('Content-Disposition: attachment; filename="' . gmdate('d-m-Y_H-i', times()) . '.txt"');
    echo $sourcecode['source'];
    exit;
} elseif ($_GET['action'] == "report_post" || $_GET['action'] == "report_post2") {
    ($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null;
    $result = $db->query("SELECT r.id, r.report, r.topic_id, r.tstart, r.topic AS title, t.topic, t.status, t.board, t.prefix FROM {$db->pre}replies AS r LEFT JOIN {$db->pre}topics AS t ON r.topic_id = t.id WHERE r.id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__);
    $info = $gpc->prepare($db->fetch_assoc($result));
    $my->p = $slog->Permissions($info['board']);
예제 #2
0
            error($lang->phrase('goboardpw_wrong_password'));
        }
    } else {
        $slog->updatelogged();
        $db->close();
        sendStatusCode(307, $config['furl'] . '/showforum.php?id=' . $board . SID2URL_JS_x);
        exit;
    }
} elseif ($_GET['action'] == "download_code") {
    $fid = $gpc->get('fid', str);
    if (!is_hash($fid)) {
        error($lang->phrase('query_string_error'));
    }
    $scache->loadClass('UniversalCodeCache');
    $cache = new UniversalCodeCache();
    if (!$cache->setHash($fid)) {
        error($lang->phrase('no_upload_found'));
    }
    $sourcecode = $cache->get();
    $slog->updatelogged();
    $db->close();
    viscacha_header('Content-Type: text/plain');
    viscacha_header('Content-Length: ' . strlen($sourcecode['source']));
    viscacha_header('Content-Disposition: attachment; filename="' . gmdate('d-m-Y_H-i', times()) . '.txt"');
    echo $sourcecode['source'];
    exit;
} elseif ($_GET['action'] == "report_post" || $_GET['action'] == "report_post2") {
    ($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null;
    $result = $db->query("SELECT r.id, r.report, r.topic_id, r.tstart, r.topic AS title, t.topic, t.status, t.board, t.prefix FROM {$db->pre}replies AS r LEFT JOIN {$db->pre}topics AS t ON r.topic_id = t.id WHERE r.id = '{$_GET['id']}' LIMIT 1");
    $info = $gpc->prepare($db->fetch_assoc($result));
    $my->p = $slog->Permissions($info['board']);