www
/
wwwroot
/
magazinmiorita.be
➕ New
📤 Upload
✎ Editing:
blog.php
← Back
<?php ob_start(); include('includes/inc.config.php'); include('header.php'); $limit = $data->settings('records'); $page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]); $startpoint = ($page * $limit) - $limit; $url = '?page='; if(isset($_POST['search']) || $_SESSION['search']){ $_SESSION['search'] = $_POST['search']; $search = $_SESSION['search']; $statement = "`blogs` WHERE title like '%".$search."%' or text like '%".$search."%' and `status` = '1' "; $blog_results = array(); $blog = $database->execute(" SELECT * FROM `blogs` where title like '%".$search."%' or text like '%".$search."%' and status='1' ORDER BY id DESC LIMIT {$startpoint} , {$limit} "); while($row = $database->fetch($blog)){ $row['com_count'] = ROOT_URL.'/article.php?id='.$row['id']; $blog_results[] = $row; } $blog_arhive = array(); $arhive = $database->execute(" SELECT * FROM `blogs` where status='1' order by id desc limit 20 "); while($rows = $database->fetch($arhive)){ $rows['com_count'] = ROOT_URL.'/article.php?id='.$rows['id']; $blog_arhive[] = $rows; } }else{ $statement = "`blogs` WHERE `status` = '1' "; $blog_results = array(); $blog = $database->execute(" SELECT * FROM `blogs` where status='1' ORDER BY id DESC LIMIT {$startpoint} , {$limit} "); while($row = $database->fetch($blog)){ $row['com_count'] = ROOT_URL.'/article.php?id='.$row['id']; $blog_results[] = $row; } $blog_arhive = array(); $arhive = $database->execute(" SELECT * FROM `blogs` where status='1' order by id desc limit 20 "); while($rows = $database->fetch($arhive)){ $rows['com_count'] = ROOT_URL.'/article.php?id='.$rows['id']; $blog_arhive[] = $rows; } } $smarty->assign("pagination", $data->pagination($statement,$limit,$page,$url)); $smarty->assign("blog_arhive", $blog_arhive); $smarty->assign("blogs", $blog_results); $smarty->display('blog.tpl'); ?>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel