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


PHP linkcolor函数代码示例

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


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

示例1: torrenttable


//.........这里部分代码省略.........
                    </span>
                    </a>
                    </span>
                    <span id="remove' . $id . '"' . $rm_status . '>
                    <a href="bookmark.php?torrent=' . $id . '&amp;action=delete" class="remove" name="' . $id . '">
                    <span class="remove_bookmark_b"><img src="' . $INSTALLER09['pic_base_url'] . 'aff_cross.gif" align="top" width="14px" alt="Delete Bookmark!" title="Delete Bookmark!" />
                    </span>
                    </a>
                    </span><br />';
        if ($variant == "index") {
            $htmlout .= "{$bookmark}";
        }
        $Subs = '';
        if (in_array($row["category"], $INSTALLER09['movie_cats']) && !empty($row["subs"])) {
            $subs_array = explode(",", $row["subs"]);
            require_once CACHE_DIR . 'subs.php';
            foreach ($subs_array as $k => $sid) {
                foreach ($subs as $sub) {
                    if ($sub["id"] == $sid) {
                        $Subs = "<img border='0' width='16px' style='padding:3px;' src='" . htmlsafechars($sub["pic"]) . "' alt='" . htmlsafechars($sub["name"]) . "' title='" . htmlsafechars($sub["name"]) . "' />";
                    }
                }
            }
        } else {
            $Subs = "---";
        }
        if ($row["type"] == "single") {
            $htmlout .= "<b>Files:</b>" . (int) $row["numfiles"] . "<br />";
        } else {
            if ($variant == "index") {
                $htmlout .= "<b>Files:&nbsp;<a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b><br />";
            } else {
                $htmlout .= "<b>Files:&nbsp;<a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b><br />";
            }
        }
        $htmlout .= "Size:&nbsp;" . str_replace(" ", " ", mksize($row["size"])) . "\n";
        if ($row["times_completed"] != 1) {
            $_s = "" . $lang["torrenttable_time_plural"] . "";
        } else {
            $_s = "" . $lang["torrenttable_time_singular"] . "";
        }
        $What_Script_S = XBT_TRACKER == true ? 'snatches_xbt.php?id=' : 'snatches.php?id=';
        $htmlout .= "<br />Snatches:<a href='{$What_Script_S}" . "{$id}'>{$_s}&nbsp;<b>downloaded</b>&nbsp;" . number_format($row["times_completed"]) . "</a>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                $What_Script_P = XBT_TRACKER == true ? 'peerlist_xbt.php?id=' : 'peerlist.php?id=';
                $htmlout .= "<br /><b>Seeders:</b>&nbsp;<b><a href='{$What_Script_P}" . "{$id}#seeders'><font color='" . get_slr_color($ratio) . "'>" . (int) $row["seeders"] . "</font></a></b>&nbsp;\n";
            } else {
                $What_Script_P = XBT_TRACKER == true ? 'peerlist_xbt.php?id=' : 'peerlist.php?id=';
                $htmlout .= "<br /><b>Seeders:</b>&nbsp;<b><a class='" . linkcolor($row["seeders"]) . "' href='{$What_Script_P}" . "{$id}#seeders'>" . (int) $row["seeders"] . "</a></b>&nbsp;\n";
            }
        } else {
            $htmlout .= "<br /><b>Seeders:</b>&nbsp;<span class='" . linkcolor($row["seeders"]) . "'>" . (int) $row["seeders"] . "</span>\n";
        }
        if ($row["leechers"]) {
            $What_Script_P = XBT_TRACKER == true ? 'peerlist_xbt.php?id=' : 'peerlist.php?id=';
            if ($variant == "index") {
                $htmlout .= "<b><a href='{$What_Script_P}" . "{$id}#leechers'>" . number_format($row["leechers"]) . "</a></b>\n";
            } else {
                $htmlout .= "<b><a class='" . linkcolor($row["leechers"]) . "' href='{$What_Script_P}" . "{$id}#leechers'>" . (int) $row["leechers"] . "</a></b>\n";
            }
        } else {
            $htmlout .= "<b>Leechers:</b>&nbsp;0\n";
        }
        if ($variant == "index") {
            $htmlout .= "<br /><b>Upped By:</b>&nbsp;" . (isset($row["username"]) ? $row["anonymous"] == "yes" && $CURUSER['class'] < UC_STAFF && $row['owner'] != $CURUSER['id'] ? "<i>" . $lang['torrenttable_anon'] . "</i>" : "<a href='userdetails.php?id=" . (int) $row["owner"] . "'><b>" . htmlsafechars($row["username"]) . "</b></a>" : "<i>(" . $lang["torrenttable_unknown_uploader"] . ")</i>") . "\n";
        }
        if ($CURUSER['class'] >= UC_STAFF) {
            $url = "edit.php?id=" . (int) $row["id"];
            if (isset($_GET["returnto"])) {
                $addthis = "&amp;returnto=" . urlencode($_GET["returnto"]);
                $url .= $addthis;
            }
            $editlink = "a href=\"{$url}\" class=\"sublink\"";
            $del_link = $CURUSER['class'] === UC_MAX ? "<a href='fastdelete.php?id=" . (int) $row['id'] . "'>&nbsp;<img src='pic/button_delete2.gif' alt='Fast Delete' title='Fast Delete' /></a>" : "";
            $htmlout .= "<br />\n<b>Added:&nbsp;" . get_date($row['added'], 'DATE') . "</b><br />" . $imdb . "<b>Subtitle:&nbsp;{$Subs}</b><br />";
            if (!$row["comments"]) {
                $htmlout .= "<b>Comments:</b>&nbsp;" . (int) $row["comments"] . "\n";
            } else {
                if ($variant == "index") {
                    $htmlout .= "<b>Comments:</b>&nbsp;<b><a href='details.php?id={$id}&amp;hit=1&amp;tocomm=1'>" . (int) $row["comments"] . "</a></b>\n";
                } else {
                    $htmlout .= "<b>Comments:</b>&nbsp;<b><a href='details.php?id={$id}&amp;page=0#startcomments'>" . (int) $row["comments"] . "</a></b>\n";
                }
            }
            if ($CURUSER['class'] >= UC_STAFF) {
                $htmlout .= "<br /><b>Tools:</b>&nbsp;";
            }
            $htmlout .= "<{$editlink}><img src='pic/button_edit2.gif' alt='Fast Edit' title='Fast Edit' /></a>{$del_link}";
        }
        $htmlout .= "</div></table><br /></div><div style='display:block;width:5px;'></div>";
    }
    $htmlout .= "</div></div>\n";
    return $htmlout;
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:101,代码来源:torrenttable_functions_catalogue.php

示例2: unset

unset($ruploaded);
if ($numtorrent > 0) {
    list($pagertop, $pagerbottom, $limit) = pager($utorrents == 0 ? 15 : $utorrents, $numtorrent, "index.php?page=usercp&amp;uid={$uid}&amp;");
    $usercptpl->set("pagertop", $pagertop);
    $resuploaded = do_sqlquery("SELECT f.filename, UNIX_TIMESTAMP(f.data) as added, f.size, {$tseeds} as seeds, {$tleechs} as leechers, {$tcompletes} as finished, f.info_hash as hash FROM {$ttables} WHERE uploader={$uid} ORDER BY data DESC {$limit}", true);
}
if ($resuploaded && mysql_num_rows($resuploaded) > 0) {
    include "include/offset.php";
    $usercptpl->set("RESULTS", true, true);
    $uptortpl = array();
    $i = 0;
    while ($rest = mysql_fetch_assoc($resuploaded)) {
        $uptortpl[$i]["filename"] = cut_string(unesc($rest["filename"]), intval($btit_settings["cut_name"]));
        $uptortpl[$i]["added"] = date("d/m/Y", $rest["added"] - $offset);
        $uptortpl[$i]["size"] = makesize($rest["size"]);
        $uptortpl[$i]["seedcolor"] = linkcolor($rest["seeds"]);
        $uptortpl[$i]["seeds"] = $rest[seeds];
        $uptortpl[$i]["leechcolor"] = linkcolor($rest["leechers"]);
        $uptortpl[$i]["leechers"] = $rest[leechers];
        $uptortpl[$i]["completed"] = $rest["finished"] > 0 ? $rest["finished"] : "---";
        $uptortpl[$i]["editlink"] = "index.php?page=edit&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["dellink"] = "index.php?page=delete&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["editimg"] = image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]);
        $uptortpl[$i]["delimg"] = image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]);
        $i++;
    }
    $usercptpl->set("uptor", $uptortpl);
} else {
    $usercptpl->set("RESULTS", false, true);
    $usercptpl->set("pagertop", "");
}
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:usercp.main.php

示例3: torrenttable


//.........这里部分代码省略.........
        //////////////////////////////////////////
        if (!$row["comments"]) {
            echo "<td align=\"right\">" . $row["comments"] . "</td>\n";
        } else {
            if ($variant == "index") {
                echo "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;hit=1&amp;tocomm=1\">" . $row["comments"] . "</a></b></td>\n";
            } else {
                echo "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n";
            }
        }
        // ////Hide the quick download if download disabled/////
        if ($CURUSER["downloadpos"] == 'no') {
            echo "<td class=embedded><img src=" . $pic_base_url . "downloadpos.gif alt='no download' style='margin-left: 4pt' /></td>\n";
        } else {
            if ($CURUSER["downloadpos"] == 'yes') {
                echo "<td align=\"center\"><a href=\"/download.php/{$id}/" . rawurlencode($row["filename"]) . "\"><img src=pic/download.gif border=0 alt=Download /></a></td>\n";
            }
        }
        // Progressbar Mod
        // /comment out to remove indicator on browse//////
        $seedersProgressbar = array();
        $leechersProgressbar = array();
        $progressPerTorrent = 0;
        $iProgressbar = 0;
        if (isset($progress[$row["id"]])) {
            foreach ($progress[$row["id"]] as $rowProgressbar) {
                $progressPerTorrent += sprintf("%.2f", 100 * (1 - $rowProgressbar["to_go"] / $rowProgressbar["size"]));
                $iProgressbar++;
            }
        }
        if ($iProgressbar == 0) {
            $iProgressbar = 1;
        }
        $progressTotal = sprintf("%.2f", $progressPerTorrent / $iProgressbar);
        $picProgress = get_percent_completed_image(floor($progressTotal)) . "<br/>(" . round($progressTotal) . "%)";
        echo "<td align=center>{$picProgress}</td>\n";
        // End Progress Bar mod//////////////////////////
        echo "<td align=center>" . str_replace(" ", "<br/>", prefixed($row["size"])) . "</td>\n";
        $_s = "";
        if ($row["times_completed"] != 1) {
            $_s = "s";
        }
        if (get_user_class() >= UC_MODERATOR) {
            echo "<td align=center>" . ($row["times_completed"] > 0 ? "<a href=snatches.php?id={$id}>" . safeChar(number_format($row["times_completed"])) . "<br/>time{$_s}</a>" : "0 times") . "</td>\n";
        } else {
            echo "<td align=center>" . ($row["times_completed"] > 0 ? "" . safeChar(number_format($row["times_completed"])) . "<br/>time{$_s}</a>" : "0 times") . "</td>\n";
        }
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                echo "<td align=right><b><a href=details.php?id={$id}&amp;hit=1#seeders><font color=" . get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n";
            } else {
                echo "<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"details.php?id={$id}#seeders\">" . $row["seeders"] . "</a></b></td>\n";
            }
        } else {
            echo "<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n";
        }
        $peerlink = '';
        if ($row["leechers"]) {
            if ($variant == "index") {
                echo "<td align=right><b><a href=details.php?id={$id}&amp;hit=1&amp;#leechers>" . number_format($row["leechers"]) . ($peerlink ? "</a>" : "") . "</b></td>\n";
            } else {
                echo "<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"details.php?id={$id}#leechers\">" . $row["leechers"] . "</a></b></td>\n";
            }
        } else {
            echo "<td align=\"right\">0</td>\n";
        }
        // //Anonymous and delete torrent begin
        if ($variant == "index") {
            if ($row["anonymous"] == "yes") {
                echo "<td align=center><i>Anonymous</i></td>\n";
                if (get_user_class() >= UC_MODERATOR) {
                    echo "<td align=\"center\" bgcolor=\"#FF0000\"><input type=\"checkbox\" name=\"delete[]\" value=\"" . safeChar($id) . "\" /></td>\n";
                }
            } else {
                if ($variant == "index") {
                    if ($CURUSER["view_uclass"] == 'yes') {
                        echo "<td align=center>" . (isset($row["username"]) ? "<a href=userdetails.php?id=" . $row["owner"] . "><font color=\"#" . get_user_class_color($row["uclass"]) . "\">" . safeChar($row["username"]) . "</font></a>" : "<i>(unknown)</i>") . "</td>\n";
                    } else {
                        echo "<td align=center>" . (isset($row["username"]) ? "<a href=userdetails.php?id=" . $row["owner"] . "><b>" . safechar($row["username"]) . "</b></a>" : "<i>(unknown)</i>") . "</td>\n";
                    }
                }
                // ///////modified Delete torrent with anonymous uploader
                if (get_user_class() >= UC_MODERATOR) {
                    echo "<td align=\"center\" bgcolor=\"#FF0000\"><input type=\"checkbox\" name=\"delete[]\" value=\"" . safeChar($id) . "\" /></td>\n";
                }
            }
        }
        echo "</tr>\n";
        echo "<tr id=\"kdescr" . $row["id"] . "\"style=\"display:none;\"><td width=\"90%\"  colspan=\"" . (get_user_class() >= UC_MODERATOR ? "15" : "13") . "\">" . $descr . "</td></tr>\n";
    }
    if (get_user_class() >= UC_MODERATOR) {
        echo "<tr ><td align=\"center\" colspan=16><input type=submit value=Delete /></td></tr>\n";
    }
    echo "</table></form>\n";
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:101,代码来源:function_torrenttable.php

示例4: torrenttable


//.........这里部分代码省略.........
                print "<td align='center'><span style=\"white-space: nowrap;\">None</span></td>\n";
            }
        }
        /*
                if ($row["nfoav"] && get_user_class() >= UC_POWER_USER)
                  print("<a href='viewnfo.php?id=$row[id]''><img src=\"{$pic_base_url}viewnfo.gif" border='0' alt='View NFO' /></a>\n");
                if ($variant == "index")
                    print("<a href=\"download.php/$id/" . rawurlencode($row["filename"]) . "\"><img src=\"{$pic_base_url}download.gif\" border='0' alt='Download' /></a>\n");
        
                else */
        if ($variant == "mytorrents") {
            print "</td><td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\">edit</a>\n";
        }
        print "</td>\n";
        if ($variant == "mytorrents") {
            print "<td align=\"right\">";
            if ($row["visible"] == "no") {
                print "<b>no</b>";
            } else {
                print "yes";
            }
            print "</td>\n";
        }
        if ($row["type"] == "single") {
            print "<td align=\"right\">" . $row["numfiles"] . "</td>\n";
        } else {
            if ($variant == "index") {
                print "<td align=\"right\"><b><a href=\"filelist.php?id={$id}\">" . $row["numfiles"] . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a href=\"filelist.php?id={$id}\">" . $row["numfiles"] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            print "<td align=\"right\">" . $row["comments"] . "</td>\n";
        } else {
            if ($variant == "index") {
                print "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;hit=1&amp;tocomm=1\">" . $row["comments"] . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n";
            }
        }
        /*
                print("<td align=\"center\">");
                if (!isset($row["rating"]))
                    print("---");
                else {
                    $rating = round($row["rating"] * 2) / 2;
                    $rating = ratingpic($row["rating"]);
                    if (!isset($rating))
                        print("---");
                    else
                        print($rating);
                }
                print("</td>\n");
        */
        print "<td align='center'><span style=\"white-space: nowrap;\">" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
        #	$ttl = (28*24) - floor((time() - $row["added"]) / 3600);
        #	if ($ttl == 1) $ttl .= "<br />hour"; else $ttl .= "<br />hours";
        #print("<td align='center'>$ttl</td>\n");
        print "<td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
        //        print("<td align=\"right\">" . $row["views"] . "</td>\n");
        //        print("<td align=\"right\">" . $row["hits"] . "</td>\n");
        $_s = "";
        if ($row["times_completed"] != 1) {
            $_s = "s";
        }
        print "<td align='center'>" . number_format($row["times_completed"]) . "<br />time{$_s}</td>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                print "<td align='right'><b><a href='peerlist.php?id={$id}#seeders'><font color='" . get_slr_color($ratio) . "'>" . $row["seeders"] . "</font></a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"peerlist.php?id={$id}#seeders\">" . $row["seeders"] . "</a></b></td>\n";
            }
        } else {
            print "<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n";
        }
        if ($row["leechers"]) {
            if ($variant == "index") {
                print "<td align='right'><b><a href='peerlist.php?id={$id}#leechers'>" . number_format($row["leechers"]) . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"peerlist.php?id={$id}#leechers\">" . $row["leechers"] . "</a></b></td>\n";
            }
        } else {
            print "<td align=\"right\">0</td>\n";
        }
        #license
        print "<td align='center'><a href=\"" . $row["lic_url"] . "\"target=\"_blank\">" . $row["lic_name"] . "</a></td>";
        if ($variant == "index") {
            print "<td align='center'>" . (isset($row["username"]) ? "<a href='browse.php?user=" . $row["owner"] . "'><b>" . htmlspecialchars($row["username"]) . "</b></a>" : "<i>(unknown)</i>") . "</td>\n";
        }
        print "</tr>\n";
    }
    print "</table>\n";
    //return $rows;
}
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:101,代码来源:torrenttable_functions.php

示例5: elseif

 } elseif ($SHOW_UPLOADER && $data["anonymous"] == "false") {
     echo "\t<td align='center' class='lista'><a href='userdetails.php?id=" . (int) $data["upname"] . "'>" . StripSlashes($data['prefixcolor'] . security::html_safe($data["uploader"]) . $data['suffixcolor']) . "</a></td>\n";
 }
 //Uploaders nick details
 if ($data["external"] == "no") {
     echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["seeds"] . "</a></td>\n";
     echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["leechers"] . "</a></td>\n";
     if ($data["finished"] > 0) {
         echo "\t<td align='center' class='lista'><a href='torrent_history.php?id=" . $data["hash"] . "' title='History - " . security::html_safe($data["filename"]) . "'>" . number_format((int) $data["finished"], 0) . "</a></td>";
     } else {
         echo "\t<td align='center' class='lista'>---</td>";
     }
 } else {
     // linkcolor
     echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'>" . (int) $data["seeds"] . "</td>";
     echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'>" . (int) $data["leechers"] . "</td>";
     if ($data["finished"] > 0) {
         echo "\t<td align='center' class='lista'>" . number_format((int) $data["finished"], 0) . "</td>";
     } else {
         echo "\t<td align='center' class='lista'>---</td>";
     }
 }
 if ($data["dwned"] > 0) {
     echo "\t<td align='center' class='lista'>" . misc::makesize((int) $data["dwned"]) . "</td>";
 } else {
     echo "\t<td align='center' class='lista'>" . NA . "</td>";
 }
 if ($data["speed"] < 0 || $data["external"] == "yes") {
     $speed = NA;
     echo "\t<td align='center' class='lista'>" . $speed . "</td>\n";
 } else {
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:31,代码来源:torrents.php

示例6: max

         $duration = "<span style=\"color:green\">" . $language["POLL_STILL_ACTIVE"] . "</span>";
     }
     //color for poll state (active or not)
     if ($inf["active"] == "yes") {
         $active = "<span style=\"color:#009900\">" . $language["YES"] . "</span>";
     } else {
         $active = "<span style=\"color:orange\">" . $language["NO"] . "</span>";
     }
     //votes per day
     $elapseddays = max(1, round((time() - $inf["startDate"]) / 86400));
     $votes_per_day = number_format(round($inf["COUNT(memberID)"] / $elapseddays, 2), 2);
     //link for votes page
     if ($inf["COUNT(memberID)"] == "0") {
         $vote = "<span style=\"color:" . linkcolor($inf["COUNT(memberID)"]) . "\">" . $inf["COUNT(memberID)"] . "</span>";
     } else {
         $vote = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=poller&amp;votes=" . $inf["ID"] . "&amp;voters=" . $inf["COUNT(memberID)"] . "\"><span style=\"color:" . linkcolor($inf["COUNT(memberID)"]) . "\">" . $inf["COUNT(memberID)"] . " (" . $votes_per_day . "/day)</span></a>";
     }
     //print information row about poll
     $polls[$i]["bold"] = $bold;
     $polls[$i]["id"] = $inf["ID"];
     $polls[$i]["startdate"] = get_date_time($inf["startDate"]);
     $polls[$i]["enddate"] = $endDate;
     $polls[$i]["duration"] = $duration;
     $polls[$i]["pollertitle"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=poller&amp;id=" . $inf["ID"] . "\">" . $inf["pollerTitle"] . "</a>";
     $polls[$i]["starter"] = "<a href=\"index.php?page=userdetails&amp;id=" . $inf["starterID"] . "\">" . StripSlashes($inf["prefixcolor"] . $inf["username"] . $inf["suffixcolor"]) . "</a>";
     $polls[$i]["active"] = $active;
     $polls[$i]["vote"] = $vote;
     $i++;
 }
 $admintpl->set("show_poller", false, true);
 $admintpl->set("new_poll", false, true);
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:admin.polls.php

示例7: rawurlencode

    } else {
        $mult = "";
    }
    echo "<TR>";
    echo "<td align=\"center\" class=\"lista\"><center><a href=\"download.php?id=" . $results["hash"] . "&amp;f=" . rawurlencode($results["filename"]) . ".torrent\">" . image_or_link("images/torrent.png", "", "torrent") . "</a></td>";
    if ($GLOBALS["usepopup"]) {
        echo "<td align=\"center\" class=\"lista\"><center><A HREF=\"javascript:popdetails('index.php?page=torrent-details&amp;id=" . $results["hash"] . "');\">" . $results["filename"] . $mult . $gold . $free . $vt . "</a>" . ($results["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
    } else {
        echo "<td align=\"center\" class=\"lista\"><center><A HREF=\"index.php?page=torrent-details&amp;id=" . $results["hash"] . "\">" . $results["filename"] . $mult . $gold . $free . $vt . "</a>" . ($results["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
    }
    echo "<td align=\"center\" class=\"lista\"><center><a href=\"index.php?page=torrents&amp;category={$results['catid']}\">" . image_or_link($results["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $results["image"], "", $results["cname"]) . "</td>";
    echo "<td align=\"center\" class=\"lista\"><center>" . date("d/m/Y", $results["added"]) . "</td>";
    // data
    if ($results["anonymous"] == "true") {
        echo "<td align=\"center\" class=\"lista\">" . ANONYMOUS . "</td>";
    } else {
        echo "<td align=\"center\" class=\"lista\"><center>" . $results["prefixcolor"] . $results["uploader"] . $results["suffixcolor"] . "</td>";
    }
    if ($GLOBALS["usepopup"]) {
        echo "\t<td align=\"center\" class=\"" . linkcolor($results["seeds"]) . "\"><a href=\"javascript:poppeer('index.php?page=peers.php?id=" . $results["hash"] . "');\" title=\"" . PEERS_DETAILS . "\">" . $results["seeds"] . "</a></td>\n";
        echo "\t<td align=\"center\" class=\"" . linkcolor($results["leechers"]) . "\"><a href=\"javascript:poppeer('index.php?page=peers.php?id=" . $results["hash"] . "');\" title=\"" . PEERS_DETAILS . "\">" . $results["leechers"] . "</a></td>\n";
    } else {
        echo "\t<td align=\"center\" class=\"" . linkcolor($results["seeds"]) . "\"style=\"text-align: center; " . $pcs . "\"><a href=\"index.php?page=peers.php?id=" . $results["hash"] . "\" title=\"" . PEERS_DETAILS . "\">" . $results["seeds"] . "</a></td>\n";
        echo "\t<td align=\"center\" class=\"" . linkcolor($results["leechers"]) . "\"style=\"text-align: center; " . $pcl . "\"><a href=\"index.php?page=peers.php?id=" . $results["hash"] . "\" title=\"" . PEERS_DETAILS . "\">" . $results["leechers"] . "</a></td>\n";
    }
    echo "<td align=\"center\" class=\"lista\"><center>" . $results["user_name"] . "</td>";
    echo "</TR>";
}
echo "</table>";
print "<br />";
print "<br />";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:recommended_block.php

示例8: bookmarktable


//.........这里部分代码省略.........
            if (isset($row["cat_pic"]) && $row["cat_pic"] != "") {
                $htmlout .= "<img border='0' src='{$INSTALLER09['pic_base_url']}caticons/{$CURUSER['categorie_icon']}/" . htmlsafechars($row['cat_pic']) . "' alt='" . htmlsafechars($row['cat_name']) . "' />";
            } else {
                $htmlout .= htmlsafechars($row["cat_name"]);
            }
            $htmlout .= "</a>";
        } else {
            $htmlout .= "-";
        }
        $htmlout .= "</td>\n";
        $dispname = htmlsafechars($row["name"]);
        $htmlout .= "<td align='left'><a href='details.php?";
        if ($variant == "mytorrents") {
            $htmlout .= "returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;";
        }
        $htmlout .= "id={$id}";
        if ($variant == "index") {
            $htmlout .= "&amp;hit=1";
        }
        $htmlout .= "'><b>{$dispname}</b></a>&nbsp;</td>\n";
        $htmlout .= $variant == "index" ? "<td align='center'><a href='bookmark.php?torrent={$id}&amp;action=delete'><img src='{$INSTALLER09['pic_base_url']}aff_cross.gif' border='0' alt='Delete Bookmark!' title='Delete Bookmark!' /></a></td>" : "";
        $htmlout .= $variant == "index" ? "<td align='center'><a href='download.php?torrent={$id}'><img src='{$INSTALLER09['pic_base_url']}zip.gif' border='0' alt='Download Bookmark!' title='Download Bookmark!' /></a></td>" : "";
        $bm = sql_query("SELECT * FROM bookmarks WHERE torrentid=" . sqlesc($id) . " && userid=" . sqlesc($CURUSER['id']));
        $bms = mysqli_fetch_assoc($bm);
        if ($bms['private'] == 'yes' && $bms['userid'] == $CURUSER['id']) {
            $makepriv = "<a href='bookmark.php?torrent={$id}&amp;action=public'><img src='{$INSTALLER09['pic_base_url']}key.gif' border='0' alt='Mark Bookmark Public!' title='Mark Bookmark Public!' /></a>";
            $htmlout .= "" . ($variant == "index" ? "<td align='center'>{$makepriv}</td>" : "");
        } elseif ($bms['private'] == 'no' && $bms['userid'] == $CURUSER['id']) {
            $makepriv = "<a href='bookmark.php?torrent=" . $id . "&amp;action=private'><img src='{$INSTALLER09['pic_base_url']}public.gif' border='0' alt='Mark Bookmark Private!' title='Mark Bookmark Private!' /></a>";
            $htmlout .= "" . ($variant == "index" ? "<td align='center'>{$makepriv}</td>" : "");
        }
        if ($variant == "mytorrents") {
            $htmlout .= "</td><td align='center'><a href='edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . (int) $row["id"] . "'>{$lang["torrenttable_edit"]}</a>\n";
        }
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='right'>";
            if ($row["visible"] == "no") {
                $htmlout .= "<b>" . $lang["torrenttable_not_visible"] . "</b>";
            } else {
                $htmlout .= "" . $lang["torrenttable_visible"] . "";
            }
            $htmlout .= "</td>\n";
        }
        if ($row["type"] == "single") {
            $htmlout .= "<td align='right'>" . (int) $row['numfiles'] . "</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row['numfiles'] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row['numfiles'] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            $htmlout .= "<td align='right'>" . (int) $row['comments'] . "</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;hit=1&amp;tocomm=1'>" . (int) $row['comments'] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;page=0#startcomments'>" . (int) $row['comments'] . "</a></b></td>\n";
            }
        }
        $htmlout .= "<td align='center'><span style='white-space: nowrap;'>" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
        $htmlout .= "<td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
        if ($row["times_completed"] != 1) {
            $_s = "" . $lang["torrenttable_time_plural"] . "";
        } else {
            $_s = "" . $lang["torrenttable_time_singular"] . "";
        }
        $htmlout .= "<td align='center'><a href='snatches.php?id={$id}'>" . number_format($row["times_completed"]) . "<br />{$_s}</a></td>\n";
        if ((int) $row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = (int) $row["seeders"] / (int) $row["leechers"];
                } else {
                    $ratio = 1;
                }
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#seeders'><font color='" . get_slr_color($ratio) . "'>" . (int) $row['seeders'] . "</font></a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["seeders"]) . "' href='peerlist.php?id={$id}#seeders'>" . (int) $row['seeders'] . "</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'><span class='" . linkcolor($row["seeders"]) . "'>" . (int) $row['seeders'] . "</span></td>\n";
        }
        if ((int) $row["leechers"]) {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#leechers'>" . number_format($row["leechers"]) . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["leechers"]) . "' href='peerlist.php?id={$id}#leechers'>" . (int) $row['leechers'] . "</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'>0</td>\n";
        }
        if ($variant == "index") {
            $htmlout .= "<td align='center'>" . (isset($row["username"]) ? "<a href='userdetails.php?id=" . (int) $row['owner'] . "'><b>" . htmlsafechars($row["username"]) . "</b></a>" : "<i>(" . $lang["torrenttable_unknown_uploader"] . ")</i>") . "</td>\n";
        }
        $htmlout .= "</tr>\n";
    }
    $htmlout .= "</table>\n";
    return $htmlout;
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:101,代码来源:bookmarks.php

示例9: sharetable

function sharetable($res, $variant = "index")
{
    global $INSTALLER09, $CURUSER, $lang;
    $htmlout = '';
    $htmlout .= "\r\n<span>Icon Legend :\r\n<img src='{$INSTALLER09['pic_base_url']}plus.gif' alt='Delete Bookmark' border='none' /> = Delete Bookmark |\r\n<img src='{$INSTALLER09['pic_base_url']}download.gif' alt='Download Bookmark' border='none' />= Download Torrent |\r\n<img alt='Bookmark is Private' src='{$INSTALLER09['pic_base_url']}key.gif' border='none'  /> = Bookmark is Private |\r\n<img src='{$INSTALLER09['pic_base_url']}public.gif' alt='Bookmark is Public' border='none'  /> = Bookmark is Public</span>\r\n<table border='1' cellspacing='0' cellpadding='5'>\r\n<tr>\r\n<td class='colhead' align='center'>Type</td>\r\n<td class='colhead' align='left'>Name</td>";
    $userid = (int) $_GET['id'];
    if ($CURUSER['id'] == $userid) {
        $htmlout .= ($variant == 'index' ? '<td class="colhead" align="center">Download</td><td class="colhead" align="right">' : '') . 'Delete</td>';
    } else {
        $htmlout .= ($variant == 'index' ? '<td class="colhead" align="center">Download</td><td class="colhead" align="right">' : '') . 'Bookmark</td>';
    }
    if ($variant == "mytorrents") {
        $htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_edit"]}</td>\n";
        $htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_visible"]}</td>\n";
    }
    $htmlout .= "<td class='colhead' align='right'>{$lang["torrenttable_files"]}</td>\r\n   <td class='colhead' align='right'>{$lang["torrenttable_comments"]}</td>\r\n   <td class='colhead' align='center'>{$lang["torrenttable_added"]}</td>\r\n   <td class='colhead' align='center'>{$lang["torrenttable_size"]}</td>\r\n   <td class='colhead' align='center'>{$lang["torrenttable_snatched"]}</td>\r\n   <td class='colhead' align='right'>{$lang["torrenttable_seeders"]}</td>\r\n   <td class='colhead' align='right'>{$lang["torrenttable_leechers"]}</td>";
    if ($variant == 'index') {
        $htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_uppedby"]}</td>\n";
    }
    $htmlout .= "</tr>\n";
    while ($row = mysql_fetch_assoc($res)) {
        $id = $row["id"];
        $htmlout .= "<tr>\n";
        $htmlout .= "<td align='center' style='padding: 0px'>";
        if (isset($row["cat_name"])) {
            $htmlout .= "<a href='browse.php?cat={$row['category']}'>";
            if (isset($row["cat_pic"]) && $row["cat_pic"] != "") {
                $htmlout .= "<img border='0' src='{$INSTALLER09['pic_base_url']}caticons/{$row['cat_pic']}' alt='{$row['cat_name']}' />";
            } else {
                $htmlout .= $row["cat_name"];
            }
            $htmlout .= "</a>";
        } else {
            $htmlout .= "-";
        }
        $htmlout .= "</td>\n";
        $dispname = htmlspecialchars($row["name"]);
        $htmlout .= "<td align='left'><a href='details.php?";
        if ($variant == "mytorrents") {
            $htmlout .= "returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;";
        }
        $htmlout .= "id={$id}";
        if ($variant == "index") {
            $htmlout .= "&amp;hit=1";
        }
        $htmlout .= "'><b>{$dispname}</b></a>&nbsp;</td>";
        $htmlout .= $variant == "index" ? "<td align='center'><a href=\"download.php?torrent=" . $id . "\"><img src='" . $INSTALLER09['pic_base_url'] . "download.gif' border='0' alt='Download Bookmark!' title='Download Bookmark!' /></a></td>" : "";
        $bm = sql_query("SELECT * FROM bookmarks WHERE torrentid={$id} && userid={$CURUSER['id']}");
        $bms = mysql_fetch_assoc($bm);
        $bookmarked = empty($bms) ? '<a href=\'bookmark.php?torrent=' . $id . '&amp;action=add\'><img src=\'' . $INSTALLER09['pic_base_url'] . 'bookmark.gif\' border=\'0\' alt=\'Bookmark it!\' title=\'Bookmark it!\'></a>' : '<a href="bookmark.php?torrent=' . $id . '&amp;action=delete"><img src=\'' . $INSTALLER09['pic_base_url'] . 'plus.gif\' border=\'0\' alt=\'Delete Bookmark!\' title=\'Delete Bookmark!\' /></a>';
        $htmlout .= $variant == "index" ? "<td align='center'>{$bookmarked}</td>" : "";
        if ($variant == "mytorrents") {
            $htmlout .= "</td><td align='center'><a href='edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id={$row['id']}'>" . $lang["torrenttable_edit"] . "</a>\n";
        }
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='right'>";
            if ($row["visible"] == "no") {
                $htmlout .= "<b>" . $lang["torrenttable_not_visible"] . "</b>";
            } else {
                $htmlout .= "" . $lang["torrenttable_visible"] . "";
            }
            $htmlout .= "</td>\n";
        }
        if ($row["type"] == "single") {
            $htmlout .= "<td align='right'>{$row["numfiles"]}</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . $row["numfiles"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . $row["numfiles"] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            $htmlout .= "<td align='right'>{$row["comments"]}</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;hit=1&amp;tocomm=1'>" . $row["comments"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;page=0#startcomments'>" . $row["comments"] . "</a></b></td>\n";
            }
        }
        $htmlout .= "<td align='center'><span style='white-space: nowrap;'>" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
        $htmlout .= "\r\n    <td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
        if ($row["times_completed"] != 1) {
            $_s = "" . $lang["torrenttable_time_plural"] . "";
        } else {
            $_s = "" . $lang["torrenttable_time_singular"] . "";
        }
        $htmlout .= "<td align='center'><a href='snatches.php?id={$id}'>" . number_format($row["times_completed"]) . "<br />{$_s}</a></td>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#seeders'>\r\n                <font color='" . get_slr_color($ratio) . "'>{$row["seeders"]}</font></a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["seeders"]) . "' href='peerlist.php?id={$id}#seeders'>{$row["seeders"]}</a></b></td>\n";
            }
//.........这里部分代码省略.........
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:101,代码来源:sharemarks.php

示例10: linkcolor

     } else {
         $torrents[$i]["classe_seeds"] = linkcolor($data["seeds"]);
         $torrents[$i]["seeds"] = "<a href=\"index.php?page=peers&amp;id=" . $data["hash"] . "\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["seeds"] . "</a>";
         $torrents[$i]["classe_leechers"] = linkcolor($data["leechers"]);
         $torrents[$i]["leechers"] = "<a href=\"index.php?page=peers&amp;id=" . $data["hash"] . "\" title=\"" . $language["PEERS_DETAILS"] . "\">" . $data["leechers"] . "</a>";
         if ($data["finished"] > 0) {
             $torrents[$i]["complete"] = "<a href=\"index.php?page=torrent_history&amp;id=" . $data["hash"] . "\" title=\"History - " . $data["filename"] . "\">" . $data["finished"] . "</a>";
         } else {
             $torrents[$i]["complete"] = "---";
         }
     }
 } else {
     // linkcolor
     $torrents[$i]["classe_seeds"] = linkcolor($data["seeds"]);
     $torrents[$i]["seeds"] = $data["seeds"];
     $torrents[$i]["classe_leechers"] = linkcolor($data["leechers"]);
     $torrents[$i]["leechers"] = $data["leechers"];
     if ($data["finished"] > 0) {
         $torrents[$i]["complete"] = $data["finished"];
     } else {
         $torrents[$i]["complete"] = "---";
     }
 }
 if ($data["dwned"] > 0) {
     $torrents[$i]["downloaded"] = makesize($data["dwned"]);
 } else {
     $torrents[$i]["downloaded"] = $language["NA"];
 }
 if (!$XBTT_USE) {
     if ($data["speed"] < 0 || $data["external"] == "yes") {
         $speed = $language["NA"];
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:torrents.php

示例11: bookmarktable


//.........这里部分代码省略.........
                print "<td align=center><nobr>None</nobr></td>\n";
            }
        }
        /*
        if ($row["nfoav"] && get_user_class() >= UC_POWER_USER)
        print("<a href=viewnfo.php?id=$row[id]><img src=\"{$pic_base_url}viewnfo.gif" border=0 alt='View NFO'></a>\n");
        
        else */
        if ($variant == "mytorrents") {
            print "<td align=\"center\"><a href=\"edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\">edit</a>\n";
        }
        print "</td>\n";
        if ($variant == "mytorrents") {
            print "<td align=\"right\">";
            if ($row["visible"] == "no") {
                print "<b>no</b>";
            } else {
                print "yes";
            }
            print "</td>\n";
        }
        if ($row["type"] == "single") {
            print "<td align=\"right\">" . $row["numfiles"] . "</td>\n";
        } else {
            if ($variant == "index") {
                print "<td align=\"right\"><b><a href=\"filelist.php?id={$id}\">" . $row["numfiles"] . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a href=\"filelist.php?id={$id}\">" . $row["numfiles"] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            print "<td align=\"right\">" . $row["comments"] . "</td>\n";
        } else {
            if ($variant == "index") {
                print "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;hit=1&amp;tocomm=1\">" . $row["comments"] . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a href=\"details.php?id={$id}&amp;page=0#startcomments\">" . $row["comments"] . "</a></b></td>\n";
            }
        }
        /*
        print("<td align=\"center\">");
        if (!isset($row["rating"]))
        print("---");
        else {
        $rating = round($row["rating"] * 2) / 2;
        $rating = ratingpic($row["rating"]);
        if (!isset($rating))
        print("---");
        else
        print($rating);
        }
        print("</td>\n");
        */
        print "<td align=center><nobr>" . str_replace(" ", "<br />", $row["added"]) . "</nobr></td>\n";
        $ttl = 28 * 24 - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
        if ($ttl == 1) {
            $ttl .= "<br />hour";
        } else {
            $ttl .= "<br />hours";
        }
        print "<td align=center>{$ttl}</td>\n";
        print "<td align=center>" . str_replace(" ", "<br />", prefixed($row["size"])) . "</td>\n";
        // print("<td align=\"right\">" . $row["views"] . "</td>\n");
        // print("<td align=\"right\">" . $row["hits"] . "</td>\n");
        $_s = "";
        if ($row["times_completed"] != 1) {
            $_s = "s";
        }
        print "<td align=center>" . number_format($row["times_completed"]) . "<br />time{$_s}</td>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                print "<td align=right><b><a href=peerlist.php?id={$id}#seeders><font color=" . get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a class=\"" . linkcolor($row["seeders"]) . "\" href=\"peerlist.php?id={$id}#seeders\">" . $row["seeders"] . "</a></b></td>\n";
            }
        } else {
            print "<td align=\"right\"><span class=\"" . linkcolor($row["seeders"]) . "\">" . $row["seeders"] . "</span></td>\n";
        }
        if ($row["leechers"]) {
            if ($variant == "index") {
                print "<td align=right><b><a href=peerlist.php?id={$id}#leechers>" . number_format($row["leechers"]) . "</a></b></td>\n";
            } else {
                print "<td align=\"right\"><b><a class=\"" . linkcolor($row["leechers"]) . "\" href=\"peerlist.php?id={$id}#leechers\">" . $row["leechers"] . "</a></b></td>\n";
            }
        } else {
            print "<td align=\"right\">0</td>\n";
        }
        if ($variant == "index") {
            print "<td align=center>" . (isset($row["username"]) ? "<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>" : "<i>(unknown)</i>") . "</td>\n";
        }
        print "</tr>\n";
    }
    print "</table>\n";
    // return $rows;
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:101,代码来源:bookmarks.php

示例12: torrenttable


//.........这里部分代码省略.........
        }
        /*
                if ($row["nfoav"] && get_user_class() >= UC_POWER_USER)
                  print("<a href='viewnfo.php?id=$row[id]''><img src='{$TBDEV['pic_base_url']}viewnfo.gif" border='0' alt='".$lang["torrenttable_view_nfo_alt"]."' /></a>\n");
                if ($variant == "index")
                    print("<a href='download.php/$id/" . rawurlencode($row["filename"]) . "'><img src='{$TBDEV['pic_base_url']}download.gif' border='0' alt='".$lang["torrenttable_download_alt"]."' /></a>\n");
        
                else */
        if ($variant == "mytorrents") {
            $htmlout .= "</td><td align='center'><a href='edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id={$row['id']}'>" . $lang["torrenttable_edit"] . "</a>\n";
        }
        $htmlout .= "</td>\n";
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='right'>";
            if ($row["visible"] == "no") {
                $htmlout .= "<b>" . $lang["torrenttable_not_visible"] . "</b>";
            } else {
                $htmlout .= "" . $lang["torrenttable_visible"] . "";
            }
            $htmlout .= "</td>\n";
        }
        if ($row["type"] == "single") {
            $htmlout .= "<td align='right'>{$row["numfiles"]}</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . $row["numfiles"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . $row["numfiles"] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            $htmlout .= "<td align='right'>{$row["comments"]}</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;hit=1&amp;tocomm=1'>" . $row["comments"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;page=0#startcomments'>" . $row["comments"] . "</a></b></td>\n";
            }
        }
        /*
                print("<td align='center'>");
                if (!isset($row["rating"]))
                    print("---");
                else {
                    $rating = round($row["rating"] * 2) / 2;
                    $rating = ratingpic($row["rating"]);
                    if (!isset($rating))
                        print("---");
                    else
                        print($rating);
                }
                print("</td>\n");
        */
        $htmlout .= "<td align='center'><span style='white-space: nowrap;'>" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
        $ttl = 28 * 24 - floor((time() - $row["added"]) / 3600);
        if ($ttl == 1) {
            $ttl .= "<br />" . $lang["torrenttable_hour_singular"] . "";
        } else {
            $ttl .= "<br />" . $lang["torrenttable_hour_plural"] . "";
        }
        $htmlout .= "<td align='center'>{$ttl}</td>\n\r\n    <td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
        //        print("<td align='right'>" . $row["views"] . "</td>\n");
        //        print("<td align='right'>" . $row["hits"] . "</td>\n");
        if ($row["times_completed"] != 1) {
            $_s = "" . $lang["torrenttable_time_plural"] . "";
        } else {
            $_s = "" . $lang["torrenttable_time_singular"] . "";
        }
        $htmlout .= "<td align='center'>" . number_format($row["times_completed"]) . "<br />{$_s}</td>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#seeders'>\r\n                <font color='" . get_slr_color($ratio) . "'>{$row["seeders"]}</font></a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["seeders"]) . "' href='peerlist.php?id={$id}#seeders'>{$row["seeders"]}</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'><span class='" . linkcolor($row["seeders"]) . "'>" . $row["seeders"] . "</span></td>\n";
        }
        if ($row["leechers"]) {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#leechers'>" . number_format($row["leechers"]) . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["leechers"]) . "' href='peerlist.php?id={$id}#leechers'>{$row["leechers"]}</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'>0</td>\n";
        }
        if ($variant == "index") {
            $htmlout .= "<td align='center'>" . (isset($row["username"]) ? "<a href='userdetails.php?id=" . $row["owner"] . "'><b>" . htmlspecialchars($row["username"]) . "</b></a>" : "<i>(" . $lang["torrenttable_unknown_uploader"] . ")</i>") . "</td>\n";
        }
        $htmlout .= "</tr>\n";
    }
    $htmlout .= "</table>\n";
    return $htmlout;
}
开发者ID:CHEZDESIGN,项目名称:mytorrent,代码行数:101,代码来源:torrenttable_functions.php

示例13: torrenttable


//.........这里部分代码省略.........
			echo '<td align="center"><nobr>Engin</nobr></td>'."\n";
		}
        }

	if ($variant == 'mytorrents')
		echo '<td align="center"><a href="edit.php?returnto='.urlencode($_SERVER['REQUEST_URI']).'&amp;id='.$row['id'].'">Breyta</a>'."\n";
	echo '</td>'."\n";
	if ($variant == 'mytorrents') {
		echo '<td align="right">';
		if ($row['visible'] == 'no')
			echo '<b>Nei</b>';
		else
			echo 'Já';
		echo '</td>'."\n";
	}

	if ($row['type'] == 'single')
		echo '<td align="right">'.$row['numfiles'].'</td>'."\n";
	else {
		if ($variant == 'index')
			echo '<td align="right"><b><a href="details.php?id='.$id.'&amp;hit=1&amp;filelist=1">'.$row['numfiles'].'</a></b></td>'."\n";
		else
			echo '<td align="right"><b><a href="details.php?id='.$id.'&amp;filelist=1#filelist">'.$row['numfiles'].'</a></b></td>'."\n";
	}

	if ($row['comments'] === '0')
		echo '<td align="right">'.$row['comments'].'</td>'."\n";
	else {
		if ($variant == 'index')
			echo '<td align="right"><b><a href="details.php?id='.$id.'&amp;hit=1&amp;tocomm=1">'.$row['comments'].'</a></b></td>'."\n";
		else
			echo '<td align="right"><b><a href="details.php?id='.$id.'&amp;page=0#startcomments">'.$row['comments'].'</a></b></td>'."\n";
	}

	echo '<td align="center">';
	if (!isset($row['rating']))
		echo '---';
	else {
		$rating = round($row['rating'] * 2) / 2;
		$rating = ratingpic($row['rating']);
		if (!isset($rating))
			echo '---';
		else
			echo $rating;
	}
        echo '</td>'."\n";
        echo '<td align="center"><nobr>'.str_replace(' ', '<br />', $row['added']).'</nobr></td>'."\n";
	$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
	if ($ttl == '1')
		$ttl .= '<br />klst';
	else
		$ttl .= '<br />klst';
	echo '<td align="center">'.$ttl.'</td>'."\n";
	// Totalspeed mod
	$resSpeed = mysql_query('SELECT seeders,leechers FROM torrents WHERE id='.$id.' AND visible=\'yes\' ORDER BY added DESC LIMIT 15') or sqlerr(__FILE__, __LINE__);
	if ($rowTmp = mysql_fetch_row($resSpeed))
		list($seedersTmp,$leechersTmp) = $rowTmp; 
	if ($seedersTmp >= '1' && $leechersTmp >= '1'){
		$speedQ = mysql_query('SELECT (t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS totalspeed FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = \'no\' AND p.torrent = \''.$id.'\' GROUP BY t.id ORDER BY added ASC LIMIT 15') or sqlerr(__FILE__, __LINE__);
		$a = mysql_fetch_assoc($speedQ);
		$totalspeed = mksize($a['totalspeed']) . '/s';
	}
	echo '<td align="center">'.$totalspeed.'</td>'."\n";
	echo '<td align="center">'.str_replace(' ', '<br />', mksize($row['size'])).'</td>'."\n";
	$_s = '';
	if ($row['times_completed'] != '1')
		$_s = 's';
	echo '<td align="center"><a href="viewsnatches.php?id='.$row[id].'">'.number_format($row['times_completed']).'<br />time'.$_s.'</a></td>'."\n";

	if ($row["seeders"]) {
		if ($variant == "index") {
			if ($row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1;
				print("<td align=right><b><a href=details.php?id=$id&amp;hit=1&amp;toseeders=1><font color=" .
			get_slr_color($ratio) . ">" . $row["seeders"] . "</font></a></b></td>\n");
		} else
			echo '<td align="right"><b><a class="'.linkcolor($row['seeders']).'" href="details.php?id='.$id.'&amp;dllist=1#seeders\">'.$row['seeders'].'</a></b></td>'."\n";
	} else
		echo '<td align="right"><span class="'.linkcolor($row['seeders']).'">'.$row['seeders'].'</span></td>'."\n";

	if ($row["leechers"]) {
		if ($variant == "index")
			echo '<td align="right"><b><a href="details.php?id='.$id.'&amp;hit=1&amp;todlers=1">'.number_format($row['leechers']).($peerlink ? '</a>' : '').'</b></td>'."\n";
		else
			echo '<td align="right"><b><a class="'.linkcolor($row['leechers']).'" href="details.php?id='.$id.'&amp;dllist=1#leechers">'.$row['leechers'].'</a></b></td>'."\n";
	} else
		echo '<td align="right">0</td>'."\n";

	if ($variant == 'index') {
		echo '<td align="center">';
		if($row['anonymous'] === '1')
			echo '<i>(Nafnleynd)</i>';
		else
			echo '<a href=userdetails.php?id='.$row['owner'].'><b>'.htmlspecialchars($row['username']).'</b></a>'; 
		echo '</td>'."\n";
	}
        echo '</tr>'."\n";
}
	echo '</table>'."\n";
	return $rows;
}
开发者ID:herrag33k,项目名称:TomTorrent,代码行数:101,代码来源:bittorrent.php

示例14: makesize

            $torhistory[$i]["leechs"] = "<a href=\"javascript:poppeer('index.php?page=peers&amp;id=" . $torlist['info_hash'] . "')\">" . $torlist['leechers'] . "</a>";
            $torhistory[$i]["completed"] = "<a href=\"javascript:poppeer('index.php?page=torrent_history&amp;id=" . $torlist['info_hash'] . "\">" . $torlist['finished'] . "</a>";
            $i++;
            $userdetailtpl->set("torhistory", $torhistory);
        } else {
            $torhistory[$i]["filename"] = "<a href=\"index.php?page=torrent-details&amp;id=" . $torlist['info_hash'] . "\" title=\"" . $language["VIEW_DETAILS"] . ": " . $torlist['filename'] . "\">" . $filename . "</a>";
            $torhistory[$i]["size"] = makesize($torlist['size']);
            $torhistory[$i]["agent"] = htmlspecialchars($torlist['agent']);
            $torhistory[$i]["status"] = $torlist['active'] == 'yes' ? $language["ACTIVATED"] : 'Stopped';
            $torhistory[$i]["downloaded"] = makesize($torlist['downloaded']);
            $torhistory[$i]["uploaded"] = makesize($torlist['uploaded']);
            if ($torlist['downloaded'] > 0) {
                $peerratio = number_format($torlist['uploaded'] / $torlist['downloaded'], 2);
            } else {
                $peerratio = '&#8734;';
            }
            $torhistory[$i]["ratio"] = unesc($peerratio);
            $torhistory[$i]["seedscolor"] = linkcolor($torlist['seeds']);
            $torhistory[$i]["seeds"] = "<a href=\"index.php?page=peers&amp;id=" . $torlist['info_hash'] . "\">" . $torlist['seeds'] . "</a>";
            $torhistory[$i]["leechcolor"] = linkcolor($torlist['leechers']);
            $torhistory[$i]["leechs"] = "<a href=\"index.php?page=peers&amp;id=" . $torlist['info_hash'] . "\">" . $torlist['leechers'] . "</a>";
            $torhistory[$i]["completed"] = "<a href=\"index.php?page=torrent_history&amp;id=" . $torlist['info_hash'] . "\">" . $torlist['finished'] . "</a>";
            $i++;
            $userdetailtpl->set("torhistory", $torhistory);
        }
    }
} else {
    $userdetailtpl->set("RESULTS_2", false, true);
}
unset($sanq);
$userdetailtpl->set("userdetail_back", "<a  href=\"javascript: history.go(-1);\">" . $language["BACK"] . "</a>");
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:userdetails.php

示例15: while

</td>
<td align='center' class='header'><?php 
        echo DELETE;
        ?>
</td>
</tr>

<?php 
        if ($resuploaded && $resuploaded->num_rows > 0) {
            while ($rest = $resuploaded->fetch_array(MYSQLI_BOTH)) {
                print "\n<tr>\n<td class='lista'>" . security::html_safe(unesc($rest["filename"])) . "</td>";
                include INCL_PATH . 'offset.php';
                print "\n<td class='lista' align='center'>" . date("d/m/Y H:m:s", $rest["added"] - $offset) . "</td>";
                print "\n<td class='lista' align='right'>" . misc::makesize((int) $rest["size"]) . "</td>";
                print "\n<td align='right' class='" . linkcolor($rest["seeds"]) . "'>" . (int) $rest['seeds'] . "</td>";
                print "\n<td align='right' class='" . linkcolor($rest["leechers"]) . "'>" . (int) $rest['leechers'] . "</td>";
                print "\n<td class='lista' align='right'>" . ($rest["finished"] > 0 ? (int) $rest["finished"] : "---") . "</td>";
                print "<td class='lista' align='center'><a href='edit.php?info_hash=" . $rest["hash"] . "&returnto=" . urlencode("torrents.php") . "'>" . image_or_link($STYLEPATH . "/edit.png", "", EDIT) . "</a></td>";
                print "<td class='lista' align='center'><a href='delete.php?info_hash=" . $rest["hash"] . "&returnto=" . urlencode("torrents.php") . "'>" . image_or_link($STYLEPATH . "/delete.png", "", DELETE) . "</a></td>\n</tr>";
            }
            print "\n</table>";
        } else {
            print "<tr>\n<td class='lista' align='center' colspan='8'>" . NO_TORR_UP_USER . "</td>\n</tr>\n</table>";
        }
        block_end();
        // ------------------------
        print "<br />";
    }
    block_end();
}
stdfoot();
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:31,代码来源:usercp.php


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