'Not Started', 1 => 'Seeding Complete', 2 => 'Download Complete', 3 => 'Seeding', 4 => 'Downloading', 5 => 'Stalled', 6 => 'Stopped', 7 => 'Allocating Diskspace', 8 => 'Error', 9 => 'Queued', 10 => 'Checking Data' ); if (array_key_exists($status_id, $table)) return $table[$status_id]; else return 'Not supported tqStatus'; } function generate_button_code($img, $alt, $href='') { $img = ''.htmlspecialchars($alt).''; if (empty($href)) return $img; else return ''.$img.''; } ?> <?php echo '(D:'.$globalinfo['download_speed'].') (U:'.$globalinfo['upload_speed'].') KTorrent'; ?>
WebInterface KTorrent plugin
'."\n\t\t\t"; $torrent_name = str_replace("'", "\'", $torrent['torrent_name']); if($torrent['total_bytes_to_download']!=0) $perc = round(100.0 - ($torrent['bytes_left_to_download'] / $torrent['total_bytes_to_download']) * 100.0, 2); else $perc = 0; if(strlen($torrent['torrent_name'])>30) $display_name=substr($torrent['torrent_name'], 0, 30)." ..."; else $display_name=$torrent['torrent_name']; if ($torrent['num_files']>1) $file_td_content = ''.$display_name.''; else $file_td_content = $display_name; echo ''; echo ""; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo "\n\t\t".''."\n"; $a++; } ?>
Actions File tqStatus Downloaded Size Uploaded Down Speed Up Speed Peers Complete
'; echo generate_button_code('/stop.png', 'stop', ($torrent['running'])?'interface.php?stop='.$a:''); echo generate_button_code('/start.png', 'start', ($torrent['running'])?'':'interface.php?start='.$a); echo 'remove'; echo '$file_td_content'.get_torrent_status_name($torrent['status']).''.$torrent['bytes_downloaded'].''.$torrent['total_bytes'].''.$torrent['bytes_uploaded'].''.$torrent['download_rate'].''.$torrent['upload_rate'].''.$torrent['num_peers'].''.$perc.'%