-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathadmin-panel.php
123 lines (89 loc) · 4.12 KB
/
admin-panel.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
122
123
<!DOCTYPE html>
<?php
// php select option value from database
$hostname = "localhost";
$username = "root";
$password = "";
$databaseName = "loginsystem";
// connect to mysql database
$connect = mysqli_connect($hostname, $username, $password, $databaseName);
// mysql select query
$query = "SELECT * FROM `Trainer`";
// for method 1
$result1 = mysqli_query($connect, $query);
?>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
<div class="jumbotron" style="border-radius:0;background:url('images/3.jpg');background-size:cover;height:400px;"></div>
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="list-group">
<a href="" class="list-group-item active"
>Members</a>
<a href="trainer_details.php" class="list-group-item">Member details</a>
<a href="package.php" class="list-group-item">Package details</a>
<a href="payment.php" class="list-group-item">Payments</a>
</div>
<hr>
<div class="list-group">
<a href="trainer.php" class="list-group-item active">Trainer</a>
<a href="trainer.php" class="list-group-item active">Trainer details</a>
<a href="trainer.php" class="list-group-item active">Add new Trainer</a>
</div>
</div>
<div class="col-md-8">
<div class="card">
<div class="card-body" style="background-color:#3498DB;color:FFFFFF;">
<h3>Register new members</h3>
</div>
<div class="card-body"></div>
<form class="form-group" action="func.php" method="post">
<label>first name:</label>
<input type="text" name="fname" class="form-control"><br>
<label>last name:</label>
<input type="text" name="lname" class="form-control"><br>
<label>email</label>
<input type="text" name="email" class="form-control"><br>
<label>Member ID</label>
<input type="text" name="contact" class="form-control"><br>
<label>Trainer </label>
<select class="form-control" name="docapp">
<?php while($row1 = mysqli_fetch_array($result1)):;?>
<option value="<?php echo $row1[0];?>"><?php echo $row1[1];?></option>
<?php endwhile;?>
</select>
<br>
<input type="submit" class="btn btn-primary" name="pat_submit" value="Register"> <a href="func.php" class="btn btn-light"></a>
</form>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
<header>
<nav>
<div class="main-wrapper">
<div class="nav-login">
<?php
if (isset($_SESSION['u_id'])) {
echo '<form action="includes/index.php" method="POST">
<button type="submit" name="submit">logout</button>
</form>';
} else{
echo '<form action="includes/index.php" method="POST">
</form>
<a href="index.php" class="btn btn-light" style="background-color:#3498DB;color:FFFFFF">Logout</a>';
}
?>
</div>
</div>
</nav>
</header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
</body>
</html>