Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.3
- * @ Author : DeZender
- * @ Release on : 06.05.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class GameCP {
- public $ranNavStats = null;
- public $ranUserList = null;
- public $tools = array();
- public $key = "gamecpuniquekey";
- public $sentKey = "i1gruasdfc3padsr5abeccdada2s8r9oe0k1e2y3s4e5pn6t7t8opm0e";
- public $a = array(0 => "YmlsbGluZy5nYW1lY3AuY29t", 1 => "YmlsbGluZzIuZ2FtZWNwLmNvbQ==");
- public function __construct() {
- $this->UsersOnline();
- return;
- }
- public function ClientPermissions() {
- $mp = array();
- $mp["voice"] = array("removeban", "removeallbans", "addban", "teamspeak", "control", "managevent", "edit", "savevent");
- $mp["services"] = array("taskschedule", "timeschedule", "mass", "fastdl", "edit", "edit2", "backup", "saveSched", "deleteSched", "restoreconfigs", "editgame", "addaddon", "addaddon2");
- $mp["support"] = array("massupdate", "update", "add", "edit", "new", "view", "viewc", "viewreply", "viewactive", "all", "deletetmpfiles", "download", "uploadfile");
- $mp["maps"] = array("install", "uninstall");
- $mp["clients"] = array("changepw", "removesubuser", "update", "edit", "updatesub", "editsubaccount", "newsubaccount", "addsubacct", "edit2", "cancel", "update", "viewsubaccount");
- $mp["dashboard"] = array();
- $mp["files"] = array("download", "wget", "remove", "upload", "doextract", "quickmanage", "edit", "cd", "rename", "mkdir", "mkfile", "addshortcut", "removeshortcut", "Save Changes");
- $mp["donations"] = array();
- $mp["console"] = array();
- $mp["configs"] = array("add", "new", "edit", "execute", "update", "remove", "editconfigs", "builder", "builderedit", "builderrun");
- $mp["cmdbackend"] = array("mass", "submitscreen", "viewlog", "downloadlog");
- $mp["billing"] = array("print", "view");
- $mp["serverstatus"] = array();
- $mp["process"] = array();
- $mp["payment"] = array();
- $mp["profile"] = array();
- $mp["modules"] = array("edit", "edit2");
- $mp["subusers"] = array("removesubuser", "updatesub", "newsubaccount", "editsubaccount", "addsubacct", "viewsubaccount");
- return $mp;
- }
- public function AdminPermissions() {
- $mp = array();
- $mp["payment"] = array();
- $mp["donations"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["taxes"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["promotions"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["products"] = array("view", "new", "newproduct", "addprice", "newprice", "reorder", "viewpackages");
- $mp["productaddons"] = array("remove", "removetype", "save", "edit");
- $mp["gateways"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["currencies"] = array("updaterates", "update", "edit", "add", "remove", "edit2", "new");
- $mp["billingcategories"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["update"] = array("run", "download");
- $mp["ttcategories"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["tools"] = array("custom", "autoip", "submitautoip", "sql", "submitsql", "backup", "backupv2", "cron", "cleanup", "optimize", "run_optimize", "phpinfo", "phpinfo2", "portcheck", "checkport");
- $mp["terminal"] = array();
- $mp["settings"] = array("edit", "logs", "testmail", "disableMaintenance", "update");
- $mp["schedule"] = array("remove", "save");
- $mp["portal"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["orders"] = array("edit", "run", "remove", "pending", "fraud", "paid", "saveq", "edit2");
- $mp["online"] = array();
- $mp["notify"] = array("edit", "sendmasspre", "sendmass", "send", "sendpre", "sendall");
- $mp["newservice"] = array("new", "add");
- $mp["news"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["newmachine"] = array("add", "new");
- $mp["machines"] = array("edit", "syncvoice", "updateftpd", "installcron", "updatebackend", "massremip", "edit2", "remove", "removeip", "updateip", "update", "addrange", "addip", "editip", "graphs", "migrate", "migrate2", "migrate3", "migrate4", "directions", "viewdetail");
- $mp["installgames"] = array();
- $mp["gameupdates"] = array("remove", "manage", "run", "view", "addedit", "doupdate");
- $mp["games"] = array("export", "import", "clone", "removeGame", "edit", "edit2", "add", "update", "new");
- $mp["emails"] = array("update", "edit", "add", "add2", "edit3", "edit2", "remove", "edit2", "new", "sendtest");
- $mp["configbuilder"] = array("updateitems", "removeitem", "edit2", "edit");
- $mp["commands"] = array("pre", "save", "sendsave", "send", "remove");
- $mp["admins"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["addons"] = array("update", "edit", "add", "remove", "clone", "new");
- $mp["addoncategories"] = array("update", "edit", "add", "remove", "edit2", "new");
- $mp["subusers"] = array("removesubuser", "updatesub", "newsubaccount", "editsubaccount", "addsubacct", "viewsubaccount");
- $mp["voice"] = array("removeban", "removeallbans", "addban", "unsuspend", "suspend", "teamspeak", "control", "managevent", "edit", "savevent", "remove");
- $mp["services"] = array("taskschedule", "timeschedule", "mass", "fastdl", "edit", "edit2", "backup", "saveSched", "deleteSched", "changeuser", "unsuspend", "suspend", "restoreconfigs", "editgame", "addaddon", "addaddon2", "newgame2");
- $mp["support"] = array("massupdate", "update", "add", "edit", "new", "view", "viewc", "viewreply", "viewactive", "all", "deletetmpfiles", "download", "uploadfile");
- $mp["maps"] = array("install", "uninstall");
- $mp["clients"] = array("changepw", "removesubuser", "update", "edit", "add", "remove", "clone", "new", "updatesub", "editsubaccount", "newsubaccount", "export", "import", "resetpassword", "addsubacct", "edit2", "cancel", "update", "moveuser", "move2", "move3", "swapshell", "viewsubaccount");
- $mp["dashboard"] = array();
- $mp["files"] = array("download", "wget", "remove", "upload", "doextract", "quickmanage", "edit", "cd", "rename", "mkdir", "mkfile", "addshortcut", "removeshortcut", "Save Changes");
- $mp["console"] = array();
- $mp["serverstatus"] = array();
- $mp["process"] = array();
- $mp["payment"] = array();
- $mp["configs"] = array("add", "new", "edit", "execute", "update", "remove", "editconfigs", "builder", "builderedit", "builderrun");
- $mp["cmdbackend"] = array("mass", "submitscreen", "viewlog", "downloadlog");
- $mp["billing"] = array("print", "view");
- $mp["modules"] = array("update", "edit", "action", "remove", "edit2", "new");
- return $mp;
- }
- public function CheckPermissions($page) {
- global $mode;
- global $opt;
- global $noheader;
- if (!isset($_REQUEST["mode"]))
- {
- $_REQUEST["mode"] = "";
- }
- if (!isset($_REQUEST["mode"]) && isset($mode))
- {
- $_REQUEST["mode"] = $mode;
- }
- $failed = false;
- $perms = $_SESSION["gamecp"]["userinfo"]["permissions"];
- if ($_SESSION["gamecp"]["userinfo"]["ulevel"] == "0")
- {
- $mainperms = $this->ClientPermissions();
- if (!isset($mainperms[$page]))
- {
- $failed = true;
- }
- }
- else
- {
- $mainperms = $this->AdminPermissions();
- if (!array_key_exists($page, $mainperms))
- {
- return true;
- }
- if (!empty($_REQUEST["mode"]) && !isset($mainperms[$page][$_REQUEST["mode"]]))
- {
- return true;
- }
- }
- if (!(!is_array($perms)) && !array_key_exists($page, $perms))
- {
- $failed = true;
- }
- if (!empty($_REQUEST["mode"]))
- {
- if (!in_array($_REQUEST["mode"], $mainperms[$page]))
- {
- return true;
- }
- if (!isset($perms[$page][$_REQUEST["mode"]]))
- {
- $failed = true;
- }
- }
- if ($failed)
- {
- if (!$noheader)
- {
- $this->loadIncludes("panel");
- $Panel = new Panel();
- $Panel->ErrorExit('' . "You do not have permission to view this page. (" . $page . ")");
- return null;
- }
- exit();
- }
- return;
- }
- public function RegisterTool($title, $tool) {
- $this->tools[$tool] = $title;
- return;
- }
- public function GetTools() {
- return $this->tools;
- }
- public function SecureHome($fname, $afile) {
- $ofile = str_replace("..", "", $afile);
- if (strpos($afile, '' . "/home/" . $fname) === false)
- {
- return FMError("You do not have permission to view this location, error: FILE3a.");
- }
- return;
- }
- public function GetSessionKey() {
- return md5(md5($_SESSION["gamecp"]["userinfo"]["id"]) . $_SESSION["gamecp"]["userinfo"]["name"] . md5("GCP" . $this->whitelist($_SERVER["REMOTE_ADDR"], "int")));
- }
- public function ConvertBytes($size) {
- $unit = array("bytes", "KB", "MB", "GB", "TB", "PB");
- return @round($size / pow(1024, $i = floor(log($size, 1024))), 2) . " " . $unit[$i];
- }
- public function ConvertToBytes($size) {
- $var = explode(" ", $size);
- if ($var[1] == "MB")
- {
- return $var[0] * 1024 * 1024;
- }
- if ($var[1] == "GB")
- {
- return round($var[0] * 1024 * 1024 * 1024);
- }
- return;
- }
- public function LoginSession() {
- if (isset($_SESSION["gamecp"]["lang"]))
- {
- $lang = $_SESSION["gamecp"]["lang"];
- }
- if (isset($_SESSION["gamecp"]["upgrades"]))
- {
- $upgrades = $_SESSION["gamecp"]["upgrades"];
- }
- if (isset($_SESSION["gamecp"]["copyright"]))
- {
- $copyright = $_SESSION["gamecp"]["copyright"];
- }
- if (isset($_SESSION["gamecp"]["basic"]))
- {
- $clanmode = $_SESSION["gamecp"]["basic"];
- }
- if (isset($lang))
- {
- $_SESSION["gamecp"]["lang"] = $lang;
- }
- if (isset($upgrades))
- {
- $_SESSION["gamecp"]["upgrades"] = $upgrades;
- unset($upgrades);
- ................................................................
- ...............................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement