</div> <?php if (!isset($_GET['p']) || $_GET['p'] < $totalPages + 1) { ?> <div class="col-md-9"> <div class="row"> <?php foreach ($phoneRequest as $phone) { if (Promotion::getPromotionByPhoneId($phone->id)) { $phone->promotionPrice = $phone->price - Promotion::getPromotionByPhoneId($phone->id)->percent * 0.01 * $phone->price; } echo '<div class="col-md-4 col-sm-6 col-xs-12" style="text-align: center">'; echo '<div style="border: 1px solid #ededed; padding: 30px; margin: 20px 0;">'; echo '<a href="index.php?page=product&id=' . $phone->id . '">'; echo '<img src="' . Phone::getPhoneThumbnail($phone->id) . '" alt="' . $phone->name . '" style="width: 100px;">'; echo '<h4>' . $phone->name . '</h4>'; echo '</a>'; if (isset($phone->promotionPrice)) { echo '<span class="badge old-price" style="background-color: transparent; height: 18px; color: #777;">' . number_format($phone->price, 2, ',', ' ') . ' €</span> <span class="badge" style="background: #e74c3c;">' . $phone->promotionPrice . ' €</span>'; } else { echo '<span class="badge">' . number_format($phone->price, 2, ',', ' ') . ' €</span>'; } echo '</div>'; echo '</div>'; } ?> </div> </div> <?php } else {
<h1 style="margin-bottom: 0;"><?php echo $phone->name; ?> </h1> <span style="color: #bfbfbf; display: block; font-size: 18px;"><?php echo $brand->name; ?> </span> </div> <div class="col-md-4 col-sm-6 col-xs-12"> <a href="index.php?page=product&id=<?php echo $phone->id; ?> " style="display: inline-block; padding: 15px; border: 1px solid #ededed;"> <img id="phone_img" src="<?php echo Phone::getPhoneThumbnail($phone->id); ?> " alt="<?php echo $phone->name; ?> " style="width: 300px;"> </a> <div id="phone-colors" style="text-align: center; margin-top: 15px;"> <?php $colors = explode(',', $phone->color); foreach ($colors as $color) { $c = Color::getColorById($color); echo '<div class="color" style="width:20px; height:20px; display: inline-block; border-radius: 20px; margin-right:5px; background-color:' . $c->hex . '; border:solid 1px silver;" onmouseover="this.style.cursor=\'pointer\';" onmouseout="this.style.cursor=\'\';" value="' . $c->id . '" title="' . $c->name . '"></div>'; } ?> </div>