Index: /trunk/jabberit_messenger/setup/phpgw_pt-br.lang
===================================================================
--- /trunk/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 1530)
+++ /trunk/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 1616)
@@ -13,5 +13,7 @@
 Close	jabberit_messenger	pt-br	Fechar
 Close this menu	jabberit_messenger	pt-br	Fechar Menu
+Content	common	pt-br	Conteúdo
 Connection	jabberit_messenger	pt-br	Conexão
+Date and Hour	common	pt-br	Data e Hora
 Delete	jabberit_messenger	pt-br	Excluir
 Dnd	jabberit_messenger	pt-br	Não Perturbe
@@ -25,6 +27,8 @@
 External Participants	common	pt-br	Participantes Externos
 External Participants	jabberit_messenger	pt-br	Participantes Externos
+First Message	common	pt-br	Primeira Mensagem
 Free organization for group	common	pt-br	Liberar organização por grupo
 Free For Chat	jabberit_messenger	pt-br	Livre Bate-Papo
+From 	common	pt-br	De
 Group	jabberit_messenger	pt-br	Grupo
 Help	jabberit_messenger	pt-br	Ajuda
@@ -32,7 +36,9 @@
 Invisible	jabberit_messenger	pt-br	Invisível
 jabberit_messenger	common	pt-br	Expresso JMessenger
+Last Message	common	pt-br	Última Mensagem
 Liberar Organizações para grupos restritos	common	pt-br	Liberar Organizações para grupos restritos
 List of Contacts	jabberit_messenger	pt-br	Lista de Contatos
 Loading...	jabberit_messenger	pt-br	Carregando...
+Log Messaging (Bandersnatch)	common	pt-br	Log de Mensagens (Bandersnatch)
 Map organization for realm jabber	common	pt-br	Mapear organização por domínio jabber
 Minutes	jabberit_messenger	pt-br	Minutos
Index: /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php	(revision 1616)
+++ /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php	(revision 1616)
@@ -0,0 +1,352 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  * ------------------------------------------------------------------------- *
+  *  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.                                               *
+  \***************************************************************************/
+
+require_once "class.bologmessage.inc.php";
+
+class uilogmessage
+{
+	private $bo;
+	
+	public $public_functions = array(
+		'getLog'  => True,
+		'getMessageUser' => True,
+		'getMessageUserComplete' => True,		
+		'getMessageUserDate' => True
+	);
+	
+	function __construct()
+	{
+		$this->bo = new bologmessage(); 
+	}
+	
+	private function formatDate($pDate)
+	{
+		$newDt = date_parse($pDate);
+		
+		// Hour
+		$newDt['hour'] = ( strlen($newDt['hour']) == 1 ) ? "0".$newDt['hour'] : $newDt['hour'];
+		$newDt['minute'] = ( strlen($newDt['minute']) == 1 ) ? "0".$newDt['minute'] : $newDt['minute'];
+		$newDt['second'] = ( strlen($newDt['second']) == 1 ) ? "0".$newDt['second'] : $newDt['second']; 
+		
+		// Date
+		$newDt['day'] = ( strlen($newDt['day']) == 1 ) ? "0".$newDt['day'] : $newDt['day'];
+		$newDt['month'] = ( strlen($newDt['month']) == 1 ) ? "0".$newDt['month'] : $newDt['month'];
+		
+		return $newDt['hour'].":".$newDt['minute'].":".$newDt['second'] . " - " . $newDt['day']."/".$newDt['month']."/".$newDt['year'];
+	}
+	
+	public function getLog()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Log de Mensagens Instântaneas - BanderSnatch';	
+
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+		
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger' => 'logMessagesJabber.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','log_message');	
+		$GLOBALS['phpgw']->template->set_var(array(
+													'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUser'),
+													'action_url_back' => './admin',
+													'bt_previous' => '<input type="submit" name="bt_previous" value="Anterior" />',
+													'bt_next' => '<input type="submit" name="bt_next" value="Proximo" />',													
+													'label_back' => lang("Back"),
+													'label_first_message' => lang("First Message"),
+													'label_last_message' => lang("Last Message"),
+													'label_total' => lang("Total"),
+													'label_user' => lang("User"),
+													'label_view' => lang("View"),
+													'value_messages' => "",
+													'value_next' => 30,
+													'value_previous' => 0,
+													'value_txtUser' => "" 													
+												));
+	
+		$GLOBALS['phpgw']->template->pparse('out','log_message');
+	}
+	
+	public function getMessageUser()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Log de Mensagens Instântaneas - BanderSnatch';	
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+		
+		$value_messages = "";
+
+		if(trim($_REQUEST['txtUser']))
+		{
+			$limitPrevious 	= 0;
+			$limitNext 		= 30;
+
+			if( $_REQUEST['bt_next'] )
+			{
+				$limitPrevious	= $_REQUEST['button_previous'] + 30;
+				$limitNext		= 30;		
+			}
+			else if ( $_REQUEST['bt_previous'] )
+			{
+				if( $_REQUEST['button_previous'] != 0 )
+				{
+					$limitPrevious	= $_REQUEST['button_previous'] - 30;
+					$limitNext	 	= 30;
+				}
+				else
+				{
+					$limitPrevious	= 0;
+					$limitNext	 	= 30;
+				}
+			}
+			
+			if($_REQUEST['pg1_next'] || $_REQUEST['pg1_previous'])
+			{
+ 				$limitPrevious	= $_REQUEST['pg1_previous'];
+				$limitNext 		= $_REQUEST['pg1_next'];
+			}
+			
+			$data = $this->bo->getMessageUser($_REQUEST['txtUser'], $limitPrevious, $limitNext );
+			
+			foreach($data as $key=>$value)
+			{
+				$className = (($key % 2 ) == 0 ) ? "row_off" : "row_on";
+				
+				$value_messages .= "<tr>";
+				$value_messages .= "<td align='left' style='width:40%;' class='".$className."'>". $value['message_from']."</td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'>".$value['total_messages']."</td>";
+				$value_messages .= "<td align='center' style='width:20%;' class='".$className."'>".$this->formatDate($value['first_message'])."</td>";
+				$value_messages .= "<td align='center' style='width:20%;' class='".$className."'>".$this->formatDate($value['last_message'])."</td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'><a href='index.php?menuaction=jabberit_messenger.uilogmessage.getMessageUserDate&txtUser=".$_REQUEST['txtUser']."&user=".$value['message_from']."&first_message=".$value['first_message']."&last_message=".$value['last_message']."&pg1_previous=".$limitPrevious."&pg1_next=".$limitNext."'>".lang("View")."</a></td>";
+				$value_messages .= "</tr>";
+			}
+		}
+
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger' => 'logMessagesJabber.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','log_message');	
+		$GLOBALS['phpgw']->template->set_var(array(
+													'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUser'),
+													'action_url_back' => './admin',
+													'bt_previous' => ( $limitPrevious == 0 ) ? '<input type="submit" name="bt_previous" value="Anterior" disabled="disabled" style="color:#cecece !important"/>' : '<input type="submit" name="bt_previous" value="Anterior"/>',
+													'bt_next' => ( count($data) < 30 ) ? '<input type="submit" name="bt_next" value="Proximo" disabled="disabled" style="color:#cecece !important"/>': '<input type="submit" name="bt_next" value="Proximo"/>',													
+													'label_back' => lang("Back"),
+													'label_first_message' => lang("First Message"),
+													'label_last_message' => lang("Last Message"),
+													'label_total' => lang("Total"),													
+													'label_user' => lang("User"),
+													'label_view' => lang("View"),													 
+													'value_messages' => $value_messages,
+													'value_next' => $limitNext,
+													'value_previous' => $limitPrevious,
+													'value_txtUser' => $_REQUEST['txtUser']
+												));
+	
+		$GLOBALS['phpgw']->template->pparse('out','log_message');
+	}
+	
+	public function getMessageUserDate()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Log de Mensagens Instântaneas - BanderSnatch';	
+
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+		
+		$user 			= $_REQUEST['user'];
+		$firstDate		= $_REQUEST['first_message'];
+		$lastDate		= $_REQUEST['last_message'];
+		$value_messages = "";		
+		
+		$limitPrevious 	= 0;
+		$limitNext 		= 30;
+		
+		if( $_REQUEST['bt_next'] )
+		{
+			$limitPrevious	= $_REQUEST['button_previous'] + 30;
+			$limitNext		= 30;		
+		}
+		else if ( $_REQUEST['bt_previous'] )
+		{
+			if( $_REQUEST['button_previous'] != 0 )
+			{
+				$limitPrevious	= $_REQUEST['button_previous'] - 30;
+				$limitNext	 	= 30;
+			}
+			else
+			{
+				$limitPrevious	= 0;
+				$limitNext	 	= 30;
+			}
+		}
+		
+		if($_REQUEST['pg2_next'] || $_REQUEST['pg2_previous'])
+		{
+ 			$limitPrevious	= $_REQUEST['pg2_previous'];
+			$limitNext 		= $_REQUEST['pg2_next'];
+		}
+
+		$data = $this->bo->getMessageUserDate($user, $firstDate, $lastDate, $limitPrevious, $limitNext );
+		
+		if(count($data) > 0 )
+		{
+			foreach($data as $key=>$value)
+			{
+				$className = (($key % 2 ) == 0 ) ? "row_off" : "row_on";
+				
+				$value_messages .= "<tr>";
+				$value_messages .= "<td align='left' style='width:30%;' class='".$className."'> ".$value['message_from']." </td>";
+				$value_messages .= "<td align='left' style='width:30%;' class='".$className."'> ".$value['message_to']." </td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'> ".$value['total_messages']." </td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'> ".$this->formatDate($value['first_message'])." </td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'> ".$this->formatDate($value['last_message'])." </td>";
+				$value_messages .= "<td align='center' style='width:10%;' class='".$className."'><a href='index.php?menuaction=jabberit_messenger.uilogmessage.getMessageUserComplete&txtUser=".$_REQUEST['txtUser']."&user=".$user."&user1=".$value['message_from']."&user2=".$value['message_to']."&dtfirst=".$value['first_message']."&dtlast=".$value['last_message']."&first_message=".$_REQUEST['first_message']."&last_message=".$_REQUEST['last_message']."&pg1_previous=".$_REQUEST['pg1_previous']."&pg1_next=".$_REQUEST['pg1_next']."&pg2_previous=".$limitPrevious."&pg2_next=".$limitNext."'>".lang("View")."</a></td>";
+				$value_messages .= "</tr>";
+			}
+		}
+		
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger' => 'logMessagesJabber.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','log_message_date');	
+		$GLOBALS['phpgw']->template->set_var(array(
+													'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUserDate'),
+													'action_url_back' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUser'),
+													'bt_previous' => ( $limitPrevious == 0 ) ? '<input type="submit" value="Anterior" name="bt_previous" disabled="disabled" style="color:#cecece !important"/>' : '<input type="submit" value="Anterior" name="bt_previous" />',
+													'bt_next' => ( count($data) < 30 ) ? '<input type="submit" value="Próxima" name="bt_next" disabled="disabled" style="color:#cecece !important"/>' : '<input type="submit" value="Próxima" name="bt_next" />',
+													'label_back' => lang("Back"),
+													'label_first_message' => lang("First Message"),
+													'label_last_message' => lang("Last Message"),
+													'label_next' => lang("Next"),													
+													'label_previous' => lang("Previous"),
+													'label_total' => lang("Total"),	
+													'label_user_1' => lang("From"),
+													'label_user_2' => lang("To"),
+													'label_view' => lang("View"),
+													'value_first_message' => $_REQUEST['first_message'],
+													'value_last_message' => $_REQUEST['last_message'],												
+													'value_messages' => $value_messages,
+													'value_next' => $limitNext,
+													'value_pg1_next' => $_REQUEST['pg1_next'],
+													'value_pg1_previous' => $_REQUEST['pg1_previous'],
+													'value_previous' => $limitPrevious,
+													'value_txtUser' => $_REQUEST['txtUser'],
+													'value_user' => $_REQUEST['user'] 
+												));
+	
+		$GLOBALS['phpgw']->template->pparse('out','log_message_date');
+	}
+	
+	public function getMessageUserComplete()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Log de Mensagens Instântaneas - BanderSnatch';	
+
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+
+		$user1	= $_REQUEST['user1'];
+		$user2	= $_REQUEST['user2'];
+		$firstDate	= $_REQUEST['dtfirst'];
+		$lastDate	= $_REQUEST['dtlast'];
+		$value_messages	= "";
+		
+		$limitPrevious 	= 0;
+		$limitNext 		= 30;
+		
+		if( $_REQUEST['bt_next'] )
+		{
+			$limitPrevious	= $_REQUEST['button_previous'] + 30;
+			$limitNext		= 30;		
+		}
+		else if ( $_REQUEST['bt_previous'] )
+		{
+			if( $_REQUEST['button_previous'] != 0 )
+			{
+				$limitPrevious	= $_REQUEST['button_previous'] - 30;
+				$limitNext	 	= 30;
+			}
+			else
+			{
+				$limitPrevious	= 0;
+				$limitNext	 	= 30;
+			}
+		}
+		
+		$data = $this->bo->getMessageUserComplete( $user1, $user2, $firstDate, $lastDate, $limitPrevious, $limitNext );
+		
+		if( count($data) > 0 )
+		{
+			foreach($data as $key=>$value)
+			{
+				$className = (($key % 2 ) == 0 ) ? "row_off" : "row_on";	
+				
+				$value_messages .= "<tr>";
+				$value_messages .= "<td align='left' style='width:25%;' class='".$className."'> ".$value['message_from']." </td>";
+				$value_messages .= "<td align='left' style='width:25%;' class='".$className."'> ".$value['message_to']." </td>";
+				$value_messages .= "<td align='left' style='width:40%;' class='".$className."'> ".utf8_decode($value['message_body'])." </td>";
+				$value_messages .= "<td align='center' style='width:10%' class='".$className."'> ".$this->formatDate($value['message_timestamp'])." </td>";
+				$value_messages .= "</tr>";
+			}
+		}
+		
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger' => 'logMessagesJabber.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','log_message_complete');	
+		$GLOBALS['phpgw']->template->set_var(array(
+													'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUserComplete'),
+													'action_url_back' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uilogmessage.getMessageUserDate'),
+													'bt_previous' => ( $limitPrevious == 0 ) ? '<input type="submit" value="Anterior" name="bt_previous" disabled="disabled" style="color:#cecece !important"/>' : '<input type="submit" value="Anterior" name="bt_previous"/>',
+													'bt_next' => ( count($data) < 30 ) ? '<input type="submit" value="Próximo" name="bt_next" disabled="disabled" style="color:#cecece !important"/>' : '<input type="submit" value="Próximo" name="bt_next" />',
+													'label_back' => lang("Back"),													
+													'label_body' => lang("Content"),
+													'label_date' =>	lang("Date and Hour"),
+													'label_next' => lang("Next"),
+													'label_previous' => lang("Previous"),
+													'label_user_1' => lang("From"),
+													'label_user_2' => lang("To"),												
+													'value_first_message' => $_REQUEST['first_message'],
+													'value_last_message' => $_REQUEST['last_message'],
+													'value_messages' => $value_messages,
+													'value_next' => $limitNext,
+													'value_previous' => $limitPrevious,
+													'value_pg1_next' => $_REQUEST['pg1_next'],
+													'value_pg1_previous' => $_REQUEST['pg1_previous'],
+													'value_pg2_next' => $_REQUEST['pg2_next'],
+													'value_pg2_previous' => $_REQUEST['pg2_previous'],
+													'value_txtUser' => $_REQUEST['txtUser'],
+													'value_user' => $_REQUEST['user'],
+													'value_user1' => $_REQUEST['user1'],
+													'value_user2' => $_REQUEST['user2'],
+													'value_dtfirst' => $_REQUEST['dtfirst'],
+													'value_dtlast' => $_REQUEST['dtlast']
+												));
+	
+		$GLOBALS['phpgw']->template->pparse('out','log_message_complete');
+	}		
+}
+
+?>
Index: /trunk/jabberit_messenger/inc/hook_admin.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/hook_admin.inc.php	(revision 946)
+++ /trunk/jabberit_messenger/inc/hook_admin.inc.php	(revision 1616)
@@ -20,4 +20,5 @@
 		'Free organization for group' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uienabledgroups.getGroups'),
 		'Map organization for realm jabber' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uihostsjabber.edit_conf'),
+		'Log Messaging (Bandersnatch)' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=jabberit_messenger.uilogmessage.getLog')
 	);
 
Index: /trunk/jabberit_messenger/inc/class.bologmessage.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.bologmessage.inc.php	(revision 1616)
+++ /trunk/jabberit_messenger/inc/class.bologmessage.inc.php	(revision 1616)
@@ -0,0 +1,95 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  * ------------------------------------------------------------------------- *
+  *  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('PHPGW_INCLUDE_ROOT','../');	
+define('PHPGW_API_INC','../phpgwapi/inc');
+require_once(PHPGW_API_INC . '/class.db.inc.php');
+
+class bologmessage
+{
+	private $db;
+	private $db_name;
+	private $db_host;
+	private $db_port;
+	private $db_user;
+	private $db_pass;
+	private $db_type;
+	
+	function __construct()
+	{
+		$this->db = new db();
+		$this->db_name = "bandersnatch";
+		$this->db_host = "localhost";
+		$this->db_port = "3306";
+		$this->db_user = "";
+		$this->db_pass = "";
+		$this->db_type = "mysql";
+		$this->connectDB();
+	}
+
+	function __destruct()
+	{
+		$this->db->disconnect();		
+	}
+
+	private function connectDB()
+	{
+		$this->db->connect($this->db_name,$this->db_host,$this->db_port,$this->db_user,$this->db_pass,$this->db_type);
+	}	
+
+	public function getMessageUser( $pUser, $pLim1, $pLim2 )
+	{
+		$query = "SELECT message_from, COUNT(*) AS total_messages, MIN(message_timestamp) AS first_message, MAX(message_timestamp) AS last_message FROM message WHERE message_from like '%".$pUser."%' GROUP BY message_from LIMIT ".$pLim1.",".$pLim2.";";
+
+		$data = array();
+
+		if($this->db->query($query))
+		{
+			while($this->db->next_record())
+				$data[] = $this->db->row();
+		}
+		
+		return $data;
+	}
+	
+	public function getMessageUserDate( $pUser, $pDtFirst, $pDtLast, $pLim1, $pLim2 )
+	{
+		$data 		= array();
+		$field_1	= "message_from";
+		$field_2	= "message_to";
+
+		$query = "SELECT ".$field_1.", ".$field_2.", COUNT(*) AS total_messages, MIN(message_timestamp) AS first_message, MAX(message_timestamp) AS last_message FROM message WHERE ".$field_1." = '".$pUser."' AND message_timestamp BETWEEN '".$pDtFirst."' AND '".$pDtLast."' GROUP BY ".$field_2." LIMIT ".$pLim1.",".$pLim2.";";
+	
+		if($this->db->query($query))
+		{
+			while($this->db->next_record())
+				$data[] = $this->db->row();
+		}
+		
+		return $data;
+	}
+	
+	public function getMessageUserComplete( $pUser1, $pUser2, $pDtFirst, $pDtLast, $pLim1, $pLim2 )
+	{
+		$query = "SELECT message_from, message_to, message_body, message_timestamp FROM message WHERE message_from = '".$pUser1."' AND message_to = '".$pUser2."' AND message_timestamp BETWEEN '".$pDtFirst."' AND '".$pDtLast."' ORDER BY message_timestamp DESC LIMIT ".$pLim1.",".$pLim2.";";
+		
+		if($this->db->query($query))
+		{
+			while($this->db->next_record())
+				$data[] = $this->db->row();
+		}
+		
+		return $data;
+	}
+}
+
+?>
Index: /trunk/jabberit_messenger/templates/default/logMessagesJabber.tpl
===================================================================
--- /trunk/jabberit_messenger/templates/default/logMessagesJabber.tpl	(revision 1616)
+++ /trunk/jabberit_messenger/templates/default/logMessagesJabber.tpl	(revision 1616)
@@ -0,0 +1,136 @@
+<!-- BEGIN log_message -->
+
+<form method="POST" action="{action_url}">
+	
+	<div style="margin:10px;">
+		<label>{label_user}:</label>
+		<input type="text" size="40" maxlength="50" name="txtUser" value="{value_txtUser}"/>
+		<input type="submit" value="{label_view}" />
+		<br/>
+		<br/>
+	</div>
+	
+	<div style="margin:10px;width:100%;"> 
+		<table align="center" border="0" style="width:100%;">
+			<tr>
+				<td align="left" style="width:40%;" class="row_on"> {label_user} </td>
+				<td align="center" style="width:10%" class="row_on"> {label_total}</td>
+				<td align="center" style="width:20%;" class="row_on"> {label_first_message} </td>
+				<td align="center" style="width:20%" class="row_on"> {label_last_message} </td>
+				<td align="center" style="width:10%;" class="row_on"> {label_view}</td>
+			</tr>
+				{value_messages}			
+		</table>
+	</div>
+	
+	<div>
+		<div style="margin:10px; position:relative; float:left;">
+			<input type="button" onClick="document.location.href='{action_url_back}'" value="{label_back}"/>
+		</div>
+		<div style="margin:10px; position:relative; float:right;">
+			{bt_previous}
+			{bt_next}
+		</div>
+		<input type="hidden" name="button_previous" value="{value_previous}" />
+		<input type="hidden" name="button_next" value="{value_next}" />
+	</div>
+</form>
+
+<!-- END log_message -->
+
+<!-- BEGIN log_message_date -->
+
+	<div style="margin:10px;width:100%;"> 
+		<table align="center" border="0" style="width:100%;">
+			<tr>
+				<td align="left" style="width:30%;" class="row_on"> {label_user_1} </td>
+				<td align="left" style="width:30%" class="row_on"> {label_user_2} </td>
+				<td align="center" style="width:10%;" class="row_on"> {label_total} </td>
+				<td align="center" style="width:10%" class="row_on"> {label_first_message} </td>
+				<td align="center" style="width:10%" class="row_on"> {label_last_message} </td>
+				<td align="center" style="width:10%;" class="row_on"> {label_view} </td>
+			</tr>
+				{value_messages}			
+		</table>
+	</div>
+	
+	<div>
+		<form method="POST" action="{action_url_back}">
+			<div style="margin:10px; position:relative; float:left;">
+				<input type="submit" value="{label_back}"/>
+				<input type="hidden" name="txtUser" value="{value_txtUser}" />
+				<input type="hidden" name="pg1_next" value="{value_pg1_next}">
+				<input type="hidden" name="pg1_previous" value="{value_pg1_previous}">
+			</div>
+		</form>
+		
+		<form method="POST" action="{action_url}">
+			<div style="margin:10px; position:relative; float:right;">
+				{bt_previous}
+				{bt_next}
+			</div>
+			<input type="hidden" name="button_previous" value="{value_previous}" />
+			<input type="hidden" name="button_next" value="{value_next}" />
+			<input type="hidden" name="user" value="{value_user}" />
+			<input type="hidden" name="first_message" value="{value_first_message}" />
+			<input type="hidden" name="last_message" value="{value_last_message}" />
+			<input type="hidden" name="pg1_next" value="{value_pg1_next}">
+			<input type="hidden" name="pg1_previous" value="{value_pg1_previous}">
+		</form>
+		
+	</div>
+
+<!-- END log_message_date -->
+
+<!-- BEGIN log_message_complete -->
+
+	<div style="margin:10px;width:100%;"> 
+		<table align="center" border="0" style="width:100%;">
+			<tr>
+				<td align="left" style="width:25%;" class="row_on"> {label_user_1} </td>
+				<td align="left" style="width:25%" class="row_on"> {label_user_2} </td>
+				<td align="left" style="width:40%;" class="row_on"> {label_body} </td>
+				<td align="center" style="width:10%" class="row_on"> {label_date} </td>
+			</tr>
+				{value_messages}			
+		</table>
+	</div>
+	
+	<div>
+		<form method="POST" action="{action_url_back}">
+			<div style="margin:10px; position:relative; float:left;">
+				<input type="submit" value="{label_back}"/>
+				<input type="hidden" name="user" value="{value_user}" />
+				<input type="hidden" name="first_message" value="{value_first_message}" />
+				<input type="hidden" name="last_message" value="{value_last_message}" />
+				<input type="hidden" name="pg1_next" value="{value_pg1_next}">
+				<input type="hidden" name="pg1_previous" value="{value_pg1_previous}">
+				<input type="hidden" name="pg2_next" value="{value_pg2_next}">
+				<input type="hidden" name="pg2_previous" value="{value_pg2_previous}">
+				<input type="hidden" name="txtUser" value="{value_txtUser}" />
+			</div>
+		</form>
+	
+		<form method="POST" action="{action_url}">
+			<div style="margin:10px; position:relative; float:right;">
+				{bt_previous}
+				{bt_next}
+			</div>
+			<input type="hidden" name="button_previous" value="{value_previous}" />
+			<input type="hidden" name="button_next" value="{value_next}" />
+			<input type="hidden" name="dtfirst" value="{value_dtfirst}" />
+			<input type="hidden" name="dtlast" value="{value_dtlast}" />
+			<input type="hidden" name="first_message" value="{value_first_message}" />
+			<input type="hidden" name="last_message" value="{value_last_message}" />
+			<input type="hidden" name="txtUser" value="{value_txtUser}" />			
+			<input type="hidden" name="user" value="{value_user}" />
+			<input type="hidden" name="user1" value="{value_user1}" />
+			<input type="hidden" name="user2" value="{value_user2}" />
+			<input type="hidden" name="pg1_next" value="{value_pg1_next}">
+			<input type="hidden" name="pg1_previous" value="{value_pg1_previous}">
+			<input type="hidden" name="pg2_next" value="{value_pg2_next}">
+			<input type="hidden" name="pg2_previous" value="{value_pg2_previous}">
+		</form>
+	</div>
+
+<!-- END log_message_complete -->
