-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
81 lines (63 loc) · 2.51 KB
/
index.php
File metadata and controls
81 lines (63 loc) · 2.51 KB
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
<?php
include_once 'konfiguracija.php'; ?>
<?php
$products = $con->prepare("select * from proizvod inner join galerija on galerija.proizvod=proizvod.sifra order by RAND() limit 5;");
$products->execute();
$proizvodi = $products->fetchAll(PDO::FETCH_OBJ);
$opg = $con->prepare("select * from opg order by RAND() limit 6; ");
$opg->execute();
$maker = $opg->fetchAll(PDO::FETCH_OBJ);
//print_r($_SESSION);
?>
<!doctype html>
<html>
<head>
<?php include_once 'head.php'; ?>
</head>
<body>
<?php include_once 'navigacija.php'; ?>
<img src="<?php echo $put ?>slike/header.png" style="max-width:100%" />
<div class="row">
<h1 style="text-align:center;">Proizvodi</h1>
</div>
<div class="row slider">
<div class="col-lg-7 col-lg-offset-3 col-md-7 col-md-offset-3 col-sm-9 col-sm-offset-2 col-xs-10 col-xs-offset-2">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<?php foreach($proizvodi as $prod):?>
<div class="item <?php echo $prod->sifra;?><?php if($prod->sifra==1): echo " active"; endif;?>">
<a href="<?php echo $put;?>proizvodi/proizvod.php?p=<?php echo $prod->sifra;?>">
<img src="<?php echo $put;?>slike/proizvodi/<?php echo $prod->naslovna;?>" alt="<?php echo $prod->naziv;?>" class="img-responsive">
</a>
<p><?php echo $prod->naziv;?> </p>
</div>
<?php endforeach;?>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
<div class="row">
<h1 style="text-align:center;">Proizvođači</h1><br />
<?php foreach($maker as $mk):?>
<div class="col-lg-4 col-lg-offset-1 col-md-4 col-md-offset-1 col-sm-4 col-sm-offset-1 col-xs-10 col-xs-offset-2 pro">
<a href="user/opg.php?o=<?php echo $mk->sifra;?>" class="proizvodi">
<?php if($mk->profilna):?>
<img class="opg_slika" src="slike/opg/<?php echo $mk->profilna;?>" />
<?php else:?>
<img class="opg_slika" src="slike/opg/placeholder.png" alt="Placeholder <?php echo $mk->naziv;?>"/>
<?php endif;?>
<h2><span><?php echo $mk->naziv;?></span></h2></a>
</div>
<?php endforeach;?>
</div>
<?php include_once 'footer.php'; ?>
</body>
</html>