-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
114 lines (95 loc) · 2.77 KB
/
home.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
<?php
include("class/users.php");
$email=$_SESSION['email'];
$profile=new users;
$profile->users_profile($email);
$profile->cat_shows();
//print_r($profile->cat);
//print_r($profile->data);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<img src="motivational-wallpaper-18.jpg">
<style>
img{
opacity: 80%;
width: 100%;
z-index:-1;
position: absolute;
}
</style>
<div class="container">
<h2>Online Quiz in php</h2>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#home">Home</a></li>
<li><a data-toggle="tab" href="#menu1">Profile</a></li>
<li style="float:right"><a data-toggle="tab" href="#menu3">Logout</a></li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<h3>HOME</h3>
<center><button type="button" class="btn btn-primary" data-toggle="tab" href="#select" >Start Quiz</button></center>
<div class="col-sm-4"></div>
<div class="col-sm-4"><br>
<div id="select" class="tab-pane fade">
<form method="post" action="qus_show.php">
<select class="form-control" id="" name="cat">
<option>select category</option>
<?php
foreach($profile->cat as $category)
{ ?>
<option value="<?php echo $category['id'];?>"><?php echo $category['cat_name'];?></option>
<?php }?>
</select><br>
<center><input type="submit" value="submit" class="btn btn-primary" /></center>
</form>
</div>
</div>
<div class="col-sm-4"></div>
</div>
<div id="menu1" class="tab-pane fade">
<h3>Showing profile</h3>
<table class="table">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>email</th>
<th>image</th>
</tr>
</thead>
<tbody>
<?php
foreach($profile->data as $prof)
{?>
<tr>
<td><?php echo $prof['id'];?></td>
<td><?php echo $prof['name'];?></td>
<td><?php echo $prof['email'];?></td>
<td><img src="img/<?php echo $prof['img']; ?>" alt="" width="35px" height="30px" /></td>
</tr>
</tbody>
<?php }?>
</table>
</div>
<div id="menu3" class="tab-pane fade">
<h3>SEE YOU!!</h3>
<form role="form" action="log.php" method="post">
<div class="form-group">
<button type="Submit" class="btn btn-default">LOGOUT</button>
</form>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>