File size: 5.25Kb
<?php
/*
___ ______ __________ ______
/ \ / | / / \ / |
/ ^ \ | ,----' / /| .--. | ,----'
/ /_\ \ | | / / | | | | |
/ _____ \ | `----./ / | '--' | `----.
/__/ \__\ \______/__/ |_______/ \______|
Coding Updated by
Andrew Haswell
Aka Acdc - Ozziemale41
copyright (c) 2017
*/
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
header("Content-type:text/html; charset=utf-8");
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>';
echo '<title>'.site_title($php_self).'</title>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<link rel="shortcut icon" href="'.$config['home'].'/themes/night_city/site/favicon.ico" />';
echo '<link rel="stylesheet" href="../themes/night_city/style.css" type="text/css" />';
echo '<link rel="alternate" type="application/rss+xml" title="RSS News" href="'.$config['home'].'/news/rss.php" />';
echo '<meta name="keywords" content="'.$config['keywords'].'" />';
echo '<meta name="description" content="'.$config['description'].'" />';
echo '<meta name="generator" content="Motor '.MOTOR_VERSION.'" />';
echo '</head><body>';
echo '<!--Theme by Andy-->';
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['action'])) {$action = check($_GET['action']);} else {$action = "";}
if (isset($_GET['start'])) {$start = (int)$_GET['start'];} else {$start = 0;}
if (is_admin(array(101,102))){
echo '<div class="content">';
echo '<div class="menuh">';
echo '<img src="../images/img/menu.gif" alt="image" /> <b>Visitor Logs</b><br /><br />';
echo '</div>';
if ($action==""){
$file = file(DATADIR."iplog.dat");
$file = array_reverse($file);
$total = count($file);
if ($total>0){
//echo '<form action="news.php?action=del&start='.$start.'&uid='.$_SESSION['token'].'&'.SID.'" method="post">';
if ($start < 0 || $start > $total){$start = 0;}
if ($total < $start + $config['postnews']){ $end = $total; }
else {$end = $start + $config['postnews']; }
for ($i = $start; $i < $end; $i++){
$data = explode("|",$file[$i]);
$num = $total - $i - 1;
echo '<div style="padding-left:10px;">';
echo '<img src="../images/img/edit.gif" alt="image" />IP: '.$data[0].'<br />Broswer:'.$data[1].'<br /> Referer: '.$data[2].'<br />Session Id '.$data[3].'<br />Session Id:'.$data[4].'<br />Time: '.$data[5].'<small></small><br />';
echo '</div>';
echo '<div class="link"></div>';
}
echo '</div">';
echo '<div class="navigation">';
page_jumpnavigation('visitlogs.php?', $config['postnews'], $start, $total);
page_strnavigation('visitlogs.php?', $config['postnews'], $start, $total);
echo 'Total Logs: <b>'.(int)$total.'</b><br />';
echo '</div>';
}else{
echo '<br /><div style="text-align:center;"><img src="../images/img/reload.gif" alt="image" /> <b>No Logs Yet!</b></div><br />';
}
echo '<div>';
echo '<div class="link"><div class="link-space" style="padding-left:10px;text-align:left;"><img src="../images/img/panel.gif" alt="image" /> <a href="visitlogs.php?action=alldel'.SID.'">Clear All Logs</a></div></div>';
}
if ($action=="alldel") {
echo '<div style="padding-left:10px;text-align-left;">';
echo 'Do You Realy Want To Clear All Logs?<br />';
echo '<img src="../images/img/error.gif" alt="image" /> <b><a href="visitlogs.php?action=delall&uid='.$_SESSION['token'].'&'.SID.'">Yes!</a></b><br />';
echo '<img src="../images/img/back.gif" alt="image" /> <a href="visitlogs.php?start='.$start.'&'.SID.'">No</a>';
echo '</div>';
}
if ($action=="delall") {
$uid = check($_GET['uid']);
if (is_admin(array(101))){
if ($uid==$_SESSION['token']){
clear_files(DATADIR."iplog.dat");
echo '<br><div class="done" >';
echo "All Logs Deleted!";
echo '</div>';
} else {echo '<img src="../images/img/error.gif" alt="image" /> <b>Error! Invalid session id, retry action!</b><br />';}
} else {echo '<img src="../images/img/error.gif" alt="image" /> <b>Error You Do Not Have Permision</b><br />';}
echo '<div class="link"><div class="link-space" style="padding-left:10px;text-align:left;"><img src="../images/img/back.gif" alt="image" /> <a href="visitlogs.php?start='.$start.'&'.SID.'">Back</a></div></div>';
}
echo '<div class="link"><div class="link-space" style="padding-left:10px;text-align:left;"><img src="../images/img/panel.gif" alt="image" /> <a href="index.php?'.SID.'">Admin Panel</a></div></div>';
echo '<div class="link"><div class="link-space" style="padding-left:10px;text-align:center;"><img src="../images/img/homepage.gif" alt="image" /> <a href="../pages/index.php?action=menu&'.SID.'">Home</a></div></div><br />';
}
else {header ("Location: ../index.php?isset=404&".SID); exit;}
echo '<!--Motor V-'.MOTOR_VERSION.'-->';
echo '<div class="footer">';
echo '<div class="footer-text">';
echo '© Copyright 2017 ©<br>';
echo 'www.sitename.com<br>';
echo 'All Rights Reserved';
echo '</div>';
echo '</div>';
echo '<div>';
echo '</body></html>';
?>