</script> <?php $articles = new articles(); if (!$system->checkForRight('ARTICLES-EDITOR')) { $c = '#hidden'; } $c = empty($_POST['c']) ? null : $_POST['c']; $b = empty($_POST['b']) ? null : $_POST['b']; $nb = empty($_POST['nb']) ? null : $_POST['nb']; $a = empty($_POST['a']) ? null : $_POST['a']; /****************************************************************************** * Perform deletion of articles * ******************************************************************************/ if (!empty($_POST['delete'])) { foreach ($_POST['delete'] as $id => $chk) { if ($chk && $articles->setWorkContainer($c) && $articles->deleteArticle($b, $id)) { rcms_showAdminMessage(__('Article removed') . ': ' . $c . '/' . $b . '/' . $id); } else { rcms_showAdminMessage($articles->last_error . ': ' . $c . '/' . $b . '/' . $id); } } } /****************************************************************************** * Perform changing of article * ******************************************************************************/ if (!empty($_POST['save']) && !empty($c) && (!empty($b) || $c == '#hidden' || $c == '#root') && !empty($a) && $articles->setWorkContainer($c) && ($article = $articles->getArticle($b, $a, false, true, true, false)) !== false) { $time = sql_to_unix_time($_POST['time']); if ($_POST['mode'] == 'php' && !$system->checkForRight('GENERAL')) { return rcms_showAdminMessage(__('Error occurred') . ': ' . __('You are not administrator of this site')); } if (!@$articles->saveArticle($b, $a, $_POST['title'], $_POST['source'], $_POST['keywords'], $_POST['sef_desc'], $_POST['description'], $_POST['text'], $_POST['mode'], $_POST['comments'], $time)) {