-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.php
47 lines (43 loc) · 958 Bytes
/
load.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
<?php
session_start();
error_reporting(0);
if($_SESSION["doctor_login"] == 2 && $_SESSION["patient_login"] == 1)
{
echo "<script> alert('Bad Bad Boy');
location = '404.php';
</script>";
}
require 'connect.php';
include 'security.php';
$caseid = $_SESSION["temp3"];
$hid = $_SESSION["temp"];
$prefix = "eye_";
$final_str = $prefix.$hid;
$database_casesheet = $client->$final_str;
$collection = $database_casesheet->$caseid;
$cursor = $collection->find();
$a = $_SESSION["temp2"];
if($a == 100)
{
$a = 0;
}
$array = iterator_to_array($cursor);
?>
<table class="table table-striped table-dark">
<thead>
<tr>
<?php
foreach ($array[$a] as $key => $value) { ?>
<th scope="col"> <?php echo $key; ?> </th>
<?php } ?>
</tr>
</thead>
<tbody>
<tr>
<?php
foreach ($array[$a] as $key => $value) { ?>
<td><?php echo decrypt($value); ?></td>
<?php } ?>
</tr>
</tbody>
</table>