Changeset 19 for trunk/CustomOutput.php


Ignore:
Timestamp:
Mar 1, 2010, 8:03:14 AM (14 years ago)
Author:
george
Message:
  • Přidáno: Modul pro práci s uživateli.
  • Upraveno: Úvodní stránka a stránka zobrazující historii sítě.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CustomOutput.php

    r16 r19  
    1111  var $GlobalTitle;
    1212  var $Title;
    13   var $ShowRuntimeInfo = false;
    14   var $Charset = 'utf-8';
    15   var $FormatHTML = false;
    16   var $Admin = 'admin';
    17   var $AdminEmail = 'admin@localhost';
    18   var $Style = 'Basic';
     13  var $ShowRuntimeInfo;
     14  var $Charset;
     15  var $FormatHTML;
     16  var $Admin;
     17  var $AdminEmail;
     18  var $Style;
     19  var $Keywords;
    1920
     21  function __construct($System)
     22  {
     23    parent::__construct($System);
     24    $this->Charset = 'utf-8';
     25    $this->ShowRuntimeInfo = false;
     26    $this->FormatHTML = false;
     27    $this->Admin = 'admin';
     28    $this->AdminEmail = 'admin@localhost';
     29    $this->Style = 'Basic';
     30    $this->Keywords = array();
     31  }
     32 
    2033  function TopMenu()
    2134  {
     
    8194    $this->Document->Encoding = $this->Charset;
    8295    $this->Document->Formated = $this->FormatHTML;
     96   
    8397    $Style = new XMLTag('link');
    8498    $Style->Attributes = array('rel' => 'stylesheet', 'href' => 'Style/'.$this->Style.'/Style.css',
    8599      'type' => 'text/css', 'media' => 'all');
    86100    $this->Document->HeadTag->SubElements[] = $Style;
     101   
    87102    $JavaScript = new XMLTag('script');
    88103    $JavaScript->Attributes = array('type' => 'text/javascript', 'src' => 'Style/'.$this->Style.'/Global.js');
    89104    $JavaScript->ShringEmpty = false;
    90105    $this->Document->HeadTag->SubElements[] = $JavaScript;
     106   
    91107    $JavaScript = new XMLTag('script');
    92108    $JavaScript->Attributes = array('type' => 'text/javascript', 'src' => 'Style/'.$this->Style.'/jquery.js');
    93109    $JavaScript->ShringEmpty = false;
    94110    $this->Document->HeadTag->SubElements[] = $JavaScript;
    95     $this->Document->TitleTag->SubElements = $this->GlobalTitle; //.' - '.$this->Title;
    96     $this->Document->BodyTag->SubElements = array($this->TopMenu(), $this->PageMenu(), $Content, $this->Footer());
     111   
     112    $Title = $this->GlobalTitle;
     113    if($this->Title != '') $Title .= ' - '.$this->Title;
     114    $this->Document->TitleTag->SubElements = $Title;
     115    $Title = '<span class="GlobalTitle">'.$this->GlobalTitle.'</span>';
     116    if($this->Title != '') $Title .= ' - '.$this->Title;
     117
     118    $Keywords = new XMLTag('meta');   
     119    $Keywords->Attributes = array('name' => 'keywords', 'content' => implode(',', $this->Keywords));
     120    $Keywords->ShringEmpty = false;
     121    $this->Document->HeadTag->SubElements[] = $Keywords;
     122   
     123    $this->Document->BodyTag->SubElements = array('<div class="Title">'.$Title.'</div>',
     124$this->TopMenu(), $this->PageMenu(), $Content, $this->Footer());
    97125    echo($this->Document->GetOutput());
    98126  }
Note: See TracChangeset for help on using the changeset viewer.