require_once 'yrms/class/vietsubmanga_class.php'; require_once 'yrms/class/database_class.php'; require_once 'yrms/class/forumpost_class.php'; require_once 'yrms/class/award_class.php'; require_once 'yrms/include/function.php'; $manga = new Manga(); if (!$manga->load(getParam('mangaid'))) { print_no_permission(); } if (!$manga->checkOwner()) { print_no_permission(); } $pageTitle = $vbphrase['yrms_edit']; $messagetype = "info"; $message = $vbphrase['yrms_inputtip']; $inputData = $manga->getData(); //unset($inputData['vbphrase']); //unset($inputData['db']); //unset($inputData['vbulletin']); //print_pre($inputData); if (isPost()) { $inputData = getPost(); $error = findInputError($inputData); if (!$error) { $manga->setData($inputData); if ($inputData['posturl']) { $threadId = extract_threadid_from_url($inputData['posturl']); $threadInfo = fetch_threadinfo($threadId); if ($threadInfo['forumid'] == $manga->getForumId()) { $manga->setThreadId($threadInfo['threadid'])->setPostId($threadInfo['firstpostid'])->setPosterId($threadInfo['postuserid']); } elseif ($threadInfo['forumid'] == $manga->getOnlineForumId()) {