www
/
wwwroot
/
magazinmiorita.be
/
admin
➕ New
📤 Upload
✎ Editing:
add_news.php
← Back
<?php include('../includes/inc.config.php'); include('check_session.php'); if(isset($_POST['add'])){ $type = 'news'; $title = htmlentities($_POST['title'], ENT_QUOTES); $content = htmlentities($_POST['text'], ENT_QUOTES); $status = $_POST['status']; $pub = $_POST['pub']; $add_news = $database->execute("INSERT INTO `news` (`title`, `description`, `indate`, `status`, `pub`) VALUES ('$title', '$content', '".time()."', '$status', '$pub')"); if($add_news){ header('Location: news.php?m=ok'); exit; }else{ $smarty->assign("type", 'err'); $smarty->assign("message", 'news can not be created! Please check and try again.'); } } $smarty->display(END_PATH.'add_news.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