本文整理汇总了PHP中linkcolor函数的典型用法代码示例。如果您正苦于以下问题:PHP linkcolor函数的具体用法?PHP linkcolor怎么用?PHP linkcolor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了linkcolor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: torrenttable
//.........这里部分代码省略.........
</span>
</a>
</span>
<span id="remove' . $id . '"' . $rm_status . '>
<a href="bookmark.php?torrent=' . $id . '&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: <a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b><br />";
} else {
$htmlout .= "<b>Files: <a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b><br />";
}
}
$htmlout .= "Size: " . 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} <b>downloaded</b> " . 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> <b><a href='{$What_Script_P}" . "{$id}#seeders'><font color='" . get_slr_color($ratio) . "'>" . (int) $row["seeders"] . "</font></a></b> \n";
} else {
$What_Script_P = XBT_TRACKER == true ? 'peerlist_xbt.php?id=' : 'peerlist.php?id=';
$htmlout .= "<br /><b>Seeders:</b> <b><a class='" . linkcolor($row["seeders"]) . "' href='{$What_Script_P}" . "{$id}#seeders'>" . (int) $row["seeders"] . "</a></b> \n";
}
} else {
$htmlout .= "<br /><b>Seeders:</b> <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> 0\n";
}
if ($variant == "index") {
$htmlout .= "<br /><b>Upped By:</b> " . (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 = "&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'] . "'> <img src='pic/button_delete2.gif' alt='Fast Delete' title='Fast Delete' /></a>" : "";
$htmlout .= "<br />\n<b>Added: " . get_date($row['added'], 'DATE') . "</b><br />" . $imdb . "<b>Subtitle: {$Subs}</b><br />";
if (!$row["comments"]) {
$htmlout .= "<b>Comments:</b> " . (int) $row["comments"] . "\n";
} else {
if ($variant == "index") {
$htmlout .= "<b>Comments:</b> <b><a href='details.php?id={$id}&hit=1&tocomm=1'>" . (int) $row["comments"] . "</a></b>\n";
} else {
$htmlout .= "<b>Comments:</b> <b><a href='details.php?id={$id}&page=0#startcomments'>" . (int) $row["comments"] . "</a></b>\n";
}
}
if ($CURUSER['class'] >= UC_STAFF) {
$htmlout .= "<br /><b>Tools:</b> ";
}
$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&uid={$uid}&");
$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&info_hash=" . $rest["hash"] . "&returnto=" . urlencode("index.php?page=torrents") . "";
$uptortpl[$i]["dellink"] = "index.php?page=delete&info_hash=" . $rest["hash"] . "&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}&hit=1&tocomm=1\">" . $row["comments"] . "</a></b></td>\n";
} else {
echo "<td align=\"right\"><b><a href=\"details.php?id={$id}&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}&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}&hit=1&#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"]) . "&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}&hit=1&tocomm=1\">" . $row["comments"] . "</a></b></td>\n";
} else {
print "<td align=\"right\"><b><a href=\"details.php?id={$id}&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&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=poller&votes=" . $inf["ID"] . "&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&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=poller&id=" . $inf["ID"] . "\">" . $inf["pollerTitle"] . "</a>";
$polls[$i]["starter"] = "<a href=\"index.php?page=userdetails&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"] . "&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&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&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&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"]) . "&";
}
$htmlout .= "id={$id}";
if ($variant == "index") {
$htmlout .= "&hit=1";
}
$htmlout .= "'><b>{$dispname}</b></a> </td>\n";
$htmlout .= $variant == "index" ? "<td align='center'><a href='bookmark.php?torrent={$id}&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}&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 . "&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"]) . "&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}&hit=1&tocomm=1'>" . (int) $row['comments'] . "</a></b></td>\n";
} else {
$htmlout .= "<td align='right'><b><a href='details.php?id={$id}&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"]) . "&";
}
$htmlout .= "id={$id}";
if ($variant == "index") {
$htmlout .= "&hit=1";
}
$htmlout .= "'><b>{$dispname}</b></a> </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 . '&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 . '&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"]) . "&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>\
|
请发表评论