Changeset 1556
- Timestamp:
- 10/29/09 14:46:20 (15 years ago)
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1543 r1556 47 47 //originally post_vars 48 48 // var $goto; 49 var $current_config; 49 50 var $goto_x; 50 51 var $download_x; … … 96 97 97 98 $this->t = $GLOBALS['phpgw']->template; 99 $c = CreateObject('phpgwapi.config','filemanager'); 100 $c->read_repository(); 101 $this->current_config = $c->config_data; 102 98 103 99 104 // here local vars are created from the HTTP vars … … 277 282 } 278 283 284 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/global.js'></script>"; 279 285 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/main.js'></script>"; 280 286 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>"; … … 450 456 } 451 457 452 /* Update if they request it, or one out of 20 page loads */ 453 srand((double) microtime() * 1000000);454 if ($update || rand(0, 19) == 4)458 459 /* Update the vfs */ 460 if ($_GET['update'] == 'True') 455 461 { 456 462 $this->bo->vfs->update_real(array( 457 463 'string' => $this->path, 458 'relatives' => array(RELATIVE_ NONE)464 'relatives' => array(RELATIVE_ALL) 459 465 )); 460 466 } … … 575 581 } 576 582 $columns++; 577 583 $vars[usedSpace]='<input type="hidden" id="usedSpace" value="'.round(($this->usedSpace()/1024)/1024).'">'; 584 $vars[quotaSize]='<input type="hidden" id="quotaSize" value="'.$this->current_config['filemanager_quota_size'].'">'; 585 $vars[javascript]='<script src="filemanager/js/draw_api.js"></script>'; 578 586 $vars[toolbar0]=$this->toolbar('location'); 579 587 $vars[toolbar1]=$this->toolbar('list_nav'); … … 863 871 } 864 872 865 if($files['mime_type'] == 'Directory') 866 { 867 $usedspace += $fileinfo[0]; 868 } 869 else 870 { 871 $usedspace += $files['size']; 872 } 873 $usedspace += $files['size']; 873 874 874 875 $this->t->set_var('row_tr_color',''); … … 1054 1055 if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add) 1055 1056 { 1056 1057 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';1058 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';1059 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';1060 // $toolbar.=$this->inputImage('download','download',lang('Download'));1061 1057 // upload button 1062 $toolbar.=$this->inputImage('upload','upload',lang('Upload')); 1058 if (($this->usedSpace()*1024*1024) > $this->current_config['filemanager_quota_size']) 1059 $toolbar.=$this->inputImage('upload','upload',lang('Upload')); 1063 1060 } 1064 1061 $toolbar.='</tr></table>'; … … 1154 1151 } 1155 1152 1153 1154 function usedSpace(){ 1155 for($i = 0; $i != $this->numoffiles; $i++) 1156 $usedspace += $this->files_array[$i]['size']; 1157 return $usedspace; 1158 } 1159 1156 1160 // move to bo 1157 1161 # Handle File Uploads 1158 1162 function fileUpload() 1159 1163 { 1164 if (($this->usedSpace()*1024*1024) > $this->current_config['filemanager_quota_size']) 1165 echo lang('You exceded the quota'); 1166 else 1160 1167 if($this->path != '/' && $this->path != $this->bo->fakebase) 1161 1168 { … … 1187 1194 } 1188 1195 } 1189 $c = CreateObject('phpgwapi.config','filemanager'); 1190 $c->read_repository(); 1191 $current_config = $c->config_data; 1192 $max_size = $current_config['filemanager_Max_file_size']; 1196 $max_size = $this->current_config['filemanager_Max_file_size']; 1193 1197 if (! $max_size) 1194 1198 $max_size = ini_get('upload_max_filesize'); -
sandbox/filemanager/inc/hook_sidebox_menu.inc.php
r1506 r1556 30 30 $file = Array( 31 31 'Filemanager preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=filemanager'), 32 'Update'=>$GLOBALS['phpgw']->link('/index.php','menuaction=filemanager.uifilemanager.index&update=True'), 32 33 'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=filemanager'), 33 34 ); -
sandbox/filemanager/js/main.js
r1529 r1556 1 1 2 -
sandbox/filemanager/templates/default/config.tpl
r1533 r1556 11 11 <td> 12 12 <input size="1" name="newsettings[filemanager_Max_file_size]" value="{value_filemanager_Max_file_size}"> Mb 13 </td> 14 </tr> 15 <tr bgcolor="{row_off}"> 16 <td>{lang_quota_size}</td> 17 <td> 18 <input size="2" name="newsettings[filemanager_quota_size]" value="{value_filemanager_quota_size}"> Mb 13 19 </td> 14 20 </tr> -
sandbox/filemanager/templates/default/filelisting.tpl
r1543 r1556 1 1 <!-- BEGIN filemanager_header --> 2 {usedSpace} 3 {quotaSize} 4 {javascript} 2 5 <form name="formfm" method="post" action="{form_action}"> 3 4 5 6 {toolbar0} 6 7 <div id="fmMenu"> … … 26 27 {lang_no_files} 27 28 </tbody></table> 28 </div> 29 29 </div> 30 30 <div id="fmStatusBar"><b>{lang_files_in_this_dir}:</b> {files_in_this_dir} <b>{lang_used_space}: </b> {used_space}</div> 31 31 </form> 32 32 <!-- END filemanager_footer --> 33 -
trunk/phpgwapi/templates/default/css/azul.css
r1513 r1556 55 55 /* overflow: visible !important;*/ 56 56 border: 1px #bbbbbb solid !important; 57 } 58 .dsused 59 { 60 background-image: url(../images/dsused.gif); 57 61 } 58 62
Note: See TracChangeset
for help on using the changeset viewer.