-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (26 loc) · 1014 Bytes
/
index.php
File metadata and controls
31 lines (26 loc) · 1014 Bytes
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
<?php
declare(strict_types=1);
require_once __DIR__.'/header.inc.php';
authenticate('basic');
BootSome::document(TITLE,'da');
head();
BootSome::$body->at(['onload'=>"FancyFilter.set_option('path','".__ROOT__."/');"],true);
navbar();
$container = BootSome::$body->container(false);
$sql = "SELECT `id`,`text` FROM `collection` ORDER BY `id` DESC";
$query = $mysqli->query($sql);
while($rs = $query->fetch_object()) {
$card = $container->card();
$card->header('primary')->te($rs->text);
$body = $card->body();
$sql = "SELECT `id`,`name` FROM `collection_file` WHERE `collection_id`='$rs->id' ORDER BY `id`";
$query_file = $mysqli->query($sql);
if($query_file->num_rows) {
$row = $body->row_gutter('g-3');
while($rs_file = $query_file->fetch_object()) {
$col = $row->col('col-lg-3');
$a = $col->a(__ROOT__.'/mo_collection/file.php?download&file_id='.$rs_file->id);
$a->img(__ROOT__.'/mo_collection/file.php?file_id='.$rs_file->id,$rs_file->name)->at(['class'=>'rounded img-fluid']);
}
}
}