Index: /extensions/whois_online/Changelog.txt.php
===================================================================
--- /extensions/whois_online/Changelog.txt.php	(revision 6192)
+++ /extensions/whois_online/Changelog.txt.php	(revision 6193)
@@ -3,4 +3,8 @@
 Plugin Name: Whois online
 ** History **
+  2010-05-16 2.1.a
+						 New: Piwigo 2.1 support
+						 Fix: Flags could be based on Languages if api calls are forbidden by a provider.
+						 
   2010-04-24 2.0.n
 						 Fix: Flags are coming back 
Index: /extensions/whois_online/config.php
===================================================================
--- /extensions/whois_online/config.php	(revision 6192)
+++ /extensions/whois_online/config.php	(revision 6193)
@@ -219,4 +219,5 @@
 		'Members' => $conf_whois['Users'],
 		'Whois_url' => WHOIS_ONLINE_PATH,
+		'Whois_Smarty' => 'file:' . dirname(__FILE__),
 	));
   // Include reload.php for first request (Filtering is an intrusive jQuery)
Index: /extensions/whois_online/config.tpl
===================================================================
--- /extensions/whois_online/config.tpl	(revision 6192)
+++ /extensions/whois_online/config.tpl	(revision 6193)
@@ -141,7 +141,7 @@
 
 <fieldset>
-	<legend>{'User access details'|@translate}</legend>
+	<legend>{'User access details'|@translate}</legend><!-- {$Whois_Smarty}/report.tpl -->
 <div id="reloadable">
-{include file="../../.`$Whois_url`report.tpl"}
+{include file="`$Whois_Smarty`/report.tpl"}
 </div>
 </fieldset>
Index: /extensions/whois_online/include/wo_admin_functions.inc.php
===================================================================
--- /extensions/whois_online/include/wo_admin_functions.inc.php	(revision 6193)
+++ /extensions/whois_online/include/wo_admin_functions.inc.php	(revision 6193)
@@ -0,0 +1,163 @@
+<?php
+/* Functions */
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
+
+
+if ( !function_exists('pwg_get_contents') ) {
+	function pwg_get_contents($url, $mode='') {
+
+		global $pwg_mode, $pwg_prev_host;
+		$timeout = 5; // will be a parameter (only for the socket)
+
+		$host = (strtolower(substr($url,0,7)) == 'http://') ? substr($url,7) : $url;
+		$host = (strtolower(substr($host,0,8)) == 'https://') ? substr($host,8) : $host;
+		$doc = substr($host, strpos($host, '/'));
+		$host = substr($host, 0, strpos($host, '/'));
+
+		if ($pwg_prev_host != $host) $pwg_mode = ''; // What was possible with one website could be different with another
+		$pwg_prev_host = $host;
+		if (isset($pwg_mode)) $mode = $pwg_mode;
+		if ($mode == 'r') $mode = '';
+		// $mode = 'ch'; // Forcing a test '' all, 'fs' fsockopen, 'ch' cURL
+
+	// 1 - The simplest solution: file_get_contents
+	// Contraint: php.ini
+	//      ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
+	//      allow_url_fopen = On
+		if ( $mode == '' ) {
+		  if ( true === (bool) ini_get('allow_url_fopen') ) { 
+				$value = file_get_contents($url);
+				if ( $value !== false and substr($value,0,21) != '<!DOCTYPE HTML PUBLIC') {
+					return $value;
+				}
+			}
+		}
+		if ( $mode == '' ) $mode = 'fs';
+		if ( $pwg_mode == '' ) $pwg_mode = 'fs'; // Remind it
+	// 2 - Often accepted access: fsockopen
+		if ($mode == 'fs') {
+			$fs = fsockopen($host, 80, $errno, $errstr, $timeout);
+			if ( $fs !== false ) {
+				fwrite($fs, 'GET ' . $doc . " HTTP/1.1\r\n");
+				fwrite($fs, 'Host: ' . $host . "\r\n");
+				fwrite($fs, "Connection: Close\r\n\r\n");
+				stream_set_blocking($fs, TRUE);
+				stream_set_timeout($fs,$timeout); // Again the $timeout on the get
+				$info = stream_get_meta_data($fs);
+				$value = '';
+				while ((!feof($fs)) && (!$info['timed_out'])) {
+								$value .= fgets($fs, 4096);
+								$info = stream_get_meta_data($fs);
+								flush();
+				}
+				if ( $info['timed_out'] === false  and substr($value,0,21) != '<!DOCTYPE HTML PUBLIC') return $value;
+			}
+		}
+
+		if ( $pwg_mode == 'fs' ) $pwg_mode = 'ch'; // Remind it
+	// 3 - Sometime another solution: curl_exec
+	// See http://fr2.php.net/manual/en/curl.installation.php
+	  if (function_exists('curl_init') and $pwg_mode == 'ch') {
+			$ch = @curl_init();
+			@curl_setopt($ch, CURLOPT_URL, $url);
+			@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
+			@curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
+			@curl_setopt($ch, CURLOPT_HEADER, 1);
+			@curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
+			@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+			@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+			$value = @curl_exec($ch);
+			$header_length = @curl_getinfo($ch, CURLINFO_HEADER_SIZE);
+			$status = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
+			@curl_close($value);
+			if ($value !== false and $status >= 200 and $status < 400) {
+				$value = substr($value, $header_length);
+				// echo '<br/>-ch- ('. $value . ') <br/>';
+				return $value;
+			}
+			else $pwg_mode = 'failed'; // Sorry but remind it as well
+		}
+
+		// No other solutions
+		return false;
+	}
+}
+
+// Template function
+function Whois_most($text, $count, $when, $format) {
+ return sprintf(l10n($text),$count,date(l10n($format),$when));
+}
+
+function whois_country($trace, $bypass = false) {
+  if (!isset($trace['country'])) {
+			pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . ' ADD `country` VARCHAR( 254 ) NOT NULL AFTER `lang` ;');
+			$trace['country']='';
+	}
+	$c = array();
+	if ($trace['country']!='') $c = @unserialize(htmlspecialchars_decode($trace['country']));
+	if (isset($c['Code']) and $c['Code']!='' and $c['Code']!='__') return $c; 
+	if ($bypass and isset($c['Code'])) return $c;
+    $result = pwg_get_contents ('http://api.hostip.info/get_html.php?ip=' . $trace['IP'], 'r');
+	if ( $result !== false ) { 
+		$tokens = preg_split("/[:]+/", $result);
+		$c = array ('Name' => $tokens[1], 'City' => substr($tokens[3],0,-3));
+		if (strpos ($c['Name'], '?') === FALSE) {
+			$c['Code'] = substr($c['Name'],-8,2); # " (Private Address) (XX) City"
+			$c['Name'] = ucwords ( strtolower( substr($c['Name'],0,-5)));
+		}
+		else $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);
+	}
+	if (stripos($c['Name'], 'Squid')!==false or $c['Code'] =='XX') 
+		$c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);
+	$new = htmlspecialchars(serialize($c),ENT_QUOTES,'UTF-8');
+	if ($new == $trace['country']) return $c;
+	pwg_query('UPDATE ' . WHOIS_ONLINE_TABLE . ' 
+      SET `country` = \'' . $new . '\'
+    WHERE `session_id` = \'' . $trace['session_id'] . '\';');
+  return $c;
+}
+
+function whois_flag($trace, &$step, $limit = 10) {
+	$flag = WHOIS_ONLINE_PATH . 'flags/' . $trace['Country']['Code'] . '.jpg';
+	if (file_exists($flag) and  $trace['Country']['Code'] != '__' ) return $flag;
+	if ($trace['Country']['Code'] == '__' ) {
+	    $flag = WHOIS_ONLINE_PATH . 'flags/' . substr($trace['lang'],-2, 2) . '.jpg';
+		if (file_exists($flag)) return $flag;
+		return WHOIS_ONLINE_PATH . 'flags/__.jpg';
+	}
+	if ( $step > $limit ) return WHOIS_ONLINE_PATH . 'flags/.jpg';
+	$f = fopen  ('http://api.hostip.info/flag.php?ip=' . $trace['IP'], 'r');
+	$result='';
+	while ($l = fgets ($f, 1024)) $result .= $l;
+	fclose ($f);
+	$f = fopen($flag,"w+");
+	fputs($f,$result);
+	fclose($f);
+	return $flag;
+}
+
+/*
+  returns (mixed): (string) 'bot agent name'  || (bool) false
+  @param (string) HTTP_USER_AGENT
+*/
+function is_a_bot($agent = '') 
+{
+  global $conf;
+	if ($agent == '') $agent = $_SERVER['HTTP_USER_AGENT'];
+	$botlist = array('Teoma', 'alexa', 'froogle', 'Gigabot', 'inktomi',
+	'looksmart', 'URL_Spider_SQL', 'Firefly', 'NationalDirectory', 
+	'Ask Jeeves', 'TECNOSEEK', 'InfoSeek', 'WebFindBot', 'girafabot',
+	'crawler', 'www.galaxy.com', 'Googlebot', 'Scooter', 'Slurp',
+	'msnbot', 'appie', 'FAST', 'WebBug', 'Spade', 'ZyBorg', 'rabaz',
+	'Baiduspider', 'Feedfetcher-Google', 'TechnoratiSnoop', 'Rankivabot',
+	'Mediapartners-Google', 'Sogou web spider', 'WebAlta Crawler');
+  if (isset($conf['search_agents']))
+	  $botlist = array_merge( $botlist, array_diff( $conf['search_agents'], $botlist ) );
+  foreach($botlist as $bot) {
+    if (stripos($agent, $bot)!==false) return $bot; 
+  }
+  return false;
+} 
+?>
Index: /extensions/whois_online/include/wo_functions.inc.php
===================================================================
--- /extensions/whois_online/include/wo_functions.inc.php	(revision 6192)
+++ /extensions/whois_online/include/wo_functions.inc.php	(revision 6193)
@@ -4,4 +4,6 @@
 /* Secure Config */
 if (!isset($conf['Whois Online']) or !isset($conf_whois['Active'])) $conf_whois = whois_online_conf();
+
+if (defined('IN_ADMIN') and IN_ADMIN) include_once(WHOIS_ONLINE_PATH.'include/wo_admin_functions.inc.php');
 
 function whois_online_conf()
@@ -34,84 +36,4 @@
 }
 
-
-if ( !function_exists('pwg_get_contents') ) {
-	function pwg_get_contents($url, $mode='') {
-
-		global $pwg_mode, $pwg_prev_host;
-		$timeout = 5; // will be a parameter (only for the socket)
-
-		$host = (strtolower(substr($url,0,7)) == 'http://') ? substr($url,7) : $url;
-		$host = (strtolower(substr($host,0,8)) == 'https://') ? substr($host,8) : $host;
-		$doc = substr($host, strpos($host, '/'));
-		$host = substr($host, 0, strpos($host, '/'));
-
-		if ($pwg_prev_host != $host) $pwg_mode = ''; // What was possible with one website could be different with another
-		$pwg_prev_host = $host;
-		if (isset($pwg_mode)) $mode = $pwg_mode;
-		if ($mode == 'r') $mode = '';
-		// $mode = 'ch'; // Forcing a test '' all, 'fs' fsockopen, 'ch' cURL
-
-	// 1 - The simplest solution: file_get_contents
-	// Contraint: php.ini
-	//      ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
-	//      allow_url_fopen = On
-		if ( $mode == '' ) {
-		  if ( true === (bool) ini_get('allow_url_fopen') ) { 
-				$value = file_get_contents($url);
-				if ( $value !== false and substr($value,0,21) != '<!DOCTYPE HTML PUBLIC') {
-					return $value;
-				}
-			}
-		}
-		if ( $mode == '' ) $mode = 'fs';
-		if ( $pwg_mode == '' ) $pwg_mode = 'fs'; // Remind it
-	// 2 - Often accepted access: fsockopen
-		if ($mode == 'fs') {
-			$fs = fsockopen($host, 80, $errno, $errstr, $timeout);
-			if ( $fs !== false ) {
-				fwrite($fs, 'GET ' . $doc . " HTTP/1.1\r\n");
-				fwrite($fs, 'Host: ' . $host . "\r\n");
-				fwrite($fs, "Connection: Close\r\n\r\n");
-				stream_set_blocking($fs, TRUE);
-				stream_set_timeout($fs,$timeout); // Again the $timeout on the get
-				$info = stream_get_meta_data($fs);
-				$value = '';
-				while ((!feof($fs)) && (!$info['timed_out'])) {
-								$value .= fgets($fs, 4096);
-								$info = stream_get_meta_data($fs);
-								flush();
-				}
-				if ( $info['timed_out'] === false  and substr($value,0,21) != '<!DOCTYPE HTML PUBLIC') return $value;
-			}
-		}
-
-		if ( $pwg_mode == 'fs' ) $pwg_mode = 'ch'; // Remind it
-	// 3 - Sometime another solution: curl_exec
-	// See http://fr2.php.net/manual/en/curl.installation.php
-	  if (function_exists('curl_init') and $pwg_mode == 'ch') {
-			$ch = @curl_init();
-			@curl_setopt($ch, CURLOPT_URL, $url);
-			@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
-			@curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
-			@curl_setopt($ch, CURLOPT_HEADER, 1);
-			@curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
-			@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-			@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-			$value = @curl_exec($ch);
-			$header_length = @curl_getinfo($ch, CURLINFO_HEADER_SIZE);
-			$status = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
-			@curl_close($value);
-			if ($value !== false and $status >= 200 and $status < 400) {
-				$value = substr($value, $header_length);
-				// echo '<br/>-ch- ('. $value . ') <br/>';
-				return $value;
-			}
-			else $pwg_mode = 'failed'; // Sorry but remind it as well
-		}
-
-		// No other solutions
-		return false;
-	}
-}
 // Assume the Default display on pages
 function whois_default_display() {
@@ -119,22 +41,4 @@
 	$template->set_filenames(array( 'Whois_display' => dirname(__FILE__).'/../default.tpl'));
 	$template->pparse('Whois_display');
-}
-
-// Add admin links
-function whois_add_icon($menu) {
-	global $conf_whois, $lang;
-	if ($conf_whois['Add icon to History'])
-		$lang['History'] .= '</a> <a class="external" href="' . get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php') . '">
-			<img class="button" src="' . WHOIS_ONLINE_PATH . 'icons/Whois_tuner.gif" alt="Whois Online configuration" title="Whois Online configuration" /></a>';
-	if ($conf_whois['Add to Plugins menu']) array_push($menu, array(
-				'NAME' => 'Whois Online',
-				'URL' => get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php'),
-			));
-	return $menu;
-}
-
-// Template function
-function Whois_most($text, $count, $when, $format) {
- return sprintf(l10n($text),$count,date(l10n($format),$when));
 }
 
@@ -147,52 +51,4 @@
   VALUES ('Whois Online','". $conf['Whois Online'] ."','Whois Online configuration');");
 	return;
-}
-
-function whois_country($trace, $bypass = false) {
-  if (!isset($trace['country'])) {
-			pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . ' ADD `country` VARCHAR( 254 ) NOT NULL AFTER `lang` ;');
-			$trace['country']='';
-	}
-	$c = array();
-	if ($trace['country']!='') $c = @unserialize(htmlspecialchars_decode($trace['country']));
-	if (isset($c['Code']) and $c['Code']!='' and $c['Code']!='__') return $c; 
-	if ($bypass and isset($c['Code'])) return $c;
-    $result = pwg_get_contents ('http://api.hostip.info/get_html.php?ip=' . $trace['IP'], 'r');
-	if ( $result !== false ) { 
-		$tokens = preg_split("/[:]+/", $result);
-		$c = array ('Name' => $tokens[1], 'City' => substr($tokens[3],0,-3));
-		if (strpos ($c['Name'], '?') === FALSE) {
-			$c['Code'] = substr($c['Name'],-8,2); # " (Private Address) (XX) City"
-			$c['Name'] = ucwords ( strtolower( substr($c['Name'],0,-5)));
-		}
-		else $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);
-	}
-	if (stripos($c['Name'], 'Squid')!==false) $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);
-	// else $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);
-	if ($c['Code'] == 'Private Address') {
-		$c['Name'] = l10n('Private Address');
-		$c['City'] = l10n('N/A');
-		$c['Code'] = '__';
-	}
-	$new = htmlspecialchars(serialize($c),ENT_QUOTES,'UTF-8');
-	if ($new == $trace['country']) return $c;
-	pwg_query('UPDATE ' . WHOIS_ONLINE_TABLE . ' 
-      SET `country` = \'' . $new . '\'
-    WHERE `session_id` = \'' . $trace['session_id'] . '\';');
-  return $c;
-}
-
-function whois_flag($trace, &$step, $limit = 10) {
-  $flag = WHOIS_ONLINE_PATH . 'flags/' . $trace['Country']['Code'] . '.jpg';
-	if (file_exists($flag) and $flag != '__' ) return $flag;
-	if ( $step > $limit ) return WHOIS_ONLINE_PATH . 'flags/__.jpg';
-        $f = fopen  ('http://api.hostip.info/flag.php?ip=' . $trace['IP'], 'r');
-        $result='';
-        while ($l = fgets ($f, 1024)) $result .= $l;
-        fclose ($f);
-		$f = fopen($flag,"w+");
-	fputs($f,$result);
-	fclose($f);
-  return $flag;
 }
 
@@ -245,4 +101,5 @@
 	}
 	// Write or Rewrite the dedicated record
+	$ctry = '_' . strtoupper( substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"],6,2) );
 	$query = 'REPLACE INTO ' . WHOIS_ONLINE_TABLE . ' (`IP`, `hidden_IP`, `session_id`,`user_id`,`username`,`lang`, `user_agent`,
 	`any_previous`, `same_previous`, `permanent`,`last_access`,`last_elm_ids`, `last_cat_ids`, `last_tag_ids`, `last_sch_ids`,
@@ -251,5 +108,5 @@
 		. $dedicated['hidden_IP'] .'\', \''. $dedicated['session_id'] .'\', \''
 		. $dedicated['user_id'] .'\', \''. $dedicated['username'] .'\', \''
-		. substr($lang_info['code'],0,2) .'\', \''
+		. substr($lang_info['code'],0,2). $ctry .'\', \''
 		. $dedicated['user_agent'] .'\', \''
 		. $dedicated['any_previous'] .'\', \''
@@ -297,25 +154,16 @@
 }
 
-/*
-  returns (mixed): (string) 'bot agent name'  || (bool) false
-  @param (string) HTTP_USER_AGENT
-*/
-function is_a_bot($agent = '') 
-{
-  global $conf;
-	if ($agent == '') $agent = $_SERVER['HTTP_USER_AGENT'];
-	$botlist = array('Teoma', 'alexa', 'froogle', 'Gigabot', 'inktomi',
-	'looksmart', 'URL_Spider_SQL', 'Firefly', 'NationalDirectory', 
-	'Ask Jeeves', 'TECNOSEEK', 'InfoSeek', 'WebFindBot', 'girafabot',
-	'crawler', 'www.galaxy.com', 'Googlebot', 'Scooter', 'Slurp',
-	'msnbot', 'appie', 'FAST', 'WebBug', 'Spade', 'ZyBorg', 'rabaz',
-	'Baiduspider', 'Feedfetcher-Google', 'TechnoratiSnoop', 'Rankivabot',
-	'Mediapartners-Google', 'Sogou web spider', 'WebAlta Crawler');
-  if (isset($conf['search_agents']))
-	  $botlist = array_merge( $botlist, array_diff( $conf['search_agents'], $botlist ) );
-  foreach($botlist as $bot) {
-    if (stripos($agent, $bot)!==false) return $bot; 
-  }
-  return false;
-} 
+// Add admin links
+function whois_add_icon($menu) {
+	global $conf_whois, $lang;
+	if ($conf_whois['Add icon to History'])
+		$lang['History'] .= '</a> <a class="external" href="' . get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php') . '">
+			<img class="button" src="' . WHOIS_ONLINE_PATH . 'icons/Whois_tuner.gif" alt="Whois Online configuration" title="Whois Online configuration" /></a>';
+	if ($conf_whois['Add to Plugins menu']) array_push($menu, array(
+				'NAME' => 'Whois Online',
+				'URL' => get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php'),
+			));
+	return $menu;
+}
+
 ?>
Index: /extensions/whois_online/main.inc.php
===================================================================
--- /extensions/whois_online/main.inc.php	(revision 6192)
+++ /extensions/whois_online/main.inc.php	(revision 6193)
@@ -23,5 +23,5 @@
 /*
 Plugin Name: Whois online
-Version: 2.0.n
+Version: 2.1.a
 Description: Who is online?
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=279
@@ -29,5 +29,5 @@
 Author URI: http://www.vdigital.org
 */
-define('WHOIS_ONLINE_VER', '2.0.n'); 
+define('WHOIS_ONLINE_VER', '2.1.a'); 
 global $prefixeTable, $conf;
 // $conf['debug_l10n'] = true;
Index: /extensions/whois_online/maintain.inc.php
===================================================================
--- /extensions/whois_online/maintain.inc.php	(revision 6192)
+++ /extensions/whois_online/maintain.inc.php	(revision 6193)
@@ -35,4 +35,5 @@
 ";
 	$result = pwg_query($query);
+	pwg_query('ALTER TABLE '. WHOIS_ONLINE_TABLE .' CHANGE `lang` `lang` CHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT \'en\'');
 	if (!isset($conf['Whois Online'])) {
 		$conf['Whois Online'] = serialize(Array());
Index: /extensions/whois_online/online.php
===================================================================
--- /extensions/whois_online/online.php	(revision 6192)
+++ /extensions/whois_online/online.php	(revision 6193)
@@ -70,4 +70,5 @@
 	// Step 2 - Assume a new comer
 	if ( !isset($visit) ) {
+		$ctry = '_' . strtoupper( substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"],6,2) );
 		$visit = Array( 
 			'IP' => $_SERVER['REMOTE_ADDR'], // First known IP (Is that one true?)
@@ -77,5 +78,5 @@
 			'username' => $user['username'],
 			'delay' => 0,
-			'lang' => substr($lang_info['code'],0,2),
+			'lang' => substr($lang_info['code'],0,2) . $ctry,
 			'permanent' => 'false', // False: delete after 72 Hours / True: delete after 90 days
 			'last_access' => time(), // Last access by this user
Index: /extensions/whois_online/report.tpl
===================================================================
--- /extensions/whois_online/report.tpl	(revision 6192)
+++ /extensions/whois_online/report.tpl	(revision 6193)
@@ -1,2 +1,3 @@
+{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"plugins/whois_online/jquery/cluetip/jquery.cluetip.min.js" }
 <table class="table2" id="detailedStats">
 <thead> 
@@ -30,13 +31,13 @@
 				<td class=&#34;right&#34;><b><i>{'on pages'|@translate}</i></b></td><td>{$detail.pag_hits}</td></tr>
 			</table>">{$detail.username}</a> 
-				<a href="./admin.php?page=profile&amp;user_id={$detail.user_id}" title="{'Profile'|@translate}" alt="{'Profile'|@translate}" 
+				<a href="./admin.php?page=profile&amp;user_id={$detail.user_id}" title="{'Profile'|@translate}" 
 				onclick="window.open(this.href); return false;">[{$detail.lang}]</a>
 	</td>
 	<td>
 		{if ($detail.user_id == '1')}<a class="external" href="{'http:hostip'|@translate}" title="{':hostip:title'|@translate}">
-			<img src="{$detail.Flag}" border="0" alt="{$detail.IP} - {'language'|@translate}: {$detail.Language}" width="24" height="16">
+			<img src="{$detail.Flag}" alt="{$detail.IP} - {'language'|@translate}: {$detail.Language}" width="24" height="16">
 		</a>
 		{else}<a class="external" href="{'http:geoiptool'|@translate}{$detail.IP}" title="{':geoiptool:title'|@translate}">
-			<img src="{$detail.Flag}" border="0" alt="{$detail.IP} - {'language'|@translate}: {$detail.Language}" width="24" height="16">
+			<img src="{$detail.Flag}" alt="{$detail.IP} - {'language'|@translate}: {$detail.Language}" width="24" height="16">
 		</a>
 		{/if}
@@ -83,10 +84,10 @@
 </tr>
 {/foreach}
-<tbody> 
+</tbody> 
 </table>
-<p><a class="external" href="{'http:hostip'|@translate}" title="{':hostip:title'|@translate}"
- alt="">hostip.info</a>{': provides newcomers\' localization and possibly new country flags, thanks to them.'|@translate}</p>
-<p><a class="external" href="{'http:geoiptool'|@translate}" title="{':geoiptool:title'|@translate}"
- alt="">geoiptool.com</a>{': provides IP geolocalization on request (link on flag). Useful for unknown countries.'|@translate}</p>
+<p><a class="external" href="{'http:hostip'|@translate}" title="{':hostip:title'|@translate}">hostip.info</a>{
+ ': provides newcomers\' localization and possibly new country flags, thanks to them.'|@translate}</p>
+<p><a class="external" href="{'http:geoiptool'|@translate}" title="{':geoiptool:title'|@translate}">geoiptool.com</a>{
+ ': provides IP geolocalization on request (link on flag). Useful for unknown countries.'|@translate}</p>
 {literal}
 <script type="text/javascript">// <![CDATA[
