当前位置: 首页>>代码示例>>PHP>>正文


PHP forum::forumExists方法代码示例

本文整理汇总了PHP中forum::forumExists方法的典型用法代码示例。如果您正苦于以下问题:PHP forum::forumExists方法的具体用法?PHP forum::forumExists怎么用?PHP forum::forumExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在forum的用法示例。


在下文中一共展示了forum::forumExists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

    $content = '
        <div id="blackfields">
	<form action="editforum.php" method="GET">
	<select name="id" class="button">';
    foreach ($forum_index->retrieveCategories($rank) as $cat) {
        foreach ($forum_index->retrieveSubForums($cat['id']) as $forum) {
            $content .= '<option value="' . $forum['id'] . '">' . $forum['title'] . '</option>';
        }
    }
    $content .= '</select>
        <input type="submit" value="Select" class="button">
	</form>
        </div>
	';
} else {
    if ($forum->forumExists($_GET['id']) || $forum->forumExists($_POST['id'])) {
        if (!isset($_POST['id'])) {
            //forum details
            $f = $database->processQuery("SELECT `icon`,`title`,`type`,`description`,`parent`,`double_posting`,`pos` FROM `forums` WHERE `id` = ? LIMIT 1", array($_GET['id']), true);
            //save time
            $type = $f[0]['type'];
            $content = '
            <form action="editforum.php" method="POST">
                <table>
                <input type="hidden" name="id" value="' . $_GET['id'] . '">
                <tr><td>Current Icon</td><td>' . $forum->getIcon($f[0]['icon']) . '</td></tr>
                <tr>
                <td>Icon <br/><b>(must re-choose)</b></td><td>
                            <input type="radio" name="icon" value="1" /> <img src="../img/forum/icons/bug.gif" width="20" height="20">
                            <input type="radio" name="icon" value="2" /> <img src="../img/forum/icons/clan.gif" width="20" height="20">
                            <input type="radio" name="icon" value="3" /> <img src="../img/forum/icons/clan_recruitment.gif" width="20" height="20">
开发者ID:Vubot,项目名称:RuneScapeCommunityScript,代码行数:31,代码来源:editforum.php

示例2: foreach

    $content = '
        <div id="blackfields">
	<form action="editforum.php" method="GET">
	<select name="id" class="button">';
    foreach ($forum_index->retrieveCategories($rank) as $cat) {
        foreach ($forum_index->retrieveSubForums($cat['id']) as $forum) {
            $content .= '<option value="' . $forum['id'] . '">' . $forum['title'] . '</option>';
        }
    }
    $content .= '</select>
        <input type="submit" value="Select" class="button">
	</form>
        </div>
	';
} else {
    if (isset($_GET['delete']) || ($forum->forumExists($_GET['id']) || $forum->forumExists($_POST['id']))) {
        if (isset($_GET['delete'])) {
            if (!isset($_GET['confirm'])) {
                $content = 'Are you sure you wish to delete this forum? All posts and threads within it will be lost. <a href="?id=' . $_GET['id'] . '&delete=1&confirm=1">Yes</a> | <a href="editforum.php">No</a>';
            } else {
                //delete the forum, threads, and posts
                $forum->deleteForum($_GET['id']);
                $content = 'The forum was successfully deleted. <a href="index.php">Home</a> | <a href="editforum.php">Edit another forum</a>';
            }
        } elseif (!isset($_POST['id'])) {
            //forum details
            $f = $database->processQuery("SELECT `icon`,`title`,`type`,`description`,`parent`,`double_posting`,`pos` FROM `forums` WHERE `id` = ? LIMIT 1", array($_GET['id']), true);
            //save time
            $type = $f[0]['type'];
            $icon = $f[0]['icon'];
            $content = '
开发者ID:Vubot,项目名称:RuneScapeCommunityScript,代码行数:31,代码来源:editforum.php


注:本文中的forum::forumExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。