示例#1
0
文件: index.php 项目: nouphet/rata
     if (!$xoopsGTicket->check(true, 'bulletin_admin')) {
         redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
     }
     $BTopic = new BulletinTopic($mydirname, $_POST['topic_id']);
     if (empty($BTopic)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }
     if (empty($BTopic->topic_id)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }
     if ($_POST['topic_pid'] == $_POST['topic_id']) {
         echo "ERROR: Cannot select this topic for parent topic!";
         exit;
         // TODO check parent tree or not
     }
     $BTopic->setTopicPid($_POST['topic_pid']);
     if (empty($_POST['topic_title'])) {
         redirect_header("index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME);
     }
     $BTopic->setTopicTitle($_POST['topic_title']);
     $BTopic->setTopicImgurl(@$_POST['topic_imgurl']);
     $BTopic->store();
     redirect_header('index.php?op=topicsmanager', 1, _AM_DBUPDATED);
     break;
 case 'convert':
     xoops_cp_header();
     include dirname(__FILE__) . '/mymenu.php';
     if (empty($_POST['ok'])) {
         xoops_confirm(array('op' => 'convert', 'ok' => 1), 'index.php', _AM_DO_YOU_CONVERT);
     } else {
         // Topic Convert