First git import
[squasher.git] / templates / wip_massdelete.tpl
1 {literal}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5 <title>Squasher</title>
6 <style>
7
8 body{
9 background-color:#E2EBD8;
10 min-width:1000px;
11 font-family:Arial Narrow;
12 font-size:16px;
13 }
14
15 .wrapper{
16 width: 1000px;
17 margin: 10px auto;
18 }
19
20 .container{
21 border:5px solid;
22 border-color:#FFFFFF;
23 color:#FFFFFF;
24 left:50%;
25 background: #FFFFFF;
26 }
27
28 .control{
29 float:right;
30 text-align:right;
31 }
32
33 .menucontainer{
34 background-color:#FFFFFF;
35 }
36
37 .menu{
38 text-align:center;
39 }
40
41 .menuhead{
42 float:left;
43 background-color:#66CC00;
44 color:#003300;
45 margin:1px;
46 border:1px solid;
47 border-color:#66CC00;
48 }
49
50 .menuitem{
51 float:left;
52 background-color:#C7F09E;
53 color:#003300;
54 margin:1px;
55 border:1px solid;
56 border-color:#E2EBD8;
57 }
58
59 .menuitem:hover{
60 background-color:#339900;
61 color:#FFFFFF;
62 }
63
64 .content{
65 float:left;
66 padding-right:5px;
67 }
68
69 .item, .status1, .status2, .status3{
70 position:relative;
71 color:#003300;
72 width:600px;
73 border:2px solid;
74 border-color:#FFFFFF;
75 font-size:12px;
76 }
77
78 .item{
79 background-color:#E2EBD8;
80 }
81 .status1{
82 background-color:#FFCCCC;
83 }
84 .status2{
85 background-color:#FFFFCC;
86 }
87 .status3{
88 background-color:#CCFFCC;
89 }
90
91 .name{
92 float:left;
93 left:1px;
94 top:1px;
95 padding-left:1px;
96 z-index:50;
97 }
98
99 .center{
100 float:left;
101 height:inherit;
102 padding-left:1px;
103 }
104
105 .chunks{
106 float:right;
107 padding-left:2px;
108 padding-right:3px;
109 }
110
111 .size{
112 float:right;
113 padding-left:2px;
114 padding-right:3px;
115 }
116
117 .added{
118 float:left;
119 padding-left:2px;
120 padding-right:3px;
121 }
122
123 .updated{
124 float:left;
125 padding-left:2px;
126 padding-right:3px;
127 }
128
129 .status{
130 float:right;
131 top:1px;
132 padding-right:2px;
133 text-align:right;
134 z-index:10;
135 }
136
137 .stream{
138 float:right;
139 padding-left:1px;
140 padding-right:2px;
141 }
142
143 .download{
144 float:right;
145 padding-left:1px;
146 padding-right:2px;
147 }
148
149 .clear{
150 clear:both;
151 height:1px;
152 font-size: 0;
153 }
154
155 .spacer{
156 clear:both;
157 height:10px;
158 }
159
160 .videoframe{
161 float:left;
162 width:500px;
163 height:400px;
164 padding-left:25px;
165 }
166
167 .banner{
168 background-color:#66CC00;
169 text-align:center;
170 width:100%;
171 height:45px;
172 background:#66CC00 url(img/squash.gif) no-repeat 30px 50%;
173 }
174
175 .titel{
176 background-color:#66CC00;
177 text-align:center;
178 }
179
180 .footer{
181 background-color:#66CC00;
182 text-align:center;
183 background:#66CC00 url(img/gplogobottomright.gif) no-repeat 100%;
184 }
185
186 .bottomimage{
187 background: #FFFFFF url(img/gp1.gif) no-repeat 95% 95%;
188 float:right;
189 width:300px;
190 height:146px;
191 }
192
193 .massdelete{
194 position:absolute;
195 bottom:0;
196 float:right;
197 width:300px;
198 #height:146px;
199 }
200
201 .deletebox{
202 visibility: hidden;
203 }
204
205 .filler{
206 position:relative;
207 float:right;
208 width:300px;
209 height:500px;
210 }
211
212 a{
213 color:#003300;
214 }
215
216 a:hover{
217 color:#FF6600;
218 }
219
220 </style>
221   <script type="text/javascript" language="JavaScript">
222    function toggle_id(hideshow){
223     if(document.getElementById(hideshow).style.visibility == 'visible') {
224      document.getElementById(hideshow).style.visibility = 'hidden';
225     }else{
226      document.getElementById(hideshow).style.visibility = 'visible';
227     }
228    }
229   </script></head>
230 {/literal}
231 <body style="min-width:1000px;">
232 <div class="wrapper">
233 <div class="container">
234
235         <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|{/if}{if $user_level > 99}&nbsp;<a href="?tools=users">users</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name})</a>&nbsp;</div></div>
236
237         <div class="spacer"></div>
238
239         <div class="menucontainer">
240
241         <div class="menu">
242         
243         <div class="menuhead">current folder</div>
244         
245         {foreach item=crumb key=cookie from=$base}<div class="menuitem" onClick="location.href='?path={$cookie}'" style="cursor:pointer" >{$crumb}</div>{/foreach}
246         
247         </div>
248         
249         <div class="clear"></div>
250         
251         <div class="menu">
252         
253         <div class="menuhead">subfolders</div>
254         
255         {foreach item=folder key=folderpath from=$subfolders}<div class="menuitem" onClick="location.href='?path={$folderpath}'" style="cursor:pointer" >{$folder}</div>{/foreach}
256         
257         </div>
258         
259         <div class="clear"></div>
260 {*      
261         <div class="menu">
262         
263         {foreach item=dir key=path from=$paths}{if $path!=$currentfolder}<div class="menuitem" onClick="location.href='squasher.php?path={$path}'" style="cursor:pointer" >{$dir}</div>{/if}{/foreach}
264         
265         </div>
266         
267         
268         
269         <div class="clear"></div>*}
270         
271         </div>
272         
273         <div class="spacer"></div>
274
275 <div class="content">
276 {foreach item=item key=id from=$squashed}
277 {counter assign=mass_delete_size print=false}
278 {if $item.squashed}{*These items are in chunks / uploaded by the squasher tool*}
279
280 {if $item.hidden eq false OR $user_level > 99 }
281                 <div class={if $item.finished==true}"status3"{elseif $item.finished!=true && $item.embedable==true}"status2"{elseif $item.finished!=true && $item.embedable!=true}"status1"{else}"item"{/if}>
282
283                                 <div class="name">{$item.name} {if $user_level > 99}{if $item.hidden}<font color=red>|<a href='?tools=unhide&h={$id}'>publish</a>|</font>{else}<font color=green>|<a href='?tools=hide&h={$id}'>hide</a>|</font>{/if}{if $user_level > 100}<font color=red>|<a href='?tools=delete&h={$id}' onClick="javascript:return confirm('Are you sure you want to permanently delete {$item.name}?')">delete</a>|</font>{/if}{/if}</div>
284
285                                 <div class="status">status: {$item.status}</div>
286
287                 <div class="clear"></div>
288
289                 <div class="added">added: {$item.date}</div>
290                 
291                                 <!--div class="chunks"></div-->
292                                 <div class="size">size:&nbsp;{if $item.size>(1024*1024)}{math equation="((x / 1024) / 1024) * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.2f"}&nbsp;/&nbsp;{math equation="(x / 1024) / 1024" x=$item.size format="%.2f"}mb{elseif $item.size>(1024)}{math equation="(x / 1024) * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.2f"}&nbsp;/&nbsp;{math equation="(x / 1024)" x=$item.size format="%.2f"}kb{else}{math equation="x * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.0f"}&nbsp;/&nbsp;{$item.size}b{/if}({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_finished format="%.0f"}%)</div>
293
294                 <div class="clear"></div>
295
296                 <div class="updated">last updated: {$item.lastchange}</div>
297
298
299 {if $item.finished==true}
300                                 <div class="download"><a href='?f={$id}'>download</a></div>
301 {/if}
302 {if $item.embedable eq true and $item.finished eq false}
303         {if $item.mime=='video/mpeg'}
304                                 <div class="stream"><a href='?f={$id}'>download ({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_partial format="%.0f"}%)</a></div>
305         {/if}
306 {/if}
307
308                 <div class="clear"></div>
309                 </div>
310         
311                 <div class="clear"></div>
312 {/if}
313
314 {else}{*These items are plain files / uploaded manually by the user via ftp*}
315
316 {if $item.hidden eq false OR $user_level > 99 }
317                 <div class={if $item.finished==true}"status3"{elseif $item.finished!=true && $item.embedable==true}"status2"{elseif $item.finished!=true && $item.embedable!=true}"status1"{else}"item"{/if}>
318
319                                 <div class="name">{$item.name} {if $user_level > 99}{if $item.hidden}<font color=red>|<a href='?tools=unhide&h={$id}'>publish</a>|</font>{else}<font color=green>|<a href='?tools=hide&h={$id}'>hide</a>|</font>{/if}{if $user_level > 199}<font color=red>|<a href='?tools=delete&h={$id}' onClick="javascript:return confirm('Are you sure you want to permanently delete {$item.name}?')">delete</a>|</font>{/if}{/if}</div>
320
321                                 <div class="status">status: {$item.status}</div>
322
323                 <div class="clear"></div>
324
325                 <div class="added">added: {$item.date}</div>
326
327                                 <div class="size">size:&nbsp;{if $item.size>(1024*1024)}{math equation="(x / 1024) / 1024" x=$item.size format="%.2f"}mb{elseif $item.size>(1024)}{math equation="(x / 1024)" x=$item.size format="%.2f"}kb{else}{$item.size}b{/if}</div>
328
329                 <div class="clear"></div>
330
331                 <div class="updated">last updated: {$item.lastchange}</div>
332
333
334 {if $item.finished==true}
335                                 <div class="download"><a href='?f={$id}'>download</a></div>
336 {/if}
337 {if $item.embedable eq true and $item.finished eq false}
338         {if $item.mime=='video/mpeg'}
339                                 <div class="stream"><a href='?f={$id}'>download (partial)</a></div>
340         {/if}
341 {/if}
342
343
344                 <div class="clear"></div>
345                 </div>
346         
347                 <div class="clear"></div>
348 {/if}
349 {/if}
350 {/foreach}
351
352         </div>
353
354         <div class="filler">
355         <div class="bottomimage"></div>
356 {if $user_level > 100 and $mass_delete_size > 0}
357                 <div class="massdelete"><input type="button" value="Delete multiple items:" OnClick="toggle_id('deletebox');" ><br>
358 <div class="deletebox" id="deletebox">
359         <form action="?tools=delete&h=multiple" method="post">
360                 <select multiple="" size="{$mass_delete_size}" id="h" name="h[]">
361 {foreach item=item key=id from=$squashed}
362                         <option value="{$id}">{$item.name}</option>
363 {/foreach}
364                 </select>
365                 <input type="submit" value="Delete Selected Items">
366         </form>
367 </div>
368         </div>
369 {/if}
370         </div>
371         <div class="clear"></div>
372
373         <div class="spacer"></div>
374
375         <div class="footer">&nbsp;</div>
376
377 </div>
378 </div>
379 {if $debug}{debug}{/if}
380 </body>
381 </html>