www
/
wwwroot
/
magazinmiorita.be
/
admin
➕ New
📤 Upload
✎ Editing:
promotions.php
← Back
<?php include('../includes/inc.config.php'); include('check_session.php'); $add_promo_results = array(); $add_promo = $database->execute(" SELECT * FROM `promotions` "); while($row = $database->fetch($add_promo)){ $add_promo_results[] = $row; } if(isset($_GET['action']) && $_GET['action'] == 'delete'){ $delete_promo = $database->execute("delete from promotions where id = '".$_GET['id']."'"); if($delete_promo){ header('Location: promotions.php?m=dok'); exit; } } if(isset($_GET['action']) && $_GET['action'] == 'week'){ $update_promo = $database->execute("update promotions set `week_promo` = '0'"); $set_promo = $database->execute("update promotions set `week_promo` = '1' where id = '".$_GET['id']."'"); if($set_promo){ header('Location: promotions.php?m=dok'); exit; } } if(isset($_GET['m']) && $_GET['m'] == 'dok'){ $smarty->assign("type", 'succ'); $smarty->assign("message", 'Promotion deleted successfully!'); } if(isset($_GET['m']) && $_GET['m'] == 'ok'){ $smarty->assign("type", 'succ'); $smarty->assign("message", 'Promotions added successfully!'); } $smarty->assign("promotions", $add_promo_results); $smarty->display(END_PATH.'promotions.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