<!-- live logging template -->
<script type="text/javascript">
var $j=jQuery.noConflict();$j(document).ready(function(){{$content}var k=new GMap2($j('#map').get(0),{size:new GSize(775,500)});k.addControl(new GSmallMapControl());k.setMapType(G_SATELLITE_MAP);k.setCenter(new GLatLng(25.90611,5.327),2);var l='<img src="{$templates}/images/loading.gif" width="20" height="20" alt="Loading content..." title="Loading content..." />';$j('.sub-form').live('submit',function(){$j('#tabsConfig .ui-tabs-panel:visible').html(l);$j.ajax({data:$j(this).serialize(),type:$j(this).attr('method'),url:$j(this).attr('action'),success:function(a){$j('#tabsConfig .ui-tabs-panel:visible').html(a)}});return false});$j('.show').click(function(){$j('#'+$j(this).attr('rel')).show(2000)});$j.each(addresses,function(a,b){if(typeof b=='object'){process(k,b)}});if((getLogData)&&(typeof getLogData=='function')){}function center(a,b,c){var d=new GLatLng(b,c);a.setCenter(d,3)}function process(a,b){center(a,b['latitude'],b['longitude']);createMarker(a,b['latitude'],b['longitude'],b['remote-ip'],b['city'],b['state'],b['country'])}function createMarker(a,b,c,d,e,f,g){var h=new GLatLng(b,c);var i=new GLatLng(b,c);var j=new GMarker(i);GEvent.addListener(j,"click",function(){a.openInfoWindowHtml(i,opener(d,b,c,e,f,g))});a.addOverlay(j)}function opener(a,b,c,d,e,f){var g='<div style="font-size: 14px; color: #000; text-shadow: none; padding: 5px 5px 5px 5px">';g+='<strong>IP:</strong> '+a+'<br/>';g+='<strong>City:</strong> '+d+' <strong>State:</strong> '+e+'<br/>';g+='<strong>COUNTRY:</strong> '+f+'<br/>';g+='<strong>LAT: </strong>'+b+', <strong>LON: </strong>'+c+'<br/>';g+='<a href="network-tools.php?target='+a+'&type=ping" title="Ping results '+a+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="ping" rel="'+a+'" src="{$templates}/images/icons/icon-ping.png" alt="ping '+a+'"></a> ';g+='<a href="network-tools.php?target='+a+'&type=trace" title="Trace route results '+a+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="traceroute" rel="'+a+'" src="{$templates}/images/icons/icon-traceroute.png" alt="traceroute '+a+'"></a> ';g+='<a href="network-tools.php?target='+a+'&type=whois" title="WHOIS results '+a+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="whois" rel="'+a+'" src="{$templates}/images/icons/icon-whois.png" alt="whois '+a+'"></a> ';g+='<a href="network-tools.php?target='+a+'&type=pscan" title="Port scan results for '+a+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="scan" rel="'+a+'" src="{$templates}/images/icons/icon-port-scanner.png" alt="port scan '+a+'"></a> ';g+='<a href="network-tools.php?target='+a+'&type=route" title="Port scan results for each route on way to '+a+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="pscan" rel="'+a+'" src="{$templates}/images/icons/icon-route-vulnerability-scanner.png" alt="scan route and target for common rootkits"></a>';g+='</div>';return g}});function getLogData(){$j.ajax({url:'ajaxLogs.php',success:function(c){$j.each(c,function(a,b){$j.each(b,function(k,v){process(map,b)})})}})}
/*
var $j = jQuery.noConflict();
$j(document).ready(function(){
{$content}
var map = new GMap2($j('#map').get(0),{ size: new GSize(775,500) });
map.addControl(new GSmallMapControl());
map.setMapType(G_SATELLITE_MAP);
map.setCenter(new GLatLng(25.90611, 5.327), 2);
var loading = '<img src="{$templates}/images/loading.gif" width="20" height="20" alt="Loading content..." title="Loading content..." />';
$j('.sub-form').live('submit', function(){
$j('#tabsConfig .ui-tabs-panel:visible').html(loading);
$j.ajax({
data: $j(this).serialize(),
type: $j(this).attr('method'),
url: $j(this).attr('action'),
success: function(response) {
$j('#tabsConfig .ui-tabs-panel:visible').html(response);
}
});
return false;
});
$j('.show').click(function() {
$j('#'+$j(this).attr('rel')).show(2000);
});
$j.each(addresses, function(key,value){
if (typeof value == 'object') {
process(map,value);
}
});
if ((getLogData)&&(typeof getLogData == 'function')){
//setInterval('getLogData()', 5000);
}
function center(map,lat,lon)
{
var location = new GLatLng(lat,lon);
map.setCenter(location, 3);
}
function process(map,data)
{
center(map,data['latitude'],data['longitude']);
createMarker(map,data['latitude'],data['longitude'],data['remote-ip'],data['city'],data['state'],data['country']);
}
function createMarker(map,lat,lon,ip,city,state,country)
{
var location = new GLatLng(lat,lon);
var point = new GLatLng(lat,lon);
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
map.openInfoWindowHtml(point, opener(ip,lat,lon,city,state,country));
});
map.addOverlay(marker);
}
function opener(ip,lat,lon,city,state,country)
{
var item = '<div style="font-size: 14px; color: #000; text-shadow: none; padding: 5px 5px 5px 5px">';
item += '<strong>IP:</strong> '+ip+'<br/>';
item += '<strong>City:</strong> '+city+' <strong>State:</strong> '+state+'<br/>';
item += '<strong>COUNTRY:</strong> '+country+'<br/>';
item += '<strong>LAT: </strong>'+lat+', <strong>LON: </strong>'+lon+'<br/>';
item += '<a href="network-tools.php?target='+ip+'&type=ping" title="Ping results '+ip+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="ping" rel="'+ip+'" src="{$templates}/images/icons/icon-ping.png" alt="ping '+ip+'"></a> ';
item += '<a href="network-tools.php?target='+ip+'&type=trace" title="Trace route results '+ip+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="traceroute" rel="'+ip+'" src="{$templates}/images/icons/icon-traceroute.png" alt="traceroute '+ip+'"></a> ';
item += '<a href="network-tools.php?target='+ip+'&type=whois" title="WHOIS results '+ip+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="whois" rel="'+ip+'" src="{$templates}/images/icons/icon-whois.png" alt="whois '+ip+'"></a> ';
item += '<a href="network-tools.php?target='+ip+'&type=pscan" title="Port scan results for '+ip+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="scan" rel="'+ip+'" src="{$templates}/images/icons/icon-port-scanner.png" alt="port scan '+ip+'"></a> ';
item += '<a href="network-tools.php?target='+ip+'&type=route" title="Port scan results for each route on way to '+ip+'" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img id="pscan" rel="'+ip+'" src="{$templates}/images/icons/icon-route-vulnerability-scanner.png" alt="scan route and target for common rootkits"></a>';
item += '</div>';
return item;
}
});
function getLogData(){
$j.ajax({
url: 'ajaxLogs.php',
success: function(response){
$j.each(response, function(key,value){
$j.each(value, function(k,v){
process(map,value);
});
});
}
});
}
*/
</script>
<link rel="stylesheet" type="text/css" href="{$templates}scripts/css/flags.css" media="screen" />
<form action="{$URL}" method="post" class="sub-form" id="logs">
<fieldset>
<legend>Access logs
<a href="javascript:popUp('help/help.html','800','800')" title="Need help?"><img src="{$template}/images/icons/icon-info.png" alt="{$TITLE} Help"></a>
</legend>
<div id="map" style="width: 775px; height=500px"></div>
</fieldset>
</form>
<!-- end live logging template -->