本文整理汇总了PHP中Topic::getTopicName方法的典型用法代码示例。如果您正苦于以下问题:PHP Topic::getTopicName方法的具体用法?PHP Topic::getTopicName怎么用?PHP Topic::getTopicName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Topic
的用法示例。
在下文中一共展示了Topic::getTopicName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_numeric
$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
示例2: Topic
<?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) {
示例3: showPie
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>";
示例4: array
$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}' />";
}
示例5: htmlentities
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();