-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowsource2.php
More file actions
29 lines (28 loc) · 1 KB
/
showsource2.php
File metadata and controls
29 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
if ($ok==true){
$brush=strtolower($language_name[$slanguage]);
if ($brush=='pascal') $brush='delphi';
if ($brush=='obj-c') $brush='c';
if ($brush=='python3') $brush='python';
if ($brush=='clang') $brush='c';
if ($brush=='clang++') $brush='c++';
if ($brush=='freebasic') $brush='vb';
if ($brush=='swift') $brush='csharp';
echo "<pre class=\"brush:".$brush.";\">";
ob_start();
echo "/**************************************************************\n";
//echo "\tProblem: $sproblem_id\n\tUser: $suser_id\n";
echo "\tProblem: $sproblem_id\n\tUser: $suser_id [$nick] \n";
echo "\tLanguage: ".$language_name[$slanguage]."\n\tResult: ".$judge_result[$sresult]."\n";
if ($sresult==4){
echo "\tTime:".$stime." ms\n";
echo "\tMemory:".$smemory." kb\n";
}
echo "****************************************************************/\n\n";
$auth=ob_get_contents();
ob_end_clean();
echo htmlentities(str_replace("\n\r","\n",$view_source),ENT_QUOTES,"utf-8")."\n".$auth."</pre>";
}else{
echo "I am sorry, You could not view this code!";
}
?>