mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-18 02:26:12 +00:00
fix ww rank: now the ww dissapear from rank when he destroyed + reworked admin panel by allycol93 with some changes by me
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/addTroops.php ##
|
||||
## Developed by: Dzoki & Advocaite ##
|
||||
## Filename addTroops.php ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianX Project ##
|
||||
## Thanks to: Dzoki & itay2277 (edit troops) ##
|
||||
## Edited by: ZZJHONS ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: ZravianX (c) 2011 - All rights reserved ##
|
||||
## URLs: http://zravianx.zzjhons.com ##
|
||||
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -108,6 +101,6 @@ mysql_query($q);
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed troop anmount in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../admin.php?p=addTroops&did=".$id."&d");
|
||||
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,33 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/cp.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Edited by: ZZJHONS ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: ZravianX (c) 2011 - All rights reserved ##
|
||||
## URLs: http://zravianx.zzjhons.com ##
|
||||
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
|
||||
## Filename cp.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
if ($session->access < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET cp = cp + ".$_POST['cp']." WHERE id = ".$id."");
|
||||
|
||||
$name = $database->getUserField($id,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added ".$_POST['cp']." Culture Points to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."&cp=ok");
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename delallymedal.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$delete = $_POST['medalid'];
|
||||
$aid = $_POST['aid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."allimedal WHERE id = ".$delete."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=alliance&aid=".$aid."");
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyuser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$allyid = $_POST['allyid'];
|
||||
$aid = $_POST['aid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."allimedal WHERE allyid = ".$aid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=alliance&aid=".$aid."");
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyweek.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$deleteweek = $_POST['deleteweek'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."allimedal WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=delallymedal");
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyuser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$userid = $_POST['userid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE userid = ".$userid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$userid."");
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyweek.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=delmedal");
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['uid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$access = $_POST['access'];
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
access = ".$access."
|
||||
WHERE id = ".$id."") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editBuildings.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
f1 = '".$_POST['id1level']."',
|
||||
f1t = '".$_POST['id1gid']."',
|
||||
f2 = '".$_POST['id2level']."',
|
||||
f2t = '".$_POST['id2gid']."',
|
||||
f3 = '".$_POST['id3level']."',
|
||||
f3t = '".$_POST['id3gid']."',
|
||||
f4 = '".$_POST['id4level']."',
|
||||
f4t = '".$_POST['id4gid']."',
|
||||
f5 = '".$_POST['id5level']."',
|
||||
f5t = '".$_POST['id5gid']."',
|
||||
f6 = '".$_POST['id6level']."',
|
||||
f6t = '".$_POST['id6gid']."',
|
||||
f7 = '".$_POST['id7level']."',
|
||||
f7t = '".$_POST['id7gid']."',
|
||||
f8 = '".$_POST['id8level']."',
|
||||
f8t = '".$_POST['id8gid']."',
|
||||
f9 = '".$_POST['id9level']."',
|
||||
f9t = '".$_POST['id9gid']."',
|
||||
f10 = '".$_POST['id10level']."',
|
||||
f10t = '".$_POST['id10gid']."',
|
||||
f11 = '".$_POST['id11level']."',
|
||||
f11t = '".$_POST['id11gid']."',
|
||||
f12 = '".$_POST['id12level']."',
|
||||
f12t = '".$_POST['id12gid']."',
|
||||
f13 = '".$_POST['id13level']."',
|
||||
f13t = '".$_POST['id13gid']."',
|
||||
f14 = '".$_POST['id14level']."',
|
||||
f14t = '".$_POST['id14gid']."',
|
||||
f15 = '".$_POST['id15level']."',
|
||||
f15t = '".$_POST['id15gid']."',
|
||||
f16 = '".$_POST['id16level']."',
|
||||
f16t = '".$_POST['id16gid']."',
|
||||
f17 = '".$_POST['id17level']."',
|
||||
f17t = '".$_POST['id17gid']."',
|
||||
f18 = '".$_POST['id18level']."',
|
||||
f18t = '".$_POST['id18gid']."',
|
||||
f19 = '".$_POST['id19level']."',
|
||||
f19t = '".$_POST['id19gid']."',
|
||||
f20 = '".$_POST['id20level']."',
|
||||
f20t = '".$_POST['id20gid']."',
|
||||
f21 = '".$_POST['id21level']."',
|
||||
f21t = '".$_POST['id21gid']."',
|
||||
f22 = '".$_POST['id22level']."',
|
||||
f22t = '".$_POST['id22gid']."',
|
||||
f23 = '".$_POST['id23level']."',
|
||||
f23t = '".$_POST['id23gid']."',
|
||||
f24 = '".$_POST['id24level']."',
|
||||
f24t = '".$_POST['id24gid']."',
|
||||
f25 = '".$_POST['id25level']."',
|
||||
f25t = '".$_POST['id25gid']."',
|
||||
f26 = '".$_POST['id26level']."',
|
||||
f26t = '".$_POST['id26gid']."',
|
||||
f27 = '".$_POST['id27level']."',
|
||||
f27t = '".$_POST['id27gid']."',
|
||||
f28 = '".$_POST['id28level']."',
|
||||
f28t = '".$_POST['id28gid']."',
|
||||
f29 = '".$_POST['id29level']."',
|
||||
f29t = '".$_POST['id29gid']."',
|
||||
f30 = '".$_POST['id30level']."',
|
||||
f30t = '".$_POST['id30gid']."',
|
||||
f31 = '".$_POST['id31level']."',
|
||||
f31t = '".$_POST['id31gid']."',
|
||||
f32 = '".$_POST['id32level']."',
|
||||
f32t = '".$_POST['id32gid']."',
|
||||
f33 = '".$_POST['id33level']."',
|
||||
f33t = '".$_POST['id33gid']."',
|
||||
f34 = '".$_POST['id34level']."',
|
||||
f34t = '".$_POST['id34gid']."',
|
||||
f35 = '".$_POST['id35level']."',
|
||||
f35t = '".$_POST['id35gid']."',
|
||||
f36 = '".$_POST['id36level']."',
|
||||
f36t = '".$_POST['id36gid']."',
|
||||
f37 = '".$_POST['id37level']."',
|
||||
f37t = '".$_POST['id37gid']."',
|
||||
f38 = '".$_POST['id38level']."',
|
||||
f38t = '".$_POST['id38gid']."',
|
||||
f39 = '".$_POST['id39level']."',
|
||||
f39t = '".$_POST['id39gid']."',
|
||||
f40 = '".$_POST['id40level']."',
|
||||
f40t = '".$_POST['id40gid']."'
|
||||
WHERE vref = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
apall = '".$_POST['off']."',
|
||||
dpall = '".$_POST['def']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['uid'];
|
||||
$pass = md5($_POST['newpw']);
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
password = '".$pass."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$pdur = $_POST['plus'] * 86400;
|
||||
$b1dur = $_POST['wood'] * 86400;
|
||||
$b2dur = $_POST['clay'] * 86400;
|
||||
$b3dur = $_POST['iron'] * 86400;
|
||||
$b4dur = $_POST['crop'] * 86400;
|
||||
$quest = $_POST['quest'];
|
||||
|
||||
if($pdur > 1){ $plus = (time() + $pdur); } else { $pdur = 'plus'; }
|
||||
if($b1dur > 1){ $wood = (time() + $b1dur); } else { $wood = 'b1'; }
|
||||
if($b2dur > 1){ $clay = (time() + $b2dur); } else { $clay = 'b2'; }
|
||||
if($b3dur > 1){ $iron = (time() + $b3dur); } else { $iron = 'b3'; }
|
||||
if($b4dur > 1){ $crop = (time() + $b4dur); } else { $crop = 'b4'; }
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
plus = '".$plus."',
|
||||
b1 = '".$wood."',
|
||||
b2 = '".$clay."',
|
||||
b3 = '".$iron."',
|
||||
b4 = '".$crop."',
|
||||
quest = '".$quest."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$dur = $_POST['protect'] * 86400;
|
||||
$protection = (time() + $dur);
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
protect = '".$protection."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editResources.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['did'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."vdata SET
|
||||
wood = '".$_POST['wood']."',
|
||||
clay = '".$_POST['clay']."',
|
||||
iron = '".$_POST['iron']."',
|
||||
crop = '".$_POST['crop']."',
|
||||
maxstore = '".$_POST['maxstore']."',
|
||||
maxcrop = '".$_POST['maxcrop']."'
|
||||
WHERE wref = '".$id."'") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
sit1 = '".$_POST['sitter1']."',
|
||||
sit2 = '".$_POST['sitter2']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -1,31 +1,36 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/editUser.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Edited by: ZZJHONS ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: ZravianX (c) 2011 - All rights reserved ##
|
||||
## URLs: http://zravianx.zzjhons.com ##
|
||||
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
if ($_SESSION['access'] < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
$user = $database->getUserArray($id,1);
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET email = '".$_POST['email']."', tribe = ".$_POST['tribe'].", location = '".$_POST['location']."', desc1 = '".$_POST['desc1']."', `desc2` = '".$_POST['desc2']."' WHERE id = ".$_POST['id']."");
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed <a href=\'admin.php?p=village&did=$id\'>".$user['username']."</a>\'s profile',".time().")");
|
||||
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."");
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
email = '".$_POST['email']."',
|
||||
tribe = ".$_POST['tribe'].",
|
||||
location = '".$_POST['location']."',
|
||||
desc1 = '".$_POST['desc1']."',
|
||||
desc2 = '".$_POST['desc2']."',
|
||||
quest = '".$_POST['quest']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyuser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$uid = $_POST['uid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET username = '".$_POST['username']."' WHERE id = ".$uid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$uid."");
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['did'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."vdata SET
|
||||
owner = '".$_POST['newowner']."'
|
||||
WHERE wref = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$_POST['newowner']."");
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
ap = '".$_POST['off']."',
|
||||
dp = '".$_POST['def']."',
|
||||
RR = '".$_POST['res']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
|
||||
$plusdur = $_POST['plus'] * 86400;
|
||||
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
{
|
||||
if($row['plus'] < time()) { $plusbefore = time(); $addplus = $plusbefore + $plusdur; } elseif($row['plus'] > time()) { $plusbefore = $row['plus']; $addplus = $plusbefore + $plusdur; }
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
plus = '".$addplus."'
|
||||
WHERE id = '".$row['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=givePlus&g");
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
|
||||
$wood = $_POST['wood'] * 86400;
|
||||
$clay = $_POST['clay'] * 86400;
|
||||
$iron = $_POST['iron'] * 86400;
|
||||
$crop = $_POST['crop'] * 86400;
|
||||
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
{
|
||||
if($row['b1'] < time()) { $b1before = time(); $addb1 = $b1before + $wood; } elseif($row['b1'] > time()) { $b1before = $row['b1']; $addb1 = $b1before + $wood; }
|
||||
if($row['b2'] < time()) { $b2before = time(); $addb2 = $b1before + $clay; } elseif($row['b2'] > time()) { $b2before = $row['b2']; $addb2 = $b1before + $clay; }
|
||||
if($row['b3'] < time()) { $b3before = time(); $addb3 = $b1before + $iron; } elseif($row['b3'] > time()) { $b3before = $row['b3']; $addb3 = $b1before + $iron; }
|
||||
if($row['b4'] < time()) { $b4before = time(); $addb4 = $b1before + $crop; } elseif($row['b4'] > time()) { $b4before = $row['b4']; $addb4 = $b1before + $crop; }
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
b1 = '".$addb1."',
|
||||
b2 = '".$addb2."',
|
||||
b3 = '".$addb3."',
|
||||
b4 = '".$addb4."'
|
||||
WHERE id = '".$row['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=givePlusRes&g");
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold_1.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=maintenenceResetPlusBonus&g");
|
||||
?>
|
||||
@@ -1,30 +1,31 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.12.03 ##
|
||||
## Filename: GameEngine/Admin/Mods/gold.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Edited by: ZZJHONS ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: ZravianX (c) 2011 - All rights reserved ##
|
||||
## URLs: http://zravianx.zzjhons.com ##
|
||||
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
|
||||
## Filename gold_1.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
include_once("../../config.php");
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
if ($session->access < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
$id = $_POST['id'];
|
||||
$gold = $_POST['gold'];
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
|
||||
mysql_query($q);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$gold</b> gold to all users',".time().")");
|
||||
header("Location: ../../../admin.php?p=give&g=$gold");
|
||||
mysql_query($q) or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=gold&g");
|
||||
?>
|
||||
@@ -1,33 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/gold_1.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Edited by: ZZJHONS ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: ZravianX (c) 2011 - All rights reserved ##
|
||||
## URLs: http://zravianx.zzjhons.com ##
|
||||
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
|
||||
## Filename gold_1.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
|
||||
$name = $database->getUserField($id,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added <b>".$_POST['gold']."</b> gold to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."&g=ok");
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."&g=ok");
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceCleanBanData.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("TRUNCATE ".TB_PREFIX."banlist");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=ban");
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = '0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=maintenenceResetGold&g");
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET plus = '0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=resetPlusBonus&g");
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET b1 = '0', b2 = '0', b3='0', b4='0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=givePlus&g");
|
||||
?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename medals.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$medalid = $_POST['medalid'];
|
||||
$uid = $_POST['uid'];
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE id = ".$medalid."");
|
||||
|
||||
$name = mysql_query("SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid."");
|
||||
$name = mysql_result($name, 0);
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user <a href=\'admin.php?p=player&uid=$uid\'>$name</a> ',".time().")");
|
||||
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$uid."");
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename populateOases.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include ("../../Database.php");
|
||||
include ("../../Admin/database.php");
|
||||
include ("../../config.php");
|
||||
|
||||
$database->populateOasisUnitsLow();
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=server_info");
|
||||
?>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editBuildings.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
f1 = '".$_POST['id1level']."',
|
||||
f1t = '".$_POST['id1gid']."',
|
||||
f2 = '".$_POST['id2level']."',
|
||||
f2t = '".$_POST['id2gid']."',
|
||||
f3 = '".$_POST['id3level']."',
|
||||
f3t = '".$_POST['id3gid']."',
|
||||
f4 = '".$_POST['id4level']."',
|
||||
f4t = '".$_POST['id4gid']."',
|
||||
f5 = '".$_POST['id5level']."',
|
||||
f5t = '".$_POST['id5gid']."',
|
||||
f6 = '".$_POST['id6level']."',
|
||||
f6t = '".$_POST['id6gid']."',
|
||||
f7 = '".$_POST['id7level']."',
|
||||
f7t = '".$_POST['id7gid']."',
|
||||
f8 = '".$_POST['id8level']."',
|
||||
f8t = '".$_POST['id8gid']."',
|
||||
f9 = '".$_POST['id9level']."',
|
||||
f9t = '".$_POST['id9gid']."',
|
||||
f10 = '".$_POST['id10level']."',
|
||||
f10t = '".$_POST['id10gid']."',
|
||||
f11 = '".$_POST['id11level']."',
|
||||
f11t = '".$_POST['id11gid']."',
|
||||
f12 = '".$_POST['id12level']."',
|
||||
f12t = '".$_POST['id12gid']."',
|
||||
f13 = '".$_POST['id13level']."',
|
||||
f13t = '".$_POST['id13gid']."',
|
||||
f14 = '".$_POST['id14level']."',
|
||||
f14t = '".$_POST['id14gid']."',
|
||||
f15 = '".$_POST['id15level']."',
|
||||
f15t = '".$_POST['id15gid']."',
|
||||
f16 = '".$_POST['id16level']."',
|
||||
f16t = '".$_POST['id16gid']."',
|
||||
f17 = '".$_POST['id17level']."',
|
||||
f17t = '".$_POST['id17gid']."',
|
||||
f18 = '".$_POST['id18level']."',
|
||||
f18t = '".$_POST['id18gid']."',
|
||||
f19 = '".$_POST['id19level']."',
|
||||
f19t = '".$_POST['id19gid']."',
|
||||
f20 = '".$_POST['id20level']."',
|
||||
f20t = '".$_POST['id20gid']."',
|
||||
f21 = '".$_POST['id21level']."',
|
||||
f21t = '".$_POST['id21gid']."',
|
||||
f22 = '".$_POST['id22level']."',
|
||||
f22t = '".$_POST['id22gid']."',
|
||||
f23 = '".$_POST['id23level']."',
|
||||
f23t = '".$_POST['id23gid']."',
|
||||
f24 = '".$_POST['id24level']."',
|
||||
f24t = '".$_POST['id24gid']."',
|
||||
f25 = '".$_POST['id25level']."',
|
||||
f25t = '".$_POST['id25gid']."',
|
||||
f26 = '".$_POST['id26level']."',
|
||||
f26t = '".$_POST['id26gid']."',
|
||||
f27 = '".$_POST['id27level']."',
|
||||
f27t = '".$_POST['id27gid']."',
|
||||
f28 = '".$_POST['id28level']."',
|
||||
f28t = '".$_POST['id28gid']."',
|
||||
f29 = '".$_POST['id29level']."',
|
||||
f29t = '".$_POST['id29gid']."',
|
||||
f30 = '".$_POST['id30level']."',
|
||||
f30t = '".$_POST['id30gid']."',
|
||||
f31 = '".$_POST['id31level']."',
|
||||
f31t = '".$_POST['id31gid']."',
|
||||
f32 = '".$_POST['id32level']."',
|
||||
f32t = '".$_POST['id32gid']."',
|
||||
f33 = '".$_POST['id33level']."',
|
||||
f33t = '".$_POST['id33gid']."',
|
||||
f34 = '".$_POST['id34level']."',
|
||||
f34t = '".$_POST['id34gid']."',
|
||||
f35 = '".$_POST['id35level']."',
|
||||
f35t = '".$_POST['id35gid']."',
|
||||
f36 = '".$_POST['id36level']."',
|
||||
f36t = '".$_POST['id36gid']."',
|
||||
f37 = '".$_POST['id37level']."',
|
||||
f37t = '".$_POST['id37gid']."',
|
||||
f38 = '".$_POST['id38level']."',
|
||||
f38t = '".$_POST['id38gid']."',
|
||||
f39 = '".$_POST['id39level']."',
|
||||
f39t = '".$_POST['id39gid']."',
|
||||
f40 = '".$_POST['id40level']."',
|
||||
f40t = '".$_POST['id40gid']."'
|
||||
WHERE vref = $id") or die(mysql_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename renameVillage.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$did = $_POST['did'];
|
||||
$name = $_POST['villagename'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "UPDATE ".TB_PREFIX."vdata SET name = '$name' WHERE wref = $did";
|
||||
mysql_query($sql);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$did."&name=".$name."");
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename sendMessage.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$query = "INSERT INTO ".TB_PREFIX."mdata (target, owner, topic, message, viewed, time) VALUES ('$uid', 1, '$topic', '$message', 0, '$time')";
|
||||
|
||||
mysql_query($query);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=Newmessage&uid=".$uid."&msg=ok");
|
||||
?>
|
||||
@@ -17,8 +17,8 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include("GameEngine/config.php");
|
||||
include("GameEngine/Data/buidata.php");
|
||||
include("../GameEngine/config.php");
|
||||
include("../GameEngine/Data/buidata.php");
|
||||
|
||||
class adm_DB {
|
||||
var $connection;
|
||||
|
||||
@@ -45,6 +45,19 @@ class Automation {
|
||||
}
|
||||
}
|
||||
|
||||
private function checkWWLevel() {
|
||||
global $database;
|
||||
$q = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE wwlevel != 0");
|
||||
$ww = mysql_fetch_array($q);
|
||||
for ($i = 1; $i <= 40; $i++) {
|
||||
if(mysql_num_rows($q) > 0){
|
||||
if($ww['f99t'] != 40 && $ww['f'.$i.'t'] != 40){
|
||||
$database->setVillageLevel($ww['vref'], "wwlevel", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function procResType($ref) {
|
||||
global $session;
|
||||
switch($ref) {
|
||||
@@ -181,6 +194,7 @@ class Automation {
|
||||
}
|
||||
$this->updateStore();
|
||||
$this->getWWRankInfo();
|
||||
$this->checkWWLevel();
|
||||
}
|
||||
|
||||
function activeCropDead(){
|
||||
|
||||
Reference in New Issue
Block a user