Moved style to a css file
[squasher.git] / templates / index.tpl
1 <!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 <link rel=stylesheet href="css/squasher.css">
6 <title>Squasher</title>
7 <script type="text/javascript" language="JavaScript">{literal}
8    function toggle_id(hideshow){
9     if(document.getElementById(hideshow).style.visibility == 'visible') {
10      document.getElementById(hideshow).style.visibility = 'hidden';
11     }else{
12      document.getElementById(hideshow).style.visibility = 'visible';
13     }
14    }
15    function selectAllList() {
16     var aSelect = document.deletetool["h[]"];
17     var aSelectLen = aSelect.length;
18     for(i = 0; i < aSelectLen; i++) {
19      aSelect.options[i].selected = true;
20     }
21    }
22 {/literal}</script>
23 </head>
24 <body style="min-width:1000px;">
25 <div class="wrapper">
26 <div class="container">
27
28         <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;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name})</a>&nbsp;</div></div>
29
30         <div class="spacer"></div>
31
32         <div class="menucontainer">
33
34         <div class="menu">
35         
36         <div class="menuhead">current folder</div>
37         
38         {foreach item=crumb key=cookie from=$base}<div class="menuitem" onClick="location.href='?path={$cookie}'" style="cursor:pointer" >{$crumb}</div>{/foreach}
39         
40         </div>
41         
42         <div class="clear"></div>
43         
44         <div class="menu">
45         
46         <div class="menuhead">subfolders</div>
47         
48         {foreach item=folder key=folderpath from=$subfolders}<div class="menuitem" onClick="location.href='?path={$folderpath}'" style="cursor:pointer" >{$folder}</div>{/foreach}
49         
50         </div>
51         
52         <div class="clear"></div>
53 {*      
54         <div class="menu">
55         
56         {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}
57         
58         </div>
59         
60         
61         
62         <div class="clear"></div>*}
63         
64         </div>
65         
66         <div class="spacer"></div>
67
68 <div class="content">
69 {assign var=mass_delete_size value=count($squashed)}
70 {foreach item=item key=id from=$squashed}
71 {if $item.squashed}{*These items are in chunks / uploaded by the squasher tool*}
72
73 {if $item.hidden eq false OR $user_level > 99 }
74                 <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}>
75
76                                 <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>
77
78                                 <div class="status">status: {$item.status}</div>
79
80                 <div class="clear"></div>
81
82                 <div class="added">added: {$item.date}</div>
83                 
84                                 <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>
85
86                 <div class="clear"></div>
87
88                 <div class="updated">last updated: {$item.lastchange}</div>
89
90
91 {if $item.finished==true}
92                                 <div class="download"><a href='?f={$id}'>download</a></div>
93 {/if}
94 {if $item.embedable eq true and $item.finished eq false}
95         {if $item.mime=='video/mpeg'}
96                                 <div class="stream"><a href='?f={$id}'>download ({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_partial format="%.0f"}%)</a></div>
97         {/if}
98 {/if}
99
100                 <div class="clear"></div>
101                 </div>
102         
103                 <div class="clear"></div>
104 {/if}
105
106 {else}{*These items are plain files / uploaded manually by the user via ftp*}
107
108 {if $item.hidden eq false OR $user_level > 99 }
109                 <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}>
110
111                                 <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>
112
113                                 <div class="status">status: {$item.status}</div>
114
115                 <div class="clear"></div>
116
117                 <div class="added">added: {$item.date}</div>
118
119                                 <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>
120
121                 <div class="clear"></div>
122
123                 <div class="updated">last updated: {$item.lastchange}</div>
124
125
126 {if $item.finished==true}
127                                 <div class="download"><a href='?f={$id}'>download</a></div>
128 {/if}
129 {if $item.embedable eq true and $item.finished eq false}
130         {if $item.mime=='video/mpeg'}
131                                 <div class="stream"><a href='?f={$id}'>download (partial)</a></div>
132         {/if}
133 {/if}
134
135
136                 <div class="clear"></div>
137                 </div>
138         
139                 <div class="clear"></div>
140 {/if}
141 {/if}
142 {/foreach}
143
144         </div>
145
146         <div class="filler">
147         <div class="bottomimage"></div>
148 {if $user_level > 100 and $mass_delete_size > 1}
149                 <div class="massdelete"><br>
150 <div class="deletebox" id="deletebox">
151         <form name="deletetool" action="?tools=delete&h=multiple" method="post" onSubmit='return confirm("Are you sure you want to delete the selected files? \nThis page may take a while to reload while the files are removed.");'>
152                 <select multiple="" size="{$mass_delete_size}" id="h" name="h[]" width="300px">
153 {foreach item=item key=id from=$squashed}
154                         <option value="{$id}" title="{$item.name}">{$item.name|truncate:39}</option>
155 {/foreach}
156                 </select>
157                 <input type="button" value="Select All" OnClick="selectAllList();" ><input type="reset" value="Clear"><input type="submit" value="Delete Selected Items">
158         </form>
159 </div>
160 {*<br><input type="button" value=":show deletion tool:" OnClick="toggle_id('deletebox');" >*}
161         </div>
162 {/if}
163         </div>
164         <div class="clear"></div>
165
166         <div class="spacer"></div>
167
168         <div class="footer">&nbsp;</div>
169
170 </div>
171 </div>
172 {if $debug}{debug}{/if}
173 </body>
174 </html>