Changeset 874 for trunk/Modules/TimeMeasure/Measurement
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- Location:
- trunk/Modules/TimeMeasure/Measurement
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/TimeMeasure/Measurement/System.php
r873 r874 14 14 { 15 15 fclose($Fp1); 16 return (TRUE);16 return TRUE; 17 17 } else 18 18 { 19 19 //echo($ERROR_NO.','.$ERROR_STR); 20 return (FALSE);20 return FALSE; 21 21 } 22 22 restore_error_handler(); … … 34 34 $Time = $Parts[7]; 35 35 $TimeParts = explode('=', $Time); 36 return ($TimeParts[1]);37 } else return (0);36 return $TimeParts[1]; 37 } else return 0; 38 38 } 39 39 … … 48 48 while (strpos($Row, ' ') !== false) $Row = str_replace(' ', ' ', $Row); 49 49 $RowParts2 = explode(' ', $Row); 50 return ($RowParts[2] + $RowParts2[2]);50 return $RowParts[2] + $RowParts2[2]; 51 51 } 52 52 … … 81 81 } 82 82 file_put_contents($CpuStateFileName, serialize($CpuUsage)); 83 return (100 - round($CpuUsagePercent['Idle'], 2));83 return 100 - round($CpuUsagePercent['Idle'], 2); 84 84 } 85 85 … … 114 114 } 115 115 file_put_contents($NetworkStateFile, serialize($NetworkState)); 116 return ($NetworkState);116 return $NetworkState; 117 117 } 118 118 … … 120 120 { 121 121 $NetworkState = $this->GetNetworkState(); 122 return ($NetworkState['Interface']['DownAverage']);122 return $NetworkState['Interface']['DownAverage']; 123 123 } 124 124 … … 126 126 { 127 127 $NetworkState = $this->GetNetworkState(); 128 return ($NetworkState['Interface']['UpAverage']);128 return $NetworkState['Interface']['UpAverage']; 129 129 } 130 130 … … 134 134 $Output = array(); 135 135 exec('cat /proc/net/nf_conntrack|grep "dst='.$HostIP.' "|grep "dport='.$Port.' "|grep "ASSURED"', $Output); 136 return (count($Output));136 return count($Output); 137 137 } 138 138 … … 145 145 $Parts = explode(' ', $Row); 146 146 $Value = str_replace(',', '.', $Parts[11]); 147 return ($Value);147 return $Value; 148 148 } 149 149 150 150 function DiskFree($Path) 151 151 { 152 return (disk_free_space($Path));152 return disk_free_space($Path); 153 153 } 154 154 … … 163 163 $Line = substr($Line, strpos($Line, '+') + 1); 164 164 $Line = substr($Line, 0, strpos($Line, '°')); 165 return ($Line);165 return $Line; 166 166 } 167 167 } 168 return (0);168 return 0; 169 169 } 170 170 … … 175 175 fclose($File); 176 176 $UptimeParts = explode(' ', $Uptime); 177 return ($UptimeParts[0]);177 return $UptimeParts[0]; 178 178 } 179 179 } -
trunk/Modules/TimeMeasure/Measurement/WoW.php
r873 r874 12 12 $DbResult = $Database->query('SELECT COUNT(*) FROM account WHERE online=1'); 13 13 $Row = $DbResult->fetch_array(); 14 return ($Row[0]);14 return $Row[0]; 15 15 } 16 16 … … 20 20 $DbResult = $Database->query('SELECT COUNT(*) FROM account WHERE online=1 AND gmlevel > 0'); 21 21 $Row = $DbResult->fetch_array(); 22 return ($Row[0]);22 return $Row[0]; 23 23 } 24 24 … … 28 28 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 29 29 $Row = $DbResult->fetch_array(); 30 return ($Row[0]);30 return $Row[0]; 31 31 } 32 32 … … 36 36 $DbResult = $Database->query('SELECT COUNT(*) FROM guild'); 37 37 $Row = $DbResult->fetch_array(); 38 return ($Row[0]);38 return $Row[0]; 39 39 } 40 40 … … 44 44 $DbResult = $Database->query('SELECT COUNT(*) FROM `characters`'); 45 45 $Row = $DbResult->fetch_array(); 46 return ($Row[0]);46 return $Row[0]; 47 47 } 48 48 … … 52 52 $DbResult = $Database->query('SELECT COUNT(*) FROM uptime'); 53 53 $Row = $DbResult->fetch_array(); 54 return ($Row[0]);54 return $Row[0]; 55 55 } 56 56 57 57 function WoWEmulatorAvailability() 58 58 { 59 if (CheckPortStatus('localhost', 8085)) return (100); else return (0); 59 if (CheckPortStatus('localhost', 8085)) return 100; 60 else return 0; 60 61 } 61 62 … … 69 70 $Row = $DbResult->fetch_array(); 70 71 $Value = $Row[0]; 71 return ($Value);72 return $Value; 72 73 } 73 74 }
Note:
See TracChangeset
for help on using the changeset viewer.