-
Notifications
You must be signed in to change notification settings - Fork 1
/
import.php
41 lines (36 loc) · 1.24 KB
/
import.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
<?php
$string = file_get_contents("dbs.json");
$json_a = json_decode($string, true);
//if (!isset($_COOKIE["selected_db"])) {
// setcookie("selected_db", "1");
//}
?>
<div class="row">
<div class="col-md-6 highlight">
<div style="margin:20px;">
<h4>Available Databases</h4>
<div class="list-group">
<?php
foreach ($json_a as $key => $value) {
if (isset($_COOKIE["selected_db"]) && $_COOKIE["selected_db"] == $value["id"]) {
?>
<a href="#" data-id="<?php echo $value["id"]; ?>" class="list-group-item active db-link"><?php echo $value["name"]; ?></a>
<?php
} else {
?>
<a href="#" data-id="<?php echo $value["id"]; ?>" class="list-group-item db-link"><?php echo $value["name"]; ?></a>
<?php
}
}
?>
</div>
<br>
<h4>Import New Database</h4>
<span class="btn btn-default btn-file">
Browse <input type="file">
</span>
</div>
</div>
<div class="col-md-4">
</div>
</div>