www
/
wwwroot
/
magazinmiorita.be
/
admin
➕ New
📤 Upload
✎ Editing:
blogs.php
← Back
<?php include('../includes/inc.config.php'); include('check_session.php'); $blogs_results = array(); $blogs = $database->execute(" SELECT * FROM `blogs` "); while($row = $database->fetch($blogs)){ $blogs_results[] = $row; } if(isset($_GET['action']) && $_GET['action'] == 'delete'){ $delete_blog = $database->execute("delete from blogs where id = '".$_GET['id']."'"); if($delete_blog){ $get_thumb = $database->execute("SELECT * FROM `blogs` WHERE `id` = '".$_GET['id']."'"); while($row = $database->fetch($get_thumb)){ $old_thumb = $row['image']; } unlink('../'.$old_thumb); header('Location: blogs.php?m=dok'); exit; } } if(isset($_GET['m']) && $_GET['m'] == 'dok'){ $smarty->assign("type", 'succ'); $smarty->assign("message", 'Article deleted successfully!'); } if(isset($_GET['m']) && $_GET['m'] == 'ok'){ $smarty->assign("type", 'succ'); $smarty->assign("message", 'Article added successfully!'); } $smarty->assign("blogs", $blogs_results); $smarty->display(END_PATH.'blogs.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