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

PHP block_begin函数代码示例

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

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



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


示例16: 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_users"] == "no") {
    // do nothing
} else {
    //lastest member
    block_begin("Latest Member");
    $cache_last_member = CACHE_PATH . 'last_member.txt';
    $cache_last_member_expire = 15 * 60;
    if (file_exists($cache_last_member) && is_array(unserialize(file_get_contents($cache_last_member))) && vars::$timestamp - filemtime($cache_last_member) < $cache_last_member_expire) {
        $a = unserialize(@file_get_contents($cache_last_member));
    } else {
        $a = @$db->query("SELECT id, username FROM users WHERE id_level <> 1 AND id_level <> 2 ORDER BY id DESC LIMIT 1");
        $a = @$a->fetch_assoc();
        $handle = fopen($cache_last_member, "w+");
        fwrite($handle, serialize($a));
        fclose($handle);
    }
    if ($a) {
        if (user::$current["view_users"] == "yes") {
            $latestuser = "<a href='userdetails.php?id=" . (int) $a["id"] . "'>" . security::html_safe($a["username"]) . "</a>";
        } else {
            $latestuser = security::html_safe($a['username']);
        }
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:lastmember_block.php


示例17: preg_replace

    $s = preg_replace("/\\[url\\]((http|ftp|https|ftps|irc):\\/\\/[^<>\\s]+?)\\[\\/url\\]/i", "<a href=\\1 target=_blank>\\1</a>", $s);
    // [size=4]Text[/size]
    $s = preg_replace("/\\[size=([1-7])\\]((\\s|.)+?)\\[\\/size\\]/i", "<font size=\\1>\\2</font>", $s);
    // [font=Arial]Text[/font]
    $s = preg_replace("/\\[font=([a-zA-Z ,]+)\\]((\\s|.)+?)\\[\\/font\\]/i", "<font face=\"\\1\">\\2</font>", $s);
    // Linebreaks
    $s = nl2br($s);
    // Maintain spacing
    $s = str_replace("  ", " &nbsp;", $s);
    reset($Smileys);
    while (list($code, $url) = each($Smileys)) {
        $s = str_replace($code, "<img border='0' src='" . $BASEURL . "/images/smilies/" . $url . "'>", $s);
    }
    return $s;
}
block_begin("Shout history");
echo "<br />";
$msg = array();
function file_save($filename, $content, $flags = 0)
{
    if (!($file = fopen($filename, 'w'))) {
        return FALSE;
    }
    $n = fwrite($file, $content);
    fclose($file);
    return $n ? $n : FALSE;
}
if (!file_exists("chat.php")) {
    file_save("chat.php", "<?php\n\$msg = " . var_export($msg, TRUE) . "\n?>");
}
include "chat.php";
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:allshout.php


示例18: 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, $user;
if (!user::$current || user::$current["id"] == 1) {
    #Do nothing
} else {
    block_begin(BLOCK_USER);
    // user information
    $style = style_list();
    $langue = language_list();
    print "\n<tr><td align='center' class='blocklist'>" . USER_NAME . ": " . unesc(user::$current["username"]) . "</td></tr>\n";
    print "<tr><td align='center' class='blocklist'>" . USER_LEVEL . ": " . security::html_safe(user::$current["level"]) . "</td></tr>\n";
    $resmail = $db->query("SELECT COUNT(*) FROM messages WHERE readed = 'no' AND receiver = " . user::$current['uid']);
    if ($resmail && $resmail->num_rows > 0) {
        $mail = $resmail->fetch_row();
        if ($mail[0] > 0) {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a> (<font color='#FF0000'><b>" . (int) $mail[0] . "</b></font>)</td>\n";
        } else {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a></td>\n";
        }
    } else {
        print "<tr><td align='center'>" . NO_MAIL . "</td></tr>";
    }
    print "<tr><td align='center' class='blocklist'>";
    include INCL_PATH . 'offset.php';
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:user_block.php


示例19: err_msg

/*
* BtiTracker v1.5.1 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
*/
if (!user::$current || user::$current["admin_access"] != "yes") {
    err_msg(ERROR, NOT_ADMIN_CP_ACCESS);
    stdfoot();
    exit;
} else {
    $delete_timeout = vars::$timestamp - 60 * 60 * 24 * 7;
    // delete log older then 7 days
    $db->query("DELETE FROM logs WHERE added < " . $delete_timeout);
    block_begin("Site Log");
    $logres = $db->query("SELECT COUNT(*) FROM logs ORDER BY added DESC");
    $lognum = $logres->fetch_row();
    $num = (int) $lognum[0];
    $perpage = max(0, user::$current["postsperpage"]) > 0 ? user::$current["postsperpage"] : 20;
    list($pagertop, $limit) = misc::pager($perpage, $num, "admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=logview&");
    print $pagertop;
    print "\n<table class='lista' width='100%' align='center'><tr>";
    print "\n<td class='header'>" . DATE . "</td>";
    print "\n<td class='header'>" . USER_NAME . "</td>";
    print "\n<td class='header'>" . ACTION . "</td>\n</tr>";
    $logres = $db->query("SELECT * FROM logs ORDER BY added DESC " . $limit);
    if ($logres) {
        while ($logview = $logres->fetch_array(MYSQLI_BOTH)) {
            if ($logview["type"] == "delete") {
                $bgcolor = "style='background-color:#FF95AC; color:#000000;'";
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:30,代码来源:sitelog.php


示例20: block_end

  </form>
  </td></tr></table>
      <?php 
        block_end();
    }
} else {
    require_once "include/functions.php";
    require_once "include/config.php";
    dbconn();
    $res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}polls WHERE status='true'") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
    $result = mysql_fetch_array($res);
    $pid = $result["pid"];
    if ($result) {
        $res2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}poll_voters WHERE pid='{$pid}'") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
        $question = $result["poll_question"];
        block_begin("Poll: {$question}");
        print "<tr><td class=blocklist align=center>\n";
        print "<table cellspacing=2 cellpading=2>\n";
        if (!isset($CURUSER)) {
            global $CURUSER;
        }
        $total_votes = 0;
        $check = 0;
        if ($CURUSER["id_level"] < 3 || isset($_POST['showres']) && $_POST['showres'] == 'Show Results') {
            $check = 1;
        } else {
            $check = 0;
        }
        while ($voters = mysqli_fetch_array($res2)) {
            if ($CURUSER["uid"] == $voters["memberid"]) {
                $check = 1;
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:poller_block.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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