mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-14 16:46:08 +00:00
fix ban system 100% + replace the previous fix with better one + new admin panel by ZravianX version
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename addTroops.php ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianX Project ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/addTroops.php ##
|
||||
## Developed by: Dzoki & Advocaite ##
|
||||
## Thanks to: Dzoki & itay2277 (edit troops) ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -101,6 +108,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/admin.php?p=addTroops&did=".$id."&d");
|
||||
header("Location: ../../../admin.php?p=addTroops&did=".$id."&d");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.php ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/cp.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
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!");
|
||||
if ($session->access < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
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']." Cultural Points to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
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/admin.php?p=player&uid=".$id."&cp=ok");
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."&cp=ok");
|
||||
?>
|
||||
@@ -1,24 +1,31 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/editUser.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
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!");
|
||||
if ($_SESSION['access'] < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
|
||||
$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/admin.php?p=player&uid=".$id."");
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -1,26 +1,30 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.php ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.12.03 ##
|
||||
## Filename: GameEngine/Admin/Mods/gold.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
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!");
|
||||
|
||||
if ($session->access < ADMIN) die("Access Denied: You aren't Admin!");
|
||||
$id = $_POST['id'];
|
||||
$gold = $_POST['gold'];
|
||||
|
||||
$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/admin.php?p=gold&g");
|
||||
$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");
|
||||
?>
|
||||
@@ -1,14 +1,22 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold_1.php ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.05 ##
|
||||
## Filename: GameEngine/Admin/Mods/gold_1.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
@@ -21,5 +29,5 @@ mysql_query("UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHER
|
||||
$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/admin.php?p=player&uid=".$id."&g=ok");
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."&g=ok");
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.12.03 ##
|
||||
## Filename: GameEngine/Admin/Mods/silver.php ##
|
||||
## Developed 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
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 aren't Admin!");
|
||||
$id = $_POST['id'];
|
||||
$silver = $_POST['silver'];
|
||||
$q = "UPDATE ".TB_PREFIX."users SET silver = silver + ".$_POST['silver']." WHERE id != '0'";
|
||||
mysql_query($q);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$silver</b> silver to all users',".time().")");
|
||||
header("Location: ../../../admin.php?p=give&s=$silver");
|
||||
?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.12.03 ##
|
||||
## Filename: GameEngine/Admin/Mods/silver_1.php ##
|
||||
## Developed 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
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!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET silver = silver + ".$_POST['silver']." WHERE id = ".$id."");
|
||||
|
||||
$name = $database->getUserField($id,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added <b>".$_POST['silver']."</b> silver to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../admin.php?p=player&uid=".$id."&s=ok");
|
||||
?>
|
||||
@@ -1,16 +1,24 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename database.php ##
|
||||
## ##
|
||||
## Project: ZravianX ##
|
||||
## Version: 2011.11.07 ##
|
||||
## Filename: GameEngine/Admin/database.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## 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 ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include("../GameEngine/config.php");
|
||||
include("../GameEngine/Data/buidata.php");
|
||||
include("GameEngine/config.php");
|
||||
include("GameEngine/Data/buidata.php");
|
||||
|
||||
class adm_DB {
|
||||
var $connection;
|
||||
@@ -21,7 +29,7 @@ class adm_DB {
|
||||
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||
}
|
||||
|
||||
function Login($username,$password) {
|
||||
function Login($username,$password){
|
||||
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
class funct {
|
||||
|
||||
function CheckLogin(){
|
||||
if($_SESSION['access'] >= MULTIHUNTER && isset($_SESSION['id'])){
|
||||
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user