<?php
include "../../../cfg.php";
include "../../../ini.php";
header('Content-Type: text/html; charset=utf-8');
$id = intval($_GET['id']);
if(!$login) {
exit();
}
if(!mysql_num_rows(mysql_query("SELECT id FROM advert_popup WHERE id = ".$id." AND user_id = ".$user_id." LIMIT 1"))) {
exit();
}
if($_GET['id'] && $_GET['iframe']) {
?>
<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" />
</head>
<body leftmargin="0" topmargin="0" marginheight="0" rightmargin="0" bottommargin="0" bgcolor="#ffffff">
<div id="container">
<table width="95%" align="center" valign='middle' cellpadding="1" cellspacing="1" border="0" class="table_line" style="margin:10px; border: 1px solid #EDEDED;">
<tr align="center">
<td width="75" height="48" class="tablestat"><h3><?php print $lng['date']; ?></h3></td>
<td width="95" class="tablestat"><h3>IP</h3></td>
<td class="tablestat"><h3>URL</h3></td>
<td class="tablestat"><h3><?php print $lng['city']; ?></h3></td>
<td width="50" class="tablestat"><h3><?php print $lng['country']; ?></h3></td>
</tr>
<?php
include "../../../lib/geoip.php";
$sql = "SELECT * FROM log_popup WHERE ids = ".$id." ORDER BY id DESC";
$rs = mysql_query($sql);
while($a = mysql_fetch_array($rs)) {
print "<tr bgcolor=\"#ffffff\" 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>
</div>
</body>
</html>
<?php
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" />
</head>
<body leftmargin="3" topmargin="3" marginheight="3" rightmargin="3" bottommargin="3" bgcolor="#ffffff">
<iframe style="width: 100%; height: 100%;" name="log" width="100%" height="100%" src="log.php?id=<?php print $id; ?>&iframe=1" frameborder="0"></iframe>
</body>
</html>