• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP topic函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中topic函数的典型用法代码示例。如果您正苦于以下问题:PHP topic函数的具体用法?PHP topic怎么用?PHP topic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: url

?>
c_top.gif);">&nbsp;</td>
                    <td width="21"><img alt="" src="<?php 
echo $cq2imageurl;
?>
c_righttopcorner.gif" width="20" height="15"></td>
                </tr>
                <tr>
                    <td width="20" style="background-image: url(<?php 
echo $cq2imageurl;
?>
c_left.gif);">&nbsp;</td>
                    <td width="806">

                        <?php 
topic("Resources", FALSE);
include_once "resources.php";
?>

                    </td>
                </tr>
            </table>

        </td>
        <td width="21" style="background-image: url(<?php 
echo $cq2imageurl;
?>
c_right.gif);">&nbsp;</td>
        </tr>
        <tr>
            <td width="20"><img alt="" src="<?php 
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:index.php


示例2: lang

			</dl>
		</div>
		
		<div class="content">
			<dl class="input">
				<dt>
					<?php 
echo lang('last_post');
?>
<br />
					<span><?php 
echo lang('last_post_msg');
?>
</span>
				</dt>
				<dd>
<?php 
$last = last_post(false, $user_data['id']);
if ($last['reply'] == 0) {
    echo "Topic: <a href='{$config['url_path']}/read.php?id={$last['id']}'>" . stripslashes(htmlspecialchars($last['subject'])) . "</a>";
} else {
    $topic_data = topic($last['reply']);
    echo "Posted in Topic: <a href='{$config['url_path']}/read.php?id={$topic_data['id']}'>" . stripslashes(htmlspecialchars($topic_data['subject'])) . "</a>";
}
?>
				</dd>
			</dl>
		</div>
		
		<div class="clear"></div>
	</div>
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:home.php


示例3: topic

<?php

topic("Character");
if ($acc["owner"]) {
    include_once "admin/acharacter.php";
}
if ($action == "submitchallenge") {
    $no = 0;
    if (!$chid) {
        echo 'Invalid data.<br>';
        $no = 1;
    } else {
        $sql = "SELECT * FROM challenges WHERE id = '{$chid}'";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows != 1) {
            echo 'Invalid chid.<br>';
            $no = 1;
        } else {
            $challenge = $db->fetch_array($result);
            $classname = strtolower($gdClass[$challenge["class"] - 1]["name"]);
            $sql = "SELECT count(*) FROM challengelogs WHERE challenge = '{$chid}' AND account = '{$acc['id']}'";
            $result = $db->query($sql);
            $numrows = $db->result($result, 0);
            if ($numrows != 0) {
                echo 'You have already completed that challenge.<br>';
                $no = 1;
            }
            if ($acc[$classname] < $challenge["value"]) {
                echo 'Invalid chid.<br>';
                $no = 1;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:character.php


示例4: update

/**
 * Allows updating of topics, stuck or closed, and posts
 * @global array
 * @global array
 * @param integer $id post we are editing
 * @param string $topic post subject
 * @param string $content post content
 * @param integer $reply id of topic we are replying to
 * @param boolean $sticky are we sticking it to the top?
 * @param boolean $closed are we closing it?
 * @return string|int
 */
function update($id, $topic, $content, $sticky = false, $closed = false)
{
    global $config, $user_data;
    // The time. milliseconds / seconds may change.
    $time = time();
    // Is the id numeric?
    if (!alpha($id, 'numeric')) {
        return lang_parse('error_given_not_numeric', array(lang('post') . " " . lang('id')));
    }
    // Grab the data for the update.
    $post_data = topic($id);
    // Check to see if the post or topic was found.
    if (!$post_data) {
        return lang('error_post_missing');
    }
    // Pre-Parse
    $topic = clean_input(strip_repeat($topic));
    $content = htmlentities($content);
    $content = clean_input(stripslashes($content));
    // Is the user currently logged in? If not we can't update return error.
    if ($_SESSION['logged_in']) {
        // Editing a topic not post
        if ($post_data['reply'] == 0) {
            if ($topic == "") {
                return lang_parse('error_no_given', array(lang('username')));
            }
        } else {
            if ($topic == "") {
                $topic = "re:";
            }
        }
        // Is the subject valid?
        if (!alpha($topic, 'alpha-extra')) {
            return lang_parse('error_invalid_chars', array(lang('subject')));
        }
        // Did they give us any content to work with?
        if ($content != "") {
            if (!is_string(length($content, $config['message_minimum_length'], $config['message_max_length']))) {
                // Check to see if the user is an admin and able to sticky / close the topic
                if ($_SESSION['admin'] || $_SESSION['moderator']) {
                    // Sticky
                    $sticky = $sticky ? '1' : '0';
                    // Closed
                    $closed = $closed ? '1' : '0';
                    // Admin functions
                    update_field($id, 'sticky', $sticky);
                    update_field($id, 'closed', $closed);
                }
                // Parsing
                $content = htmlspecialchars($content);
                // Update the post already inside of the database with the new data
                $result = mysql_query("UPDATE `forum` SET `subject`='{$topic}', `message`='{$content}', `updated`='{$time}', `replies`='{$replies}' WHERE id = '{$id}'") or die(mysql_error());
                // Did it work?
                if ($result) {
                    return true;
                } else {
                    return false;
                }
            } else {
                return lang_parse('error_message_length', array($config['message_max_length'], $config['message_minimum_length']));
            }
        } else {
            return lang_parse('error_no_given', array(lang('message')));
        }
    } else {
        return lang('error_not_logged');
    }
}
开发者ID:KR3W,项目名称:NinkoBB,代码行数:80,代码来源:forum.php


示例5: topic

<?php

topic("Official Castle Quest 2 Rules");
tBegin("1. Registration and multiple accounts");
echo '
	It is strictly forbidden to register more than one account per person (\'multiing\').
	This includes accounts in vacation mode.
	Violation of this rule will result in the immediate and permanent removal from the game.
	You should never, ever have more than one account in use.
	You may not use someone else\'s account.
	If you would like to remove your account from the game, please go to the options menu and select the \'kill\' option.<br><br>
	
	An account is stricly personal, and cannot be given to someone else. It is not allowed to log on to an account which is at that point still in use by another person and it is not allowed to log on to an account on which another person has ever logged on before.<br><br>
	
	
	You are not allowed to accept donations from an inactive player (\'farming\'). An inactive player is someone who does not participate in the most basic and essential activities in the game anymore (attacking, defending, providing some kind of service to the kingdom, like cursing or enchanting).<br><br>
	
	You have to kill your account when you stop playing the game. If you know an inactive person who refuses to kill his account, you are obliged to report him to the moderators.<br><br>
	
	Profiting from the illegal activity (multiing or farming) of other people or refusing to report illegal activity you are aware of is prohibited as well.
	';
tEnd();
tBegin("2. Offensive language & account names");
echo '
	You are not allowed to use offensive language against anyone.
	Accounts names including offensive words are also forbidden.
	When someone feels offended, he can report the abuse using the \'Report Abuse\' button in the \'Other Links\' section.
	';
tEnd();
tBegin("3. Illegal & Adult Things");
echo '
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:rules.php


示例6: topic

<?php

topic("Nebodar's Cave");
if ($building["name"] != "Nebodar") {
    die;
}
$sql2 = "SELECT * FROM teleport WHERE name='Nebodars Cave'";
$result2 = $db->query($sql2);
$numrows2 = $db->num_rows($result2);
if (!$action) {
    echo '
		You are standing in front of a small cave. The small entrance leads to a large, empty hall.
		In the middle of the room is a table with an old candle on it. It is covered in dust.
		The dim light of the sun reveals a closed door in the far corner of the room. It isn\'t sealed anymore - you can enter without problems.<br><br>
		
		The next room is an impressive sight indeed. This is not the home of a simple wizard; a powerful being must have lived here. The whole place is lit by a pillar in the middle of the chamber, which is still emitting light right now. You don\'t have the impression that you are standing in a cave in the middle of the wasteland: the walls are fortified, the floor is decorated with strange runes and a powerful cloud of pure magic surrounds the many beautifully crafted objects placed in the chamber. Especially the bed is an impressive sight, looking like it might have functioned as a pod used by Nebodar to regain strength. You have the feeling that the room is still alive, yet you know Nebodar has left this place many hundreds of years ago.<br><br>
		
		The following runes are written on the floor:<br><br>
		
		<div align="center"><img src="symbols.php?key=4661c97279373db5"></div><br>
		';
    if ($numrows2 == 0) {
        echo '
			<p>As you enter Nebodar you feel the beacon power inside you. Do you want to <a href="?page=Nebodar&action=beacon">place a beacon</a> here?
			';
    }
}
if ($action == "beacon" && $numrows2 == 0) {
    $sql = "INSERT INTO teleport (x, y, name, pb) VALUES (351, 41, 'Nebodars Cave', 10)";
    $result = $db->query($sql);
    $text = "A messenger from the High Council runs to your castle to hand you a letter:\r\n\t\t\t\t<p>\"{$acc['name']} has placed a beacon in Nebodars Cave. You may now use the teleportation shrine to teleport there.\"";
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:Nebodar.php


示例7: topic

    <p>Write 150 words on the given topic</p>
    
    <h3 style="color:#2eb161"><u>Topic:</u> <br>
        <input required type="radio" value='<?php 
echo topic($numbers[0]);
?>
' name="topic"><?php 
echo topic($numbers[0]);
?>
<br> 
        
        <input required type="radio" value="<?php 
echo topic($numbers[3]);
?>
" name="topic"><?php 
echo topic($numbers[3]);
?>
<br>
        <input required type="radio" value="<?php 
echo topic($numbers[8]);
?>
" name="topic"><?php 
echo topic($numbers[8]);
?>
    
    </h3>
    <textarea required id="area" name="expertAreaSample" ROWS=14 COLS=90 placeholder="Place your sample here"></textarea>
    <br><br>
    
    <button id="ansSub" type="submit"  name="one">Submit Sample</button>
</form>
开发者ID:zypher606,项目名称:WpInternal,代码行数:31,代码来源:sampleAreaExpertise.php


示例8: topic

<div id="boxwebboard" class="corner">
        <a href="webboards" class="moreright">more</a>
      	<div class="topic"><img src="<?php 
echo topic("topic_webboard.png");
?>
" width="200" height="25" /></div>
        <div class="box">
            <ul>
            	<?php 
foreach ($webboard_quizs as $webboard_quiz) {
    ?>
					<li>
						<a href="webboards/view_topic/<?php 
    echo $webboard_quiz->id;
    ?>
"><?php 
    echo $webboard_quiz->title;
    ?>
</a> <span class="TxtGray2 f11">โดย <a href="users/profile/<?php 
    echo $webboard_quiz->user->id;
    ?>
" style="color:#006699;"><?php 
    echo $webboard_quiz->user->display;
    ?>
</a> [<?php 
    echo $webboard_quiz->webboard_answer->result_count();
    ?>
/<?php 
    echo $webboard_quiz->counter;
    ?>
] </span>
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:31,代码来源:inc_index.php


示例9: topic

	<div class="topic"><img src="<?php 
echo topic("topic_prnews.png");
?>
" width="200" height="25" /></div>
	<div id="data">
		<h2><?php 
echo lang_decode($information->title);
?>
 <span class="f10 TxtGray2"><?php 
echo mysql_to_th($information->start_date);
?>
 - <?php 
echo $information->counter;
?>
 ครั้ง</span> </h2>
		<?php 
echo flash_replace(lang_decode($information->detail));
?>
		<?php 
if ($information->refer) {
    ?>
<div class="ref"><strong>ที่มา</strong> <span><?php 
    echo $information->refer;
    ?>
</span></div><?php 
}
?>
		<div class="ref"><strong>โดย </strong> <span><?php 
echo $information->user->profile->first_name == "" ? 'Administrator' : $information->user->profile->first_name . ' ' . $information->user->profile->last_name . ' ' . $information->user->profile->position;
?>
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:30,代码来源:information_view.php


示例10: print_out

                    }
                }
            } else {
                print_out(lang_parse('error_invalid_given', array(lang('id'))), lang('redirecting'));
            }
        }
    }
}
// if no forumid number is present, exit out of page
// is there a topic request?
if (isset($_GET['id'])) {
    // Is it numeric?
    if (is_numeric($_GET['id'])) {
        $id = $_GET['id'];
        // Check it
        $topic = topic(intval($id), '*');
        if ($topic) {
            // Closed & Stickied?
            if ($topic['closed']) {
                $closed = true;
            }
            if ($topic['sticky']) {
                $stuck = true;
            }
            // Quick reply
            if (isset($_POST['post'])) {
                // We can't do it anyway.
                $sticky = 0;
                $closed = 0;
                // Now for the fun part!
                $data = post(false, $_POST['qsubject'], $_POST['qcontent'], $_POST['reply'], $sticky, $closed);
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:read.php


示例11: topic

    ?>
c_righttopcorner.gif" width="20" height="15"></td>
		</tr>
		<tr>
		<td width="20" background="<?php 
    echo $cq2imageurl;
    ?>
c_left.gif">&nbsp;</td>
		<td width="132">
		<?php 
    if ($grouprow["size"] == 1) {
        $resizing = '&nbsp; <a href="index.php?page=' . $page . '&fraction=resizegroup&window=' . $grouprow["id"] . '">&laquo;</a>';
    } else {
        $resizing = '&nbsp; <a href="index.php?page=' . $page . '&fraction=resizegroup&window=' . $grouprow["id"] . '">&raquo;</a>';
    }
    topic($grouprow["name"] . $resizing, FALSE, FALSE);
    if ($grouprow["size"] == 1) {
        if (!$fraction || $frtype != $grouprow["id"]) {
            PrintFriendsList($friends, $grouprow["id"]);
        } elseif ($fraction == "addmenu") {
            PrintFriendsAddMenu($grouprow["id"]);
        } else {
            echo $froutput;
        }
    }
    ?>
		</td>
		</tr>
		</table>

		</td>
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:friends.php


示例12: topic

<?php

if (is_null($acc["x"])) {
    topic("Your Kingdom");
} else {
    topic($acc["tkdname"]);
}
// ******************
// *	Your Kingdom	*
// ******************
if ($action == "choosecoordinates") {
    echo '
		Please choose your coordinates.<br>
		It must be an empty wasteland spot close to ', $gdStartingKingdomName, '.<br>
		The further away from the central meeting point, the more expensive the spot.<br>
		';
    $coords = gFindCoords($kingdoms);
    fTitle("index.php?page=kingdom&action=submitchoosecoordinates&name={$name}&type=choosecoordinates");
    fText("X-coordinate:", "x", $coords[x], 5);
    fText("Y-coordinate:", "y", $coords[y], 5);
    fEnd("Create");
}
if ($action == "submitchoosecoordinates") {
    unset($kingdoms);
    $sql = "SELECT x, y FROM kingdoms";
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        $kingdoms[$row["x"]][$row["y"]] = TRUE;
    }
    if (!($coords = gFindCoords($kingdoms, "choose", array("x" => $x, "y" => $y)))) {
        echo 'Invalid coordinates chosen! (', $x, ',', $y, ')<br>';
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:kingdom.php


示例13: topic

<?php

topic("Castle Defense");
if ($action == "useslotconfig") {
    $no = 0;
    $sql = "SELECT count(*) FROM slotconfig WHERE account = '{$acc['id']}' AND id = '{$icid}'";
    $result = $db->query($sql);
    $numrows = $db->result($result, 0);
    if ($numrows != 1) {
        echo 'Invalid icid.<br>';
        $no = 1;
    }
    if ($acc["attacked"]) {
        echo 'You can\'t switch defense slots while you are under attack.<br>';
        $no = 1;
    }
    if ($no == 0) {
        $sql = "UPDATE summons SET type = '0' WHERE account = '{$acc['id']}' AND type = '1'";
        $result = $db->query($sql);
        $sql = "SELECT ics.creature, ics.slot, sl.class AS slotclass, sl.level AS slotlevel, {$gdCreatureSelect} FROM (slotconfigset AS ics, slots AS sl, summons AS s, creatures AS c, races AS r) LEFT JOIN accitems AS ai ON ai.account = '{$acc['id']}' AND s.item = ai.id LEFT JOIN items AS i ON ai.item = i.id WHERE s.id = ics.creature AND s.creature = c.id AND c.race = r.id AND ics.config = '{$icid}' AND ics.slot = sl.id";
        $nresult = $db->query($sql);
        while ($row = $db->fetch_array($nresult)) {
            $creature = new Creature($row);
            $level = ceil($creature->data["skill"] / gdDefenseSlotSkill);
            if ($level <= $row["slotlevel"]) {
                $sql = "UPDATE summons SET target = '{$row['slot']}', type = '1', hidden = '{$row['slotclass']}' WHERE id = '{$row['creature']}' AND account = '{$acc['id']}' AND type = '0' AND dead = '0'";
                $result = $db->query($sql);
            }
        }
        echo 'Defense slots succesfully equipped!<br>';
        unset($action);
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:defense.php


示例14: topic

<?php

topic("Report Abuse");
if (!$action) {
    fTitle("index.php?page=reportabuse&action=submitabuse");
    fText("Account name of abuser:", "name");
    fTextArea("Abuse Description:", "description");
    fEnd("Submit");
    echo '
		You can report anything abusive you encounter here.<br>
		Typical abuse can be the use of offensive language or a player with more than one account.<br>
		';
}
if ($action == "submitabuse") {
    $no = 0;
    if (!$description) {
        echo 'You have to enter a description and an account name.<br>';
        $no = 1;
    }
    $sql = "SELECT id, name FROM accounts WHERE name = '{$name}'";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'You have to enter a valid account name.<br>';
        $no = 1;
    } else {
        $row = $db->fetch_array($result);
        $name = "{$row['name']} (" . $cq2url . "index.php?page=playerinfo&action=viewinfo&aid={$row['id']}";
    }
    if ($no == 0) {
        $date = date("Y-m-d @ H:i");
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:reportabuse.php


示例15: topic

<?php

topic("{$library} curseshop");
if ($action == "newcurse") {
    echo '
		Please enter the name of the creature you want to be able to curse.<br>
		This choice is irreversible.
		';
    fTitle("index.php?page=library&action=submitnewcurse&curse={$curse}");
    fText("Creature:", "creature");
    fEnd("Learn Curse");
}
if (!$action) {
    echo '
		Welcome to my shop.<br>
		Some of the items here are too powerful for unexperienced magi, I really can\'t offer you those.<br>
		';
    if ($acc["level"] >= $gdCurseLevelMin) {
        // get curses already learned
        $sql = "SELECT s.code, s.id FROM skills AS s, accskills AS acs WHERE acs.account = '{$acc['id']}' AND acs.skill = s.id AND s.tree = 'curses'";
        $result = $db->query($sql);
        // settings
        $learnedCurses = array();
        $topProficiency = 0;
        $cursesActivated = false;
        while ($row = $db->fetch_array($result)) {
            // curses activated
            if ($row["code"] == gdsCurses) {
                $cursesActivated = TRUE;
            } elseif ($row["code"] == gdsExpert && $topProficiency < 1) {
                $topProficiency = 1;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:library.php


示例16: topic

<?php

topic("Choose Your Class", TRUE, FALSE);
if ($action == "submit") {
    $no = 0;
    // TODO
    /*if ($cheat != 2) {
          DIE();
      }*/
    if (!$name || !$email || !$password) {
        echo 'You have to fill in all the fields.<br>';
        $no = 1;
    }
    if ($password != $password2) {
        echo 'You have to repeat the same password.<br>';
        $no = 1;
    }
    if ($email != $email2) {
        echo 'You have to repeat the same e-mail address.<br>';
        $no = 1;
    }
    if (strlen($name) > 15 || strlen($password) > 15) {
        echo 'Your name or password is longer than 15 characters.<br>';
        $no = 1;
    }
    if (!ereg("^[a-zA-Z0-9_-]+\$", $name) || !ereg("^[a-zA-Z0-9_-]+\$", $password)) {
        echo 'Only letters, numbers, - and _ are allowed in your name or password.<br>';
        $no = 1;
    }
    // see if this acc was used previous age
    /*$sql = "SELECT * FROM accountsold WHERE name = '$name'";
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:nl_chooseclass.php


示例17: topic

<?php

topic("Login", TRUE, FALSE);
if ($action == "submitsetpassword") {
    $no = 0;
    if (!$passwordkey || !$password) {
        echo 'Invalid data.<br>';
        $no = 1;
    } else {
        $sql = "SELECT id, name FROM {$db_register_accounts} WHERE passwordkey = '{$passwordkey}'";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows != 1) {
            echo 'That url is outdated. Please go <a href="indexnl.php?page=nl_home&action=forgotpassword">here</a> and enter your login name again.<br>';
            $no = 1;
        } else {
            $row = $db->fetch_array($result);
        }
    }
    if ($password != $password2) {
        echo 'You have to enter the same password twice.<br>';
        $no = 1;
    }
    if (strlen($password) > 15) {
        echo 'Your password is longer than 15 characters.<br>';
        $no = 1;
    }
    if (!ereg("^[a-zA-Z0-9_-]+\$", $password)) {
        echo 'Only letters, numbers, _ and - are allowed in your password.<br>';
        $no = 1;
    }
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:nl_home.php


示例18: topic

<?php

topic("Creatures");
// ******************
// *	Creatures	*
// ******************
// remove all creatures
if ($action == "removeall") {
    $no = 0;
    if ($acc["attacked"]) {
        echo 'You can\'t remove creatures from kingdom defense while you are under attack.<br>';
        $no = 1;
    }
    if ($no == 0) {
        // get all hatcheries you are defending
        $sql = "SELECT extra, target FROM summons WHERE type = '3' AND account = '{$acc['id']}' GROUP BY target";
        $nresult = $db->query($sql);
        $removed = FALSE;
        $defending = FALSE;
        while ($row = $db->fetch_array($nresult)) {
            $defending = TRUE;
            // check if hatchery is under attack
            $sql = "SELECT id FROM kdbattles WHERE status = '1' AND target = '{$row['extra']}' AND building = '{$row['target']}'";
            $result = $db->query($sql);
            $numrows = $db->num_rows($result);
            // not under attack
            if ($numrows == 0) {
                // remove creatures
                $sql = "UPDATE summons SET type = '0' WHERE type = '3' AND target = '{$row['target']}' AND extra = '{$row['extra']}' AND account = '{$acc['id']}'";
                $result = $db->query($sql);
                $removed = TRUE;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:creatures.php


示例19: topic

<div class="topic"><img src="<?php 
echo topic("topic_sitemap.png");
?>
" width="200" height="25" alt="ข่าวประชาสัมพันธ์ ThaiGCD"/></div>
<div id="data" class="sitemap">
<?php 
foreach ($categories as $key => $category) {
    ?>
	<?php 
    if ($key == 0) {
        ?>
	<div style="float:left; width: 50%;">
	<ul>
	<?php 
    }
    ?>
	<li><a href="<?php 
    echo sitemap($category->module);
    ?>
"><?php 
    echo lang_decode($category->name);
    ?>
</a>
		<ul>
			<?php 
    foreach ($childs->where('parents = ' . $category->id)->get() as $child) {
        ?>
				<li><a href="<?php 
        echo sitemap($child->module, $child->id);
        ?>
"><?php 
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:31,代码来源:sitemap.php


示例20: lang

            $reply = 0;
            // New topic
            $title = lang('posting_new_topic');
        }
    } else {
        $reply = 0;
        // New topic
        $title = lang('posting_new_topic');
    }
} else {
    if (isset($_GET['edit'])) {
        if (alpha($_GET['edit'], 'numeric')) {
            $reply = false;
            $edit = true;
            // Get topic data
            $post = topic($_GET['edit']);
            if ($post) {
                // Title
                $title = lang('editing_post');
                // Convienent stuff.
                $subject = $post['subject'];
                $content = html_entity_decode(htmlspecialchars_decode(stripslashes($post['message'])));
                $sticky = $post['sticky'];
                $closed = $post['closed'];
                $category = $post['category'];
            } else {
                $reply = 0;
                // New topic
                $title = lang('posting_new_topic');
            }
        } else {
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:31,代码来源:message.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP topic_class函数代码示例发布时间:2022-05-23
下一篇:
PHP topage函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap