Esempio n. 1
0
 if ($displaythis) {
     $totdisp++;
     echo "<div class='{$thisrow}'>\n";
     if ($item['complete'] == 1) {
         $statusstyle = "complete";
     } else {
         $statusstyle = "incomplete";
     }
     if ($item['is_active'] == 1) {
         $statusstyle .= "active";
     } else {
         $statusstyle .= "inactive";
     }
     $eta = "";
     if ($item['down_rate'] > 0) {
         $eta = formateta(($item['size_bytes'] - $item['completed_bytes']) / $item['down_rate']);
     }
     echo "<div class='namecol' id='t" . $item['hash'] . "name'>\n";
     // Tracker URL
     if ($displaytrackerurl == TRUE) {
         // echo $item['tracker_url'];
         $urlstyle = $tracker_hilite_default;
         foreach ($tracker_hilite as $hilite) {
             foreach ($hilite as $thisurl) {
                 if (stristr($item['tracker_url'], $thisurl) == TRUE) {
                     $urlstyle = $hilite[0];
                 }
             }
         }
         echo "<div class='trackerurl' id='tracker' ><a style='color: {$urlstyle} ;' id='tracker' href='?settrackerfilter=" . $item['tracker_url'] . "&setfilterinvert=0'>" . $item['tracker_url'] . "</a>&nbsp;</div>";
     }
Esempio n. 2
0
 }
 if ($displaythis) {
     if ($subitem['complete'] == 1) {
         $statusstyle = "complete";
     } else {
         $statusstyle = "incomplete";
     }
     if ($subitem['is_active'] == 1) {
         $statusstyle .= "active";
     } else {
         $statusstyle .= "inactive";
     }
     $subdata[$totcount]['control'] = $subitem['is_active'] == 1 ? "stop" : "start";
     $eta = "";
     if ($subitem['down_rate'] > 0) {
         $eta = formateta(($subitem['size_bytes'] - $subitem['completed_bytes']) / $subitem['down_rate']) . " Remaining... ";
     }
     $subdata[$totcount]['name'] = "<input type='checkbox' name='select[]' value='" . $subitem['hash'] . "' style='checkbox'> <a class='submodal-600-500 {$statusstyle}' href='view.php?hash=" . $subitem['hash'] . "'>" . $subitem['name'] . "</a>";
     $subdata[$totcount]['message'] = $eta . $subitem['message'];
     $subdata[$totcount]['status_string'] = "<img src='images/" . $statusstyle . ".gif' width=10 height=9 alt='Status'>" . $subitem['status_string'];
     $subdata[$totcount]['percent_complete'] = $subitem['percent_complete'] . " %<br>" . percentbar(@round($subitem['percent_complete'] / 2));
     $subdata[$totcount]['size_bytes'] = format_bytes($subitem['size_bytes']);
     $subdata[$totcount]['down_rate'] = format_bytes($subitem['down_rate']);
     $subdata[$totcount]['up_rate'] = format_bytes($subitem['up_rate']);
     $subdata[$totcount]['up_total'] = format_bytes($subitem['up_total']);
     $subdata[$totcount]['peers'] = $subitem['peers_connected'] . "/" . $subitem['peers_not_connected'] . " (" . $subitem['peers_complete'] . ")";
     $subdata[$totcount]['ratio'] = @round($subitem['ratio'] / 1000, 2);
     $subdata[$totcount]['priority_str'] = $subitem['priority_str'];
     $subdata[$totcount]['hash'] = $subitem['hash'];
     $subdata[$totcount]['bytes_diff'] = completed_bytes_diff($subitem['size_bytes'], $subitem['completed_bytes']);
     $subdata[$totcount]['filemtime'] = age($subitem['filemtime']);