Index: /sandbox/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1506)
+++ /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1529)
@@ -60,5 +60,5 @@
 go to your home directory	filemanager	pt-br	Ir para sua pasta Home
 go to:	filemanager	pt-br	Ir para:
-go up	filemanager	pt-br	subir
+go up	filemanager	pt-br	Subir
 home	filemanager	pt-br	Início
 location	filemanager	pt-br	Local
@@ -79,5 +79,5 @@
 preview of %1	filemanager	pt-br	Visualizar %1
 quick jump to	filemanager	pt-br	Atalho para:
-reload	filemanager	pt-br	recarregar
+reload	filemanager	pt-br	Recarregar
 rename	filemanager	pt-br	Renomear
 renamed %1 to %2	filemanager	pt-br	Renomeado %1 para %2
Index: /sandbox/filemanager/inc/hook_admin.inc.php
===================================================================
--- /sandbox/filemanager/inc/hook_admin.inc.php	(revision 1506)
+++ /sandbox/filemanager/inc/hook_admin.inc.php	(revision 1529)
@@ -1,3 +1,32 @@
 <?php
+if(!isset($GLOBALS['phpgw_info'])){
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'currentapp' => 'filemanager',
+		'nonavbar'   => true,
+		'noheader'   => true
+	);
+}
+require_once '../header.inc.php';
 
+
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* Written by Joseph Engo <jengo@phpgroupware.org>                          *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+{
+// Only Modify the $file and $title variables.....
+	$title = $appname;
+	$file = Array(
+		'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
+	);
+//Do not modify below this line
+	display_section($appname,$title,$file);
+}
 ?>
Index: /sandbox/filemanager/inc/load_lang.php
===================================================================
--- /sandbox/filemanager/inc/load_lang.php	(revision 1529)
+++ /sandbox/filemanager/inc/load_lang.php	(revision 1529)
@@ -0,0 +1,13 @@
+<?php
+	$array_keys = array();
+	$fn = $GLOBALS['phpgw_info']['flags']['currentapp'].'/setup/phpgw_'.$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'].'.lang';
+	if (file_exists($fn)){
+			$fp = fopen($fn,'r');
+		while ($data = fgets($fp,16000)){
+			list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));
+			$script .= "array_lang['".str_replace("'","\'",strtolower($message_id))."'] = '".str_replace("'","\'",$content)."';\n";
+		}
+		fclose($fp);
+	}
+	echo "<script type='text/javascript'>var array_lang = new Array(); $script</script>";
+?>
Index: /sandbox/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1525)
+++ /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1529)
@@ -277,4 +277,7 @@
 			}
 
+			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/main.js'></script>";
+			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>";
+			include('load_lang.php');
 
 			# Page to process users
@@ -597,5 +600,8 @@
 						if($this->prefs[$internal])
 						{
-							$col_data='<span><a href="'.$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->path.'&sortby='.$internal).'">'.$displayed.'</a></span>';
+							if ($internal != 'owner')
+								$col_data='<span><a href="'.$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->path.'&sortby='.$internal).'">'.$displayed.'</a></span>';
+							else
+								$col_data='<span>'.$displayed.'</span>';
 							$this->t->set_var('col_data',$col_data);
 							$this->t->parse('columns','column',True);
@@ -1113,7 +1119,10 @@
 							//$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
 
-							$toolbar3.='<td><input type=text size="15" name="newfile_or_dir" value="" /></td>';
-							$toolbar3.=$this->inputImage('newdir','createdir',lang('Create Folder'));
+							$toolbar3.='<td><input type="hidden" id="newfile_or_dir" name="newfile_or_dir" value="" /></td>';
+							$toolbar3.='<div onclick="alert(\'asdf\')">';
+							//TODO : create folder with problems
+							//$toolbar3.=$this->inputImage('newdir','createdir',lang('Create Folder'));
 							$toolbar3.=$this->inputImage('newfile','createfile',lang('Create File'));
+							$toolbar3.='</div>';
 						}
 
@@ -1171,5 +1180,20 @@
 						}
 					}
-
+					 $c = CreateObject('phpgwapi.config','filemanager');
+					 $c->read_repository();
+					 $current_config = $c->config_data;
+					 $max_size = $current_config['filemanager_Max_attachment_size'];
+					 if (! $max_size)
+						 $max_size = ini_get('upload_max_filesize');
+					 else
+						 $max_size .= "M";
+
+					 $upload_max_filesize = str_replace("M","",$max_size) * 1024 * 1024;
+
+					if ($_FILES['upload_file']['size'][$i] > $upload_max_filesize)
+					{
+						$this->messages[]=lang('The size of %1 has exceded the limit: %2', $this->disppath.'/'.$_FILES['upload_file']['name'][$i], $max_size);
+					}
+					else
 					if($_FILES['upload_file']['size'][$i] > 0)
 					{
@@ -1885,5 +1909,5 @@
 			{
 				return '<td class="" align="center" valign="middle" height="28" width="70">
-				<input title="'.$description.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" /><br><small>'.$description.'</small>
+				<input onclick="return formfmValidate(this.name)" title="'.$description.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" /><br><small>'.$description.'</small>
 				</td>';
 			}
Index: /sandbox/filemanager/js/main.js
===================================================================
--- /sandbox/filemanager/js/main.js	(revision 1529)
+++ /sandbox/filemanager/js/main.js	(revision 1529)
@@ -0,0 +1,1 @@
+
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1529)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1529)
@@ -0,0 +1,61 @@
+function formfmValidate(arg)
+{
+	switch (arg) {
+		case 'newdir':
+		case 'newfile':
+			var name = prompt(get_lang('Enter with the name of new file/directory'), '');
+			var input_text = document.getElementById('newfile_or_dir');
+			if (name == null || ! validateFileExtension(name))
+			{
+				return false;
+			}
+			else
+			{
+				input_text.value = name;
+				return true;
+			}
+			break
+		default:
+			return true;
+	}
+}
+
+var denyFileExtensions = new Array('exe','com','reg','chm','cnf','hta','ins',
+					'jse','job','lnk','pif','src','scf','sct','shb',
+					'vbe','vbs','wsc','wsf','wsh','cer','its','mau',
+					'mda','mar','mdz','prf','pst');
+function validateFileExtension(fileName){
+	var error_flag = false;
+	var fileExtension = fileName.split(".");
+	fileExtension = fileExtension[(fileExtension.length-1)];
+	for(var i=0; i<denyFileExtensions.length; i++)
+	{
+		if(denyFileExtensions[i] == fileExtension)
+		{
+			error_flag = true;
+			break;
+		}
+
+	}
+
+	if ( error_flag == true )
+	{
+		alert(get_lang('File extension forbidden or invalid file') + '.');
+		return false;
+	}
+	return true;
+}
+
+function get_lang(_key){
+	var key = _key.toLowerCase();
+	if(array_lang[key])
+		var _value = array_lang[key];
+	else
+		var _value = _key+"*";
+
+	if(arguments.length > 1)
+		for(j = 1; typeof(arguments[j]) != 'undefined'; j++)
+			_value = _value.replace("%"+j,arguments[j]);
+	return _value;
+
+}
Index: /sandbox/filemanager/index.php
===================================================================
--- /sandbox/filemanager/index.php	(revision 1506)
+++ /sandbox/filemanager/index.php	(revision 1529)
@@ -20,4 +20,6 @@
 
 	include('../header.inc.php');
+/*	$preferences = $GLOBALS['phpgw']->preferences->read();
+$_SESSION['phpgw_info']['user']['preferences']['filemanager'] = $preferences['filemanager'];*/
 
 	Header('Location: '.$GLOBALS['phpgw']->link('/index.php','menuaction=filemanager.uifilemanager.index'));
Index: /sandbox/filemanager/templates/default/config.tpl
===================================================================
--- /sandbox/filemanager/templates/default/config.tpl	(revision 1529)
+++ /sandbox/filemanager/templates/default/config.tpl	(revision 1529)
@@ -0,0 +1,30 @@
+<!-- BEGIN header -->
+<form method="POST" action="{action_url}">
+<table border="0" align="center">
+   <tr bgcolor="{th_bg}">
+    <td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
+   </tr>
+<!-- END header -->
+<!-- BEGIN body -->
+    <tr bgcolor="{row_on}"> 	 	 
+    <td>{lang_Max_attachment_size}</td> 	 	 
+    <td> 	 	 
+    <input size="1" name="newsettings[filemanager_Max_attachment_size]" value="{value_filemanager_Max_attachment_size}">&nbsp;Mb
+    </td>
+    </tr>
+<!-- END body -->
+<!-- BEGIN footer -->
+  <tr bgcolor="{th_bg}">
+    <td colspan="2">
+&nbsp;
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" align="center">
+      <input type="submit" name="submit" value="{lang_submit}">
+      <input type="submit" name="cancel" value="{lang_cancel}">
+    </td>
+  </tr>
+</table>
+</form>
+<!-- END footer -->
