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