<?php # Require files require_once '../vendor/autoload.php'; require_once '../generated-conf/config.php'; require_once '../app/functions/functions.php'; # Add topic (if applicable) if (isset($_GET['add_topic'])) { addTopic($_GET['topic_parent_id'], $_GET['topic_name']); } # Add topic adoptee (if applicable) if (isset($_GET['add_topic_adoptee'])) { addTopicAdoptee($_GET['topic_parent_id'], $_GET['topic_adoptee_id']); } # Move topic (if applicable) if (isset($_GET['move_topic'])) { moveTopic($_GET['topic_id'], $_GET['topic_parent_id']); } # Rename topic (if applicable) if (isset($_GET['rename_topic'])) { renameTopic($_GET['topic_id'], $_GET['topic_name']); } # Delete topic (if applicable) if (isset($_GET['delete_topic'])) { deleteTopic($_GET['topic_id']); } # Get topics select options $topics_select_options = getTopicsSelectOptions($_GET['topic_parent_id']); echo <<<s <html> <head></head>
redirect_header('index.php?op=newarticle', 1, _AMS_AM_DBUPDATED); exit; } else { $story = new AmsStory($storyid); echo "<h4>" . _AMS_AM_CONFIG . "</h4>"; xoops_confirm(array('op' => 'delete', 'storyid' => $storyid, 'ok' => 1), 'index.php', _AMS_AM_RUSUREDEL . '<br />' . $story->title()); } break; case "default": default: case "topicsmanager": adminmenu(1); topicsmanager(); break; case "addTopic": addTopic(); break; case "delTopic": delTopic(); break; case "modTopicS": modTopicS(); break; case "edit": include "../submit.php"; break; case "delaudience": if ($_GET['audienceid'] == 1) { redirect_header('index.php?op=audience', 2, _AMS_AM_CANNOTDELETEDEFAULTAUDIENCE); } $audience_handler =& xoops_getmodulehandler('audience', 'AMS');
<?php require_once Config::$path['model'] . 'Forum.class.php'; require_once Config::$path['model'] . 'addTopic.php'; if (isset($_POST['creerTopic']) && isset($_POST['nom']) && isset($_POST['com'])) { addTopic($_POST['nom'], $_POST['com'], $_GET['id']); header('Location : index.php?page=aForum&id=' . $_GET['id']); } require_once Config::$path['views'] . 'addTopic.php';
<?php /* 处理发帖 */ error_reporting(0); header('Content-Type:text/html;charset=utf-8'); require_once '../conn/topic.dao.php'; $msg = ""; if (isset($_SESSION["current_user"])) { $current_user = $_SESSION["current_user"]; $uId = $current_user["uId"]; $boardId = $_POST["boardId"]; $title = $_POST["title"]; $content = $_POST["content"]; //发表帖子 $rs = addTopic($title, $content, $uId, $boardId); } else { $msg = "用户未登录,请登录后再来发帖子!"; } if ($msg != "") { die(header("location:../error.php?msg={$msg}")); } else { header("location:../list.php?boardId={$boardId}¤tPage=0"); } ?>
<? # Require files require_once '../vendor/autoload.php'; require_once '../generated-conf/config.php'; require_once '../app/functions/functions.php'; if (isset($_GET['action'])) { if (isset($_GET['add_topic'])) { addTopic($_GET['topic_id'], $_GET['topic_name']); } if ($_GET['action'] == 'add_lesson') { $lesson_id = addLesson($_GET['lesson_title'], $_GET['lesson_parent_id']); if ($_GET['topic_id']) { addTopicLesson($_GET['topic_id'], $lesson_id); } } // Add topic tag if (isset($_GET['add_topic_tag'])) { addTopicTag($_GET['topic']['id'], $_GET['reference_string']); } // Add lesson tag if ($_GET['action'] == 'add_lesson_tag') { addLessonTag($_GET['lesson_id'], $_GET['reference_string']);