mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-09 22:26:10 +00:00
fix: logging works, tech log link added to Admin
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../Database.php");
|
||||
@@ -25,7 +24,7 @@ for($i=1; $i<9; $i++) {
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."abdata SET ".$atech.$btech." WHERE vref = $id";
|
||||
$database->query($q);
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".(int) $_SESSION['id'].",'Changed troop anmount in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".(int) $_SESSION['id'].",'Changed troop upgrade levels in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$id."&ab");
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ for($i=1; $i<11; $i++) {
|
||||
}
|
||||
$q = "UPDATE ".TB_PREFIX."units SET ".$units." WHERE vref = ".(int) $id;
|
||||
$database->query($q);
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".(int) $_SESSION['id'].",'Changed troop anmount in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".(int) $_SESSION['id'].",'Changed troop amounts in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$id."&d");
|
||||
?>
|
||||
@@ -126,7 +126,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed Admin Info',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed Extra server settings',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed Log Settings',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed NewsBox Settings',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed PLUS setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed PLUS Settings',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")");
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed General Server Settings',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user