Index: trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 401)
+++ trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 414)
@@ -91,29 +91,15 @@
 				'bg_color'					=> $GLOBALS['phpgw_info']['theme']['bg_color'],
 				'th_bg'						=> $GLOBALS['phpgw_info']['theme']['th_bg'],
-				
 				'accounts_url'				=> $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uiaccounts.list_users'),
 				'back_url'					=> $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'),
 				'add_action'				=> $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uiaccounts.add_users'),
-				
 				'create_user_disabled'		=> $this->functions->check_acl($account_lid,'add_users') ? '' : 'disabled',
 				'context'					=> $raw_context,
 				'context_display'			=> $context_display,
-				'imapDelimiter'				=> $_SESSION['phpgw_info']['expresso']['email_server']['imapDelimiter'], 
-				
-				'lang_create_user'			=> lang('Create User'),
-				'lang_loginid'				=> lang('LoginID'),
-				'lang_cn'					=> lang('Name'),
-				'lang_mail'					=> lang('E-mail'),
-				'lang_edit'					=> lang('edit'),
-				'lang_rename'				=> lang('rename'),
-				'lang_delete'				=> lang('delete'),
-				'lang_search'				=> lang('Search'),
-				'lang_back'					=> lang('back'),
-				'lang_contexts'				=> lang('Contexts')
-				
+				'imapDelimiter'				=> $_SESSION['phpgw_info']['expresso']['email_server']['imapDelimiter']
 			);
 			$p->set_var($var);
-			
-			// Save query
+			$p->set_var($this->functions->make_dinamic_lang($p, 'body'));
+
 			$p->set_var('query', $GLOBALS['query']);
 			
@@ -251,27 +237,5 @@
 				// First ABA
 				'display_spam_uid'				=> 'display:none',
-				'lang_general_information'		=> lang('General Information'),
-				'lang_corporative_information'	=> lang('Corporative Information'),
-				'lang_email_config'				=> lang('Email Config'),
-				'lang_groups_permission'		=> lang('Groups Permission'),
-				'lang_lists_permission'			=> lang('Email Lists'),
-				'lang_aplication_permission'	=> lang('Aplication Permission'),	
-				'lang_search_organization'		=> lang('Search Organiztion'),
-				'lang_organizations'			=> lang('Organizations'),
-				'lang_sector'					=> lang('Sector'),
-				'lang_account_lid'				=> lang('Login ID'),
-				'lang_firstname'				=> lang('First Name'),
-				'lang_lastname'					=> lang('Last Name'),
-				'lang_password'					=> lang('Password'),
-				'lang_re-password'				=> lang('Re-Password'),
-				'lang_passwd_expired'			=> lang('Password expired'),
-				'lang_changepassword'			=> lang('Change password'),				
-				'lang_phone'					=> lang('Phone'),
-				'lang_photo'					=> lang('Photo'),
-				'lang_account_active'			=> lang('Account Active'),
-				'lang_account_invisible'		=> lang('Account Invisible'),
-				'lang_never'					=> lang('never'),
-				'lang_back'						=> lang('Back'),
-				'lang_save'						=> lang('Save'),
+				
 				'sectors'						=> $combo_manager_org,
 				'combo_organizations'			=> $combo_manager_org,
@@ -290,18 +254,6 @@
 				// Corporative Information
 				'display_corporative_information' => $this->functions->check_acl($manager_lid,'manipulate_corporative_information') ? '' : 'none',
-				'lang_employeenumber'			=> lang('Employee number'),
-				'lang_cpf'						=> lang('cpf'),
-				'lang_rg'						=> lang('rg'),
-				'lang_rguf'						=> lang('rguf'),
 				
 				//MAIL
-				'lang_activeemailaccount'		=> lang('Active email account'),
-				'lang_email'					=> lang('E-mail'),
-				'lang_aliasemail'				=> lang('Alias email'),
-				'lang_forwardingemail'			=> lang('Forwarding email'),
-				'lang_email_quota'				=> lang('Email quota in MB'),
-				'lang_onlyforwarding'			=> lang('Only forwarding'),
-				'lang_quote_message'			=> lang('leave empty for no quota'),
-				'lang_email_quota_used'			=> lang('Quota used in MB'),
 				'accountstatus_checked'			=> 'CHECKED',
 				'mailquota'						=> $this->current_config['expressoAdmin_defaultUserQuota'],
@@ -310,30 +262,8 @@
 				'input_mailalternateaddress_fields' => '<input type="text" name="mailalternateaddress[]" id="mailalternateaddress" autocomplete="off" value="{mailalternateaddress}" {disabled} size=30>',
 				'input_mailforwardingaddress_fields'=> '<input type="text" name="mailforwardingaddress[]" id="mailforwardingaddress" autocomplete="off" value="{mailforwardingaddress}" {disabled} size=30>',
-
-				//Third ABA
-				'lang_groups'					=> lang('Groups'),
-				'lang_user_groups'				=> 'Grupos do Usuário',
-				'lang_available_groups'			=> 'Grupos disponíveis',
-				'lang_listGroups'				=> lang('ListGroups'),
-				'lang_primary_group'			=> lang('Primary Group'),
-				'lang_add'						=> lang('Add'),
-				'lang_rem'						=> lang('Remove'),
-				
-				//Fourd ABA
-				'lang_user_mail_lists'			=> 'O usuário participa destas Listas de E-mail',
-				'lang_available_mail_lists'		=> 'Listas de E-mail disponíveis',
-				
-				//Five ABA
+				
 				'apps'								=> $applications_list,
 				
 				//SAMBA ABA
-				'lang_samba_config'					=> lang('Samba Config'),
-				'lang_use_attrs_samba'				=> lang('Use samba attributes'),
-				'lang_sambadomain'					=> lang('Domain'),
-				'lang_sambaAcctFlags'				=> lang('AcctFlags'),
-				'lang_sambaLogonScript'				=> lang('Logon Script'),
-				'lang_sambaHomeDirectory'			=> lang('Home Directory'),
-				'lang_active_user'					=> lang('Samba User Active'),
-				'lang_desactive_user'				=> lang('Samba User Desactive'),
 				'use_attrs_samba_checked'			=> 'CHECKED',
 				'sambadomainname_options'			=> $sambadomainname_options,
@@ -342,4 +272,5 @@
 			);
 			$t->set_var($var);
+			$t->set_var($this->functions->make_dinamic_lang($t, 'main'));
 			$t->pfp('out','main');
 		}
@@ -470,15 +401,8 @@
 			$t->set_block('body','main');
 							
-    		// ORGANIZATIONS
-    		/*
-   			foreach ($contexts as $index=>$context)
-   				$orgs .= $this->functions->get_organizations($context, $user_info['context']);
-   			*/
-   				
 			foreach ($contexts as $index=>$context)
 				$combo_manager_org .= $this->functions->get_organizations($context, $user_info['context']);
 			$combo_all_orgs = $this->functions->get_organizations($GLOBALS['phpgw_info']['server']['ldap_context'], $user_info['context'], true, true, true);			
 
-
 			// GROUPS.
 			if (count($user_info['groups_info']) > 0)
@@ -491,14 +415,4 @@
 				foreach ($array_groups as $gidnumber=>$cn)
 				{
-					// Grupo existe no Banco mas não no Ldap, excluimos grupo do Banco.
-					/*
-					if (!$this->ldap_functions->group_exist($gidnumber))
-					{
-						$this->db_functions->delete_group($gidnumber);
-						$this->db_functions->write_log("expressoAdmin deletou o grupo $gidnumber do banco, pois não existia no ldap.",'','','','');
-						continue;
-					}
-					*/
-					
 					// O memberUid do usuário está somente no Banco, então adicionamos o memberUid no Ldap.
 					if (is_null($user_info['groups_ldap'][$gidnumber]))
@@ -649,31 +563,7 @@
 				'alert_warning'					=> "$alert_warning",
 				'display_input_account_lid'		=> 'display:none',
-				'lang_general_information'		=> lang('General Information'),
-				'lang_corporative_information'	=> lang('Corporative Information'),
-				'lang_email_config'				=> lang('Email Config'),
-				'lang_groups_permission'		=> lang('Groups Permission'),
-				'lang_lists_permission'			=> lang('Email Lists'),
-				'lang_aplication_permission'	=> lang('Aplication Permission'),	
-				'lang_organizations'			=> lang('Organizations'),
-				'lang_search_organization'		=> lang('Search Organiztion'),
-				'lang_sector'					=> lang('Sector'),
-				'lang_account_lid'				=> lang('Login ID'),
-				'lang_firstname'				=> lang('First Name'),
-				'lang_lastname'					=> lang('Last Name'),
-				'lang_passwd_expired'			=> lang('Password expired'),
-				'lang_password'					=> lang('Password'),
-				'lang_phone'					=> lang('Phone'),
-				'lang_photo'					=> lang('Photo'),
-				'lang_re-password'				=> lang('Re-Password'),
-				'lang_changepassword'			=> lang('Change password'),				
-				'lang_account_active'			=> lang('Account Active'),
-				'lang_account_invisible'		=> lang('Account Invisible'),
-				'lang_back'						=> lang('Back'),
-				'lang_save'						=> lang('Save'),
-				
 				'sectors'						=> $combo_manager_org,
 				'combo_organizations'			=> $combo_manager_org,
 				'combo_all_orgs'				=> $combo_all_orgs,
-				
 				'uid'							=> $user_info['uid'],
 				'givenname'						=> $user_info['givenname'],
@@ -683,9 +573,6 @@
 				'photo_bin'						=> $photo_bin,
 				'disabled_edit_photo'			=> $disabled_edit_photo,
-				//'display_picture'				=> $this->functions->check_acl($manager_account_lid,'edit_users_picture') ? '' : 'none',
 				'display_picture'				=> $display_picture,
-				
 				'display_tr_default_password'	=> $this->functions->check_acl($manager_account_lid,'set_user_default_password') ? '' : 'none',
-				
 				'passwd_expired_checked'		=> $user_info['passwd_expired'] == '0' ? 'CHECKED' : '',
 				'changepassword_checked'		=> $user_info['changepassword'] == '1' ? 'CHECKED' : '',
@@ -694,49 +581,25 @@
 
 				// Corporative Information
-				'lang_employeenumber'			=> lang('Employee number'),
-				'lang_cpf'						=> lang('cpf'),
-				'lang_rg'						=> lang('rg'),
-				'lang_rguf'						=> lang('rguf'),
 				'corporative_information_employeenumber' => $user_info['corporative_information_employeenumber'],
 				'corporative_information_cpf'			=> $user_info['corporative_information_cpf'],
 				'corporative_information_rg'			=> $user_info['corporative_information_rg'],
 				'corporative_information_rguf'			=> $user_info['corporative_information_rguf'],
+				'corporative_information_description'	=> $user_info['corporative_information_description'],
 				
 				//MAIL
 				'disabled_quota_used'		=> 'disabled',
-				'lang_activeemailaccount'	=> lang('Active email account'),
-				'lang_email'				=> lang('E-mail'),
-				'lang_aliasemail'			=> lang('Alias email'),
-				'lang_forwardingemail'		=> lang('Forwarding email'),
-				'lang_email_quota'			=> lang('Email quota in MB'),
-				'lang_onlyforwarding'		=> lang('Only forwarding'),
-				'lang_email_quota_used'		=> lang('Quota used in MB'),
-				
 				'accountstatus_checked'		=> $user_info['accountstatus'] == 'active' ? 'CHECKED' : '',
 				'mail'						=> $user_info['mail'],
-				
-				//'mailalternateaddress'		=> $user_info['mailalternateaddress'],
-				//'mailforwardingaddress'		=> $user_info['mailforwardingaddress'],
 				'input_mailalternateaddress_fields'	=> $input_mailalternateaddress_fields,
 				'input_mailforwardingaddress_fields'=> $input_mailforwardingaddress_fields,
-				
 				'deliverymode_checked'		=> $user_info['deliverymode'] == 'forwardOnly' ? 'CHECKED' : '',
-				
 				'mailquota'					=> $user_info['mailquota'],
 				'mailquota_used'			=> $user_info['mailquota_used'],
 
 				//Third ABA
-				'lang_groups'				=> lang('Groups'),
-				'lang_user_groups'			=> 'Grupos do Usuário',
-				'lang_available_groups'		=> 'Grupos disponíveis',
-				'lang_primary_group'		=> lang('Primary Group'),
-				'lang_add'					=> lang('Add'),
-				'lang_rem'					=> lang('Remove'),
 				'ea_select_user_groups_options'	=> $ea_select_user_groups_options,
 				'ea_combo_primary_user_group_options'	=> $ea_combo_primary_user_group_options,
 				
 				//Fourd ABA
-				'lang_user_mail_lists'			=> 'O usuário participa destas Listas de E-mail',
-				'lang_available_mail_lists'		=> 'Listas de E-mail disponíveis',
 				'ea_select_user_maillists_options'  => $ea_select_user_maillists_options,
 								
@@ -745,13 +608,4 @@
 
 				//SAMBA ABA
-				'lang_samba_config'			=> lang('Samba Config'),
-				'lang_use_attrs_samba'		=> lang('Use samba attributes'),
-				'lang_sambadomain'			=> lang('Domain'),
-				'lang_sambaAcctFlags'		=> lang('AcctFlags'),
-				'lang_sambaLogonScript'		=> lang('Logon Script'),
-				'lang_sambaHomeDirectory'	=> lang('Home Directory'),
-				'lang_active_user'			=> lang('Samba User Active'),
-				'lang_desactive_user'		=> lang('Samba User Desactive'),
-				
 				'userSamba'					=> $user_info['sambaUser'],
 				'sambadomainname_options'	=> $sambadomainname_options,
@@ -765,4 +619,5 @@
 			);
 			$t->set_var($var);
+			$t->set_var($this->functions->make_dinamic_lang($t, 'main'));
 			
 			// Devo mostrar aba SAMBA ??
@@ -911,12 +766,8 @@
 			$var = Array(
 				'th_bg'			=> $GLOBALS['phpgw_info']['theme']['th_bg'],
-				'lang_back'		=> 'Back',
 				'back_url'		=> "./index.php?menuaction=expressoAdmin1_2.uiaccounts.edit_user&account_id=$account_id",
-				'lang_loginid'	=> lang('Login ID'),
-				'lang_ip'		=> lang('IP'),
-				'lang_login'	=> lang('Log IN'),
-				'lang_logout'	=> lang('Log OUT')
 			);
 			$t->set_var($var);
+			$t->set_var($this->functions->make_dinamic_lang($t, 'body'));
 			$t->pfp('out','body');
 		}
