From 9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 20 Jan 2010 02:37:40 +0000 Subject: Updated to final KDE3 ktorrent release (2.2.6) git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1077377 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- plugins/webinterface/www/default/details.php | 89 ++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 plugins/webinterface/www/default/details.php (limited to 'plugins/webinterface/www/default/details.php') diff --git a/plugins/webinterface/www/default/details.php b/plugins/webinterface/www/default/details.php new file mode 100644 index 0000000..a19d57e --- /dev/null +++ b/plugins/webinterface/www/default/details.php @@ -0,0 +1,89 @@ +30) return substr($string, 0, 30).'...'; + else return $string; +} + +function get_file_status_name($status_id) +{ + $table = array( + 60 => 'PREVIEW_PRIORITY', + 50 => 'Download First', + 40 => 'Download Normally', + 30 => 'Download Last', + 20 => 'Only Seed', + 10 => 'Do Not Download' + ); + if (array_key_exists($status_id, $table)) return $table[$status_id]; + else return 'Not supported file status'; +} + +function generate_file_prior_button_code($img, $alt, $href='') +{ + $img = ''.htmlspecialchars($alt).''; + if (empty($href)) return $img; + else return ''.$img.''; +} + +$display_name=cut_name_if_long($stats[$num_torrent]['torrent_name']); + +?> + + + + + + + +<?php echo 'KTorrent: Details for '.$display_name; ?> + + +
WebInterface KTorrent plugin
+
+ + +
+ + + + + + + + + $file) + { + echo "\t\t".''."\n\t\t\t"; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo "\n\t\t".''."\n"; + } + ?> +
ActionsFileStatusSizeComplete
'; + echo generate_file_prior_button_code('/high_priority.png', 'High Priority', $file['status']==50?'':"details.php?file_hp=$num_torrent-$id&torrent=$num_torrent"); + echo generate_file_prior_button_code('/normal_priority.png', 'Normal Priority', $file['status']==40?'':"details.php?file_np=$num_torrent-$id&torrent=$num_torrent"); + echo generate_file_prior_button_code('/low_priority.png', 'Low Priority', $file['status']==30?'':"details.php?file_lp=$num_torrent-$id&torrent=$num_torrent"); + echo generate_file_prior_button_code('/only_seed.png', 'Stop downloading (Only Seed Priority)', ($file['status']==20||$file['status']==10)?'':"details.php?file_stop=$num_torrent-$id&torrent=$num_torrent"); + echo ''.htmlspecialchars(cut_name_if_long($file['name'])).''.get_file_status_name($file['status']).''.$file['size'].''.round($file['perc_done'], 2).' %
+
+ + + -- cgit v1.2.1