-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask_7.php
126 lines (124 loc) · 6.25 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!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">
<?php
/* $peoples = [
[
'image' => 'img/demo/authors/sunny.png',
'image_alt' => 'Sunny A.',
'name' => 'Sunny A. (UI/UX Expert)',
'job_title' => 'Lead Author',
'twitter_link_href' => 'https://twitter.com/@myplaneticket',
'twitter_text' => '@myplaneticket',
'email_link_href' => 'https://wrapbootstrap.com/user/myorange',
'email_link_text' => '<i class="fal fa-envelope"></i>',
'email_link_title' => 'Contact Sunny',
'status' => 'active'
],
[
'image' => 'img/demo/authors/josh.png',
'image_alt' => 'Jos K.',
'name' => 'Jos K. (ASP.NET Developer)',
'job_title' => 'Partner & Contributor',
'twitter_link_href' => 'https://twitter.com/@atlantez',
'twitter_text' => '@atlantez',
'email_link_href' => 'https://wrapbootstrap.com/user/Walapa',
'email_link_text' => '<i class="fal fa-envelope"></i>',
'email_link_title' => 'Contact Jos',
'status' => 'active'
],
[
'image' => 'img/demo/authors/jovanni.png',
'image_alt' => 'Jovanni Lo',
'name' => 'Jovanni L. (PHP Developer)',
'job_title' => 'Partner & Contributor',
'twitter_link_href' => 'https://twitter.com/@lodev09',
'twitter_text' => '@lodev09',
'email_link_href' => 'https://wrapbootstrap.com/user/lodev09',
'email_link_text' => '<i class="fal fa-envelope"></i>',
'email_link_title' => 'Contact Jovanni',
'status' => 'banned'
],
[
'image' => 'img/demo/authors/roberto.png',
'image_alt' => 'Jovanni Lo',
'name' => 'Roberto R. (Rails Developer)',
'job_title' => 'Partner & Contributor',
'twitter_link_href' => 'https://twitter.com/@sildur',
'twitter_text' => '@sildur',
'email_link_href' => 'https://wrapbootstrap.com/user/sildur',
'email_link_text' => '<i class="fal fa-envelope"></i>',
'email_link_title' => 'Contact Roberto',
'status' => 'banned'
],
]
*/
$pdo = new PDO("mysql:host=localhost;dbname=first", "root","root");
$sql = "SELECT * FROM teams";
$statment = $pdo ->prepare($sql);
$statment->execute();
$peoples = $statment ->fetchAll(PDO::FETCH_ASSOC);
?>
</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">
<?php foreach ($peoples as $people): ?>
<div class="<?php echo $people['status'] == 'banned' ? '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="<?php echo $people['image'];?>" alt="<?php echo $people['image_ait'];?>" class="img-thumbnail img-responsive rounded-circle" style="width:5rem; height: 5rem;">
<div class="ml-2 mr-3">
<h5 class="m-0">
<?php echo $people['name'];?>
<small class="m-0 fw-300">
<?php echo $people['job_title'];?>
</small>
</h5>
<a href="<?php echo $people['twitter_link_href'];?>" class="text-info fs-sm" target="_blank"><?php echo $people['twitter_text'];?></a> -
<a href="<?php echo $people['email_link_href'];?>" class="text-info fs-sm" target="_blank" title="<?php echo $people['email_link_title'];?>"><?php echo $people['email_link_text'];?></a>
</div>
</div>
<?php endforeach;?>
</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>