-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshowcode.php
executable file
·121 lines (70 loc) · 1.87 KB
/
showcode.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
session_start();
$_SESSION['url'] = $_SERVER['REQUEST_URI'];
if(!isset($_SESSION["un"]))
{
header("Location:login.php");
}
if(isset($_SESSION['un']))
{
$username=$_SESSION['un'];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Home</title>
<?php include 'linkers.php';?>
<style>
code {
background-color: #EEEEEE;
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
white-space: pre;
}
pre {
background-color: #EEEEEE;
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
margin-bottom: 10px;
max-height: 600px;
overflow: auto;
padding: 5px;
width: auto;
white-space: pre;
}
</style>
</head>
<body>
<div class="main">
<?php require 'nav2.php'; ?>
<
<div class="upore">
<div class="">
<h3 style="text-align:center;">Show Code</h3>
</div>
</div>
<div class="container upore ">
<div class="col-sm-10 autto upore">
<?php
require_once("config.php");
if(isset($_GET['nm']))
{
$data=$_GET['nm'];
$get=$_GET['id'];
}
$show="SELECT * FROM codes WHERE id='$get'";
$sq=mysqli_query($con,$show);
echo "Submitted By : $data<br><br>";
while($row=mysqli_fetch_array($sq))
{
echo("Submit Id: $row[id]<br><br><textarea id='div' class=\"form-control rb\" rows=\"30\" cols=\"40\">$row[source_code]</textarea>");
}
?>
</div>
</div>
</div>
</div><br><br><br>
<?php require 'footer.php'; ?>
</body>
</html>