Index: branches/2.2.0.1/mobile/setup/phpgw_es-es.lang
===================================================================
--- branches/2.2.0.1/mobile/setup/phpgw_es-es.lang	(revision 3665)
+++ 	(revision )
@@ -1,75 +1,0 @@
-Add Recipient	mobile	es-es	Agregar Destinatario
-Calendar	mobile	es-es	Agenda
-contact center	mobile	es-es	Direcciones
-continue	mobile	es-es	Continuar
-Do you like to delete this message?	mobile	es-es	Desea excluir este mensaje?
-download attachs	mobile	es-es	Desea bajar anexos en e-mails?
-Download	mobile	es-es	Bajar Archivos (Download)
-Drafts	mobile	es-es	Borrador
-E-mail	mobile	es-es	e-mail
-From	mobile	es-es	De
-Forward	mobile	es-es	reenviar
-Logout	mobile	es-es	Salir
-To	mobile	es-es	Para
-Subject	mobile	es-es	Asunto
-Send	mobile	es-es	Enviar
-Reply	mobile	es-es	Responder
-Reply to All	mobile	es-es	Responder a Todos
-Folder	mobile	es-es	Carpeta
-of	mobile	es-es	de
-Inbox	mobile	es-es	Bandeja de Entrada
-Return	mobile	es-es	Regresar a la lista de E-mails
-Logout	mobile	es-es	Salir
-People	mobile	es-es	Personal
-Calendar	mobile	es-es	Agenda
-Contact Center	mobile	es-es	Contactos
-Create mail	mobile	es-es	Nuevo Correo
-E-mail	mobile	es-es	E-mail
-This message have attachment(s)	mobile	es-es	Este e-mail posee anexo(s)
-This message don't have attachment(s)	mobile	es-es	Este e-mail no posee anexo(s)
-Catalog	mobile	es-es	Catálogo
-Phone	mobile	es-es	Teléfono
-Message sent successfully	mobile	es-es	Mensaje enviado con éxito
-Message not sent	mobile	es-es	Mensaje no enviado
-More Folders...	mobile	es-es	Mas Carpetas...
-error	mobile	es-es	Error: 
-Some addresses in the To field were not recognized. Please make sure that all addresses are properly formed	mobile	es-es	Algunas direcciones en el campo "Para" no fueron reconocidos. Por favor verifique que todas las direcciones estén bien escritas
-Empty folder	mobile	es-es	Carpeta vacía
-Accept	mobile	es-es	Aceptar
-Accepted	mobile	es-es	acepto
-Reject	mobile	es-es	Rechazar
-Rejected	mobile	es-es	rechazado
-Location	mobile	es-es	Local
-Start Date/Time	mobile	es-es	Fecha/Hora Inicio
-End Date/Time	mobile	es-es	Fecha/Hora Fin
-schedule	mobile	es-es	Agendar
-continue scheduling	mobile	es-es	Continuar agendando
-already_addeds:	mobile	es-es	ya agregados:
-Start Date	mobile	es-es	Fecha(Inicio)
-End Date	mobile	es-es	Fecha(Fin)
-Start Time	mobile	es-es	Hora(Inicio)
-End Time	mobile	es-es	Hora(Fin)
-keep add participants	mobile	es-es	Agregar participantes
-your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries:	mobile	es-es	Horário sugerido: <B> %1 - %2 </B> está en conflicto con las siguientes entradas en el calendario:
-scheduling conflict	mobile	es-es	Conflicto de agendamiento
-Sent	mobile	es-es	Enviados
-ignore conflict	mobile	es-es	Ignorar conflicto
-re-edit event	mobile	es-es	Re-Editar evento
-username_mobile	mobile	es-es	Usuario
-password_mobile	mobile	es-es	Contraseña
-the search argument must have at least 4 digits	mobile	es-es	El argumento de búsqueda debe poseer por lo menos 4 dígitos
-choose the participants	mobile	es-es	Seleccione los participantes
-choose the recipients	mobile	es-es	Seleccione los destinatarios
-Added	mobile	es-es	Agregando
-To See Commitment	mobile	es-es	Para ver compromiso
-To accept	mobile	es-es	Aceptar
-To reject	mobile	es-es	Rechazar
-Trash	mobile	es-es	Papelera
-alarm	mobile	es-es	Alarma
-To Delegate	mobile	es-es	Delegar
-No matches found	mobile	es-es	Contacto no localizado
-The message was moved to trash	mobile	es-es	El mensaje fue movido para la papelera.
-What is the maximum number of messages per page?	mobile	es-es	Cual es el número máximo de mensajes por página?
-Option	mobile	es-es	Opción
-Value	mobile	es-es	Valor
-Search	mobile	es-es	Buscar
Index: branches/2.2.0.1/mobile/setup/phpgw_en.lang
===================================================================
--- branches/2.2.0.1/mobile/setup/phpgw_en.lang	(revision 454)
+++ 	(revision )
@@ -1,4 +1,0 @@
-From	mobile	pt-br	From
-Folder	mobile	pt-br	Folder
-Inbox	mobile	pt-br	Inbox
-Return	mobile	pt-br	Return
Index: branches/2.2.0.1/mobile/setup/phpmailer.lang-br.php
===================================================================
--- branches/2.2.0.1/mobile/setup/phpmailer.lang-br.php	(revision 3814)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?php
-	/**
-	* PHPMailer language file.
-	* Portuguese Version
-	* By Paulo Henrique Garcia - paulo@controllerweb.com.br
-	*/
-	  
-	$PHPMAILER_LANG = array();
-	$PHPMAILER_LANG["provide_address"] = 'Voc&ecirc; deve fornecer pelo menos um endere&ccedil;o de destinat&aacute;rio de email.';
-	$PHPMAILER_LANG["mailer_not_supported"] = 'Mailer n&atilde;o suportado.';
-	$PHPMAILER_LANG["execute"] = 'N&atilde;o foi poss&iacute;vel executar: ';
-	$PHPMAILER_LANG["instantiate"] = 'N&atilde;o foi poss&iacute;vel instanciar a fun&ccedil;&atilde;o mail.';
-	$PHPMAILER_LANG["authenticate"] = 'Erro de SMTP: N&atilde;o foi poss&iacute;vel autenticar.';
-	$PHPMAILER_LANG["from_failed"] = 'Os endere&ccedil;os de remetente a seguir falharam: ';
-	$PHPMAILER_LANG["recipients_failed"] = 'Erro de SMTP: Os endere&ccedil;os de destinat&aacute;rio a seguir falharam: ';
-	$PHPMAILER_LANG["data_not_accepted"] = 'Erro de SMTP: Dados n&atilde;o aceitos.';
-	$PHPMAILER_LANG["connect_host"] = 'Erro de SMTP: N&atilde;o foi poss&iacute;vel conectar com o servidor SMTP.';
-	$PHPMAILER_LANG["file_access"] = 'N&atilde;o foi poss&iacute;vel acessar o arquivo: ';
-	$PHPMAILER_LANG["file_open"] = 'Erro de Arquivo: N&atilde;o foi poss&iacute;vel abrir o arquivo: ';
-	$PHPMAILER_LANG["encoding"] = 'Codifica&ccedil;&atilde;o desconhecida: ';
-	$PHPMAILER_LANG["not_allowed"] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para enviar emails para: ';
-	$PHPMAILER_LANG["undisclosed-recipient"] = 'destinatarios nao divulgados';
-?>
Index: branches/2.2.0.1/mobile/setup/phpgw_pt-br.lang
===================================================================
--- branches/2.2.0.1/mobile/setup/phpgw_pt-br.lang	(revision 3734)
+++ 	(revision )
@@ -1,168 +1,0 @@
-attachment	mobile	pt-br	Anexo
-Add Recipient	mobile	pt-br	Adicionar Destinatário
-more attachment	mobile	pt-br	mais anexo
-cancel	mobile	pt-br	Cancelar
-Calendar	mobile	pt-br	Agenda
-contact center	mobile	pt-br	Endereços
-messages	mobile	pt-br	mensagens
-continue	mobile	pt-br	Continuar
-context email	mobile	pt-br	Email
-context contact	mobile	pt-br	Contato
-context commitment	mobile	pt-br	Compromisso
-Do you like to delete this message?	mobile	pt-br	Deseja excluir esta mensagem?
-download attachs	mobile	pt-br	Deseja baixar anexos em e-mails?
-Download	mobile	pt-br	Efetuar o download do anexo
-draft not save	mobile	pt-br	Rascunho não foi salvo
-draft saved	mobile	pt-br	Rascunho foi guardado com sucesso
-Drafts	mobile	pt-br	Rascunhos
-events	mobile	pt-br	Eventos
-expresso mini	mobile	pt-br	Expresso Mini
-E-mail	mobile	pt-br	Caixa de Entrada
-From	mobile	pt-br	De
-Forward	mobile	pt-br	Encaminhar
-filter by	mobile	pt-br	Filtrar por
-Logout	mobile	pt-br	Sair
-To	mobile	pt-br	Para
-cc	mobile	pt-br	Cc
-mini desktop	mobile	pt-br	Mini Desktop
-mini mobile	mobile	pt-br	Mini Mobile
-my mail	mobile	pt-br	E-mails
-my contacts	mobile	pt-br	Contatos
-my commitments	mobile	pt-br	Compromissos
-my folders	mobile	pt-br	Outras Pastas
-mark as read	mobile	pt-br	marcar como lido
-more	mobile	pt-br	mais
-mark as important	mobile	pt-br	marcar como importante
-mark as unread	mobile	pt-br	marcar como não lido
-read confirmation	mobile	pt-br	receber confirmação de leitura
-add history	mobile	pt-br	adicionar histórico
-new mail	mobile	pt-br	Novo
-save draft	mobile	pt-br	Salvar rascunho
-edit draft	mobile	pt-br	Editar rascunho
-search return	mobile	pt-br	resultado de busca
-see details	mobile	pt-br	ver detalhes
-Subject	mobile	pt-br	Assunto
-Send	mobile	pt-br	Enviar
-Reply	mobile	pt-br	Responder
-Reply to All	mobile	pt-br	Responder a Todos
-Folder	mobile	pt-br	Pasta
-of	mobile	pt-br	de
-Inbox	mobile	pt-br	Caixa de Entrada
-Return	mobile	pt-br	Retornar à lista de E-mails
-Logout	mobile	pt-br	Sair
-People	mobile	pt-br	Pessoal
-Search	mobile	pt-br	Procurar
-search message	mobile	pt-br	Buscar mensagem
-Selected	mobile	pt-br	Selecionados
-Calendar	mobile	pt-br	Agenda
-Contact Center	mobile	pt-br	Contatos
-Create mail	mobile	pt-br	Novo Mail
-E-mail	mobile	pt-br	Cx Entrada
-E-mails	mobile	pt-br	E-mails
-forward attachments	mobile	pt-br	Anexos do encaminhamento
-This message have attachment(s)	mobile	pt-br	Este e-mail possui anexo(s)
-This message don't have attachment(s)	mobile	pt-br	Este e-mail não possui anexo(s)
-This message has the follow attachments:	mobile	pt-br	Esta mensagem possui anexo:
-Catalog	mobile	pt-br	Catálogo
-Phone	mobile	pt-br	Telefone
-Message sent successfully	mobile	pt-br	Mensagem enviada com sucesso
-Message not sent	mobile	pt-br	Mensagem não enviada
-More Folders...	mobile	pt-br	Mais Pastas...
-error	mobile	pt-br	Erro: 
-Some addresses in the To field were not recognized. Please make sure that all addresses are properly formed	mobile	pt-br	Alguns endereços no campo "Para" não foram reconhecidos. Por favor certifique-se que todos endereços estão corretos
-Some addresses in the CC field were not recognized. Please make sure that all addresses are properly formed	mobile	pt-br	Alguns endereços no campo "Com Cópia" não foram reconhecidos. Por favor certifique-se que todos endereços estão corretos
-Empty folder	mobile	pt-br	Pasta vazia
-Accept	mobile	pt-br	Aceitar
-Accepted	mobile	pt-br	aceitou
-Reject	mobile	pt-br	Rejeitar
-Rejected	mobile	pt-br	rejeitou
-Location	mobile	pt-br	Local
-Start Date/Time	mobile	pt-br	Data/Hora Início
-End Date/Time	mobile	pt-br	Data/Hora Término
-schedule	mobile	pt-br	Agendar
-continue scheduling	mobile	pt-br	Continuar o agendamento
-already_addeds:	mobile	pt-br	Já adicionados:
-Start Date	mobile	pt-br	Data(Início)
-End Date	mobile	pt-br	Data(Término)
-Start Time	mobile	pt-br	Hora(Início)
-End Time	mobile	pt-br	Hora(Término)
-keep add participants	mobile	pt-br	Adicionar participantes
-your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries:	mobile	pt-br	Horário sugerido: <B> %1 - %2 </B> está em conflito com as seguintes entradas no calendário:
-scheduling conflict	mobile	pt-br	Conflito de agendamento
-Sent	mobile	pt-br	Enviados
-ignore conflict	mobile	pt-br	Ignorar conflito
-re-edit event	mobile	pt-br	Re-Editar evento
-username_mobile	mobile	pt-br	Usuário
-password_mobile	mobile	pt-br	Senha
-the search argument must have at least 4 digits	mobile	pt-br	O argumento da busca deve possuir pelo menos 4 dígitos
-choose the participants	mobile	pt-br	Escolha os participantes
-choose the recipients	mobile	pt-br	Escolha os destinatários
-Added	mobile	pt-br	Adicionado
-To See Commitment	mobile	pt-br	Para ver compromisso
-To accept	mobile	pt-br	Aceitar
-To reject	mobile	pt-br	Rejeitar
-Trash	mobile	pt-br	Lixeira
-alarm	mobile	pt-br	Alarme
-To Delegate	mobile	pt-br	Delegar
-No matches found	mobile	pt-br	Contato não localizado
-The message was moved to trash	mobile	pt-br	A mensagem foi movida para a lixeira.
-The messages were moved to trash	mobile	pt-br	As mensagens foram movidas para a lixeira.
-The messages were marked as seen	mobile	pt-br	As mensagens foram marcadas como lidas.
-Reading Message	mobile	pt-br	Lendo mensagem
-What is the maximum number of messages per page?	mobile	pt-br	Qual o número máximo de mensagens por página?
-Option	mobile	pt-br	Opção
-one or more contacts couldnt be removed	mobile	pt-br	um ou mais contatos não puderam ser removidos
-one or more groups couldnt be removed	mobile	pt-br	um ou mais grupos não puderam ser removidos
-Value	mobile	pt-br	Valor
-your search was by	mobile	pt-br	você buscou por
-Search	mobile	pt-br	Procurar
-Yesterday	mobile	pt-br	Ontem
-Monday	mobile	pt-br	Segunda-feira
-Tuesday	mobile	pt-br	Terça-feira
-Wednesday	mobile	pt-br	Quarta-feira
-Thursday	mobile	pt-br	Quinta-feira
-Friday	mobile	pt-br	Sexta-feira
-Saturday	mobile	pt-br	Sábado
-selected contacts were removed successfully	mobile	pt-br	os contatos selecionados foram removidos com sucesso
-selected groups were removed successfully	mobile	pt-br	os grupos selecionados foram removidos com sucesso
-Sunday	mobile	pt-br	Domingo
-short Monday	mobile	pt-br	Seg
-short Tuesday	mobile	pt-br	Ter
-short Wednesday	mobile	pt-br	Qua
-short Thursday	mobile	pt-br	Qui
-short Friday	mobile	pt-br	Sex
-short Saturday	mobile	pt-br	Sáb
-short Sunday	mobile	pt-br	Dom
-You have been successfully logged out	mobile	pt-br	Você desconectou do expresso com sucesso.
-now	mobile	pt-br	Agora
-minutes ago	mobile	pt-br	minutos atrás
-minute ago	mobile	pt-br	minuto atrás
-no results found	mobile	pt-br	nenhum resultado encontrado
-not defined	mobile	pt-br	Não definido
-New message	mobile	pt-br	Nova mensagem
-need choose one option	mobile	pt-br	É preciso escolher pelo menos uma opção de busca
-search word need not be empty and has more then four char	mobile	pt-br	É preciso informar um argumento com mais de 4 dígitos para realizar a busca
-new	mobile	pt-br	nova
-Dont have event that day	mobile	pt-br	Não tem evento neste dia.
-Dont have event that week	mobile	pt-br	Não tem evento nesta semana.
-today	mobile	pt-br	Hoje
-view day	mobile	pt-br	Dia
-view calendar	mobile	pt-br	Calendário
-view week	mobile	pt-br	Semana
-Alias	mobile	pt-br	Apelido
-Family Names	mobile	pt-br	Sobrenome
-use contact	mobile	pt-br	usar contato
-Selecteds	mobile	pt-br	Selecionados
-confirm edit	mobile	pt-br	confirmar edição
-confirm add	mobile	pt-br	confirmar adição
-title view contact	mobile	pt-br	Visualizando Contato
-title edit contact	mobile	pt-br	Editando Contato
-title add contact	mobile	pt-br	Adicionando Contato
-invalid field e-mail	mobile	pt-br	Campo E-Mail inválido
-invalid field phone	mobile	pt-br	Campo Telefone inválido
-contact save successfully	mobile	pt-br	Contato salvo com sucesso
-Name is mandatory	mobile	pt-br	Nome é obrigatório
-Tel or email is required	mobile	pt-br	Você precisa informar ou o e-mail ou o telefone
-please select one contact	mobile	pt-br	Você precisa selecionar pelo menos um contato
-please select one e-mail	mobile	pt-br	Você precisa selecionar pelo menos um E-Mail
-context group	mobile	pt-br	Grupo
Index: branches/2.2.0.1/mobile/setup/setup.inc.php
===================================================================
--- branches/2.2.0.1/mobile/setup/setup.inc.php	(revision 4186)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?php
-	/**************************************************************************\
-	* eGroupWare                                                               *
-	* http://www.egroupware.org                                                *
-	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-	/* Basic information about this app */
-	$setup_info['mobile']['name']      = 'mobile';
-	$setup_info['mobile']['title']     = 'Expresso Mini';
-	$setup_info['mobile']['version']   = '2.2.1';
-	$setup_info['mobile']['app_order'] = 4;
-	$setup_info['mobile']['enable']    = 2;
-
-	$setup_info['mobile']['author'] = 'Mário César Kolling';
-	$setup_info['mobile']['note']   = 'Mobile é uma versão mais simples do Expresso, desenvolvida para ser utilizada através de dispositivos móveis';
-	$setup_info['mobile']['license']  = 'GPL';
-	$setup_info['mobile']['description'] = 'Mobile é uma versão mais simples do Expresso, desenvolvida para ser utilizada' .
-			' através de dispositivos móveis. Atualmente compreende um módulo de visualização de agenda e outro de leitura' .
-			' de e-mails.';
-
-	$setup_info['mobile']['maintainer'] = 'Mário César Kolling';
-	$setup_info['mobile']['maintainer_email'] = 'mario.kolling@serpro.gov.br';
-
-	/* The hooks this app includes, needed for hooks registration */
-	//$setup_info['mobile']['hooks'][] = 'admin';
-	//$setup_info['mobile']['hooks'][] = 'preferences';
-	//$setup_info['mobile']['hooks'][] = 'config_validate';
-
-	/* mobile Tables */
-
-	/* Dependencies for this app to work */
-	//TODO: Adicionar expressoMail1_2 e calendar como dependências
-	$setup_info['mobile']['depends'][] = array(
-		'appname' => 'phpgwapi',
-		'versions' => Array('2.2')
-	);
-?>
Index: branches/2.2.0.1/mobile/inc/class.bo_mobilecc.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.bo_mobilecc.inc.php	(revision 3706)
+++ 	(revision )
@@ -1,228 +1,0 @@
-<?php
-   class bo_mobilecc {
-   		var $bo = null;	
-		var $page_info = array (
-				'actual_catalog' => false,
-				'is_external_catalog' => false
-			);
-		
-		function set_catalog($catalog) {
-			if(strpos($catalog,'bo_global_ldap_catalog')===false) //Ldap?
-				$this->bo= CreateObject("contactcenter.".$catalog);
-			else {
-				$exploded = explode("#",$catalog);
-				$this->bo= CreateObject("contactcenter.bo_global_ldap_catalog",$exploded[1],$exploded[2],$exploded[3]);
-				if($exploded[3]==1)
-					$this->page_info['is_external_catalog'] = true;
-				else {
-					$this->page_info['is_external_catalog'] = false;
-				}
-
-			}
-			$this->page_info['actual_catalog'] = $catalog;
-		}
-		
-		
-		/**
-		 * Busca um nome a partir do catálogo. Se nenhum for setado utilizando a função set_catalog
-		 * ou se não houverem resultados, retorna um array vazio.
-		 * 
-		 * Caso o catálogo seja grupos, a busca será por títulos, caso seja
-		 * contatos pessoais, será por names_ordered, se for contato no ldap, será
-		 * por cn.
-		 * 
-		 * @return array, com os ids relativos a busca
-		 * @param $name string com o nome à ser buscado.
-		 */
-		public function find($name) {
-			if(!$this->page_info["actual_catalog"]) //Essa função 
-				return array();
-			
-			if($this->page_info['actual_catalog']=="bo_group_manager") { //parametros de busca para grupos
-				$id = 'group.id_group';
-				$what = array('group.title',$id);
-				$search = "group.title";
-			}
-			else { //parametros de busca para pessoas
-				$id = 'contact.id_contact';
-				$search = "contact.names_ordered";
-				$what = array('contact.names_ordered',$id);
-			}
-
-			if ((strpos($this->page_info['actual_catalog'],'bo_global_ldap_catalog')!==false) &&
-					(!$this->page_info['is_external_catalog'])) { //Ldap do expresso, leva em conta alguns atributos do expresso
-
-				array_push($what,'contact.object_class',
-						'contact.account_visible',
-						'contact.account_status'
-						);
-				
-				$rules = array(
-							0 => array(
-								'field' => 'contact.object_class',
-								'type'  => '=',
-								'value' => 'phpgwAccount'
-							),
-							1 => array(
-								'field' => 'contact.account_status',
-								'type'  => 'iLIKE',
-								'value' => '%'
-							),
-							2 => array(
-								'field' => 'contact.account_visible',
-								'type'  => '!=',
-								'value' => '-1'
-							),
-							3 => array(
-								'field' => 'contact.object_class',
-								'type'  => '=',
-								'value' => 'inetOrgPerson'
-							)
-						);
-			}
-			else{
-				$rules = array();
-			}
-
-			
-			
-			if ($name != '') { //String em branco, não preciso adicionar essa regra
-				array_push($rules,array(
-								'field' => $search,
-								'type' 	=> 'iLIKE',
-								'value'	=> $name
-							));		
-			}
-			$ids = $this->bo->find($what,$rules,array('order'=>$search),false,true);
-
-			if(is_array($ids)) {
-				foreach($ids as $id_r) { //Quero apenas os ids, como valores nas posições do array
-					$retorno[] = $id_r[substr($id,strpos($id,".")+1)];
-				}
-			}
-			else 
-				$retorno = array();
-			return $retorno;
-		}
-		
-		function search($name,$max_results) {
-			if(!$this->page_info["actual_catalog"])
-				return array();
-			
-			$entries = array();
-			$ids = $this->find($name);
-			if(empty($ids))
-				return array();
-			$total_count_search = count($ids);
-			$ids = array_slice($ids,0,$max_results,true);
-			
-			if($this->page_info['actual_catalog']!="bo_group_manager") { //Se não for grupo, tenho que ordenar as connections
-				$entries = $this->bo->get_multiple_entries($ids,array("names_ordered"=>true,"uidnumber"=>true,"id_contact"=>true,"connections"=>true));			
-				/**
-				 * As entradas vindas de get_multiple_entries não vem com as connections
-				 * ordenadas. Abaixo eu ordeno o array connections de cada entrada para ter
-				 * sempre na frente os valores defaults, primeiro o default de email, depois
-				 * o de telefone.
-				 */
-				foreach($entries as &$valor) {
-					/* Sempre iniciar os arrays, pois pode interferir na 
-					 * ordenação atual se tiverem valores antigos desnecessários 
-					 * causando erro de tamanhos inconsistentes */
-					$valor['catalog'] = $this->page_info['actual_catalog'];
-					$default = array(); 
-					$type = array();
-					
-					foreach($valor['connections'] as $key => $value) {
-						$default[$key] = $value['connection_is_default'];
-						$type[$key] = $value['id_type'];
-					}
-					array_multisort($default, SORT_DESC, $type, SORT_ASC, $valor['connections']);
-				}//Fim da ordenação
-			}
-			else {
-					$entries = $this->bo->get_multiple_entries($ids,array("id_group"=>true,"title"=>true,"short_name"=>true));
-					foreach ($entries as &$group) {
-						$group['catalog']=$this->page_info['actual_catalog'];
-					}
-				}
-			if($total_count_search>count($ids))
-				$entries["has_more"] = true;
-			return $entries;
-		}
-
-		/**
-		 * Lista todos os catalogos do contact center. Seu retorno é um array no seguinte formato:
-		 * 
-		 * [pos] - posição do array, incremental
-		 * 	[catalog] - catalogo
-		 * 	[label] - nome do catálogo
-		 * 
-		 * A posição catalog para catálogos ldap, possuem o seguinte padrão:
-		 * 	catalogo#dn_base#is_external
-		 * 
-		 * @return 
-		 */
-		function get_all_catalogs() {
-			$retorno = array();
-			$bo_cc = CreateObject("contactcenter.bo_contactcenter");
-			$branchs = $bo_cc->get_catalog_tree();
-			
-			foreach($branchs as $branch) { //Catalogos pessoais
-				if($branch['class']!="bo_global_ldap_catalog" && $branch['class']!="bo_catalog_group_catalog") {//Pego apenas a estrutura dos ramos vindos do banco, pois as do ldap estão confusas e com dados aparentemente inconsistentes.
-					
-					$catalog = array("catalog"=>$branch['class'],"label"=>$branch['name']);
-					$retorno[] = $catalog;
-				}
-			}
-			
-			$bo_ldap_manager = CreateObject("contactcenter.bo_ldap_manager");
-
-			$branches = $bo_ldap_manager->get_all_ldap_sources();	//Ldaps expresso	
-			if(is_array($branches)) {
-				foreach($branches as $id=>$branch) { 
-					$catalog = array('catalog'=>"bo_global_ldap_catalog#".
-							$id."#".
-							$branch['dn']."#".
-							0,
-							'label'=>$branch['name']);
-					$retorno[] = $catalog;
-				}
-			}
-			
-			$branches = $bo_ldap_manager->get_external_ldap_sources();//Ldaps externos
-			if(is_array($branches)) {
-				foreach($branches as $id=>$branch) { 
-					$catalog =array('catalog'=>"bo_global_ldap_catalog#".
-							$id."#".
-							$branch['dn']."#".
-							1,
-							'label'=>$branch['name']); 
-				}
-				$retorno[] = $catalog;
-			}
-			return $retorno;
-		}
-		
-		function remove_multiple_entries($ids) {
-			$errors = array();
-			$return = array();
-			if($this->page_info['actual_catalog']==='bo_group_manager')
-				$soGroup = CreateObject('contactcenter.so_group');
-			foreach($ids as $id) {
-				if($this->page_info['actual_catalog']==='bo_group_manager') {
-					$data = array ('id_group' => $id);
-					$check = $soGroup->delete($data);
-				}
-				else
-					$check = $this->bo->remove_single_entry($id);
-				
-				if(!$check)
-					$errors[] = $id;
-			}
-			$return['success'] = empty($errors)?true:false;
-			$return['errors_ids'] = $errors;
-			return $return;
-		}
-		
- 	  }
-?>
Index: branches/2.2.0.1/mobile/inc/hook_preferences.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/hook_preferences.inc.php	(revision 1409)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<?php
-  /***************************************************************************\
-  * eGroupWare - Contacts Center                                              *
-  * http://www.egroupware.org                                                 *
-  * Written by:                                                               *
-  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
-  *  sponsored by Thyamad - http://www.thyamad.com
-  * ------------------------------------------------------------------------- *
-  *  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(
-		'Preferences'   => $GLOBALS['phpgw']->link('/index.php','menuaction=mobile.ui_preferences.index'),
-		//'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
-		//'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True')
-	);
-//Do not modify below this line
-	display_section($appname,$title,$file);
-}
-?>
Index: branches/2.2.0.1/mobile/inc/class.ui_mobilecalendar.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.ui_mobilecalendar.inc.php	(revision 3926)
+++ 	(revision )
@@ -1,316 +1,0 @@
-<?php
-    class ui_mobilecalendar {
-		
-		var $bocalendar;
-		var $cat;
-		var $link_tpl;		
-		var $common;
-		var $template;		
-		var $daysOfWeek;
-		var $shortDaysOfWeek;
-		
-		var $public_functions = array(
-			'index' => true
-		);
-		
-		function ui_mobilecalendar() {
-			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			$this->common	= CreateObject('mobile.common_functions');
-			$this->bocalendar = CreateObject('calendar.bocalendar',1);			
-			$this->cat = &$this->bo->cat;
-			$this->daysOfWeek = array(lang('Sunday'), lang('Monday'),lang('Tuesday'),lang('Wednesday'),lang('Thursday'),lang('Friday'),lang('Saturday'));
-			$this->shortDaysOfWeek = array(lang('short Sunday'), lang('short Monday'),lang('short Tuesday'),lang('short Wednesday'),lang('short Thursday'),lang('short Friday'),lang('short Saturday'));
-			
-			$GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
-		}
-		
-		function index($params) {
-			$this->template->set_file(array(
-				'calendar' => 'calendar.tpl',
-				'home_search_bar' => 'search_bar.tpl'
-			));
-			$actual_max_results = $_GET["results"]?$_GET["results"]:10;
-			$this->template->set_block("calendar","page");
-			$this->template->set_block('calendar','event_block');
-			$this->template->set_block('calendar','day_event_block');
-			$this->template->set_block('calendar','no_event_block');
-			$this->template->set_block('calendar','type_option_block');
-			$this->template->set_block('calendar','bar_block');
-			$this->template->set_block('home_search_bar','search_bar');
-			$this->template->set_var('lang_back',lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_calendar',lang("Calendar"));
-			$this->template->set_var('lang_search',lang("search"));
-			$this->template->set_var('lang_more',lang("more"));
-			$this->template->set_var('lang_events',lang("events"));
-			$this->template->set_var('type',$params['type']);
-			$this->template->set_var('dia',$params['dia']);
-			$this->template->set_var('mes',$params['mes']);
-			$this->template->set_var('ano',$params['ano']);
-			$this->template->set_var('next_max_results',$actual_max_results+10);
-			
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')!="mini_desktop")
-				$this->template->set_var('search',$this->template->fp('out','search_bar'));
-			
-			if(!function_exists("get_events")){
-				function get_events($self, $accountId, $begin, $end) {
-					$self->bocalendar->so->owner = $accountId;
-					$self->bocalendar->so->open_box($accountId);
-					$self->bocalendar->store_to_cache(
-						array(
-							'owner'	=> $accountId,
-							'syear'  => date('Y',$begin),
-							'smonth' => date('m',$begin),
-							'sday'   => date('d',$begin),
-							'eyear'  => date('Y',$end),
-							'emonth' => date('m',$end),
-							'eday'   => date('d',$end)
-						)
-					);
-					
-					$events = $self->bocalendar->cached_events;
-					ksort($events);
-				
-					return $events;
-				}
-			}
-			
-			if(!function_exists("print_events")){	
-				function print_events($self, $events) {
-					foreach($events as $index=>$event)
-					{
-						$self->template->set_var('dd_class', (($index%2==0) ? "dt-azul" : "dt-branco") );	
-						$vars = $self->bocalendar->event2array($event);
-						$data = array (
-							"title_field"		=> $vars['title']['field'],
-							"title_data"		=> $vars['title']['data'],
-							"startdate_data" 	=> substr($vars['startdate']['data'],13, 17),
-							"enddate_data" 		=> substr($vars['enddate']['data'],13, 17),
-							"location_field"		=> $vars['location']['field'],
-							"location_data"	=> $vars['location']['data'] ? $vars['location']['data'] : "-",
-							"description_field"		=> $vars['description']['field'],
-							"description_data"	=> $vars['description']['data'] ? $vars['description']['data'] : "-"
-						);
-			
-		    	 	$self->template->set_var($data);
-						$self->template->parse('events_box','event_block',true);
-					}				
-				}
-			}	
-			
-			if(!function_exists("print_events_header")){	
-				function print_events_header($self, $day, $month, $year) {
-					$day_of_week = $self->daysOfWeek[$GLOBALS['phpgw']->datetime->day_of_week($year,$month,$day)];
-					$self->template->set_var("day",$day_of_week." - ".$day."/".$month."/".$year);
-					$self->template->parse('events_box','day_event_block',true);
-				}
-			}
-				
-			$type = $_GET["type"];
-			if(!$type) $type = "dia";
-			$types = array("dia" => lang("view day"),"semana" => lang("view week"),"calendario" => lang("view calendar")); 
-			
-			foreach($types as $value=>$label)	{
-				$this->template->set_var("value",$value);
-				$this->template->set_var("label",$label);
-				
-				if($type == $value)
-					$this->template->set_var("selected", "selected");
-				else
-					$this->template->set_var("selected", null);
-					
-				$this->template->parse('type_option_box','type_option_block',true);
-			}
-			
-			$accountId = $GLOBALS['phpgw_info']['user']['account_id'];
-
-			$day = $_GET["dia"];
-			if(!$day) $day = $this->bocalendar->day;
-
-			$month = $_GET["mes"];
-			if(!$month) $month = $this->bocalendar->month;
-			
-			$year = $_GET["ano"];
-			if(!$year) $year = $this->bocalendar->year;
-			
-			$this->template->set_var("lang_today", lang("today"));
-			$this->template->set_var("today_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=dia&dia");
-			$show_more_button = false;
-			if($type==="semana") {
-				$tstart = $GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day) + $GLOBALS['phpgw']->datetime->tz_offset;
-				$tstart -= $GLOBALS['phpgw']->datetime->tz_offset;
-				$tstop = $tstart + 604800;
-				$events = get_events($this, $accountId, $tstart, $tstop);
-				$current_day_of_week = $GLOBALS['phpgw']->datetime->day_of_week($year, $month, $day);
-				
-				//descobrindo a semana anterior e a pŽroxima
-				$last_week = date("d-m-Y", strtotime("-7 day", mktime(0,0,0,$month,$day,$year) ) );
-				$last_week = split("-",$last_week);
-				$next_week = date("d-m-Y", strtotime("+7 day", mktime(0,0,0,$month,$day,$year) ) );
-				$next_week = split("-",$next_week);
-				
-				//descobrind o primeiro dia da semana e o último
-				$first_week_day = date("d-m-Y", strtotime("-".$current_day_of_week." day", mktime(0,0,0,$month,$day,$year) ) );
-				$first_week_day = split("-",$first_week_day);
-				$last_week_day = date("d-m-Y", strtotime("+".(6-$current_day_of_week)." day", mktime(0,0,0,$month,$day,$year) ) );
-				$last_week_day = split("-",$last_week_day);
-				
-				//definindo a barra de navegação do calandário
-				$this->template->set_var("before_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=semana&dia=".$last_week[0]."&mes=".$last_week[1]."&ano=".$last_week[2]);
-				$this->template->set_var("current_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=semana&dia=".$day."&mes=".$month."&ano=".$year);
-				$this->template->set_var("next_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=semana&dia=".$next_week[0]."&mes=".$next_week[1]."&ano=".$next_week[2]);
-				$this->template->set_var("current_label", $first_week_day[0]."/".$first_week_day[1]."/".$first_week_day[2]." à ".$last_week_day[0]."/".$last_week_day[1]."/".$last_week_day[2]);
-				$this->template->parse('events_box','bar_block',true);
-				
-				$total_events = 0; 
-				if(!empty($events)) {
-					foreach($events as $index=>$event)	{
-						if($total_events>=$actual_max_results) {
-							$show_more_button = true;
-							break;
-						}
-						$event_year  = (int) substr($index,0,4);
-						$event_month = (int) substr($index,4,2);
-						$event_day   = (int) substr($index,6,2);
-						$complete_day = $event_year.$this->common->complete_string($event_month,2,"R","0").$this->common->complete_string($event_day,2,"R","0");
-
-						//Se a quantidade de eventos for maior que o máximo pego nessa interação, o botão de mais deve aparecer
-						if(count($events[$complete_day])>$actual_max_results-$total_events) 
-							$show_more_button = true;
-						
-						//Pego os eventos até completar o máximo da paginação
-						$events_to_print = array_slice($events[$complete_day],0,$actual_max_results-$total_events);
-						$total_events += count($events_to_print);
-						
-						print_events_header($this, $event_day, $event_month, $event_year);
-						print_events($this, $events_to_print);
-					}		
-				} else {
-					$this->template->set_var("msg_no_event", lang("Dont have event that week"));
-					$this->template->parse('events_box','no_event_block',true);
-				}				
-						
-			} elseif($type==="calendario") {
-				$day_of_week_first_day = $GLOBALS['phpgw']->datetime->day_of_week($year, $month, "01");
-				$last_day_of_month = date('t', mktime(0,0,0,$month,"01",$year));
-				$last_day_of_before_month = date('t', mktime(0,0,0,$month-1,"01",$year));
-				$last_month_year = date("m-Y", strtotime("-1 month", mktime(0,0,0,$month,"01",$year) ) );
-				$last_month_year = split("-",$last_month_year);
-				$next_month_year = date("m-Y", strtotime("+1 month", mktime(0,0,0,$month,"01",$year) ) );
-				$next_month_year = split("-",$next_month_year);
-				$today = date("d-m-Y");
-				
-				$days_of_calendar = array();
-				
-				//identificando os dias do mês anterior
-				for($i = 0; $i < $day_of_week_first_day; $i++) {
-					$days_of_calendar[$i] = array("day" => ($last_day_of_before_month-$day_of_week_first_day+$i+1), "month" => $last_month_year[0], "year" => $last_month_year[1], "other_month" => true);					
-				}
-				
-				//adicionando os dias do mês especificado
-				for($i = 0; $i < ($last_day_of_month ); $i++) {
-					$days_of_calendar[$i+$day_of_week_first_day] = array("day" => $i+1, "month" => $month, "year" => $year, "other_month" => false);
-				}
-				
-				//pegando todos os eventos a partir o menor dia visível do mês anterior
-				$tstart = mktime(0,0,0,$last_month_year[0],($last_day_of_before_month-$day_of_week_first_day),$last_month_year[1]);
-				$tstart -= $GLOBALS['phpgw']->datetime->tz_offset;
-				$tstop = $tstart + (86400*sizeof($days_of_calendar)); //(24horas*60min*60seg*total de dias exibidos)
-				$events = get_events($this, $accountId, $tstart, $tstop);
-				
-				//definindo os blocos a serem utilizados
-				$this->template->set_block('calendar','calendar_header_begin_block');
-				$this->template->set_block('calendar','calendar_header_end_block');
-				$this->template->set_block('calendar','calendar_header_block');
-				$this->template->set_block('calendar','calendar_day_block');
-				$this->template->set_block('calendar','calendar_day_begin_block');
-				$this->template->set_block('calendar','calendar_day_end_block');
-				
-				//definindo a barra de navegação do calandário
-				$this->template->set_var("before_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=calendario&mes=".$last_month_year[0]."&ano=".$last_month_year[1]);
-				$this->template->set_var("current_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=calendario&mes=".$month."&ano=".$year);
-				$this->template->set_var("next_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=calendario&mes=".$next_month_year[0]."&ano=".$next_month_year[1]);
-				$this->template->set_var("current_label", $month." / ".$year);
-				$this->template->parse('events_box','bar_block',true);
-				
-				for($i = 0; $i < 7; $i++) {
-					$this->template->set_var("week_day", $this->shortDaysOfWeek[$i]);
-					$this->template->parse('week_day_box','calendar_header_block',true);
-				}
-								
-				$this->template->parse('calendar_box','calendar_header_begin_block',true);
-				$this->template->parse('calendar_box','calendar_day_begin_block',true);
-				
-				foreach($days_of_calendar as $index=>$value) {
-					$extra_class = "";
-					$calendar_day = $value["day"];
-
-					if($today === $value["day"]."-".$value["month"]."-".$value["year"])
-						$extra_class .= " hoje";
-
-					if($value["other_month"])
-						$extra_class .= " outro_mes";
-					
-					$key = $value["year"].$this->common->complete_string($value["month"],2,"R","0").$this->common->complete_string($value["day"],2,"R","0");
-					
-					if( array_key_exists($key, $events ) ) {
-						$this->template->set_var("qtd_commitment", sizeof($events[$key]));
-					} else {
-						$this->template->set_var("qtd_commitment", null);
-					}
-
-					$this->template->set_var("calendar_day", $calendar_day);
-					
-					$this->template->set_var("calendar_day_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=dia&dia=".$value["day"]."&mes=".$value["month"]."&ano=".$value["year"]);
-					$this->template->set_var("extra_class", $extra_class);					
-					$this->template->parse('calendar_box','calendar_day_block',true);
-					
-					if(($index+1)%7==0) {
-						$this->template->parse('calendar_box','calendar_day_end_block',true);
-						$this->template->parse('calendar_box','calendar_day_begin_block',true);
-					}
-				}
-				$this->template->parse('calendar_box','calendar_day_end_block',true);
-				$this->template->parse('calendar_box','calendar_header_end_block',true);
-			
-			} else 	{
-				$tstart = mktime(0,0,0,$month,$day,$year);
-				$tstart -= $GLOBALS['phpgw']->datetime->tz_offset;
-				$tstop = $tstart + 86400; //(24horas*60min*60seg*1dia)
-				$events = get_events($this, $accountId, $tstart, $tstop);
-				
-				$day = $this->common->complete_string($day,2,"R","0");
-				$month = $this->common->complete_string($month,2,"R","0");
-				
-				//descobrind o primeiro dia da semana e o último
-				$before_day = date("d-m-Y", strtotime("-1 day", mktime(0,0,0,$month,$day,$year) ) );
-				$before_day = split("-",$before_day);
-				$next_day = date("d-m-Y", strtotime("+1 day", mktime(0,0,0,$month,$day,$year) ) );
-				$next_day = split("-",$next_day);				
-				
-				//definindo a barra de navegação do calandário
-				$this->template->set_var("before_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=dia&dia=".$before_day[0]."&mes=".$before_day[1]."&ano=".$before_day[2]);
-				$this->template->set_var("current_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=dia&dia=".$day."&mes=".$month."&ano=".$year);
-				$this->template->set_var("next_link", "index.php?menuaction=mobile.ui_mobilecalendar.index&type=dia&dia=".$next_day[0]."&mes=".$next_day[1]."&ano=".$next_day[2]);
-				$this->template->set_var("current_label", $this->daysOfWeek[$GLOBALS['phpgw']->datetime->day_of_week($year,$month,$day)]." - ".$day."/".$month."/".$year);
-				$this->template->parse('events_box','bar_block',true);				
-
-				if(!empty($events[$year.$month.$day])) {
-					print_events($this, array_slice($events[$year.$month.$day],0,$actual_max_results,true));
-					if(count($events[$year.$month.$day])>$actual_max_results) 
-							$show_more_button = true;
-				}
-				else {
-					$this->template->set_var("msg_no_event", lang("Dont have event that day"));
-					$this->template->parse('events_box','no_event_block',true);
-				}
-			}
-			if($show_more_button)
-				$this->template->set_var('show_more','block');
-			else
-				$this->template->set_var('show_more','none');
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out','page'));
-		}
-	}
-	
-?>
Index: branches/2.2.0.1/mobile/inc/class.ui_preferences.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.ui_preferences.inc.php	(revision 691)
+++ 	(revision )
@@ -1,90 +1,0 @@
-<?php
-  /***************************************************************************\
-  * eGroupWare - Contacts Center                                              *
-  * http://www.egroupware.org                                                 *
-  * Written by:                                                               *
-  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
-  *  sponsored by Thyamad - http://www.thyamad.com
-  * ------------------------------------------------------------------------- *
-  *  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.                                               *
-  \***************************************************************************/
-
-
-	class ui_preferences
-	{
-		var $public_functions = array(
-			'index'           => true,
-			'set_preferences' => true,
-		);
-		
-		function index()
-		{
-			$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Preferences').' - '.lang('Mobile');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
-
-			$GLOBALS['phpgw']->template->set_file(array('pref' => 'preferences.tpl'));
-
-			/* Get Saved Preferences */
-			$prefs = $GLOBALS['phpgw']->preferences->read();
-			
-			if($prefs['mobile']['download_attach']==1)
-				$GLOBALS['phpgw']->template->set_var('download_attach_option_Yes_selected', 'selected');
-			else
-				$GLOBALS['phpgw']->template->set_var('download_attach_option_No_selected', 'selected');
-			
-			$max_page = isset($prefs['mobile']['max_message_per_page'])?
-					$prefs['mobile']['max_message_per_page']:10;
-			
-			$max_page = "max_message_per_page_".$max_page."_selected";
-
-			
-			$GLOBALS['phpgw']->template->set_var($max_page,"selected");
-			
-			/* Translate the fields */
-			$this->translate('pref');
-
-			$GLOBALS['phpgw']->template->set_var('form_action', $GLOBALS['phpgw']->link('/index.php', 'menuaction=mobile.ui_preferences.set_preferences'));
-
-			$GLOBALS['phpgw']->template->pparse('out', 'pref');
-		}
-			
-		function translate($handle)
-		{
-			$vars = $GLOBALS['phpgw']->template->get_undefined($handle);
-			foreach($vars as $name => $value)
-			{
-				if (ereg('^lang_', $name) !== false)
-				{
-					$GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5))));
-				}
-				else {
-					$GLOBALS['phpgw']->template->set_var($name, " ");
-				}
-			}
-		}
-		
-		function set_preferences()
-		{
-			if ($_POST['save'])
-			{
-				$GLOBALS['phpgw']->preferences->read();
-				
-				if($_POST['download_attach']==0)
-					$GLOBALS['phpgw']->preferences->delete('mobile', 'download_attach');
-				else
-					$GLOBALS['phpgw']->preferences->add('mobile', 'download_attach', '1');
-				
-				$GLOBALS['phpgw']->preferences->add('mobile', 'max_message_per_page', $_POST['max_message_per_page']);
-				
-				$GLOBALS['phpgw']->preferences->save_repository();
-			}
-
-			header('Location: '.$GLOBALS['phpgw']->link('/preferences/index.php'));
-		}
-
-	}
-?>
Index: branches/2.2.0.1/mobile/inc/class.common_functions.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.common_functions.inc.php	(revision 3923)
+++ 	(revision )
@@ -1,98 +1,0 @@
-<?php
-/**************************************************************************\
-* eGroupWare                                                               *
-* http://www.egroupware.org                                                *
-* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
-* --------------------------------------------                             *
-*  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.                                              *
-\**************************************************************************/
-
-class common_functions
-{
-	function borkb($size, $enclosed = NULL) 
-	{
-		if (!$size)
-			$size = 0;
-
-		if ($enclosed)
-		{
-			$left = '(';
-			$right = ')';
-		}
-
-		if ($size < 1024)
-			$rstring = $left . $size . ' B' . $right;
-		else if ($size < 1048576)
-			$rstring = $left . round($size/1024) . ' KB' . $right;
-		else if ($size < 1073741824)
-			$rstring = $left . round($size/1024/1024) . ' MB' . $right;
-		else
-			$rstring = $left . round($size/1024/1024/1024) . ' GB' . $right;
-
-		return $rstring;
-	}
-
-	function complete_string($str = "", $length = 10, $align = "R", $char = " ") {
-		if( $str == null )
-			$str = "";
-		else 
-		if( strlen($str) > $length ) {
-			return substr($str, 0, $length);
-		} else if( strlen($str) == $length ) {
-			return $str;
-		}			
-
-		$char = substr($char, 0, 1);
-		$complete_str = "";
-
-		while( strlen($str) + strlen($complete_str) < $length  )
-			$complete_str .= $char;
-
-		if( $align == "L" )
-			return $str . $complete_str;
-		else
-			return $complete_str . $str;
-	}		
-
-	function strach_string($string,$size) {
-		return strlen($string)>$size ? substr($string,0,$size)."...":
-		$string;
-	}
-
-	/**
-	* Fixes the odd indexing of multiple file uploads from the format:
-	*
-	* $_FILES['field']['key']['index']
-	*
-	* To the more standard and appropriate:
-	*
-	* $_FILES['field']['index']['key']
-	*
-	* @param array $files
-	* @author Corey Ballou
-	* @link http://www.jqueryin.com
-	*/
-	function fixFilesArray(&$files)
-	{
-		$names = array( 'name' => 1, 'type' => 1, 'tmp_name' => 1, 'error' => 1, 'size' => 1);
-
-		foreach ($files as $key => $part) {
-			// only deal with valid keys and multiple files
-			$key = (string) $key;
-			if (isset($names[$key]) && is_array($part)) {
-				foreach ($part as $position => $value) {
-					$files[$position][$key] = $value;
-				}
-				// remove old key reference
-				unset($files[$key]);
-			}
-		}
-	}
-
-} //end common class
-
-
-?>
Index: branches/2.2.0.1/mobile/inc/class.mobiletemplate.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.mobiletemplate.inc.php	(revision 3988)
+++ 	(revision )
@@ -1,229 +1,0 @@
-<?php 
-//include_once(PHPGW_INCLUDE_ROOT.'/mobile/inc/class.ui_mobile.inc.php');
-	class mobiletemplate
-	{
-		private $template;
-		private $href_back;
-		
-		/*
-		* @function mobiletemplate
-	 	* @abstract Construtor da classe, que monta o template home
-	 	* @author Nilton Emilio Buhrer Neto <niltonneto@celepar.pr.gov.br>
-	 	*/		
-		function mobiletemplate(){
-			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			
-			$template = $GLOBALS['phpgw']->session->appsession('mobile.layout','mobile');
-			
-			if($template == "mini_desktop") {
-				$this->template->set_file(array('home_t' => 'pc_template.tpl'));
-				$this->template->set_file(array('home_t_search_bar' => 'search_bar.tpl'));
-				$this->template->set_block('home_t_search_bar','search_bar');
-				$this->template->set_var('search',$this->template->fp('out','search_bar'));
-				$this->template->set_var('lang_mini_mobile', lang('mini mobile'));
-				$this->template->set_var('lang_search_error_message',lang("need choose one option"));
-				$this->template->set_var('lang_search_error_message_four_digits',lang("search word need not be empty and has more then four char"));
-			}	else {
-				$this->template->set_file(array('home_t' => 'template.tpl'));
-				$this->template->set_var('lang_mini_desktop', lang('mini desktop'));
-			}
-			
-
-			
-			$this->template->set_block('home_t', 'mobile_home');
-			$this->template->set_block('home_t','success_message');
-			$this->template->set_block('home_t','error_message');
-		}
-
-		/*
-		* @function set_content
-	 	* @abstract Carrega o atributo "content" do template principal
-	 	* @author Nilton Emilio Buhrer Neto <niltonneto@celepar.pr.gov.br>
-	 	*/		
-		public function set_content($content){
-			$pre_content = $this->template->get_var("content");
-			$this->template->set_var("content", $pre_content.$content);
-		}
-		
-		/*
-		* @function set_home
-	 	* @abstract Carrega o atributo "home" do template principal para PC.
-	 	* @author Diógenes Ribeiro Duarte <diogenes.duarte@prodeb.ba.gov.br>
-	 	*/	
-		public function set_home($content) {
-			$pre_content = $this->template->get_var("home");
-			$this->template->set_var("home", $pre_content.$content);
-		}
-		
-		/*
-		* @function set_msg
-	 	* @abstract Seta a mensagem de sucesso ou error a depender do tipo.
-	 	* @author Thiago Antonius
-	 	*/		
-		public function set_msg($msg, $type){
-			if(isset($msg) && trim($msg)!="") {
-				$this->template->set_var("message", $msg);
-				$this->template->parse("message_box", $type."_message", true);
-			}
-		}
-		
-		/*
-		* @function set_success_msg
-	 	* @abstract Seta a mensagem de sucesso.
-	 	* @author Thiago Antonius
-	 	*/		
-		public function set_success_msg($msg){
-			$this->set_msg($msg, "success");
-		}
-
-			/*
-		* @function set_error_msg
-	 	* @abstract Seta a mensagem de erro
-	 	* @author Thiago Antonius
-	 	*/		
-		public function set_error_msg($msg){
-			$this->set_msg($msg, "error");
-		}		
-
-		/*
-		* @function print_all
-	 	* @abstract Imprime toda tela do Expresso Mini
-	 	* @author Nilton Emilio Buhrer Neto <niltonneto@celepar.pr.gov.br>
-	 	*/
-		public function print_page($class, $method){
-			$this->print_header();
-			$this->init_mobile();
-			if(!($class == 'ui_home' && $method == 'index')) $this->print_navbar();
-			$filename = 'inc/class.'.$class.'.inc.php';
-			include_once($filename);
-			$obj = new $class();		
-			$obj -> $method($_REQUEST);
-			
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile') == "mini_desktop") {
-				$ui_home = CreateObject('mobile.ui_home');
-				$ui_home->index($_REQUEST);
-			}
-			
-			$this->template->pfp('out', 'mobile_home');
-		}
-		
-		public function init_mobile() {
-			$ui_mobilemail = CreateObject('mobile.ui_mobilemail');
-			$obj = createobject("expressoMail1_2.functions");
-      // setting timezone preference
-      $zones = $obj->getTimezones();
-      $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones));
-			
-			$this->template->set_var('global_title', lang('expresso mini'));
-			$this->template->set_var('lang_logout', lang('logout'));
-			$this->template->set_var('lang_search', lang('search'));
-			
-			$this->template->set_var('href_logout', 'login.php?cd=1');
-		}
-		
-		/*
-		* @function print_navbar
-	 	* @abstract Imprime o início da tela do Expresso Mini => barra de navegação
-	 	* @author Mário César Kolling <mario.kolling@serpro.gov.br>
-	 	*/
-		private function print_navbar(){
-			$this->template->set_var('lang_back', lang('Back'));
-			$this->template->set_var('lang_home', lang('home'));
-			$this->template->set_var('lang_email', lang('E-mail'));
-			$this->template->set_var('lang_contacts', lang('Contact Center'));
-			$this->template->set_var('lang_calendar', lang('Calendar'));
-			$this->template->set_var('href_cc', 'index.php?menuaction=mobile.ui_mobilecc.init_cc');
-			$this->template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0");
-			$this->template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index");
-			$this->template->set_var('href_home', "index.php?menuaction=mobile.ui_home.index");
-		}
-
-		private function process_back_link() {
-			$trace = $GLOBALS['phpgw']->session->appsession('mobile.trace_urls','mobile');
-
-			$trace_idx = 0;
-
-			if($trace) {
-				$trace_idx = sizeof($trace)-1;
-
-				if($_REQUEST["is_back_link"])
-					$trace_idx = $trace_idx - 2;
-
-				if($trace_idx < 0) $trace_idx = 0;
-
-				$url = $trace[$trace_idx]["url"];
-				$params = $trace[$trace_idx]["request"];
-
-				$this->href_back = $this->build_url($url, $params);
-			} else {
-				$trace = array();
-				$this->href_back = '';
-			}
-			
-			if(!$_REQUEST["is_back_link"]) {
-				$current_url = $_SERVER["SCRIPT_NAME"];
-				$current_params = $_REQUEST;
-
-				unset($current_params['sessionid']);
-				unset($current_params['domain']);
-				unset($current_params['last_loginid']);
-				unset($current_params['last_domain']);
-				unset($current_params['kp3']);
-				unset($current_params['showHeader']);
-
-				$built_current_url = $this->build_url($current_url, $current_params);
-
-				//se der reload não vai gravar a url e vai sobreescrever o link do botão voltar para não voltar para a mesma página
-				if(str_replace("&is_back_link=true","",$built_current_url) != str_replace("&is_back_link=true","",$this->href_back))
-					$trace[sizeof($trace)] = array("url" => $current_url, "request" => $current_params);
-				else {
-					if($trace_idx >= 1) $trace_idx--;
-					$this->href_back = $this->build_url($trace[$trace_idx]["url"], $trace[$trace_idx]["request"]);
-				}
-			} else {
-				if(sizeof($trace) > 1)
-					unset($trace[sizeof($trace)-1]);
-			}
-			
-			if(sizeof($trace) > 0)
-				$GLOBALS['phpgw']->session->appsession('mobile.trace_urls','mobile',$trace);
-			else
-				$GLOBALS['phpgw']->session->appsession('mobile.trace_urls','mobile',null);
-			
-			$this->template->set_var('href_back', $this->href_back);
-		}
-		
-		private function build_url($url, $params) {
-			$query_string = "";
-			
-			foreach ($params as $key => $value) {
-				$query_string .= "&".$key."=".$value;
-			}
-
-			if($query_string != "")
-				$url .= "?".substr($query_string,1);
-			
-			if(!$params["is_back_link"])
-				$url .= "&is_back_link=true";
-			
-			return $url;
-		}
-
-		function get_back_link(){
-			return $this->href_back;
-		}
-
-		/*
-		* @function print_header
-	 	* @abstract Imprime o início da tela do Expresso Mini => headers html
-	 	* @author Mário César Kolling <mario.kolling@serpro.gov.br>
-	 	*/		
-		private function print_header(){
-			$GLOBALS['phpgw']->accounts->read_repository();
-			$var  = Array('title' => lang("expresso mini"));
-			$this->template->set_var($var);
-			$this->process_back_link();
-		}
-
-	}
-?>
Index: branches/2.2.0.1/mobile/inc/class.ui_home.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.ui_home.inc.php	(revision 3992)
+++ 	(revision )
@@ -1,350 +1,0 @@
-<?php
-    class ui_home {
-		var $imap_functions;
-		var $db;
-		var $bocalendar;
-		var $common;
-		var $template;
-    	
-		var $public_functions = array(
-			'index' => true,
-			'search' => true,
-			'change_template' => true
-		);
-		
-		function ui_home() {
-			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			$this->common	= CreateObject('mobile.common_functions');
-			$this->imap_functions	= CreateObject('expressoMail1_2.imap_functions');
-			$this->db	= CreateObject('phpgwapi.db');
-			$this->bocalendar = CreateObject('calendar.bocalendar');
-		}
-		
-		function change_template($params) {
-			$GLOBALS['phpgw']->session->appsession('mobile.layout','mobile',$params['template']);
-			header("location: index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0");
-		}
-		
-		function index($params) {
-			$this->template->set_file(array('home_index' => 'home_index.tpl'));
-			$this->template->set_file(array('home_search_bar' => 'search_bar.tpl'));
-					
-			$this->template->set_block('home_index','page');	
-			$this->template->set_block('home_index','folder_block');
-			$this->template->set_block('home_index','commitment_block');	
-			$this->template->set_block('home_search_bar','search_bar');
-			
-			//langs
-			$this->template->set_var('lang_context_email', lang("context email"));
-			$this->template->set_var('lang_context_contact', lang("context contact"));
-			$this->template->set_var('lang_context_commitment', lang("context commitment"));
-			$this->template->set_var('lang_search', lang("search"));
-			$this->template->set_var('lang_my_mail', lang("my mail"));
-			$this->template->set_var('lang_my_folders', lang("my folders"));
-			$this->template->set_var('lang_my_commitments', lang("my commitments"));
-			$this->template->set_var('lang_my_contacts', lang("my contacts"));
-			$this->template->set_var('lang_new_mail', lang("new mail"));
-			$this->template->set_var('lang_mark_as_read', lang("mark as read"));
-			$this->template->set_var('lang_selected', lang("selected"));
-			
-			$accountId = $GLOBALS['phpgw_info']['user']['account_id'];
-			
-			//pegando as pastas
-			$default_folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true, 'folderType' => 'default', 'noQuotaInfo' => true));
-			$total_quota = $this->imap_functions->get_quota(array());
-	
-			$this->set_folder_block($default_folders, "default_folders_box");
-			
-			$personal_folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true, 'folderType' => 'personal', 'noQuotaInfo' => true));
-			$this->set_folder_block($personal_folders, "personal_folders_box", sizeof($default_folders));
-			
-			$this->template->set_var('quota_percent', $total_quota["quota_percent"]);
-			$this->template->set_var('quota_used', $this->common->borkb($total_quota["quota_used"]*1024));
-			$this->template->set_var('quota_limit', $this->common->borkb($total_quota["quota_limit"]*1024));
-			
-			//pegando os eventos do dia atual
-			$year	= $this->bocalendar->year;
-			$month	= $this->bocalendar->month;
-			$day	= $this->bocalendar->day;
-			
-			$tstart = mktime(0,0,0,$month,$day,$year);
-			
-			$tstop = $tstart + 86400; //(24horas*60min*60seg*1dia)
-			$this->bocalendar->so->owner = $accountId;
-			$this->bocalendar->so->open_box($accountId);
-			$this->bocalendar->store_to_cache( array(
-				'owner'	=> $accountId,
-				'syear'  => date('Y',$tstart),
-				'smonth' => date('m',$tstart),
-				'sday'   => date('d',$tstart),
-				'eyear'  => date('Y',$tstop),
-				'emonth' => date('m',$tstop),
-				'eday'   => date('d',$tstop)
-			) );
-			
-			$events = $this->bocalendar->cached_events;
-			
-			foreach($events[$year.$this->common->complete_string($month,2,"R","0").$this->common->complete_string($day,2,"R","0")] as $index=>$event)
-			{
-				$this->template->set_var('commitment_class', (($index%2==0) ? "fundo-azul-alinha" : "fundo-branco-alinha") );
-				$this->template->set_var('commitment_time', $this->common->complete_string($event["start"]["hour"],2,"R","0") .":". $this->common->complete_string($event["start"]["min"],2,"R","0") );
-				$this->template->set_var('commitment_title', $event["title"] );
-				
-				$this->template->parse('commitments_box', 'commitment_block' ,true);
-			}
-			
-			
-			
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini_desktop") {
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_home($this->template->fp('out', 'page'));
-			} else {
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]);
-				$this->template->set_var('search',$this->template->fp('out','search_bar'));
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page'));
-			}
-		}
-
-		function get_translate_default_folder_name_from_id($folder_id) {
-			$imap_delimiter = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'];
-			
-			switch ($folder_id) {
-				case 'INBOX':
-					return lang("Inbox");
-				case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']: 
-					return lang("Trash");
-				case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']: 
-					return lang("Drafts");
-				case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']: 
-					return lang("Spam");
-				case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']: 
-					return lang("Sent");
-				default:
-					return "";
-			}
-		}
-		
-		/**
-		 * 
-		 *
-		 * $index_increment utilizado para quando passar o array das pastas pessoais somar com a quantidade de pastas default.
-		 */
-		function set_folder_block($folders, $box_target, $index_increment = 0) {
-			foreach($folders as $index=>$folder) 
-			{
-				$this->template->set_var('folder_class', (($index%2==0) ? "par" : "par1") );
-				$this->template->set_var('folder_id', $index + $index_increment );
-				
-				$translated_folder_name = $this->get_translate_default_folder_name_from_id($folder["folder_id"]);
-				
-				$this->template->set_var('folder_name', (($translated_folder_name == "") ? $folder["folder_name"] : $translated_folder_name) );
-				$this->template->set_var('folder_unseen', $folder["folder_unseen"] );
-				
-				$this->imap_functions->open_mbox($folder["folder_id"],true);
-				$this->template->set_var('folder_total_msg', $this->imap_functions->get_num_msgs(array('folder' => $folder["folder_id"] ) ) );
-				
-				$this->template->parse($box_target, 'folder_block' ,true);
-			}
-		}
-		
-    function search($params) {
-    	
-    	if($_SERVER["HTTP_REFERER"] && strpos($_SERVER["HTTP_REFERER"], "ui_home.index")) {
-    		if(!$params["default_folders"] &&
-					 !$params["personal_folders"] &&
-					 !$params["calendar_search"] &&
-					 !$params["contacts_search"]) {
-					 	
-						header('Location: index.php?menuaction=menuaction=mobile.ui_home.index&error_message='.lang("need choose one option"));
-					 }
-    	}
-    		
-				
-			include_once "class.ui_mobilecc.inc.php";
-			$ui_mobilemail = CreateObject("mobile.ui_mobilemail");//Necessário para lista de emails, que é uma função estática
-
-			$p = $this->template;
-			$p->set_file(array('home_search' => 'home_search.tpl'));
-			$p->set_file(array('home_search_bar' => 'search_bar.tpl'));
-			
-			//Langs gerais da página
-			$p->set_block('home_search','main');
-			$p->set_block("home_search","row_events");
-			$p->set_block("home_search","no_events");
-			$p->set_block('home_search_bar','search_bar');
-			
-			$p->set_var('search_param',$params['name']);
-			$p->set_var('lang_back',lang('back'));
-			$p->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$p->set_var('lang_new_message',ucfirst(lang('new message')));
-			$p->set_var('lang_search',lang('search'));
-			$p->set_var('lang_search_return',lang('search return'));
-			$p->set_var('lang_your_search_was_by',ucfirst(lang('your search was by')));
-			$p->set_var('lang_emails',ucfirst(lang('e-mails')));
-			$p->set_var('lang_contacts',ucfirst(lang('contacts')));
-			$p->set_var('lang_calendar',ucfirst(lang('calendar')));
-			$p->set_var('lang_events',lang('events'));
-			$p->set_var('default_folders',$params['default_folders']);
-			$p->set_var('personal_folders',$params['personal_folders']);
-			$p->set_var('folder_to_search',$params['folder_to_search']);
-			$p->set_var('contacts_search',$params['contacts_search']);	
-			$p->set_var('catalog_to_search',$params['catalog_to_search']);
-			$p->set_var('calendar_search',$params['calendar_search']);
-			$p->set_var('lang_more',lang("more"));	
-			$p->set_var('lang_messages',lang("messages"));
-			$p->set_var('show_more_contacts',"none");
-			$p->set_var('show_more_messages',"none");
-			$p->set_var('show_more_events',"none");
-			$p->set_var('contacts_request_from',
-				isset($params["request_from"])?
-				$params["request_from"]:"none");
-				
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')!="mini_desktop") {
-				$p->set_var('search',$p->fp('out','search_bar'));
-			}
-
-			if(!$params['name'] || trim($params['name']) == "" || strlen($params['name']) < 5 ) {
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg(lang("search word need not be empty and has more then four char"));
-			} else {
-				//E-mails
-				$no_mail_search=false;
-				if((!isset($params['folder_to_search'])) || ($params['folder_to_search']==="")) {
-					if($params['default_folders']==="1") {
-						if($params['personal_folders']!=="1")
-							$mail_params['folderType'] = 'default';
-					}
-					else {
-						if($params['personal_folders']==="1")
-							$mail_params['folderType'] = 'personal';
-						else
-							$no_mail_search = true;
-					}
-				}
-				else {
-					$mail_params['folder'] = $params['folder_to_search'];
-				}
-
-				if(!$no_mail_search) {
-					$imap_functions = CreateObject('expressoMail1_2.imap_functions');
-					$mail_params['filter'] = $params["name"];
-					$mail_params['max_msgs'] = isset($params['max_msgs'])?$params['max_msgs']:10;
-				
-					$p->set_var('next_max_msgs',$mail_params['max_msgs']+10);
-					$p->set_var('max_msgs',$mail_params['max_msgs']);
-					
-					$messages = $imap_functions->mobile_search($mail_params);
-					if($messages["has_more_msg"])
-						$p->set_var('show_more_messages',"block");
-					else
-						$p->set_var('show_more_messages',"none");
-					$p->set_var('mails',$ui_mobilemail->print_mails_list($messages['msgs']));
-				}
-				else {
-					$p->set_var('show_mails',"none");
-				}
-			
-				//Agenda
-				if($params["calendar_search"]==="1") {
-				
-					$bo_calendar = CreateObject('calendar.bocalendar',1);
-					$functions = CreateObject('mobile.common_functions');
-				
-					$max_events = isset($params['max_events'])?$params['max_events']:10;
-					$p->set_var('next_max_events',$max_events+10);
-					$p->set_var('max_events',$max_events);
-				
-					$event_ids = $bo_calendar->search_keywords($params['name']);
-				
-					$bg = "fundo-azul-alinha";
-					if(!empty($event_ids)) {
-						$total_events_search = count($event_ids);
-						$event_ids = array_slice($event_ids,0,$max_events,true);
-						if($total_events_search>count($event_ids))
-							$p->set_var('show_more_events',"block");
-						foreach($event_ids as $key => $id)
-						{
-							$event = $bo_calendar->read_entry($id);
-						
-							if(!$bo_calendar->check_perms(PHPGW_ACL_READ,$event))
-							{
-								continue;
-							}
-	
-							$p->set_var("bg",$bg=="fundo-azul-alinha"?$bg="fundo-branco-alinha":$bg="fundo-azul-alinha");
-							$p->set_var("date",$functions->complete_string($event["start"]["mday"],2,"R","0")."/".
-												$functions->complete_string($event["start"]["month"],2,"R","0")."/".
-												$event["start"]["year"]." ".
-												$functions->complete_string($event["start"]["hour"],2,"R","0").":".
-												$functions->complete_string($event["start"]["min"],2,"R","0"));
-							$p->set_var("title",$event["title"],40);
-							$p->fp("calendar_results","row_events",True);
-				
-						}
-					}
-					else {
-						$p->set_var("lang_no_results",lang("no results found"));
-						$p->parse("calendar_results","no_events");
-					}
-				}
-				else {
-					$p->set_var("show_calendar","none");
-				}
-			
-				//Contatos			
-				if(($params["contacts_search"]==="1") || 
-						(isset($params["catalog_to_search"]) && $params["catalog_to_search"]!=="")) {
-
-					$bo_cc =  CreateObject('mobile.bo_mobilecc');
-				
-					if(isset($params["catalog_to_search"]) && $params["catalog_to_search"]!=="")
-						$catalogs = array(0=>array("catalog"=>$params["catalog_to_search"],
-												"label" => $params["catalog_to_search"]));
-					else 
-						$catalogs = $bo_cc->get_all_catalogs();
-	
-					$max_contacts = isset($params['max_contacts'])?$params['max_contacts']:10;
-					$contacts_result = array();
-					$p->set_var('next_max_contacts',$max_contacts+10);
-					$p->set_var('max_contacts',$max_contacts);
-				
-				
-					foreach($catalogs as $catalog) {
-						if($catalog['catalog']==="bo_group_manager")
-							continue;
-						if(count($contacts_result)>=$max_contacts) {
-							$bo_cc->set_catalog($catalog['catalog']);
-							$partial_result = $bo_cc->search("%".$params['name']."%","1");
-							if(count($partial_result)>1) {
-								$p->set_var('show_more_contacts',"block");
-							}
-							break;
-						}
-						$max_to_search = $max_contacts - count($contacts_result);//Só posso pedir no máximo o número máximo a ser visto menos o que já foi achado.
-						$bo_cc->set_catalog($catalog['catalog']);
-						$partial_result = $bo_cc->search("%".$params['name']."%",$max_to_search);
-						if($partial_result["has_more"]) {
-							$p->set_var('show_more_contacts',"block");
-							unset($partial_result["has_more"]);
-						}
-					
-						$contacts_result = array_merge($contacts_result,$partial_result);
-					
-					}
-				
-					if(isset($params['request_from'])  && $params['request_from']!="none") //Buscas feitas requisitadas por outros modulos
-						$request_from = $params['request_from'];
-					else
-						$request_from = null;
-					$p->set_var('contacts',ui_mobilecc::print_contacts($contacts_result,false));
-				}
-				else {
-					$p->set_var('show_contacts',"none");
-				}
-			}
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out','main'));
-
-		}
-		
-		
-	}
-?>
Index: branches/2.2.0.1/mobile/inc/class.ui_mobilemail.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.ui_mobilemail.inc.php	(revision 3935)
+++ 	(revision )
@@ -1,1083 +1,0 @@
-<?php
-	/**************************************************************************\
-	* eGroupWare                                                               *
-	* http://www.egroupware.org                                                *
-	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-	//TODO: Criar a Classe Widget.
-
-	include_once(PHPGW_INCLUDE_ROOT.'/expressoMail1_2/inc/class.imap_functions.inc.php');
-
-	// Classe principal do Mini Mail
-	class ui_mobilemail{
-
-		// Define as funções públicas
-		var $public_functions = array(
-			'mail_list'	=> True,
-			'change_folder' => True,
-			'change_page'	=> True,
-			'show_msg'	=> True,
-			'send_mail'	=> True,
-			//'reply_msg'	=> True,
-			'new_msg'	=> True,
-			'delete_msg'	=> True,
-			'confirm_delete_msg'	=> True,
-			'init_schedule' => true,
-			'add_recipients' => true,
-			'add_recipient' => true,
-			'list_folders' => true,
-			'save_draft' => true,
-			'mark_message_with_flag' => true,
-			'change_search_box_type' => true,
-			'index' => true
-		);
-
-		var $template;
-		var $common;
-		var $folders; // Pastas imap
-		var $current_search_box_type;
-		var $current_folder; // Pasta corrente
-		var $current_page; // Página corrente da lista de e-mails da pasta corrente
-		var $imap_functions; // Variável que recebe um objeto do tipo class.imap_functions.inc.php
-		var $allowed_tags = '<p><a><br><em><strong><ol><li><ul><div><font>'; // Tags html que não serão removidas
-			// ao mostrar corpo do e-mail
-
-
-		/*
-		 * @function mobilemail
-		 * @abstract Método construtor da classe principal do Mini Mail
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function ui_mobilemail()
-		{
-			$this-> load_session();						
-			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			$this->common	= CreateObject('mobile.common_functions');
-			
-			// Recupera atributos da classe gravados na sessão
-			$folders = $GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile');
-			$current_folder = $GLOBALS['phpgw']->session->appsession('mobilemail.current_folder','mobile');
-			$current_page = $GLOBALS['phpgw']->session->appsession('mobilemail.current_page','mobile');
-			$current_search_box_type = $GLOBALS['phpgw']->session->appsession('mobilemail.current_search_box_type','mobile');
-			
-			// Inicializa a classe class.imap_functions.inc.php
-			$this->imap_functions = new imap_functions();
-
-			// Testa a existência dos atributos da classe recuperadas da sessão, e as carrega ou inicializa.
-			if ($folders)
-			{
-				$this->folders = $folders;
-			}
-			else
-			{
-				$this->folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true));
-			}
-
-			if ($current_folder)
-			{
-				$this->current_folder = $current_folder;
-				$current_page = 1;
-			}
-			else
-			{
-				$this->current_folder = 0; // Define o folder INBOX como o folder corrente
-			}
-
-			if ($current_page)
-			{
-				$this->current_page = $current_page;
-			}
-			else
-			{
-				$this->current_page = 1; // Define a primeira página como página padrão
-			}
-			
-			if($current_search_box_type) 
-			{
-				$this->current_search_box_type = $current_search_box_type;
-			}
-			else {
-				$this->current_search_box_type = "all";
-			}
-
-		}
-
-		/*
-		 * @function save_session
-		 * @abstract Salva os atributos da classe na sessão
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function save_session()
-		{
-			$GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile',$this->folders);
-			$GLOBALS['phpgw']->session->appsession('mobilemail.current_folder','mobile',$this->current_folder);
-			$GLOBALS['phpgw']->session->appsession('mobilemail.current_page','mobile',$this->current_page);
-			$GLOBALS['phpgw']->session->appsession('mobilemail.current_search_box_type','mobile',$this->current_search_box_type);
-		}
-
-		/*
-		 * @function change_page
-		 * @abstract Troca a página de exibição da lista de e-mails, e mostra a nova página
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function change_page($params)
-		{
-			if (isset($params['page']))
-			{
-				$this->current_page = $params['page'];
-			}
-			$this->mail_list();
-			$this->save_session();
-		}
-
-		function change_search_box_type($params) {
-			if (isset($params['search_box_type']))
-			{
-				$this->current_search_box_type = $params['search_box_type'];
-				$this->current_page = 1;
-			}
-			$this->mail_list();
-			$this->save_session();
-		}
-
-		/*
-		 * @function change_folder
-		 * @abstract Troca a pasta do imap, e mostra a primeira página da nova pasta
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function change_folder($params)
-		{
-			$folder = $params['folder'];
-			if (isset($folder))
-			{
-				$this->current_folder = $folder;
-				$this->current_page = 1;
-				$this->current_search_box_type = "all";
-			}
-			
-				
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]);
-			$this->mail_list();
-			$this->save_session();
-		}
-		
-		function mark_message_with_flag($params=array())
-		{
-			
-			if(isset($params['msgs']))
-				$params["msgs_to_set"] = implode(",",$params["msgs"]);
-			
-			if (isset($params["msgs_to_set"])){
-			
-				$return = $this->imap_functions->set_messages_flag($params);
-			
-				if($return)
-					header('Location: index.php?menuaction=menuaction=mobile.ui_mobilemail.index&success_message='.lang("The messages were marked as seen"));
-				else
-					header('Location: index.php?menuaction=menuaction=mobile.ui_mobilemail.show_msg&msg_number='.$params["msgs_to_set"].'&msg_folder='.$return["msg_folder"].'&error_message='.$return["msg"]);
-					
-			} else {
-				header('Location: index.php?menuaction=menuaction=mobile.ui_mobilemail.index&error_message='.lang("please select one e-mail"));
-			}
-			
-			exit;
-		}
-		
-		/*
-		 * @function show_msg
-		 * @abstract Mostra a mensagem de e-mail requisitada
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		 // TODO: retirar msg_folder dos parâmentros necessários no GET e usar $this->current_folder
-		function show_msg($params = array())
-		{
-			$msg = $this->imap_functions->get_info_msg($params);
-
-			$msg_number = $params['msg_number'];
-			$msg_folder = $params['msg_folder'];
-
-			// Carrega o template
-			$this->template->set_file(array('view_msg' => 'view_msg.tpl'));
-			$this->template->set_block('view_msg', 'page');
-			$this->template->set_block('view_msg', 'operation_block');
-			$this->template->set_block('view_msg', 'attachment_alert_block');
-			$this->template->set_var('lang_back', lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_reading_message', lang("Reading Message"));
-			$this->template->set_var('theme', $GLOBALS['phpgw_info']['server']['template_set']);
-
-			// Define o cabeçalho do e-mail
-			$this->template->set_var('lang_from', lang("From"));
-			$this->template->set_var('from', $msg['from']['full']);
-			$this->template->set_var('lang_to', lang("To"));
-			$this->template->set_var('to', $msg['toaddress2']);
-			$this->template->set_var('lang_cc', lang("cc"));
-			$this->template->set_var('cc', $msg['cc']);
-			$this->template->set_var('size', $this->common->borkb($msg['Size']));
-
-			$this->template->set_var('lang_subject', lang("Subject"));
-			$this->template->set_var('subject', $msg['subject']);
-			$this->template->set_var('date', $msg['msg_day']." ".$msg['msg_hour']);
-
-			// Mostra o corpo do e-mail
-			$this->template->set_var('body', strip_tags($msg['body'], $this->allowed_tags)); // Usa a função strip_tags() para filtrar
-
-			$operations = array();
-
-			if($msg["Draft"] === "X") {
-				$operations["edit_draft"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=use_draft";
-				$operations["edit_draft"]["lang"] = lang("edit draft");
-			}	else {
-				$operations["mark_as_unread"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.mark_message_with_flag&flag=unseen&msgs_to_set=$msg_number&msg_folder=$msg_folder";
-				$operations["mark_as_unread"]["lang"] = lang("mark as unread");
-				$operations["forward"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=forward";
-				$operations["forward"]["lang"] = lang("Forward");
-				$operations["reply"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply";
-				$operations["reply"]["lang"] = lang("Reply");
-				$operations["reply_all"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply_all";
-				$operations["reply_all"]["lang"] = lang("Reply to all");
-			}
-
-			$operations["delete"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder";
-			$operations["delete"]["lang"] = lang("Delete");
-
-			foreach($operations as $index=>$operation) {
-				$this->template->set_var('operation_link', $operation["link"]);
-				$this->template->set_var('operation_id', $index);
-				$this->template->set_var('lang_operation', $operation["lang"]);
-				$this->template->parse('operation_box','operation_block', true);
-			}
-
-			if (!empty($msg['attachments']))
-			{
-				$attachs = "<br>".lang("This message has the follow attachments:")."<br>";
-				foreach($msg['attachments'] as $key => $attach) {
-					if(is_array($attach)) {
-						//$attachs.=$attach['name']."&nbsp;&nbsp;&nbsp;&nbsp;";
-						$attachs.="<a href='../expressoMail1_2/inc/gotodownload.php?msg_folder=".$msg_folder.
-								  "&msg_number=".$msg_number."&idx_file=".$key."&msg_part=".$attach['pid'].
-								  "&newfilename=".$attach['name']."&encoding=".$attach['encoding']."'>".
-									  lang('Download').":&nbsp;".$attach['name']."</a><br>";
-					}
-				}
-
-				$this->template->parse('attachment_alert_box','attachment_alert_block', true);
-				$this->template->set_var('attachment_message', $attachs);
-			}
-			else
-			{
-				$this->template->set_var('attachment_message', lang('This message don\'t have attachment(s)'));
-			}
-
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page'));
-		}
-
-		/*
-		 * @function index
-		 * @abstract Página inicial da aplicação mobilemail, mantém o estado atual. Ou seja, mostra lista de e-mails
-		 * do folder e página definidos pelos parâmetros current_folder e current_page.
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		 // TODO: Talvez seja melhor voltar sempre para o Inbox e primeira página
-		function index($params)
-		{
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]);
-			$this->mail_list();
-			$this->save_session();
-
-		}
-		
-		function load_session(){
-			/************************************\
-			 * Inicialização do expressoMail1_2 *
-			\************************************/
-			// Get Data from ldap_manager and emailadmin.
-			$ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
-			$boemailadmin	= CreateObject('emailadmin.bo');
-			$emailadmin_profile = $boemailadmin->getProfileList();
-			$_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
-			$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user'];
-			$_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server'];
-			$_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;
-			$_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email'];
-		
-			// Fix problem with cyrus delimiter changes in preferences.
-			// Dots in names: enabled/disabled.
-			$save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
-			$save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
-			$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder;
-			// End Fix.
-		
-		    // Loading Admin Config Module
-		    $c = CreateObject('phpgwapi.config','expressoMail1_2');
-		    $c->read_repository();
-		    $current_config = $c->config_data;
-		    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages'];
-		    // Begin Set Anti-Spam options.
-		    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham'];
-		    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam'];
-		    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter'];
-			$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ini_get('upload_max_filesize');
-
-			// echo '<script> var array_lang = new Array();var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' </script>';
-
-			// End Set Anti-Spam options.
-		
-		    // Set Imap Folder names options
-		    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']		: "Trash";
-		    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] 	: "Drafts";
-		    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']		: "Spam";
-		    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] 	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] 		: "Sent";
-
-			// include("../expressoMail1_2/inc/load_lang.php");		    
-		}
-
-		/*
-		 * @function print_folder_selection
-		 * @abstract Imprime o folder corrente (INBOX)
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function print_folder_selection()
-		{
-			$this->template->set_file(array('mobilemail_t' => 'mobilemail.tpl'));
-			$this->template->set_block('mobilemail_t', 'inbox_folder_list');
-			$this->template->set_var('lang_folder', lang('Folder'));
-			$folder = str_replace("*","",lang($this->folders[$this->current_folder]['folder_name']));
-			if(!$this->current_folder == 0){
-				$this->template->set_var('lang_inbox', $folder.' :: <a title="'.lang('Inbox').'" href="index.php?menuaction=mobile.ui_mobilemail.mail_list&folder=0">'.lang('Inbox').'</a>');
-			}else{
-				$this->template->set_var('lang_inbox', lang('Inbox'));
-			}
-			
-			//$this->template->set_var('folder_items', $folder_items);
-			$this->template->parse('mobilemail_t', 'inbox_folder_list');			
-			//$this->template->fpf('out', 'mobilemail_t');
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'mobilemail_t'));
-
-		}
-
-		/*
-		 * @function old_print_folder_selection
-		 * @abstract Imprime na tela a caixa de seleção de folders
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function old_print_folder_selection()
-		{
-
-			// Processa as options
-			$folder_items = '';
-
-			foreach ($this->folders as $i => $j)
-			{
-
-				$option_selected = '';
-				$this->template->set_file(array('mobilemail_t' => 'mobilemail.tpl'));
-				$this->template->set_block('mobilemail_t', 'folder_item');
-
-				if (is_numeric($i))
-				{
-					if ($i == $this->current_folder)
-					{
-						 $option_selected = 'selected="selected"';
-					}
-
-					$this->template->set_var('option_selected', $option_selected);
-					$this->template->set_var('folder_id', $j['folder_id']);
-					$this->template->set_var('folder_name', $j['folder_id']); // Mudar... provavelmente usar preg_replace
-													   			 // para substituir cpf pelo nome do usuário.
-
-					if ($j['folder_unseen'] > 0)
-					{
-						$this->template->set_var('folder_unseen', ' - ('.$j['folder_unseen'].')');
-					}
-
-					$folder_items .= $this->template->fp('mobile_t', 'folder_item');
-				}
-
-			}
-
-			// Processa o select
-			$this->template->set_file(array('mobilemail_t' => 'mobilemail.tpl'));
-			$this->template->set_block('mobilemail_t', 'folder_list');
-			$this->template->set_var('folder_items', $folder_items);
-			$this->template->parse('mobilemail_t', 'folder_list');			
-			//$this->template->pfp('out', 'mobilemail_t');
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'mobilemail_t'));
-
-		}
-
-		/*
-		 * @function mail_list
-		 * @abstract Imprime a lista de e-mails
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 */
-		function mail_list()
-		{	
-				
-			$p = $this->template;
-			$p->set_file(
-				Array(
-					'mail_t' => 'mobilemail.tpl',
-					'home_search_bar' => 'search_bar.tpl'
-				)
-			);
-
-			$p->set_block('home_search_bar','search_bar');
-
-			$p->set_var("page",$this->current_page+1);
-			$p->set_var("lang_new_message",lang("new message"));
-			$p->set_var("lang_new",strtoupper(lang("new")));
-			$p->set_var("folder_id",$this->folders[$this->current_folder]['folder_id']);
-			$p->set_var("folder",$this->folders[$this->current_folder]['folder_name']);
-			$p->set_var("selected_".$this->current_search_box_type,"selected");
-			$p->set_var("lang_back",lang("back"));
-			$p->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$p->set_var("selecteds",ucfirst(lang("Selecteds")));
-			$p->set_var("filter_by",lang("filter by"));
-			$p->set_var("lang_new_message",lang("new message"));
-			$p->set_var('lang_search',lang('search'));
-			$p->set_var("lang_more",lang("more"));
-			$p->set_var("lang_messages",lang("messages"));
-			
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')!="mini_desktop")
-				$p->set_var('search',$p->fp('out','search_bar'));
-			
-			$max_per_page = 
-					isset($GLOBALS['phpgw_info']['user']['preferences']['mobile']['max_message_per_page'])?
-					$GLOBALS['phpgw_info']['user']['preferences']['mobile']['max_message_per_page']:10; 
-						
-			$params = array(
-				'folder' 			=> $this->folders[$this->current_folder]['folder_id'],
-				'msg_range_begin' 	=> 1,
-				'msg_range_end'		=> $this->current_page * $max_per_page,
-				'search_box_type'	=> $this->current_search_box_type,
-				'sort_box_type'		=> 'SORTARRIVAL',
-				'sort_box_reverse'	=> 1
-			);
-			
-			$messages = $this->imap_functions->get_range_msgs2($params);
-			if($params['msg_range_end']<$messages[num_msgs])
-				$p->set_var("show_more","block");
-			else
-				$p->set_var("show_more","none");
-			$this->number_of_messages = $messages[num_msgs];
-			
-			unset($messages["offsetToGMT"]);
-			unset($messages["tot_unseen"]);
-			
-			$p->set_var('mails',$this->print_mails_list($messages,true));
-			
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out','mail_t'));
-			
-
-		}
-
-		/*
-		 * @function print_mails_list
-		 * @abstract Imprime a lista de mensagens
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 * @param array Um array com a lista de mensagens recuperado por $this->imap_functions->get_range_msgs2($params)
-		 */
-		function print_mails_list($messages,$print_checkbox=false)
-		{
-			
-			$functions = $this->common;
-			$p = $this->template;
-			$p->set_file( array( 'mobilemail_t' => 'mails_list.tpl' ) );
-			$p->set_block('mobilemail_t', 'rows_mails');
-			$p->set_block('mobilemail_t', 'row_mails');
-			$p->set_block('mobilemail_t', 'no_messages');
-
-			if(count($messages)>1) { //O array de emails tem pelo menos uma posição com o total de mensagens.
-				$bg = "bg-azul";
-				foreach($messages as $id => $message) {
-					
-					if(($id==='num_msgs') ||($id==='total_msgs') || ($id==='has_more_msg'))
-						continue;
-					if($message['from']['name'])
-						$from_name = $message['from']['name'];
-					else
-						$from_name = $message['from']['email'];
-					$bg = $bg=="bg-azul"?"bg-branco":"bg-azul";
-					$p->set_var('bg',"email-geral $bg");
-					
-					$flag="";
-										
-					if($message["Unseen"]==="U") 
-						$flag="email-nao-lido ";
-					else
-						$flag="email-lido ";
-					
-					if($message["Flagged"]==="F")
-						$flag.="email-importante";
-					
-					$p->set_var("flag",$flag);
-					if($print_checkbox)
-						$p->set_var('show_check','inline');
-					else
-						$p->set_var('show_check','none');
-					
-					if($print_checkbox)
-						$p->set_var("details","email-corpo");
-					else
-						$p->set_var("details","limpar_div margin-geral");
-
-					$p->set_var('pre_type',$pre);
-					$p->set_var('pos_type',$pos);
-					$p->set_var('from',$from_name);
-					$p->set_var('url_images','templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images');
-					$p->set_var('msg_number',$message["msg_number"]);
-					$p->set_var('mail_time',$message['smalldate']);
-					$p->set_var('mail_from',$message['from']['email']);
-					$p->set_var('subject',$message['subject']?$message['subject']:"(".lang("no subject").")");
-					$p->set_var('size',$functions->borkb($message['Size']));
-					$p->set_var('lang_attachment',lang('attachment'));
-					$p->set_var('msg_number', $message['msg_number']);
-					$p->set_var('msg_folder', isset($message['msg_folder']) ? $message['msg_folder'] : $this->folders[$this->current_folder]['folder_id']);
-					$p->set_var('show_attach', ($message['attachment']['number_attachments']>0) ? '' : 'none');
-					$p->fp('rows','row_mails',True);
-				}
-			}
-			else {
-				$p->set_var("lang_no_results",lang("no results found"));
-				$p->parse("rows","no_messages");
-			}
-			return $p->fp('out','rows_mails');
-
-		}
-
-		/*
-		 * @funtion print_page_navigation
-		 * @abstract Imprime a barra de navegação da lista de e-mails da pasta corrente. Quem chama essa função é quem faz o controle do modelo.
-		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
-		 * @param integer Número de páginas que serão geradas
-		 * @param integer Página corrente
-		 */
-		// TODO: mover este método para a classe page_navigation subclasse de widget
-		function print_page_navigation($number_of_pages, $page = 1)
-		{
-
-			$pages = '';
-
-			if ($number_of_pages != 0)
-			{
-				// Geração das páginas
-				for ($i = 1; $i <= $number_of_pages ; $i++)
-				{
-
-          $p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-					$p->set_file(array('mobilemail_t' => 'mobilemail.tpl'));
-					$p->set_block('mobilemail_t', 'space');
-					$p->set_block('mobilemail_t', 'begin_anchor');
-					$p->set_block('mobilemail_t', 'end_anchor');
-					$p->set_block('mobilemail_t', 'page_item');
-					$p->set_block('mobilemail_t', 'begin_strong');
-					$p->set_block('mobilemail_t', 'end_strong');
-
-					if ($i == $page)
-					{
-						// Se for a página sendo gerada for a página corrente,
-						// não gera a âncora e destaca o número (negrito)
-						$p->set_var('end_anchor', '');
-						$p->set_var('begin_anchor', '');
-						$p->set_var('begin_strong', trim($p->fp('mobilemail_t', 'begin_strong')));
-						$p->set_var('end_strong', trim($p->fp('mobilemail_t', 'end_strong')));
-					}
-					else
-					{
-						// Senão, gera a âncora
-						$p->set_var('begin_strong', '');
-						$p->set_var('end_strong', '');
-						$p->set_var('end_anchor', trim($p->fp('mobilemail_t', 'end_anchor')));
-						$p->set_var('begin_anchor_href', "index.php?menuaction=mobile.ui_mobilemail.change_page&folder=$this->current_folder&page=$i");
-						$p->set_var('begin_anchor', trim($p->fp('mobilemail_t', 'begin_anchor')));
-					}
-
-					$p->set_var('page', $i);
-					//$pages .= trim($p->fp('mobilemail_t', 'page_item'));
-
-				}
-				$pages .= " ".$page." ".lang("of")." ".$number_of_pages." ";
-
-				// Geração dos links "anterior" e "próximo"
-				$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-				$p->set_file(array('mobilemail_t' => 'mobilemail.tpl'));
-
-				//$p->set_block('mobilemail_t', 'space');
-				$p->set_block('mobilemail_t', 'mail_footer');
-				$p->set_block('mobilemail_t', 'previous');
-				$p->set_block('mobilemail_t', 'next');
-
-				$next_page = $page + 1;
-				$previous_page = $page - 1;
-
-				if ($page == 1)
-				{
-					// Se for a primeira página, não imprime o link "anterior""
-					$p->set_var('previous', '');
-					if ($page == $number_of_pages)
-					{
-						// Se só existir uma página, não imprime o link "próximo"
-						$p->set_var('next', '');
-					}
-					else
-					{
-						$p->set_var('next_href', "index.php?menuaction=mobile.ui_mobilemail.change_page&folder=$this->current_folder&page=$next_page");
-						$p->set_var('next', trim($p->fp('mobilemail_t', 'next')));
-					}
-
-				}
-				else if ($page == $number_of_pages)
-				{
-					// Se for a última página, não imprime o link "próximo"
-					$p->set_var('next', '');
-					$p->set_var('previous_href', "index.php?menuaction=mobile.ui_mobilemail.change_page&folder=$this->current_folder&page=$previous_page");
-					$p->set_var('previous', trim($p->fp('mobilemail_t', 'previous')));
-				}
-				else
-				{
-					// Senão, imprime os links "anterior" e "próximo"
-					$p->set_var('previous_href', "index.php?menuaction=mobile.ui_mobilemail.change_page&folder=$this->current_folder&page=$previous_page");
-					$p->set_var('previous', trim($p->fp('mobilemail_t', 'previous')));
-
-					$p->set_var('next_href', "index.php?menuaction=mobile.ui_mobilemail.change_page&folder=$this->current_folder&page=$next_page");
-					$p->set_var('next', trim($p->fp('mobilemail_t', 'next')));
-				}
-
-				$p->set_var('pages', $pages);
-				//$p->pfp('out', 'mail_footer');
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_content($p->fp('out', 'mail_footer'));
-			}
-
-		}
-
-		function define_action_message($type) {
-			switch($type) {
-				case "clk":
-				case "from_mobilecc":
-				case "use_draft":
-					$this->template->set_var('action_msg', lang("New message"));
-					break;
-				case "reply_all":
-					$this->template->set_var('action_msg', lang("Reply to All"));
-					break;
-				case "forward":
-					$this->template->set_var('action_msg', lang("Forward"));
-					break;						
-			}
-		}
-		
-		/*
-		 * @function new_msg()
-		 * @abstract Gera o formulário para criar/enviar novo e-mail ou resposta de e-mail.
-		 * @author Rommel de Brito Cysne <rommel.cysne@serpro.gov.br>
-		 */
-		function new_msg($params)
-		{
-			$this->template->set_file(array('new_msg_t' => 'new_msg.tpl'));
-			$this->template->set_block('new_msg_t', 'page');
-			$this->template->set_var('lang_back', lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_calendar', strtoupper(lang("Calendar")));
-			$this->template->set_var('lang_send', strtoupper(lang("Send")));
-			$this->template->set_var('lang_attachment', lang("attachment"));
-			$this->template->set_var('lang_more_attachment', lang("more attachment"));
-			$this->template->set_var('lang_cancel', strtoupper(lang("cancel")));
-			$this->template->set_var('lang_save_draft', strtoupper(lang("save draft")));
-			$this->template->set_var('lang_to', lang("To"));
-			$this->template->set_var('lang_cc', lang("cc"));
-			$this->template->set_var('lang_subject', lang("Subject"));
-			$this->template->set_var('lang_mark_as_important', lang("mark as important"));
-			$this->template->set_var('lang_read_confirmation', lang("read confirmation"));
-			$this->template->set_var('lang_add_history', lang("add history"));
-			$this->template->set_var("show_forward_attachment","none");
-			$this->template->set_var("show_check_add_history","none");
-			
-			if(isset($params["error_message"])) {
-				$this->template->set_var('input_to', $_POST['input_to']);
-				$this->template->set_var('input_cc', $_POST['input_cc']);
-				$this->template->set_var('subject', $_POST['input_subject']);
-				$this->template->set_var('msg_number', $_POST['msg_number']);
-				$this->template->set_var('msg_folder', $_POST['msg_folder']);
-				$this->template->set_var('body_value', $_POST['body']);
-				$this->template->set_var('msg_folder', $_POST['folder']);
-				$this->template->set_var('msg_number', $_POST['reply_msg_number']);
-				$this->template->set_var('from', $_POST['reply_from']);
-				$this->template->set_var('check_important', ( ( $_POST['check_important'] ) ? "checked" : "" ) );
-				$this->template->set_var('check_read_confirmation', ( ( $_POST['check_read_confirmation'] )  ? "checked" : "" ) );
-				$this->template->set_var('check_add_history', ( ( $_POST['check_add_history'] )  ? "checked" : "" ) );				
-				
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-			} else {
-				if (isset($params['msg_number'])) $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) );
-				
-				
-				if($params['type']=="clk")
-				{
-					$this->template->set_var('input_to', "");
-					$this->template->set_var('input_cc', "");
-					$this->template->set_var('subject', "");
-				}
-				else if($params['type']=="from_mobilecc")
-				{
-					$this->template->set_var('input_to', $_GET['input_to']);
-					$this->template->set_var('input_cc', $_GET['input_cc']);
-				}
-				else if($params['type']=="reply_all"){
-					$reply_to_all = $msg['from']['email'];
-					if($msg['toaddress2']) $reply_to_all .= ','.$msg['toaddress2'];
-					if($msg['cc']) $reply_to_all .= ','.$msg['cc'];
-					if($msg['bcc']) $reply_to_all .= ','.$msg['bcc'];
-					
-					$array_emails = explode(',',$reply_to_all);
-					$reply_to_all = '';
-					
-					foreach ($array_emails as $index => $email) {
-						$flag = preg_match('/&lt;(.*?)&gt;/',$email,$reply);
-						$email_to_add = $flag == 0 ? $email.',' : $reply[1].',';
-						
-						if( strpos($reply_to_all, $email_to_add) === false)
-							$reply_to_all .= $email_to_add;
-					}
-					
-					$reply_to_all = substr_replace($reply_to_all, "", strrpos($reply_to_all, ","), strlen($reply_to_all));
-					
-					$this->template->set_var('input_to', $reply_to_all);
-					$this->template->set_var('subject', "Re:" . $msg['subject']);
-	
-					$this->template->set_var('msg_number', $_GET['msg_number']);
-					$this->template->set_var('msg_folder', $_GET['msg_folder']);
-				}
-				else if($params['type']=="user_add"){
-					$this->template->set_var('input_to', $params['mobile_add_contact']['mobile_mail']);
-					$this->template->set_var('input_cc', $params['mobile_add_contact']['mobile_mail_cc']);
-					$this->template->set_var('subject', $params['mobile_add_contact']['subject_mail']);
-					$this->template->set_var('body_value', $params['mobile_add_contact']['body_mail']);
-	
-					$this->template->set_var('check_important', ( ( $params['mobile_add_contact']['check_important'] ) ? "checked" : "" ) );
-					$this->template->set_var('check_read_confirmation', ( ( $params['mobile_add_contact']['check_read_confirmation'] )  ? "checked" : "" ) );
-					$this->template->set_var('check_add_history', ( ( $params['mobile_add_contact']['check_add_history'] )  ? "checked" : "" ) );
-					$this->template->set_var('msg_number', $params['msg_number']);
-					$this->template->set_var('msg_folder', $params['msg_folder']);
-					
-					$params["type"] = $params['mobile_add_contact']['type'];
-				}
-				else if($params['type']=="forward"){
-					$this->template->set_var('from', $msg['toaddress2']);
-	
-					$this->template->set_var('subject', "Enc:" . $msg['subject']);
-					$this->template->set_var('body_value', strip_tags($msg['body'])); // Usa a função strip_tags() para filtrar
-					// as tags que estão presentes no corpo do e-mail.
-					
-					$this->template->set_var('msg_number', $_GET['msg_number']);
-					$this->template->set_var('msg_folder', $_GET['msg_folder']);	
-					if(count($msg['attachments'])>0) {
-						$this->template->set_var("lang_forward_attachment",lang("forward attachments"));
-						$this->template->set_var("show_forward_attachment","block");
-						$this->template->set_block("new_msg_t","forward_attach_block");
-						foreach($msg['attachments'] as $forward_attach) {
-							$value = rawurlencode(serialize(array(0=>$msg['msg_folder'],
-										   1=>$msg['msg_number'],
-										   3=>$forward_attach['pid'],
-										   2=>$forward_attach['name'],
-										   4=>$forward_attach['encoding'])));
-							$this->template->set_var("value_forward_attach",$value);
-							$this->template->set_var("label_forward_attach",$forward_attach['name']);
-							$this->template->fp("forwarding_attachments","forward_attach_block",true);
-						}
-					}
-				}
-				else if($params['type']=="use_draft"){
-					$this->template->set_var('input_to', $msg['toaddress2']);
-					$this->template->set_var('input_cc', $msg['cc']);
-					$this->template->set_var('subject', $msg['subject']);
-					$this->template->set_var('body_value', strip_tags($msg['body'])); // Usa a função strip_tags() para filtrar
-					$this->template->set_var('msg_number', $_GET['msg_number']);
-					$this->template->set_var('msg_folder', $_GET['msg_folder']);
-				}
-				else if($params['type']=="reply"){
-					$this->template->set_var('from', $msg['toaddress2']);
-					$this->template->set_var('input_to', $msg['from']['email']);
-	
-					$this->template->set_var('subject', "Re:" . $msg['subject']);
-	
-					$this->template->set_var('msg_number', $_GET['msg_number']);
-					$this->template->set_var('msg_folder', $_GET['msg_folder']);
-				} else {
-					$this->template->set_var('input_to', "");
-					$this->template->set_var('input_cc', "");
-					$this->template->set_var('subject', "");
-				}
-			}
-			
-				if($params['type']=="reply" || $params['type']=="forward"  || $params['type']=="reply_all" )
-					$this->template->set_var("show_check_add_history","block");
-			
-			//tem que ser realizado no final, pois o tipo user_add é modificado para o tipo que o originou
-			$this->template->set_var('type', $params['type']);
-			$this->define_action_message($params['type']);
-			
-			unset($_SESSION['mobile_add_contact']);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page'));
-		}
-
-				/*
-		 * @function save_draft()
-		 * @abstract Função que salva o email como rascunho
-		 * @author Thiago Antonius
-		 */
-		function save_draft($params)
-		{
-			$params["folder"] = "INBOX/".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'];
-			$params["FILES"] = $_FILES["FILES"];
-			$this->common->fixFilesArray($params["FILES"]);
-			$params['forwarding_attachments'] = $params["forward_attachments"];
-			$return = $this->imap_functions->save_msg($params);
-			if($return["has_error"]) {
-				$params["error_message"] = lang("draft not save")."<br>".lang("error") . $return["append"];
-				$this->new_msg( $params );
-			}else {
-				header('Location: index.php?menuaction=menuaction=mobile.ui_home.index&success_message='.lang("draft saved"));
-			}				
-		}
-		
-		/*
-		 * @function send_mail()
-		 * @abstract Função que realiza o envio de e-mails.
-		 * @author Rommel de Brito Cysne <rommel.cysne@serpro.gov.br>
-		 */
-		function send_mail()
-		{
-			//Chamada da classe phpmailer
-			include_once(PHPGW_SERVER_ROOT."/expressoMail1_2/inc/class.phpmailer.php");
-			include_once(PHPGW_SERVER_ROOT."/expressoMail1_2/inc/class.imap_functions.inc.php");
-			
-			//Recebe os dados do form (passados pelo POST)
-			$toaddress = $_POST['input_to'];
-			$ccaddress = $_POST['input_cc'];
-			$subject = $_POST['input_subject']; //"Mail Subject";
-			$body = nl2br($_POST['body']); //"Mail body. Any text.";
-			$isImportant = $_POST['check_important'];
-			$addHistory = $_POST['check_add_history'];
-			$readConfirmation = $_POST['check_read_confirmation'];
-			$msgNumber = $_POST['reply_msg_number'];
-			$attachments = $_FILES['FILES'];
-			$this->common->fixFilesArray($attachments);
-			$forwarding_attachments = $_POST["forward_attachments"];
-			
-
-			//Cria objeto
-			$mail = new PHPMailer();
-			
-			$db_functions = CreateObject('expressoMail1_2.db_functions');
-			
-			//chama o getAddrs para carregar os emails caso seja um grupo
-			$toaddress = implode(',',$db_functions->getAddrs(explode(',',$toaddress)));
-			$ccaddress = implode(',',$db_functions->getAddrs(explode(',',$ccaddress)));
-			
-			if(!$this->imap_functions->add_recipients("to", $toaddress, &$mail))
-			{
-				$error_msg = lang("Some addresses in the To field were not recognized. Please make sure that all addresses are properly formed");
-			}
-			
-			if(!$this->imap_functions->add_recipients("cc", $ccaddress, &$mail))
-			{
-				$error_msg = lang("Some addresses in the CC field were not recognized. Please make sure that all addresses are properly formed");
-			}
-
-			$mail->IsSMTP();
-			$mail->Host = $_SESSION['phpgw_info']['expressomail']['email_server']['smtpServer'];
-			$mail->Port = $_SESSION['phpgw_info']['expressomail']['email_server']['smtpPort'];
-
-			$mail->SaveMessageInFolder = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'];
-			//Envia os emails em formato HTML; se false -> desativa.
-			$mail->IsHTML(true);
-			//Email do remetente da mensagem
-			$mail->Sender = $mail->From = $_SESSION['phpgw_info']['expressomail']['user']['email'];
-			//Nome do remetente do email
-			$mail->SenderName = $mail->FromName = $_SESSION['phpgw_info']['expressomail']['user']['fullname'];
-			//Assunto da mensagem
-			$mail->Subject = $subject;
-			//Corpo da mensagem
-			$mail->Body .= "<br />$body<br />";
-			//Important message
-			if($isImportant) $mail->isImportant();
-			//add history
-			if($addHistory && $msgNumber) {
-				$msg = $this->imap_functions->get_info_msg(array('msg_number' => $msgNumber ) );
-				$mail->Body .= "<br />".$msg['body']."<br />";
-			}
-			//read confirmation
-			if ($readConfirmation) $mail->ConfirmReadingTo = $_SESSION['phpgw_info']['expressomail']['user']['email'];
-
-			$imap_functions = new imap_functions();
-			if (count($attachments)>0) //Attachment
-			{
-				
-				$total_uploaded_size = 0;
-				$upload_max_filesize = str_replace("M","",$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']) * 1024 * 1024;
-				
-				foreach ($attachments as $attach)
-				{
-					$mail->AddAttachment($attach['tmp_name'], $attach['name'], "base64", $imap_functions->get_file_type($attach['name']));  // optional name					
-					$total_uploaded_size = $total_uploaded_size + $attach['size'];
-				}
-				if( $total_uploaded_size > $upload_max_filesize){
-
-					return $imap_functions->parse_error("message file too big");
-				}
-			}
-			if (count($forwarding_attachments) > 0) { //forward attachment
-				foreach($forwarding_attachments as $forwarding_attachment)
-				{
-					$file_description = unserialize(rawurldecode($forwarding_attachment));
-					$fileContent = $imap_functions->get_forwarding_attachment(
-						$file_description[0],
-						$file_description[1],
-						$file_description[3],
-						$file_description[4]);
-					$fileName = $file_description[2];
-					$mail->AddStringAttachment($fileContent,html_entity_decode(rawurldecode($fileName)), $file_description[4], $imap_functions->get_file_type($file_description[2]));
-				}
-			}
-
-			if(!$mail->Send()) {
-				$params["error_message"] = lang("Message not sent")."<br>".lang("error") . $mail->ErrorInfo;
-				$this->new_msg( $params );
-			}else {
-				if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini_desktop") {
-					header('Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message='.lang("Message sent successfully"));
-				} else {
-					header('Location: index.php?menuaction=mobile.ui_home.index&success_message='.lang("Message sent successfully"));
-				}
-			}
-		}
-
-		function confirm_delete_msg()
-		{
-			//Cria um objeto template
-			//Define o template para mensagens de retorno da funcao
-			$this->template->set_file(array('delete_msg_t' => 'delete_msg.tpl'));
-			$this->template->set_block('delete_msg_t','retorno');			
-			$this->template->set_var('lang_delete_msg', lang("Do you like to delete this message?"));
-			$this->template->set_var('lang_yes', lang("Yes"));	
-			$this->template->set_var('lang_no', lang("No"));
-			$this->template->set_var('link_yes', 'index.php?menuaction=mobile.ui_mobilemail.delete_msg&msg_number='.$_GET['msg_number'].'&msg_folder='.$_GET['msg_folder']);
-			$this->template->set_var('link_no', 'index.php?menuaction=mobile.ui_mobilemail.show_msg&amp;msg_number='.$_GET['msg_number'].'&amp;msg_folder='.$_GET['msg_folder']);	
-			
-			$this->template->pfp('out','retorno');  
-		}
-
-		function delete_msg($params)
-		{
-
-			if ( isset($params['msgs']) || isset($params['msg_number']) )
-			{
-				$params_messages = array(
-					'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'],
-					'folder' => $this->folders[$this->current_folder]['folder_name'],
-					'new_folder_name' => 'Trash',
-					'new_folder' => 'INBOX/Trash'
-				);
-			}	
-
-			if (isset($params['msg_number'])){
-			
-				$this->imap_functions->move_messages($params_messages);
-
-				header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".lang("The messages were moved to trash"));
-				
-			}else{
-				header("Location: index.php?menuaction=mobile.ui_mobilemail.index&error_message=".lang("please select one e-mail"));
-			}
-		    
-		}
-		
-		function get_folder_number($folder_name){
-			foreach($this->folders as $folderNumber => $folder){
-				if($folder['folder_id'] == $folder_name){
-					return $folderNumber;
-				}
-			}
-			return 0;
-		}
-		
-		function init_schedule() {
-			$_SESSION['mobile_add_contact'] = array();
-			$_SESSION['mobile_add_contact']['mobile_mail']  = $_POST['input_to'];
-			$_SESSION['mobile_add_contact']['mobile_mail_cc'] = $_POST['input_cc'];
-			$_SESSION['mobile_add_contact']['add_to'] = $_POST['add_to'];
-			$_SESSION['mobile_add_contact']['type'] = $_POST['type'];
-			$_SESSION['mobile_add_contact']['msg_number'] = $_POST['reply_msg_number'];
-			$_SESSION['mobile_add_contact']['msg_folder'] = $_POST['folder'];
-			$_SESSION['mobile_add_contact']['subject_mail'] = $_POST['input_subject'];
-			$_SESSION['mobile_add_contact']['body_mail'] = $_POST['body'];
-			$_SESSION['mobile_add_contact']['check_important'] = $_POST['check_important'];
-			$_SESSION['mobile_add_contact']['check_read_confirmation'] = $_POST['check_read_confirmation'];
-			$_SESSION['mobile_add_contact']['check_add_history'] = $_POST['check_add_history'];
-
-			$ui_cc = CreateObject('mobile.ui_mobilecc');
-			$ui_cc->choose_contact(array("request_from" => "ui_mobilemail.new_msg"));
-		}
-		
-		function add_recipient() {
-			if($_SESSION['mobile_add_contact']['add_to'] == "to")
-				$arr_key_name = "mobile_mail";
-			else
-				$arr_key_name = "mobile_mail_cc";
-			
-			$arr_mobile_add_contact = $_SESSION['mobile_add_contact'];
-			
-			if(strpos($arr_mobile_add_contact[$arr_key_name], $_GET['mail']) === false)
-				$arr_mobile_add_contact[$arr_key_name] .= ( (trim($arr_mobile_add_contact[$arr_key_name]) == "") ? $_GET['mail'] : ",".$_GET['mail']);
-			
-			unset($_SESSION['mobile_add_contact']);
-			
-			$this->new_msg( array( 
-				'mobile_add_contact' => $arr_mobile_add_contact, 
-				'type' => 'user_add', 
-				'msg_number' => $arr_mobile_add_contact['msg_number'], 
-				'msg_folder' => $arr_mobile_add_contact['msg_folder']));
-		}
-		
-		function list_folders(){			
-			//Define o template para mensagens de retorno da funcao
-			$this->template->set_file(array('folders_t' => 'folders.tpl'));
-			$this->template->set_block('folders_t','retorno');
-			
-			$folders_list = '';
-			$array_folders = Array();
-			$this->folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true));		
-			
-			foreach($this->folders as $id => $folder)
-			{
-				if((strpos($folder['folder_id'],'user')===true && !is_array($folder)) || !is_numeric($id)) 
-					continue;
-					$array_folders[$folder['folder_id']]['id'] = $id;
-					$array_folders[$folder['folder_id']]['folder_name'] = $folder['folder_name'];
-			}
-			
-			foreach($array_folders as $folder_id => $folder)
-			{
-				if(($folder_id != $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']) && ($folder['id'] != 0)){
-					$folder_name = str_replace('*','',lang($folder['folder_name']));
-					$folder_link = "index.php?menuaction=mobile.ui_mobilemail.mail_list&folder=".$folder['id'];
-					$folders_list .= "<br>:: <a href=".$folder_link.">".$folder_name."</a>";
-				}
-			}
-			$this->template->set_var('folders_list', $folders_list);
-			$this->template->pfp('out','retorno');				   
-
-		}
-
-	}
-?>
Index: branches/2.2.0.1/mobile/inc/class.ui_mobilecc.inc.php
===================================================================
--- branches/2.2.0.1/mobile/inc/class.ui_mobilecc.inc.php	(revision 3974)
+++ 	(revision )
@@ -1,857 +1,0 @@
-<?php
-	class ui_mobilecc{
-		
-		var $nextmatchs;
-		var $bo;
-		var $page_info = array (
-				'actual_catalog' => false,
-				'actual_letter' => null,
-				'actual_max_contacts' => null,
-				'request_from' => null
-			);
-		
-		var $public_functions = array(
-			'index' => true,
-			'change_max_results' => true,
-			'change_catalog' => true,
-			'delete_contacts' => true,
-			'change_letter' => true,
-			'choose_contact' => true,
-			'init_cc' => true,
-			'contact_view' => true,
-			'contact_add_edit' => true,
-			'contact_add' => true,
-			'contact_edit' => true
-		);
-		var $template;
-		
-		/**
-		 * Construtor...
-		 * 
-		 */
-		public function ui_mobilecc() {
-			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			$this->bo = CreateObject('mobile.bo_mobilecc');
-			$page_info = $GLOBALS['phpgw']->session->appsession('mobilecc.page_info','mobile');
-			
-			if($page_info) {
-				$this->page_info = $page_info;
-			}
-			else {
-				$this->set_page_info_to_default();
-			}
-			
-			//if()
-
-		}
-		
-		private function set_page_info_to_default() { //Valores default para iniciar o módulo de contatos
-			$this->page_info['actual_catalog'] = 'bo_people_catalog';
-			$this->page_info['actual_letter'] = 'a';
-			$this->page_info['actual_max_contacts'] = 10;
-			$this->page_info['request_from'] = null;
-		}
-		
-		private function save_session() {
-			$GLOBALS['phpgw']->session->appsession('mobilecc.page_info','mobile',$this->page_info);
-		}
-		
-		public function index($params) {
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]);
-			$this->contacts_list();
-		}
-		
-		public function change_max_results($params) {
-			$this->page_info['actual_max_contacts'] = $params['results'];
-			$this->contacts_list();
-			$this->save_session();
-		}
-		
-		public function change_letter($params) {
-			$this->page_info['actual_letter'] = $params['letter'];
-			$this->page_info['actual_max_contacts'] = 10;
-			$this->contacts_list();
-			$this->save_session();
-		}
-		
-		public function change_catalog($params) {
-
-			if( $params['catalog'] ) $this->page_info['actual_catalog'] = $params['catalog'];
-			$this->page_info['actual_max_contacts'] = 10;
-			$this->page_info['actual_letter'] = 'a';
-			
-			$this->contacts_list($params);
-			
-			$this->save_session();
-		}
-		
-		/**
-		 * Função de inicio do módulo para escolha de um contato para outro módulo.
-		 * 
-		 * @return 
-		 * @param $params Object
-		 */
-		public function choose_contact($params) {
-			$this->set_page_info_to_default();
-			$this->page_info['request_from'] = $params['request_from']; //Para escolher contato vindo de outro modulo, mudo apenas o request_from
-			$this->contacts_list();
-			$this->save_session();
-		}
-		
-		/**
-		 * Função de inicio do módulo de cc
-		 * 
-		 * @return 
-		 * @param $params Object
-		 */
-		public function init_cc($params) {
-			$this->set_page_info_to_default();
-			$this->contacts_list($params);
-			$this->save_session();
-		}
-		
-		/**
-		 * Monta a lista de contatos na tela, de acordo com a busca. Se não foi feita
-		 * busca, mostra apenas o formulário para pesquisa.
-		 * 
-		 * @return 
-		 */
-		
-		function contacts_list($params) {
-			
-			$this->template->set_file(
-				Array(
-					'contacts_list' => 'cc_main.tpl',
-					'home_search_bar' => 'search_bar.tpl'
-				)
-			);
-			$this->template->set_block("contacts_list","catalog_row");
-			$this->template->set_block("contacts_list","main_body");
-			$this->template->set_block("contacts_list","pagging_block");
-			$this->template->set_block('home_search_bar','search_bar');
-
-			//Langs gerais da página
-			$this->template->set_var("lang_back",lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var("selecteds",ucfirst(lang("selecteds")));
-			$this->template->set_var("lang_more",lang("more"));
-			$this->template->set_var("lang_search",lang("search"));
-			$this->template->set_var("lang_contacts",ucfirst(lang("contacts")));
-			$this->template->set_var("actual_catalog",$this->page_info["actual_catalog"]);
-			$this->template->set_var("next_max_results",$this->page_info["actual_max_contacts"]+10);
-
-			$show_checkbox = true;
-			if(strpos($this->page_info["actual_catalog"],"ldap")===false) {
-				$this->template->set_var("show_actions", "block");
-			} else {
-				$this->template->set_var("show_actions", "none");
-				$show_checkbox = false;
-			}
-
-			$this->template->set_var("show_add_button",$this->page_info["actual_catalog"] == "bo_group_manager" ? "none" : "");
-			
-			$this->template->set_var("contacts_request_from",
-										$this->page_info["request_from"]==null?
-										"none":$this->page_info["request_from"]);
-			
-			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')!="mini_desktop")
-				$this->template->set_var('search',$this->template->fp('out','search_bar'));
-			
-			//Combo de catálogos
-			$catalogs = $this->bo->get_all_catalogs();
-			foreach($catalogs as $catalog) {
-				$this->template->set_var("catalog_value",$catalog["catalog"]);
-				$this->template->set_var("catalog_name",$catalog["label"]);
-				if($this->page_info['actual_catalog']==$catalog['catalog'])
-					$this->template->set_var("selected","selected");
-				else
-					$this->template->set_var("selected"," ");
-				$this->template->fp("catalogs","catalog_row",true);
-			}
-			$this->bo->set_catalog($this->page_info["actual_catalog"]);
-			$contacts = $this->bo->search($this->page_info["actual_letter"]."%",
-											$this->page_info["actual_max_contacts"]);
-				
-			
-			//Letras da paginação
-			$max_letters = 5;
-			if ( in_array($this->page_info['actual_letter'],
-						  range("a","c"))){ //Letras de A à C iniciam sempre com A		
-  	
-				$this->template->set_var('show_back','none');
-				$this->template->set_var('show_next','inline');
-				$first_letter = "a";
-				$this->template->set_var('href_next',"index.php?menuaction=mobile.".
-										 "ui_mobilecc.change_letter&letter=f");
-			}
-			else if ( in_array($this->page_info['actual_letter'],
-						  range("x","z"))) { //Letras de X à Z terminam sempre no Z
-				$this->template->set_var('show_back','inline');
-				$this->template->set_var('show_next','none');
-				$first_letter = "v";
-				$this->template->set_var('href_back',"index.php?menuaction=mobile.".
-										 "ui_mobilecc.change_letter&letter=u");
-				}
-			else { //Letras do meio
-				$this->template->set_var('show_back','inline');
-				$this->template->set_var('show_next','inline');
-				
-				$first_letter = chr(ord($this->page_info["actual_letter"])-3);//Inicio 3 letras antes
-				$last_letter = chr(ord($first_letter)+($max_letters+1));//A ultima é a máxima quantidade de letras mais 1 do next_letter
-				
-				$this->template->set_var('href_back',"index.php?menuaction=mobile.".
-										 "ui_mobilecc.change_letter&letter=".$first_letter);
-				$this->template->set_var('href_next',"index.php?menuaction=mobile.".
-										 "ui_mobilecc.change_letter&letter=".$last_letter);
-				$first_letter++;
-			}
-			
-			for($i=1;$i<=$max_letters;$i++) { //Roda as letras
-					$this->template->set_var("href","index.php?menuaction=mobile.".
-											"ui_mobilecc.change_letter&letter=".$first_letter);
-					$this->template->set_var("letter",strtoupper($first_letter));
-					if($first_letter===$this->page_info["actual_letter"])
-						$this->template->set_var("class_button","letter-contact-selected");
-					else
-						$this->template->set_var("class_button","btn_off");
-					$this->template->set_var("letter",strtoupper($first_letter));
-					$this->template->fp("pagging_letters","pagging_block",true);
-					$first_letter++;
-			}
-			
-
-			if($contacts['has_more'])
-				$this->template->set_var("show_more","block");
-			else
-				$this->template->set_var("show_more","none");
-			unset($contacts['has_more']);
-						
-			$this->template->set_var("contacts",$this->print_contacts($contacts,$show_checkbox,$this->page_info['request_from']));
-			
-
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out','main_body'));
-		}
-		
-		/**
-		 * Remove os contatos selecionados
-		 * 
-		 * @return 
-		 * @param $contacts Object
-		 * @param $show_checkbox Object[optional]
-		 */
-		
-		function delete_contacts($params) {
-			$this->bo->set_catalog($params['catalog']);
-
-			if (!is_array($params['contacts']) ){
-				header("Location: index.php?menuaction=mobile.ui_mobilecc.index&error_message=".lang("please select one contact"));
-			}else{
-
-				$status = $this->bo->remove_multiple_entries($params['contacts']);
-				
-				$type = $this->page_info['actual_catalog']!=='bo_group_manager'?"contacts":"groups";
-				
-				if($status['success'])
-					header("Location: index.php?menuaction=mobile.ui_mobilecc.index&success_message=".lang("selected $type were removed successfully"));
-				else
-					header("Location: index.php?menuaction=mobile.ui_mobilecc.index&error_message=".lang("one or more $type couldnt be removed"));
-			}
-		}
-		
-		static function print_contacts($contacts,$show_checkbox=false,$request_from = null) {
-			$functions = CreateObject('mobile.common_functions');
-			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-					$p->set_file(
-						Array(
-							'cc_t' => 'contacts_list.tpl'
-						)
-					);
-			$p->set_block('cc_t', 'rows_contacts');
-			$p->set_block('cc_t', 'row_contacts');
-			$p->set_block('cc_t', 'row_groups');
-			$p->set_block('cc_t', 'no_contacts');
-
-			$bg = "bg-azul";
-			if(!empty($contacts)) {
-				foreach($contacts as $id => $contact) {
-
-					$p->set_var('show_check',$show_checkbox?"inline":"none");
-					$p->set_var('bg',$bg=="bg-azul"?$bg="bg-branco":$bg="bg-azul");
-					if($show_checkbox)
-						$p->set_var("details","email-corpo");
-					else
-						$p->set_var("details","limpar_div margin-geral");	
-					if($contact["catalog"]!=="bo_group_manager") {	//Contatos		
-						$id=strpos($contact["catalog"],"ldap")===false?$contact["id_contact"]:$id;
-
-                        $mail = '&nbsp;'; $tel = '&nbsp;';
-                        foreach($contact['connections'] as $key => $conn) {
-
-                            $test = false;
-							if ($conn['connection_is_default']) {
-                                $test = true;
-							}
-                           
-                            if (is_array($conn)){
-                                $test = true;
-							}else{
-								$test = false;
-							}
-                            if ( $test) {
-                            	if ( ($conn['id_type'] == 1) )
-                                    $mail = $conn['connection_value'];
-								else if ( ($conn['id_type'] == 2) )
-                                    $tel = $conn['connection_value'];
-								
-								if (($conn['id_type'] == null) || ($conn['id_type'] == '_NONE_')){
-									if ( ($conn['type'] == 'email') )
-                                    	$mail = $conn['connection_value'];
-									else if ( ($conn['type'] == 'phone') )
-                                    	$tel = $conn['connection_value'];	
-									
-								}
-							}
-						}
-						
-
-						
-                        $cn = is_array($contact["names_ordered"])?$contact["names_ordered"][0]:$contact["names_ordered"];
-                        $vtel = ($tel==null || $tel=='&nbsp;')?"none":"inline";
-						
-						if(($mail=='&nbsp;' || $mail==null) && isset($request_from))//Se vier de outro módulo e não possuir e-mail, não mostre.
-							continue;
-
-						$p->set_var('show_tel',$vtel);
-						$p->set_var('email',$mail);
-						$p->set_var('tel',$tel);
-						$p->set_var('contact_id',$id);
-						$p->set_var('lang_tel',lang("tel"));
-						$p->set_var('contact_name',$functions->strach_string($cn,17));
-
-						$block = "row_contacts";
-					}
-					else { //Grupos
-						$id=$contact["id_group"];
-						$mail = $cn = $contact["title"];
-						$p->set_var('group_id',$contact["id_group"]);
-						$p->set_var('group_name',$contact["title"]);
-						$block = "row_groups";
-					}
-					
-					if($request_from==null) {
-						$p->set_var('lang_see_details',lang("details"));
-						$cat_encode = urlencode($contact["catalog"]);
-						$p->set_var('href_details',"ui_mobilecc.contact_view&id=$id&catalog=".urlencode($contact["catalog"]));
-					}
-					else {
-						$p->set_var('lang_see_details',lang("select"));
-						$p->set_var("href_details","ui_mobilemail.add_recipient&mail=$mail&cn=$cn");
-					}
-					
-					$p->fp('rows',$block,True);
-
-				}
-				
-			}
-			else {
-				$p->set_var("lang_no_results",lang("no results found"));
-				$p->parse("rows","no_contacts");
-			}
-			return $p->fp('out','rows_contacts');
-		}
-
-		/**
-		 * Show details from contact selected
-		 * 
-		 * @param $id int
-		 * @param $catalog String
-		 * @return $contact
-		 */
-		function contact_view($params) {
-
-			if ( empty($params['id']) || empty($params['catalog']) ){
-				header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.init_cc');
-			}
-			
-			$this->template->set_file(
-				Array(
-					'cc_v' => 'contact_view.tpl'
-				)
-			);
-
-			if ( isset($params['success'])){
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg(lang('contact save successfully'));
-			}
-
-			$this->template->set_block('cc_v','body');
-			$this->template->set_block('cc_v','people');
-			$this->template->set_block('cc_v','people_ldap');
-			$this->template->set_block('cc_v','group');
-			$this->template->set_block('cc_v','group_row');
-			$this->template->set_block('cc_v','buttom');
-			$this->template->set_block('cc_v','buttom_use_contact');
-			$this->template->set_block('cc_v','row_view_operacao');
-
-			$this->template->set_var('title_view_contact',lang("title view contact"));
-			$email_to = "";
-
-			switch ($params['catalog']){
-
-				case 'bo_shared_people_manager';
-				case 'bo_people_catalog':
-
-								$this->template->set_var('lang_contact_title',lang("context contact"));
-								$this->bo->set_catalog($params['catalog']);
-
-								$result = $this->bo->bo->get_single_entry($params['id'], array("given_names"=>true,"names_ordered"=>true,"alias"=>true,"family_names"=>true,"companies"=>true,"relations"=>true,"connections"=>true));
-
-								asort($result['connections']);
-
-								$this->template->set_var('photo', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_photo&id='.$params['id']);
-								$this->template->set_var('id',$params['id']);
-								$this->template->set_var('catalog',$params['catalog']);
-					
-								$this->template->set_var('cc_name',$result['names_ordered']);
-								$this->template->set_var('lang_title_alias',lang("Alias"));
-								$this->template->set_var('lang_alias',$result['alias']);
-								
-								$this->template->set_var('lang_title_name',lang("Name"));
-								$this->template->set_var('lang_name',$result['given_names']);
-								
-								$this->template->set_var('lang_title_lastname',lang("Family Names"));
-								$this->template->set_var('lang_lastname',$result['family_names']);
-								
-								$var_phone = "";
-								$var_email = "";
-								foreach($result['connections'] as $conn):
-									if ( $conn['id_type'] == 1 ){
-										if ( !empty($var_email) )
-											$var_email .= ' | ';
-										$var_email .= $conn['connection_value'];
-										
-										if ( empty($email_to) )
-											$email_to = $var_email;
-										
-									}else if ($conn['id_type'] == 2){
-										if ( !empty($var_phone))
-											$var_phone .= ' | ';
-										$var_phone .= $conn['connection_value'];
-									}
-
-									if (($conn['id_type'] == null) || ($conn['id_type'] == '_NONE_')){
-										if ( $conn['type'] == 'email' ){
-											if ( !empty($var_email) )
-												$var_email .= ' | ';
-											$var_email .= $conn['connection_value'];
-											
-											if ( empty($email_to) )
-												$email_to = $var_email;
-											
-										}else if ($conn['type'] == 'phone'){
-											if ( !empty($var_phone))
-												$var_phone .= ' | ';
-											$var_phone .= $conn['connection_value'];
-										}
-									}
-								endforeach;
-								
-								$this->template->set_var('lang_title_email',lang("Email"));
-								$this->template->set_var('lang_email',$var_email);
-								
-								$this->template->set_var('lang_title_phone',lang("Phone"));
-								$this->template->set_var('lang_phone',$var_phone);
-				
-								$this->template->set_var('lang_edit',lang("edit"));
-								
-								$this->template->parse("row_body","people");
-								
-								if ($params['catalog'] == 'bo_people_catalog')
-									$this->template->parse("buttom_editar","buttom");
-									
-							break;
-							
-				case 'bo_group_manager':
-								$this->template->set_var('lang_contact_title',lang("context group"));
-								$this->bo->set_catalog($params['catalog']);
-								$result = $this->bo->bo->get_single_entry($params['id'], array("id_group"=>true,"title"=>true,"short_name"=>true));
-								$data   = $this->bo->bo->get_contacts_by_group($params['id']);
-
-								$email_to = '<'.$result['short_name'].'>';
-								
-								$this->template->set_var('title_view_contact', $result['title']);
-								$this->template->set_var('email_to', $email_to);
-
-								$this->template->set_var('lang_title_name',lang("Name"));
-								$this->template->set_var('lang_title_email',lang("Email"));
-								
-								foreach($data as $dados){
-									$this->template->set_var('lang_name', $dados['names_ordered']);
-									$this->template->set_var('lang_email', $dados['connection_value']);
-									$this->template->set_var('bg',$bg=="bg-azul"?$bg="bg-branco":$bg="bg-azul");
-									
-									$this->template->set_var('href_details',"ui_mobilecc.contact_view&id=".$dados['id_contact']."&catalog=bo_people_catalog");
-									
-									$this->template->fp('group_rows','group_row',True);
-								}
-
-								$this->template->set_var('email_to', $email_to);
-								$this->template->parse("buttom_use","buttom_use_contact");
-								
-								$this->template->parse("row_body","group");
-							break;
-						
-				default:		
-
-								if(strpos($params['catalog'],'bo_global_ldap_catalog')==false){
-
-									$this->bo->set_catalog($params['catalog']);
-
-									$fields = $this->bo->bo->get_fields(true);
-									$result = $this->bo->bo->get_single_entry($params['id'], $fields);
-
-									$this->template->set_var('photo', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_photo&id='.$params["id"]);
-
-									$this->template->set_var('cc_name',$result['names_ordered'][0]);
-
-									$this->template->set_var('lang_title_name',lang("Name"));
-									$this->template->set_var('lang_name',$result['given_names'][0]);
-									
-									$this->template->set_var('lang_title_lastname',lang("Family Names"));
-									$this->template->set_var('lang_lastname',$result['family_names'][0]);
-									
-									$var_phone = "";
-									$var_email = "";
-									foreach($result['connections'] as $conn):
-										if ( $conn['id_type'] == 1 ){
-											if ( !empty($var_email) )
-												$var_email .= ' | ';
-											$var_email .= $conn['connection_value'];
-											
-											if ( empty($email_to) )
-												$email_to = $var_email;
-											
-										}else if ($conn['id_type'] == 2){
-											if ( !empty($var_phone))
-												$var_phone .= ' | ';
-											$var_phone .= $conn['connection_value'];
-										}
-
-										if (($conn['id_type'] == null) || ($conn['id_type'] == '_NONE_')){
-											if ( $conn['type'] == 'email' ){
-												if ( !empty($var_email) )
-													$var_email .= ' | ';
-												$var_email .= $conn['connection_value'];
-												
-												if ( empty($email_to) )
-													$email_to = $var_email;
-												
-											}else if ($conn['type'] == 'phone'){
-												if ( !empty($var_phone))
-													$var_phone .= ' | ';
-												$var_phone .= $conn['connection_value'];
-											}
-										}
-									endforeach;
-						
-									$this->template->set_var('email_to', $email_to);
-									
-									$this->template->set_var('lang_title_email',lang("Email"));
-									$this->template->set_var('lang_email',$var_email);
-									
-									$this->template->set_var('lang_title_phone',lang("Phone"));
-									$this->template->set_var('lang_phone',$var_phone);
-
-									$this->template->parse("row_body","people_ldap");
-
-								}else{
-									header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.init_cc');
-								}
-
-							break;
-			}
-
-			if ( !empty($email_to)){
-				$this->template->set_var('email_to', $email_to);
-				$this->template->parse("buttom_use","buttom_use_contact");
-				$this->template->parse("row_operacao","row_view_operacao");
-			}else if ($params['catalog'] == 'bo_people_catalog'){
-				$this->template->parse("row_operacao","row_view_operacao");
-			}
-
-			$this->template->set_var('lang_back',lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_use_contact',lang("use contact"));
-			$this->template->set_var('lang_selecteds',lang("selecteds"));
-
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out','body'));
-		}
-
-		/**
-		 * View Add/Edit contact
-		 * 
-		 * @param $id int
-		 * @param $catalog String
-		 * @return $contact
-		 */
-		function contact_add_edit($params) {
-
-			$this->template->set_file(
-				Array(
-					'cc_e' => 'contact_add_edit.tpl'
-				)
-			);
-
-			$this->template->set_block('cc_e','body');
-
-			$view = false;
-			if ( isset($params['erro'])){
-				$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params['erro']);
-				
-				$result['alias'] 			= $params['alias'];
-				$result['given_names'] 		= $params['given_names'];
-				$result['family_names'] 	= $params['family_names'];
-				$result['names_ordered']	= $params['names_ordered'];
-				$var_phone 					= $params['phone'];
-				$var_email 					= $params['email'];
-				$var_connection_email 		= $params['id_connection_email'];
-				$var_connection_phone 		= $params['id_connection_phone'];
-				$view = true;
-				
-			}
-
-			if ( empty($params['id']) ){
-				$title_contact = "title add contact";
-				$form_action = "index.php?menuaction=mobile.ui_mobilecc.contact_add";
-				$confirm = lang("confirm add");
-				$params['catalog'] = 'bo_people_catalog';
-			}else{
-				$title_contact = "title edit contact";
-				$form_action = "index.php?menuaction=mobile.ui_mobilecc.contact_edit";
-				$confirm = lang("confirm edit");
-				
-				$view = true;
-
-				if ( !isset($params['erro'])){
-					$this->bo->set_catalog($params['catalog']);
-					$result = $this->bo->bo->get_single_entry($params['id'], array("given_names"=>true,"names_ordered"=>true,"alias"=>true,"family_names"=>true,"companies"=>true,"relations"=>true,"connections"=>true));
-
-					$var_phone = "";
-					$var_email = "";
-					foreach($result['connections'] as $conn):
-						if ( $conn['id_type'] == 1 ){
-							if ( (empty($var_email)) && ($conn['connection_is_default']) ){
-								$var_email = $conn['connection_value'];
-								$var_connection_email = $conn['id_connection'];
-							}
-						}else if ($conn['id_type'] == 2){
-							if ( (empty($var_phone)) &&  ($conn['connection_is_default'])){
-								$var_phone = $conn['connection_value'];
-								$var_connection_phone = $conn['id_connection'];
-							}
-						}
-					endforeach;
-				}
-
-								
-			}
-			
-			if ($view){
-					$this->template->set_var('lang_alias',$result['alias']);
-					$this->template->set_var('lang_name',$result['given_names']);
-					$this->template->set_var('lang_lastname',$result['family_names']);
-					
-					$this->template->set_var('var_connection_email', $var_connection_email);
-					$this->template->set_var('lang_email',$var_email);
-					
-					$this->template->set_var('var_connection_phone', $var_connection_phone);
-					$this->template->set_var('lang_phone',$var_phone);
-
-			}
-			
-			$this->template->set_var('cc_name',$result['names_ordered']);
-			$this->template->set_var('lang_title_alias',lang("Alias"));
-			$this->template->set_var('lang_title_name',lang("Name"));
-			$this->template->set_var('lang_title_lastname',lang("Family Names"));
-			$this->template->set_var('lang_title_email',lang("Email"));
-			$this->template->set_var('lang_title_phone',lang("Phone"));
-
-			$this->template->set_var('catalog', $params['catalog']);
-				
-			$this->template->set_var('lang_title_add_edit',lang($title_contact));
-			$this->template->set_var('form_action', $form_action);
-			
-			$this->template->set_var('lang_contact_title',lang("context contact"));
-			$this->template->set_var('lang_back',lang("back"));
-			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_cancel',lang("cancel"));
-			$this->template->set_var('lang_confirm', $confirm);
-			$this->template->set_var('lang_selecteds',lang("selecteds"));
-			$this->template->set_var('id',$params['id']);
-			
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out','body'));
-		}
-		
-		/**
-		 * Add contact
-		 * 
-		 * @param $id int
-		 * @param $catalog String
-		 * @return $contact
-		 */
-		function contact_add($params) {
-			
-			$data['alias'] = $params['alias'];
-			$data['given_names'] = $params['given_names'];
-			$data['family_names'] = $params['family_names'];
-			$data['names_ordered'] = $data['given_names'] . ' ' . $data['family_names'];
-			$data['is_quick_add'] = true;
-
-			$answer = $this->verifyData($params);
-			
-			if (!empty($answer)){
-				$retorno = 'alias='.$data['alias'] . '&given_names='.$data['given_names'] . '&family_names='.$data['family_names'] . '&names_ordered='.$data['given_names'] . ' ' . $data['family_names'];
-				$retorno .= '&id_connection_email='.$params['id_connection_email'] . '&id_connection_phone='.$params['id_connection_phone'];
-				$retorno .= '&email='.$params['email'] . '&phone='.$params['phone'];
-				header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_add_edit&erro='.$answer.'&'.$retorno);
-			}
-			else
-			{
-				$this->bo->set_catalog($params['catalog']);
-	
-				if ( !empty($params['email']) ){
-					$data['connections']['default_email']['connection_value'] = $params['email'];
-				}
-				
-				if ( !empty($params['phone']) ){
-					$data['connections']['default_phone']['connection_value'] = $params['phone'];
-				}
-	
-				$this->bo->set_catalog($params['catalog']);
-				$contact_id = $this->bo->bo->quick_add($data);
-	
-				header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_view&id='.$contact_id.'&catalog='.$params['catalog'] . '&success=1');
-			}
-		}
-
-		/**
-		 * Edit contact
-		 * 
-		 * @param $id int
-		 * @param $catalog String
-		 * @return $contact
-		 */
-		function contact_edit($params) {
-			
-			$data['alias'] = $params['alias'];
-			$data['given_names'] = $params['given_names'];
-			$data['family_names'] = $params['family_names'];
-			$data['names_ordered'] = $data['given_names'] . ' ' . $data['family_names'];
-			
-			$cont = 0;
-
-			$answer = $this->verifyData($params);
-
-			if (!empty($answer)){
-				$retorno = '&catalog=' . $params['catalog'] . '&id='. $params['id'] .'&alias='.$data['alias'] . '&given_names='.$data['given_names'] . '&family_names='.$data['family_names'] . '&names_ordered='.$data['given_names'] . ' ' . $data['family_names'];
-				$retorno .= '&id_connection_email='.$params['id_connection_email'] . '&id_connection_phone='.$params['id_connection_phone'];
-				$retorno .= '&email='.$params['email'] . '&phone='.$params['phone'];
-				header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_add_edit&erro='.$answer.'&'.$retorno);
-			}
-			else
-			{
-
-				$this->bo->set_catalog($params['catalog']);
-				$types = $this->bo->bo->get_all_connections_types();
-	
-				if ( !empty($params['email']) || !empty($params['id_connection_email']) ){
-					$cont++;
-				
-					if (empty($params['id_connection_email'])){
-						$data['connections']['connection' . $cont]['connection_is_default'] = true;
-						$data['connections']['connection' . $cont]['connection_name'] = $types[1];
-					}
-	
-					$data['connections']['connection' . $cont]['id_connection'] = $params['id_connection_email'];
-					$data['connections']['connection' . $cont]['id_typeof_connection'] = 1;
-					$data['connections']['connection' . $cont]['connection_value'] = $params['email'];
-	
-				}
-	
-				if ( !empty($params['phone']) || !empty($params['id_connection_phone']) ){
-					$cont++;
-	
-					if (empty($params['id_connection_phone'])){
-						$data['connections']['connection' . $cont]['connection_is_default'] = true;
-						$data['connections']['connection' . $cont]['connection_name'] = $types[2];
-					}
-	
-					$data['connections']['connection' . $cont]['id_connection'] = $params['id_connection_phone'];
-					$data['connections']['connection' . $cont]['id_typeof_connection'] = 2;
-					$data['connections']['connection' . $cont]['connection_value'] = $params['phone'];
-	
-				}
-	
-				$contact_id = $this->bo->bo->update_single_info($params['id'], $data);
-
-				header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_view&id='.$contact_id.'&catalog='.$params['catalog'].'&success=1');
-				
-			}
-			
-		}
-
-		/**
-		 * Validate data when register contact
-		 * Validate E-mail, Phone and Name(NotEmpty)
-		 * 
-		 * @param $data Array
-		 * @return Boolean
-		 */
-		static function verifyData($data){ 
-
-			$valid = '';
-			$field = false;
-
-			// Verify if phone is valid
-			if ( !empty($data['phone']) && empty($valid) ){
-				
-				$field = true;
-				
-				$pattern = "#^(?:(?:\(?\+?(?P<country>\d{2,4})\)?\s*)?\(?(?P<city>\d{2,3})\)?\s*)?(?P<n1>\d{3,4})[-\s.]?(?P<n2>\d{4})$#";
-
-				if (!preg_match($pattern, $data['phone'])){
-					$valid = lang('invalid field phone');
-				}
-
-			}
-
-			// Verify if e-mail is valid
-			if ( !empty($data['email']) ){
-
-				$field = true;
-				
-				$pattern = "^[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\-]+\.[a-z]{2,4}$";
-
-				if (!eregi($pattern, $data['email'])){
-					$valid = lang('invalid field e-mail');
-				}
-
-			}
-
-			// Verify if exist e-mail or phone
-			if (!$field)
-				$valid = lang('Tel or email is required');
-			
-			// Verify if name is empty
-			if ( empty($data['given_names']) )
-				$valid = lang('Name is mandatory');
-			
-			return $valid;
-			
-		}
-
-		
-	}
-	
-	
-?>
Index: branches/2.2.0.1/mobile/templates/default/form_button_script.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/form_button_script.tpl	(revision 588)
+++ 	(revision )
@@ -1,12 +1,0 @@
-
-<!-- BEGIN form_button -->
-<nobr>
-<form action="{action_url_button}" method="post" name="{action_text_button}form">
-<div style="padding-top:15px; padding-right: 2px">
-	{action_extra_field} 
-	<input style="font-size:10px" type="submit" value="{action_text_button}" {action_confirm_button}>
-</div>
-</form>
-</nobr>
-
-<!-- END form_button -->
Index: branches/2.2.0.1/mobile/templates/default/contact_view.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/contact_view.tpl	(revision 3829)
+++ 	(revision )
@@ -1,110 +1,0 @@
-<!-- BEGIN body -->
-
-<div class="menu-contexto">
-	<span><a href="{href_back}">{lang_back}</a></span><span class="titulo-secao">{lang_contact_title}</span>
-</div>
-
-<dt class="menu-diverso">
-    <strong id="editando">{title_view_contact}</strong>
-</dt>
-
-{row_body}
-
-<div class="menu-contexto"></div>
-
-{row_operacao}
-
-<form name="formedit" action="../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_add_edit" method="post">
-	<input type="hidden" name="id" value="{id}">
-	<input type="hidden" name="catalog" value="{catalog}">
-</form>
-<!-- END body -->
-
-<!-- BEGIN row_view_operacao -->
-<div id="operacao_lista">
-	{lang_selecteds}:
-	{buttom_use}
-	{buttom_editar}
-</div>
-<!-- END row_view_operacao -->
-
-<!-- BEGIN buttom_use_contact -->
-<button id="remover" class="btn-generico" onclick="location.href=('../mobile/index.php?menuaction=mobile.ui_mobilemail.new_msg&type=from_mobilecc&input_to={email_to}')" >{lang_use_contact}</button>
-<!-- END buttom_use_contact -->
-
-<!-- BEGIN buttom -->
-<button id="adicionar_contato" class="btn-generico" onclick="javascript:document.formedit.submit();">{lang_edit}</button>
-<!-- END buttom -->
-
-<!-- BEGIN people -->
-<div id="corpo_mensagem"  class="contato-unico-bg" >
-    <div class="contato-unico" >
-		<div id="foto"><img src="{photo}" height="70" width="52"></div>
-		<div class="bloco">
-		    <div class="container">
-		        <div id="block-label">{lang_title_name}:</div>
-		        <div id="block-dados">{cc_name}</div>
-		    </div>
-		    
-		    <div class="container">
-		        <div id="block-label">{lang_title_alias}:</div>
-		        <div id="block-dados">{lang_alias}</div>
-		    </div>						
-		
-		    <div class="container">
-		        <div id="block-label">{lang_title_email}:</div>
-		        <div id="block-dados">{lang_email}</div>
-		    </div>
-		    
-		    <div class="container">
-		        <div id="block-label">{lang_title_phone}:</div>
-		        <div id="block-dados">{lang_phone}</div>
-		    </div>
-
-		</div>
-	</div>
-</div>
-<!-- END people -->
-
-<!-- BEGIN people_ldap -->
-<div id="corpo_mensagem"  class="contato-unico-bg" >
-    <div class="contato-unico" >
-		<div id="foto"><img src="{photo}" height="70" width="52"></div>
-		<div class="bloco">
-		    <div class="container">
-		        <div id="block-label">{lang_title_name}:</div>
-		        <div id="block-dados">{cc_name}</div>
-		    </div>
-
-		    <div class="container">
-		        <div id="block-label">{lang_title_email}:</div>
-		        <div id="block-dados">{lang_email}</div>
-		    </div>
-		    
-		    <div class="container">
-		        <div id="block-label">{lang_title_phone}:</div>
-		        <div id="block-dados">{lang_phone}</div>
-		    </div>
-
-		</div>
-	</div>
-</div>
-<!-- END people_ldap -->
-
-<!-- BEGIN group -->
-{group_rows}
-<!-- END group -->
-
-<!-- BEGIN group_row -->
-<div id="lista_miolo">
-<div class="email-geral {bg}">
-	<div class="email-cabecalho">
-		<p class="email-margin">{lang_name}</p>
-	</div>
-	<span class="btn-anexo"><a href="index.php?menuaction=mobile.{href_details}">DETALHES</a></span>
-		<div class="email-corpo">
-			<p class="email-margin">{lang_email}</p>
-		</div>
-</div>
-</div>
-<!-- END group_row -->
Index: branches/2.2.0.1/mobile/templates/default/edit.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/edit.tpl	(revision 588)
+++ 	(revision )
@@ -1,64 +1,0 @@
-<!-- BEGIN edit_entry -->
-<style type="text/css">
-div#tipDiv {
-  position:absolute; visibility:hidden; left:0; top:0; z-index:10000;
-  background-color:#EFEFEF; border:1px solid #337;
-  width:220px; padding:3px;
-  color:#000; font-size:11px; line-height:1.2;
-  cursor: default;
-}
-</style>
-<script language="JavaScript">
-	self.name="first_Window";
-	function accounts_popup()
-	{
-		Window1=window.open('{accounts_link}',"Search","width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes");
-	}
-</script>
-<center>
-<font color="#000000" face="{font}">
-
-<form action="{action_url}" method="post" name="app_form">
-{common_hidden}
-<table border="0" width="100%">
- <tr>
-  <td colspan="2">
-   <center><font size="+1"><b>{errormsg}</b></font></center>
-  </td>
- </tr>
-{row}
-<tr>
-<td colspan="2">
-{row_owner}
-</td>
-</tr>
- <tr>
-  <td>
-  <table><tr valign="top">
-  <td>
-  <div style="padding-top:15px; padding-right: 2px">
-  	<input style="font-size:10px" type="submit" value="{submit_button}"></div></form>
-  </td>
-  <td>{cancel_button}</td>
-  </tr></table>
-  </td>
-  <td align="right">{delete_button}</td>
- </tr>
-</table>
-</font>
-<a href="index.php?menuaction=mobile.ui_mobilecalendar.add_participants">{lang_add_participants}</a>
-</center>
-<!-- END edit_entry -->
-<!-- BEGIN list -->
- <tr bgcolor="{tr_color}">
-  <td valign="top" width="40%">&nbsp;<font size='1'><b>{field}:</b></font></td>
-  <td valign="top" width="60%">{data}</td>
- </tr>
-<!-- END list -->
-<!-- BEGIN hr -->
- <tr bgcolor="{tr_color}">
-  <td colspan="2">
-   {hr_text}
-  </td>
- </tr>
-<!-- END hr -->
Index: branches/2.2.0.1/mobile/templates/default/search_bar.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/search_bar.tpl	(revision 3734)
+++ 	(revision )
@@ -1,10 +1,0 @@
-<!-- BEGIN search_bar -->
-	<div id="busca">
-		<table>
-			<tr>
-				<td class="gd"><input type="text" name="name" id="search_name" ></td>
-    		<td class="pq"><button name="search_message" class="btn-generico" type="submit">buscar</button></td>
-  		</tr>
-  	</table>
-	</div>		
-<!-- END search_bar -->
Index: branches/2.2.0.1/mobile/templates/default/cc_main.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/cc_main.tpl	(revision 3829)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<!-- BEGIN main_body -->
-		<div class="menu-contexto">
-			<form id="form_catalog" action="index.php?menuaction=mobile.ui_mobilecc.change_catalog" method="post">
-				<span><a name="voltar" href="{href_back}">{lang_back}</a></span><span class="titulo-secao">{lang_contacts}</span>
-				<select name="catalog" onChange="document.getElementById('form_catalog').submit();">
-					{catalogs}
-				</select>
-			</form>
-		</div>
-		
-		<form id="form_busca" action="index.php" method="post">
-		<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-		<input type="hidden" name="catalog_to_search" value="{actual_catalog}">
-		<input type="hidden" name="contacts_request_from" value="{contacts_request_from}">
-		{search}
-		</form>
-		
-
-		<dl id="lista_miolo">
-			
-			<dt class="menu-diverso">
-			<div class="margin-geral centraliza">	
-			<a href="{href_back}" style="display:{show_back};"> < </a>
-			{pagging_letters}
-			<a href="{href_next}" class="btn_off" style="display:{show_next};"> > </a>
-			</div>
-			
-			</dt>
-			<form method="post" action="index.php" id="formu_contacts">
-			<input type="hidden" id="menuaction" name="menuaction" value="mobile.ui_mobilecc.delete_contacts">
-			<input type="hidden" id="catalog" name="catalog" value="{actual_catalog}">
-			{contacts}
-			</form>
-				
-				
-		</dl>
-
-		<div class="menu-contexto centraliza" style="display:{show_more};">
-			<button name="more_messages" title="{lang_more_messages}" class="btn-contexto" onClick="location.href='index.php?menuaction=mobile.ui_mobilecc.change_max_results&results={next_max_results}'">{lang_more} 10 {lang_contacts}</button>
-		</div>
-		
-		<div id="operacao_lista" style="display:{show_actions};">
- 	        <div class="margin-rodape">
-                {selecteds}:
-            	<button id="remover" class="btn-generico" onClick="document.getElementById('menuaction').value='mobile.ui_mobilecc.delete_contacts';document.getElementById('formu_contacts').submit();">remover</button>
-				<button id="adicionar_contato" onClick="location.href=('../mobile/index.php?menuaction=mobile.ui_mobilecc.contact_add_edit')" class="btn-generico" style="display:{show_add_button};">adicionar contato</button>
-            </div>
-		</div>
-		
-		
-<!-- END main_body -->	
-		
-<!-- BEGIN catalog_row -->
- <option value='{catalog_value}' {selected}>{catalog_name}</option>
-<!-- END catalog_row -->
-
-<!-- BEGIN pagging_block -->
-	
-<a href="{href}" class="{class_button}"> {letter} </a>
-	
-<!-- END pagging_block -->
Index: branches/2.2.0.1/mobile/templates/default/pc_template.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/pc_template.tpl	(revision 3814)
+++ 	(revision )
@@ -1,114 +1,0 @@
-<!-- BEGIN mobile_home -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<title>{global_title}</title>
-		<meta content="text/html; width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8" http-equiv="Content-Type" name="viewport" />
-		<meta name="format-detection" content="telephone=no" />
-		<link href="templates/css/desktop.css" type="text/css" rel="StyleSheet" />
-		<!--[if lte IE 6]>
-			<link href="templates/css/ie6.css" type="text/css" rel="StyleSheet">
-		<![endif]-->
-		
-		<script type="text/javascript">
-			function validate_desktop_search() {
-				var default_folders = document.getElementById("hidden_default_folders");
-				var personal_folders = document.getElementById("hidden_personal_folders");
-				var calendar_search = document.getElementById("hidden_calendar_search");
-				var contacts_search = document.getElementById("hidden_contacts_search");
-				
-				//pegando os valores do checkbox e injetando dentro do formulário
-				default_folders.value = (document.getElementById("search_default_folders").checked) ? "1" : ""; 
-				personal_folders.value = (document.getElementById("search_personal_folders").checked) ? "1" : ""; 
-				calendar_search.value = (document.getElementById("search_calendar_search").checked) ? "1" : ""; 
-				contacts_search.value = (document.getElementById("search_contacts_search").checked) ? "1" : "";
-
-				var error_message = "";
-
-				//verificando se vai ser possível realizar a consulta
- 				if(default_folders.value == "" && personal_folders.value == "" && calendar_search.value == "" && contacts_search.value == "") {
-					error_message = "<p>{lang_search_error_message}</p>";
-				}
-				
-				search_name = document.getElementById("search_name");
-				
-				if( search_name.value == "" || search_name.value.length < 5 ) {
-					error_message += "<p>{lang_search_error_message_four_digits}</p>";
-				}
-				
-				if(error_message != "") {
-					show_error_message(error_message);
-					return false;
-				} else {
-					return true;
-				}
-			}
-			
-			function show_error_message(message) {
-				if( document.getElementById("box_aviso_negativo") ) {
-					document.getElementById("box_aviso_negativo").innerHTML = '<div class="aviso-negativo"><strong>'+message+'</strong></div>';
-				} else { 
-					var targetElement = document.getElementById("topo_box");
-					var newElement = document.createElement('div');
-					newElement.className = "bg-neutro";
-					newElement.id = "box_aviso_negativo";
-					newElement.innerHTML = '<div class="aviso-negativo"><strong>'+message+'</strong></div>';
-
-					var parent = document.getElementById("topo_box").parentNode;
-
-					if(parent.lastchild == targetElement) {
-						parent.appendChild(newElement);
-					} else {
-						parent.insertBefore(newElement, targetElement.nextSibling);
-					}
-				}
-			}
-		
-		</script>
-		
-	</head>
-	<body>
-		<div id="global">
-			<div id="topo_box" class="topo">
-				<h1>{global_title}</h1>
-				<span><a href="{href_logout}">{lang_logout}</a></span>
-			</div>
-			
-			{message_box}
-			
-			<form method="post" action="index.php?menuaction=mobile.ui_home.search" id="form_busca" onsubmit="return validate_desktop_search()">
-				<input type="hidden" name="default_folders" id="hidden_default_folders" value=''/>
-				<input type="hidden" name="personal_folders" id="hidden_personal_folders" value=''/>
-				<input type="hidden" name="calendar_search" id="hidden_calendar_search" value=''/>
-				<input type="hidden" name="contacts_search" id="hidden_contacts_search" value=''/>
-				{search}
-			</form>
-			<div id="navegacao">
-				{home}
-			</div><!-- INÍCIO CONTEÚDO -->
-			<div id="conteudo">
-				{content}
-			</div>
-		</div>
-		<div class="rodape">
-			<p>Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</p>
-			<p><a href="index.php?menuaction=mobile.ui_home.change_template&template=mini_mobile">{lang_mini_mobile}</a></p>
-		</div>
-	</body>
-</html>
-<!-- END mobile_home -->
-<!-- BEGIN success_message -->
-<div class="bg-neutro" id="box_aviso_positivo">
-	<div class="aviso-positivo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END success_message -->
-<!-- BEGIN error_message -->
-<div class="bg-neutro" id="box_aviso_negativo">
-	<div class="aviso-negativo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END error_message -->
Index: branches/2.2.0.1/mobile/templates/default/folders.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/folders.tpl	(revision 1715)
+++ 	(revision )
@@ -1,3 +1,0 @@
-<!-- BEGIN retorno -->
-<p>&nbsp;&nbsp;&nbsp;{folders_list}</p>
-<!-- END retorno -->
Index: branches/2.2.0.1/mobile/templates/default/new_msg.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/new_msg.tpl	(revision 3935)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<!-- BEGIN page -->
-
-<script type="text/javascript">
-
-function mobile_add_contact(_add_to) {
-	document.getElementById("menuaction").value = "mobile.ui_mobilemail.init_schedule";
-	document.getElementById('add_to').value = _add_to;
-	
-	document.getElementById('mail_form').submit();
-}
-
-function add_file() {
-	var anexo_box = document.getElementById("anexo_box");
-	var anexo_element = document.createElement("div");
-	anexo_box.innerHTML += "<input name=\"FILES[]\" type=\"file\">";
-}
-
-</script>
-	
-<div class="menu-contexto">
-	<span><a href="{href_back}">{lang_back}</a></span> <span class="titulo-secao">{action_msg}</span>
-</div>
-
-<form method="POST" action="index.php" enctype="multipart/form-data" id="mail_form">
-	<input type="hidden" id="menuaction" name="menuaction" value="mobile.ui_mobilemail.send_mail">
-	<input type="hidden" id="reply_from" name="reply_from" value='{from}' />
-	<input type="hidden" id="reply_msg_number" name="reply_msg_number" value='{msg_number}' />
-	<input type="hidden" id="folder" name="folder" value='{msg_folder}' />
-	<input type="hidden" name="type" value='{type}' />
-	<input type="hidden" name="add_to" id="add_to" value='' />
-	
-	<div id="div_campos" style="background:#D4E7F0;">
-		<div class="campos-email">
-			<a href="javascript:mobile_add_contact('to');" class="email-campos">{lang_to}:</a> 
-			<input id="input_to" name="input_to" value='{input_to}' "{read_only}" />
-		</div>
-		<div class="campos-email">
-			<a href="javascript:mobile_add_contact('cc');" class="email-campos">{lang_cc}:</a>
-			<input id="input_cc" name="input_cc" value='{input_cc}' "{read_only}" />
-		</div>
-		<div class="campos-email">
-			<span class="assunto">{lang_subject}:</span> 
-			<input id="input_subject" name="input_subject" value='{subject}' />
-		</div>
-		<div class="campos-email" >
-			<div style="display:{show_forward_attachment};">
-				<span class="assunto">{lang_forward_attachment}:</span>
-				{forwarding_attachments}
-			</div>
-			<div id="anexo_box">
-				<span class="assunto">{lang_attachment}: <a href="javascript:add_file();" style="float:none;">({lang_more_attachment})</a> </span>
-				<input name="FILES[]" type="file">
-			</div>
-	</div>
-				
-	<div id="corpo_mensagem" class="limpar_div" style="background:#EFF8FB; display:table; width:100%" >
-		<div id="text_area"><textarea id="body" wrap="virtual" name="body" cols="5" rows="5">{body_value}</textarea></div>
-		<div class="limpar_div">&nbsp;<input type="checkbox" name="check_important" {check_important} />{lang_mark_as_important}</div>
-		<div class="limpar_div">&nbsp;<input type="checkbox" name="check_read_confirmation" {check_read_confirmation} />{lang_read_confirmation}</div>
-		<div class="limpar_div" style="display:{show_check_add_history}">&nbsp;<input type="checkbox" name="check_add_history" {check_add_history} />{lang_add_history}</div>
-	</div>
-	
-	<div id="operacao_lista">
-		<div class="margin-rodape">
-			<button onclick="location.href='{href_back}'" id="cancel" class="btn-generico" >{lang_cancel}</button>
-			<button id="save_draft" class="btn-generico" onclick="document.getElementById('mail_form').action='index.php?menuaction=mobile.ui_mobilemail.save_draft';document.getElementById('mail_form').submit()" >{lang_save_draft}</button>
-			<button name="action" id="reply_send" class="btn-generico" onclick="document.getElementById('mail_form').submit()">{lang_send}</button>
-		</div>	
-	</div>
-
-</form>
-<!-- END page -->
-
-<!-- BEGIN forward_attach_block -->
-	<p><input type="checkbox" name="forward_attachments[]" value="{value_forward_attach}" checked/>{label_forward_attach}</p>
-<!-- END forward_attach_block -->
Index: branches/2.2.0.1/mobile/templates/default/events_list.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/events_list.tpl	(revision 3574)
+++ 	(revision )
@@ -1,12 +1,0 @@
-<!-- BEGIN rows_events -->
-{rows}
-<!-- END rows_events -->
-<!-- BEGIN row_events -->
-				<dt class="titulo_mensagem {bg}">
-					<input type="checkbox">{date} - {title}
-				</dt>
-					
-				<dd class="dd-mensagem par">
-					<p>{description}</p>
-				</dd>					
-<!-- END row_events -->
Index: branches/2.2.0.1/mobile/templates/default/mails_list.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/mails_list.tpl	(revision 3974)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<!-- BEGIN rows_mails -->
-{rows}
-<!-- END rows_mails -->
-<!-- BEGIN row_mails -->
-
-			 <div class="{bg}">
-                    <div class="email-cabecalho margin-geral">
-                         <p class="{flag}">
-                         	<input type="checkbox" name="msgs[]" style="display:{show_check};" value={msg_number}>
-                         	<a href="index.php?menuaction=mobile.ui_mobilemail.show_msg&msg_number={msg_number}&msg_folder={msg_folder}">
-                         		{subject}
-                         	</a>
-                         </p>
-                    </div>
-                    <span class="email-data"><img src="{url_images}/anexo.png" align="left" style='display:{show_attach};'/>{mail_time}</span>
-                    <div class="{details}">
-                         <a href="index.php?menuaction=mobile.ui_mobilemail.show_msg&msg_number={msg_number}&msg_folder={msg_folder}">                    
-	                         <p>{from}</p>
-	                         <p>{mail_from}</p>
-                         </a>	                         
-                     </div>
-   			 </div>
-
-
-<!-- END row_mails -->
-<!-- BEGIN no_messages -->
-	<dt class="titulo_mensagem reset-dt">
-					{lang_no_results}
-	</dt>
-<!-- END no_messages -->
Index: branches/2.2.0.1/mobile/templates/default/preferences.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/preferences.tpl	(revision 691)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<form method="POST" action="{form_action}">
-<div id="cc_pref_cards" style="width: 100%; border: 0px solid black">
-	<table align="center" style="width: 400px">
-		<tr class="th">
-			<td style="text-align: center; font-weight: bold">{lang_Option}</td>
-			<td style="text-align: center; font-weight: bold">{lang_Value}</td>
-		</tr>
-		<tr class="row_off">
-			<td width="70%">{lang_download_attachs}</td>
-			<td>
-				<select name="download_attach" style="width: 100px">
-				<option {download_attach_option_No_selected} value="0">{lang_No}</option>
-				<option {download_attach_option_Yes_selected} value="1">{lang_Yes}</option>
-				</select>
-			</td>
-		</tr>
-		<tr class="row_on">
-			<td width="70%">{lang_What_is_the_maximum_number_of_messages_per_page?}</td>
-			<td>
-				<select name="max_message_per_page" style="width: 100px">
-				<option {max_message_per_page_5_selected} value="5">5</option>
-				<option {max_message_per_page_10_selected} value="10">10</option>
-				<option {max_message_per_page_15_selected} value="15">15</option>
-				</select>
-			</td>
-		</tr>
-				<tr>
-			<td></td>
-			<td style="text-align: right;">
-				<input type="submit" name="save" value="{lang_Save}">
-				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
-			</td>
-		</tr>
-	</table>
-	<br>
-</div>
-</form>
Index: branches/2.2.0.1/mobile/templates/default/body_email.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/body_email.tpl	(revision 670)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Language" content="en" />
-<meta name="GENERATOR" content="PHPEclipse 1.0" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>title</title>
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
-<!-- BEGIN list -->
-<b><p align='left'>{subject}</p></b>
-<br>
-<table border='0' cellpadding='0' cellspacing='0' width='100%'>
-<tr><td width='30%' valign='top'><b>{var1} ::</b></td><td>{vardata1}</td></tr>	
-<tr><td width='30%' valign='top'><b>{var2} ::</b></td><td>{vardata2}</td></tr>
-<tr><td width='30%' valign='top'><b>{var3} ::</b></td><td>{vardata3}</td></tr>
-<tr><td width='30%' valign='top'><b>{var4} ::</b></td><td>{vardata4}</td></tr>
-<tr><td width='25%' valign='top'><b>{var8} ::</b></td><td>{vardata8}</td></tr>
-<tr><td width='25%' valign='top'><b>{var5} ::</b></td><td>{vardata6}</td></tr>
-</table>
-<br>
-<hr size='1' width='100%'>
-<table border='0' cellpadding='4' cellspacing='4' width='100%'>
-<tr>
-<td width='2%' align='left'>{varbuttom}</td>
-<td width='2%' align='left' valign='top'>{varbuttom1}</td>
-<td width='2%' align='left' valign='top'>{varbuttom2}</td>
-<td width='2%' align='left' valign='top'>{varbuttom3}</td>
-<td width='92%' align='left' valign='top'>{varbuttom4}</td>
-</tr>
-</table>
-<!-- END list -->
-</body>
-</html>
Index: branches/2.2.0.1/mobile/templates/default/login.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/login.tpl	(revision 3992)
+++ 	(revision )
@@ -1,66 +1,0 @@
-<!-- BEGIN page -->
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>   
-		<title>{website_title} - {lang_login}</title>
-		<meta content="text/html;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8;" http-equiv="Content-Type" name="viewport" /> 
-		<meta name="format-detection" content="telephone=no" />
-		<link href="templates/css/mobile.css" type="text/css" rel="StyleSheet" />
-
-		<script type="text/javascript">
-
-			function validate_login() {
-				document.getElementById("max_resolution").value = ((screen.width >= screen.height) ? screen.width : screen.height);
-				
-				return true;
-			}
-
-		</script>
-	</head>
-	
-	<body>    	
-		<div class="topo">
-        	<h1>{website_title} - {lang_login}</h1>
-		</div>
-
-		{message_box}		
-		
-		<form name="form_login" method="post" action="./login.php" id="login_form" onSubmit="return validate_login()">
-			<input type="hidden" name="max_resolution" id="max_resolution" value="">
-			<input type="hidden" name="passwd_type" value="text">
-			<input type="hidden" name="account type" value="u">
-			<dt id="lista_miolo">
-				<div class="login">
-					<strong>{lang_username}:</strong><br/>
-					<input name="login" id="login" value="alexandrecorreia"/><br/>
-					<strong>{lang_password}:</strong><br/>
-					<input name="passwd" type="password" autocomplete=off/><br/>
-					<button name="submitit" class="btn-contexto" style="margin-top:5px" type="submit">{lang_login}</button>
-				</div>
-			</dt>
-		</form>
-
-		<div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</div>
-	</body>
-</html>
-
-<script type="text/javascript">
-	document.getElementById('login').focus();
-</script>
-
-<!-- END page -->
-<!-- BEGIN success_message -->
-<div class="bg-neutro">
-	<div class="aviso-positivo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END success_message -->
-<!-- BEGIN error_message -->
-<div class="bg-neutro">
-	<div class="aviso-negativo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END error_message -->
Index: branches/2.2.0.1/mobile/templates/default/contact_add_edit.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/contact_add_edit.tpl	(revision 3829)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<!-- BEGIN body -->
-
-<div class="menu-contexto">
-	<span><a href="{href_back}">{lang_back}</a></span><span class="titulo-secao">{lang_contact_title}</span>
-</div>
-
-<dt class="menu-diverso">
-    <strong id="editando">{lang_title_add_edit}</strong>
-</dt>
-
-<form name="formcontact" method="post" action="{form_action}">
-<input type="hidden" name="id" value="{id}">
-<input type="hidden" name="catalog" value="{catalog}">
-<input type="hidden" name="id_connection_email" value="{var_connection_email}">
-<input type="hidden" name="id_connection_phone" value="{var_connection_phone}">
-
-<div id="campos-correspondencia">
-	<div class="posiciona-esquerda" style="width:99%; padding:0;">
-        <div class="limpar_div_margin"><label class="email-labels"><a href="#"><strong>{lang_title_alias}:</strong> </a></label> <input type="text" name="alias" value="{lang_alias}" />  </div>
-        <div class="limpar_div_margin"><label class="email-labels"><a href="#"><strong>{lang_title_name}:</strong> </a></label> <input type="text" name="given_names" value="{lang_name}" />  </div>
-        <div class="limpar_div_margin"><label class="email-labels"><a href="#"><strong>{lang_title_lastname}:</strong> </a></label> <input type="text" name="family_names" value="{lang_lastname}" />  </div>
-        <div class="limpar_div_margin"><label class="email-labels"><a href="#"><strong>{lang_title_email}:</strong> </a></label> <input type="text" name="email" value="{lang_email}" /> </div>
-        <div class="limpar_div_margin"><label class="email-labels"><a href="#"><strong>{lang_title_phone}:</strong> </a></label> <input type="text" name="phone" value="{lang_phone}" /></div>
-	</div>
-</div>
-
-</form>
-
-<div class="menu-contexto"></div>
-
-<div id="operacao_lista">
-	{lang_selecteds}:
-	<button id="cancelar" class="btn-generico" onclick="javascript:history.back()" >{lang_cancel}</button>
-	<button id="confirmar_edicao" class="btn-generico" onclick="javascript:document.formcontact.submit();">{lang_confirm}</button>
-</div>
-
-<!-- END body -->
-
Index: branches/2.2.0.1/mobile/templates/default/delete_msg.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/delete_msg.tpl	(revision 1453)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<!-- BEGIN retorno -->
-<p>&nbsp;&nbsp;&nbsp;{lang_delete_msg}</p>
-<p>&nbsp;&nbsp;&nbsp;<a href="{link_yes}">{lang_yes}</a>&nbsp;&nbsp;&nbsp;<a href="{link_no}">{lang_no}</a></p>
-<!-- END retorno -->
Index: branches/2.2.0.1/mobile/templates/default/overlap.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/overlap.tpl	(revision 588)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<!-- BEGIN overlap -->
-<center><br />
-<table id="calendar_overlap_table">
-	<tr>
-		<td>
-			{overlap_text}
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<ul>{overlap_list}</ul>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<table id="calendar_overlap_table2" cellspacing="5">
-				<tr>
-					<td>
-						{resubmit_button}
-					</td>
-					<td>
-						{reedit_button}
-					</td>
-				</tr>
-			</table>
-		</td>
-	</tr>
-</table>
-</center>
-<!-- END overlap -->
Index: branches/2.2.0.1/mobile/templates/default/contacts_list.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/contacts_list.tpl	(revision 3710)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<!-- BEGIN rows_contacts -->
-{rows}
-<!-- END rows_contacts -->
-<!-- BEGIN row_contacts -->
-
-            <div class="email-geral {bg}">
-                <div class="contato-cabecalho margin-geral" >
-                     <p><input type="checkbox" name="contacts[]" style="display:{show_check};" value="{contact_id}"> {contact_name}</p>
-                </div>
-                <span class="btn-anexo"><a href="index.php?menuaction=mobile.{href_details}">{lang_see_details}</a></span>
-                <div class="{details}">
-                    <p>{email}</p>
-                    <p style="display:{show_tel};"><span>{lang_tel}:</span>{tel}</p>
-                 </div>
-   			 </div>
-				
-<!-- END row_contacts -->
-<!-- BEGIN row_groups -->
-	<dt class="titulo_mensagem {bg}">
-		<div class="contato-cabecalho margin-geral" >
-             <p><input type="checkbox" name="contacts[]" style="display:{show_check};" value="{group_id}"> {group_name}</p>
-        </div>
-        <span class="btn-anexo"><a href="index.php?menuaction=mobile.{href_details}">{lang_see_details}</a></span>
-	</dt>
-<!-- END row_groups -->
-<!-- BEGIN no_contacts -->
-	<dt class="titulo_mensagem reset-dt">
-					{lang_no_results}
-	</dt>
-<!-- END no_contacts -->
Index: branches/2.2.0.1/mobile/templates/default/calendar.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/calendar.tpl	(revision 3926)
+++ 	(revision )
@@ -1,103 +1,0 @@
-<!-- BEGIN page -->
-<form id="form_calendar_type" action="index.php" method="get">
-	<input type="hidden" name="menuaction" value="mobile.ui_mobilecalendar.index" />
-	<div class="menu-contexto">
-		<span><a href="{href_back}">{lang_back}</a></span> <span class="titulo-secao">{lang_calendar}</span>
-			<select name="type" onchange="document.getElementById('form_calendar_type').submit()">
-				{type_option_box}
-			</select>
-	</div>
-</form>
-<form method="post" action="index.php?menuaction=mobile.ui_home.search" id="form_search">
-	<input type="hidden" name="calendar_search" value="1">
-	{search}
-</form>
-
-<dl id="lista_miolo">	
-	{events_box}	
-</dl>
-<div class="menu-contexto centraliza" style="display:{show_more};">
-	<button name="more_events" title="{lang_more_events}" class="btn-contexto" onClick="location.href='index.php?menuaction=mobile.ui_mobilecalendar.index&type={type}&dia={dia}&mes={mes}&ano={ano}&results={next_max_results}'">{lang_more} 10 {lang_events}</button>
-</div>
-{calendar_box}
-
-<!-- END page -->
-
-<!-- BEGIN day_event_block -->
-<div class="dt-titulo">
-	<div class="posiciona-esquerda aumenta-tamanho ">
-		<p class="email-item">{day}</p>
-	</div>
-</div>
-<!-- END day_event_block -->
-<!-- BEGIN event_block -->
-<div class="{dd_class}">
-	<div class="posiciona-esquerda aumenta-tamanho ">
-		<p class="email-item">{startdate_data} às {enddate_data} - {title_data}</p>
-		<p><strong><label>{location_field}:</label></strong> {location_data}</p>
-		<p><strong><label>{description_field}:</label></strong> {description_data}</p>
-	</div>
-</div>
-<!-- END event_block -->
-<!-- BEGIN no_event_block -->
-<div class="dt_branco">
-	<div class="centraliza aumenta-tamanho">
-		<p class="email-item">{msg_no_event}</p>
-	</div>
-</div>
-<!-- END no_event_block -->
-<!-- BEGIN type_option_block -->
-<option value="{value}" {selected}>{label}</option>
-<!-- END type_option_block -->
-
-<!-- BEGIN bar_block -->
-<dt class="menu-diverso">
-  <div class="margin-geral centraliza">
-  	<a href="{today_link}" class="btn_off">{lang_today}</a>
-  	<a href="{before_link}" class="btn_off"><</a>
-  	<a href="{current_link}" class="btn_off">{current_label}</a> 
-   	<a href="{next_link}" class="btn_off">></a>
-	</div>
-</dt>
-<!-- END bar_block -->
-
-<!-- BEGIN calendar_bar_block -->
-<dt class="menu-diverso">
-  <div class="margin-geral centraliza">
-  	<a href="{before_month_link}" class="btn_off"><</a>
-  	<a href="{current_month_link}" class="btn_off">{current_month_label}</a> 
-   	<a href="{next_month_link}" class="btn_off">></a> 
-	</div>
-</dt>
-<!-- END calendar_bar_block -->
-
-<!-- BEGIN calendar_header_begin_block -->
-<div id="pre-calendario">
-  <table id="calendario" border="0" align="center" cellpadding="0" cellspacing="0" >
-  	<thead>
-		  <tr>
-		    {week_day_box}
-		  </tr>
-	  </thead>
-	  </tbody>
-<!-- END calendar_header_begin_block -->	
-
-<!-- BEGIN calendar_header_block -->
-<th>{week_day}</th>
-<!-- END calendar_header_block -->	
-
-<!-- BEGIN calendar_header_end_block -->
-		</tbody>
-	</table>
-</div>
-<!-- END calendar_header_end_block -->	
-
-<!-- BEGIN calendar_day_begin_block -->
-<tr class="dias">
-<!-- END calendar_day_begin_block -->
-<!-- BEGIN calendar_day_end_block -->
-</tr>
-<!-- END calendar_day_end_block -->
-<!-- BEGIN calendar_day_block -->
-<td align="center" valign="middle"><a class="dias {extra_class}" href="{calendar_day_link}">{calendar_day}<span class="qtd_commitment">{qtd_commitment}</span></a></td>
-<!-- END calendar_day_block -->
Index: branches/2.2.0.1/mobile/templates/default/mobilemail.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/mobilemail.tpl	(revision 3829)
+++ 	(revision )
@@ -1,50 +1,0 @@
-<!-- BEGIN main_emails -->		
-		<div class="menu-contexto">
-			<span><a href="{href_back}">&lt; {lang_back}</a></span>
-			<span class="titulo-secao">{folder}</span>
-			<button class="btn-contexto" onclick="location.href='index.php?menuaction=mobile.ui_mobilemail.new_msg&type=clk'">{lang_new}</button>
-		</div>
-			
-		<form action="index.php" method="post" id="form_busca"> 
-		<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-		<input type="hidden" name="folder_to_search" value="{folder_id}">
-		{search}
-		</form>
-	
-		
-		<dl id="lista_miolo">
-			<dt id="palavra-procurada">
-				{filter_by}:
-				<select name="fitros" onChange="location.href='index.php?menuaction=mobile.ui_mobilemail.change_search_box_type&search_box_type='+this.value">
-				 <option value="all" {selected_all}>Todos</option>
-				 <option value="flagged" {selected_flagged}>Importante</option>
-				 <option value="seen" {selected_seen}>Lidas</option>
-				 <option value="unseen" {selected_unseen}>N&atilde;o Lidas</option>
-				 <option value="answered" {selected_answered}>Respondidas</option>	
-				</select>
-			</dt>
-		
-			<form id="formu" action="index.php" method="post">
-			<input type="hidden" id="menuaction" name="menuaction" value="mobile.ui_mobilemail.delete_msg">
-			<input type="hidden" id="msg_folder" name="msg_folder" value="{folder_id}">
-			<input type="hidden" id="flag" name="flag" value="seen">
-			{mails}
-			</form>
-		
-			<div class="menu-contexto centraliza" style="display:{show_more};">
-				<form method="post" action="index.php">
-					<input type="hidden" name="menuaction" value="mobile.ui_mobilemail.change_page">
-					<input type="hidden" name="page" value="{page}">
-					<button type="submit" name="more_messages" title="{lang_more_messages}" class="btn-contexto"> {lang_more} 10 {lang_messages}</button>
-				</form>
-			</div>
-			
-			<div id="operacao_lista">
-				<div class="margin-rodape">
-					{selecteds}:
-					<button id="selecionar" class="btn-generico" onclick="document.getElementById('menuaction').value='mobile.ui_mobilemail.mark_message_with_flag';document.getElementById('formu').submit();" >marcar como lido</button>
-					<button id="remover" class="btn-generico" onclick="document.getElementById('menuaction').value='mobile.ui_mobilemail.delete_msg';document.getElementById('formu').submit();">remover</button>
-				</div>
-			</div>
-		</dl>
-<!-- END main_emails -->
Index: branches/2.2.0.1/mobile/templates/default/template.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/template.tpl	(revision 3731)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<!-- BEGIN mobile_home -->
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>   
-	    <title>{global_title}</title>
-		<meta content="text/html;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8;" http-equiv="Content-Type" name="viewport" /> 
-		<meta name="format-detection" content="telephone=no" />
-		<link href="templates/css/mobile.css" type="text/css" rel="StyleSheet" />
-	</head>	
-	<body>
-		<div class="topo">
-			<h1>{global_title}</h1>
-			<span><a href="{href_logout}">{lang_logout}</a></span>
-		</div>
-
-		{message_box}		
-		<!-- BEGIN mobile_home_content -->
-		{content}
-		<!-- END mobile_home_content -->
-		
-		<div id="menu_rodape">
-			<div class="margin-geral">
-				<p><a href="{href_back}" id="menu_rodape_voltar">{lang_back}</a></p>
-				<p><a href="{href_home}">{lang_home}</a></p>
-				<p><a href="{href_email}">{lang_email}</a></p>
-				<p><a href="{href_cc}">{lang_contacts}</a></p>
-				<p><a href="{href_calendar}">{lang_calendar}</a></p>
-			</div>
-		</div>
-		<div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</div>
-		<div class="rodape center"><a href="index.php?menuaction=mobile.ui_home.change_template&template=mini_desktop">Mini Desktop</a></div>
-	</body>
-</html>
-<!-- END mobile_home -->
-<!-- BEGIN success_message -->
-<div class="bg-neutro">
-	<div class="aviso-positivo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END success_message -->
-<!-- BEGIN error_message -->
-<div class="bg-neutro">
-	<div class="aviso-negativo">
-		<strong>{message}</strong>
-	</div>
-</div>
-<!-- END error_message -->
Index: branches/2.2.0.1/mobile/templates/default/link_pict.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/link_pict.tpl	(revision 588)
+++ 	(revision )
@@ -1,25 +1,0 @@
-
-<!-- BEGIN link_pict -->
-{picture}
-<!-- END link_pict -->
-
-<!-- BEGIN link_open -->
-<div id="calendar_event_entry" style="overflow:hidden;">
-<a class="event_entry" href="#" onMouseOver="window.status='{lang_view}'; return true;" onMouseOut="window.status=''; return true;" title="{desc} {location}"><br>
-<!-- END link_open -->
-
-<!-- BEGIN pict -->
- <img src="{pic_image}" width="{width}" height="{height}" title="{title}" border="0" />
-<!-- END pict -->
-
-<!-- BEGIN link_text_old -->
-<nobr>&nbsp;{time}&nbsp;</nobr> {title}&nbsp;{users_status}: <i>{desc}</i><!--({location})-->
-<!-- END link_text_old -->
-
-<!-- BEGIN link_text -->
-&nbsp;<FONT SIZE=1><span style="color: black">{time}</span> {users_status}<br><b>{title}</b><br><i>{desc}</i> {location}
-<!-- END link_text -->
-
-<!-- BEGIN link_close -->
-</a></div>
-<!-- END link_close -->
Index: branches/2.2.0.1/mobile/templates/default/keep_add_participants.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/keep_add_participants.tpl	(revision 588)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<!-- BEGIN body -->
-<table>
-<tr>
-<td>
-<form action="index.php">
-	<input type="hidden" name="menuaction" value="mobile.ui_mobilecalendar.add_participants">
-	<input type="submit" value="{lang_add_participants}">
-</form>
-</td>
-<td>
-&nbsp; &nbsp;
-</td>
-<td>
-<form action="index.php">
-	<input type="hidden" name="menuaction" value="mobile.ui_mobilecalendar.add">
-	<input type="submit" value="{lang_continue}">
-</form>
-</td>
-</tr>
-</table>
-<!--a href="index.php?menuaction=mobile.ui_mobilecalendar.add">{lang_continue}</a>
-<!-- END body -->
Index: branches/2.2.0.1/mobile/templates/default/home_search.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/home_search.tpl	(revision 3829)
+++ 	(revision )
@@ -1,87 +1,0 @@
-<!-- BEGIN main -->
-		<div class="menu-contexto">
-			<span><a href="{href_back}">{lang_back}</a></span> <span class="titulo-secao">{lang_search_return}</span>
-		</div>
-			
-			<form method="post" action="index.php" id="form_busca">
-				<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-				<input type="hidden" name="default_folders" value="{default_folders}">
-				<input type="hidden" name="personal_folders" value="{personal_folders}">
-				<input type="hidden" name="folder_to_search" value="{folder_to_search}">
-				<input type="hidden" name="contacts_search" value="{contacts_search}">
-				<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
-				<input type="hidden" name="calendar_search" value="{calendar_search}">
-				
-				<input type="hidden" name="contacts_request_from" value="{contacts_request_from}">
-			
-		{search}
-				</form>
-		
-		<dl id="lista_miolo">
-			<dt id="palavra-procurada">&nbsp;&nbsp;{lang_your_search_was_by}: <strong><i>{search_param}</i></strong></dt>
-
-			<dt class="resultado-titulo" style="display:{show_mails};">&nbsp;{lang_emails}</dt>
-			{mails}
-			<div class="menu-contexto centraliza" style="display:{show_more_messages};">
-				<form method="post" action="index.php">
-					<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-					<input type="hidden" name="default_folders" value="{default_folders}">
-					<input type="hidden" name="personal_folders" value="{personal_folders}">
-					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
-					<input type="hidden" name="contacts_search" value="{contacts_search}">
-					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
-					<input type="hidden" name="calendar_search" value="{calendar_search}">
-					<input type="hidden" name="name" value="{search_param}">
-					<input type="hidden" name="max_msgs" value="{next_max_msgs}">
-					<input type="hidden" name="max_contacts" value="{max_contacts}">
-					<input type="hidden" name="max_events" value="{max_events}">
-					<button type="submit" title="" class="btn-contexto"> {lang_more} 10 {lang_messages}</button>
-				</form>
-			</div>
-			<dt class="resultado-titulo" style="display:{show_contacts};">&nbsp;{lang_contacts}</dt>
-			{contacts}
-			<div class="menu-contexto centraliza" style="display:{show_more_contacts};">
-				<form method="post" action="index.php">
-					<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-					<input type="hidden" name="default_folders" value="{default_folders}">
-					<input type="hidden" name="personal_folders" value="{personal_folders}">
-					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
-					<input type="hidden" name="contacts_search" value="{contacts_search}">
-					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
-					<input type="hidden" name="calendar_search" value="{calendar_search}">
-					<input type="hidden" name="name" value="{search_param}">
-					<input type="hidden" name="max_msgs" value="{max_msgs}">
-					<input type="hidden" name="max_contacts" value="{next_max_contacts}">
-					<input type="hidden" name="max_events" value="{max_events}">
-					<button type="submit" title="" class="btn-contexto"> {lang_more} 10 {lang_contacts}</button>
-				</form>
-			</div>
-			<dt class="resultado-titulo" style="display:{show_calendar};">&nbsp;{lang_calendar}</dt>
-			{calendar_results}
-			<div class="menu-contexto centraliza" style="display:{show_more_events};">
-				<form method="post" action="index.php">
-					<input type="hidden" name="menuaction" value="mobile.ui_home.search">
-					<input type="hidden" name="default_folders" value="{default_folders}">
-					<input type="hidden" name="personal_folders" value="{personal_folders}">
-					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
-					<input type="hidden" name="contacts_search" value="{contacts_search}">
-					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
-					<input type="hidden" name="calendar_search" value="{calendar_search}">
-					<input type="hidden" name="name" value="{search_param}">
-					<input type="hidden" name="max_msgs" value="{max_msgs}">
-					<input type="hidden" name="max_contacts" value="{next_max_contacts}">
-					<input type="hidden" name="max_events" value="{next_max_events}">
-					<button type="submit" title="" class="btn-contexto"> {lang_more} 10 {lang_events}</button>
-				</form>
-			</div>
-		</dl>
-<!-- END main -->
-
-<!-- BEGIN row_events -->
-				<p class="{bg} espacamento_contato_search"><strong>{date}</strong> - {title}</p>
-<!-- END row_events -->
-<!-- BEGIN no_events -->
-	<dt class="titulo_mensagem reset-dt">
-					{lang_no_results}
-	</dt>
-<!-- END no_events -->
Index: branches/2.2.0.1/mobile/templates/default/home_index.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/home_index.tpl	(revision 3992)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<!-- BEGIN page -->
-
-<script type="text/javascript">
-
-function expand_folders() {
-	var box = document.getElementById("personal_folder_box");
-	box.style.display = (box.style.display == "none") ? "block" : "none";
-}
-
-</script>
-
-<form method="post" action="index.php?menuaction=mobile.ui_home.search" id="form_busca">
-	{search}
-	
-	<div class="menu-contexto">
-		&nbsp;&nbsp;{lang_new_mail}:
-		<button name="email" class="btn-contexto" type="button" onclick='window.location="index.php?menuaction=mobile.ui_mobilemail.new_msg&type=clk"'>{lang_context_email}</button>
-		<button name="contato" class="btn-contexto" type="button" onclick='window.location="index.php?menuaction=mobile.ui_mobilecc.contact_add_edit"'>{lang_context_contact}</button>
-	</div>
-	
-	<dl id="lista_miolo">
-		<dd style="margin: 0; padding: 0">
-			<div class="resultado-titulo">
-				<label>
-					<input type="checkbox" name="default_folders" value='1' id="search_default_folders" />
-					<span class="email-item">
-						{lang_my_mail}
-					</span>
-				</label>
-				<div class="rotulo-complementar">{quota_percent}% [{quota_used}/{quota_limit}]</div>
-			</div>
-		</dd>
-		{default_folders_box}
-		<dd>
-	    	<div class="limpar_div resultado-titulo">
-	    		<label>
-	    			<input type="checkbox" name="personal_folders" value='1' id="search_personal_folders"/>
-	    			<a href="javascript:expand_folders()" class="email-item" style="font-size:12pt;">
-	    				{lang_my_folders}
-	    			</a>
-	    		</label>
-	    	</div>
-		</dd>
-	  	<span id="personal_folder_box" style="display: none;">
-			{personal_folders_box}
-	   	</span>		
-		<dd>
-			<div class="limpar_div resultado-titulo">
-				<label>
-					<input type="checkbox" name="calendar_search" value='1' id="search_calendar_search">
-						<a href="index.php?menuaction=mobile.ui_mobilecalendar.index" class="email-item" style="font-size:12pt;">
-							{lang_my_commitments}
-						</a>
-				</label>
-			</div>
-		</dd>
-		{commitments_box}
-		<dd>
-    		<div class="limpar_div resultado-titulo">
-    			<label>
-    				<input type="checkbox" name="contacts_search" value='1' id="search_contacts_search">
-    				<a href="index.php?menuaction=mobile.ui_mobilecc.init_cc" class="email-item" style="font-size:12pt;"> {lang_my_contacts} </a>
-    			</label>
-    		</div>
-		</dd>
-	</dl>
-</form>
-
-<!-- END page -->
-<!-- BEGIN folder_block -->
-<dd class="{folder_class}" style="clear:both">
-	<a href="index.php?menuaction=mobile.ui_mobilemail.change_folder&folder={folder_id}">
-		<div class="nome-item"><span>{folder_name}</span></div>
-	</a>
-	<div class="contagem">[{folder_unseen}/{folder_total_msg}]</div> 
-</dd> 
-<!-- END folder_block -->
-<!-- BEGIN commitment_block -->
-<p class="{commitment_class} espacamento"><strong>{commitment_time}</strong> {commitment_title}</p>
-<!-- END commitment_block -->
Index: branches/2.2.0.1/mobile/templates/default/sent_msg.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/sent_msg.tpl	(revision 518)
+++ 	(revision )
@@ -1,5 +1,0 @@
-<!-- BEGIN retorno -->
-<p>&nbsp;&nbsp;&nbsp;{msg}</p>
-<p>&nbsp;&nbsp;&nbsp;{erro}</p>
-<p>&nbsp;&nbsp;&nbsp;<a href="{link}">{link_text}</a></p>
-<!-- END retorno -->
Index: branches/2.2.0.1/mobile/templates/default/view_msg.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/default/view_msg.tpl	(revision 3907)
+++ 	(revision )
@@ -1,47 +1,0 @@
-<!-- BEGIN page -->
-<div class="menu-contexto">
-	<span><a href="{href_back}">{lang_back}</a><span class="titulo-secao">{lang_reading_message}</span>
-</div>
-
-<div id="campos-correspondencia">
-	<div class="bloco">
-    <div class="container">
-      <div id="block-label">{lang_from}:</div>
-      <div id="block-dados">{from}</div>
-	  </div>
-    <div class="container">
-      <div id="block-label">{lang_to}:</div>
-      <div id="block-dados">{to}</div>
-	  </div>	  
-    <div class="container">
-      <div id="block-label">{lang_cc}:</div>
-      <div id="block-dados">{cc}</div>
-	  </div>	
-    <div class="container">
-      <div id="block-label">{lang_subject}:</div>
-      <div id="block-dados">{subject}{attachment_alert_box}<span class="btn-anexo">{date} - {size}</span></div>
-	  </div>		  
-	</div>	  	
-</div>
-
-<div id="corpo_mensagem">
-	{body}
-
-	<p>{attachment_message}</p>
-</div>
-
-<div id="operacao_lista">
-	<div class="margin-rodape">
-		{operation_box}
-	</div>
-</div>
-
-<!-- END page -->
-
-<!-- BEGIN attachment_alert_block -->
-<img src="templates/{theme}/images/anexo.png" align="top" />
-<!-- END attachment_alert_block -->
-
-<!-- BEGIN operation_block -->
-<button onclick="location.href='{operation_link}'" id="{operation_id}" class="btn-generico" style="margin-top: 1px">{lang_operation}</button>
-<!-- END operation_block -->
Index: branches/2.2.0.1/mobile/templates/css/desktop.css
===================================================================
--- branches/2.2.0.1/mobile/templates/css/desktop.css	(revision 3731)
+++ 	(revision )
@@ -1,41 +1,0 @@
-@import url("mobile.css");
-
-/* MACRO ESTRUTURA BROWSER */
-.global{ }
-#navegacao{float:left; width:29%; }
-#conteudo{border-left: solid #F6F6F6; border-left-width: 1%; float:left; width:70%; min-height:305px;background: #eef7fa;} 
-
-#lista_miolo {clear:none; color:#666; width:auto; font-size:small; }
-#titulo-miolo, .menu-contexto{background-color: #3399CC ;color: #FFFFFF;  font-size: small; height: 26px; line-height:22px; padding: 4px 2px; font-weight:bold; width:auto; }
-
-/* CLASSES e IDS MODIFICADAS */
-#campos-correspondencia {background-color: #CEE5EF;  color: #666666; display: table; font-weight: bold;   padding: 10px 0; text-align: left; /*min-height:210px*/ } 
-.rodape{clear:both}
-#pre-calendario{display:table; width:100%}
-.menu-diverso, #palavra-procurada{height:25px}
-.email-data{width:70px;}
-#titulo-miolo button {height:21px}
-
-#corpo_mensagem #foto {padding:5px 0; text-align:left; margin-left:20px}
-
-.login input[type="text"]{ width:40%}
-
-.posiciona-esquerda{margin-left:5px}
-
-div.dt-azul p+p {margin-left:5px}
-div.dt-branco p+p  {margin-left:5px}
-
-div.rodape { margin-top: 4px; background-color:#FFF; }
-div.margin-rodape {  clear: both;   margin: 0 0 21px 5px; }
-
-div#pre-calendario{padding:10px 0} 
-
-
-@media screen and (-webkit-min-device-pixel-ratio:0) {
-
-.menu-diverso { height: 0px;margin-top:0;  }
-dt.menu-diverso {min-height:21px; padding:4px 0;}
-
-div#titulo-miolo select{margin:0}
-
-}
Index: branches/2.2.0.1/mobile/templates/css/ie6.css
===================================================================
--- branches/2.2.0.1/mobile/templates/css/ie6.css	(revision 3731)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/* MACRO ESTRUTURA BROWSER */
-.global{ }
-#navegacao{float:left; width:29%}
-#conteudo{border-left: solid #F6F6F6; border-left-width: 1%; float:left; width:70%; min-height:305px;background: #eef7fa;} 
-#titulo-miolo{background-color: #3399CC ;color: #FFFFFF;  font-size: small; min-height: 22px; line-height:22px; padding: 4px 0; font-weight:bold; }
-
-
-/* CLASSES e IDS MODIFICADAS */
-#campos-correspondencia {background-color: #CEE5EF;  color: #666666; display: table; font-weight: bold;   padding: 10px 0; text-align: left; /*min-height:210px*/ } 
-.rodape{clear:both}
-#pre-calendario{display:table; width:100%}
-.menu-diverso, #palavra-procurada{height:25px}
-.email-data{width:70px;}
-.aviso-positivo, .aviso-negativo {width:50%}
-#titulo-miolo button {height:21px}
-
-
-
-/* IE6 MODIFICAÇÕES*/
-
-.gd input{width:100%; padding:2px 0;}
-p.descricao{margin-left:25px} /*classe criada*/
-
-
-.login{width:40%; margin:auto; padding:10px 0}
-.login strong {margin:0 0 0 5px; }
-.login input{width:50%; margin:3px 0}
-.login button {margin:0 5px}
-.login p{padding:3px;}
-#bg-aviso{background:#EFF8FB; padding-top:20px;}
-.avisos{background-color:#FAE1E1;}
-.aviso-positivo, .aviso-negativo{ padding:5px; font-size:x-small; color:#333333; background-color:#CEE5EF; width:40%; margin:auto  }
-.aviso-negativo{ background-color:#FAE1E1 }
-.aviso-positivo a,.aviso-negativo a{text-decoration:underline; color:#333333;}
-div.posiciona-esquerda p {margin-left:17px}
-div.posiciona-esquerda p input {margin-left:-19px}
-.email-item{color:#3E3E3D; font:bold small Arial, Helvetica, sans-serif; vertical-align:text-bottom;}
-
-.email-cabecalho{overflow: hidden; width:74%; height:18px; float:left;}
-.email-corpo{margin-top:-5px}
-.btn-anexo a:hover {background:#FAD364; width:40px; padding:3px; color:#333  }
-
-.margin-geral{height:15px}
-.bloco{margin-left:5px}
-.container{margin-bottom:5px}
-#titulo-miolo{height:22px}
-#palavra-procurada {line-height:20px }
-div.posiciona-esquerda p a:hover{background:none; color:#3E3E3D; font:bold small Arial, Helvetica, sans-serif; vertical-align:text-bottom}
-.dt-azul, .dt-branco {background:#EEF7FA; clear:both; display:table;  width:100%;  }
-.dt-branco {background:#FFF}
-.dt-branco a{background:#FFF}
-
-.limpar_div_margin{margin-left:5px}
-.limpar_div_margin input{width:90%}
-
-
-
-#pre-calendario {padding: 10px; background: #eef7fa; width:70%   }
-#semanal { border: none; margin-bottom: 5px }
-#calendario {width:10%;	}
-#calendario thead tr th { color: #333; font-size:small; font-weight:bold;}
-#calendario thead tr th, #calendario tbody tr td { text-align: center } 
-.semana { color:#333;font-size:small; width:100%; font-weight:bold; width: 14%; }
-.dias { border: none }
-.dias a {color: #444;font-size: 11px;cursor: pointer;text-decoration: none;text-align: center;display: block;border: 1px solid #CACACA;width: 27px;height:16px;margin: 0px;padding: 3px 1px 0 0;position: relative;}
-.dias a .qtd_commitment {font-size: 8px;position: absolute;top: 0;right: 0.5px;	color: red;}
-.dias a:hover { color:#999; text-decoration: none }
-a.hoje { background: #FC0; color: #fff }
-a.dia_branco { background: #FFF }
-a.outro_mes { background: #E1E1E1; color: #8B8B8B }
-
-
-
-dt.menu-diverso {min-height:18px; padding:4px 0;}
-dl#lista_miolo dt.menu-diverso{height:0px; padding:0px 0}
-dl#lista_miolo dt.menu-diverso div.margin-geral{margin-top:1px; padding-top:2px;}
-
-span.rotulo-complementar{font-size:x-small; text-decoration:underline; padding:3px; width:130px; margin-left:240px }
-
-
-div.margin-rodape a{margin:-2px}
-div.margin-rodape button{margin-left:1px}
-
-#corpo_mensagem #foto {padding:5px 0; text-align:left; margin-left:20px}
-
-.corrigi-margin{margin-top:-5px}
-
-
-div.rodape {}
Index: branches/2.2.0.1/mobile/templates/css/mobile.css
===================================================================
--- branches/2.2.0.1/mobile/templates/css/mobile.css	(revision 3992)
+++ 	(revision )
@@ -1,280 +1,0 @@
-/**********GLOBAL RESET*************/
-body {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:medium;font-family:Arial, Helvetica, sans-serif;}
-body { -webkit-text-size-adjust: none; }
-
-html, body, div, span, iframe, h1, h2, h3, h4, h5, h6, p,
-blockquote, pre, a, abbr, acronym, address, code, del, 
-dfn, em, img, q, dl, dt, dd, ol, fieldset, form,  
-label, legend, table, caption, tbody, tfoot, thead, tr, th, 
-td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;}
-
-button{height:22px; font-size:xx-small; line-height:22px; }
-checkbox {padding:0; margin:0}
-input[type="file"] {height:30px}
-
-/*INSERIDOS*/
-
-table {border-collapse:separate;border-spacing:0;}
-
-#busca table { width:100%;}
-.gd {width:90%; padding:2px 0;}
-.pq {width:10%; padding-left:5px; padding-right:5px; text-align:center;}
-.bt {width:10%; padding-left:10px; }
-
-caption, th, td {text-align:left;}
-table, td, th {vertical-align:middle;}
-blockquote:before, blockquote:after, q:before, q:after {content:"";}
-blockquote, q {quotes:"" "";}
-a img {border:none;}			
-a:link, a:visited {text-decoration: none; font-size:small;}
-li {list-style:none;}
-
-/***************Elementos******************/
-
-h1{ padding-top: 5px; height:20px; font-size:small; padding-left:5px; color:#FFFFFF; float:left;  }
-dt {font-size:small; color:#3E3E3D; background:#CEE5EF; width:100%;}
-.dt-titulo, .dt-azul, .dt-branco {background:#EEF7FA; clear:both; display:table;  width:100%;  }
-.dt-branco {background:#FFF;}
-.dt-titulo {background:#CEE5EF;}
-.fundo-branco-alinha{background:#FFF; margin-left:8px}
-.fundo-azul-alinha{background:#EEF7FA; margin-left:8px}
-
-.espacamento, .espacamento_contato_search{padding:5px 0 5px 25px; margin:0 0 5px 0 }
-.espacamento_contato_search{padding-left:5px;}
-#palavra-procurada {background:#C0DCE9; height:22px; padding: 6px 0 0 4px; width:auto}
-#editando{font-size:120%; color:#666; margin-left:5px}
-div > p.dt-azul > strong{ margin-left:8px; float:left }
-
-dt.seen {font-weight:normal;width:100%;}
-dt.important, dt.important a {color:#FF0000;}
-dd{ padding-top:3px; /*padding-left:25px;*/ vertical-align:middle; font-size:small;}
-input{height: 15px;} /*o float left ta dando problema nos check boxs, por isso removi */
-textarea {width:94%; margin:0 0 0 5px}
-dt select, div.menu-contexto select {font-size:x-small; border:none; color:#ffffff; background-color:#2B84AF;}
-div.menu-contexto select{font-size:small; border:none; color:#ffffff; background-color:#2B84AF;}
-div.menu-contexto a {color:#FFFFFF; text-decoration:underline;}
-#operacao_lista {font-size:small; background-color:#C9C9C9; width:100%; min-height:18px; padding:4px 0}
-#operacao_lista span {font-size:x-small;}
-#menu_rodape {background-color:#F2F2F2; width:100%}
-#menu_rodape a {color:#2B84AF; font-size:small; }
-#menu_rodape_voltar{color:#666 !important; text-decoration:underline !important; font-size:small !important;}
-.busca-email-texto {margin-left:25px !important}
-
-/*ALTERADOS*/
-/*#text_area{width:98%; margin-top:10px; margin:auto }*/
-#corpo_mensagem { display:table; color:#666; width:98%; margin:auto;font-size:small; padding:8px 0}
-.corpo_mensagem_detalhe, .corpo_mensagem_bg_branco {background:#EFF8FB; width:99.5% !important; padding-left:0.5% }
-.corpo_mensagem_bg_branco {background:#FFF}
-#corpo_mensagem #foto {padding:5px 0; text-align:center}
-#corpo_mensagem #foto img {border:1px solid #2B84AF;}
-#corpo_mensagem #nome {font-size:small; width:100%;  font-weight:bold;}
-#corpo_mensagem #itens {font-size:x-small; float:left; font-weight:bold; text-align:right; padding-right:10px;}
-#corpo_mensagem #itens-preenchidos {font-size:x-small; width:50%; float:left; font-weight:normal;}
-#corpo_mensagem input {height:15px;}
-
-#campos-correspondencia {font-weight:bold; text-align:left;color:#666; background-color:#CEE5EF; width:100%; padding:10px 0; display:table}
-#campos-correspondencia p{margin-left:0}
-.email-campos-alinhado{width:56px; text-align:right; border:#333 solid 1px; font-weight:bold; }
- 
-
-.posiciona-esquerda {font-size:small;  float:left; font-weight:normal; text-align:left; width:80%; padding:2px 5px 0 5px;  }
-.aumenta-tamanho {width:98%; }
-.posiciona-esquerda input[type="checkbox"]{ vertical-align:baseline}
-
-.posiciona-esquerda p{ margin:5px 0 5px 5px}
-.posiciona-direita-busca { font-weight:normal; padding-top:8px; text-align:right; width:56px; float:right; margin-right:6px}
-.posiciona-direita {font-size:x-small; float:right; font-weight:normal; text-align:right; /*width:56px;*/ width:26px; padding-top:8px;}
-.posiciona-direita p { margin-bottom:3px}
-.posiciona-direita span{  font-size:x-small !important; font-weight:normal;  float:right }
-.posiciona-direita a{height:22px; color:#666;   padding:4px; font-size: x-small; }
-
-#lista_miolo {clear:both; color:#666; width:100%; /*min-height:165px;*/font-size:small; }
-#lista_miolo dd {background:#FFFFFF; width:100%; display:table  }
-#lista_miolo dd.par {background:#EEF7FA; }
-#lista_miolo #iten {width:80%; float:left; font-weight:normal; text-align:left;}
-#lista_miolo #iten a {font-size:small;}
-#lista_miolo #contagem {font-size:x-small; width:20%; float:left; font-weight:normal; text-align:left;}
-
-/***************Classes******************/
-
-/*ALTERADOS*/
-
-#busca{padding:4px 0;background-color:#E4E4E4; min-height:18px; width:100%;}
-#busca input[type="text"] {height:20px; width:94%; margin:0 5px}
-#busca input[type="button"] {height:20px; min-width:100px;}
-/*.busca input {height:10px; width:87%; float:left;}*/
-
-.limpar_div {
-	clear:both
-}
-
-.resultado-titulo{background:#D4E7F0; min-height:18px; padding:4px 0; font-weight:bold}
-.resultado-titulo strong { margin-left:25px }
-.resultado-titulo div p strong {margin-left:88px}
-
-p.urgente {color:#F00; font-style:italic; font-size:x-small }
-div.urgente {width:14px; height:12px; background:#F00; margin-left:5px; text-align:center; vertical-align:middle;color:#FFF; float:left;font-size:xx-small; padding-top:1px}
-
-.topo { width:100%; background:#333; display:table }
-.topo a{ color:#FFF; text-decoration:underline; float:right; margin:4px 20px 0 0 }
-.topo h1{ font-size:13pt }
-
-.btn-generico, .btn-contexto, .btn-busca { text-transform: uppercase; }
-
-.rodape{ padding-top:4px; height:16px; text-align:center; font-size:50%; background-color:#F6F6F6; color:#333333;}
-.btn-generico{color:#FFFFFF; background-color:#434343; border:none; }
-.contagem { float:right; position: relative; margin-rigth: 5px }
-.nome-item{float:left; position:aboslute; font-size:11pt; color:#3E3E3D;}
-.nome-item strong, .nome-item span{ margin-left:25px}
-.nome-item-telefone{margin-left:21px}
-
-.menu-contexto {font-size:small; background-color:#3399CC; color:#FFFFFF; width:100%; min-height:18px; padding:4px 2px}
-.menu-contexto span{margin-left:5px }
-.btn-contexto {font-weight:bold ;font-size:x-small; background-color:#2B84AF; color:#FFFFFF; border:1px solid #000; margin-left:5px }
-.menor {min-height:20px !important} 
-
-/*novo*/ 
-.btn-busca {padding:4px; font-size:x-small; background-color:#2B84AF; color:#FFFFFF; border:none;  min-height:20px;}
-#voltar {margin:0; padding:0}
-
-#titulo {width:100%; margin:2px 0; padding:20px 0; background-color:#CEE5EF;  }
-#fundo-branco{background:#FFF; }
-#titulo p{font-weight:normal; width:90% }
-.titulo_mensagem {overflow: hidden; } 
-.titulo-sdt{ padding:2px 0px 0px 5px; height:20px; font-weight:bold; font-size: x-small; color:#3E3E3D; }
-
-.menu-diverso{ height:22px; padding-top:4px}
-.margin-geral{margin:0 0 5px 5px}
-.margin-rodape {margin:0 0 0 5px}
-.margin-geral a strong{font-size:x-small}
-.centraliza{ width:100%; margin:auto; text-align:center;}
-
-.menu-diverso a{ margin-right:3px; font-size:x-small; background-color:#EEF7FA; color:#434343; padding:3px 9px }	
-.menu-diverso a:hover,.menu-diverso a.letter-contact-selected {color:#FFFFFF;background-color:#3399CC; padding:3px 9px }
-.btn_off a { margin: 0 1px; display: inline;  }
-
-.reset-dt {background-color:#ffffff; width:98%; /*padding:10px 3px 3px 10px;*/}
-.reset-dt1 {width:98%; /*padding:3px 3px 3px 10px;*/}
-.dd-mensagem {height:30px;overflow: hidden;padding:3px 0px 15px 0;}
-.btn-anexo {font-size: x-small;  text-align:center; text-transform:uppercase; margin: 5px 3px 0 0; float:right }
-.btn-anexo-text {font-size: x-small;  text-align:center; text-transform:uppercase; margin: 5px 3px 0 82px; }
-.btn-anexo a {font-size: x-small;  background:#FAD364; width:40px; padding:3px; color:#333  }
-.sobre-mensagem {float:left;}
-
-#ver-detalhes {float:left;padding:2px; background-color:#FAD364; width:10%  } /*mudanï¿œa*/
-#ver-detalhes a {padding:3px;color:#666;font-size:x-small; width:20px}
-
-.alerta{ font-style:italic; color:#FF3300;}
-.sinal-alerta{padding:1px 5px 1px 5px; background-color:#FF3300; color:#ffffff;}
-.titulo-secao{padding:0px 10px 0px 10px; font-size:120%; color:#ffffff; font-weight:bold;}
-
-.label-normal{font-style:italic;}
-
-#campos {width:99%; height:auto;background-color:#CEE5EF;}
-.campos-entrada{ font-size:70%; background-color:#CEE5EF;height:auto;}
-.campos-correspondencia {font-size:x-small; padding:5px;} 
-.campos-correspondencia input {height:17px;  float:left;}
-.campos-correspondencia p { }
-.campos-correspondencia p label {float:left;width:100%;}
-.campos-entrada input {height:15px;  }
-.campos-correspondencia, .campos-entrada { }
-
-.login{width:50%; margin:auto; padding:10px 0}
-.login strong { font-size:11pt; margin:0 0 0 5px; }
-.login input { font-size:11pt;width:100%; margin:3px 0}
-.login button {margin:0 5px}
-.login p{padding:3px;}
-#bg-aviso{background:#EFF8FB; padding-top:20px;}
-.avisos{background-color:#FAE1E1;}
-.aviso-positivo, .aviso-negativo{ padding:5px; font-size:x-small; color:#333333; background-color:#CEE5EF; margin:auto; width:98%;padding-left:1%;padding-right:1%;  }
-.aviso-negativo{ background-color:#FAE1E1 }
-.aviso-positivo a,.aviso-negativo a{text-decoration:underline; color:#333333;}
-
-.bg-neutro{padding:5px; background-color:#EEF7FA;} 
-
-.rotulo-complementar{font-size:x-small; text-decoration:underline; padding:3px; float:right; }
-
-.mes_corrente { padding: 0 10px }
-
-#pre-calendario {padding: 10px; background: #eef7fa ;  }
-#semanal { border: none; margin-bottom: 5px }
-#calendario {width:11%; margin:auto}
-#calendario thead tr th { color: #333; font-size:small; font-weight:bold;}
-#calendario thead tr th, #calendario tbody tr td { text-align: center } 
-.semana { color:#333;font-size:small; width:100%; font-weight:bold; width: 14%; }
-.dias { border: none }
-.dias a {
-color: #444;
-font-size: 11px;
-cursor: pointer;
-text-decoration: none;
-text-align: center;
-display: block;
-border: 1px solid #CACACA;
-width: 27px;
-height:16px;
-margin: 0px;
-padding: 3px 1px 0 0;
-position: relative;
-}
-.dias a .qtd_commitment {
-	font-size: 8px;
-	position: absolute;
-	top: 0;
-	right: 0.5px;
-	color: red;
-}
-.dias a:hover { color:#999; text-decoration: none }
-a.hoje { background: #FC0; color: #fff }
-a.dia_branco { background: #FFF }
-a.outro_mes { background: #E1E1E1; color: #8B8B8B }
-
-/*---------------------------------------- CONTATO ï¿œNICO ---------------------------------------------*/
-
-.contato-unico {width:100%; margin:auto; }
-.contato-unico-bg {background:#EFF8FB; width:100% !important } 
-.nome {font-size:small; width:62px;  font-weight:bold;  margin:5px 0; }
-.nome label {text-align:right; width:62px; float:left; clear:left; margin-right:10px }
-.contato-unico input[type="text"] { width:71%; float:left; margin-bottom:5px;   }
-
-div.bloco{overflow: hidden; }
-.container{width:100%; margin:auto; overflow:hidden; }
-#block-label{ float:left;  width:60px; text-align:right; font-weight:bold; font-size:small  }
-#block-dados{float: left; width:78%; margin-left:5px; font-size:small; font-weight:normal }
-#block-label a {color:#666}
-
-/*---------------------------------------- EMAIL ---------------------------------------------*/
-
-.email-geral{width:100%; padding:5px 0}
-.email-cabecalho,.contato-cabecalho{overflow: hidden; width:74%; height:22px; float:left;}
-.email-cabecalho p.email-cabecalho a.email-cabecalho a:visited{font-size:medium; color:#000}
-.contato-cabecalho{font-size:medium}
-.email-anexo{width:16px; height:16px; float:left;  margin-top:5px}
-.email-data{width:69px; float:right; margin:5px 3px 0 0; margin-top:5px; text-align:right; font-size:x-small;}
-.email-corpo {clear:both; padding-bottom:5px; overflow:hidden; }
-.email-margin{margin:0 5px !important}
-.bg-azul {background:#EEF7FA; padding:5px 0}
-.bg-branco{background:#FFF; padding:5px 0}
-.email-corpo-sem-check p{margin:0 23px}
-.email-corpo p{margin:0 23px}
-.email-importante a,.email-importante a:visited{color:#F00}
-.email-nao-lido a{font-weight:bold}
-.email-lido{font-weight:normal}
-.email-labels {text-align:right; width:78px; display:table; float:left; margin-right:5px; height:22px; line-height:22px }
-.email-labels a{color:#666}
-.email-inputs{ margin-left:5px;border:#000 solid 1px;width:100% }
-.email-inputs input {width:100% ;  } 
-.limpar_div_margin {margin:2px 0; }
-.limpar_div_margin input[type="text"] {width:68%}
-.limpar_div textarea{font-size:11pt}
-p.assunto {font-size:small; font-weight:normal; padding-top:3px; color:#666}
-
-/*---------------------------------------- MODIFICAÃÃES ---------------------------------------------*/
-
-.email-item{color: #3E3E3D; font-size: 12pt; font-weight:bold; font-family: Arial, Helvetica, sans-serif; vertical-align:text-bottom}
-.email-campos, .assunto {color:#3E3E3D; font:bold small Arial, Helvetica, sans-serif; text-decoration:underline !important}
-.assunto {text-decoration:none !important}
-
-.campos-email {width:94%; clear:both; margin:0 5px}
-.campos-email input {font-size:11pt; width:99%; clear:both; }
-.campos-email a{float:left; text-align:right; margin:4px 0}
Index: branches/2.2.0.1/mobile/templates/celepar/home.tpl
===================================================================
--- branches/2.2.0.1/mobile/templates/celepar/home.tpl	(revision 1709)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<!-- BEGIN mobile_home -->
-<html>
-<head>
-<meta http-equiv="Content-Language" content="pt-BR" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<LINK href="./templates/css/mobile.css" type=text/css rel=StyleSheet>
-<title>Expresso Mobile {lang_home}</title>
-{js_lang}
-</head>
-<body style="background-color:white !important">
-<p>&nbsp;&nbsp;<strong>{fullname}: [{account_lid}]</strong></p>
-<form action="index.php?menuaction=mobile.ui_mobilemail.mail_list" method="post">
-<p>&nbsp;&nbsp;<input type="text" size="15" name="searchEmail"/><br/>
-&nbsp;&nbsp;<input type="submit" id="btnSearch" value="{lang_search}"/></p>
-</form>
-<hr />
-<p>
-<a href="{href_newmail}">{lang_newmail}</a>:<a href="{href_email}">{lang_email}</a>
-:<a href="{href_calendar}">{lang_calendar}</a>
-:<a href="{href_cc}">{lang_cc}</a>
-:<a href="./login.php?cd=1">{lang_logout}</a>
-</p>
-<hr />
-{content}<br>{footer}
-</body>
-</html>
-<!-- END mobile_home -->
Index: branches/2.2.0.1/mobile/index.php
===================================================================
--- branches/2.2.0.1/mobile/index.php	(revision 3974)
+++ 	(revision )
@@ -1,114 +1,0 @@
-<?php
-	//TODO: Aplicar o conceito de subapp (mobileapp)
-
-	$phpgw_info = array();
-	$GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
-
-	$proxies = explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']);
-	$fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
-
-	if(!$GLOBALS['sessionid'])
-	{
-		//$location = 'Location: ' . $fwConstruct . 'login.php';
-	    if ($_SERVER['HTTPS'] != 'on')
-	    {
-	    	$aux = 'http://';
-	    }
-	    else
-	    {
-	    	$aux = 'https://';
-	    }
-
-	    Header('Location: ' . $aux . $fwConstruct . 'login.php');
-		exit;
-	}
-
-	if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)
-	{
-		if ($_SERVER['HTTPS'] != 'on') {
-   			Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']);
-			exit;
-		}
-	}
-
-	/*
-		This is the menuaction driver for the multi-layered design
-	*/
-
-	if(isset($_REQUEST['menuaction']))
-	{
-		list($mobileapp,$class,$method) = explode('.',@$_REQUEST['menuaction']);
-		if(! $mobileapp || ! $class || ! $method)
-		{
-			$invalid_data = True;
-		}
-	}
-	else
-	{
-		$mobileapp = 'home';
-		$invalid_data = True;
-	}
-
-
-	$GLOBALS['phpgw_info']['flags'] = array(
-		'noheader'   => True,
-		'nonavbar'   => True,
-		'currentapp' => 'mobile',
-		'mobileapp'  => $mobileapp,
-	);
-
-	include('../header.inc.php');
-	include('./mobile_header.inc.php');
-
-	if($mobileapp == 'home')
-	{
-		start_prefered_app();
-	}
-
-	$GLOBALS[$class] = CreateObject(sprintf('%s.%s','mobile',$class));
-	$public_functions = $GLOBALS[$class]->public_functions;
-	if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data)
-	{
-		$GLOBALS['phpgw_info']['mobiletemplate'] = CreateObject("mobile.mobiletemplate");
-		$GLOBALS['phpgw_info']['mobiletemplate'] -> print_page($class,$method);
-		unset($mobileapp);
-		unset($class);
-		unset($method);
-		unset($invalid_data);
-
-	}
-	else
-	{
-		if(!$mobileapp || !$class || !$method)
-		{
-			if(@is_object($GLOBALS['phpgw']->log))
-			{
-				$GLOBALS['phpgw']->log->message(array(
-					'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
-					'p1'   => $menuaction,
-					'line' => __LINE__,
-					'file' => __FILE__
-				));
-			}
-		}
-
-		if(!is_array($GLOBALS[$class]->public_functions) || ! $GLOBALS[$class]->public_functions[$method] && $method)
-		{
-			if(@is_object($GLOBALS['phpgw']->log))
-			{
-				$GLOBALS['phpgw']->log->message(array(
-					'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
-					'p1'   => $method,
-					'line' => __LINE__,
-					'file' => __FILE__
-				));
-			}
-		}
-		if(@is_object($GLOBALS['phpgw']->log))
-		{
-			$GLOBALS['phpgw']->log->commit();
-		}
-		start_prefered_app();
-	}
-
-?>
Index: branches/2.2.0.1/mobile/mobile_header.inc.php
===================================================================
--- branches/2.2.0.1/mobile/mobile_header.inc.php	(revision 3992)
+++ 	(revision )
@@ -1,53 +1,0 @@
-<?php
-	/**************************************************************************\
-	* eGroupWare                                                               *
-	* http://www.egroupware.org                                                *
-	* The file written by Mï¿œrio Cï¿œsar Kolling <mario.kolling@serpro.gov.br>    *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-	/*******************************************\
-	 * Define a aplicaï¿œï¿œo mobile preferencial  *
-	\*******************************************/
-	//TODO: Ler do banco do expresso as preferï¿œncias do usuï¿œrio e definir a aplicaï¿œï¿œo mï¿œvel padrï¿œo
-	// por enquanto isto serï¿œ hardcoded para mobilemail.
-
-	$GLOBALS['phpgw_info']['flags']['currentapp'] = 'mobile';
-	$GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'home';
-
-	if ( is_null($GLOBALS['phpgw_info']['server']['template_set']) )
-		$GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
-	if ( !file_exists( PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set'] ) )
-		$GLOBALS['phpgw_info']['server']['template_set'] = 'default';
-
-	/*
-	 * @
-
-	 * @abstract Função que chama a aplicação móvel preferencial.
-	 * @author Mário Cesar Kolling <mario.kolling@serpro.gov.br>
-	 */
-	function start_prefered_app(){
-		//TODO: Determinar qual a aplicaï¿œï¿œo mï¿œvel preferida e iniciï¿œ-la.			
-		switch($GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app']){
-			case home:
-				$link = "ui_home.index";		
-				break;			
-			case mobilemail:
-				$link = "ui_mobilemail.change_folder&folder=0";		
-				break;
-			case mobilecalendar:
-				$link = "ui_mobilecalendar.index";
-				break;
-			case mobilecc:
-				$link = "ui_mobilecc.contacts_list";
-				break;		
-			default:
-				break;		
-		}		
-		$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link("index.php?menuaction=mobile.".$link));
-	}
-?>
Index: branches/2.2.0.1/mobile/login.php
===================================================================
--- branches/2.2.0.1/mobile/login.php	(revision 3892)
+++ 	(revision )
@@ -1,157 +1,0 @@
-<?php
-	//TODO: Trocar name="login" para name="user" no campo username
-
-	$phpgw_info = array();
-	$submit = False;
-
-	$GLOBALS['phpgw_info']['flags'] = array(
-		'disable_Template_class' => True,
-		'login'                  => True,
-		'currentapp'             => 'login',
-		'currentdir'             => '/mobile',
-		'noheader'               => True
-	);
-
-	include('../header.inc.php');
-	include('./mobile_header.inc.php');
-	$GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
-
-	if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1)
-		start_prefered_app();
-		
-	if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)	{
-		if ($_SERVER['HTTPS'] != 'on') {
-			$proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']);
-            $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST'];
-   			Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']);
-			exit;
-		}
-	}
-
-	$GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions');
-	$GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];
-	$tmpl = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-	$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
-	$tmpl->set_file(array('login_form' => 'login.tpl'));
-	$tmpl->set_block('login_form','page');
-	$tmpl->set_block('login_form','success_message');
-	$tmpl->set_block('login_form','error_message');
-	
-	//verificando a mensagem erro ou sucesso
-	$cd = check_logoutcode($_GET['cd']);
-	$tmpl->set_var('message', $cd);
-	
-	if(trim($cd) != "")
-		$tmpl->parse('message_box', (($_GET['cd'] == 1) ? 'success_message' : 'error_message') ,true);
-
-	function check_logoutcode($code) {
-		switch($code) {
-			case 1:
-				logout();
-				return lang('You have been successfully logged out');
-			case 2:
-				return lang('Sorry, your login has expired');
-			case 4:
-				return lang('Cookies are required to login to this site.');
-			case 5:
-				return lang('Bad login or password');
-			case 6:
-				return lang('Your password has expired, and you do not have access to change it');
-			case 98:
-				return lang('Account is expired');
-			case 99:
-				return lang('Blocked, too many attempts');
-			case 10:
-				$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
-				$GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
-				$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
-				if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4')	{
-					$GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID);
-				}
-				return lang('Your session could not be verified.');
-			default:
-				return '';
-		}
-	}
-
-	if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER']))	{
-		$submit = True;
-		$login  = $_SERVER['PHP_AUTH_USER'];
-		$passwd = $_SERVER['PHP_AUTH_PW'];
-		$passwd_type = 'text';
-	}
-	else {
-		$passwd = $_POST['passwd'];
-		$passwd_type = $_POST['passwd_type'];
-	}
-
-	if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) {
-		if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
-			!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])){
-			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link($GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php','cd=5'));
-		}
-
-		if(!$submit)
-			$login = $_POST['login'];
-
-		$GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u');
-
-		if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']){
-			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason);
-		}
-		else {
-			if(isset($_POST['max_resolution']) && $_POST['max_resolution'] > 600) {
-				$GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'mobilemail';
-				$GLOBALS['phpgw']->session->appsession('mobile.layout','mobile','mini_desktop');
-			} else {
-				$GLOBALS['phpgw']->session->appsession('mobile.layout','mobile','mini_mobile');
-			}
-			
-			$preferences = $GLOBALS['phpgw']->preferences->read();
-			$_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail'];
-			
-			start_prefered_app();
-		}
-	}
-	elseif ($_GET['lang'])	{
-		$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang'];
-	}
-	elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id)	{
-		list($lang) = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
-		$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang;
-	}
-
-	$tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());
-	$tmpl->set_var('cookie',$last_loginid);
-	$tmpl->set_var('lang_username', lang('username'));
-	$tmpl->set_var('lang_password', lang('password'));
-	$tmpl->set_var('lang_login', lang('login'));
-	$tmpl->set_var('lang_notices', lang('notices'));
-	$tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);
-	$tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']);
-	$tmpl->set_var('language_select','');
-	$tmpl->set_var($var);
-	$tmpl->set_block('login_form','language_select');
-	$tmpl->pfp('loginout','page');
-
-	function logout(){
-		$verified = $GLOBALS['phpgw']->session->verify();
-		if ($verified)
-		{
-			if (file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
-			{
-				$dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
-				while ($file = readdir($dh))
-				{
-					if ($file != '.' && $file != '..')
-					{
-						unlink($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file);
-					}
-				}
-				rmdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
-			}
-			$GLOBALS['phpgw']->hooks->process('logout');
-			$GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
-		}
-	}
-?>
