You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2020. It is now read-only.
//Scince this is the Admin panel we'll make sure the user is logged in and "isAdmin" enabled boolean; If this is not a logged in user that is enabled as admin, redirect to a 404 error page
if(!$cookieValid || $isAdmin != 1) {
header('Location: /');
exit;
}
$action = $_POST["action"];
if($action == "news") {
$title = $_POST["title"];
$title = sqlesc($title);
$news = $_POST["news"];
$news = sqlesc($news);
$currentTime = time();
mysql_query("INSERT INTO news (title,message) VALUES ('$title','$news')") orsqlerr(__FILE__, __LINE__);
}
$res = mysql_query("SELECT title, message FROM news WHERE id = 1");