Changeset 8


Ignore:
Timestamp:
Jun 13, 2012, 11:09:13 PM (12 years ago)
Author:
maron
Message:

podpora jazyků

Location:
trunk
Files:
2 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/class/Config.sample.php

    r5 r8  
    3131    'TempFolder' => '../tmp/',
    3232    'VisiblePagingItems' => 20,
     33        'Style' => 'style.css',
     34    'Script' => 'global.js',
     35    'Icon' => 'favicon.ico',
     36    'Language' => 'cs', 
    3337  );
    3438 
  • trunk/class/Database.php

    r6 r8  
    1414  var $ShowSQLQuery = false;
    1515  var $ShowSQLError = false;
     16  var $Config;
    1617
    1718  function __construct()
  • trunk/class/Gui.php

    r6 r8  
    1111  private $Links = array();
    1212  private $Pages = array();
     13  private $Language;
    1314
    1415  function __construct()
     
    1617    $this->Config = new Config(); 
    1718        $this->Messages = new Messages();
     19        $this->Language = new Language();
    1820        $this->Feedback();
    1921        $this->InitLinks();
     
    2931//init Pages
    3032  private function InitPages() {
    31           $this->Pages['home'] = new PageHome(); 
     33          $this->Pages['home'] = new PageHome($this->Language); 
    3234         
    3335  }
  • trunk/class/Page.php

    r7 r8  
    66class Page
    77{
    8   protected $Content = 'gg';
     8  protected $Content = 'ggg';
    99  protected $Title = '';
     10  protected $Language;
    1011
    11   function __construct()
     12  function __construct($Language)
    1213  {
     14          $this->Language = $Language;
     15        print_r($this->Language->Texts);
    1316  }
    1417
     
    2326  }
    2427
     28//sets title of page
     29  protected function SetTitle($Title) {
     30        $this->Title = $Title;
     31  }
     32
    2533}
    2634?>
  • trunk/class/PageHome.php

    r7 r8  
    33// PageHome class
    44// Date: 2012-06-13
    5 include_once('class/Page.php');
     5
     6include_once('Page.php');
     7
    68class PageHome extends Page
    79{
    8 
    9   function __construct()
     10/*
     11  function __construct($__)
    1012  {
     13          parent::__construct($__);
    1114  }
    12  
     15  */
    1316  protected function Generate() {
    14         parent::Generate('Toto je úvodní stránka');
    15         $this->Title = 'Úvodní stránka';
     17        //generation of the page
     18        parent::Generate($this->Language->Texts['home']['content']);
     19        parent::SetTitle($this->Language->Texts['home']['title']);
     20       
    1621  }
    1722
Note: See TracChangeset for help on using the changeset viewer.