} /****************************************************************************** * 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)) { rcms_showAdminMessage($articles->last_error); } else { rcms_showAdminMessage(__('Article saved')); sleep(1); if (!empty($nb) && $nb != $b) { if (!$articles->moveArticle($b, $a, $nb)) { rcms_showAdminMessage($articles->last_error); } else { rcms_showAdminMessage(__('Article moved')); } } else { rcms_redirect(RCMS_ROOT_PATH . '?module=articles&c=' . $c . '&b=' . $b . '&a=' . $a); } } } /****************************************************************************** * Interface * ******************************************************************************/ // Show container selector $frm = new InputForm('', 'post', __('Submit')); $frm->addrow(__('Select section'), $frm->select_tag('c', $articles->getContainers(2), $c), 'top');