Changeset 32 for trunk/index.php
- Timestamp:
- Apr 7, 2020, 1:06:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r31 r32 15 15 function Link($URL) 16 16 { 17 return ($this->Config['BaseURL'].$URL);17 return $this->Config['BaseURL'].$URL; 18 18 } 19 19 … … 83 83 '<a href="'.$this->Link('/families/').'">Families</a> '. 84 84 '</div>'; 85 return ($Output);85 return $Output; 86 86 } 87 87 88 88 function ProcessURL() 89 89 { 90 if (array_key_exists('REDIRECT_QUERY_STRING', $_SERVER))90 if (array_key_exists('REDIRECT_QUERY_STRING', $_SERVER)) 91 91 $PathString = $_SERVER['REDIRECT_QUERY_STRING']; 92 92 else $PathString = ''; 93 if (substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1);93 if (substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1); 94 94 $PathItems = explode('/', $PathString); 95 if (array_key_exists('REQUEST_URI', $_SERVER) and (strpos($_SERVER['REQUEST_URI'], '?') !== false))95 if (array_key_exists('REQUEST_URI', $_SERVER) and (strpos($_SERVER['REQUEST_URI'], '?') !== false)) 96 96 $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1); 97 97 else $_SERVER['QUERY_STRING'] = ''; 98 98 parse_str($_SERVER['QUERY_STRING'], $_GET); 99 return ($PathItems);99 return $PathItems; 100 100 } 101 101 … … 368 368 'ROUND((SELECT TeamStat.Money FROM TeamStat WHERE TeamStat.Team=Team.Id ORDER BY Time DESC LIMIT 1) / (SELECT COUNT(*) FROM Runner WHERE Runner.Team=Team.Id)) AS MoneyRunner', 369 369 $Where.$Order['SQL'].$PageList['SQLLimit']); 370 while ($Item = $DbResult->fetch_assoc())370 while ($Item = $DbResult->fetch_assoc()) 371 371 { 372 372 if ($Item['Name'] == '') $Item['Name'] = $TitleItem.' '.$Item['WebId']; … … 385 385 $Output .= '</div>'; 386 386 387 return ($Output);387 return $Output; 388 388 } 389 389 … … 453 453 ', (SELECT RunnerStat.Rank FROM RunnerStat WHERE RunnerStat.Runner=Runner.Id ORDER BY Time DESC LIMIT 1) AS Rank', 454 454 $Where.$Order['SQL'].$PageList['SQLLimit']); 455 while ($Item = $DbResult->fetch_assoc())455 while ($Item = $DbResult->fetch_assoc()) 456 456 { 457 457 $Output .= '<tr>'. … … 471 471 $Output .= $this->ShowDaily('Team', $TeamId); 472 472 473 return ($Output);473 return $Output; 474 474 } 475 475 … … 504 504 ' FROM '.$Table.'Stat'. 505 505 ' WHERE '.$Where.$Order['SQL'].$PageList['SQLLimit']); 506 while ($Item = $DbResult->fetch_assoc())506 while ($Item = $DbResult->fetch_assoc()) 507 507 { 508 508 $Output .= '<tr>'. … … 556 556 ' FROM ('.$DailyTableMaxId.') AS T4'. 557 557 ' WHERE '.$Where.$Order['SQL'].$PageList['SQLLimit']); 558 while ($Item = $DbResult->fetch_assoc())558 while ($Item = $DbResult->fetch_assoc()) 559 559 { 560 560 $Output .= '<tr>'. … … 623 623 ', (SELECT RunnerStat.Rank FROM RunnerStat WHERE RunnerStat.Runner=Runner.Id ORDER BY Time DESC LIMIT 1) AS Rank', 624 624 $Where.$Order['SQL'].$PageList['SQLLimit']); 625 while ($Item = $DbResult->fetch_assoc())625 while ($Item = $DbResult->fetch_assoc()) 626 626 { 627 627 $Output .= '<tr>'. … … 638 638 $Output .= '</div>'; 639 639 640 return ($Output);640 return $Output; 641 641 } 642 642 … … 660 660 $Output .= $this->ShowDetailed('Runner', $RunnerId); 661 661 $Output .= $this->ShowDaily('Runner', $RunnerId); 662 return ($Output);662 return $Output; 663 663 } 664 664 … … 733 733 '<a href="https://app.zdechov.net/teribear/">Source code</a></div>'; 734 734 $Output .= '</body></html>'; 735 return ($Output);735 return $Output; 736 736 } 737 737 … … 757 757 $Item = $this->PathItems[0]; 758 758 if ($Item == 'sync') $Output .= $this->ShowSync(); 759 //else if ($this->PathItems[0] == 'empty') $Output .= $this->ShowEmpty();760 else if ($Item == 'runner') $Output .= $this->ShowRunner();761 else if ($Item == 'runners') $Output .= $this->ShowRunners();762 else if ($Item == 'team') $Output .= $this->ShowTeam();763 else if ($Item == 'teams') $Output .= $this->ShowTeams();764 else if ($Item == 'family') $Output .= $this->ShowFamily();765 else if ($Item == 'families') $Output .= $this->ShowFamilies();759 //else if ($this->PathItems[0] == 'empty') $Output .= $this->ShowEmpty(); 760 else if ($Item == 'runner') $Output .= $this->ShowRunner(); 761 else if ($Item == 'runners') $Output .= $this->ShowRunners(); 762 else if ($Item == 'team') $Output .= $this->ShowTeam(); 763 else if ($Item == 'teams') $Output .= $this->ShowTeams(); 764 else if ($Item == 'family') $Output .= $this->ShowFamily(); 765 else if ($Item == 'families') $Output .= $this->ShowFamilies(); 766 766 else $Output .= $this->ShowMain(); 767 767 } else $Output .= $this->ShowMain();
Note:
See TracChangeset
for help on using the changeset viewer.