[TRADUCTION] du MOD Advanced Tracking IP

Voici le forum libre concernant les MODs !

Pas de support dans ce forum

Modérateur: Equipe

Règles du forum
A lire impérativement sur notre page : Règlement

Attention, aucun support de MODs n'est donné dans ce forum.

[TRADUCTION] du MOD Advanced Tracking IP

Messagepar Fox Warrior » 11 Aoû 2005 à 20:21

Bonjour, j'ai voulu traduire ce mod (Disponible ici) Mais le problème c'est qu'il n'y a aucun fichier de langue, et aucun ajout sur un fichier existant. C'est à rien n'y comprendre.




Merci d'avance.
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar tonillo » 11 Aoû 2005 à 21:12

à mon avis, il faut modifier directement les textes dans le fichier admin_ip_tracking.php.
manipulation moins facile qu'elle en a l'air, sauvegarde bien avant de te lancer
...
Avatar de l’utilisateur
tonillo
Grand-maître des floodeurs
Grand-maître des floodeurs
 
Messages: 4628
Enregistré le: 06 Juin 2005 à 09:39

Messagepar Fox Warrior » 11 Aoû 2005 à 21:15

Tu me fais peur la Tonillo, Ia pas quelqu'un d'intéressé?
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Fox Warrior » 14 Aoû 2005 à 13:37

Vraiment personne?
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Fox Warrior » 15 Aoû 2005 à 23:30

Je remonte également...
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Charls » 17 Aoû 2005 à 10:34

tu peux montrer ton fichier à traduire stp ?
Charls
Avatar de l’utilisateur
Charls
Posteur néophyte
Posteur néophyte
 
Messages: 75
Enregistré le: 02 Juil 2004 à 11:10

Messagepar Fox Warrior » 17 Aoû 2005 à 17:25

admin_ip_tracking.php:

Code: Tout sélectionner
<?php
/***************************************************************************
 *                            admin_ip_tracking.php
 *                            ---------------------
 *   Version              : 1.0.5
 *   Email                : austin_inc@hotmail.com
 *	 Site				  : phpbb-amod.vcm/
 *	 Copyright			  : (c) aUsTiN-Inc
 *
 ***************************************************************************/
 
define('IN_PHPBB', 1);
	
if( !empty($setmodules) )
{
	$module['Ip Tracking']['&middot;Configuration&middot;']	= append_sid("admin_ip_tracking.$phpEx?mode=config");
	$module['Ip Tracking']['Ip: Logs']						= append_sid("admin_ip_tracking.$phpEx?mode=logs&update=next&start=0");
	$module['Ip Tracking']['Ip: Admin Hits']				= append_sid("admin_ip_tracking.$phpEx?mode=admin");
	$module['Ip Tracking']['Ip: Multi Users'] 				= append_sid("admin_ip_tracking.$phpEx?mode=multi");
	$module['Ip Tracking']['Ip: Search'] 					= append_sid("admin_ip_tracking.$phpEx?mode=search");	
	return;
}

$phpbb_root_path 	= '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);

	if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
		{
	$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
		}
	else if( isset($HTTP_POST_VARS['config']) )
		{
	$mode = "config";
		}
	else if( isset($HTTP_POST_VARS['logs']) )
		{
	$mode = "logs";
		}
	else if( isset($HTTP_POST_VARS['admin']) )
		{
	$mode = "admin";		
		}
	else if( isset($HTTP_POST_VARS['multi']) )
		{
	$mode = "multi";
		}
	else if( isset($HTTP_POST_VARS['search']) )
		{
	$mode = "search";
		}						
	else
		{
	$mode = "";
		}
		
	$update = $_POST['update'];
	$start 	= ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;		
	$limit 	= "50";
		
	if($mode == "search")
		{
		if($update == "search_this")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Search Results";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	$query 		= $_POST['query'];
	$wildcard 	= $_POST['wildcard'];
	$type 		= $_POST['select_search'];
	
	if($wildcard == "1")
		{
	$search_query = $type ." LIKE '%". $query ."%'";
		}
	elseif($wildcard == "2")
		{
	$search_query = $type ." = '". $query ."'";
		}
	else
		{
	$search_query = $type ." LIKE '%". $query ."%'";		
		} 

	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";							
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Username";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Time";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Referer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
	
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE $search_query";
	$r1			= $db -> sql_query($q1) or die("q1: Error Retrieving Search Data.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$username			= $row1['username'];
	$view_page 			= $row1['located'];
	$view_time			= $row1['time'];
	$referrer			= $row1['referer'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);
	$ban_user 			= append_sid("admin_ip_tracking.$phpEx?mode=search");
	
	echo "<form name='do_ban' method='post' action='$ban_user'>";			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$username";
	echo "			</span>";
	echo "		</td>";			
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_ip";
	echo "			</span>";
	echo "		</td>";	
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_page";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$referrer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
	echo "</form>";							
				}
	echo "</table>";
			}			
		else
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Search Logs";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$search_db = append_sid("admin_ip_tracking.$phpEx?mode=search");		
	echo "<form name='do_search' method='post' action='$search_db'>";	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Select Search Type:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<select name='select_search'>";				
	echo "				<option value='ip'>Ip</option>";		
	echo "				<option value='located'>Location</option>";		
	echo "				<option value='referer'>Referer</option>";
	echo "				<option value='time'>Time</option>";	
	echo "				<option value='username'>Username</option>";				
	echo "			</select>";		
	echo "		</td>";
	echo "	</tr>";
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Search Query:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<input type='text' name='query' value='' size='20'>";						
	echo "		</td>";
	echo "	</tr>";
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Use Wildcard?:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";	
	echo "			<input type='radio' name='wildcard' value='1'>&nbsp;Yes";
	echo "				&nbsp;&nbsp;&nbsp;";
	echo "			<input type='radio' name='wildcard' value='2'>&nbsp;No";								
	echo "		</td>";
	echo "	</tr>";						
	echo "</table>";
	echo "<br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";			
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='100%' class='row2'>";
	echo "			<input type='hidden' name='update' value='search_this'>";	
	echo "			<input type='submit' class='mainoption' value=' Search ' onchange='document.do_search.submit()'>";
	echo "		</td>";
	echo "	</tr>";	
	echo "</table>";
	echo "</form>";
			}
		}		
	elseif($mode == "config")
		{
		if($update == "delete_all_logs")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Complete Log Deletion";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	$q1 = "TRUNCATE ". $table_prefix ."ip_tracking";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "All IP Logs Were Deleted.", 'Success');					
			}
		elseif($update == "delete_guest_logs")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Guest Log Deletion";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	$q1 = "DELETE FROM ". $table_prefix ."ip_tracking
		   WHERE username = 'Anonymous'";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "All Guest Logs Were Deleted.", 'Success');			
			}
		elseif($update == "save_new_config")
			{
		$new_max = $_POST['delete_after'];
			if(strlen($new_max) > 2)
				{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Save Configuration";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$q1 = "UPDATE ". $table_prefix ."ip_tracking_config
		   SET max = '". $new_max ."'";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "Your New Config Setting Is Saved.", 'Success');		
				}
			else
				{
	message_die(GENERAL_ERROR, "The Number You Specified Was To Small, Or You Did Not Specify One.", 'Error');						
				}			
			}
		else
			{		
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Configuration";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
		
	$q1 = "SELECT max
		   FROM ". $table_prefix ."ip_tracking_config";
	$r1 		= $db -> sql_query($q1);
	$row1 		= $db -> sql_fetchrow($r1);
	$max_ips 	= $row1['max'];
			
	$q1 = "SELECT count(ip)
		   FROM ". $table_prefix ."ip_tracking";
	$r1 		= $db -> sql_query($q1);
	$row1 		= $db -> sql_fetchrow($r1);
	$total_ips 	= $row1['count(ip)'];
	
	$q1 = "SELECT count(ip)
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = 'Anonymous'";
	$r1 			= $db -> sql_query($q1);
	$row1 			= $db -> sql_fetchrow($r1);
	$total_guests 	= $row1['count(ip)'];	
				
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";
	$save_config = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='save_max' method='post' action='$save_config'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Max IP's To Store Before Dumping:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='text' size='12' class='liteoption' name='delete_after' value='$max_ips'>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='save_new_config'>";	
	echo "			<input type='submit' class='mainoption' value=' Save ' onchange='document.save_max.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>";      	   
	$delete_logs = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='del_log' method='post' action='$delete_logs'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Delete All IP Logs?";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			$total_ips IP Entries";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='delete_all_logs'>";
	echo "			<input type='submit' class='mainoption' value=' Delete ' onchange='document.del_log.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>"; 
	$delete_guests = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='del_guests' method='post' action='$delete_guests'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Delete Just Guests?";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			$total_guests IP Entries";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='delete_guest_logs'>";
	echo "			<input type='submit' class='mainoption' value=' Delete ' onchange='document.del_guests.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>"; 		
	echo "</table>";
			}	   		
		}
	elseif($mode == "logs")		
		{
	if($update == "view")
		{
	$who = $_GET['who'];
	
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: $who's Page Views";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page Viewed";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				When";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Referrer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
				
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = '". $who ."'
		   ORDER BY time DESC";
	$r1	= $db -> sql_query($q1) or die("q1: Error Retrieving Ip Data.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$view_page 			= str_replace("/", "", $row1['located']);
	$view_page			= explode("&sid", $view_page);
	$view_page			= $view_page[0];
	$view_page			= "<a href='". $phpbb_root_path . $view_page ."' target='_blank'>". $view_page ."</a>";
	$view_time			= $row1['time'];
	$referrer			= $row1['referer'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);	
			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=$view_ip' target='_blank'>$view_ip</a>";	
	echo "			</span>";
	echo "		</td>";	
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			&nbsp;$view_page";
	echo "		</td>";		
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $referrer ."' target='_blank' class='mainmenu'>". $referrer ."</a>";
	echo "			</span>";
	echo "		</td>";						
	echo "	</tr>";		
			}
	echo "</table>";			
		}
	else
		{			
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: IP Logs";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$sql = "SELECT COUNT(ip) AS total
			FROM ". $table_prefix ."ip_tracking
			GROUP BY username";

	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Error Getting IP Count.', '', __LINE__, __FILE__, $sql);
	}

	if ( $total = $db->sql_numrows($result) )
	{
		$total_ips = $total;

		$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=logs", $total_ips, $limit, $start). '&nbsp;';
	}
else
	{
	$pagination = '&nbsp;';
	$total_ips = $limit;
	}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / $limit ) + 1 ), ceil( $total_ips / $limit ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	echo "<br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				User (Hits)";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page Viewed";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Last Visit";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
				
	$q1 = "SELECT *, MAX(time) AS newest
		   FROM ". $table_prefix ."ip_tracking
		   GROUP BY username
		   ORDER BY time DESC
		   LIMIT $start, $limit";
	$r1	= $db -> sql_query($q1) or die("q1: Error Retrieving Ip Data.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$view_name 			= $row1['username'];
	$view_page 			= $row1['located'];
	$view_time			= $row1['newest'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);	

	$link = append_sid("admin_ip_tracking.$phpEx?mode=logs&who=$view_name");
				
	$q2 = "SELECT user_id
		   FROM ". $table_prefix ."users
		   WHERE username = '". $view_name ."'";
	$r2 			= $db -> sql_query($q2);
	$row2 			= $db -> sql_fetchrow($r2);
	$view_id 		= $row2['user_id'];
	
	$q3 = "SELECT COUNT(username) AS hits
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = '". $view_name ."'";	
	$r3				= $db -> sql_query($q3);
	$row3 			= $db -> sql_fetchrow($r3);
	$hits	 		= $row3['hits'];
			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=". $view_ip ."' target='_blank'>$view_ip</a>";	
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='". $phpbb_root_path ."profile.php?mode=viewprofile&u=". $view_id ."' target='_blank'>$view_name</a> ($hits)";	
	echo "			</span>";
	echo "		</td>";
	echo "<form name='view_person' method='post' action='$link'>";	
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<input type='hidden' name='update' value='view'>";
	echo "			<input type='submit' class='mainoption' value=' View Hits' onchange='document.view_person.submit()'>";
	echo "		</td>";
	echo "</form>";		
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";					
	echo "	</tr>";		
			}
	echo "</table>";
			}			
		}
	elseif($mode == "admin")
		{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Admin Page Hits";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Username";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page Viewed";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				When";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
	
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE located LIKE '%admin%'
		   ORDER BY time DESC		   
		   LIMIT $start, $limit";
	$r1	= $db -> sql_query($q1);
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$admin_view_ip 			= $row1['ip'];
	$admin_view_name 		= $row1['username'];
	$admin_view_page 		= str_replace("/admin", "admin", $row1['located']);
	$admin_view_time		= $row1['time'];
	$admin_view_time_human	= create_date($board_config['default_dateformat'], $admin_view_time, $board_config['board_timezone']);	
	
	$max = "25";
	
	if(strlen($admin_view_page) > $max)
		{
	$admin_view_page_short = substr($admin_view_page, 0, ($max - 3)) ."...";
		}
				
	$q2 = "SELECT user_id
		   FROM ". $table_prefix ."users
		   WHERE username = '". $admin_view_name ."'";
	$r2 			= $db -> sql_query($q2);
	$row2 			= $db -> sql_fetchrow($r2);
	$admin_view_id 	= $row2['user_id'];
		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=$admin_view_ip' target='_blank'>$admin_view_ip</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $phpbb_root_path ."profile.php?mode=viewprofile&u=$admin_view_id' target='_blank'>$admin_view_name</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $phpbb_root_path ."$admin_view_page' target='_blank'>$admin_view_page_short</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$admin_view_time_human";
	echo "			</span>";
	echo "		</td>";		
			
	echo "	</tr>";		
			}
	echo "</table>";
	
	$q = "SELECT COUNT(*) AS total
		  FROM ". $table_prefix ."ip_tracking
		  WHERE located LIKE '%admin%'
		  GROUP BY time";

	if (!($r = $db->sql_query($q)))
		{
	message_die(GENERAL_ERROR, 'Error Getting IP Count.', '', __LINE__, __FILE__, $q);
		}
		
	$total = $db->sql_numrows($r);
	if($total)
		{
	$total_ips = $total;
	$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=admin", $total_ips, $limit, $start). '&nbsp;';
		}
	else
		{
	$pagination = '&nbsp;';
	$total_ips = $limit;
		}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / $limit ) + 1 ), ceil( $total_ips / $limit ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";	
		}
	elseif($mode == "multi")
		{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Multiple IP Users";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
		
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Usernames";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
						
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   GROUP BY ip
		   LIMIT $start, $limit";
	$r1			= $db -> sql_query($q1);
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip	= $row1['ip'];
							
	$t = 0;
	$q3 = "SELECT username
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."'
		   GROUP BY username";
	$r3 		= $db -> sql_query($q3);
	while($row3	= $db -> sql_fetchrow($r3))
		{
	$t++;
		}
		
	$q2 = "SELECT username, ip
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."' AND
		   $t > 1
		   GROUP BY ip";
	$r2 		= $db -> sql_query($q2);
	while($row2	= $db -> sql_fetchrow($r2))
		{	
	$new_ip = $row2['ip'];
	echo "	<tr>"; 	
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$new_ip";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";	
		}				
	$q4 = "SELECT username, ip
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."' AND
		   $t > 1
		   GROUP BY username";
	$r4 		= $db -> sql_query($q4);
	while($row4	= $db -> sql_fetchrow($r4))
		{
	$total = $row4['username'];								
	echo "				[ $total ] ";
				}	
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";							
			}
	echo "</table>";

	$q = "SELECT COUNT(ip) AS total
		  FROM ". $table_prefix ."ip_tracking
		  GROUP BY ip";

	if (!($r = $db->sql_query($q)))
		{
	message_die(GENERAL_ERROR, 'Error Getting IP Count.', '', __LINE__, __FILE__, $q);
		}
		
	$total = $db->sql_numrows($r);
	if($total)
		{
	$total_ips = $total;
	$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=multi", $total_ips, 100, $start). '&nbsp;';
		}
	else
		{
	$pagination = '&nbsp;';
	$total_ips = $limit;
		}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / 100 ) + 1 ), ceil( $total_ips / 100 ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";	
		}
	else
		{
	message_die(GENERAL_ERROR, "The Part Of This ACP Feature You Are Trying To View Does Not Exist.", 'Error');		
		}						
/*
If this is removed, dont bother asking for any assistance from me.
Give credit where credit is due.
*/
	echo "<table width='100%' border='0' align='center'>";
	echo "	<tr>";  
	echo "		<td align='center'>";
	echo "			<span class='gen'>";
	echo "				<a href='http://phpbb-amod.com/' target='_blank'>";
	echo "					<font class='gensmall'>";
	echo "							&copy; aUsTiN-Inc";
	echo "					</font>";
	echo "				</a>";	
	echo "			</span>";
	echo "		</td>";  				
	echo "	</tr>";
	echo "</table>"; 
		
include('page_footer_admin.' . $phpEx);
?>
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Charls » 17 Aoû 2005 à 18:05

Charls
Avatar de l’utilisateur
Charls
Posteur néophyte
Posteur néophyte
 
Messages: 75
Enregistré le: 02 Juil 2004 à 11:10

Messagepar Fox Warrior » 17 Aoû 2005 à 18:07

Désolé, mais les traducteurs on the net, sa fait souci, je cherche une traduction, pas un espece de truc bizar et incompréhensible.

Mais quel intéret de demander le fichier, si c'est pour ne pas le traduire?!?
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Charls » 17 Aoû 2005 à 18:11

Désolé mais j'en traduit déjà un :
http://forums.phpbb-fr.com/viewpost_608772.html#608772
Charls
Avatar de l’utilisateur
Charls
Posteur néophyte
Posteur néophyte
 
Messages: 75
Enregistré le: 02 Juil 2004 à 11:10

Messagepar Fox Warrior » 27 Aoû 2005 à 13:02

Vraiment personne?
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Fox Warrior » 05 Sep 2005 à 23:21

Je remonte se topic des bas fonds...
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Fox Warrior » 07 Sep 2005 à 16:32

SVP, un traducteur...
Fox Warrior
Ex-Joueur de WoW

Pas de support par Email, PM ou MSN
Avatar de l’utilisateur
Fox Warrior
Roi des posts
Roi des posts
 
Messages: 645
Enregistré le: 17 Oct 2004 à 16:25
Localisation: Suisse

Messagepar Azharh » 07 Sep 2005 à 23:02

Je vais essayer de voir ça demain, si j'ai le temps. Je promets rien :? ;)
Azharh
"An Angel's Soul Lost in a Frozen World"
Avatar de l’utilisateur
Azharh
Posteur expérimenté
Posteur expérimenté
 
Messages: 334
Enregistré le: 04 Aoû 2005 à 14:42
Localisation: Tolosa - Toulouse

Messagepar Azharh » 09 Sep 2005 à 15:16

Bon, j'ai bloqué sur la traduction des mots suivants :
- referer
-wildcard


La traduction du MOD (admin/admin_ip_tracking.php + IP_Track_Install.php) est disponible ici ;)

Si je puis me permettre un commentaire (j'espère qu'il ne vexera personne :P), ce MOD est le mod le plus salement codé que j'ai jamais vu ! Même le template ne respecte pas les normes officielles. Si tu souhaites l'installer, c'est entièrement à tes risques et périls :? Il ne respecte aucune des normes phpBB. :?

Sinon, voici le code pour ces deux fichiers traduits :

admin/admin_ip_tracking.php
Code: Tout sélectionner
<?php
/***************************************************************************
 *                            admin_ip_tracking.php
 *                            ---------------------
 *   Version              : 1.0.5
 *   Email                : austin_inc@hotmail.com
 *	 Site				  : phpbb-amod.vcm/
 *	 Copyright			  : (c) aUsTiN-Inc
 *
 *   traduction française : Azharh - 2005/09/09 
 ***************************************************************************/
 
define('IN_PHPBB', 1);
	
if( !empty($setmodules) )
{
	$module['Ip Tracking']['&middot;Configuration&middot;']	= append_sid("admin_ip_tracking.$phpEx?mode=config");
	$module['Ip Tracking']['Ip: Logs']						= append_sid("admin_ip_tracking.$phpEx?mode=logs&update=next&start=0");
	$module['Ip Tracking']['Ip: Admin Hits']				= append_sid("admin_ip_tracking.$phpEx?mode=admin");
	$module['Ip Tracking']['Ip: Multi Users'] 				= append_sid("admin_ip_tracking.$phpEx?mode=multi");
	$module['Ip Tracking']['Ip: Search'] 					= append_sid("admin_ip_tracking.$phpEx?mode=search");	
	return;
}

$phpbb_root_path 	= '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);

	if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
		{
	$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
		}
	else if( isset($HTTP_POST_VARS['config']) )
		{
	$mode = "config";
		}
	else if( isset($HTTP_POST_VARS['logs']) )
		{
	$mode = "logs";
		}
	else if( isset($HTTP_POST_VARS['admin']) )
		{
	$mode = "admin";		
		}
	else if( isset($HTTP_POST_VARS['multi']) )
		{
	$mode = "multi";
		}
	else if( isset($HTTP_POST_VARS['search']) )
		{
	$mode = "search";
		}						
	else
		{
	$mode = "";
		}
		
	$update = $_POST['update'];
	$start 	= ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;		
	$limit 	= "50";
		
	if($mode == "search")
		{
		if($update == "search_this")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Résultats de la recherche";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	$query 		= $_POST['query'];
	$wildcard 	= $_POST['wildcard'];
	$type 		= $_POST['select_search'];
	
	if($wildcard == "1")
		{
	$search_query = $type ." LIKE '%". $query ."%'";
		}
	elseif($wildcard == "2")
		{
	$search_query = $type ." = '". $query ."'";
		}
	else
		{
	$search_query = $type ." LIKE '%". $query ."%'";		
		} 

	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";							
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Nom de l'utilisateur";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Heure";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Referer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
	
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE $search_query";
	$r1			= $db -> sql_query($q1) or die("q1: Error Retrieving Search Data.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$username			= $row1['username'];
	$view_page 			= $row1['located'];
	$view_time			= $row1['time'];
	$referrer			= $row1['referer'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);
	$ban_user 			= append_sid("admin_ip_tracking.$phpEx?mode=search");
	
	echo "<form name='do_ban' method='post' action='$ban_user'>";			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$username";
	echo "			</span>";
	echo "		</td>";			
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_ip";
	echo "			</span>";
	echo "		</td>";	
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_page";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='20%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$referrer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
	echo "</form>";							
				}
	echo "</table>";
			}			
		else
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Historique de la recherche";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$search_db = append_sid("admin_ip_tracking.$phpEx?mode=search");		
	echo "<form name='do_search' method='post' action='$search_db'>";	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Choisissez le type de recherche:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<select name='select_search'>";				
	echo "				<option value='ip'>Ip</option>";		
	echo "				<option value='located'>Localisation</option>";		
	echo "				<option value='referer'>Referer</option>";
	echo "				<option value='time'>Heure</option>";	
	echo "				<option value='username'>Nom de l'utilisateur</option>";				
	echo "			</select>";		
	echo "		</td>";
	echo "	</tr>";
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Recherche:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<input type='text' name='query' value='' size='20'>";						
	echo "		</td>";
	echo "	</tr>";
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Utiliser Wildcard?:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";	
	echo "			<input type='radio' name='wildcard' value='1'>&nbsp;Oui";
	echo "				&nbsp;&nbsp;&nbsp;";
	echo "			<input type='radio' name='wildcard' value='2'>&nbsp;Non";								
	echo "		</td>";
	echo "	</tr>";						
	echo "</table>";
	echo "<br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";			
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='100%' class='row2'>";
	echo "			<input type='hidden' name='update' value='search_this'>";	
	echo "			<input type='submit' class='mainoption' value=' Rechercher ' onchange='document.do_search.submit()'>";
	echo "		</td>";
	echo "	</tr>";	
	echo "</table>";
	echo "</form>";
			}
		}		
	elseif($mode == "config")
		{
		if($update == "delete_all_logs")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Suppression complète de l'historique des IP";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	$q1 = "TRUNCATE ". $table_prefix ."ip_tracking";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "L'historique des IP a été supprimé.", 'Succès');					
			}
		elseif($update == "delete_guest_logs")
			{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Suppression de l'historique des IP de l'invité";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	$q1 = "DELETE FROM ". $table_prefix ."ip_tracking
		   WHERE username = 'Anonymous'";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "L'historique des IP de l'invité a été supprimé.", 'Succès');			
			}
		elseif($update == "save_new_config")
			{
		$new_max = $_POST['delete_after'];
			if(strlen($new_max) > 2)
				{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Sauvegarder la configuration";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$q1 = "UPDATE ". $table_prefix ."ip_tracking_config
		   SET max = '". $new_max ."'";
	$r1 =  $db -> sql_query($q1);
		
	message_die(GENERAL_MESSAGE, "Les nouveaux paramètres de configuration ont été sauvegardés.", 'Succès');		
				}
			else
				{
	message_die(GENERAL_ERROR, "Le nombre que vous avez fourni est trop petit, ou vous n'en avez pas spécifié.", 'Erreur');						
				}			
			}
		else
			{		
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Configuration";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
		
	$q1 = "SELECT max
		   FROM ". $table_prefix ."ip_tracking_config";
	$r1 		= $db -> sql_query($q1);
	$row1 		= $db -> sql_fetchrow($r1);
	$max_ips 	= $row1['max'];
			
	$q1 = "SELECT count(ip)
		   FROM ". $table_prefix ."ip_tracking";
	$r1 		= $db -> sql_query($q1);
	$row1 		= $db -> sql_fetchrow($r1);
	$total_ips 	= $row1['count(ip)'];
	
	$q1 = "SELECT count(ip)
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = 'Anonymous'";
	$r1 			= $db -> sql_query($q1);
	$row1 			= $db -> sql_fetchrow($r1);
	$total_guests 	= $row1['count(ip)'];	
				
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";
	$save_config = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='save_max' method='post' action='$save_config'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Nombre maximum d'IP a stocker avant de supprimer les plus anciennes:";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='text' size='12' class='liteoption' name='delete_after' value='$max_ips'>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='save_new_config'>";	
	echo "			<input type='submit' class='mainoption' value=' Sauvegarder ' onchange='document.save_max.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>";      	   
	$delete_logs = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='del_log' method='post' action='$delete_logs'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Supprimer l'historique des IP ?";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			$total_ips IP stockée(s)";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='delete_all_logs'>";
	echo "			<input type='submit' class='mainoption' value=' Supprimer ' onchange='document.del_log.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>"; 
	$delete_guests = append_sid("admin_ip_tracking.$phpEx?mode=config");		
	echo "<form name='del_guests' method='post' action='$delete_guests'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Supprimer uniquement les IP de l'invité ?";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			$total_guests IP stockée(s)";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='33%' class='row2'>";
	echo "			<input type='hidden' name='update' value='delete_guest_logs'>";
	echo "			<input type='submit' class='mainoption' value=' Supprimer ' onchange='document.del_guests.submit()'>";
	echo "		</td>";	
	echo "	</tr>";
	echo "</form>"; 		
	echo "</table>";
			}	   		
		}
	elseif($mode == "logs")		
		{
	if($update == "view")
		{
	$who = $_GET['who'];
	
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: $who's page(s) visitée(s)";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";

	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page(s) visitée(s)";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Quand";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Referrer";
	echo "			</span>";
	echo "		</td>";				
	echo "	</tr>";
				
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = '". $who ."'
		   ORDER BY time DESC";
	$r1	= $db -> sql_query($q1) or die("q1: Erreur lors de la récupération des données relatives aux IP.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$view_page 			= str_replace("/", "", $row1['located']);
	$view_page			= explode("&sid", $view_page);
	$view_page			= $view_page[0];
	$view_page			= "<a href='". $phpbb_root_path . $view_page ."' target='_blank'>". $view_page ."</a>";
	$view_time			= $row1['time'];
	$referrer			= $row1['referer'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);	
			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=$view_ip' target='_blank'>$view_ip</a>";	
	echo "			</span>";
	echo "		</td>";	
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			&nbsp;$view_page";
	echo "		</td>";		
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $referrer ."' target='_blank' class='mainmenu'>". $referrer ."</a>";
	echo "			</span>";
	echo "		</td>";						
	echo "	</tr>";		
			}
	echo "</table>";			
		}
	else
		{			
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Historique des IP";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	
	$sql = "SELECT COUNT(ip) AS total
			FROM ". $table_prefix ."ip_tracking
			GROUP BY username";

	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Erreur lors du comptage des IP.', '', __LINE__, __FILE__, $sql);
	}

	if ( $total = $db->sql_numrows($result) )
	{
		$total_ips = $total;

		$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=logs", $total_ips, $limit, $start). '&nbsp;';
	}
else
	{
	$pagination = '&nbsp;';
	$total_ips = $limit;
	}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / $limit ) + 1 ), ceil( $total_ips / $limit ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	echo "<br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Utilisateur (Hits)";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page visitée";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Dernière visite";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
				
	$q1 = "SELECT *, MAX(time) AS newest
		   FROM ". $table_prefix ."ip_tracking
		   GROUP BY username
		   ORDER BY time DESC
		   LIMIT $start, $limit";
	$r1	= $db -> sql_query($q1) or die("q1: Erreur lors de la récupération des données relatives aux IP.".mysql_error());
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip			= $row1['ip'];
	$view_name 			= $row1['username'];
	$view_page 			= $row1['located'];
	$view_time			= $row1['newest'];
	$view_time_human	= create_date($board_config['default_dateformat'], $view_time, $board_config['board_timezone']);	

	$link = append_sid("admin_ip_tracking.$phpEx?mode=logs&who=$view_name");
				
	$q2 = "SELECT user_id
		   FROM ". $table_prefix ."users
		   WHERE username = '". $view_name ."'";
	$r2 			= $db -> sql_query($q2);
	$row2 			= $db -> sql_fetchrow($r2);
	$view_id 		= $row2['user_id'];
	
	$q3 = "SELECT COUNT(username) AS hits
		   FROM ". $table_prefix ."ip_tracking
		   WHERE username = '". $view_name ."'";	
	$r3				= $db -> sql_query($q3);
	$row3 			= $db -> sql_fetchrow($r3);
	$hits	 		= $row3['hits'];
			
	echo "	<tr>"; 
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=". $view_ip ."' target='_blank'>$view_ip</a>";	
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				&nbsp;<a href='". $phpbb_root_path ."profile.php?mode=viewprofile&u=". $view_id ."' target='_blank'>$view_name</a> ($hits)";	
	echo "			</span>";
	echo "		</td>";
	echo "<form name='view_person' method='post' action='$link'>";	
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<input type='hidden' name='update' value='view'>";
	echo "			<input type='submit' class='mainoption' value=' Voir les Hits' onchange='document.view_person.submit()'>";
	echo "		</td>";
	echo "</form>";		
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$view_time_human";
	echo "			</span>";
	echo "		</td>";					
	echo "	</tr>";		
			}
	echo "</table>";
			}			
		}
	elseif($mode == "admin")
		{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: Page d'administration des Hits";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Nom de l'utilisateur";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Page visitée";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Quand";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
	
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   WHERE located LIKE '%admin%'
		   ORDER BY time DESC		   
		   LIMIT $start, $limit";
	$r1	= $db -> sql_query($q1);
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$admin_view_ip 			= $row1['ip'];
	$admin_view_name 		= $row1['username'];
	$admin_view_page 		= str_replace("/admin", "admin", $row1['located']);
	$admin_view_time		= $row1['time'];
	$admin_view_time_human	= create_date($board_config['default_dateformat'], $admin_view_time, $board_config['board_timezone']);	
	
	$max = "25";
	
	if(strlen($admin_view_page) > $max)
		{
	$admin_view_page_short = substr($admin_view_page, 0, ($max - 3)) ."...";
		}
				
	$q2 = "SELECT user_id
		   FROM ". $table_prefix ."users
		   WHERE username = '". $admin_view_name ."'";
	$r2 			= $db -> sql_query($q2);
	$row2 			= $db -> sql_fetchrow($r2);
	$admin_view_id 	= $row2['user_id'];
		
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='http://ws.arin.net/cgi-bin/whois.pl?queryinput=$admin_view_ip' target='_blank'>$admin_view_ip</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $phpbb_root_path ."profile.php?mode=viewprofile&u=$admin_view_id' target='_blank'>$admin_view_name</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				<a href='". $phpbb_root_path ."$admin_view_page' target='_blank'>$admin_view_page_short</a>";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$admin_view_time_human";
	echo "			</span>";
	echo "		</td>";		
			
	echo "	</tr>";		
			}
	echo "</table>";
	
	$q = "SELECT COUNT(*) AS total
		  FROM ". $table_prefix ."ip_tracking
		  WHERE located LIKE '%admin%'
		  GROUP BY time";

	if (!($r = $db->sql_query($q)))
		{
	message_die(GENERAL_ERROR, 'Erreur lors du comptage des IP.', '', __LINE__, __FILE__, $q);
		}
		
	$total = $db->sql_numrows($r);
	if($total)
		{
	$total_ips = $total;
	$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=admin", $total_ips, $limit, $start). '&nbsp;';
		}
	else
		{
	$pagination = '&nbsp;';
	$total_ips = $limit;
		}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / $limit ) + 1 ), ceil( $total_ips / $limit ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";	
		}
	elseif($mode == "multi")
		{
	echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
    echo "		<th class='thHead' colspan='2'>";
	echo "			IP Tracking Admin: IP communes à plusieurs utilisateurs";
	echo "		</th>";
	echo "	</tr>";				
	echo "</table>"; 
	echo "<br><br>";
		
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				IP";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				Noms d'utilisateurs";
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";
						
	$q1 = "SELECT *
		   FROM ". $table_prefix ."ip_tracking
		   GROUP BY ip
		   LIMIT $start, $limit";
	$r1			= $db -> sql_query($q1);
	while($row1	= $db -> sql_fetchrow($r1))
		{
	$view_ip	= $row1['ip'];
							
	$t = 0;
	$q3 = "SELECT username
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."'
		   GROUP BY username";
	$r3 		= $db -> sql_query($q3);
	while($row3	= $db -> sql_fetchrow($r3))
		{
	$t++;
		}
		
	$q2 = "SELECT username, ip
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."' AND
		   $t > 1
		   GROUP BY ip";
	$r2 		= $db -> sql_query($q2);
	while($row2	= $db -> sql_fetchrow($r2))
		{	
	$new_ip = $row2['ip'];
	echo "	<tr>"; 	
	echo "		<td align='center' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$new_ip";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='left' valign='middle' width='25%' class='row2'>";
	echo "			<span class='genmed'>";	
		}				
	$q4 = "SELECT username, ip
		   FROM ". $table_prefix ."ip_tracking
		   WHERE ip = '". $view_ip ."' AND
		   $t > 1
		   GROUP BY username";
	$r4 		= $db -> sql_query($q4);
	while($row4	= $db -> sql_fetchrow($r4))
		{
	$total = $row4['username'];								
	echo "				[ $total ] ";
				}	
	echo "			</span>";
	echo "		</td>";			
	echo "	</tr>";							
			}
	echo "</table>";

	$q = "SELECT COUNT(ip) AS total
		  FROM ". $table_prefix ."ip_tracking
		  GROUP BY ip";

	if (!($r = $db->sql_query($q)))
		{
	message_die(GENERAL_ERROR, 'Erreur lors du comptage des IP.', '', __LINE__, __FILE__, $q);
		}
		
	$total = $db->sql_numrows($r);
	if($total)
		{
	$total_ips = $total;
	$pagination = generate_pagination("admin_ip_tracking.$phpEx?mode=multi", $total_ips, 100, $start). '&nbsp;';
		}
	else
		{
	$pagination = '&nbsp;';
	$total_ips = $limit;
		}

	$page_number = sprintf($lang['Page_of'], ( floor( $start / 100 ) + 1 ), ceil( $total_ips / 100 ));

	
	echo "<table width='100%' border='0' class='forumline' cellspacing='1' align='center' valign='middle'>";	
	echo "	<tr>"; 
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$page_number";
	echo "			</span>";
	echo "		</td>";
	echo "		<td align='center' valign='middle' width='50%' class='row2'>";
	echo "			<span class='genmed'>";
	echo "				$pagination";
	echo "			</span>";
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";	
		}
	else
		{
	message_die(GENERAL_ERROR, "La page d'administration de ce MOD à laquelle vous essayez d'accéder n'existe pas.", 'Erreur');		
		}						
/*
If this is removed, dont bother asking for any assistance from me.
Give credit where credit is due.
*/
	echo "<table width='100%' border='0' align='center'>";
	echo "	<tr>";  
	echo "		<td align='center'>";
	echo "			<span class='gen'>";
	echo "				<a href='http://phpbb-amod.com/' target='_blank'>";
	echo "					<font class='gensmall'>";
	echo "							&copy; aUsTiN-Inc";
	echo "					</font>";
	echo "				</a>";	
	echo "			</span>";
	echo "		</td>";  				
	echo "	</tr>";
	echo "</table>"; 
		
include('page_footer_admin.' . $phpEx);
?>


Et IP_Track_Install.php :
Code: Tout sélectionner
<?PHP
//////////////////////////////////////////////////////////////////////////// 
///                           ___                 
///                          /  /\                ___     
///    ###       ###        /  /::\              /  /\    
///  ##    ####     ##     /  /:/\:\            /  /:/    
/// ##    ##   ##    ##   /  /:/~/::\          /__/::\    
/// ##    ##         ##  /__/:/ /:/\:\         \__\/\:\__ 
/// ##    ##   ##    ##  \  \:\/:/__\/  /¯¯¯/     \  \:\/\
///  ##    ####     ##    \  \::/                  \__\::/
///    ###       ###       \  \:\                  /__/:/ 
///                         \  \:\                 \__\/  
///                          \__\/                
//////////////////////////////////////////////////////////////////////////// 

/***************************************************************************
 *                             IP_Track_Install.php
 *                             --------------------
 *   Version              : 1.0.5
 *   Email                : austin_inc@hotmail.com
 *	 Site				  : phpbb-amod.com/
 *
 *   traduction française : Azharh - 2005/09/09 
 ***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

define('SHOW_ONLINE', true);
$page_title = "IP Tracking Install v1.0.5";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo "<br><br><br>";

$step = $_GET['step'];

$is_admin = $userdata['user_level'];

	if($is_admin <> "1")
		{
	message_die(CRITICAL_ERROR, "Désolé ". $userdata['username'] .", mais vous n'êtes pas autorisé à installer ce MOD sur ce forum.", "Autorisation refusée");				
		}
	else
		{
	if(!$step)
		{
  	echo "<META HTTP-EQUIV=\"refresh\" content=\"5;URL=IP_Track_Install.php?step=1\">"; 		
	message_die(GENERAL_MESSAGE, "Bienvenue ".$userdata['username'].", l'installation débutera dans 5 secondes. ", "Installation autorisée");					
		}
	elseif($step == "1")
		{
	echo "<table width='100%' border='1' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
  	echo "		<th class='thHead' colspan='2'>";
	echo "			<center>";
	echo "				IP Tracking Install: Étape 1.";
	echo "			</center>";
	echo "		</th>";
	echo "	</tr>";
	echo "</table>";
	echo "<br><br>";
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				<b>Lors de cette première étape, la table de configuration et ses champs seront installés.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	echo "<br><br><br>";
		
		$sql = array(); 
		$sql[] = "DROP TABLE IF EXISTS ". $table_prefix ."ip_tracking_config";				
		$sql[] = "CREATE TABLE `". $table_prefix ."ip_tracking_config` (
				  `max` int(15) NOT NULL default ''
				) TYPE=MyISAM;";
				
		$sql[] = "INSERT INTO `". $table_prefix ."ip_tracking_config` VALUES ('25000');";

	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				<b>Étape 1 terminée. Veuillez noter les erreurs éventuelles et me contacter si erreurs il y a. L'Étape 2 débutera dans 5 secondes.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	
for( $b = 0; $b < count($sql); $b++ ) 
{ 
   if( !$result = $db->sql_query ($sql[$b]) ) 
   { 
      $error = $db->sql_error(); 
  	echo "<META HTTP-EQUIV=\"refresh\" content=\"5;URL=IP_Track_Install.php?step=2\">";
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				". $sql[$b]."<br><br><b>Erreur: </b>".$error['message']."<br>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";							  	  
   } 
   else 
   { 
  	echo "<META HTTP-EQUIV=\"refresh\" content=\"5;URL=IP_Track_Install.php?step=2\">"; 							
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				".$sql[$b]."<br><br><b>Requête effectuée avec succès.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";	
			   } 
			} 	
		}
	elseif($step == "2")
		{
	echo "<table width='100%' border='1' cellspacing='2' align='center' valign='middle'>";
	echo "	<tr>";
  	echo "		<th class='thHead' colspan='2'>";
	echo "			<center>";
	echo "				IP Tracking Install: Étape 2.";
	echo "			</center>";
	echo "		</th>";
	echo "	</tr>";
	echo "</table>";
	echo "<br><br>";
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				<b>Durant cette étape, la table de tracking et ses champs seront installés.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	echo "<br><br><br>";
		
		$sql = array(); 
		$sql[] = "DROP TABLE IF EXISTS ". $table_prefix ."ip_tracking";										
		$sql[] = "CREATE TABLE `". $table_prefix ."ip_tracking` (
				  `ip` varchar(15) NOT NULL default '',
				  `time` int(11) NOT NULL default '0',
				  `located` varchar(255) NOT NULL default '',
				  `referer` varchar(255) NOT NULL,
				  `username` varchar(50) NOT NULL default ''
				) TYPE=MyISAM;";

	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				<b>Étape 2 terminée. Veuillez noter les erreurs éventuelles et me contacter si erreurs il y a. L'Étape 3 débutera dans 5 secondes.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
	
for( $b = 0; $b < count($sql); $b++ ) 
{ 
   if( !$result = $db->sql_query ($sql[$b]) ) 
   { 
      $error = $db->sql_error(); 
  	echo "<META HTTP-EQUIV=\"refresh\" content=\"5;URL=IP_Track_Install.php?step=3\">"; 	
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				". $sql[$b] ."<br><br><b>Erreur: </b>".$error['message']."<br>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";							  	  
   } 
   else 
   { 
  	echo "<META HTTP-EQUIV=\"refresh\" content=\"5;URL=IP_Track_Install.php?step=3\">"; 							
	echo "<table width='100%' cellspacing='2' align='center' valign='top' border='1'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				". $sql[$b] ."<br><br><b>Requête effectuée avec succès.</b>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";
	echo "</table>";
   				} 
			} 		
		}
	elseif($step == "3")
		{
	message_die(GENERAL_ERROR, "Bien ". $userdata['username'] .", l'installation est maintenant terminé. Si vous avez rencontré une quelconque erreur, merci de me prévenir afin que je puisse la corriger.", "Installation terminée");								
		}		
	else
		{
	message_die(GENERAL_ERROR, "Désolé ". $userdata['username'] .", une erreur est survenue.", "Erreur d'installation");						
		}										
	}	
/*Remove this and dont bother asking for assitance with anything
  Give credit where credit is due. Thanks*/
  		
	echo "<table width='100%' cellspacing='2' align='center' valign='bottom'>";	
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
	echo "			<span class='gensmall'>";
	echo " 				&copy; <a href='http://phpbb-amod.com/'>aUsTiN-Inc</a>";
	echo "			</span>";	
	echo "		</td>";
	echo "	</tr>";		
	echo "	<tr>";  
	echo "		<td align='center' valign='top'>";
					include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	echo "		</td>";
	echo "	</tr>";					
	echo "</table>"; 	
?>


Voilà, j'espère que ça te convient ;)

PS : si vous trouvez la traduction correcte des deux mots sur lesquels j'ai bloqué, merci de me faire signe. ;)
Azharh
"An Angel's Soul Lost in a Frozen World"
Avatar de l’utilisateur
Azharh
Posteur expérimenté
Posteur expérimenté
 
Messages: 334
Enregistré le: 04 Aoû 2005 à 14:42
Localisation: Tolosa - Toulouse

Suivante

Retourner vers Discussions, recherches et traductions

 


  • Articles en relation
    Réponses
    Vues
    Dernier message

Qui est en ligne

Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 2 invités