Exemplo n.º 1
0
         $uprow = "<i>" . $lang_details['text_anonymous'] . "</i> (" . get_username($row['owner'], false, true, true, false, false, true) . ")";
     }
 } else {
     $uprow = isset($row['owner']) ? get_username($row['owner'], false, true, true, false, false, true) : "<i>" . $lang_details['text_unknown'] . "</i>";
 }
 if ($CURUSER["id"] == $row["owner"]) {
     $CURUSER["downloadpos"] = "yes";
 }
 if ($CURUSER["downloadpos"] != "no") {
     print "<tr><td class=\"rowhead\" width=\"13%\">" . $lang_details['row_download'] . "</td><td class=\"rowfollow\" width=\"87%\" align=\"left\">";
     if ($CURUSER['timetype'] != 'timealive') {
         $uploadtime = $lang_details['text_at'] . $row['added'];
     } else {
         $uploadtime = $lang_details['text_blank'] . gettime($row['added'], true, false);
     }
     print "<a class=\"index\" href=\"download.php?id={$id}\">" . htmlspecialchars($torrentnameprefix . "." . $row["save_as"]) . ".torrent</a>&nbsp;&nbsp;<a id=\"bookmark0\" href=\"javascript: bookmark(" . $row['id'] . ",0);\">" . get_torrent_bookmark_state($CURUSER['id'], $row['id'], false) . "</a>&nbsp;&nbsp;&nbsp;" . $lang_details['row_upped_by'] . "&nbsp;" . $uprow . $uploadtime;
     print "</td></tr>";
 } else {
     tr($lang_details['row_download'], $lang_details['text_downloading_not_allowed']);
 }
 //----豆瓣号添加--
 tr($lang_details['row_douban'], "<input id=\"doubanid\" value=\"\" type=\"text\" style=\"width: 100px;\" /><font class=\"medium\">" . "&nbsp;&nbsp<input type=\"button\" value=\"确定\" onclick=\"douban(document.getElementById('doubanid').value)\" />&nbsp;&nbsp" . $lang_details['row_douban_id'] . "</font>", 1);
 //------------------
 if ($smalldescription_main == 'yes') {
     tr($lang_details['row_small_description'], htmlspecialchars(trim($row["small_descr"])), true);
 }
 $size_info = "<b>" . $lang_details['text_size'] . "</b>" . mksize($row["size"]);
 $type_info = "&nbsp;&nbsp;&nbsp;<b>" . $lang_details['row_type'] . ":</b>&nbsp;" . $row["cat_name"];
 if (isset($row["source_name"])) {
     $source_info = "&nbsp;&nbsp;&nbsp;<b>" . $lang_details['text_source'] . "&nbsp;</b>" . $row[source_name];
 }
Exemplo n.º 2
0
function torrenttable($res, $variant = "torrent")
{
    global $Cache;
    global $lang_functions;
    global $CURUSER, $waitsystem;
    global $showextinfo;
    global $torrentmanage_class, $smalldescription_main, $enabletooltip_tweak;
    global $CURLANGDIR;
    if ($variant == "torrent") {
        $last_browse = $CURUSER['last_browse'];
        $sectiontype = $browsecatmode;
    } elseif ($variant == "music") {
        $last_browse = $CURUSER['last_music'];
        $sectiontype = $specialcatmode;
    } else {
        $last_browse = $CURUSER['last_browse'];
        $sectiontype = "";
    }
    $time_now = TIMENOW;
    if ($last_browse > $time_now) {
        $last_browse = $time_now;
    }
    if (get_user_class() < UC_VIP && $waitsystem == "yes") {
        $ratio = get_ratio($CURUSER["id"], false);
        $gigs = $CURUSER["uploaded"] / (1024 * 1024 * 1024);
        if ($gigs > 10) {
            if ($ratio < 0.4) {
                $wait = 24;
            } elseif ($ratio < 0.5) {
                $wait = 12;
            } elseif ($ratio < 0.6) {
                $wait = 6;
            } elseif ($ratio < 0.8) {
                $wait = 3;
            } else {
                $wait = 0;
            }
        } else {
            $wait = 0;
        }
    }
    ?>
<table class="torrents" cellspacing="0" cellpadding="5" width="100%">
<tr>
<?php 
    $count_get = 0;
    $oldlink = "";
    foreach ($_GET as $get_name => $get_value) {
        $get_name = mysql_real_escape_string(strip_tags(str_replace(array("\"", "'"), array("", ""), $get_name)));
        $get_value = mysql_real_escape_string(strip_tags(str_replace(array("\"", "'"), array("", ""), $get_value)));
        if ($get_name != "sort" && $get_name != "type") {
            if ($count_get > 0) {
                $oldlink .= "&amp;" . $get_name . "=" . $get_value;
            } else {
                $oldlink .= $get_name . "=" . $get_value;
            }
            $count_get++;
        }
    }
    if ($count_get > 0) {
        $oldlink = $oldlink . "&amp;";
    }
    $sort = $_GET['sort'];
    $link = array();
    for ($i = 1; $i <= 9; $i++) {
        if ($sort == $i) {
            $link[$i] = $_GET['type'] == "desc" ? "asc" : "desc";
        } else {
            $link[$i] = $i == 1 ? "asc" : "desc";
        }
    }
    ?>
<td class="colhead" style="padding: 0px"><?php 
    echo $lang_functions['col_type'];
    ?>
</td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=1&amp;type=<?php 
    echo $link[1];
    ?>
"><?php 
    echo $lang_functions['col_name'];
    ?>
</a></td>
<?php 
    if ($wait) {
        print "<td class=\"colhead\">" . $lang_functions['col_wait'] . "</td>\n";
    }
    if ($CURUSER['showcomnum'] != 'no') {
        ?>
<td class="colhead"><a href="?<?php 
        echo $oldlink;
        ?>
sort=3&amp;type=<?php 
        echo $link[3];
        ?>
"><img class="comments" src="pic/trans.gif" alt="comments" title="<?php 
        echo $lang_functions['title_number_of_comments'];
        ?>
" /></a></td>
<?php 
    }
    ?>

<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=4&amp;type=<?php 
    echo $link[4];
    ?>
"><img class="time" src="pic/trans.gif" alt="time" title="<?php 
    echo $CURUSER['timetype'] != 'timealive' ? $lang_functions['title_time_added'] : $lang_functions['title_time_alive'];
    ?>
" /></a></td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=5&amp;type=<?php 
    echo $link[5];
    ?>
"><img class="size" src="pic/trans.gif" alt="size" title="<?php 
    echo $lang_functions['title_size'];
    ?>
" /></a></td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=7&amp;type=<?php 
    echo $link[7];
    ?>
"><img class="seeders" src="pic/trans.gif" alt="seeders" title="<?php 
    echo $lang_functions['title_number_of_seeders'];
    ?>
" /></a></td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=8&amp;type=<?php 
    echo $link[8];
    ?>
"><img class="leechers" src="pic/trans.gif" alt="leechers" title="<?php 
    echo $lang_functions['title_number_of_leechers'];
    ?>
" /></a></td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=6&amp;type=<?php 
    echo $link[6];
    ?>
"><img class="snatched" src="pic/trans.gif" alt="snatched" title="<?php 
    echo $lang_functions['title_number_of_snatched'];
    ?>
" /></a></td>
<td class="colhead"><a href="?<?php 
    echo $oldlink;
    ?>
sort=9&amp;type=<?php 
    echo $link[9];
    ?>
"><?php 
    echo $lang_functions['col_uploader'];
    ?>
</a></td>
<?php 
    if (get_user_class() >= $torrentmanage_class) {
        ?>
	<td class="colhead"><?php 
        echo $lang_functions['col_action'];
        ?>
</td>
<?php 
    }
    ?>
</tr>
<?php 
    $caticonrow = get_category_icon_row($CURUSER['caticon']);
    if ($caticonrow['secondicon'] == 'yes') {
        $has_secondicon = true;
    } else {
        $has_secondicon = false;
    }
    $counter = 0;
    if ($smalldescription_main == 'no' || $CURUSER['showsmalldescr'] == 'no') {
        $displaysmalldescr = false;
    } else {
        $displaysmalldescr = true;
    }
    while ($row = mysql_fetch_assoc($res)) {
        $id = $row["id"];
        $sphighlight = get_torrent_bg_color($row['sp_state']);
        print "<tr" . $sphighlight . ">\n";
        print "<td class=\"rowfollow nowrap\" valign=\"middle\" style='padding: 0px'>";
        if (isset($row["category"])) {
            print return_category_image($row["category"], "?");
            if ($has_secondicon) {
                print get_second_icon($row, "pic/" . $catimgurl . "additional/");
            }
        } else {
            print "-";
        }
        print "</td>\n";
        //torrent name
        $dispname = trim($row["name"]);
        $short_torrent_name_alt = "";
        $mouseovertorrent = "";
        $tooltipblock = "";
        $has_tooltip = false;
        if ($enabletooltip_tweak == 'yes') {
            $tooltiptype = $CURUSER['tooltip'];
        } else {
            $tooltiptype = 'off';
        }
        switch ($tooltiptype) {
            case 'minorimdb':
                if ($showextinfo['imdb'] == 'yes' && $row["url"]) {
                    $url = $row['url'];
                    $cache = $row['cache_stamp'];
                    $type = 'minor';
                    $has_tooltip = true;
                }
                break;
            case 'medianimdb':
                if ($showextinfo['imdb'] == 'yes' && $row["url"]) {
                    $url = $row['url'];
                    $cache = $row['cache_stamp'];
                    $type = 'median';
                    $has_tooltip = true;
                }
                break;
            case 'off':
                break;
        }
        if (!$has_tooltip) {
            $short_torrent_name_alt = "title=\"" . htmlspecialchars($dispname) . "\"";
        } else {
            $torrent_tooltip[$counter]['id'] = "torrent_" . $counter;
            $torrent_tooltip[$counter]['content'] = "";
            $mouseovertorrent = "onmouseover=\"get_ext_info_ajax('" . $torrent_tooltip[$counter]['id'] . "','" . $url . "','" . $cache . "','" . $type . "'); domTT_activate(this, event, 'content', document.getElementById('" . $torrent_tooltip[$counter]['id'] . "'), 'trail', false, 'delay',600,'lifetime',6000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 500);\"";
        }
        $count_dispname = mb_strlen($dispname, "UTF-8");
        if (!$displaysmalldescr || $row["small_descr"] == "") {
            // maximum length of torrent name
            $max_length_of_torrent_name = 120;
        } elseif ($CURUSER['fontsize'] == 'large') {
            $max_length_of_torrent_name = 60;
        } elseif ($CURUSER['fontsize'] == 'small') {
            $max_length_of_torrent_name = 80;
        } else {
            $max_length_of_torrent_name = 70;
        }
        if ($count_dispname > $max_length_of_torrent_name) {
            $dispname = mb_substr($dispname, 0, $max_length_of_torrent_name - 2, "UTF-8") . "..";
        }
        if ($row['pos_state'] == 'sticky' && $CURUSER['appendsticky'] == 'yes') {
            $stickyicon = "<img class=\"sticky\" src=\"pic/trans.gif\" alt=\"Sticky\" title=\"" . $lang_functions['title_sticky'] . "\" />&nbsp;";
        } else {
            $stickyicon = "";
        }
        print "<td class=\"rowfollow\" width=\"100%\" align=\"left\"><table class=\"torrentname\" width=\"100%\"><tr" . $sphighlight . "><td class=\"embedded\">" . $stickyicon . "<a {$short_torrent_name_alt} {$mouseovertorrent} href=\"details.php?id=" . $id . "&amp;hit=1\"><b>" . htmlspecialchars($dispname) . "</b></a>";
        $sp_torrent = get_torrent_promotion_append($row['sp_state'], "", true, $row["added"], $row['promotion_time_type'], $row['promotion_until']);
        $picked_torrent = "";
        if ($CURUSER['appendpicked'] != 'no') {
            if ($row['picktype'] == "hot") {
                $picked_torrent = " <b>[<font class='hot'>" . $lang_functions['text_hot'] . "</font>]</b>";
            } elseif ($row['picktype'] == "classic") {
                $picked_torrent = " <b>[<font class='classic'>" . $lang_functions['text_classic'] . "</font>]</b>";
            } elseif ($row['picktype'] == "recommended") {
                $picked_torrent = " <b>[<font class='recommended'>" . $lang_functions['text_recommended'] . "</font>]</b>";
            }
        }
        if ($CURUSER['appendnew'] != 'no' && strtotime($row["added"]) >= $last_browse) {
            print "<b> (<font class='new'>" . $lang_functions['text_new_uppercase'] . "</font>)</b>";
        }
        $banned_torrent = $row["banned"] == 'yes' ? " <b>(<font class=\"striking\">" . $lang_functions['text_banned'] . "</font>)</b>" : "";
        print $banned_torrent . $picked_torrent . $sp_torrent;
        if ($displaysmalldescr) {
            //small descr
            $dissmall_descr = trim($row["small_descr"]);
            $count_dissmall_descr = mb_strlen($dissmall_descr, "UTF-8");
            $max_lenght_of_small_descr = $max_length_of_torrent_name;
            // maximum length
            if ($count_dissmall_descr > $max_lenght_of_small_descr) {
                $dissmall_descr = mb_substr($dissmall_descr, 0, $max_lenght_of_small_descr - 2, "UTF-8") . "..";
            }
            print $dissmall_descr == "" ? "" : "<br />" . htmlspecialchars($dissmall_descr);
        }
        print "</td>";
        $act = "";
        if ($CURUSER["dlicon"] != 'no' && $CURUSER["downloadpos"] != "no") {
            $act .= "<a href=\"download.php?id=" . $id . "\"><img class=\"download\" src=\"pic/trans.gif\" style='padding-bottom: 2px;' alt=\"download\" title=\"" . $lang_functions['title_download_torrent'] . "\" /></a>";
        }
        if ($CURUSER["bmicon"] == 'yes') {
            $bookmark = " href=\"javascript: bookmark(" . $id . "," . $counter . ");\"";
            $act .= ($act ? "<br />" : "") . "<a id=\"bookmark" . $counter . "\" " . $bookmark . " >" . get_torrent_bookmark_state($CURUSER['id'], $id) . "</a>";
        }
        print "<td width=\"20\" class=\"embedded\" style=\"text-align: right; \" valign=\"middle\">" . $act . "</td>\n";
        print "</tr></table></td>";
        if ($wait) {
            $elapsed = floor((TIMENOW - strtotime($row["added"])) / 3600);
            if ($elapsed < $wait) {
                $color = dechex(floor(127 * ($wait - $elapsed) / 48 + 128) * 65536);
                print "<td class=\"rowfollow nowrap\"><a href=\"faq.php#id46\"><font color=\"" . $color . "\">" . number_format($wait - $elapsed) . $lang_functions['text_h'] . "</font></a></td>\n";
            } else {
                print "<td class=\"rowfollow nowrap\">" . $lang_functions['text_none'] . "</td>\n";
            }
        }
        if ($CURUSER['showcomnum'] != 'no') {
            print "<td class=\"rowfollow\">";
            $nl = "";
            //comments
            $nl = "<br />";
            if (!$row["comments"]) {
                print "<a href=\"comment.php?action=add&amp;pid=" . $id . "&amp;type=torrent\" title=\"" . $lang_functions['title_add_comments'] . "\">" . $row["comments"] . "</a>";
            } else {
                if ($enabletooltip_tweak == 'yes' && $CURUSER['showlastcom'] != 'no') {
                    if (!($lastcom = $Cache->get_value('torrent_' . $id . '_last_comment_content'))) {
                        $res2 = sql_query("SELECT user, added, text FROM comments WHERE torrent = {$id} ORDER BY id DESC LIMIT 1");
                        $lastcom = mysql_fetch_array($res2);
                        $Cache->cache_value('torrent_' . $id . '_last_comment_content', $lastcom, 1855);
                    }
                    $timestamp = strtotime($lastcom["added"]);
                    $hasnewcom = $lastcom['user'] != $CURUSER['id'] && $timestamp >= $last_browse;
                    if ($lastcom) {
                        if ($CURUSER['timetype'] != 'timealive') {
                            $lastcomtime = $lang_functions['text_at_time'] . $lastcom['added'];
                        } else {
                            $lastcomtime = $lang_functions['text_blank'] . gettime($lastcom["added"], true, false, true);
                        }
                        $lastcom_tooltip[$counter]['id'] = "lastcom_" . $counter;
                        $lastcom_tooltip[$counter]['content'] = ($hasnewcom ? "<b>(<font class='new'>" . $lang_functions['text_new_uppercase'] . "</font>)</b> " : "") . $lang_functions['text_last_commented_by'] . get_username($lastcom['user']) . $lastcomtime . "<br />" . format_comment(mb_substr($lastcom['text'], 0, 100, "UTF-8") . (mb_strlen($lastcom['text'], "UTF-8") > 100 ? " ......" : ""), true, false, false, true, 600, false, false);
                        $onmouseover = "onmouseover=\"domTT_activate(this, event, 'content', document.getElementById('" . $lastcom_tooltip[$counter]['id'] . "'), 'trail', false, 'delay', 500,'lifetime',3000,'fade','both','styleClass','niceTitle','fadeMax', 87,'maxWidth', 400);\"";
                    }
                } else {
                    $hasnewcom = false;
                    $onmouseover = "";
                }
                print "<b><a href=\"details.php?id=" . $id . "&amp;hit=1&amp;cmtpage=1#startcomments\" " . $onmouseover . ">" . ($hasnewcom ? "<font class='new'>" : "") . $row["comments"] . ($hasnewcom ? "</font>" : "") . "</a></b>";
            }
            print "</td>";
        }
        $time = $row["added"];
        $time = gettime($time, false, true);
        print "<td class=\"rowfollow nowrap\">" . $time . "</td>";
        //size
        print "<td class=\"rowfollow\">" . mksize_compact($row["size"]) . "</td>";
        if ($row["seeders"]) {
            $ratio = $row["leechers"] ? $row["seeders"] / $row["leechers"] : 1;
            $ratiocolor = get_slr_color($ratio);
            print "<td class=\"rowfollow\" align=\"center\"><b><a href=\"details.php?id=" . $id . "&amp;hit=1&amp;dllist=1#seeders\">" . ($ratiocolor ? "<font color=\"" . $ratiocolor . "\">" . number_format($row["seeders"]) . "</font>" : number_format($row["seeders"])) . "</a></b></td>\n";
        } else {
            print "<td class=\"rowfollow\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . number_format($row["seeders"]) . "</span></td>\n";
        }
        if ($row["leechers"]) {
            print "<td class=\"rowfollow\"><b><a href=\"details.php?id=" . $id . "&amp;hit=1&amp;dllist=1#leechers\">" . number_format($row["leechers"]) . "</a></b></td>\n";
        } else {
            print "<td class=\"rowfollow\">0</td>\n";
        }
        if ($row["times_completed"] >= 1) {
            print "<td class=\"rowfollow\"><a href=\"viewsnatches.php?id=" . $row[id] . "\"><b>" . number_format($row["times_completed"]) . "</b></a></td>\n";
        } else {
            print "<td class=\"rowfollow\">" . number_format($row["times_completed"]) . "</td>\n";
        }
        if ($row["anonymous"] == "yes" && get_user_class() >= $torrentmanage_class) {
            print "<td class=\"rowfollow\" align=\"center\"><i>" . $lang_functions['text_anonymous'] . "</i><br />" . (isset($row["owner"]) ? "(" . get_username($row["owner"]) . ")" : "<i>" . $lang_functions['text_orphaned'] . "</i>") . "</td>\n";
        } elseif ($row["anonymous"] == "yes") {
            print "<td class=\"rowfollow\"><i>" . $lang_functions['text_anonymous'] . "</i></td>\n";
        } else {
            print "<td class=\"rowfollow\">" . (isset($row["owner"]) ? get_username($row["owner"]) : "<i>" . $lang_functions['text_orphaned'] . "</i>") . "</td>\n";
        }
        if (get_user_class() >= $torrentmanage_class) {
            print "<td class=\"rowfollow\"><a href=\"" . htmlspecialchars("fastdelete.php?id=" . $row[id]) . "\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"" . $lang_functions['text_delete'] . "\" /></a>";
            print "<br /><a href=\"edit.php?returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><img class=\"staff_edit\" src=\"pic/trans.gif\" alt=\"E\" title=\"" . $lang_functions['text_edit'] . "\" /></a></td>\n";
        }
        print "</tr>\n";
        $counter++;
    }
    print "</table>";
    if ($CURUSER['appendpromotion'] == 'highlight') {
        print "<p align=\"center\"> " . $lang_functions['text_promoted_torrents_note'] . "</p>\n";
    }
    if ($enabletooltip_tweak == 'yes' && (!isset($CURUSER) || $CURUSER['showlastcom'] == 'yes')) {
        create_tooltip_container($lastcom_tooltip, 400);
    }
    create_tooltip_container($torrent_tooltip, 500);
}
Exemplo n.º 3
0
     $team_info = "&nbsp;&nbsp;&nbsp;<b>" . $lang_details['text_team'] . "&nbsp;</b>" . $row[team_name];
 }
 if (isset($row["audiocodec_name"])) {
     $audiocodec_info = "&nbsp;&nbsp;&nbsp;<b>" . $lang_details['text_audio_codec'] . "&nbsp;</b>" . $row[audiocodec_name];
 }
 tr($lang_details['row_basic_info'], $size_info . $type_info . $source_info . $medium_info . $codec_info . $audiocodec_info . $standard_info . $processing_info . $team_info, 1);
 if ($CURUSER['seedbonus'] < -1000) {
     $bonusnotic = $lang_details['text_bonusnotic'];
 }
 if ($CURUSER["downloadpos"] != "no") {
     $download = "<a title=\"" . $lang_details['title_download_torrent'] . "\" href=\"download.php?id=" . $id . "\"><img class=\"dt_download\" src=\"pic/trans.gif\" alt=\"download\" />&nbsp;<b><font class=\"small\">" . $lang_details['text_download_torrent'] . $bonusnotic . "</font></b></a>&nbsp;|&nbsp;";
 } else {
     $download = "";
 }
 $release = $row["status"] == "candidate" && get_user_class() >= $torrentmanage_class ? "<a href=\"delete.php?id={$id}&recycle_mode=release\"><b><font class=\"small\">发布</font></b></a>&nbsp;|&nbsp;" : "";
 tr($lang_details['row_action'], $download . ($owned == 1 ? "<{$editlink}><img class=\"dt_edit\" src=\"pic/trans.gif\" alt=\"edit\" />&nbsp;<b><font class=\"small\">" . $lang_details['text_edit_torrent'] . "</font></b></a>&nbsp;|&nbsp;" : "") . $release . (get_user_class() >= $askreseed_class && $row[seeders] == 0 ? "<a title=\"" . $lang_details['title_ask_for_reseed'] . "\" href=\"takereseed.php?reseedid={$id}\"><img class=\"dt_reseed\" src=\"pic/trans.gif\" alt=\"reseed\">&nbsp;<b><font class=\"small\">" . $lang_details['text_ask_for_reseed'] . "</font></b></a>&nbsp;|&nbsp;" : "") . "<a title=\"引用发布\" href=\"upload.php?cite_torrent_id={$id}\">&nbsp;<b><font class=\"small\">" . 引用发布 . "</font></b></a>&nbsp;&nbsp;|&nbsp;&nbsp;" . "<a title=\"" . $lang_details['title_report_torrent'] . "\" href=\"report.php?torrent={$id}\"><img class=\"dt_report\" src=\"pic/trans.gif\" alt=\"report\" />&nbsp;<b><font class=\"small\">" . $lang_details['text_report_torrent'] . "</font></b></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a id=\"bookmark0\" href=\"javascript: bookmark(" . $row['id'] . ",0);\">" . get_torrent_bookmark_state($CURUSER['id'], $row['id'], false) . "<b><font class=\"small\">" . $lang_details['bookmark'] . "</font></b></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"usebonus.php?id={$id}#torrentid\"><b>购买促销</b></a>", 1);
 //tr($lang_details['row_share'], "<div id=\"ckepop\"><a class=\"jiathis_button_tools_1\"></a><a class=\"jiathis_button_tools_2\"></a><a class=\"jiathis_button_tools_3\"></a><a class=\"jiathis_button_tools_4\"></a><a href=\"http://www.jiathis.com/share\" class=\"jiathis jiathis_txt jiathis_separator jtico jtico_jiathis\" target=\"_blank\">更多</a><a class=\"jiathis_counter_style\"></a></div><script type=\"text/javascript\" >var jiathis_config={siteNum:12,sm:\"qzone,tsina,tqq,renren,t163,douban,baidu,tieba,xiaoyou,hi,mop,tianya\",summary:\"\",hideMore:true}</script><script type=\"text/javascript\" src=\"http://v2.jiathis.com/code/jia.js\" charset=\"utf-8\"></script>", 1);
 // ---------------- start subtitle block -------------------//
 $r = sql_query("SELECT subs.*, language.flagpic, language.lang_name FROM subs LEFT JOIN language ON subs.lang_id=language.id WHERE torrent_id = " . sqlesc($row["id"]) . " ORDER BY subs.lang_id ASC") or sqlerr(__FILE__, __LINE__);
 print "<tr><td class=\"rowhead\" valign=\"top\">" . $lang_details['row_subtitles'] . "</td>";
 print "<td class=\"rowfollow\" align=\"left\" valign=\"top\">";
 print "<table border=\"0\" cellspacing=\"0\">";
 if (mysql_num_rows($r) > 0) {
     while ($a = mysql_fetch_assoc($r)) {
         $lang = "<tr><td class=\"embedded\"><img border=\"0\" src=\"pic/flag/" . $a["flagpic"] . "\" alt=\"" . $a["lang_name"] . "\" title=\"" . $a["lang_name"] . "\" style=\"padding-bottom: 4px\" /></td>";
         $lang .= "<td class=\"embedded\">&nbsp;&nbsp;<a href=\"downloadsubs.php?torrentid=" . $a[torrent_id] . "&subid=" . $a[id] . "\"><u>" . $a["title"] . "</u></a>" . (get_user_class() >= $submanage_class || get_user_class() >= $delownsub_class && $a["uppedby"] == $CURUSER["id"] ? " <font class=\"small\"><a href=\"subtitles.php?delete=" . $a[id] . "\">[" . $lang_details['text_delete'] . "</a>]</font>" : "") . "</td><td class=\"embedded\">&nbsp;&nbsp;" . ($a["anonymous"] == 'yes' ? $lang_details['text_anonymous'] . (get_user_class() >= $viewanonymous_class ? get_username($a['uppedby'], false, true, true, false, true) : "") : get_username($a['uppedby'])) . "</td></tr>";
         print $lang;
     }
 } else {
     print "<tr><td class=\"embedded\">" . $lang_details['text_no_subtitles'] . "</td></tr>";
 }