blob: 246f3476e4e56705a9ef1ace5a10da30d36276ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
<?php
$refresh_rate = 5;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ktorrent web interface</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<meta name="GENERATOR" content="Quanta Plus" />
<meta http-equiv="Content-Type" content="text/html"/>
<script type="text/javascript" src="page_update.js"></script>
<script type="text/javascript" src="interface.js"></script>
</head>
<body onload="update_interval(<?php echo $refresh_rate; ?>);">
<div id="header">
<div id="logout">
<img src="icons/16x16/edit_user.png" alt="logout" /> <a href="login.html">Sign out</a>
</div>
<a href="interface.php">
<img src="icon.png" alt="reload" title="reload"
id="header_icon" />
</a>
<ul>
<li>
<img src="icons/32x32/folder1.png" alt="icon" />
<a href="javascript:show('torrent_list');">Torrents</a>
</li>
<li>
<img src="icons/32x32/configure.png" alt="icon" />
<a href="javascript:show('preferences');">Preferences</a>
</li>
<li>
<img src="icons/32x32/fileopen.png" alt="icon" />
<a href="javascript:show('torrent_add');">Add torrent</a>
</li>
<li>
<img src="icons/32x32/extender_opened.png" alt="exit" />
<a href="javascript:show('action');">Action</a>
</li>
</ul>
<div id="status_bar">
<table id="status_bar_table"><tr><td></td></tr></table>
</div>
</div>
<!-- Torrents -->
<div id="torrent_list">
<table id="torrent_list_table" class="list_table">
<tr><td></td></tr><!--let's be XHTML valid-->
</table>
<div id="bottom-menu">
<ul>
<li>
<img src="icons/22x22/ktstart_all.png" alt="" />
<span>
<a href="interface.php?startall=true">Start all</a>
</span>
</li>
<li>
<img src="icons/22x22/ktstop_all.png" alt="" />
<span>
<a href="interface.php?stopall=true">Stop all</a>
</span>
</li>
</ul>
</div>
</div>
<!-- end torrents -->
<!-- Torrent's details -->
<div id="torrents_details" style="display : none;">
<table id="torrents_details_files" class="list_table">
<tr><td></td></tr><!--let's be XHTML valid-->
</table>
</div>
<!-- end torrent's details -->
<!-- Preferences -->
<div id="preferences" style="display : none;">
<h2>Preferences</h2>
<form action="interface.php" method="get">
<div class="simple_form">
<img src="icons/64x64/down.png" alt="" />
<h2>Downloads</h2>
<?php $globalinfo = globalinfo() ?>
<div class="item" style="margin-top : 0em;">
Upload speed:
<div class="option">
<input type="text" name="maximum_upload_rate"
value="<?php echo $globalinfo['max_upload_speed']; ?>" />
</div>
</div>
<div class="item">
Download speed:
<div class="option">
<input type="text" name="maximum_download_rate"
value="<?php echo $globalinfo['max_download_speed']; ?>" />
</div>
</div>
<div class="item">
Max downloads:
<div class="option">
<input type="text" name="maximum_downloads"
value="<?php echo $globalinfo['max_downloads']; ?>" />
</div>
</div>
<div class="item">
Max seeds
<div class="option">
<div style="display : inline;">
<input type="text" name="maximum_seeds"
value="<?php echo $globalinfo['max_seeds']; ?>" />
</div>
</div>
</div>
</div>
<div class="simple_form" style="margin-top : 1em;" >
<img src="icons/64x64/looknfeel.png" alt="" />
<h2>Web interface</h2>
<div class="hints">
Note: Disabled for now. If you insist, change $refresh_rate in the file interface.php
</div>
<div class="item">
<?php
$refresh_options = array(
'2' => '2 seconds',
'3' => '3 seconds',
'5' => '5 seconds',
'10' => '10 seconds',
'30' => '30 seconds',
'0' => 'never'
);
echo 'Update rate:';
echo '<div class="option">';
echo '<select name="refresh_rate" disabled="disabled">';
foreach(array_keys($refresh_options) as $value) {
echo '<option value="'.$value.'"';
if ($refresh_rate == $value) {
echo ' selected="selected"';
}
echo '>'.$refresh_options[$value].'</option>';
}
echo '</select>';
echo '</div>';
?>
</div>
</div>
<div style="margin-top : 1em; float : left; clear : both;">
<input type="submit" value="Submit preferences" class="buttons"/>
</div>
</form>
</div>
<!-- end preferences -->
<!-- Add Torrent -->
<div id="torrent_add" style="display : none;">
<h2>Add a torrent</h2>
<div class="simple_form">
<img src="icons/64x64/folder1_man.png" alt="" />
<h3>Load a torrent</h3>
<form action="interface.php" method="get">
<div class="item">
URL:
<div class="option">
<input type="text" name="load_torrent" style="width : 240px;" />
<br /><span>Example: http://ktorrent.org/down/latest.torrent</span>
<div style="margin-top : 1em;">
<input type="submit" value="Load Torrent" />
</div>
</div>
</div>
</form>
<h3 style="margin-top : 6em;">Upload a torrent</h3>
<form action="interface.php" method="post" enctype="multipart/form-data">
<div class="item" style="min-height : 5em;">
File path:
<div class="option">
<div style="display : inline;">
<input type="file" name="load_torrent" style="width:240px;" />
</div>
<div style="margin-top : 1em;">
<input type="submit" name="Upload Torrent" value="Upload Torrent" />
</div>
</div>
</div>
</form>
</div>
</div>
<!-- end add torrent -->
<!-- Action -->
<div id="action" style="display : none;">
<h2 style="margin-top : 0; padding-top : 0;">Actions</h2>
<ul>
<li>
<img src="icons/48x48/switchuser.png" alt="sign out" />
<span style="margin-left : 52px;">
<a href="login.html">Sign out</a></span>
</li>
<li>
<img src="icons/48x48/exit.png" alt="quit" />
<span style="margin-left : 52px;">
<a href="shutdown.php?quit=quit" onclick="return validate('quit_program')">
Quit program
</a></span>
</li>
</ul>
</div>
<!-- end action -->
</body>
</html>
|