$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1; //Ok..lets roll...create the actual query $query = "{$sql} ORDER BY {$order_by}"; $res = db_query($query); if ($res && ($num = db_num_rows($res))) { $showing = "Showing {$num} help topics"; } else { $showing = 'No help topic found!'; } // Get the full names and filter for this page $topics = array(); while ($row = db_fetch_array($res)) { $topics[] = $row; } foreach ($topics as &$t) { $t['name'] = Topic::getTopicName($t['topic_id']); } if ($cfg->getTopicSortMode() == 'a') { usort($topics, function ($a, $b) { return strcmp($a['name'], $b['name']); }); } ?> <div style="width:700px;padding-top:5px; float:left;"> <h2>Help Topics</h2> </div> <div style="float:right;text-align:right;padding-top:5px;padding-right:5px;"> <b><a href="helptopics.php?a=add" class="Icon newHelpTopic">Add New Help Topic</a></b></div> <div class="clear"></div> <form action="helptopics.php" method="POST" name="topics"> <?php
<?php include "common.php"; include_once "class.Poll.php"; $topic = new Topic(file_get_contents("db/Topics/" . $_GET['topicId'] . "/topic.dat")); outHtml1($topic->getTopicName()); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <script type="text/javascript"> function addQuote(row) { var str = document.getElementById("tbl").rows[row].cells[2].innerHTML; if (str.lastIndexOf("<div class=") == -1) { str = str.substring(str.indexOf("Quote</a")+9); } else { str = str.substring(str.indexOf("Quote</a")+9,str.lastIndexOf("<div class=")); } return "<blockquote class='quote'><span style='font-size: 12px; font-weight: bold;'>Quote: "+ document.getElementById("tbl").rows[row].cells[0].firstChild.innerHTML +"</span><hr />"+ str +"</blockquote>"; } </script> <?php outHtml2($_SESSION['forum']->getForumName(), "viewTopics.php?forumId=" . $_SESSION['forum']->getForumId()); if ($_SESSION['loggedIn'] == true) { if ($_SESSION['user']->getLevel() > 1) {
if ($value[0][1] == 0 && $value[1][1] == 0) { echo '<div class="h8 centered">' . Global_07 . '</div>'; } else { showPie($value); } break; case 'topTen': // die besten 10 antworten $questions = 0; $questions = getQuestions($t_id); if (count($questions) == 0) { echo '<div class="h8 centered">' . Global_07 . "</div>"; } else { $topics->setTopicID($t_id); $topics->setTopic($t_id); $Topic = $topics->getTopicName(); echo "<br /><h2> " . Statistic_01 . " " . stripslashes($Topic) . "<br /></h2>"; getTopTenCorrect($questions); } break; case 'flopTen': // die 10 schlechtest beantworteten Fragen $questions = 0; $questions = getQuestions($t_id); if (count($questions) == 0) { echo '<div class="h8 centered">' . Global_07 . "</div>"; } else { $topics->setTopicID($t_id); $topics->setTopic($t_id); $Topic = $topics->getTopicName(); echo "<br /><h2> " . Statistic_02 . " " . stripslashes($Topic) . "<br /></h2>";
$questionArray = array(); reallyDelTopic($t_id); if ($_REQUEST['submit'] == Global_13) { $topics->setTopicID($t_id); $topics->delTopic(); echo " <meta http-equiv='refresh' content='0; url=?site=topic' />"; } else { if ($_REQUEST['submit'] == Global_14) { echo " <meta http-equiv='refresh' content='0; url=?site=topic' />"; } } break; case 'getQuestions': // Fragen zum Thema anzeigen $topics->setTopic($t_id); echo "<br /><h2> " . Topic_03 . " " . stripslashes($topics->getTopicName()) . "<br /></h2>"; $question->setTopic($t_id); $question->setAllQuestions(); $question->showQuestionTable(); break; case 'delQuestion': // Löschen einer Frage reallyDelQuestion($q_id, $t_id); if ($_REQUEST['submit'] == Global_13) { $answer->delAnswers($q_id); $question->delQuestion($q_id); echo " <meta http-equiv='refresh' content='0; url=?{$site}' />"; } else { if ($_REQUEST['submit'] == Global_14) { echo " <meta http-equiv='refresh' content='0; url=?{$site}' />"; }
include "common.php"; $topic = new Topic(file_get_contents("db/Topics/" . $_GET['topicId'] . "/topic.dat")); outHtml1("Edit Topic"); ?> <?php outHtml2("Edit Topic:", "viewTopics.php?forumId=" . $topic->getForumId()); ?> <form action="editTopicExecute.php?topicId=<?php echo htmlentities($_GET['topicId']) . "&forumId=" . $topic->getForumId(); ?> " method="post"> <div id="topicDiv"> Topic Name:<br /> <input type="text" name="name" id="name" value="<?php echo $topic->getTopicName(); ?> " /><br /> <input type="submit" value="Update" /> <?php if ($_GET['error'] == 1) { echo "<div class='error'>Please enter a topic name!</div>"; } ?> </div> </form> <?php outHtml3();