-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimages.php
60 lines (53 loc) · 1.5 KB
/
images.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
<?php require_once dirname(__FILE__).'/include/header.php'; ?>
<?php require_once dirname(__FILE__).'/include/api.php'; ?>
<?php require_once dirname(__FILE__).'/include/navbar.php'; ?>
<?php require_once dirname(__FILE__).'/include/model/ModelVideo.php'; ?>
<?php
if (isset($_GET['u']))
{
$username = $_GET['u'];
}
else
{
$username = $_SESSION['username'];
}
$api = new Api;
$responseImages = $api->getImages($username);
if (!$responseImages->error)
{
$imageCard = array();
$imageArary = $responseImages->Images;
foreach ($imageArary as $imageList)
{
$imageCardHTML = <<<HERE
<div class="col s6 m3 l3">
<div class="card">
<div class="card-image">
<img src="$imageList->feedImage" class="responsive-img" alt="">
</div>
</div>
</div>
HERE;;
array_push($imageCard,$imageCardHTML);
}
}
else
{
echo $responseImages->message;
}
?>
<div class="socialcodia">
<div class="row">
<?php
if (!$responseImages->error)
{
foreach ($imageCard as $image)
{
echo $image;
}
}
?>
</div>
</div>
<?php require_once dirname(__FILE__).'/include/sidenav.php'; ?>
<?php require_once dirname(__FILE__).'/include/footer.php'; ?>