Changeset 32 for trunk


Ignore:
Timestamp:
Apr 7, 2020, 1:06:13 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Database.php

    r19 r32  
    77{
    88  list($usec, $sec) = explode(" ", microtime());
    9   return ((float)$usec + (float)$sec);
     9  return (float)$usec + (float)$sec;
    1010}
    1111
     
    1717  function fetch_assoc()
    1818  {
    19     return($this->PDOStatement->fetch(PDO::FETCH_ASSOC));
     19    return $this->PDOStatement->fetch(PDO::FETCH_ASSOC);
    2020  }
    2121
    2222  function fetch_array()
    2323  {
    24     return($this->PDOStatement->fetch(PDO::FETCH_BOTH));
     24    return $this->PDOStatement->fetch(PDO::FETCH_BOTH);
    2525  }
    2626
    2727  function fetch_row()
    2828  {
    29     return($this->PDOStatement->fetch(PDO::FETCH_NUM));
     29    return $this->PDOStatement->fetch(PDO::FETCH_NUM);
    3030  }
    3131}
     
    6161  function Connect($Host, $User, $Password, $Database)
    6262  {
    63     if($this->Type == 'mysql') $ConnectionString = 'mysql:host='.$Host.';dbname='.$Database;
    64       else if($this->Type == 'pgsql') $ConnectionString = 'pgsql:dbname='.$Database.';host='.$Host;
     63    if ($this->Type == 'mysql') $ConnectionString = 'mysql:host='.$Host.';dbname='.$Database;
     64      else if ($this->Type == 'pgsql') $ConnectionString = 'pgsql:dbname='.$Database.';host='.$Host;
    6565      else $ConnectionString = '';
    6666    try {
     
    8181  function Connected()
    8282  {
    83     return(isset($this->PDO));
     83    return isset($this->PDO);
    8484  }
    8585
     
    9191  function query($Query)
    9292  {
    93     if(!$this->Connected()) throw new Exception(T('Not connected to database'));
    94     if(($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) $QueryStartTime = microtime_float();
     93    if (!$this->Connected()) throw new Exception(T('Not connected to database'));
     94    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) $QueryStartTime = microtime_float();
    9595    $this->LastQuery = $Query;
    9696    //echo('a'.$this->ShowSQLQuery.'<'.$QueryStartTime.', '.microtime_float());
    97     if(($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true))
     97    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true))
    9898      $Duration = ' ; '.round(microtime_float() - $QueryStartTime, 4). ' s';
    99     if($this->LogSQLQuery == true)
     99    if ($this->LogSQLQuery == true)
    100100      file_put_contents($this->LogFile, $Query.$Duration."\n", FILE_APPEND);
    101     if($this->ShowSQLQuery == true)
     101    if ($this->ShowSQLQuery == true)
    102102      echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; '.
    103103      'padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.$Duration.'</div>'."\n");
    104104    $Result = new DatabaseResult();
    105105    $Result->PDOStatement = $this->PDO->query($Query);
    106     if($Result->PDOStatement)
     106    if ($Result->PDOStatement)
    107107    {
    108108      $Result->num_rows = $Result->PDOStatement->rowCount();
     
    112112      $this->Error = $this->PDO->errorInfo();
    113113      $this->Error = $this->Error[2];
    114       if(($this->Error != '') and ($this->ShowSQLError == true))
     114      if (($this->Error != '') and ($this->ShowSQLError == true))
    115115        echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>');
    116116        throw new Exception('SQL Error: '.$this->Error.', Query: '.$Query);
    117117    }
    118     return($Result);
     118    return $Result;
    119119  }
    120120
    121121  function select($Table, $What = '*', $Condition = 1)
    122122  {
    123     return($this->query('SELECT '.$What.' FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition));
     123    return $this->query('SELECT '.$What.' FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition);
    124124  }
    125125
     
    139139    $Name = '';
    140140    $Values = '';
    141     foreach($Data as $Key => $Value)
     141    foreach ($Data as $Key => $Value)
    142142    {
    143143      $Name .= ',`'.$Key.'`';
    144       if(!in_array($Value, $this->Functions))
     144      if (!in_array($Value, $this->Functions))
    145145      {
    146         if(is_null($Value)) $Value = 'NULL';
     146        if (is_null($Value)) $Value = 'NULL';
    147147        else $Value = $this->PDO->quote($Value);
    148148      }
     
    151151    $Name = substr($Name, 1);
    152152    $Values = substr($Values, 1);
    153     return('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');
     153    return 'INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')';
    154154  }
    155155
     
    162162  {
    163163    $Values = '';
    164     foreach($Data as $Key => $Value)
    165     {
    166       if(!in_array($Value, $this->Functions))
     164    foreach ($Data as $Key => $Value)
     165    {
     166      if (!in_array($Value, $this->Functions))
    167167      {
    168         if(is_null($Value)) $Value = 'NULL';
     168        if (is_null($Value)) $Value = 'NULL';
    169169        else $Value = $this->PDO->quote($Value);
    170170      }
     
    172172    }
    173173    $Values = substr($Values, 2);
    174     return('UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')');
     174    return 'UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')';
    175175  }
    176176
     
    179179    $Name = '';
    180180    $Values = '';
    181     foreach($Data as $Key => $Value)
    182     {
    183       if(!in_array($Value, $this->Functions))
     181    foreach ($Data as $Key => $Value)
     182    {
     183      if (!in_array($Value, $this->Functions))
    184184      {
    185         if(is_null($Value)) $Value = 'NULL';
     185        if (is_null($Value)) $Value = 'NULL';
    186186        else $Value = $this->PDO->quote($Value);
    187187      }
     
    203203  function real_escape_string($Text)
    204204  {
    205     return(addslashes($Text));
     205    return addslashes($Text);
    206206  }
    207207
    208208  function quote($Text)
    209209  {
    210     return($this->PDO->quote($Text));
     210    return $this->PDO->quote($Text);
    211211  }
    212212
     
    232232      $this->Error = $this->PDO->errorInfo();
    233233      $this->Error = $this->Error[2];
    234       if(($this->Error != '') and ($this->ShowSQLError == true))
     234      if (($this->Error != '') and ($this->ShowSQLError == true))
    235235        echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>');
    236236      throw new Exception('SQL Error: '.$this->Error.', Query: '.$Query);
     
    241241function TimeToMysqlDateTime($Time)
    242242{
    243   if($Time == NULL) return(NULL);
    244     else return(date('Y-m-d H:i:s', $Time));
     243  if ($Time == NULL) return NULL;
     244    else return date('Y-m-d H:i:s', $Time);
    245245}
    246246
    247247function TimeToMysqlDate($Time)
    248248{
    249   if($Time == NULL) return(NULL);
    250     else return(date('Y-m-d', $Time));
     249  if ($Time == NULL) return NULL;
     250    else return date('Y-m-d', $Time);
    251251}
    252252
    253253function TimeToMysqlTime($Time)
    254254{
    255   if($Time == NULL) return(NULL);
    256     else return(date('H:i:s', $Time));
     255  if ($Time == NULL) return NULL;
     256    else return date('H:i:s', $Time);
    257257}
    258258
    259259function MysqlDateTimeToTime($DateTime)
    260260{
    261   if($DateTime == '') return(NULL);
     261  if ($DateTime == '') return NULL;
    262262  $Parts = explode(' ', $DateTime);
    263263  $DateParts = explode('-', $Parts[0]);
    264264  $TimeParts = explode(':', $Parts[1]);
    265265  $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]);
    266   return($Result);
     266  return $Result;
    267267}
    268268
    269269function MysqlDateToTime($Date)
    270270{
    271   if($Date == '') return(NULL);
    272   return(MysqlDateTimeToTime($Date.' 0:0:0'));
     271  if ($Date == '') return NULL;
     272  return MysqlDateTimeToTime($Date.' 0:0:0');
    273273}
    274274
    275275function MysqlTimeToTime($Time)
    276276{
    277   if($Time == '') return(NULL);
    278   return(MysqlDateTimeToTime('0000-00-00 '.$Time));
    279 }
     277  if ($Time == '') return NULL;
     278  return MysqlDateTimeToTime('0000-00-00 '.$Time);
     279}
  • trunk/Global.php

    r4 r32  
    33function HumanDate($Time)
    44{
    5   return(date('j.n.Y', $Time));
     5  return date('j.n.Y', $Time);
    66}
    77
    88function HumanDateTime($Time)
    99{
    10   return(date('j.n.Y H:i:s', $Time));
     10  return date('j.n.Y H:i:s', $Time);
    1111}
    1212
     
    2222  $Result = array();
    2323  $Parts = explode('&', $QueryString);
    24   foreach($Parts as $Part)
     24  foreach ($Parts as $Part)
    2525  {
    26     if($Part != '')
     26    if ($Part != '')
    2727    {
    28       if(!strpos($Part, '=')) $Part .= '=';
     28      if (!strpos($Part, '=')) $Part .= '=';
    2929      $Item = explode('=', $Part);
    3030      $Result[$Item[0]] = $Item[1];
    3131    }
    3232  }
    33   return($Result);
     33  return $Result;
    3434}
    3535
     
    3737{
    3838  $Parts = array();
    39   foreach($QueryStringArray as $Index => $Item)
     39  foreach ($QueryStringArray as $Index => $Item)
    4040  {
    4141    if ($Index != 'lvm') $Parts[] = $Index.'='.$Item;
    4242  }
    43   return(implode('&amp;', $Parts));
     43  return implode('&amp;', $Parts);
    4444}
    4545
     
    5555  $PageCount = floor($TotalCount / $ItemPerPage) + 1;
    5656
    57   if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 0;
    58   if(array_key_exists('page', $_GET)) $_SESSION['Page'] = $_GET['page'] * 1;
    59   if($_SESSION['Page'] < 0) $_SESSION['Page'] = 0;
    60   if($_SESSION['Page'] >= $PageCount) $_SESSION['Page'] = $PageCount - 1;
     57  if (!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 0;
     58  if (array_key_exists('page', $_GET)) $_SESSION['Page'] = $_GET['page'] * 1;
     59  if ($_SESSION['Page'] < 0) $_SESSION['Page'] = 0;
     60  if ($_SESSION['Page'] >= $PageCount) $_SESSION['Page'] = $PageCount - 1;
    6161  $CurrentPage = $_SESSION['Page'];
    6262
     
    6565
    6666  $Result = '';
    67   if($PageCount > 1)
     67  if ($PageCount > 1)
    6868  {
    69     if($CurrentPage > 0)
     69    if ($CurrentPage > 0)
    7070    {
    7171      $QueryItems['page'] = 0;
     
    7676    $PagesMax = $PageCount - 1;
    7777    $PagesMin = 0;
    78     if($PagesMax > ($CurrentPage + $Around)) $PagesMax = $CurrentPage + $Around;
    79     if($PagesMin < ($CurrentPage - $Around))
     78    if ($PagesMax > ($CurrentPage + $Around)) $PagesMax = $CurrentPage + $Around;
     79    if ($PagesMin < ($CurrentPage - $Around))
    8080    {
    8181      $Result.= ' ... ';
    8282      $PagesMin = $CurrentPage - $Around;
    8383    }
    84     for($i = $PagesMin; $i <= $PagesMax; $i++)
     84    for ($i = $PagesMin; $i <= $PagesMax; $i++)
    8585    {
    86       if($i == $CurrentPage) $Result.= '<strong>'.($i + 1).'</strong> ';
     86      if ($i == $CurrentPage) $Result.= '<strong>'.($i + 1).'</strong> ';
    8787      else {
    8888       $QueryItems['page'] = $i;
     
    9090      }
    9191    }
    92     if($PagesMax < ($PageCount - 1)) $Result .= ' ... ';
    93     if($CurrentPage < ($PageCount - 1))
     92    if ($PagesMax < ($PageCount - 1)) $Result .= ' ... ';
     93    if ($CurrentPage < ($PageCount - 1))
    9494    {
    9595      $QueryItems['page'] = ($CurrentPage + 1);
     
    100100  }
    101101  $Result = '<div style="text-align: center">'.$Result.'</div>';
    102   return(array('SQLLimit' => ' LIMIT '.$CurrentPage * $ItemPerPage.', '.$ItemPerPage,
     102  return array('SQLLimit' => ' LIMIT '.$CurrentPage * $ItemPerPage.', '.$ItemPerPage,
    103103    'Page' => $CurrentPage,
    104104    'Output' => $Result,
    105   ));
     105  );
    106106}
    107107
     
    113113  global $OrderDirSQL, $OrderArrowImage, $Config;
    114114
    115   if(array_key_exists('OrderCol', $_GET)) $_SESSION['OrderCol'] = $_GET['OrderCol'];
    116   if(array_key_exists('OrderDir', $_GET) and (array_key_exists($_GET['OrderDir'], $OrderArrowImage)))
     115  if (array_key_exists('OrderCol', $_GET)) $_SESSION['OrderCol'] = $_GET['OrderCol'];
     116  if (array_key_exists('OrderDir', $_GET) and (array_key_exists($_GET['OrderDir'], $OrderArrowImage)))
    117117    $_SESSION['OrderDir'] = $_GET['OrderDir'];
    118   if(!array_key_exists('OrderCol', $_SESSION)) $_SESSION['OrderCol'] = $DefaultColumn;
    119   if(!array_key_exists('OrderDir', $_SESSION)) $_SESSION['OrderDir'] = $DefaultOrder;
     118  if (!array_key_exists('OrderCol', $_SESSION)) $_SESSION['OrderCol'] = $DefaultColumn;
     119  if (!array_key_exists('OrderDir', $_SESSION)) $_SESSION['OrderDir'] = $DefaultOrder;
    120120
    121121  // Check OrderCol
    122122  $Found = false;
    123   foreach($Columns as $Column)
     123  foreach ($Columns as $Column)
    124124  {
    125     if($Column['Name'] == $_SESSION['OrderCol'])
     125    if ($Column['Name'] == $_SESSION['OrderCol'])
    126126    {
    127127      $Found = true;
     
    129129    }
    130130  }
    131   if($Found == false)
     131  if ($Found == false)
    132132  {
    133133    $_SESSION['OrderCol'] = $DefaultColumn;
     
    135135  }
    136136  // Check OrderDir
    137   if(($_SESSION['OrderDir'] != 0) and ($_SESSION['OrderDir'] != 1)) $_SESSION['OrderDir'] = 0;
     137  if (($_SESSION['OrderDir'] != 0) and ($_SESSION['OrderDir'] != 1)) $_SESSION['OrderDir'] = 0;
    138138
    139139  $Result = '';
    140140  $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']);
    141   foreach($Columns as $Index => $Column)
     141  foreach ($Columns as $Index => $Column)
    142142  {
    143143    $QueryItems['OrderCol'] = $Column['Name'];
    144144    $QueryItems['OrderDir'] = 1 - $_SESSION['OrderDir'];
    145     if($Column['Name'] == $_SESSION['OrderCol']) $ArrowImage = '<img style="vertical-align: middle; border: 0px;" src="'.
     145    if ($Column['Name'] == $_SESSION['OrderCol']) $ArrowImage = '<img style="vertical-align: middle; border: 0px;" src="'.
    146146      Link2('/images/'.$OrderArrowImage[$_SESSION['OrderDir']]).'" alt="order arrow"/>';
    147147      else $ArrowImage = '';
    148     if($Column['Name'] == '') $Result .= '<th>'.$Column['Title'].'</th>';
     148    if ($Column['Name'] == '') $Result .= '<th>'.$Column['Title'].'</th>';
    149149      else $Result .= '<th><a href="?'.SetQueryStringArray($QueryItems).'">'.$Column['Title'].$ArrowImage.'</a></th>';
    150150  }
    151   return(array(
     151  return array(
    152152    'SQL' => ' ORDER BY `'.$_SESSION['OrderCol'].'` '.$OrderDirSQL[$_SESSION['OrderDir']],
    153153    'Output' => '<tr>'.$Result.'</tr>',
    154154    'Column' => $_SESSION['OrderCol'],
    155155    'Direction' => $_SESSION['OrderDir'],
    156   ));
     156  );
    157157}
  • trunk/PrefixMultiplier.php

    r5 r32  
    7474  function TruncateDigits($Value, $Digits = 4)
    7575  {
    76     for($II = 2; $II > -6; $II--)
     76    for ($II = 2; $II > -6; $II--)
    7777    {
    78       if($Value >= pow(10, $II))
     78      if ($Value >= pow(10, $II))
    7979      {
    80         if($Digits < ($II + 1)) $RealDigits = $II + 1;
     80        if ($Digits < ($II + 1)) $RealDigits = $II + 1;
    8181          else $RealDigits = $Digits;
    8282        $Value = round($Value / pow(10, $II - $RealDigits + 1)) * pow(10, $II - $RealDigits + 1);
     
    8484      }
    8585    }
    86     return($Value);
     86    return $Value;
    8787  }
    8888
     
    9393    $Negative = ($Value < 0);
    9494    $Value = abs($Value);
    95     if(($Unit == '') and ($PrefixType != 'Time'))
    96       return($this->TruncateDigits($Value, $Digits));
     95    if (($Unit == '') and ($PrefixType != 'Time'))
     96      return $this->TruncateDigits($Value, $Digits);
    9797
    9898    $I = $PrefixMultipliers[$PrefixType]['BaseIndex'];
    99     if($Value == 0) return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit);
     99    if ($Value == 0) return $Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit;
    100100
    101     if($Value > 1)
     101    if ($Value > 1)
    102102    {
    103       while((($I + 1) <= count($PrefixMultipliers[$PrefixType]['Definition'])) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I + 1][2]) > 1))
     103      while ((($I + 1) <= count($PrefixMultipliers[$PrefixType]['Definition'])) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I + 1][2]) > 1))
    104104        $I = $I + 1;
    105105    } else
    106     if($Value < 1)
     106    if ($Value < 1)
    107107    {
    108       while((($I - 1) >= 0) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I][2]) < 1))
     108      while ((($I - 1) >= 0) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I][2]) < 1))
    109109        $I = $I - 1;
    110110    }
     
    113113    // Truncate digits count
    114114    $Value = $this->TruncateDigits($Value, $Digits);
    115     if($Negative) $Value = -$Value;
    116     return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit);
     115    if ($Negative) $Value = -$Value;
     116    return $Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit;
    117117  }
    118118}
  • trunk/Run.php

    r29 r32  
    2525      $this->Id = $DbRow['Id'];
    2626    }
    27     return($Result);
     27    return $Result;
    2828  }
    2929}
  • trunk/index.php

    r31 r32  
    1515  function Link($URL)
    1616  {
    17     return($this->Config['BaseURL'].$URL);
     17    return $this->Config['BaseURL'].$URL;
    1818  }
    1919
     
    8383      '<a href="'.$this->Link('/families/').'">Families</a> '.
    8484      '</div>';
    85     return($Output);
     85    return $Output;
    8686  }
    8787
    8888  function ProcessURL()
    8989  {
    90     if(array_key_exists('REDIRECT_QUERY_STRING', $_SERVER))
     90    if (array_key_exists('REDIRECT_QUERY_STRING', $_SERVER))
    9191      $PathString = $_SERVER['REDIRECT_QUERY_STRING'];
    9292    else $PathString = '';
    93     if(substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1);
     93    if (substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1);
    9494    $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))
    9696      $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1);
    9797    else $_SERVER['QUERY_STRING'] = '';
    9898    parse_str($_SERVER['QUERY_STRING'], $_GET);
    99     return($PathItems);
     99    return $PathItems;
    100100  }
    101101
     
    368368      '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',
    369369      $Where.$Order['SQL'].$PageList['SQLLimit']);
    370     while($Item = $DbResult->fetch_assoc())
     370    while ($Item = $DbResult->fetch_assoc())
    371371    {
    372372      if ($Item['Name'] == '') $Item['Name'] = $TitleItem.' '.$Item['WebId'];
     
    385385    $Output .= '</div>';
    386386
    387     return($Output);
     387    return $Output;
    388388  }
    389389
     
    453453      ', (SELECT RunnerStat.Rank FROM RunnerStat WHERE RunnerStat.Runner=Runner.Id ORDER BY Time DESC LIMIT 1) AS Rank',
    454454      $Where.$Order['SQL'].$PageList['SQLLimit']);
    455     while($Item = $DbResult->fetch_assoc())
     455    while ($Item = $DbResult->fetch_assoc())
    456456    {
    457457      $Output .= '<tr>'.
     
    471471    $Output .= $this->ShowDaily('Team', $TeamId);
    472472
    473     return($Output);
     473    return $Output;
    474474  }
    475475
     
    504504      ' FROM '.$Table.'Stat'.
    505505      ' WHERE '.$Where.$Order['SQL'].$PageList['SQLLimit']);
    506     while($Item = $DbResult->fetch_assoc())
     506    while ($Item = $DbResult->fetch_assoc())
    507507    {
    508508      $Output .= '<tr>'.
     
    556556      ' FROM ('.$DailyTableMaxId.') AS T4'.
    557557      ' WHERE '.$Where.$Order['SQL'].$PageList['SQLLimit']);
    558     while($Item = $DbResult->fetch_assoc())
     558    while ($Item = $DbResult->fetch_assoc())
    559559    {
    560560      $Output .= '<tr>'.
     
    623623      ', (SELECT RunnerStat.Rank FROM RunnerStat WHERE RunnerStat.Runner=Runner.Id ORDER BY Time DESC LIMIT 1) AS Rank',
    624624      $Where.$Order['SQL'].$PageList['SQLLimit']);
    625     while($Item = $DbResult->fetch_assoc())
     625    while ($Item = $DbResult->fetch_assoc())
    626626    {
    627627      $Output .= '<tr>'.
     
    638638    $Output .= '</div>';
    639639
    640     return($Output);
     640    return $Output;
    641641  }
    642642
     
    660660    $Output .= $this->ShowDetailed('Runner', $RunnerId);
    661661    $Output .= $this->ShowDaily('Runner', $RunnerId);
    662     return($Output);
     662    return $Output;
    663663  }
    664664
     
    733733       '<a href="https://app.zdechov.net/teribear/">Source code</a></div>';
    734734    $Output .= '</body></html>';
    735     return($Output);
     735    return $Output;
    736736  }
    737737
     
    757757      $Item = $this->PathItems[0];
    758758      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();
    766766      else $Output .= $this->ShowMain();
    767767    } else $Output .= $this->ShowMain();
Note: See TracChangeset for help on using the changeset viewer.