|
|
|
@ -5,7 +5,8 @@ function admin_news() {
|
|
|
|
|
|
|
|
|
|
if (! isset($_GET["action"])) {
|
|
|
|
|
redirect(page_link_to("news"));
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$html = '<div class="col-md-12"><h1>' . _("Edit news entry") . '</h1>' . msg();
|
|
|
|
|
if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) {
|
|
|
|
|
$news_id = $_REQUEST['id'];
|
|
|
|
@ -14,7 +15,9 @@ function admin_news() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$news = sql_select("SELECT * FROM `News` WHERE `ID`='" . sql_escape($news_id) . "' LIMIT 1");
|
|
|
|
|
if (count($news) > 0) {
|
|
|
|
|
if (empty($news)) {
|
|
|
|
|
return error("No News found.", true);
|
|
|
|
|
}
|
|
|
|
|
switch ($_REQUEST["action"]) {
|
|
|
|
|
default:
|
|
|
|
|
redirect(page_link_to('news'));
|
|
|
|
@ -59,10 +62,6 @@ function admin_news() {
|
|
|
|
|
redirect(page_link_to("news"));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return error("No News found.", true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $html . '</div>';
|
|
|
|
|
}
|
|
|
|
|
?>
|