added news

This commit is contained in:
Tóth Richárd
2019-07-30 13:38:51 +02:00
parent 0e414de243
commit 27522d0053
16 changed files with 610 additions and 147 deletions

View File

@@ -568,6 +568,21 @@ if (isset($_POST['action'])) {
log::register('update_training_template', $_POST['tt_id']);
header('Location: /admin/training_templates/'.$_POST['tt_id']);
break;
case 'news_create':
# új hír
unset($_POST['action']);
$new_news_id = news::create_news($_POST);
log::register('new_news', $new_news_id);
header('Location: /admin/news/'.$new_news_id);
break;
case 'news_update':
unset($_POST['action']);
$n_id = $_POST['n_id'];
unset($_POST['n_id']);
news::update_news($_POST, $n_id);
log::register('update_news', $n_id);
header('Location: /admin/news/'.$n_id);
break;
default:
# code...
break;