S2OJ/web/app/controllers/paste_view.php

17 lines
345 B
PHP
Raw Normal View History

2020-08-05 16:24:34 +00:00
<?php
2022-03-17 04:00:03 +00:00
if (!Auth::check()) {
becomeMsgPage(UOJLocale::get('need login'));
}
2020-08-05 16:24:34 +00:00
$paste_id = $_GET['rand_str_id'];
$paste = DB::selectFirst("select * from pastes where `index` = '".DB::escape($paste_id)."'");
2020-08-13 17:29:26 +00:00
if (!$paste) {
become404Page();
}
2020-08-05 16:24:34 +00:00
$REQUIRE_LIB['shjs'] = "";
echoUOJPageHeader("Paste!");
echoPasteContent($paste);
2022-03-17 04:00:03 +00:00
echoUOJPageFooter();