Index: extensions/User_Info_Tracking/admin/config.php
===================================================================
--- extensions/User_Info_Tracking/admin/config.php	(revision 19701)
+++ extensions/User_Info_Tracking/admin/config.php	(revision 19701)
@@ -0,0 +1,44 @@
+<?php
+defined('USER_INFO_TRACKING_PATH') or die('Hacking attempt!');
+
+// +-----------------------------------------------------------------------+
+// | Configuration tab                                                     |
+// +-----------------------------------------------------------------------+
+
+// save config
+if (isset($_POST['save_config']))
+{
+  $conf['user_info_tracking'] = array(
+    'uiPerPage' => intval($_POST['uiPerPage']),
+    'uiDefaultSortColumn' => $_POST['uiDefaultSortColumn'],
+    'uiDefaultSortOrder' => $_POST['uiDefaultSortOrder'],
+    'uiDateFormat' => '%c',
+
+    );
+      
+  conf_update_param('user_info_tracking', serialize($conf['user_info_tracking']));
+  array_push($page['infos'], l10n('Information data registered in database'));
+}
+
+
+// send config to template
+$template->assign(array(
+  'user_info_tracking' => $conf['user_info_tracking'],
+
+  ));
+
+// Config Listings
+$template->assign(array(
+  'uiPerPageList' => array('10', '25', '50', '100', '150', '200', '250'),
+  'uiDefaultSortOrderList' => array('ASC', 'DES'),
+  'uiDefaultSortOrderList2' => array('Ascending', 'Descending'),
+  'uiDefaultSortColumnList' => array('id', 'userId', 'userName', 'ipAddress', 'timeStamp', 'action'),
+  'uiDefaultSortColumnList2' => array('ID', 'User ID', 'User Name', 'IP Address', 'Time Stamp', 'Action'),
+  ));
+
+
+
+// define template file
+$template->set_filename('user_info_tracking_content', realpath(USER_INFO_TRACKING_PATH . 'admin/template/config.tpl'));
+
+?>
Index: extensions/User_Info_Tracking/admin/home.php
===================================================================
--- extensions/User_Info_Tracking/admin/home.php	(revision 19701)
+++ extensions/User_Info_Tracking/admin/home.php	(revision 19701)
@@ -0,0 +1,76 @@
+<?php
+defined('USER_INFO_TRACKING_PATH') or die('Hacking attempt!');
+
+// +-----------------------------------------------------------------------+
+// | Home tab                                                              |
+// +-----------------------------------------------------------------------+
+
+// send variables to template
+//$template->assign(array(
+//  'user_info_tracking' => $conf['user_info_tracking'],
+//  'INTRO_CONTENT' => load_language('intro.html', USER_INFO_TRACKING_PATH, array('return'=>true)),
+//  ));
+
+
+$profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
+$perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
+
+
+$ip_geolocalisation1 = '<a href="http://www.geoiptool.com/en/?IP=';
+$ip_geolocalisation2 = '" title="Geo IP localisation" target="_blank"><img src="'.USER_INFO_TRACKING_PATH.'images/geoip.ico" class="button" alt="'.l10n('IP_geolocalisation').'"></a>';
+
+$ip_ripe1 = '<a href="http://www.ripe.net/whois?form_type=simple&amp;full_query_string=&amp;searchtext=';
+$ip_ripe2 = '+&amp;do_search=Search" title="Ripe Whois" target="_blank">';
+$ip_ripe3 = '</a>';
+
+
+	$query = '
+        SELECT
+          *
+        FROM
+          [UserinfoMap]
+        WHERE
+          [UserinfoMap::itemId] = ?
+        ';
+
+
+
+$messages = pwg_query("SELECT * FROM `". USER_INFO_TRACKING_TABLE2 ."` 
+  ORDER BY timeStamp DESC;");
+  
+if (pwg_db_num_rows($messages)) {
+  while ($message = pwg_db_fetch_assoc($messages)) {
+    $item = array(
+      'id' => $message['id'],
+      'userId' => $message['userId'],
+      'userId2' => $profile_url.$message['userId'],
+      'userId3' => $perm_url.$message['userId'],
+      'userName' => $message['userName'],
+      'ipAddress' => $message['ipAddress'],
+      'timeStamp' => $message['timeStamp'],
+      'action' => $message['action'],
+      'testIpAddress' => $ip_geolocalisation1.$message['ipAddress'].$ip_geolocalisation2.' '.$ip_ripe1.$message['ipAddress'].$ip_ripe2.$message['ipAddress'].$ip_ripe3,
+    );
+//    if (is_admin() OR $message['author'] = $user['username']) {
+//      $item['U_DELETE'] = AM_ADMIN . '&amp;delete_message=' . $message['id'];
+//      $item['U_EDIT'] = AM_ADMIN . '&amp;tab=edit&amp;message_id=' . $message['id'];
+//    }  
+    
+    $template->append('messages', $item);
+  }
+  
+}
+
+
+
+
+
+
+
+
+
+// define template file
+$template->set_filename('user_info_tracking_content', realpath(USER_INFO_TRACKING_PATH . 'admin/template/home.tpl'));
+
+
+?>
Index: extensions/User_Info_Tracking/admin/index.php
===================================================================
--- extensions/User_Info_Tracking/admin/index.php	(revision 19701)
+++ extensions/User_Info_Tracking/admin/index.php	(revision 19701)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/User_Info_Tracking/admin/template/config.tpl
===================================================================
--- extensions/User_Info_Tracking/admin/template/config.tpl	(revision 19701)
+++ extensions/User_Info_Tracking/admin/template/config.tpl	(revision 19701)
@@ -0,0 +1,84 @@
+{combine_css path=$USER_INFO_TRACKING_PATH|@cat:"admin/template/style.css"}
+
+<div class="titrePage">
+	<h2>User Info Tracking Configuration</h2>
+</div>
+
+<form method="post" action="" class="properties">
+<fieldset>
+  <legend>{'Configuration'|@translate}</legend>
+
+
+<div class="gbBlock">
+<table border="1">
+<!--
+<tr>
+	<td align="center" colspan="2"><b><font size="4">Test</font></b></td>
+</tr>
+-->
+
+<tr>
+	<td>{'# records Per Page:'|@translate}</td>
+	<td>
+
+		<select name="uiPerPage">
+		{html_options values=$uiPerPageList
+		selected=$user_info_tracking.uiPerPage output=$uiPerPageList}
+	    </select>
+
+	</td>
+</tr>
+
+<tr>
+	<td>{'Default Sort Column:'|@translate}</td>
+	<td>
+		<select name="uiDefaultSortColumn">
+		{html_options values=$uiDefaultSortColumnList
+		selected=$user_info_tracking.uiDefaultSortColumn output=$uiDefaultSortColumnList2}
+	    </select>
+	</td>
+</tr>
+
+<tr>
+	<td>{'Default Sort Order:'|@translate}</td>
+	<td>
+		<select name="uiDefaultSortOrder">
+		{html_options values=$uiDefaultSortOrderList
+		selected=$user_info_tracking.uiDefaultSortOrder output=$uiDefaultSortOrderList2}
+	    </select>
+	</td>
+</tr>
+
+<!--
+<tr>
+	<td>
+		<a href="http://php.net/strftime" target="_blank">{'Date/Time Format'|@translate}</a>
+	</td>
+	<td>
+		<input type="text" size="12" name="" value="{$user_info_tracking.uiDateFormat}"/>
+	</td>
+</tr>
+-->
+
+</table>
+</div>
+
+
+
+</fieldset>
+
+
+<p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|@translate}"> <input type="submit" name="reset_config" value="{'Reset'|@translate}"></p>
+
+</form>
+
+
+
+
+
+
+
+
+
+
+
Index: extensions/User_Info_Tracking/admin/template/home.tpl
===================================================================
--- extensions/User_Info_Tracking/admin/template/home.tpl	(revision 19701)
+++ extensions/User_Info_Tracking/admin/template/home.tpl	(revision 19701)
@@ -0,0 +1,117 @@
+{combine_css path=$USER_INFO_TRACKING_PATH|@cat:"admin/template/style.css"}
+
+<div class="titrePage">
+	<h2>User Information Tracking</h2>
+</div>
+
+<form method="post" action="" class="properties">
+<fieldset>
+  <legend>{'User Info Tracking'|@translate}</legend>
+  
+<div class="gbBlock">
+  <p class="giDescription">
+    {'This will display information about users when they Login, Logout, and Failed Login Attempts.'|@translate}
+  </p>
+</div>
+
+<br>
+
+<table border="1">
+
+
+<tr>
+	{if !isset($messages)}
+	<td align="center" colspan="7">{'Number of Records: 0'|@translate}</td>
+
+	{else}
+	<td align="center" colspan="7">{'Number of Records:'|@translate} {$messages|@count}</td>
+
+	{/if}
+</tr>
+
+
+
+<tr>
+	<th>ID
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+	<th>User ID
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+	<th>User Name
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+	<th>Admin Actions
+	</th>
+	<th>IP Address
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+	<th>Time Stamp
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+	<th>Action
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/down.gif" style="border:none" alt="{'Permissions Down'|@translate}" title="{'Permissions Down'|@translate}"></a>
+		<a href="{'#'|@translate}"><img src="{$USER_INFO_TRACKING_PATH}/images/up.gif" style="border:none" alt="{'Permissions Up'|@translate}" title="{'Permissions Up'|@translate}"></a>
+	</th>
+</tr>
+
+
+
+
+{foreach from=$messages item=message}
+<tr>
+	<td>{$message.id}</td>
+	<td>{$message.userId}</td>
+	<td>
+		{if ($message.userId) > 0}
+			<a href="{$message.userId2}">{$message.userName}</a>
+		{else}
+			{$message.userName}
+		{/if}
+	</td>
+	<td>
+		{if ($message.userId > 0)}
+			<a href="{$message.userId3}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/permissions.png" style="border:none" alt="{'Permissions'|@translate}" title="{'Permissions'|@translate}"></a>
+			<a href="{$message.userId2}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}"></a>
+		{else}
+
+		{/if}
+	
+	</td>
+	<td>{$message.testIpAddress}</td>
+	<td>
+		{$message.timeStamp|date_format:"%A, %B %e, %Y %I:%M %p"}
+	</td>
+	<td>
+		{if ($message.action == "Successful Login")}
+			<span class="successfulLogin">{$message.action}</span>
+		{else}
+			{if ($message.action == "Failed Login")}
+				<span class="failedLogin">{$message.action}</span>
+			{else}
+				{if ($message.action == "Logout")}
+					<span class="logout">{$message.action}</span>
+				{else}
+					{$message.action}
+				{/if}			
+			{/if}
+		{/if}
+	</td>
+</tr>
+{foreachelse}
+<tr>
+	<td colspan="7"><center><b>{'No records in Database'|@translate}</b></center></td>
+</tr>
+{/foreach}
+
+</table>
+
+
+
+</fieldset>
+</form>
Index: extensions/User_Info_Tracking/admin/template/index.php
===================================================================
--- extensions/User_Info_Tracking/admin/template/index.php	(revision 19701)
+++ extensions/User_Info_Tracking/admin/template/index.php	(revision 19701)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/User_Info_Tracking/admin/template/style.css
===================================================================
--- extensions/User_Info_Tracking/admin/template/style.css	(revision 19701)
+++ extensions/User_Info_Tracking/admin/template/style.css	(revision 19701)
@@ -0,0 +1,40 @@
+.showInfo {
+  position:static;
+  display:inline-block;
+  padding:1px 6px;
+  width:4px;
+  height:14px;
+  line-height:14px;
+  font-size:0.8em;
+}
+
+.square-list {
+  list-style:square !important;
+  margin-left:35px !important;
+}
+  .square-list li {
+    margin-bottom:0 !important;
+  }
+
+.successfulLogin {
+	font-weight: bold;
+	color: #5c0;
+}
+
+.failedLogin {
+	font-weight: bold;
+	color: #a44
+}
+
+
+
+
+
+
+.giSuccess, .giWarning, .giError  {
+    font-weight: bold;
+}
+	
+.giSuccess { color: #5c0; }
+.giWarning { color: #c50; }
+.giError { color: #a44; }
