Update function.php

This commit is contained in:
Shadow
2014-03-06 07:36:22 +02:00
parent fa52446234
commit 6718e429b5
+61 -61
View File
@@ -27,73 +27,73 @@ class funct {
} }
} }
function Act($get){ function Act($get){
global $admin,$database; global $admin,$database;
switch($get['action']){ switch($get['action']){
case recountPop: case "recountPop":
$admin->recountPop($get['did']); $admin->recountPop($get['did']);
$admin->recountCP($get['did']); $admin->recountCP($get['did']);
break; break;
case recountPopUsr: case "recountPopUsr":
$admin->recountPopUser($get['uid']); $admin->recountPopUser($get['uid']);
break; break;
case StopDel: case "StopDel":
//stop deleting //stop deleting
break; break;
case delVil: case "delVil":
if($get['mode'] != 1){ if($get['mode'] != 1){
$admin->DelVillage($get['did']); $admin->DelVillage($get['did']);
}else{ }else{
$admin->DelVillage($get['did'], 1); $admin->DelVillage($get['did'], 1);
} }
break; break;
case delBan: case "delBan":
$admin->DelBan($get['uid'],$get['id']); $admin->DelBan($get['uid'],$get['id']);
//remove ban //remove ban
break; break;
case addBan: case "addBan":
if($get['time']){$end = time()+$get['time']; }else{$end = '';} if($get['time']){$end = time()+$get['time']; }else{$end = '';}
if(is_numeric($get['uid'])){ if(is_numeric($get['uid'])){
$get['uid'] = $get['uid']; $get['uid'] = $get['uid'];
}else{ }else{
$get['uid'] = $database->getUserField(addslashes($get['uid']),'id',1); $get['uid'] = $database->getUserField(addslashes($get['uid']),'id',1);
} }
$admin->AddBan($get['uid'],$end,$get['reason']); $admin->AddBan($get['uid'],$end,$get['reason']);
//add ban //add ban
break; break;
case delOas: case "delOas":
//oaza //oaza
break; break;
case logout: case "logout":
$this->LogOut(); $this->LogOut();
break; break;
} }
if($get['action'] == 'logout'){ if($get['action'] == 'logout'){
header("Location: admin.php"); header("Location: admin.php");
}else{ }else{
header("Location: ".$_SERVER['HTTP_REFERER']); header("Location: ".$_SERVER['HTTP_REFERER']);
} }
} }
function Act2($post){ function Act2($post){
global $admin,$database; global $admin,$database;
switch($post['action']){ switch($post['action']){
case DelPlayer: case "DelPlayer":
$admin->DelPlayer($post['uid'],$post['pass']); $admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel"); header("Location: ?p=search&msg=ursdel");
break; break;
case punish: case "punish":
$admin->Punish($post); $admin->Punish($post);
header("Location: ".$_SERVER['HTTP_REFERER']); header("Location: ".$_SERVER['HTTP_REFERER']);
break; break;
case addVillage: case "addVillage":
$admin->AddVillage($post); $admin->AddVillage($post);
header("Location: ".$_SERVER['HTTP_REFERER']); header("Location: ".$_SERVER['HTTP_REFERER']);
break; break;
} }
} }
function LogIN($username,$password){ function LogIN($username,$password){