예제 #1
0
 print '<input type="image" class="liste_titre" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
 print '</td>';
 print "</tr>\n";
 print '</form>';
 $var = True;
 while ($i < min($num, $conf->liste_limit)) {
     $obj = $db->fetch_object($result);
     $var = !$var;
     print '<tr ' . $bc[$var] . '>';
     // Date
     print '<td align="left" nowrap="nowrap">' . dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S') . '</td>';
     // Code
     print '<td>' . $obj->type . '</td>';
     // IP
     print '<td nowrap="nowrap">';
     print dol_print_ip($obj->ip);
     print '</td>';
     // Login
     print '<td nowrap="nowrap">';
     if ($obj->fk_user) {
         $userstatic->id = $obj->fk_user;
         $userstatic->login = $obj->login;
         print $userstatic->getLoginUrl(1);
     } else {
         print '&nbsp;';
     }
     print '</td>';
     // Description
     print '<td>';
     $text = $langs->trans($obj->description);
     if (preg_match('/\\((.*)\\)/i', $obj->description, $reg)) {
print '</td></tr>';
print '</table>';
print "</form>\n";
print '<br>';
print $langs->trans("NoteOnPathLocation") . '<br>';
$url1 = 'http://www.maxmind.com/en/city?rId=awstats';
print $langs->trans("YouCanDownloadFreeDatFileTo", '<a href="' . $url1 . '" target="_blank">' . $url1 . '</a>');
print '<br>';
$url2 = 'http://www.maxmind.com/en/city?rId=awstats';
print $langs->trans("YouCanDownloadAdvancedDatFileTo", '<a href="' . $url2 . '" target="_blank">' . $url2 . '</a>');
if ($geoip) {
    print '<br><br>';
    print '<br>' . $langs->trans("TestGeoIPResult", $ip) . ':';
    $ip = '24.24.24.24';
    print '<br>' . $ip . ' -> ';
    $result = dol_print_ip($ip, 1);
    if ($result) {
        print $result;
    } else {
        print $langs->trans("Error");
    }
    /* We disable this test because dol_print_ip need an ip as input
    	$ip='www.google.com';
    	print '<br>'.$ip.' -> ';
    	$result=dol_print_ip($ip,1);
    	if ($result) print $result;
    	else print $langs->trans("Error");
    	*/
    $geoip->close();
}
llxFooter();