Index: branches/2.2/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3632)
+++ branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3636)
@@ -124,4 +124,5 @@
 preview %1	filemanager	pt-br	Visualizar %1
 preview of %1	filemanager	pt-br	Visualizar %1
+Previous	filemanager	pt-br	Anterior
 quick jump to	filemanager	pt-br	Atalho para:
 reload	filemanager	pt-br	Recarregar
Index: branches/2.2/filemanager/inc/class.uiconfig.inc.php
===================================================================
--- branches/2.2/filemanager/inc/class.uiconfig.inc.php	(revision 3632)
+++ branches/2.2/filemanager/inc/class.uiconfig.inc.php	(revision 3636)
@@ -9,4 +9,5 @@
 
 require_once("load_lang.php");
+require_once("class.notifications.inc.php");
 
 class uiconfig
@@ -259,8 +260,28 @@
 		$GLOBALS['phpgw']->common->phpgw_header();
 		
-		if( $_POST['button_add'] )
+		$notify 		= new notifications();
+		$value_email_to = "";
+
+		if( $_POST['button_add'] || $_GET['editUser'] )
 		{
+			if( $_GET['editUser'] )
+			{
+				$result = $notify->SearchId($_GET['editUser']);
+				$emails_to = explode(",", $result[0]['email_to']);
+				
+				for( $i = 0 ; $i < count($emails_to); $i++ )
+				{
+					$value_email_to .= "<tr>";
+					$value_email_to .= "<td>".$emails_to[$i]."</td>";
+					$value_email_to .= "<td align='center'>";
+					$value_email_to .= "<a href='javascript:void();' onclick='notify.deleteEmail(\"".$emails_to[$i]."\",this);'>Remover</a>";
+					$value_email_to .= "</td>";
+					$value_email_to .= "</tr>";
+				}
+			}
+			
 			$vars = array(
 							'action_url_back'	=> "./index.php?menuaction=filemanager.uiconfig.notifyUploads",
+							'attr_readonly'		=> ( $result[0]['email_from'] ) ? 'readonly="readonly"' : "",
 							'lang_Add'			=> lang("Add"),
 							'lang_Back'			=> lang("Back"),
@@ -272,6 +293,7 @@
 							'lang_from'			=> lang("From"),
 							'lang_to'			=> lang("To"),
-							'value_conf_email'	=> "",
-						 );	
+							'value_email_from'	=> ( $result[0]['email_from'] ) ? $result[0]['email_from'] : "",
+							'value_email_to'	=> $value_email_to
+			);
 			
 			$handle = "AddEmail";
@@ -279,30 +301,48 @@
 		else
 		{	
-			$value_config = "";
-			
-			if( trim($_POST['search_email']) != "" )
+			if( trim( $_POST['search_email'] ) != "" )
 			{
-				require_once("class.notifications.inc.php");
-				$notify = new notifications();
-				$result = $notify->SearchEmail( $_POST['search_email'] );
+				$limit	= 10;
+				$offset	= 1;
+				
+				if( $_POST['bt_next'] )
+					$offset = $_POST['button_next'] + 1 ; 				
+
+				if( $_POST['bt_previous'] && $_POST['button_next'] > 1)
+				{
+					$offset = $_POST['button_next'] - 1;
+				}
+				
+				$result = $notify->SearchEmail( $_POST['search_email'], $limit, $offset );
 
 				foreach( $result as $tmp )
 				{
-					$value_config .= '<tr>';
-					$value_config .= '<td align="left" width="40%">'.$tmp['email_from'].'</td>';
-					$value_config .= '<td align="left" width="40%">'.str_replace(",", "<br/>", $tmp['email_to']).'</td>';
-					$value_config .= '<td align="center" width="10%">Editar</td>';
-					$value_config .= '<td align="center" width="10%"><a href="javascript:void();" onclick="notify.deleteEmailUser(\''.$tmp['filemanager_id'].'\', this);">Excluir</a></td>';
-					$value_config .= '</tr>';
+					$value_email_to .= '<tr>';
+					$value_email_to .= '<td align="left" width="40%">'.$tmp['email_from'].'</td>';
+					$value_email_to .= '<td align="left" width="40%">'.str_replace(",", "<br/>", $tmp['email_to']).'</td>';
+					$value_email_to .= '<td align="center" width="10%"><a href="./index.php?menuaction=filemanager.uiconfig.notifyUploads&editUser='.$tmp['filemanager_id'].'">'.lang("Edit").'</a></td>';
+					$value_email_to .= '<td align="center" width="10%"><a href="javascript:void();" onclick="notify.deleteEmailUser(\''.$tmp['filemanager_id'].'\', this);">'.lang("Delete").'</a></td>';
+					$value_email_to .= '</tr>';
 				}
 			}
 			
 			$vars = array(
-							'action_url'		=> "./index.php?menuaction=filemanager.uiconfig.notifyUploads",
-							'action_url_back'	=> "./admin",
-							'bt_previous'		=> "<input type='submit' name='bt_previous' value='Anterior' />",
-							'bt_next' 			=> "<input type='submit' name='bt_next' value='Proximo' />",
-							'lang_search'		=> lang("Search"),
-							'value_config'		=> $value_config													
+							'action_url'			=> "./index.php?menuaction=filemanager.uiconfig.notifyUploads",
+							'action_url_back'		=> "./admin",
+							'display_bt_previous'	=> ( $offset > 1 ) ? "line" : "none",
+							'display_bt_next'		=> ( count($result) < $limit ) ? "none" : "line",
+							'lang_Add'				=> lang("Add"),
+							'lang_Back'				=> lang("Back"),
+							'lang_Delete'			=> lang("Delete"),
+							'lang_Edit'				=> lang("Edit"),
+							'lang_From'				=> lang("From"),
+							'lang_To'				=> lang("To"),
+							'lang_search'			=> lang("Search"),
+							'lang_next'				=> lang("Next"),
+							'lang_previous'			=> lang("Previous"),
+							'value_search_email'	=> $_POST['search_email'],
+							'value_email_to'		=> $value_email_to,
+							'value_next'			=> $offset,							
+							'value_previous'		=> $limit
 						 );
 			
Index: branches/2.2/filemanager/inc/class.notifications.inc.php
===================================================================
--- branches/2.2/filemanager/inc/class.notifications.inc.php	(revision 3632)
+++ branches/2.2/filemanager/inc/class.notifications.inc.php	(revision 3636)
@@ -130,14 +130,12 @@
 	{
 		$id 	= $_GET['filemanagerId']; 		
-		$return	= "";
+		$return	= "False";
 		
 		if( $this->db )
 		{
 			$query = "DELETE FROM phpgw_filemanager_notification WHERE filemanager_id = '".$id."';";
-			
-			if( !$this->db->query($query) )
-				$return	= "False";
-			else
-				$return = "True";
+
+			if( $this->db->query( $query ) )
+				$return	= "True";
 		}
 		
@@ -145,11 +143,28 @@
 	}
 	
-	public function SearchEmail( $pData )
+	public function SearchId( $pData )
 	{
-		$query = "SELECT * FROM phpgw_filemanager_notification WHERE email_from like '%".$pData."%';";
+		$query = "SELECT * FROM phpgw_filemanager_notification WHERE filemanager_id ='".$pData."';";
 		
 		if( $this->db )
 		{
 			if( $this->db->query($query) )
+			{
+				while( $this->db->next_record())
+					$result[] = $this->db->row();					
+			}
+		}
+		
+		return $result;
+	}
+	
+	public function SearchEmail( $pEmail, $pLimit, $pOffset )
+	{
+		$query = "SELECT * FROM phpgw_filemanager_notification WHERE email_from like '%".$pEmail."%' " .
+				 "ORDER BY email_from OFFSET (".$pOffset."-1)*".$pLimit." LIMIT ".$pLimit.";";
+
+		if( $this->db )
+		{
+			if( $this->db->query($query, __LINE__, __FILE__, $pOffset) )
 			{
 				while( $this->db->next_record())
Index: branches/2.2/filemanager/templates/default/notify_upload.tpl
===================================================================
--- branches/2.2/filemanager/templates/default/notify_upload.tpl	(revision 3632)
+++ branches/2.2/filemanager/templates/default/notify_upload.tpl	(revision 3636)
@@ -9,5 +9,5 @@
 			<span style="position:relative; float:left;">
 				<form method="POST" action="{action_url}">
-					<input type="submit" name="button_add" value="Adicionar" />
+					<input type="submit" name="button_add" value="{lang_Add}" />
 				</form>	
 			</span>
@@ -15,5 +15,5 @@
 				<form method="POST" action="{action_url}">
 					<label style="margin-left:5px;">{lang_search}.:</label>
-					<input type="text" name="search_email" size="30" maxlength="30" />
+					<input type="text" name="search_email" size="30" maxlength="30" value="{value_search_email}" />
 				</form>
 			</span>
@@ -23,22 +23,21 @@
 		<table style="border:0px; width:100% !important;">
 			<tr class="th">
-				<td align="left" width="40%">De ( Email )</td>
-				<td align="left" width="40%">Para ( Email ) </td>
-				<td align="center" width="10%">Editar</td>
-				<td align="center" width="10%">Excluir</td>	
+				<td align="left" width="40%">{lang_From} ( Email )</td>
+				<td align="left" width="40%">{lang_To} ( Email ) </td>
+				<td align="center" width="10%">{lang_Edit}</td>
+				<td align="center" width="10%">{lang_Delete}</td>	
 			</tr>
-			<tr>
-				{value_config}
-			</tr>
+			{value_email_to}
 		</table>
 		
 		<div>
 			<div style="margin-top:10px; position:relative; float:left;">
-				<input type="button" onClick="document.location.href='{action_url_back}'" value="Voltar"/>
+				<input type="button" onClick="document.location.href='{action_url_back}'" value="{lang_Back}"/>
 			</div>
 			<div style="margin:10px; position:relative; float:right;">
 				<form method="POST" action="{action_url}">
-					{bt_previous}
-					{bt_next}
+					<input style="display:{display_bt_previous}" type="submit" name="bt_previous" value="{lang_previous}"/>
+					<input style="display:{display_bt_next}" type="submit" name="bt_next" value="{lang_next}" />					
+					<input type="hidden" name="search_email" value="{value_search_email}" />
 					<input type="hidden" name="button_previous" value="{value_previous}" />
 					<input type="hidden" name="button_next" value="{value_next}" />
@@ -56,19 +55,16 @@
 	<script src='filemanager/js/notifications.js'></script>
 	
-	<div id="principal" style="width:35%; border:1px solid #000; margin: 0 auto; padding: 10px; text-align: left;">
+	<div id="principal" style="width:35%; border:1px solid #000; margin:0 auto; padding:10px; text-align:left;">
 		
 		<div style="margin:5 0 15 5;">	
-			
 			<fieldset style="width:400px;">	
 				<legend>{lang_legend1}</legend>
 				<label>{lang_from}</label>
 				<br/>
-				<input id="filemanager_add_email_from" type="text" size="45" maxlength="50" />
+				<input id="filemanager_add_email_from" value="{value_email_from}" {attr_readonly} type="text" size="45" maxlength="50" />
 			</fieldset>
-			
 		</div>
 		
 		<div style="margin:5px;">	
-			
 			<fieldset style="width:400px;">
 				<legend>{lang_legend2}</legend>
@@ -78,9 +74,7 @@
 				<input type="button" value="{lang_Add}" onclick="notify.addEmail();" />
 			</fieldset>
-			
 		</div>
 		
 		<div style="margin:5px;">
-			
 			<fieldset style="width:400px;">
 				<legend>{lang_legend3}</legend>
@@ -90,8 +84,7 @@
 						<td width="20%" align="center">{lang_Excluir}</td>
 					</tr>
-					{value_conf_email}
+					{value_email_to}
 				</table>
 			</fieldset>
-			
 		</div>
 
