-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompile.php
More file actions
51 lines (49 loc) · 788 Bytes
/
compile.php
File metadata and controls
51 lines (49 loc) · 788 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
if(session_status()==PHP_SESSION_NONE)
{
session_start();
if(!isset($_SESSION['username']))
{
header("Location: index.php");
exit;
}
}
?>
<?php
$S_ID=session_id();
$languageID=$_POST["lang"];
error_reporting(0);
$runcode=0;
$val=$_POST["extra"];
if($val=="subb")
{
$runcode=0;
}
else
{
$runcode=1;
}
if ($languageID=="c")
{
include("compilers/c.php");
}
else if($languageID=="cpp")
{
include("compilers/cpp.php");
}
else if($languageID=="py2")
{
include("compilers/py2.php");
}
else if($languageID=="py3")
{
include("compilers/py3.php");
}
else if($languageID=="java")
include("compilers/java.php");
else
{
header("Location: titles.php");
exit;
}
?>