mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#389 usage statistics
This commit is contained in:
parent
8043744629
commit
441b072a7d
@ -64,6 +64,74 @@ if (isset($include) and $include == true) {
|
||||
$response->add('Action: insert_easywi_version done: ');
|
||||
$query->closecursor();
|
||||
|
||||
$add = $sql->prepare("CREATE TABLE IF NOT EXISTS `easywi_statistics_current` (
|
||||
`gameMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoPassword` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoTag` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNotRunning` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterDBAvailable` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`ticketsCompleted` int(10) unsigned DEFAULT 0,
|
||||
`ticketsInProcess` int(10) unsigned DEFAULT 0,
|
||||
`ticketsNew` int(10) unsigned DEFAULT 0,
|
||||
`userAmount` int(10) unsigned DEFAULT 0,
|
||||
`userAmountActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterVserverAvailable` int(10) unsigned DEFAULT 0,
|
||||
`virtualInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficAllowed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverCrashed` int(10) unsigned DEFAULT 0,
|
||||
`webMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`webMasterSpaceAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webMasterVhostAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webspaceInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webspaceActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGiven` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGivenActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`userID` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`statDate` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`userID`)
|
||||
) ENGINE=InnoDB");
|
||||
$add->execute();
|
||||
|
||||
$insert = $sql->prepare("INSERT INTO `easywi_statistics_current` (`userID`) VALUES (?)");
|
||||
$insert->execute(array(0));
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `userdata` WHERE `accounttype`!='a'");
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$insert->execute(array($row['id']));
|
||||
}
|
||||
|
||||
$query = $sql->prepare("DROP TABLE IF EXISTS `rootsSubnets`");
|
||||
$query = $sql->prepare("DROP TABLE IF EXISTS `rootsIP4`");
|
||||
|
||||
|
@ -1,12 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<sprache>
|
||||
<gserver_crashed>abgestürzte Gameserver</gserver_crashed>
|
||||
<gserver_crashed>Abgestürzte Gameserver</gserver_crashed>
|
||||
<gserver_removed>Gameserver mit entferntem Password</gserver_removed>
|
||||
<gserver_tag_removed>Gameserver mit entferntem Servertag</gserver_tag_removed>
|
||||
<host_crashed>abgestürzte Hosts</host_crashed>
|
||||
<master_crashed>abgestürzte Masterserver</master_crashed>
|
||||
<host_crashed>Abgestürzte Hosts</host_crashed>
|
||||
<master_crashed>Abgestürzte Masterserver</master_crashed>
|
||||
<master_installed_db>Installierte Datenbanken</master_installed_db>
|
||||
<master_installed_server>Installierte Server</master_installed_server>
|
||||
<master_installed_slots>Installierte Slots</master_installed_slots>
|
||||
<master_installed_space>Vergebener Speicherplatz</master_installed_space>
|
||||
<master_installed_vhosts>Installierte Vhosts</master_installed_vhosts>
|
||||
<tickets>Tickets</tickets>
|
||||
<tickets_open>unbeantwortete Tickets</tickets_open>
|
||||
<ts3master_crashed>abgestürzte TS3 Masterserver</ts3master_crashed>
|
||||
<voice_crashed>abgestürzte Voiceserver</voice_crashed>
|
||||
<tickets_open>Offene Tickets</tickets_open>
|
||||
<tickets_new>Neue Tickets</tickets_new>
|
||||
<ts3master_crashed>Abgestürzte TS3 Masterserver</ts3master_crashed>
|
||||
<usage_slots>Belegte Slots</usage_slots>
|
||||
<usage_space>Verbrauchter Speicherplatz</usage_space>
|
||||
<usage_traffic>Verbrauchter Traffic</usage_traffic>
|
||||
<voice_crashed>Abgestürzte Voiceserver</voice_crashed>
|
||||
</sprache>
|
@ -5,8 +5,17 @@
|
||||
<gserver_tag_removed> gameserver with removed servertag</gserver_tag_removed>
|
||||
<host_crashed>crashed hosts</host_crashed>
|
||||
<master_crashed>crashed masterserver</master_crashed>
|
||||
<master_installed_db>Installed Datenbanken</master_installed_db>
|
||||
<master_installed_server>Installed Server</master_installed_server>
|
||||
<master_installed_slots>Installed Slots</master_installed_slots>
|
||||
<master_installed_space>Installed Space</master_installed_space>
|
||||
<master_installed_vhosts>Installed Vhosts</master_installed_vhosts>
|
||||
<tickets>Tickets</tickets>
|
||||
<tickets_open> unanswered and open support tickets</tickets_open>
|
||||
<tickets_open>Open Tickets</tickets_open>
|
||||
<tickets_new>New Tickets</tickets_new>
|
||||
<ts3master_crashed>crashed TS3 masterserver</ts3master_crashed>
|
||||
<usage_slots>Used Slots</usage_slots>
|
||||
<usage_space>Used Space</usage_space>
|
||||
<usage_traffic>Used Traffic</usage_traffic>
|
||||
<voice_crashed>crashed voiceserver</voice_crashed>
|
||||
</sprache>
|
@ -50,7 +50,7 @@ if (isset($argv)) {
|
||||
$args = array();
|
||||
|
||||
foreach ($argv as $a) {
|
||||
if ($a == 'gs' or $a == 'vs' or $a == 'vh' or $a == 'my') {
|
||||
if ($a == 'gs' or $a == 'vs' or $a == 'vh' or $a == 'my' or $a == 'st') {
|
||||
$checkTypeOfServer = $a;
|
||||
} else if (is_numeric($a)) {
|
||||
$sleep = $a;
|
||||
@ -91,6 +91,8 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
print 'Checking Web Quotas' . "\r\n";
|
||||
} else if ($checkTypeOfServer == 'vs') {
|
||||
print 'Checking Voiceserver' . "\r\n";
|
||||
} else if ($checkTypeOfServer == 'st') {
|
||||
print 'Checking Usage Statistics' . "\r\n";
|
||||
} else {
|
||||
print 'Getting MySQL DB sizes' . "\r\n";
|
||||
}
|
||||
@ -242,7 +244,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
|
||||
foreach($gq->requestData() as $switchID => $v) {
|
||||
|
||||
unset($userid, $stopserver, $doNotRestart);
|
||||
unset($userid, $lendserver, $stopserver, $doNotRestart);
|
||||
|
||||
$lid = 0;
|
||||
$elapsed = 0;
|
||||
@ -273,7 +275,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
$slots++;
|
||||
}
|
||||
|
||||
if ($lendserver == 'Y' and $lendActive == 'Y' and $resellersettings[$resellerid]['shutdownempty'] == 'Y') {
|
||||
if ($lendserver == 'Y' and $lendActive == 'Y') {
|
||||
|
||||
$shutdownemptytime = $resellersettings[$resellerid]['shutdownemptytime'];
|
||||
|
||||
@ -302,7 +304,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
$returnCmd = array();
|
||||
|
||||
// Check lendserver specific settings
|
||||
if (isset($userid) and $lendserver == 'Y') {
|
||||
if (isset($userid) and isset($lendserver) and $lendserver == 'Y') {
|
||||
|
||||
// Running but no lend information in temp table
|
||||
if ($v['gq_online'] == 1) {
|
||||
@ -1161,9 +1163,323 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
}
|
||||
}
|
||||
|
||||
flush();
|
||||
|
||||
# Gather statistics
|
||||
if ($checkTypeOfServer == 'all' or $checkTypeOfServer == 'st') {
|
||||
|
||||
$query = $sql->prepare("SELECT u.`id`,u.`cname`,u.`resellerid`,u.`accounttype`,s.`brandname` FROM `userdata` AS u LEFT JOIN `settings` AS s ON u.`resellerid`=s.`resellerid` WHERE u.`active`='Y'");
|
||||
|
||||
$query3 = $sql->prepare("INSERT INTO `easywi_statistics` (`gameMasterInstalled`,`gameMasterActive`,`gameMasterSlotsAvailable`,`gameserverInstalled`,`gameserverActive`,`gameserverSlotsInstalled`,`gameserverSlotsActive`,`gameserverSlotsUsed`,`gameserverNoPassword`,`gameserverNoTag`,`gameserverNotRunning`,`ticketsCompleted`,`ticketsInProcess`,`ticketsNew`,`userAmount`,`userAmountActive`,`virtualMasterInstalled`,`virtualMasterActive`,`virtualMasterVserverAvailable`,`virtualInstalled`,`virtualActive`,`voiceMasterInstalled`,`voiceMasterActive`,`voiceMasterSlotsAvailable`,`voiceserverInstalled`,`voiceserverActive`,`voiceserverSlotsInstalled`,`voiceserverSlotsActive`,`voiceserverSlotsUsed`,`voiceserverTrafficAllowed`,`voiceserverTrafficUsed`,`webMasterInstalled`,`webMasterActive`,`webMasterSlotsAvailable`,`webspaceInstalled`,`webspaceActive`,`webspaceSpaceGiven`,`webspaceSpaceUsed`,`userID`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
$query4 = $sql->prepare("UPDATE `easywi_statistics_current` SET `gameMasterInstalled`=?,`gameMasterActive`=?,`gameMasterSlotsAvailable`=?,`gameserverInstalled`=?,`gameserverActive`=?,`gameserverSlotsInstalled`=?,`gameserverSlotsActive`=?,`gameserverSlotsUsed`=?,`gameserverNoPassword`=?,`gameserverNoTag`=?,`gameserverNotRunning`=?,`ticketsCompleted`=?,`ticketsInProcess`=?,`ticketsNew`=?,`userAmount`=?,`userAmountActive`=?,`virtualMasterInstalled`=?,`virtualMasterActive`=?,`virtualMasterVserverAvailable`=?,`virtualInstalled`=?,`virtualActive`=?,`voiceMasterInstalled`=?,`voiceMasterActive`=?,`voiceMasterSlotsAvailable`=?,`voiceserverInstalled`=?,`voiceserverActive`=?,`voiceserverSlotsInstalled`=?,`voiceserverSlotsActive`=?,`voiceserverSlotsUsed`=?,`voiceserverTrafficAllowed`=?,`voiceserverTrafficUsed`=?,`webMasterInstalled`=?,`webMasterActive`=?,`webMasterSlotsAvailable`=?,`webspaceInstalled`=?,`webspaceActive`=?,`webspaceSpaceGiven`=?,`webspaceSpaceUsed`=? WHERE `userID`=? LIMIT 1");
|
||||
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
if (($row['accounttype'] == 'a' and !isset($adminStatsCollected)) or $row['accounttype'] != 'a') {
|
||||
|
||||
echo "Gathering statistics for user " . $row['cname'] . " with ID " . $row['id'] . " \r\n";
|
||||
|
||||
$statsArray = array(
|
||||
'gameMasterInstalled' => 0,
|
||||
'gameMasterActive' => 0,
|
||||
'gameMasterSlotsAvailable' => 0,
|
||||
'gameMasterServerAvailable' => 0,
|
||||
'gameMasterCrashed' => 0,
|
||||
'gameserverInstalled' => 0,
|
||||
'gameserverActive' => 0,
|
||||
'gameserverSlotsInstalled' => 0,
|
||||
'gameserverSlotsActive' => 0,
|
||||
'gameserverSlotsUsed' => 0,
|
||||
'gameserverNoPassword' => 0,
|
||||
'gameserverNoTag' => 0,
|
||||
'gameserverNotRunning' => 0,
|
||||
'mysqlMasterInstalled' => 0,
|
||||
'mysqlMasterActive' => 0,
|
||||
'mysqlMasterDBAvailable' => 0,
|
||||
'mysqlMasterCrashed' => 0,
|
||||
'mysqlDBInstalled' => 0,
|
||||
'mysqlDBActive' => 0,
|
||||
'mysqlDBSpaceUsed' => 0,
|
||||
'ticketsCompleted' => 0,
|
||||
'ticketsInProcess' => 0,
|
||||
'ticketsNew' => 0,
|
||||
'userAmount' => 0,
|
||||
'userAmountActive' => 0,
|
||||
'virtualMasterInstalled' => 0,
|
||||
'virtualMasterActive' => 0,
|
||||
'virtualMasterVserverAvailable' => 0,
|
||||
'virtualInstalled' => 0,
|
||||
'virtualActive' => 0,
|
||||
'voiceMasterInstalled' => 0,
|
||||
'voiceMasterActive' => 0,
|
||||
'voiceMasterServerAvailable' => 0,
|
||||
'voiceMasterSlotsAvailable' => 0,
|
||||
'voiceMasterCrashed' => 0,
|
||||
'voiceserverInstalled' => 0,
|
||||
'voiceserverActive' => 0,
|
||||
'voiceserverSlotsInstalled' => 0,
|
||||
'voiceserverSlotsActive' => 0,
|
||||
'voiceserverSlotsUsed' => 0,
|
||||
'voiceserverCrashed' => 0,
|
||||
'voiceserverTrafficAllowed' => 0,
|
||||
'voiceserverTrafficUsed' => 0,
|
||||
'webMasterInstalled' => 0,
|
||||
'webMasterActive' => 0,
|
||||
'webMasterSpaceAvailable' => 0,
|
||||
'webMasterVhostAvailable' => 0,
|
||||
'webspaceInstalled' => 0,
|
||||
'webspaceActive' => 0,
|
||||
'webspaceSpaceGiven' => 0,
|
||||
'webspaceSpaceGivenActive' => 0,
|
||||
'webspaceSpaceUsed' => 0,
|
||||
);
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$insertID = 0;
|
||||
$adminStatsCollected = true;
|
||||
} else {
|
||||
$insertID = $row['id'];
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE `resellerid`=? OR `id`=`resellerid`");
|
||||
} else if ($row['accounttype'] == 'r') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE `resellerid`=?");
|
||||
}
|
||||
if ($row['accounttype'] != 'u') {
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['userAmount'] = (int) $query2->fetchColumn();
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE (`resellerid`=? OR `id`=`resellerid`) AND `active`='Y'");
|
||||
} else if ($row['accounttype'] == 'r') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE `resellerid`=? AND `active`='Y'");
|
||||
}
|
||||
if ($row['accounttype'] != 'u') {
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['userAmountActive'] = (int) $query2->fetchColumn();
|
||||
}
|
||||
|
||||
if ($row['accounttype'] != 'u') {
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `rserverdata` WHERE `userID`=?");
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['gameMasterInstalled'] = (int) $query2->fetchColumn();
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`maxslots`) AS `maxSlotsTotal`,SUM(`maxserver`) AS `maxServerTotal` FROM `rserverdata` WHERE `userID`=? AND `active`='Y'");
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['gameMasterActive'] = (int) $row2['amount'];
|
||||
$statsArray['gameMasterSlotsAvailable'] = (int) $row2['maxSlotsTotal'];
|
||||
$statsArray['gameMasterServerAvailable'] = (int) $row2['maxServerTotal'];
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `voice_masterserver` WHERE `managedForID` IS NULL");
|
||||
$query2->execute();
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `voice_masterserver` WHERE `managedForID`=?");
|
||||
$query2->execute(array($insertID));
|
||||
}
|
||||
$statsArray['voiceMasterInstalled'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`maxslots`) AS `maxSlotsTotal`,SUM(`maxserver`) AS `maxServerTotal` FROM `voice_masterserver` WHERE `managedForID` IS NULL AND `active`='Y'");
|
||||
$query2->execute();
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`maxslots`) AS `maxSlotsTotal`,SUM(`maxserver`) AS `maxServerTotal` FROM `voice_masterserver` WHERE `managedForID`=? AND `active`='Y'");
|
||||
$query2->execute(array($insertID));
|
||||
}
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['voiceMasterActive'] = (int) $row2['amount'];
|
||||
$statsArray['voiceMasterSlotsAvailable'] = (int) $row2['maxSlotsTotal'];
|
||||
$statsArray['voiceMasterServerAvailable'] = (int) $row2['maxServerTotal'];
|
||||
}
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `webMaster` WHERE `resellerID`=?");
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['webMasterInstalled'] = (int) $query2->fetchColumn();
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`maxHDD`) AS `maxHDDTotal`,SUM(`maxVhost`) AS `maxVhostTotal` FROM `webMaster` WHERE `resellerID`=? AND `active`='Y'");
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['webMasterActive'] = (int) $row2['amount'];
|
||||
$statsArray['webMasterVhostAvailable'] = (int) $row2['maxVhostTotal'];
|
||||
$statsArray['webMasterSpaceAvailable'] = (int) $row2['maxHDDTotal'];
|
||||
}
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `mysql_external_servers` WHERE `resellerid`=?");
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['mysqlMasterInstalled'] = (int) $query2->fetchColumn();
|
||||
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`max_databases`) AS `maxDBsTotal` FROM `mysql_external_servers` WHERE `resellerid`=? AND `active`='Y'");
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['mysqlMasterActive'] = (int) $row2['amount'];
|
||||
$statsArray['mysqlMasterDBAvailable'] = (int) $row2['maxDBsTotal'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT `active`,`slots`,`stopped`,`war`,`brandname`,`queryName`,`queryPassword`,`queryNumplayers` FROM `gsswitch` AS g WHERE `userid`=?");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT `active`,`slots`,`stopped`,`war`,`brandname`,`queryName`,`queryPassword`,`queryNumplayers` FROM `gsswitch` AS g WHERE `resellerid`=?");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$statsArray['gameserverInstalled']++;
|
||||
$statsArray['gameserverSlotsInstalled'] += (int) $row2['slots'];
|
||||
|
||||
if ($row2['active'] == 'Y') {
|
||||
$statsArray['gameserverActive']++;
|
||||
$statsArray['gameserverSlotsActive'] += (int) $row2['slots'];
|
||||
$statsArray['gameserverSlotsUsed'] += (int) $row2['queryNumplayers'];
|
||||
}
|
||||
|
||||
if ($row2['queryName'] != 'OFFLINE' and $row2['stopped'] == 'N' and $row['war'] == 'Y' and $row2['queryPassword'] == 'N') {
|
||||
$statsArray['gameserverNoPassword']++;
|
||||
} else if ($row2['queryName'] == 'OFFLINE' and $row2['stopped'] != 'Y') {
|
||||
$statsArray['gameserverNotRunning']++;
|
||||
}
|
||||
|
||||
if ($row2['queryName'] != '' and $row2['stopped'] == 'N' and $row2['queryName'] != 'OFFLINE' and $row2['brandname'] == 'Y' and $row['brandname'] != '' and strpos(strtolower($row2['queryName']), strtolower($row['brandname'])) === false) {
|
||||
$statsArray['gameserverNoTag']++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `userid`=? AND `state` = 'C'");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `resellerid`=? AND `state` = 'C'");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['ticketsCompleted'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `userid`=? AND `state` NOT IN ('C','D')");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `resellerid`=? AND `state` NOT IN ('C','D')");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['ticketsInProcess'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `userid`=? AND `state` = 'N'");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `tickets` WHERE `resellerid`=? AND `state` = 'N'");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['ticketsNew'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`slots`) AS `slotsInstalled` FROM `voice_server` WHERE `userid`=? GROUP BY `userid`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`slots`) AS `slotsInstalled` FROM `voice_server` WHERE `resellerid`=? GROUP BY `resellerid`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['voiceserverInstalled'] = (int) $row2['amount'];
|
||||
$statsArray['voiceserverSlotsInstalled'] = (int) $row2['slotsInstalled'];
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`slots`) AS `slotsInstalled`,SUM(`queryNumplayers`) AS `slotsUsed`,SUM(`maxtraffic`) AS `trafficAllowed`,SUM(`filetraffic`) AS `trafficUsed` FROM `voice_server` WHERE `active`='Y' AND `userid`=? GROUP BY `userid`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`slots`) AS `slotsInstalled`,SUM(`queryNumplayers`) AS `slotsUsed`,SUM(`maxtraffic`) AS `trafficAllowed`,SUM(`filetraffic`) AS `trafficUsed` FROM `voice_server` WHERE `active`='Y' AND `resellerid`=? GROUP BY `resellerid`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['voiceserverActive'] = (int) $row2['amount'];
|
||||
$statsArray['voiceserverSlotsActive'] = (int) $row2['slotsInstalled'];
|
||||
$statsArray['voiceserverSlotsUsed'] = (int) $row2['slotsUsed'];
|
||||
$statsArray['voiceserverTrafficAllowed'] = (int) $row2['trafficAllowed'];
|
||||
$statsArray['voiceserverTrafficUsed'] = round((int) $row2['trafficUsed'] / 1024);
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `voice_server` WHERE `active`='Y' AND `uptime`='0' AND `userid`=? GROUP BY `userid`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `voice_server` WHERE `active`='Y' AND `uptime`='0' AND `resellerid`=? GROUP BY `resellerid`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['voiceserverCrashed'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`hdd`) AS `spaceInstalled` FROM `webVhost` WHERE `userID`=? GROUP BY `userID`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`hdd`) AS `spaceInstalled` FROM `webVhost` WHERE `resellerID`=? GROUP BY `resellerID`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['webspaceInstalled'] = (int) $row2['amount'];
|
||||
$statsArray['webspaceSpaceGivenActive'] = (int) $row2['spaceInstalled'];
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`hdd`) AS `spaceInstalled`,SUM(`hddUsage`) AS `spaceUsed` FROM `webVhost` WHERE `active`='Y' AND `userID`=? GROUP BY `userID`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`hdd`) AS `spaceInstalled`,SUM(`hddUsage`) AS `spaceUsed` FROM `webVhost` WHERE `active`='Y' AND `resellerID`=? GROUP BY `resellerID`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['webspaceActive'] = (int) $row2['amount'];
|
||||
$statsArray['webspaceSpaceGiven'] = (int) $row2['spaceInstalled'];
|
||||
$statsArray['webspaceSpaceUsed'] = (int) $row2['spaceUsed'];
|
||||
}
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `mysql_external_dbs` WHERE `uid`=? GROUP BY `uid`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `mysql_external_dbs` WHERE `resellerid`=? GROUP BY `resellerid`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
$statsArray['mysqlDBInstalled'] = (int) $query2->fetchColumn();
|
||||
|
||||
if ($row['accounttype'] == 'u') {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`dbSize`) AS `spaceUsed` FROM `mysql_external_dbs` WHERE `active`='Y' AND `uid`=? GROUP BY `uid`");
|
||||
} else {
|
||||
$query2 = $sql->prepare("SELECT COUNT(1) AS `amount`,SUM(`dbSize`) AS `spaceUsed` FROM `mysql_external_dbs` WHERE `active`='Y' AND `resellerid`=? GROUP BY `resellerid`");
|
||||
}
|
||||
$query2->execute(array($insertID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$statsArray['mysqlDBActive'] = (int) $row2['amount'];
|
||||
$statsArray['mysqlDBSpaceUsed'] = (int) $row2['spaceUsed'];
|
||||
}
|
||||
|
||||
unset($updateString, $insertString, $duplicateString);
|
||||
|
||||
foreach ($statsArray as $k => $v) {
|
||||
|
||||
if (isset($updateString)) {
|
||||
$updateString .= ',`' . $k . '`=' . $v;
|
||||
$insertColumns .= ',`' . $k . '`';
|
||||
$duplicateString .= ',`' . $k . '`=(`' . $k . '`*(`countUpdates`/(`countUpdates`+1))+(VALUES(`' . $k . '`)*(1/(`countUpdates`+1))))';
|
||||
} else {
|
||||
$updateString = '`' . $k . '`=' . $v;
|
||||
$insertColumns = '`' . $k . '`';
|
||||
$duplicateString = '`' . $k . '`=(`' . $k . '`*(`countUpdates`/(`countUpdates`+1))+(VALUES(`' . $k . '`)*(1/(`countUpdates`+1))))';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($updateString)) {
|
||||
$query2 = $sql->prepare("UPDATE `easywi_statistics_current` SET " . $updateString . " WHERE `userID`= " . $insertID . " LIMIT 1");
|
||||
$query2->execute();
|
||||
|
||||
$query2 = $sql->prepare("INSERT INTO `easywi_statistics` (" . $insertColumns . ",`userID`,`statDate`,`countUpdates`) VALUES (" . implode(',', $statsArray) . "," . $insertID . ",'" . date('Y-m-d H:00:00') . "',1) ON DUPLICATE KEY UPDATE " . $duplicateString . ",`countUpdates`=`countUpdates`+1");
|
||||
$query2->execute();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$query = $sql->prepare("UPDATE `settings` SET `lastCronStatus`=UNIX_TIMESTAMP()");
|
||||
$query->execute();
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
header('Location: login.php');
|
||||
die('Statuscheck can only be run via console or a cronjob');
|
||||
|
@ -42,105 +42,103 @@ if ((!isset($admin_id) or $main != 1) or (isset($admin_id) and !isanyadmin($admi
|
||||
}
|
||||
|
||||
$sprache_bad = getlanguagefile('home', $user_language, $reseller_id);
|
||||
$resellerid = ($reseller_id != 0 and $admin_id != $reseller_id) ? $admin_id : $reseller_id;
|
||||
$reseller_brandname = $rSA['brandname'];
|
||||
$counttickets_open = 0;
|
||||
$counttickets_unanswered = 0;
|
||||
$crashedArray = array('gsCrashed' => 0,'gsPWD' => 0,'gsTag' => 0,'ticketsOpen' => 0,'tickets' => 0,'ticketsResellerOpen' => 0,'ticketsReseller' => 0,'masterserver' => 0,'ts3Master' => 0,'ts3' => 0,'virtualHosts' => 0);
|
||||
$removed = array();
|
||||
$tag_removed = array();
|
||||
$crashed = array();
|
||||
|
||||
$query = $sql->prepare("SELECT `stopped`,`serverid`,CONCAT(`serverip`,':',`port`) AS `server`,`userid`,`war`,`brandname`,`queryName`,`queryPassword` FROM `gsswitch` WHERE `active`='Y' AND `resellerid`=?");
|
||||
$query->execute(array($resellerid));
|
||||
$statsArray = array(
|
||||
'gameMasterInstalled' => 0,
|
||||
'gameMasterActive' => 0,
|
||||
'gameMasterSlotsAvailable' => 0,
|
||||
'gameMasterCrashed' => 0,
|
||||
'gameserverInstalled' => 0,
|
||||
'gameserverActive' => 0,
|
||||
'gameserverSlotsInstalled' => 0,
|
||||
'gameserverSlotsActive' => 0,
|
||||
'gameserverSlotsUsed' => 0,
|
||||
'gameserverNoPassword' => 0,
|
||||
'gameserverNoTag' => 0,
|
||||
'gameserverNotRunning' => 0,
|
||||
'mysqlMasterInstalled' => 0,
|
||||
'mysqlMasterActive' => 0,
|
||||
'mysqlMasterDBAvailable' => 0,
|
||||
'mysqlMasterCrashed' => 0,
|
||||
'mysqlDBInstalled' => 0,
|
||||
'mysqlDBActive' => 0,
|
||||
'mysqlDBSpaceUsed' => 0,
|
||||
'ticketsCompleted' => 0,
|
||||
'ticketsInProcess' => 0,
|
||||
'ticketsNew' => 0,
|
||||
'userAmount' => 0,
|
||||
'userAmountActive' => 0,
|
||||
'virtualMasterInstalled' => 0,
|
||||
'virtualMasterActive' => 0,
|
||||
'virtualMasterVserverAvailable' => 0,
|
||||
'virtualInstalled' => 0,
|
||||
'virtualActive' => 0,
|
||||
'voiceMasterInstalled' => 0,
|
||||
'voiceMasterActive' => 0,
|
||||
'voiceMasterSlotsAvailable' => 0,
|
||||
'voiceMasterCrashed' => 0,
|
||||
'voiceserverInstalled' => 0,
|
||||
'voiceserverActive' => 0,
|
||||
'voiceserverSlotsInstalled' => 0,
|
||||
'voiceserverSlotsActive' => 0,
|
||||
'voiceserverSlotsUsed' => 0,
|
||||
'voiceserverTrafficAllowed' => 0,
|
||||
'voiceserverTrafficUsed' => 0,
|
||||
'voiceserverCrashed' => 0,
|
||||
'webMasterInstalled' => 0,
|
||||
'webMasterActive' => 0,
|
||||
'webMasterSpaceAvailable' => 0,
|
||||
'webMasterVhostAvailable' => 0,
|
||||
'webspaceInstalled' => 0,
|
||||
'webspaceActive' => 0,
|
||||
'webspaceSpaceGiven' => 0,
|
||||
'webspaceSpaceGivenActive' => 0,
|
||||
'webspaceSpaceUsed' => 0
|
||||
);
|
||||
|
||||
$query = $sql->prepare("SELECT * FROM `easywi_statistics_current` WHERE `userID`=? LIMIT 1");
|
||||
$query->execute(array($resellerLockupID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$war = $row['war'];
|
||||
$brandname = $row['brandname'];
|
||||
$password = $row['queryPassword'];
|
||||
$name = $row['queryName'];
|
||||
|
||||
if ($name != "OFFLINE" and $row['stopped'] == 'N' and $war == "Y" and $password == "N") {
|
||||
$removed[] = array('userid' => $row['userid'], 'username' => getusername($row['userid']),'address' => $row['server']);
|
||||
$crashedArray['gsPWD']++;
|
||||
|
||||
} else if ($name == "OFFLINE" and $row['stopped'] == 'N') {
|
||||
$crashed[] = array('userid' => $row['userid'], 'username' => getusername($row['userid']),'address' => $row['server']);
|
||||
$crashedArray['gsCrashed']++;
|
||||
}
|
||||
|
||||
if (isset($name) and $name != '' and $name != "OFFLINE" and $row['stopped'] == 'N' and isset($reseller_brandname) and $reseller_brandname != '' and $brandname == "Y" and strpos(strtolower($name), strtolower($reseller_brandname)) === false) {
|
||||
$tag_removed[] = array('userid' => $row['userid'], 'username' => getusername($row['userid']),'address' => $row['server']);
|
||||
$crashedArray['gsTag']++;
|
||||
}
|
||||
$statsArray = $row;
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT `id`,`userid` FROM `tickets` WHERE `state` NOT IN ('C','D') AND `resellerid`=?");
|
||||
$query2 = $sql->prepare("SELECT `userID` FROM `tickets_text` WHERE `ticketID`=? ORDER BY `writeDate` DESC LIMIT 1");
|
||||
$query->execute(array($resellerid));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$counttickets_open++;
|
||||
$crashedArray['ticketsOpen']++;
|
||||
$query2->execute(array($row['id']));
|
||||
if ($ui->smallletters('w', 2, 'get') == 'da' or (!$ui->smallletters('w', 2, 'get') and !$ui->smallletters('d', 2, 'get'))) {
|
||||
|
||||
if ($row['userid'] == $query2->fetchColumn()) {
|
||||
$counttickets_unanswered++;
|
||||
$crashedArray['tickets']++;
|
||||
}
|
||||
}
|
||||
$statsArray['ticketsPercent'] = (($statsArray['ticketsCompleted'] + $statsArray['ticketsInProcess'] + $statsArray['ticketsNew']) > 0) ? round( ($statsArray['ticketsInProcess'] + $statsArray['ticketsNew']) / ( ($statsArray['ticketsCompleted'] + $statsArray['ticketsInProcess'] + $statsArray['ticketsNew']) / 100), 2) : 0;
|
||||
$statsArray['ticketsNewPercent'] = (($statsArray['ticketsInProcess'] + $statsArray['ticketsNew']) > 0) ? round($statsArray['ticketsNew'] / ( ($statsArray['ticketsInProcess'] + $statsArray['ticketsNew']) / 100), 2) : 0;
|
||||
|
||||
if ($reseller_id != 0) {
|
||||
$statsArray['gameMasterActivePercent'] = ($statsArray['gameMasterInstalled'] > 0) ? round($statsArray['gameMasterActive'] / ($statsArray['gameMasterInstalled'] / 100), 2) : 0;
|
||||
$statsArray['gameMasterCrashedPercent'] = ($statsArray['gameMasterActive'] > 0) ? round($statsArray['gameMasterCrashed'] / ($statsArray['gameMasterActive'] / 100), 2) : 0;
|
||||
$statsArray['gameMasterServerPercent'] = ($statsArray['gameMasterServerAvailable'] > 0) ? round($statsArray['gameserverActive'] / ($statsArray['gameMasterServerAvailable'] / 100), 2) : 0;
|
||||
$statsArray['gameMasterSlotsPercent'] = ($statsArray['gameMasterSlotsAvailable'] > 0) ? round($statsArray['gameserverSlotsInstalled'] / ($statsArray['gameMasterSlotsAvailable'] / 100), 2) : 0;
|
||||
|
||||
$counttickets_open = 0;
|
||||
$counttickets_unanswered = 0;
|
||||
$statsArray['gameserverActivePercent'] = ($statsArray['gameserverInstalled'] > 0) ? round($statsArray['gameserverActive'] / ($statsArray['gameserverInstalled'] / 100), 2) : 0;
|
||||
$statsArray['gameserverSlotsUsedPercent'] = ($statsArray['gameserverSlotsActive'] > 0) ? round($statsArray['gameserverSlotsUsed'] / ($statsArray['gameserverSlotsActive'] / 100), 2) : 0;
|
||||
$statsArray['gameserverCrashedPercent'] = ($statsArray['gameserverSlotsActive'] > 0) ? round($statsArray['gameserverNotRunning'] / ($statsArray['gameserverSlotsActive'] / 100), 2) : 0;
|
||||
$statsArray['gameserverTagPercent'] = ($statsArray['gameserverSlotsActive'] > 0) ? round($statsArray['gameserverNoTag'] / ($statsArray['gameserverSlotsActive'] / 100), 2) : 0;
|
||||
$statsArray['gameserverPasswordPercent'] = ($statsArray['gameserverSlotsActive'] > 0) ? round($statsArray['gameserverNoPassword'] / ($statsArray['gameserverSlotsActive'] / 100), 2) : 0;
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `tickets` WHERE `userid`=? AND `state` != 'C' AND `resellerid`=?");
|
||||
$query2 = $sql->prepare("SELECT `userID` FROM `tickets_text` WHERE `ticketID`=? ORDER BY `writeDate` DESC LIMIT 1");
|
||||
$statsArray['voiceMasterActivePercent'] = ($statsArray['voiceMasterInstalled'] > 0) ? round($statsArray['voiceMasterActive'] / ($statsArray['voiceMasterInstalled'] / 100), 2) : 0;
|
||||
$statsArray['voiceMasterCrashedPercent'] = ($statsArray['voiceMasterActive'] > 0) ? round($statsArray['voiceMasterCrashed'] / ($statsArray['voiceMasterActive'] / 100), 2) : 0;
|
||||
$statsArray['voiceMasterServerPercent'] = ($statsArray['voiceMasterServerAvailable'] > 0) ? round($statsArray['voiceserverActive'] / ($statsArray['voiceMasterServerAvailable'] / 100), 2) : 0;
|
||||
$statsArray['voiceMasterSlotsPercent'] = ($statsArray['voiceMasterSlotsAvailable'] > 0) ? round($statsArray['voiceserverSlotsInstalled'] / ($statsArray['voiceMasterSlotsAvailable'] / 100), 2) : 0;
|
||||
|
||||
$query->execute(array($admin_id,$reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$crashedArray['ticketsReseller']++;
|
||||
$query2->execute(array($row['id']));
|
||||
$statsArray['voiceserverActivePercent'] = ($statsArray['voiceserverInstalled'] > 0) ? round($statsArray['voiceserverActive'] / ($statsArray['voiceserverInstalled'] / 100), 2) : 0;
|
||||
$statsArray['voiceserverSlotsUsedPercent'] = ($statsArray['voiceserverSlotsActive'] > 0) ? round($statsArray['voiceserverSlotsUsed'] / ($statsArray['voiceserverSlotsActive'] / 100), 2) : 0;
|
||||
$statsArray['voiceserverCrashedPercent'] = ($statsArray['voiceserverSlotsActive'] > 0) ? round($statsArray['voiceserverCrashed'] / ($statsArray['voiceserverSlotsActive'] / 100), 2) : 0;
|
||||
$statsArray['voiceserverTrafficPercent'] = ($statsArray['voiceserverTrafficAllowed'] > 0) ? round($statsArray['voiceserverTrafficUsed'] / ($statsArray['voiceserverTrafficAllowed'] / 100), 2) : 0;
|
||||
|
||||
if ($admin_id == $query2->fetchColumn()) {
|
||||
$crashedArray['ticketsResellerOpen']++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$statsArray['webMasterActivePercent'] = ($statsArray['webMasterInstalled'] > 0) ? round($statsArray['webMasterActive'] / ($statsArray['webMasterInstalled'] / 100), 2) : 0;
|
||||
$statsArray['webMasterVhostPercent'] = ($statsArray['webMasterVhostAvailable'] > 0) ? round($statsArray['webspaceInstalled'] / ($statsArray['webMasterVhostAvailable'] / 100), 2) : 0;
|
||||
$statsArray['webMasterSpaceUsedPercent'] = ($statsArray['webMasterSpaceAvailable'] > 0) ? round($statsArray['webspaceSpaceGiven'] / ($statsArray['webMasterSpaceAvailable'] / 100), 2) : 0;
|
||||
|
||||
$crached_ts3_virtual = 0;
|
||||
$crashed_ts3 = array();
|
||||
$statsArray['webspaceActivePercent'] = ($statsArray['webspaceInstalled'] > 0) ? round($statsArray['webspaceActive'] / ($statsArray['webspaceInstalled'] / 100), 2) : 0;
|
||||
$statsArray['webspaceSpaceUsedPercent'] = ($statsArray['webspaceSpaceGiven'] > 0) ? round($statsArray['webspaceSpaceUsed'] / ($statsArray['webspaceSpaceGiven'] / 100), 2) : 0;
|
||||
|
||||
$query = $sql->prepare("SELECT CONCAT(`ip`,':',`port`) AS `address` FROM `voice_server` WHERE `active`='Y' AND `uptime`='0' AND `resellerid`=?");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$crashed_ts3[] = array('address' => $row['address']);
|
||||
$crached_ts3_virtual++;
|
||||
}
|
||||
$crashedArray['ts3'] = $crached_ts3_virtual;
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `voice_masterserver` WHERE `active`='Y' AND `notified`>=? AND `resellerid`=?");
|
||||
$query->execute(array($downChecks,$resellerid));
|
||||
$crached_ts3_master = $query->rowCount();
|
||||
$crashedArray['ts3Master'] = $crached_ts3_master;
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `rserverdata` WHERE `active`='Y' AND `notified`>=? AND `resellerid`=?");
|
||||
$query->execute(array($downChecks,$resellerid));
|
||||
$crached_master = $query->rowCount();
|
||||
$crashedArray['masterserver'] = $crached_master;
|
||||
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id` FROM `virtualhosts` WHERE `active`='Y' AND `notified`>=?");
|
||||
$query->execute(array($downChecks));
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT `id` FROM `virtualhosts` WHERE `active`='Y' AND `notified`>=? AND `resellerid`=?");
|
||||
$query->execute(array($downChecks,$resellerid));
|
||||
}
|
||||
$crached_hosts = $query->rowCount();
|
||||
$crashedArray['virtualHosts'] = $crached_hosts;
|
||||
$feedArray = array();
|
||||
|
||||
if ($ui->smallletters('w',2, 'get') == 'da' or (!$ui->smallletters('w',2, 'get') and !$ui->smallletters('d',2, 'get'))) {
|
||||
$statsArray['mysqlMasterActivePercent'] = ($statsArray['mysqlMasterInstalled'] > 0) ? round($statsArray['mysqlMasterActive'] / ($statsArray['mysqlMasterInstalled'] / 100), 2) : 0;
|
||||
$statsArray['mysqlMasterDBPercent'] = ($statsArray['mysqlMasterDBAvailable'] > 0) ? round($statsArray['mysqlDBInstalled'] / ($statsArray['mysqlMasterDBAvailable'] / 100), 2) : 0;
|
||||
|
||||
$statsArray['mysqlActivePercent'] = ($statsArray['mysqlDBInstalled'] > 0) ? round($statsArray['mysqlDBActive'] / ($statsArray['mysqlDBInstalled'] / 100), 2) : 0;
|
||||
|
||||
if ($reseller_id == 0 and $admin_id == $reseller_id) {
|
||||
$query = $sql->prepare("SELECT * FROM `feeds_settings` WHERE `resellerID`=0 AND `active`='Y' LIMIT 1");
|
||||
|
@ -532,7 +532,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$orderby = 't.`userPriority` DESC, t.`writedate` ASC';
|
||||
}
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `tickets` t $where");
|
||||
$query->execute(array($resellerid));
|
||||
$query->execute(array($resellerLockupID));
|
||||
$colcount = $query->fetchColumn();
|
||||
if ($start>$colcount) {
|
||||
while ($start>0 and $start>$colcount) $start = $start - $amount;
|
||||
@ -564,7 +564,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pages = implode(', ',$pages);
|
||||
$query = $sql->prepare("SELECT t.*,l.`text`,d.`text` AS `defaultsubject`,u.`cname`,CONCAT(u.`name`,' ',u.`vname`) AS `username`,s.`cname` AS `supporter`,CONCAT(s.`name`,' ',s.`vname`) AS `supportername` FROM `tickets` t LEFT JOIN `ticket_topics` o ON t.`topic`=o.`id` LEFT JOIN `translations` l ON o.`id`=l.`transID` AND l.`type`='ti' AND l.`lang`=? LEFT JOIN `translations` d ON t.`id`=d.`transID` AND d.`type`='ti' AND d.`lang`=? LEFT JOIN `userdata` s ON t.`supporter`=s.`id` LEFT JOIN `userdata` u ON t.`userid`=u.`id` $where ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query->execute(array($user_language,$default_language,$resellerid));
|
||||
$query->execute(array($user_language,$default_language,$resellerLockupID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if ($row['priority']==1) $priority = $sprache->priority_low;
|
||||
else if ($row['priority']==2) $priority = $sprache->priority_medium;
|
||||
|
@ -177,7 +177,6 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query->execute(array($active,$salutation,$birthday,$country,$fax,$bogus,$security,$name,$vname,$mail,$phone,$handy,$city,$cityn,$street,$streetn,$fdlpath,$accounttype,$mail_backup,$mail_gsupdate,$mail_securitybreach,$mail_serverdown,$mail_ticket,$mail_vserver));
|
||||
|
||||
$id = $sql->lastInsertId();
|
||||
|
||||
$query = ($accounttype == 'r' and $reseller_id == 0) ? $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=0 LIMIT 1") : $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2 = $sql->prepare("INSERT INTO `userdata_groups` (`userID`,`groupID`,`resellerID`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `groupID`=VALUES(`groupID`)");
|
||||
foreach ($usergroup as $gid) {
|
||||
@ -199,6 +198,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
|
||||
customColumns('U',$id,'save');
|
||||
|
||||
$query = $sql->prepare("INSERT INTO `easywi_statistics_current` (`userID`) VALUES (?) ON DUPLICATE KEY UPDATE `userID`=VALUES(`userID`)");
|
||||
$query->execute(array(($accounttype == 'a') ? 0 : $id));
|
||||
|
||||
$cnamenew = $ui->username('cname',255, 'post');
|
||||
|
||||
if ($prefix1== 'Y' and $accounttype != 'a') {
|
||||
|
@ -183,4 +183,6 @@ $sql->exec("DELETE v.* FROM `voice_dns` v LEFT JOIN `userdata` u ON v.`userID`=u
|
||||
$sql->exec("DELETE v.* FROM `voice_server` v LEFT JOIN `userdata` u ON v.`userid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$sql->exec("DELETE v.* FROM `voice_server_backup` v LEFT JOIN `userdata` u ON v.`uid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$sql->exec("DELETE v.* FROM `webVhost` v LEFT JOIN `userdata` u ON v.`userID`=u.`id` WHERE u.`id` IS NULL");
|
||||
$sql->exec("DELETE v.* FROM `webVhost` v LEFT JOIN `webMaster` m ON v.`webMasterID`=m.`webMasterID` WHERE m.`webMasterID` IS NULL");
|
||||
$sql->exec("DELETE v.* FROM `webVhost` v LEFT JOIN `webMaster` m ON v.`webMasterID`=m.`webMasterID` WHERE m.`webMasterID` IS NULL");
|
||||
$sql->exec("DELETE s.* FROM `easywi_statistics_current` s LEFT JOIN `userdata` u ON s.`userID`=u.`id` WHERE s.`userID`!=0 AND u.`id` IS NULL");
|
||||
$sql->exec("DELETE s.* FROM `easywi_statistics` s LEFT JOIN `userdata` u ON s.`userID`=u.`id` WHERE s.`userID`!=0 AND u.`id` IS NULL");
|
@ -197,7 +197,7 @@ $add = $sql->prepare($query);
|
||||
$add->execute();
|
||||
|
||||
$query = "CREATE TABLE IF NOT EXISTS `easywi_version` (
|
||||
`id` smallint(1) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`version` decimal(4,2) NOT NULL DEFAULT '3.30',
|
||||
`de` text COLLATE utf8_unicode_ci,
|
||||
`en` text COLLATE utf8_unicode_ci,
|
||||
@ -206,6 +206,127 @@ $query = "CREATE TABLE IF NOT EXISTS `easywi_version` (
|
||||
$add = $sql->prepare($query);
|
||||
$add->execute();
|
||||
|
||||
$query = "CREATE TABLE IF NOT EXISTS `easywi_statistics` (
|
||||
`gameMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoPassword` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoTag` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNotRunning` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterDBAvailable` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`ticketsCompleted` int(10) unsigned DEFAULT 0,
|
||||
`ticketsInProcess` int(10) unsigned DEFAULT 0,
|
||||
`ticketsNew` int(10) unsigned DEFAULT 0,
|
||||
`userAmount` int(10) unsigned DEFAULT 0,
|
||||
`userAmountActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterVserverAvailable` int(10) unsigned DEFAULT 0,
|
||||
`virtualInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficAllowed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverCrashed` int(10) unsigned DEFAULT 0,
|
||||
`webMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`webMasterSpaceAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webMasterVhostAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webspaceInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webspaceActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGiven` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGivenActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`userID` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`statDate` timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
`countUpdates` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`userID`,`statDate`)
|
||||
) ENGINE=InnoDB";
|
||||
$add = $sql->prepare($query);
|
||||
$add->execute();
|
||||
|
||||
$query = "CREATE TABLE IF NOT EXISTS `easywi_statistics_current` (
|
||||
`gameMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`gameMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`gameserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoPassword` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNoTag` int(10) unsigned DEFAULT 0,
|
||||
`gameserverNotRunning` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterDBAvailable` int(10) unsigned DEFAULT 0,
|
||||
`mysqlMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBInstalled` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBActive` int(10) unsigned DEFAULT 0,
|
||||
`mysqlDBSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`ticketsCompleted` int(10) unsigned DEFAULT 0,
|
||||
`ticketsInProcess` int(10) unsigned DEFAULT 0,
|
||||
`ticketsNew` int(10) unsigned DEFAULT 0,
|
||||
`userAmount` int(10) unsigned DEFAULT 0,
|
||||
`userAmountActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`virtualMasterVserverAvailable` int(10) unsigned DEFAULT 0,
|
||||
`virtualInstalled` int(10) unsigned DEFAULT 0,
|
||||
`virtualActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterServerAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterSlotsAvailable` int(10) unsigned DEFAULT 0,
|
||||
`voiceMasterCrashed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsInstalled` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsActive` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverSlotsUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficAllowed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverTrafficUsed` int(10) unsigned DEFAULT 0,
|
||||
`voiceserverCrashed` int(10) unsigned DEFAULT 0,
|
||||
`webMasterInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webMasterActive` int(10) unsigned DEFAULT 0,
|
||||
`webMasterSpaceAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webMasterVhostAvailable` int(10) unsigned DEFAULT 0,
|
||||
`webspaceInstalled` int(10) unsigned DEFAULT 0,
|
||||
`webspaceActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGiven` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceGivenActive` int(10) unsigned DEFAULT 0,
|
||||
`webspaceSpaceUsed` int(10) unsigned DEFAULT 0,
|
||||
`userID` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`statDate` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`userID`)
|
||||
) ENGINE=InnoDB";
|
||||
$add = $sql->prepare($query);
|
||||
$add->execute();
|
||||
|
||||
$query = "CREATE TABLE IF NOT EXISTS `webMaster` (
|
||||
`webMasterID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`active` enum('Y','N') DEFAULT 'Y',
|
||||
|
@ -245,6 +245,121 @@ $defined['eac'] = array(
|
||||
'resellerid' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"MUL","Default"=>"0","Extra"=>"")
|
||||
);
|
||||
|
||||
$defined['easywi_statistics'] = array(
|
||||
'gameMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterServerAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterSlotsAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNoPassword' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNoTag' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNotRunning' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterDBAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBSpaceUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsCompleted' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsInProcess' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsNew' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userAmount' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userAmountActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterVserverAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterServerAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterSlotsAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverTrafficAllowed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverTrafficUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterSpaceAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterVhostAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceGiven' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceGivenActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userID' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"0","Extra"=>""),
|
||||
'statDate' => array("Type"=>"timestamp","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>""),
|
||||
'countUpdates' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"","Default"=>"0","Extra"=>"")
|
||||
);
|
||||
|
||||
$defined['easywi_statistics_current'] = array(
|
||||
'gameMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterServerAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterSlotsAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverSlotsUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNoPassword' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNoTag' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'gameserverNotRunning' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterDBAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'mysqlDBSpaceUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsCompleted' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsInProcess' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'ticketsNew' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userAmount' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userAmountActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualMasterVserverAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'virtualActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterServerAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterSlotsAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceMasterCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverSlotsUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverTrafficAllowed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverTrafficUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'voiceserverCrashed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterSpaceAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webMasterVhostAvailable' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceInstalled' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceGiven' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceGivenActive' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'webspaceSpaceUsed' => array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"","Default"=>"0","Extra"=>""),
|
||||
'userID' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"0","Extra"=>""),
|
||||
'statDate' => array("Type"=>"timestamp","Null"=>"NO","Key"=>"","Default"=>"CURRENT_TIMESTAMP","Extra"=>"on update CURRENT_TIMESTAMP")
|
||||
);
|
||||
|
||||
$defined['easywi_version'] = array(
|
||||
'id' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>"auto_increment"),
|
||||
'version' => array("Type"=>"decimal(4,2)","Null"=>"NO","Key"=>"","Default"=>"3.30","Extra"=>""),
|
||||
|
@ -43,18 +43,16 @@
|
||||
</p>
|
||||
|
||||
<div class="navbar-text pull-left">
|
||||
<?php if($pa['usertickets'] and $crashedArray['ticketsReseller']>0 and $reseller_id!=0) { ?><a href="admin.php?w=tr"><span class="badge badge-info"><?php echo $crashedArray['ticketsReseller'].'/'.$crashedArray['ticketsResellerOpen'].' '.$sprache_bad->tickets; ?></span></a><?php }?>
|
||||
<?php if($pa['tickets'] and $crashedArray['ticketsOpen']>0) { ?><a href="admin.php?w=ti"><span class="badge badge-info"><?php echo $crashedArray['tickets'].'/'.$crashedArray['ticketsOpen'].' '.$sprache_bad->tickets; ?></span></a><?php }?>
|
||||
<?php if(($pa['tickets'] or $pa['usertickets']) and $statsArray['ticketsInProcess']>0) { ?><a href="admin.php?w=ti"><span class="badge badge-info"><?php echo $statsArray['ticketsNew'].'/'.$statsArray['ticketsInProcess'].' '.$sprache_bad->tickets; ?></span></a><?php }?>
|
||||
<?php if($pa['gserver'] and $gserver_module) { ?>
|
||||
<?php if($crashedArray['gsCrashed']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $crashedArray['gsCrashed'].' '.$sprache_bad->gserver_crashed; ?></span></a><?php }?>
|
||||
<?php if($crashedArray['gsPWD']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $crashedArray['gsPWD'].' '.$sprache_bad->gserver_removed; ?></span></a><?php }?>
|
||||
<?php if($crashedArray['gsTag']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $crashedArray['gsTag'].' '.$sprache_bad->gserver_tag_removed; ?></span></a><?php }?>
|
||||
<?php if($statsArray['gameserverNotRunning']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $statsArray['gameserverNotRunning'].' '.$sprache_bad->gserver_crashed; ?></span></a><?php }?>
|
||||
<?php if($statsArray['gameserverNoPassword']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $statsArray['gameserverNoPassword'].' '.$sprache_bad->gserver_removed; ?></span></a><?php }?>
|
||||
<?php if($statsArray['gameserverNoTag']>0) { ?><a href="admin.php?w=gs&d=md"><span class="badge badge-important"><?php echo $statsArray['gameserverNoTag'].' '.$sprache_bad->gserver_tag_removed; ?></span></a><?php }?>
|
||||
<?php }?>
|
||||
<?php if($pa['voiceserver'] and $crashedArray['ts3']>0 and $voserver_module) { ?><a href="admin.php?w=vo&d=md"><span class="badge badge-important"><?php echo $crashedArray['ts3'].' '.$sprache_bad->voice_crashed; ?></span></a><?php }?>
|
||||
<?php if($pa['voicemasterserver'] and $crashedArray['ts3Master']>0 and $voserver_module) { ?><a href="admin.php?w=vo&d=md"><span class="badge badge-important"><?php echo $crashedArray['ts3Master'].' '.$sprache_bad->ts3master_crashed; ?></span></a><?php }?>
|
||||
<?php if($pa['roots'] and $crashedArray['masterserver']>0 and $gserver_module) { ?><a href="admin.php?w=ro"><span class="badge badge-important"><?php echo $crashedArray['masterserver'].' '.$sprache_bad->master_crashed; ?></span></a><?php }?>
|
||||
<?php if($pa['vserverhost'] and $crashedArray['virtualHosts']>0 and $vserver_module and $reseller_id==0) { ?><a href="admin.php?w=vh"><span class="badge badge-important"><?php echo $crashedArray['virtualHosts'].' '.$sprache_bad->host_crashed; ?></span></a><?php }?>
|
||||
</div>
|
||||
<?php if($pa['voiceserver'] and $statsArray['voiceserverCrashed']>0 and $voserver_module) { ?><a href="admin.php?w=vo&d=md"><span class="badge badge-important"><?php echo $statsArray['voiceserverCrashed'].' '.$sprache_bad->voice_crashed; ?></span></a><?php }?>
|
||||
<?php if($pa['voicemasterserver'] and $statsArray['voiceMasterCrashed']>0 and $voserver_module) { ?><a href="admin.php?w=vo&d=md"><span class="badge badge-important"><?php echo $statsArray['voiceMasterCrashed'].' '.$sprache_bad->ts3master_crashed; ?></span></a><?php }?>
|
||||
<?php if($pa['roots'] and $statsArray['gameMasterCrashed']>0 and $gserver_module) { ?><a href="admin.php?w=ro"><span class="badge badge-important"><?php echo $statsArray['gameMasterCrashed'].' '.$sprache_bad->master_crashed; ?></span></a><?php }?>
|
||||
</div>
|
||||
|
||||
<span class="navbar-text">Easy-WI.com</span>
|
||||
|
||||
|
@ -6,92 +6,193 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($pa['usertickets'] and $crashedArray['ticketsReseller']>0 and $reseller_id!=0) { ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $sprache_bad->tickets; ?></h4>
|
||||
<a href="admin.php?w=tr"><?php echo $crashedArray['ticketsReseller']."/".$crashedArray['ticketsResellerOpen'].' '.$sprache_bad->tickets_open; ?></a>
|
||||
<?php if($easywiModules['gs'] and $pa['roots'] and $gserver_module) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=ro&d=md"><?php echo $statsArray['gameMasterInstalled'].' '.$gsprache->gameroot;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['gameMasterActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['gameMasterActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['gameMasterActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_crashed;?></strong><span class="pull-right"><?php echo $statsArray['gameMasterCrashedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['gameMasterCrashedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameMasterCrashedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_server;?></strong><span class="pull-right"><?php echo $statsArray['gameMasterServerPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['gameMasterServerPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameMasterServerPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_slots;?></strong><span class="pull-right"><?php echo $statsArray['gameMasterSlotsPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['gameMasterSlotsPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameMasterSlotsPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($easywiModules['gs'] and $pa['gserver'] and $gserver_module){ ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=gs&d=md"><?php echo $statsArray['gameserverInstalled'].' '.$gsprache->gameserver;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['gameserverActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['gameserverActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['gameserverActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->gserver_crashed;?></strong><span class="pull-right"><?php echo $statsArray['gameserverCrashedPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['gameserverCrashedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameserverCrashedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->usage_slots;?></strong><span class="pull-right"><?php echo $statsArray['gameserverSlotsUsedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['gameserverSlotsUsedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameserverSlotsUsedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->gserver_tag_removed;?></strong><span class="pull-right"><?php echo $statsArray['gameserverTagPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['gameserverTagPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameserverTagPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->gserver_removed;?></strong><span class="pull-right"><?php echo $statsArray['gameserverPasswordPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['gameserverPasswordPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['gameserverPasswordPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($pa['voicemasterserver'] and $voserver_module) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=vm"><?php echo $statsArray['voiceserverInstalled'].' '.$gsprache->voiceserver.' '.$gsprache->master;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['voiceMasterActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['voiceMasterActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['voiceMasterActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->ts3master_crashed?></strong><span class="pull-right"><?php echo $statsArray['voiceMasterCrashedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['voiceMasterCrashedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceMasterCrashedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_server;?></strong><span class="pull-right"><?php echo $statsArray['voiceMasterServerPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['voiceMasterServerPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceMasterServerPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_slots;?></strong><span class="pull-right"><?php echo $statsArray['voiceMasterSlotsPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['voiceMasterSlotsPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceMasterSlotsPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($pa['voiceserver'] and $voserver_module) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=vo"><?php echo $statsArray['voiceserverInstalled'].' '.$gsprache->voiceserver;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['voiceserverActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['voiceserverActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['voiceserverActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->voice_crashed;?></strong><span class="pull-right"><?php echo $statsArray['voiceserverCrashedPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['voiceserverCrashedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceserverCrashedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->usage_slots;?></strong><span class="pull-right"><?php echo $statsArray['voiceserverSlotsUsedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['voiceserverSlotsUsedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceserverSlotsUsedPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->usage_traffic;?></strong><span class="pull-right"><?php echo $statsArray['voiceserverTrafficPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['voiceserverTrafficPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['voiceserverTrafficPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($pa['tickets'] and $crashedArray['ticketsOpen']>0){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $sprache_bad->tickets; ?></h4>
|
||||
<a href="admin.php?w=ti"><?php echo $crashedArray['tickets']."/".$crashedArray['ticketsOpen'].' '.$sprache_bad->tickets_open; ?></a>
|
||||
<?php if($easywiModules['ws'] and $pa['webmaster']) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=wm"><?php echo $statsArray['webMasterInstalled'].' '.$gsprache->webspace.' '.$gsprache->master;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['webMasterActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['webMasterActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['webMasterActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_vhosts;?></strong><span class="pull-right"><?php echo $statsArray['webMasterVhostPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['webMasterVhostPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['webMasterVhostPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_space;?></strong><span class="pull-right"><?php echo $statsArray['webMasterSpaceUsedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['webMasterSpaceUsedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['webMasterSpaceUsedPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($easywiModules['ws'] and $pa['webvhost']) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=wv"><?php echo $statsArray['webspaceInstalled'].' '.$gsprache->webspace;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['webspaceActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['webspaceActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['webspaceActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->usage_space;?></strong><span class="pull-right"><?php echo $statsArray['webspaceSpaceUsedPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['webspaceSpaceUsedPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['webspaceSpaceUsedPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($easywiModules['my'] and $pa['mysql_settings']) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=my"><?php echo $statsArray['mysqlMasterInstalled'].' MySQL '.$gsprache->master;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['mysqlMasterActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['mysqlMasterActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['mysqlMasterActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->master_installed_db;?></strong><span class="pull-right"><?php echo $statsArray['mysqlMasterDBPercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-warning" style="width: <?php echo $statsArray['mysqlMasterDBPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['mysqlMasterDBPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($easywiModules['my'] and $pa['mysql']) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=my&d=ms"><?php echo $statsArray['webspaceInstalled'].' '.$gsprache->databases;?></a></h5>
|
||||
<strong><?php echo $gsprache->active;?></strong><span class="pull-right"><?php echo $statsArray['mysqlActivePercent'];?>%</span>
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo $statsArray['mysqlActivePercent'];?>%;"></div>
|
||||
<div class="bar bar-warning" style="width: <?php echo 100-$statsArray['mysqlActivePercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($crashedArray['gsCrashed']>0 and $pa['gserver'] and $gserver_module){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=gs"><?php echo $crashedArray['gsCrashed'].' '.$sprache_bad->gserver_crashed; ?></a></h4>
|
||||
<?php foreach ($crashed as $row) { ?>
|
||||
<div class="row-fluid"><?php echo $row['address'];?></div>
|
||||
<?php } ?>
|
||||
<?php if($pa['usertickets'] or $pa['tickets']) { ?>
|
||||
<div class="span3">
|
||||
<h5><a href="admin.php?w=tr"><?php echo $sprache_bad->tickets;?></a></h5>
|
||||
<strong><?php echo $sprache_bad->tickets_new;?></strong><span class="pull-right"><?php echo $statsArray['ticketsNewPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['ticketsNewPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['ticketsNewPercent'];?>%;"></div>
|
||||
</div>
|
||||
<strong><?php echo $sprache_bad->tickets_open;?></strong><span class="pull-right"><?php echo $statsArray['ticketsPercent'];?>%</span>
|
||||
<div class="progress progress-danger active">
|
||||
<div class="bar bar-danger" style="width: <?php echo $statsArray['ticketsPercent'];?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo 100-$statsArray['ticketsPercent'];?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($crashedArray['gsTag']>0 and $pa['gserver'] and $gserver_module){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=gs"><?php echo $crashedArray['gsTag'].' '.$sprache_bad->gserver_tag_removed; ?></a></h4>
|
||||
<?php foreach ($tag_removed as $row) { ?>
|
||||
<div class="row-fluid"><?php echo $row['address'];?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($crashedArray['gsPWD']>0 and $pa['gserver'] and $gserver_module){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=gs"><?php echo $crashedArray['gsPWD'].' '.$sprache_bad->gserver_removed; ?></a></h4>
|
||||
<?php foreach ($removed as $row) { ?>
|
||||
<div class="row-fluid"><?php echo $row['address'];?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($pa['roots'] and $gserver_module and $crashedArray['masterserver']>0) { ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=ro&d=md"><?php echo $crashedArray['masterserver'].' '.$sprache_bad->master_crashed; ?></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if($pa['voiceserver'] and $voserver_module and $crashedArray['ts3']>0){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=vo"><?php echo $crashedArray['ts3'].' '.$sprache_bad->voice_crashed; ?></a></h4>
|
||||
<?php foreach ($crashed_ts3 as $row) { ?>
|
||||
<div class="row-fluid"><?php echo $row['address'];?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($pa['voicemasterserver'] and $voserver_module and $crashedArray['ts3Master']>0){ ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=vm"><?php echo $crashedArray['ts3Master'].' '.$sprache_bad->ts3master_crashed; ?></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if($pa['vserverhost'] and $vserver_module and $reseller_id==0 and $crashedArray['virtualHosts']>0) { ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 alert alert-block alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><a href="admin.php?w=vh&d=md"><?php echo $crashedArray['virtualHosts'].' '.$sprache_bad->host_crashed.' ESX(i)'; ?></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if(count($feedArray)>0) echo '<hr>';?>
|
||||
<?php foreach ($feedArray as $url => $array) { ?>
|
||||
<?php foreach ($array as $feed) { ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user