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


PHP torrenttable函数代码示例

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


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

示例1: begin_frame

if ($site_config['SHOUTBOX'] && !($CURUSER['hideshoutbox'] == 'yes')) {
    begin_frame(T_("SHOUTBOX"));
    echo '<iframe name="shout_frame" src="shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" scrolling="no" align="middle"></iframe>';
    printf(T_("SHOUTBOX_REFRESH"), 5) . "<br />";
    end_frame();
}
// latest torrents
begin_frame(T_("LATEST_TORRENTS"));
print "<br /><center><a href='torrents.php'>" . T_("BROWSE_TORRENTS") . "</a> - <a href='torrents-search.php'>" . T_("SEARCH_TORRENTS") . "</a></center><br />";
if ($site_config["MEMBERSONLY"] && !$CURUSER) {
    echo "<br /><br /><center><b>" . T_("BROWSE_MEMBERS_ONLY") . "</b></center><br /><br />";
} else {
    $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
    $res = SQL_Query_exec($query);
    if (mysql_num_rows($res)) {
        torrenttable($res);
    } else {
        print "<div class='f-border'>";
        print "<div class='f-cat' width='100%'>" . T_("NOTHING_FOUND") . "</div>";
        print "<div>";
        print T_("NO_UPLOADS");
        print "</div>";
        print "</div>";
    }
    if ($CURUSER) {
        SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id={$CURUSER['id']}");
    }
}
end_frame();
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
}
开发者ID:Arkhana,项目名称:TorrentTrader2.08,代码行数:31,代码来源:index.php

示例2: dbconn

// +--------------------------------------------------------------------------+
// |                                               Do not remove above lines! |
// +--------------------------------------------------------------------------+
*/
require_once "include/bittorrent.php";
dbconn(false);
loggedinorreturn();
stdhead($tracker_lang['bookmarks']);
$res = sql_query("SELECT COUNT(id) FROM bookmarks WHERE userid = " . sqlesc($CURUSER["id"]));
$row = mysql_fetch_array($res);
$count = $row[0];
if (!$count) {
    stdmsg($tracker_lang['error'], $tracker_lang['you_have_no_bookmarks'], 'error');
} else {
    ?>
<table class="embedded" cellspacing="0" cellpadding="5" width="100%">
<tr><td class="colhead" align="center" colspan="12">Список закладок</td></tr>
<?php 
    $perpage = 25;
    list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "bookmarks.php?");
    $res = sql_query("SELECT bookmarks.id AS bookmarkid, users.username, users.class, users.id AS owner, torrents.id, torrents.name, torrents.info_hash, torrents.type, torrents.comments, (torrents.leechers + torrents.remote_leechers) AS leechers, (torrents.seeders + torrents.remote_seeders) AS seeders, torrents.multitracker, torrents.last_mt_update, IF(torrents.numratings < {$minvotes}, NULL, ROUND(torrents.ratingsum / torrents.numratings)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, torrents.save_as, torrents.numfiles, torrents.added, torrents.filename, torrents.size, torrents.views, torrents.visible, torrents.free, torrents.hits, torrents.times_completed, torrents.category FROM bookmarks INNER JOIN torrents ON bookmarks.torrentid = torrents.id LEFT JOIN users ON torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id WHERE bookmarks.userid = " . sqlesc($CURUSER["id"]) . " ORDER BY torrents.id DESC {$limit}") or sqlerr(__FILE__, __LINE__);
    print "<tr><td class=\"index\" colspan=\"12\">";
    print $pagertop;
    print "</td></tr>";
    torrenttable($res, "bookmarks");
    print "<tr><td class=\"index\" colspan=\"12\">";
    print $pagerbottom;
    print "</td></tr>";
    print "</table>";
}
stdfoot();
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:bookmarks.php

示例3: intval

        case 'desc':
            $ascdesc = "DESC";
            $linkascdesc = "desc";
            break;
        default:
            $ascdesc = "DESC";
            $linkascdesc = "desc";
            break;
    }
    $orderby = "ORDER BY torrents." . $column . " " . $ascdesc;
    $pagerlink = "sort=" . intval($_GET['sort']) . "&amp;type=" . $linkascdesc . "&amp;";
} else {
    $orderby = "ORDER BY torrents.sticky ASC, torrents.id DESC";
    $pagerlink = "";
}
$where = "WHERE owner = {$CURUSER["id"]} AND banned != 'yes'";
$res = sql_query("SELECT COUNT(id) FROM torrents {$where}");
$row = mysqli_fetch_array($res, MYSQLI_NUM);
$count = $row[0];
if (!$count) {
    $HTMLOUT .= "{$lang['mytorrents_no_torrents']}";
    $HTMLOUT .= "{$lang['mytorrents_no_uploads']}";
} else {
    $pager = pager(20, $count, "mytorrents.php?{$pagerlink}");
    $res = sql_query("SELECT type, sticky, vip, descr, nuked, bump, nukereason, release_group, free, silver, comments, leechers, seeders, IF(num_ratings < {$INSTALLER09['minvotes']}, NULL, ROUND(rating_sum / num_ratings, 1)) AS rating, id, name, save_as, numfiles, added, size, views, visible, hits, times_completed, category, description, username FROM torrents {$where} {$orderby} " . $pager['limit']);
    $HTMLOUT .= $pager['pagertop'];
    $HTMLOUT .= "<br />";
    $HTMLOUT .= torrenttable($res, "mytorrents");
    $HTMLOUT .= $pager['pagerbottom'];
}
echo stdhead($CURUSER["username"] . "'s torrents") . $HTMLOUT . stdfoot($stdfoot);
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:mytorrents.php

示例4: foreach

$deadcheck .= " in: <select name='incldead'>\n    <option value='0'>{$lang['browse_active']}</option>\n    <option value='1'" . ($selected == 1 ? " selected='selected'" : "") . ">{$lang['browse_inc_dead']}</option>\n    <option value='2'" . ($selected == 2 ? " selected='selected'" : "") . ">{$lang['browse_dead']}</option>\n    </select>";
$searchin = ' by: <select name="searchin">';
foreach (array('title' => 'Name', 'descr' => 'Description', 'genre' => 'Genre', 'all' => 'All') as $k => $v) {
    $searchin .= '<option value="' . $k . '" ' . ($select_searchin == $k ? 'selected=\'selected\'' : '') . '>' . $v . '</option>';
}
$searchin .= '</select>';
$HTMLOUT .= $searchin . '&nbsp;' . $deadcheck . '&nbsp;' . $only_free_box . '' . $vip_box;
$HTMLOUT .= "<p align='center'><input type='submit' value='{$lang['search_search_btn']}' class='btn' /></p>\n            </td></tr></table></form><br />";
$HTMLOUT .= "{$new_button}";
if (isset($cleansearchstr)) {
    $HTMLOUT .= "<h2>{$lang['browse_search']} " . htmlsafechars($searchstr, ENT_QUOTES) . "</h2>\n";
}
if ($count) {
    $HTMLOUT .= $pager['pagertop'];
    $HTMLOUT .= "<br />";
    $HTMLOUT .= torrenttable($res);
    $HTMLOUT .= $pager['pagerbottom'];
} else {
    if (isset($cleansearchstr)) {
        $HTMLOUT .= "<h2>{$lang['browse_not_found']}</h2>\n";
        $HTMLOUT .= "<p>{$lang['browse_tryagain']}</p>\n";
    } else {
        $HTMLOUT .= "<h2>{$lang['browse_nothing']}</h2>\n";
        $HTMLOUT .= "<p>{$lang['browse_sorry']}(</p>\n";
    }
}
$HTMLOUT .= "</div>";
$ip = getip();
//== Start ip logger - Melvinmeow, Mindless, pdq
$no_log_ip = $CURUSER['perms'] & bt_options::PERMS_NO_IP;
if ($no_log_ip) {
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:31,代码来源:browse.php

示例5: safeChar

</form>



<?php 
if (isset($cleansearchstr)) {
    print "<h2>" . $language['str1'] . " \"" . safeChar($searchstr) . "\"</h2>\n";
}
if ($CURUSER['update_new'] != 'no') {
    // === if you want a button
    echo '<a href="?clear_new=1"><input type=submit value="clear new tag" class=button></a>';
    // === if you want a link
    // echo'<p><a href="?clear_new=1">clear new tag</a></p>';
}
if ($count) {
    print $pagertop;
    torrenttable($records);
    print $pagerbottom;
} else {
    if (isset($cleansearchstr)) {
        print "<h2>" . $language['str20'] . "</h2>\n";
        print "<p>" . $language['str16'] . "</p>\n";
    } else {
        print "<h2>" . $language['str19'] . "</h2>\n";
        print "<p>" . $language['str17'] . "</p>\n";
    }
}
if ($CURUSER['update_new'] != 'yes') {
    $_SESSION['browsetime'] = gmtime();
}
stdfoot();
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:browse.php

示例6: dbconn

<?php

require_once "include/bittorrent.php";
require_once "include/html_functions.php";
require_once "include/user_functions.php";
require_once "include/pager_functions.php";
require_once "include/torrenttable_functions.php";
dbconn(false);
loggedinorreturn();
stdhead($CURUSER["username"] . "'s torrents");
$where = "WHERE owner = " . $CURUSER["id"] . " AND banned != 'yes'";
$res = mysql_query("SELECT COUNT(*) FROM torrents {$where}");
$row = mysql_fetch_array($res, MYSQL_NUM);
$count = $row[0];
if (!$count) {
    ?>
<h1>No torrents</h1>
<p>You haven't uploaded any torrents yet, so there's nothing in this page.</p>
<?php 
} else {
    $pager = pager(20, $count, "mytorrents.php?");
    $res = mysql_query("SELECT torrents.type, torrents.comments, torrents.leechers, torrents.seeders, IF(torrents.numratings < {$minvotes}, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.id, categories.name AS cat_name, categories.image AS cat_pic, torrents.name, save_as, numfiles, added, size, views, visible, hits, times_completed, category FROM torrents LEFT JOIN categories ON torrents.category = categories.id {$where} ORDER BY id DESC " . $pager['limit']);
    print $pager['pagertop'];
    torrenttable($res, "mytorrents");
    print $pager['pagerbottom'];
}
stdfoot();
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:27,代码来源:mytorrents.php

示例7: htmlspecialchars_uni

                    <div id="suggestions"
                         style="cursor: default; position: absolute; background-color: #FFFFFF; border: 1px solid #777777;"></div>
                </div>
            </td>
        </tr>
    </table>

<?php 
if (isset($cleansearchstr)) {
    print '<tr><td class="index" colspan="12">' . $tracker_lang['search_results_for'] . ' "' . htmlspecialchars_uni($searchstr) . '"</td></tr>';
}
echo '</td></tr>';
if ($num_torrents) {
    echo '<tr><td class="index" colspan="12">';
    echo $pagertop;
    echo '</td></tr>';
    torrenttable($res, "index");
    echo '<tr><td class="index" colspan="12">';
    echo $pagerbottom;
    echo '</td></tr>';
} else {
    if (isset($cleansearchstr)) {
        print "<tr><td class=\"index\" colspan=\"12\">" . $tracker_lang['nothing_found'] . "</td></tr>\n";
        //print("<p>Попробуйте изменить запрос поиска.</p>\n");
    } else {
        print "<tr><td class=\"index\" colspan=\"12\">" . $tracker_lang['nothing_found'] . "</td></tr>\n";
        //print("<p>Извините, данная категория пустая.</p>\n");
    }
}
echo '</table>';
stdfoot();
开发者ID:klldll,项目名称:tbdev,代码行数:31,代码来源:browse.php

示例8: get_username

    echo "<div align=\"center\" style=\"margin-top: 10px\" id=\"ad_belowsearchbox\">" . $belowsearchboxad[0] . "</div>";
}
if ($inclbookmarked == 1) {
    print "<h1 align=\"center\">" . get_username($CURUSER['id']) . $lang_torrents['text_s_bookmarked_torrent'] . "</h1>";
} elseif ($inclbookmarked == 2) {
    print "<h1 align=\"center\">" . get_username($CURUSER['id']) . $lang_torrents['text_s_not_bookmarked_torrent'] . "</h1>";
}
if ($count) {
    print $pagertop;
    print "<form action=\"delete.php?recycle_mode=delete\" method=\"post\">";
    if ($sectiontype == $browsecatmode) {
        torrenttable($res, "torrents", "recycle");
    } elseif ($sectiontype == $specialcatmode) {
        torrenttable($res, "torrents", "recycle");
    } else {
        torrenttable($res, "bookmarks", "recycle");
    }
    print $pagerbottom;
} else {
    if (isset($searchstr)) {
        print "<br />";
        stdmsg($lang_torrents['std_search_results_for'] . $searchstr_ori . "\"", $lang_torrents['std_try_again']);
    } else {
        stdmsg($lang_torrents['std_nothing_found'], $lang_torrents['std_no_active_torrents']);
    }
}
if ($CURUSER) {
    if ($sectiontype == $browsecatmode) {
        $USERUPDATESET[] = "last_browse = " . TIMENOW;
    } else {
        $USERUPDATESET[] = "last_music = " . TIMENOW;
开发者ID:NullYing,项目名称:mtpt,代码行数:31,代码来源:recycle.php


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