setHTMLTitle("Deine Regionen"); $HTML->importSeitenInhalt("pages/HTML/deine-regionen.html"); function cleanSize($bytes) { if ($bytes > 0) { $unit = intval(log($bytes, 1024)); $units = array('B', 'KB', 'MB', 'GB'); if (array_key_exists($unit, $units) === true) { return sprintf('%d %s', $bytes / pow(1024, $unit), $units[$unit]); } } return $bytes; } function getRegionStatsData($regionID) { global $RUNTIME; $statement = $RUNTIME['PDO']->prepare("SELECT * FROM regions_info WHERE regionID = ?"); $statement->execute([$regionID]); if($row = $statement->fetch()) { $return = array(); $return['Prims'] = $row['Prims']; $return['SimFPS'] = $row['SimFPS']; $return['PhyFPS'] = $row['PhyFPS']; $return['ProcMem'] = cleanSize(str_replace(".", "", str_replace(",", ".", $row['ProcMem']))."000"); $return['RegionVersion'] = trim($row['RegionVersion']); return $return; } return array(); } if(@$_REQUEST['action'] == 'remove' && @$_REQUEST['region'] != '') { if(@$_SESSION['LEVEL'] >= 100) { $statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ?"); $statementMembership->execute(array($_REQUEST['region'])); }else{ $statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM regions WHERE uuid = ? AND owner_uuid = ?"); $statementMembership->execute(array($_REQUEST['region'], $_SESSION['UUID'])); } } $table = '
Region Name | Eigentümer | Position | Aktionen |
---|