~ubuntu-branches/ubuntu/lucid/ktorrent/lucid

« back to all changes in this revision

Viewing changes to plugins/webinterface/www/coldmilk/interface.php

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-02-16 18:37:14 UTC
  • mfrom: (1.1.25 upstream) (0.4.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090216183714-52tf47jrnmk4xkmp
Tags: 3.2+dfsg.1-2ubuntu1
* Merge with Debian, remaining changes: (LP: #296433)
  - Use Kubuntu's kde4.mk
  - Build-depend on libboost-serialization1.35-dev since unversioned -dev is
    in universe
  - Change plasma-applet-ktorrent to plasma-widget-ktorrent since we're
    supposed to call them widgets for the users

Show diffs side-by-side

added added

removed removed

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