change torrent pos_state to varchar, support more sticky level

This commit is contained in:
xiaomlove
2021-06-01 01:28:46 +08:00
parent 8e35dc0886
commit 5760adc0c4
17 changed files with 139 additions and 14 deletions

View File

@@ -3225,10 +3225,12 @@ foreach ($rows as $row)
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 = "";
if ($CURUSER['appendsticky'] == 'yes') {
$posStates = \App\Models\Torrent::listPosStates();
$stickyicon = str_repeat("<img class=\"sticky\" src=\"pic/trans.gif\" alt=\"Sticky\" title=\"".$posStates[$row['pos_state']]['text']."\" />&nbsp;", $posStates[$row['pos_state']]['icon_counts'] ?? 0);
} else {
$stickyicon = "";
}
$sp_torrent = get_torrent_promotion_append($row['sp_state'],"",true,$row["added"], $row['promotion_time_type'], $row['promotion_until']);
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);
$picked_torrent = "";