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


PHP block_begin函数代码示例

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


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

示例1: comment_form

function comment_form()
{
    global $comment, $id, $cid;
    block_begin(NEW_COMMENT);
    $comment = str_replace('\\r\\n', "\n", $comment);
    ?>
    <center>
    <form enctype='multipart/form-data' name='comment' method='post'>
    <input type='hidden' name='info_hash' value='<?php 
    echo $id;
    ?>
' />
    <table class='lista' border='0' cellpadding='10'>
    <tr>
    <tr><td align='left' class='header'><?php 
    echo USER_NAME;
    ?>
:</td><td class='lista' align='left'><input name='user' type='text'  value='<?php 
    echo security::html_safe($_GET["usern"]);
    ?>
' size='20' maxlength='100' disabled; readonly></td></tr>
    <tr><td align='left' class='header'><?php 
    echo COMMENT_1;
    ?>
:</td><td class='lista' align='left'><?php 
    textbbcode("comment", "comment", security::html_safe(unesc($comment)));
    ?>
</td></tr>
    <tr><td class='header' colspan='2' align='center'><input type='submit' name='confirm' value='<?php 
    echo FRM_CONFIRM;
    ?>
' />&nbsp;&nbsp;&nbsp;<input type='submit' name='confirm' value='<?php 
    echo FRM_PREVIEW;
    ?>
' /></td></tr>
    </table>
    </form>
    </center>
    
    <?php 
    block_end();
}
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:42,代码来源:comment.php

示例2: _torrenttable

function _torrenttable($res, $frame_caption, $speed = "false")
{
    global $db;
    block_begin($frame_caption, 'center');
    begin_table();
    $num = 0;
    while ($a = $res->fetch_assoc()) {
        ++$num;
        if ($a["leechers"] > 0) {
            $r = (int) $a["seeds"] / (int) $a["leechers"];
            $ratio = number_format($r, 2);
        } else {
            $ratio = INFINITE;
        }
        if (!isset($menu)) {
            $menu = "";
        }
        if ($menu != "1") {
            echo "<tr>" . "<table width='100%' class='lista'>" . "<td class='header' align='center'>" . USER_LEVEL . "</td>" . "<td class='header'>" . FILE . "</td>";
            if ($speed != "true") {
                echo "<td class='header' align='center'>" . FINISHED . "</td>" . "<td class='header' align='center'>" . SEEDERS . "</td>" . "<td class='header' align='center'>" . LEECHERS . "</td>" . "<td class='header' align='center'>" . PEERS . "</td>" . "<td class='header' align='center'>" . RATIO . "</td>";
            } else {
                echo "<td class='header' align='right'>" . SPEED . "</td>";
            }
            echo "</tr>";
            $menu = 1;
        }
        print "<tr><td class='lista' align='center'>" . $num . "</td><td class='lista' align='left'>";
        print "<a href='" . "details.php?id=" . $a['hash'] . "'>" . "<b>";
        print security::html_safe($a["name"]) . "</b></a></td>";
        if ($speed != "true") {
            print "<td class='lista' align='center' width='10%' ><a href='torrent_history.php?id=" . $a["hash"] . "'>" . number_format((int) $a["finished"]) . "</a></td><td class='lista' align='center' width='10%' ><a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"] + (int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%'>" . $ratio . "</td>\n";
        } else {
            print "<td class='lista' align='center'>" . misc::makesize((int) $a["speed"]) . "/s" . "\n";
        }
    }
    end_table();
    block_end();
}
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:39,代码来源:extra-stats.php

示例3: block_begin

//   1. Redistributions of source code must retain the above copyright notice,
//      this list of conditions and the following disclaimer.
//   2. Redistributions in binary form must reproduce the above copyright notice,
//      this list of conditions and the following disclaimer in the documentation
//      and/or other materials provided with the distribution.
//   3. The name of the author may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
block_begin("Donate");
?>
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
<tr>
  <td align="center" valign="top">
  <img src="images/makedonation.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
  </td>
</tr>
</table>
<?php 
block_end();
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:paypal_block.php

示例4: block_begin

<?php

/*
* BtiTracker v1.5.q is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
$clocktype = $GLOBALS["clocktype"];
require_once "addons/clock/clock.php";
block_begin("Clock", 1, "center");
clock_display($clocktype);
block_end();
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:13,代码来源:clock_block.php

示例5: block_begin

////////////////////////////////////////////////////////////////////////////////////
#################################################################
#
#         Ajax MySQL shoutbox for btit
#         Version 1.0
#         Author: miskotes
#         Created: 11/07/2007
#         Contact: miskotes [at] yahoo.co.uk
#         Website: http://www.yu-corner.com
#         Credits: linuxuser.at, plasticshore.com
#
#################################################################
$getsbox = @mysqli_fetch_array(@mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}users WHERE id=" . $CURUSER["uid"]));
$sbox = "{$getsbox['sbox']}";
if ($sbox == "no") {
    block_begin(SHOUTBOX);
    global $btit_settings;
    if ($CURUSER["view_shout"] == "yes") {
        require_once "include/smilies.php";
        require_once "shoutfun.php";
        if (!isset($CURUSER)) {
            global $CURUSER, $btit_settings, $tpl;
        }
        $switch = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT status FROM {$TABLE_PREFIX}blocks WHERE content = 'featured'");
        $arco = mysqli_fetch_array($switch);
        if ($arco["status"] == '0' and $btit_settings["shoutdel"] == true) {
            ?>
<script language="javascript" type="text/javascript" src="jscript/jquery.js"></script>
<?php 
        }
        if ($btit_settings["bling"] == true) {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:ajax_shoutbox_block.php

示例6: dirname

* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
$scriptname = security::html_safe($_SERVER["PHP_SELF"]);
$addparam = '';
dbconn();
standardheader('Torrents');
if (!user::$current || user::$current["view_torrents"] != "yes") {
    err_msg(ERROR . NOT_AUTHORIZED . " " . MNU_TORRENT . "!", SORRY . "...");
    stdfoot();
    exit;
}
block_begin(MNU_TORRENT);
if (isset($_GET["search"])) {
    $trova = security::html_safe(str_replace("+", " ", $_GET["search"]));
} else {
    $trova = '';
}
?>
<p align='center'>
<form action='<?php 
$scriptname;
?>
' method='get'>
   <table border='0' class='lista' align='center'>
   <tr>
   <td class='block'><?php 
echo TORRENT_SEARCH;
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:torrents.php

示例7: news

                } else {
                    $db->query("INSERT INTO news (news, title, user_id, date) VALUES (" . $news . ", " . $title . ", " . $uid . ", NOW())");
                }
                redirect("index.php");
                exit;
            }
        }
    } elseif ($_POST["conferma"] == FRM_CANCEL) {
        redirect("index.php");
        exit;
    } else {
        $title = '';
        $news = '';
    }
}
block_begin(NEWS_PANEL);
global $news, $title;
?>
<div align='center'>
  <form action='news.php' name='news' method='post'>
  <table border='0' class='lista'>
  <tr><td><input type='hidden' name='action' value='<?php 
echo $action;
?>
'/></td></tr>
  <tr><td><input type='hidden' name='id' value='<?php 
echo (int) $_GET['id'];
?>
'/></td></tr>
  <tr>
       <td align='center' colspan='2' class='header' >
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:news.php

示例8: block_begin

<?php

// CyBerFuN.ro & xList.ro
// xList .::. Categories Block
// http://tracker.cyberfun.ro/
// http://www.cyberfun.ro/
// http://xlist.ro/
// Modified By CyBerNe7
global $CURUSER;
if (!$CURUSER || $CURUSER["view_torrents"] == "no") {
    // do nothing
} else {
    block_begin(BLOCK_CAT);
    function catnumber($val = "")
    {
        global $TABLE_PREFIX;
        print "<div id=catnumber style=\"width:100%;overflow:auto\" align=left><table class=\"lista\" cellpadding=\"2\" cellspacing=\"1\" style=\"width:100%;\" align=left>";
        $c_q = @mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='0' ORDER BY sort_index ASC");
        while ($c = mysql_fetch_array($c_q)) {
            $cid = $c["id"];
            $name = unesc($c["name"]);
            // lets see if it has sub-categories.
            $s_q = mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='{$cid}'");
            $s_t = mysql_num_rows($s_q);
            $res = mysql_query("select count(*) as allincat FROM {$TABLE_PREFIX}files where category=" . $cid);
            if ($res) {
                $row = mysql_fetch_array($res);
                $totalall = $row["allincat"];
            } else {
                $totalall = 0;
            }
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:categories_block.php

示例9: die

<?php

/*
 * BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
 * This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
 * Updated and Maintained by Yupy.
 * Copyright (C) 2004-2014 Btiteam.org
 */
if (!defined("IN_ACP")) {
    die("No direct access!");
}
block_begin("Database Tools");
switch ($action) {
    case 'runqry':
        if (isset($_POST["confirm"]) && $_POST["confirm"] == FRM_CONFIRM) {
            if ($_POST["runquery"] != "") {
                // just in case...
                $_POST["runquery"] = strip_tags($_POST["runquery"]);
                $thequery = strtoupper($_POST["runquery"]);
                // try to run the query
                $dbres = $db->query(unesc($_POST["runquery"]));
                if (in_array(substr($thequery, 0, strpos($thequery, " ")), array("SELECT", "SHOW", "EXPLAIN", "DESCRIBE"))) {
                    // display result
                    $ad_display .= "\n                           <br />\n                           <form name='dbutil' action='admincp.php?user=" . user::$current["uid"] . "&code=" . $user::$current["random"] . "&do=dbutil&action=qry' method='post'>\n                           <table class='lista' cellspacing='1' cellpadding='0' align='center' border='0' width='98%'>\n                           <tr>\n                           <td>" . security::html_safe(unesc($_POST["runquery"])) . "\n                           </td>\n                           </tr>\n                           <tr>\n                           <td>\n                           <table class='lista' cellspacing='1' cellpadding='0' align='center' border='0' width='100%'>\n                           <tr>";
                    // display header (fields' name)
                    $i = 0;
                    $field = array();
                    while ($fname = $dbres->fetch_field()) {
                        $ad_display .= "<td align='center' class='header'>{$fname->name}</td>";
                        $field[$i] = $fname->name;
                        $i++;
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:dbutil.php

示例10: dirname

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Torrent Details');
if (!user::$current || user::$current["view_torrents"] != "yes") {
    err_msg(ERROR . NOT_AUTHORIZED . " " . MNU_TORRENT . "!", SORRY . "...");
    stdfoot();
    exit;
}
block_begin(TORRENT_DETAIL);
$id = AddSlashes(isset($_GET["id"]) ? $_GET["id"] : false);
if (!isset($id) || !$id) {
    die(ERROR_ID . ": " . $id);
}
if (isset($_GET["act"])) {
    print "<center>" . TORRENT_UPDATE . "</center>";
    require_once INCL_PATH . 'getscrape.php';
    scrape(urldecode($_GET["surl"]), $id);
    redirect("details.php?id=" . $id);
    exit;
}
if (isset($_GET["vote"]) && $_GET["vote"] == VOTE) {
    if (isset($_GET["rating"]) && $_GET["rating"] == 0) {
        err_msg(ERROR, ERR_NO_VOTE);
        block_end();
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:30,代码来源:details.php

示例11: die

// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////
////    Bónusz pont utalás By virus ///////
//////////////////////////////////////////
////////////////////////////////////////////
//// Converted to english by reBirth //////
//////////////////////////////////////////
////////////////////////////////////////////
//// Converted for xbtit by cooly /////////
//////////////////////////////////////////
if (!defined("IN_BTIT")) {
    die("non direct access!");
}
if ($CURUSER["view_users"] != "yes") {
    err_msg($language["ERROR"], $language["NOT_AUTHORIZED"] . " " . $language["MEMBERS"]);
    stdfoot();
    die;
}
block_begin("Bonus Transfer");
$Btrans[] = "\n\n<form name=transfer method=post action=index.php?page=bonusdone>\n<table width=100% align=center>\n<tr>\n<td class=header width=80% colspan=5><b>You can transfer your seed bonus points to another member here</b>\n</td>\n<tr>\n<td class=header width=30% align=right>Which user you want to make happy\n<td class=lista><input type=text name=username size=30></td>\n</tr>\n<tr>\n<td class=header width=30% align=right>How much points you like to give\n<td class=lista><input type=text name=bonuszpont size=6 value=1></td>\n</tr>\n<tr>\n<td class=header width=30% align=right>Use anonymous for sender ID\n<td class=lista><input type=checkbox name=anonym value=anonym></td></tr>\n<tr><td colspan=2><input name=submit type=submit value=Transfer></td>\n</tr>\n</table>\n</form>";
$bonustpl = new bTemplate();
$bonustpl->set("Btrans", $Btrans);
block_end();
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:bonus_transfer.php

示例12: block_begin

//   3. The name of the author may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
block_begin("Top 5 Requests");
global $btit_settings;
$number = $btit_settings["req_number"];
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT users.id_level,users.downloaded, users.uploaded, users.username, requests.filled, requests.filledby, requests.id, requests.userid, requests.request, requests.added, requests.hits, categories.image as catimg, categories.name as cat FROM {$TABLE_PREFIX}requests requests inner join {$TABLE_PREFIX}categories categories on requests.cat = categories.id inner join {$TABLE_PREFIX}users users on requests.userid = users.id ORDER BY requests.hits DESC, requests.id DESC LIMIT {$number}") or sqlerr();
$num = mysqli_num_rows($res);
print "<table border=0 width=100% align=center cellspacing=1 cellpadding=0>\n";
print "<tr><td class=header align=center>Torrent File</td><td class=header align=center>Cat.</td><td class=header align=center>Added</td><td class=header align=center>By</td><td class=header align=center>Filled</td><td class=header align=center>Votes</td>\n";
for ($i = 0; $i < $num; ++$i) {
    $arr = mysqli_fetch_assoc($res);
    $rep = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}users_level WHERE id_level =" . $arr['id_level']);
    $rept = mysqli_fetch_array($rep);
    $name = stripslashes($rept[prefixcolor]) . $arr[username] . stripslashes($rept[suffixcolor]);
    $privacylevel = $arr["privacy"];
    if ($arr["downloaded"] > 0) {
        $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);
        //$ratio = "<font color=" . get_ratio_color($ratio) . "><b>$ratio</b></font>";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:request_block.php

示例13: block_begin

<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once INCL_PATH . 'functions.php';
require_once INCL_PATH . 'blocks.php';
if (!user::$current || user::$current["view_news"] == "no") {
    #Do Nothing...
} else {
    block_begin(LAST_NEWS);
    print_news($GLOBALS['block_newslimit']);
    block_end();
}
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:17,代码来源:news_block.php

示例14: unlink

        @$db->query("DELETE FROM namemap WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM timestamps WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM comments WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM ratings WHERE infohash = '" . $hash . "'");
        @$db->query("DELETE FROM peers WHERE infohash = '" . $hash . "'");
        @$db->query("DELETE FROM history WHERE infohash = '" . $hash . "'");
        @unlink(CACHE_PATH . 'torrent_details_' . $hash . '.txt');
        unlink($TORRENTSDIR . "/" . $hash . ".btf");
        print "<script language='javascript'>window.location.href='" . $link . "'</script>";
        exit;
    } else {
        print "<script language='javascript'>window.location.href='" . $link . "'</script>";
        exit;
    }
}
block_begin(DELETE_TORRENT);
print "<table width='100%' class='lista' border='0' cellspacing='5' cellpadding='5'>\n";
print "<tr><td align='right' class='header'>" . FILE_NAME . ":</td><td class='lista'>" . security::html_safe($row["filename"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . INFO_HASH . ":</td><td class='lista'>" . security::html_safe($row["info_hash"]) . "</td></tr>";
if (!empty($row["comment"])) {
    print "<tr><td align='right' class='header'>" . DESCRIPTION . ":</td><td align='left' class='lista'>" . format_comment(unesc($row["comment"])) . "</td></tr>";
}
if (isset($row["cat_name"])) {
    print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>" . security::html_safe($row["cat_name"]) . "</td></tr>";
} else {
    print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>(None)</td></tr>";
}
print "<tr><td align='right' class='header'>" . SIZE . ":</td><td class='lista'>" . misc::makesize((int) $row["size"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . ADDED . ":</td><td class='lista'>" . date("d/m/Y H:m:s", $row["data"]) . "</td></tr>";
if ($row["speed"] < 0) {
    $speed = "N/A";
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:delete.php

示例15: block_begin

<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
global $db;
if (!user::$current || user::$current["view_forum"] == "no") {
    // do nothing
} else {
    block_begin(FORUM_INFO);
    $res = $db->query("SELECT COUNT(*) AS topic_total FROM topics");
    if ($res) {
        $row = $res->fetch_array(MYSQLI_BOTH);
        $topics = (int) $row['topic_total'];
        $res1 = $db->query("SELECT COUNT(*) AS post_total FROM posts");
        if ($res1) {
            $row = $res1->fetch_array(MYSQLI_BOTH);
            $posts = (int) $row['post_total'];
            if ($posts > 0) {
                $posts_avg = number_format($topics / $posts * 100, 0);
            } else {
                $posts_avg = 0;
            }
        }
    } else {
        $topics = 0;
        $posts = 0;
        $posts_avg = 0;
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:forum_block.php


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