-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_7.php
111 lines (100 loc) · 5.34 KB
/
task_7.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
Подготовительные задания к курсу
</title>
<meta name="description" content="Chartist.html">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, minimal-ui">
<link id="vendorsbundle" rel="stylesheet" media="screen, print" href="css/vendors.bundle.css">
<link id="appbundle" rel="stylesheet" media="screen, print" href="css/app.bundle.css">
<link id="myskin" rel="stylesheet" media="screen, print" href="css/skins/skin-master.css">
<link rel="stylesheet" media="screen, print" href="css/statistics/chartist/chartist.css">
<link rel="stylesheet" media="screen, print" href="css/miscellaneous/lightgallery/lightgallery.bundle.css">
<link rel="stylesheet" media="screen, print" href="css/fa-solid.css">
<link rel="stylesheet" media="screen, print" href="css/fa-brands.css">
<link rel="stylesheet" media="screen, print" href="css/fa-regular.css">
</head>
<body class="mod-bg-1 mod-nav-link ">
<main id="js-page-content" role="main" class="page-content">
<div class="col-md-6">
<div id="panel-1" class="panel">
<div class="panel-hdr">
<h2>
Задание
</h2>
<div class="panel-toolbar">
<button class="btn btn-panel waves-effect waves-themed" data-action="panel-collapse" data-toggle="tooltip" data-offset="0,10" data-original-title="Collapse"></button>
<button class="btn btn-panel waves-effect waves-themed" data-action="panel-fullscreen" data-toggle="tooltip" data-offset="0,10" data-original-title="Fullscreen"></button>
</div>
</div>
<div class="panel-container show">
<div class="panel-content">
<div class="d-flex flex-wrap demo demo-h-spacing mt-3 mb-3">
<?
/*
CREATE TABLE `persons_task_7` (
`id` INT(11) auto_increment primary key,
`name` varchar(50),
`surname` varchar(50),
`short` varchar(50),
`photo` varchar(50),
`skill` varchar(50),
`role` varchar(50),
`twitter` varchar(50),
`wrapbootstrap` varchar(50),
`active` int(1)
)
INSERT INTO `persons_task_7` (`id`, `name`, `surname`, `short`, `photo`, `skill`, `role`, `twitter`, `wrapbootstrap`, `active`) VALUES
(1, 'Sunny', '', 'A.', 'sunny.png', 'UI/UX Expert', 'Lead Author', '@myplaneticket', 'myorange', 1),
(2, 'Jos', '', 'K.', 'josh.png', 'ASP.NET Developer', 'Partner & Contributor', '@atlantez', 'Walapa', 1),
(3, 'Jovanni', 'Lo', 'L.', 'jovanni.png', 'PHP Developer', 'Partner & Contributor', '@lodev09', 'lodev09', 0),
(4, 'Roberto', '', 'R.', 'roberto.png', 'Rails Developer', 'Partner & Contributor', '@sildur', 'sildur', 0);
*/
$host = 'localhost';
$base = 'marlin_lessons';
$user = 'root';
$pass = '';
$sql = 'SELECT * FROM persons_task_7 ORDER BY id';
$dbh = new PDO('mysql:host='.$host.';dbname='.$base.';', $user, $pass);
$sth = $dbh->prepare($sql);
$sth->execute();
$persons = $sth->fetchAll(PDO::FETCH_ASSOC);
foreach ($persons as $man) {
if (!$man['surname'])
$man['surname'] = $man['short'];
?>
<div class="<?= ($man['active'] != true) ? 'banned ' : '' ?>rounded-pill bg-white shadow-sm p-2 border-faded mr-3 d-flex flex-row align-items-center justify-content-center flex-shrink-0">
<img src="img/demo/authors/<?=$man['photo']?>" alt="<?=$man['name']?> <?=$man['surname']?>" class="img-thumbnail img-responsive rounded-circle" style="width:5rem; height: 5rem;">
<div class="ml-2 mr-3">
<h5 class="m-0">
<?=$man['name']?> <?=$man['short']?> (<?=$man['skill']?>)
<small class="m-0 fw-300">
<?=$man['role']."\n"?>
</small>
</h5>
<a href="https://twitter.com/<?=$man['twitter']?>" class="text-info fs-sm" target="_blank"><?=$man['twitter']?></a> -
<a href="https://wrapbootstrap.com/user/<?=$man['wrapbootstrap']?>" class="text-info fs-sm" target="_blank" title="Contact <?=$man['name']?>"><i class="fal fa-envelope"></i></a>
</div>
</div>
<?
}
?>
</div>
</div>
</div>
</div>
</div>
</main>
<script src="js/vendors.bundle.js"></script>
<script src="js/app.bundle.js"></script>
<script>
// default list filter
initApp.listFilter($('#js_default_list'), $('#js_default_list_filter'));
// custom response message
initApp.listFilter($('#js-list-msg'), $('#js-list-msg-filter'));
</script>
</body>
</html>