Changeset 3 for trunk/Application


Ignore:
Timestamp:
Sep 8, 2016, 11:03:23 PM (8 years ago)
Author:
chronos
Message:
  • Added: Calculare available seats for passenger registration.
  • Added: Show table of passengers for a ride.
Location:
trunk/Application
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Core.php

    r1 r3  
    3030    $this->ShowPage = true;
    3131    $this->BaseURL = $_SERVER['SCRIPT_NAME'];
    32     if(substr($this->BaseURL, -10, 10) == '/index.php')
    33       $this->BaseURL = substr($this->BaseURL, 0, -10);
     32    $BaseScriptName = '/index.php';
     33    if(substr($this->BaseURL, -strlen($BaseScriptName), strlen($BaseScriptName)) == $BaseScriptName)
     34      $this->BaseURL = substr($this->BaseURL, 0, -strlen($BaseScriptName));
    3435    $this->FormManager = new FormManager($this->Database);
    3536  }
     
    6263
    6364    $this->RegisterPageBar('Top');
     65    $this->RegisterPageBar('TopLeft');
    6466
    6567    // Register and start existing modules
     
    164166  {
    165167    Header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
    166     return('<h3 align="center">'.T('Required page not found'));
     168    return('<h3 align="center">'.T('Required page not found').'</h3>');
    167169  }
    168170}
  • trunk/Application/View.php

    r1 r3  
    3535  {
    3636    $Output = '<div>';
     37    $Output .= '<div class="MenuItem">';
     38    $Bar = '';
     39    foreach($this->System->Bars['TopLeft'] as $BarItem)
     40      $Bar .= call_user_func($BarItem);
     41      if(trim($Bar) != '') $Output .= $Bar;
     42      else $Output .= '&nbsp;';
     43    $Output .= '</div><div class="MenuItem2">';
    3744    $Bar = '';
    3845    foreach($this->System->Bars['Top'] as $BarItem)
     
    4047      if(trim($Bar) != '') $Output .= $Bar;
    4148      else $Output .= '&nbsp;';
    42     $Output .= '</div>';
     49    $Output .= '</div></div>';
    4350    return($Output);
    4451  }
Note: See TracChangeset for help on using the changeset viewer.