-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrewfront.php
184 lines (169 loc) · 5.73 KB
/
crewfront.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE html>
<?php
include_once 'con.php';
include('session.php');
//include('crewfrontmod.php');
if(!isset($_SESSION['login_user'])){
header("location: index.php"); // Redirecting To Home Page
}
//las time activity on session and destroy session
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1440)) {
// last request was more than 30 minutes ago
session_unset(); // unset $_SESSION variable for the run-time
session_destroy(); // destroy session data in storage
//header("location: index.php");
}
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp
//Regenerate session id
if (!isset($_SESSION['CREATED'])) {
$_SESSION['CREATED'] = time();
} else if (time() - $_SESSION['CREATED'] > 1440) {
// session started more than 30 minutes ago
session_regenerate_id(true); // change session ID for the current session and invalidate old session ID
$_SESSION['CREATED'] = time(); // update creation time
}
?>
<head>
<meta charset="utf-8">
<title>GPB Survey from the Sky</title>
<!--<link rel="stylesheet" type="text/css" href="bootstrap.css">-->
<link rel="stylesheet" type="text/css" href="../css/stylesuav5.css">
<link rel="stylesheet" type="text/css" href="../css/stylesuav2.css">
<link rel="stylesheet" type="text/css" href="../css/stylesheet6.css">
<link rel="icon" href="img/picture1.png" type="image/png" sizes="any">
<link rel="script" type="javascript" href="photo.js">
</head>
<body>
<!-- Primer encabezado -->
<div class="row" id="container1">
<div class="col-2 head1" id="izq">
<img src="img/gpblogo2.svg" id="logo2">
</div>
<div class="col-8 head2" id="titulo">
<h1>Survey From The Sky</h1>
</div>
<div class="col-2 head2" id="der">
<img src="img/surveylogo.svg" id="survey">
</div>
</div>
<!-- Nav bar -->
<div class="row" id="container2">
<div class="col-2" id="vacio">
</div>
<div class="col-8" id="navegador">
<ul class="men1">
<li><a href="">RAV</a>
<ul class="smen1">
<li><a href="pdf/RAV_5.pdf">Rav 5</a></li>
<li><a href="pdf/RAV_21.pdf">Rav 21</a></li>
<li><a href="pdf/RAV_39.pdf">Rav 39</a></li>
<li><a href="pdf/RAV_45.pdf">Rav 45</a></li>
<li><a href="pdf/RAV_47.pdf">Rav 47</a></li>
<li><a href="pdf/RAV_60.pdf">Rav 60</a></li>
<li><a href="pdf/RAV_67.pdf">Rav 67</a></li>
<li><a href="pdf/RAV_91.pdf">Rav 91</a></li>
<li><a href="pdf/RAV_130.pdf">Rav 130</a></li>
<li><a href="pdf/RAV_145.pdf">Rav 145</a></li>
<li><a href="pdf/RAV_273.pdf">Rav 273</a></li>
<li><a href="pdf/RAV_281.pdf">Rav 281</a></li>
</ul>
</li>
<li><a href="">Emergency Numbers</a>
<ul class="smen1">
<li><a href="pdf/RAV_5.pdf">ATC</a></li>
</ul>
</li>
</ul>
</div>
<div class="col-2" id="lgt">
<section class="row">
<section class="col-6 logt">
<p><a class="logta" href="menu1.php"><img src="img/home.svg" class="out"> Home</a></p>
</section>
<section class="col-6 logt">
<p><a class="logta" href="logout.php"><img src="img/lgt.svg" class="out"> Logout</a></p>
</section>
</section>
</div>
</div>
<!-- Cuerpo principal -->
<div class="row" id="container3">
<div class="col-2" id="menup">
<div class="row" id=ipers>
<img id="pers">
</div>
<div class="row" id="u">
<p id="user"><?php echo $login_session; ?></p>
</div>
<div class="row" id="m">
<ul class="mn2">
<li>
<a href="flights.php">Flights</a>
</li>
<li>
<a href="">Maintenance</a>
</li>
<li>
<a href="">Inventory</a>
<ul class="smen2">
<li><a href="uav.php">UAV</a></li>
<li><a href="batteries.php">Batteries</a></li>
<li><a href="motors.php">Motors</a></li>
<li><a href="servos.php">Servos</a></li>
<li><a href="payloads.php">Payloads</a></li>
<li><a href="consummables.php">Consumables</a></li>
<li><a href="equipment.php">Equipment</a></li>
<li><a href="vehicles.php">Vehicles</a></li>
<li><a href="locations.php">Locations</a></li>
</ul>
</li>
<li>
<a href="crewfront.php">Crew</a>
</li>
<li>
<a href="reports.php">Reports</a>
</li>
<li>
<a href="incidents.php">Incidents</a>
</li>
</ul>
</div>
</div>
<div class="col-10" id="form1">
<div class="col-11 borsupe" id="flights">
<div class="topr"> </div>
<div class="topr">
<p>CREW</p>
</div>
<div class="topr right">
<a href="crewinclude.php" class="include">Add New Crew +</a>
</div>
</div>
<div class="col-11 formcontainer" id="">
<div>
<table class="query">
<?php
$sqlsent="SELECT * FROM crew;";
$result1=mysqli_query($conn, $sqlsent);
$result1check = mysqli_num_rows($result1);
if ($result1check > 0)
{
echo "<tr class='tabheader'><th>Item</th><th>Dni</th><th>First Name</th><th>Last Name</th></tr>";
while ($row = mysqli_fetch_assoc($result1))
{
echo "<tr class='tabd'><td>".$row['crew_id']."</td><td>".$row['dni']."</td><td>".$row['first_name']."</td><td>".$row['first_surname']."</td><td><form action='crewfrontmod.php' method='post'><input type='text'name='view1' value='".$row['crew_id']."' class='hi'><input type='submit'name=submit value='view'></form></td></tr>";
}
}
else
{
echo "did not find matches";
}
mysqli_close($conn);
?>
</table>
</div>
</div>
</div>
</div>
<script src="photo.js" ></script>
</body>