getDownloads(); $total_upload = 0; $total_download = 0; ?> Azureus PHP UI
ENTRY ) return 0; var_dump( $b ); if ( $a == $b ) { return 0; } return ($a < $b) ? -1 : 1; } function drawTable( $id ){ global $response, $total_upload, $total_download; echo " "; $count = 0; // Characters that are just download-friendly replacements for a space $aWhitespace = array( ".", "_" ); foreach( $response as $entry ){ $download_id = trim( $entry->_object_id ); if( $download_id != "" ){ if( ( trim( $entry->stats->completed ) < 1000 && $id == "downloads" ) || ( trim( $entry->stats->completed ) == 1000 && $id == "uploads" ) ){ $check = "chk_$download_id"; if( array_key_exists( "checked", $_GET) && strstr( $_GET["checked"], trim( $entry->_object_id ) ) ){ $checked = " checked=\"checked\""; }else{ $checked = ""; } if( trim( $entry->stats->status ) == "Stopped" ){ $class = "stopped"; }else{ $class = ""; } $class .= " torrent"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; $total_upload += $entry->stats->upload_average; $total_download += $entry->stats->download_average; $count++; } } } echo "
# Name Size Downloaded Completed Uploaded Upload Ave Download Ave ETA Status Seeds Peers Availability Share Ratio
".trim( $entry->position )."".format_filesize( $entry->torrent->size )."".format_filesize( $entry->stats->downloaded )."".round( $entry->stats->completed / 10, 3 )."%".format_filesize( $entry->stats->uploaded, 3 )."".format_filesize( $entry->stats->upload_average )."/s".format_filesize( $entry->stats->download_average )."/s ".trim( $entry->stats->eta )."".trim( $entry->stats->status )."".trim( $entry->announce_result->seed_count )."(".trim( $entry->scrape_result->seed_count ).")".trim( $entry->announce_result->non_seed_count )."(".trim( $entry->scrape_result->non_seed_count ).")".number_format( $entry->stats->availability, 2)."".round( $entry->stats->share_ratio / 10, 3 )."%
\n"; } function format_filesize($size) { $size = trim( $size ); $kb = 1024; // Kilobyte $mb = 1024 * $kb; // Megabyte $gb = 1024 * $mb; // Gigabyte $tb = 1024 * $gb; // Terabyte /* If it's less than a kb we just return the size, otherwise we keep going until the size is in the appropriate measurement range. */ $precision = 2; if($size < $kb) { return $size." B"; } else if($size < $mb) { return number_format( round($size/$kb,$precision), $precision )." KB"; } else if($size < $gb) { return number_format( round($size/$mb,$precision), $precision )." MB"; } else if($size < $tb) { return number_format( round($size/$gb,$precision), $precision )." GB"; } else { return number_format( round($size/$tb,$precision), $precision )." TB"; } } if( sizeof( $aServers ) > 1 ){ echo "\n \n"; } ?>
" enctype="multipart/form-data">
\n"; if( $_GET["success"] == 1 ){ echo "Success. "; if( isset( $_GET["added"] ) ){ echo "Torrent \"".urldecode( $_GET["added"] )."\" added"; }else{ } }else{ echo "Failed. "; if( isset( $_GET["error"] ) ) echo urldecode( $_GET["error"] ); } echo "
\n"; } ?>

Downloads

Seeds

Upstream: /s Downstream: /s