First git import
[squasher.git] / templates / index2.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:400px;
73 height:50px;
74 border:2px solid;
75 border-color:#FFFFFF;
76 font-size:12px;
77 }
78
79 .item{
80 background-color:#E2EBD8;
81 }
82 .status1{
83 background-color:#FFCCCC;
84 }
85 .status2{
86 background-color:#FFFFCC;
87 }
88 .status3{
89 background-color:#CCFFCC;
90 }
91
92 .name{
93 float:left;
94 left:1px;
95 top:1px;
96 padding-left:1px;
97 z-index:50;
98 }
99
100 .center{
101 float:left;
102 height:inherit;
103 padding-left:1px;
104 }
105
106 .chunks{
107 float:right;
108 padding-left:2px;
109 padding-right:3px;
110 }
111
112 .size{
113 float:right;
114 padding-left:2px;
115 padding-right:3px;
116 }
117
118 .added{
119 float:left;
120 padding-left:2px;
121 padding-right:3px;
122 }
123
124 .updated{
125 float:left;
126 padding-left:2px;
127 padding-right:3px;
128 }
129
130 .status{
131 float:right;
132 top:1px;
133 padding-right:2px;
134 text-align:right;
135 z-index:10;
136 }
137
138 .stream{
139 float:right;
140 padding-left:1px;
141 padding-right:2px;
142 }
143
144 .download{
145 float:right;
146 padding-left:1px;
147 padding-right:2px;
148 }
149
150 .clear{
151 clear:both;
152 height:1px;
153 font-size: 0;
154 }
155
156 .spacer{
157 clear:both;
158 height:10px;
159 }
160
161 .videoframe{
162 float:left;
163 width:500px;
164 height:400px;
165 padding-left:25px;
166 }
167
168 .banner{
169 background-color:#66CC00;
170 text-align:center;
171 width:100%;
172 height:45px;
173 background:#66CC00 url(img/squash.gif) no-repeat 30px 50%;
174 }
175
176 .titel{
177 background-color:#66CC00;
178 text-align:center;
179 }
180
181 .footer{
182 background-color:#66CC00;
183 text-align:center;
184 background:#66CC00 url(img/gplogobottomright.gif) no-repeat 100%;
185 }
186
187 .bottomimage{
188 background: #FFFFFF url(img/gp1.gif) no-repeat 95% 95%;
189 float:right;
190 width:300px;
191 height:146px;
192 }
193
194 a{
195 color:#003300;
196 }
197
198 a:hover{
199 color:#FF6600;
200 }
201
202 </style>
203 </head>
204 {/literal}
205 <body style="min-width:1000px;">
206 <div class="wrapper">
207 <div class="container">
208
209         <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>
210
211         <div class="spacer"></div>
212
213         <div class="menucontainer">
214
215         <div class="menu">
216
217         <div class="menuhead">current folder</div>
218
219         {foreach item=crumb key=cookie from=$base}<div class="menuitem" onClick="location.href='?path={$cookie}'" style="cursor:pointer" >{$crumb}</div>{/foreach}
220
221         </div>
222
223         <div class="clear"></div>
224
225         <div class="menu">
226
227         <div class="menuhead">subfolders</div>
228
229         {foreach item=folder key=folderpath from=$subfolders}<div class="menuitem" onClick="location.href='?path={$folderpath}'" style="cursor:pointer" >{$folder}</div>{/foreach}
230
231         </div>
232
233         <div class="clear"></div>
234 {*      
235         <div class="menu">
236
237         {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}
238
239         </div>
240
241
242
243         <div class="clear"></div>*}
244
245         </div>
246
247         <div class="spacer"></div>
248
249 <div class="content">
250 {foreach item=item key=id from=$squashed}
251
252 {if $item.squashed}{*These items are in chunks / uploaded by the squasher tool*}
253
254 {if $item.hidden eq false OR $user_level > 99 }
255         <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}>
256
257                 <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>
258
259                 <div class="status">status: {$item.status}</div>
260
261         <div class="clear"></div>
262
263                 <div class="added">added: {$item.date}</div>
264
265                 <div class="chunks">({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_finished format="%.0f"}%)</div>
266                 <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}</div>
267
268         <div class="clear"></div>
269
270                 <div class="updated">last updated: {$item.lastchange}</div>
271
272
273 {if $item.finished==true}
274                 <div class="download"><a href='?f={$id}'>download</a></div>
275 {/if}
276 {if $item.embedable==true}
277         {if $item.finished==false}
278                 <div class="download"><a href='?f={$id}'>download</a></div>
279         {/if}
280         {if $item.mime=='video/mpeg'}
281                 <div class="stream"><a href='?d=x&f={$id}' target='videoframe'>sttreaming(embedded)</a></div>
282         {/if}
283                 <div class="stream"><a href='?x=vlc&f={$id}'>streaming(vlc)</a></div>
284                 <!--div class="stream">streaming </div-->
285 {/if}
286
287         </div>
288         
289 {/if}
290
291 {else}{*These items plain files / uploaded manually by the user via ftp*}
292
293 {if $item.hidden eq false OR $user_level > 99 }
294                 <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}>
295
296                                 <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>
297
298                                 <div class="status">status: {$item.status}</div>
299
300                 <div class="clear"></div>
301
302                 <div class="added">added: {$item.date}</div>
303
304                                 <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>
305
306                 <div class="clear"></div>
307
308                 <div class="updated">last updated: {$item.lastchange}</div>
309
310
311 {if $item.finished==true}
312                                 <div class="download"><a href='?f={$id}'>download</a></div>
313 {/if}
314 {if $item.embedable==true}
315         {if $item.finished==false}
316                                 <div class="download"><a href='?f={$id}'>download</a></div>
317         {/if}
318         {if $item.mime=='video/mpeg'}
319                                 <div class="stream"><a href='?d=x&f={$id}' target='videoframe'>embed</a></div>
320         {/if}
321                                 <div class="stream"><a href='?x=vlc&f={$id}'>vlc</a></div>
322                                 <div class="stream">streaming: </div>
323 {/if}
324
325                 </div>
326         
327                 <div class="clear"></div>
328 {/if}
329 {/if}
330 {/foreach}
331
332         </div>
333
334         <iframe class="videoframe" NAME='videoframe' FRAMEBORDER=0 SCROLLING=0 ></iframe>
335
336         <div class="bottomimage"></div>
337         
338         <div class="clear"></div>
339
340         <div class="spacer"></div>
341
342         <div class="footer">&nbsp;</div>
343
344 </div>
345 </div>
346 {if $debug}{debug}{/if}
347 </body>
348 </html>