-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproblem_definition.php
executable file
·66 lines (55 loc) · 1.69 KB
/
problem_definition.php
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href="portal_design.css">
<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<title>Code here ;)</title>
<link rel='icon' href='IIITGLogo2.png'>
<style>
h2,h3,h4,h5,h6{
color: #000080;
}
</style>
</head>
<body>
<ul class="nav nav-tabs" >
<li class="active"><a href="index.php">Home</a></li>
<li><a href="mainpage.php">Problems</a></li>
<li><a href="contest.php">Contest</a></li>
<li><a href="submission.php">ViewSubmissions</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
<div class="container-fluid" style="max-width: 50%;margin: 3%">
<?php
require 'config.php';
if(isset($_GET['Name'])){
$query = "select location from Sample_problem where Code_id =\"".$_GET['Name']."\"";
if($result = mysqli_query($dbConn,$query))
{
$row = mysqli_fetch_array($result);
$myfile = fopen($row[0], "r") or die("Unable to open file!");
while(!feof($myfile)) {
echo "<b>".fgets($myfile) . "<br>"."</b>";
}
fclose($myfile);
?>
<a id="buttondesign" style="right: 5%;bottom: 5%" data-spy="affix" href="terminal123.php?Code_id=<?php printf($_GET['Name']) ?>">Submit Code</a>
<?php
}
else
{
printf("<h3>Sorry No Problem found...... Please check the problem name!!!!</h3>");
}
}
else
{
header("Location: ./index.php");
}
?>
</div>
</body>
</html>