forked from ahampriyanshu/vaachaal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewque.php
117 lines (117 loc) · 3.12 KB
/
viewque.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
<?php session_start(); ?>
<?php
if(!isset($_SESSION['loggedin'])){
header('location:index.php');}
?>
<?php
include("header.php");
include("essentials/database.php");
?>
<!DOCTYPE html>
<html>
<link href="forum.css" rel="stylesheet" type="text/css">
<head>
<meta charset="UTF-8">
<meta name="description" content="GNDEC GATE FORUM">
<meta name="keywords" content="gate,priyanshumay,gne,gndec,">
<meta name="author" content="PriyanshuMay,priyanshumay">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Question</title>
</head>
<style type="text/css">
body{
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.question_box {
background: #f1f1f1;
border: 2px solid #e2e2e2;
box-shadow: 0 0 5px #888;
border-radius: 5px;
width: 70%;
padding: 40px;
position: relative;
bottom: initial;
margin: auto;
overflow-y: hidden;
}
#title{
line-height: 1.5;
color: #333;
tab-size: 4;
word-break: break-word;
text-align: left;
direction: ltr;
user-select: text;
font-size: 25px;
font-family: Courier new ;
}
#anstitle{
line-height: 1.5;
color: black;
tab-size: 4;
word-break: break-word;
text-align: left;
direction: ltr;
user-select: text;
font-size: 15px;
font-family: Courier new ;
}
#specs{
font-size:12px;
font-family: courier new ;
font-weight: bold;
color: #833AB4;
}
#line{
border: 1px solid red;
border-radius: 2px;
}
#details{
font-weight: bold;
color: red;
font-size:12px;
}
#answer_button {
position:relative;
left: 40%;
background-color:#833AB4;
color: white;
padding-bottom: 3px;
padding: 11px;
font-size: 11px;
border: none;
font-weight: bold;
cursor: pointer;
font-weight: bold;
font-family:'Trebuchet MS', sans-serif;
border-radius: 5%;
}
#answer_button:hover, #answer_button:focus {
background-color: #DB4437;
}
</style>
<body background="img/back.jpg">
<?php
$USR = $_SESSION['loggedin'];
$sql = "SELECT * FROM questions WHERE username = '$USR' ORDER BY datetym DESC ";
$result = $con->query($sql);
if ($result->num_rows > 0)
while($row = $result->fetch_assoc()) :?>
<div class="question_box" style="padding-left: 30px;">
<span id="title"><?php echo $row["content"]; ?></span><br><hr id="line"><br>
<span id="specs">time alloted is</span> <span id="details"><?php echo $row["tym"]; ?></span>  
<span id="specs">difficulty level estimated is</span> <span id="details"><?php echo $row["level"]; ?></span>  
<span id="specs">question comes under</span> <span id="details"><?php echo $row["branch"]; ?></span><span id="specs"> branch</span> 
<span id="specs">posted on</span> <span id="details"><?php echo $row["datetym"]; ?></span><br>
<form method="post" action="delquebyuser.php"><br>
<input type="submit" id="answer_button" value="Delete Question"/>
<input type="hidden" name="id" value="<?php echo $row['id']; ?>"/>
</form>
</div><br><br>
<?php
endwhile;
?>
</body>
</html>