mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 13:46:09 +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,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."");
|
||||
?>
|
||||
Reference in New Issue
Block a user