<?php
header('Content-Type: text/html; charset=utf-8');
include "../cfg.php";
include "../ini.php";
$id = intval($_GET['id']);
if(!$login) {
exit();
}
if(!mysql_num_rows(mysql_query("SELECT id FROM webmasters WHERE id = ".$id." AND user_id = ".$user_id." LIMIT 1"))) {
exit();
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php print $cfgURL; ?> || <?php print $lng['full_log']; ?></title>
<link href="/files/styles.css" type="text/css" rel="stylesheet" />
<link href="/files/b_all.css" type="text/css" rel="stylesheet"/>
<link href="/files/b_buy.css" type="text/css" rel="stylesheet"/>
</head>
<div id="container">
<body leftmargin="0" topmargin="0" marginheight="0" rightmargin="0" bottommargin="0" bgcolor="#ffffff">
<table border="0" cellpadding="2" cellspacing="6" style="border-collapse: separate;">
<tr>
<td>
<b><?php print $lng['show_log']; ?>:</b>
</td>
<?php
$result = mysql_query("SELECT `path` FROM parametrs WHERE part = 0 AND view = 1 ORDER BY id ASC");
while($row = mysql_fetch_array($result)) {
print ' <td><a href="?id='.intval($_GET[id]).'&s='.$row['path'].'" class="button"><em>'.$row['path'].'</em></a></td>';
}
include "../lib/geoip.php";
?>
</tr>
</table>
<table width="100%" align="center" cellpadding="1" cellspacing="1" border="0" class="table_line">
<tr align="center">
<td width="100" height="48" class="tablestat"><h3><?php print $lng['date']; ?></h3></td>
<td width="95" class="tablestat"><h3>IP</h3></td>
<td class="tablestat"><h3><?php print $lng['click_page']; ?></h3></td>
<td width="50" class="tablestat"><h3><?php print $lng['city']; ?></h3></td>
<td width="50" class="tablestat"><h3><?php print $lng['country']; ?></h3></td>
</tr>
<?php
$s = substr(addslashes(htmlspecialchars($_GET['s'], ENT_QUOTES)), 0, 10);
if($s) {
$sql = "SELECT * FROM log_".$s." WHERE idw = ".$id." ORDER BY id DESC";
$rs = mysql_query($sql);
while($a = mysql_fetch_array($rs)) {
print "<tr align=\"center\">
<td>".date("d.m.y H:i:s", $a['date'])."</td>
<td>".$a['ip']."</td>
<td align=\"left\">  ".$a['url']."</td>
<td>";
if($a['country'] == "RU" || $a['country'] == "UA") { print getCITY($a['ip']); } else { print "-"; }
print "</td>
<td>".$a['country']."</td>
</tr>";
}
}
?>
</table>
</body>
</div>
</html>