-
Notifications
You must be signed in to change notification settings - Fork 0
/
papers_front.php
43 lines (33 loc) · 1.17 KB
/
papers_front.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
<?php
require_once("configuration.php");
if (!isset($_SESSION["LOGIN_USER"]))
{
header('Location: http://' . $_SERVER['SERVER_NAME'] . '/subscription_block');
exit;
}
include("includes/header.php");
?>
<div class="container">
<div class="row">
<?php
$dataquery = "SELECT brandCode, brandName, logoIMG FROM paper_brands ORDER BY brandName ASC";
$dataresult = $dataconnection->query($dataquery);
if ($dataresult->num_rows > 0)
{
while($papbrand = $dataresult->fetch_assoc())
{
$paperResult = $dataconnection->query("SELECT * FROM papers WHERE paperBrand = '" . $papbrand["brandCode"] . "' ORDER BY paperPublished DESC LIMIT 1");
$paperData = $paperResult->fetch_assoc();
echo '<div class="col-lg-2 col-md-4 col-xs-6 thumb">
<a class="thumbnail" href="/paper/' . $paperData["paperBrand"] . '">
<img class="img-responsive" style="height: 180px;" src="http://www.e-pages.dk/' . $paperData["paperBrand"] . '/' . $paperData["paperID"] . '/pic/tm1.jpg" onerror="imageError(this);" alt="">
</a>
</div>';
}
}
?>
</div>
</div>
<?php
include("includes/footer.php");
?>