} ?> </ul> </div> </div> <div class="row"> <div class="h3"></div> <div class="left col-md-6"> <h3 class="h3">От блога</h3> <?php $select_last_article = "SELECT * FROM articles WHERE date_deleteed IS NULL ORDER BY id_article DESC LIMIT 1"; $query_last_article = mysqli_query($connect, $select_last_article) or die(mysqli_error()); $row_last_article = mysqli_fetch_assoc($query_last_article); echo '<h3><a href="blog.php?category=' . $row_last_article['id_category'] . '&article=' . $row_last_article['id_article'] . '">' . $row_last_article['title_article'] . '</a></h3>'; echo shorter($row_last_article['text_article'], 1500); ?> <p><a type="button" class="btn btn-primary btn-xs" class="btn btn-primary btn-lg active" role="button" href="blog.php?category=<?php echo $row_last_article['id_category']; ?> &article=<?php echo $row_last_article['id_article']; ?> ">Прочети повече</a></p> </div> <div class="left col-md-6"> <h3 class="h3">Последни продукти</h3> <?php $select_last_added_product = "SELECT * FROM products WHERE content_photo IS NOT NULL AND date_deleted IS NULL ORDER BY id DESC LIMIT 6";
echo '<div class="h3">Рецепти</div>'; while ($r = mysqli_fetch_assoc($query_search)) { ?> <a class="rp" href="recipies.php?recipie=<?php echo $r['id_food_type']; ?> &view=<?php echo $r['recp']; ?> "> <div class="rowps"> <table> <tr> <td><h4><?php echo shorter($r['name'], 40); ?> </h4></td> </tr> <tr> <td> <div class="hidps"> <?php if ($r['rcp']) { echo '<img height="250" src="data:image/jpeg;base64,' . base64_encode($r['rcp']) . '"/> '; } else { ?> <img width="250" src="images/default-placeholder.png" /> <?php } ?>
?> <a class="rp" href="recipies.php?recipie=<?php echo $row['rp_id_ft']; ?> &view=<?php echo $row['rp_id']; ?> "> <div class="rowps"> <table> <tr> <td><h4><?php echo shorter($row['rp_name'], 40); ?> </h4></td> </tr> <tr> <td> <div class="hidps"> <?php if ($row['rp_cp']) { echo '<img title="' . $row['rp_name'] . '" height="250" src="data:image/jpeg;base64,' . base64_encode($row['rp_cp']) . '"/> '; } else { ?> <img title="<?php echo $row['rp_name']; ?> " width="250" src="images/default-placeholder.png" />
while ($r = mysqli_fetch_assoc($sql_article)) { ?> <div class="categories_article"> <h3><a href="?category=<?php echo $_GET['category']; ?> &article=<?php echo $r['id_article']; ?> "><?php echo $r['title_article']; ?> </a></h3> <?php echo shorter($r['text_article'], 150); ?> </div> <?php } } else { echo 'Вижте другите категории'; } } //echo '<div style="clear: both;"></div>'; // опит за изкарване на статия if (isset($_GET['article'])) { $article_id = $_GET['article']; $select_one_article = "SELECT * FROM articles WHERE id_article = '{$article_id}'";