S2OJ/web/app/controllers/paste_view.php
2022-03-17 12:00:03 +08:00

17 lines
345 B
PHP

<?php
if (!Auth::check()) {
becomeMsgPage(UOJLocale::get('need login'));
}
$paste_id = $_GET['rand_str_id'];
$paste = DB::selectFirst("select * from pastes where `index` = '".DB::escape($paste_id)."'");
if (!$paste) {
become404Page();
}
$REQUIRE_LIB['shjs'] = "";
echoUOJPageHeader("Paste!");
echoPasteContent($paste);
echoUOJPageFooter();