Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p style="text-align:center;"><img src="logo.png" alt="Logo"></p>
- <script src="sorttable.js"></script>
- <?php
- echo "<body style='background-color:black'>";
- $i = '0';
- $z = '0';
- $a = '0';
- $gdir = "C:\\Users\\Administrator\\Downloads\\pvpgn-develop-1.99.7.2.0-PRO-8464f2b_plain\\var\\users\\";
- $value = count(glob($gdir . "*"));
- $files = scandir($gdir,1);
- $Awins = array();
- $Aname = array();
- $Aloss = array();
- $Tgames = array();
- $totalpercent = array();
- echo '<table align="center" class="sortable" border="1" BORDERCOLOR=blue style="width:30%">';
- echo "<tr align=left>
- <th><font color='White'>Name</font></th>
- <th><font color='White'>Wins</font></th>
- <th><font color='White'>Loss</font></th>
- <th><font color='White'>%</font></th>
- </tr>";
- while ($i < $value)
- {
- $txt_file = file_get_contents($gdir . $files[$i]);
- $rows = explode("\n", $txt_file);
- foreach($rows as $row => $data)
- {
- $data = str_replace("\\","","$data");
- if (strpos($data,'BNETacctusername') !== false){
- $data = explode('"', $data);
- $Aname[$i] = $data[3];
- }
- if (strpos($data,'RecordW2BN0wins') !== false){
- $data = explode('"', $data);
- $Awins[$i] = $data[3];
- }
- if ($Awins[$i] == NULL){
- $Awins[$i] = "0";
- }
- if (strpos($data,'RecordW2BN0losses') !== false){
- $data = explode('"', $data);
- $Aloss[$i] = $data[3];
- }
- if ($Aloss[$i] == NULL){
- $Aloss[$i] = "0";
- }
- if ($Awins[$i] != 0 or $Aloss[$i] != 0 or $Tgames[$i] != 0) {
- $Tgames[$i] = ($Awins[$i] + $Aloss[$i]);
- $percentwin[$i] = ($Awins[$i] / $Tgames[$i]);
- $totalpercent[$i] = $percentwin[$i] * 100;
- } elseif ($totalpercent = NULL){
- $totalpercent[$i] = "0";
- }
- }
- $i++;
- $rowcount = count($Aname);
- while ($a < $rowcount)
- {
- if ($Awins[$a] > 9)
- {
- if ($Aname[$a] == NULL or $Awins[$a] == NULL or $Aloss[$a] == NULL) {
- } else {
- echo "<tr><td><font color='white'>".$Aname[$a]."</font></td><td><font color='white'>".floor($Awins[$a])."</font></td><td><font color='white'>".floor($Aloss[$a])."</font></td><td><font color='white'>".floor($totalpercent[$a])."</font></td></tr>";
- }
- }
- $a++;
- }
- }
- echo '</table>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement