Changeset 251


Ignore:
Timestamp:
Oct 2, 2009, 7:12:57 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Podpora pro více grafických stylů. Úprava výchozího stylu.
  • Přidáno: Import RSS aktualit zpravodajství TV Beskyd.
Location:
trunk
Files:
18 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/aktuality/news.php

    r236 r251  
    107107      foreach($this->NewsSetting as $Index => $this->NewSetting)
    108108      {
    109         $this->NewsSetting[$Index] = array_merge($this->NewSetting, $NewsSettingCookie[$Index]);
     109        if(array_key_exists($Index, $NewsSettingCookie))
     110          $this->NewsSetting[$Index] = array_merge($this->NewSetting, $NewsSettingCookie[$Index]);
    110111      }
    111112    }
     
    114115  function Show()
    115116  {
    116     $Output = '<div class="PanelTitle"><span class="MenuItem">Aktuálně</span><span class="MenuItem2"><a href="?Action=CustomizeNews">Upravit</a></span></div>';
     117    $Output = '';
    117118
    118119    $UploadedFilesFolder = 'aktuality/uploads/';
  • trunk/config.sample.php

    r237 r251  
    1414  'Web' => array
    1515  (
     16    'Style' => 'simple',
    1617    'FormatHTML' => false,
    1718    'Charset' => 'utf-8',
  • trunk/index.php

    r246 r251  
    5656    ),
    5757    'usefull' => array('Užitečné',
    58       array('Mapa ČR', 'http://www.mapy.cz/', ''),
     58      array('Mapa ČR', 'http://www.mapy.cz/', 'www_mapy_cz.ico'),
    5959      array('Online TV', 'http://www.tvinfo.cz/live/televize/evropa/cz', 'www_tvinfo_cz.gif'),
    6060      array('Jízdní řády', 'http://jizdnirady.idnes.cz/', 'www_idos_cz.gif'),
    6161      array('TV programy', 'http://tv.atlas.cz/', 'www_atlas_cz.gif'),
    6262      array('ICQ', 'javascript:openClient(\'flash\')', 'www_icq_com.gif'),
    63       array('Slovníky', 'http://www.slovnik.cz/', ''),
     63      array('Slovníky', 'http://www.slovnik.cz/', 'www_slovnik_cz.ico'),
    6464      array('Počasí', 'http://www.meteopress.cz/', 'pocasi.gif'),
    6565      array('T-Mobile SMS', 'http://www.tzones.cz/', 'www_tzones_cz.gif'),
     
    9292    //{
    9393      $Title = array_shift($LinkGroup);
    94       $Result .= '<div class="PanelTitle">'.$Title.'</div>';
     94      //$Result .= '<h3>'.$Title.'</h3>';
    9595      foreach($LinkGroup as $Link)
    9696      {
     
    102102      }
    103103    //}
    104     return($Result);
     104    return($this->Panel($Title, $Result));
    105105  }
    106106
     
    154154  function UserPanel()
    155155  {
    156     $Output = '<div class="PanelTitle">Nabídka uživatele:</div>'.
    157     '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení uživatele</a><br />';
     156    $Output = '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení uživatele</a><br />';
    158157    if($this->System->Modules['User']->CheckPermission('Finance', 'MemberOptions'))
    159158      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'?Action=MemberOptions">Nastavení domácnosti</a><br />';
     
    175174  function WebcamPanel()
    176175  {
    177     $Output = '<div class="PanelTitle">Webkamery</div>';
    178     $Output .= $this->System->Modules['Webcam']->ShowImage();
     176    $Output = $this->System->Modules['Webcam']->ShowImage();
    179177    return($Output);
    180178  }
     
    182180  function OnlineHostList()
    183181  {
    184     $Output = '<div class="PanelTitle">Online počítače</div><span style="font-size: smaller;">';
     182    $Output = '<span style="font-size: smaller;">';
    185183    $DbResult = $this->Database->query('SELECT NetworkDevice.Name FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1) ORDER BY NetworkDevice.Name');
    186184    while($Device = $DbResult->fetch_array())
     
    221219    $Uptime = str_replace('min,', 'minut', $Uptime);
    222220    return($Uptime);
     221  }
     222 
     223  function Panel($Title, $Content, $Menu = array())
     224  {
     225    if(count($Menu) > 0)
     226      foreach($Menu as $Item)
     227        $Title .= '<div class="dbTopMenu"><div class="active">'.$Item.'</div></div>';
     228    return('<div class="disignBoxFirst"><div class="boxFirstHeader">'.$Title.'</div><div class="boxContent">'.$Content.'</div></div>');
     229    //return('<div class="Panel"><div><div><div><h3>'.$Title.'</h3>'.$Content.'</div></div></div></div>');
    223230  }
    224231
     
    365372    //$Output .= $this->InfoBar();
    366373    $Output .= '<table id="MainTable"><tr><td valign="top">';
    367     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['main']).'</div>';
    368     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['hosted']).'</div>';
     374    $Output .= $this->ShowLinks($this->Links['main']);
     375    $Output .= $this->ShowLinks($this->Links['hosted']);
    369376    $Output .= '</td><td valign="top">';
    370     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['search']).'</div>';
    371     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['usefull']).'</div>';
    372     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['fun']).'</div>';
    373     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['local']).'</div>';
    374     $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['citizen']).'</div>';
     377    $Output .= $this->ShowLinks($this->Links['search']);
     378    $Output .= $this->ShowLinks($this->Links['usefull']);
     379    $Output .= $this->ShowLinks($this->Links['fun']);
     380    $Output .= $this->ShowLinks($this->Links['local']);
     381    $Output .= $this->ShowLinks($this->Links['citizen']);
    375382    $Output .= '</td><td id="NewsColumn" valign="top">';
    376     $Output .= '<div class="Panel">'.$this->System->Modules['News']->Show().'</div>';
     383    $Output .= $this->Panel('Aktuality', $this->System->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>'));
    377384    $Output .= '</td><td valign="top">';
    378385    if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId)
    379     $Output .= '<div class="Panel">'.$this->UserPanel().'</div>';
    380     $Output .= '<div class="Panel">'.$this->WebcamPanel().'</div>';
    381     $Output .= '<div class="Panel">'.$this->OnlineHostList().'</div>';
     386    $Output .= $this->Panel('Nabídka uživatele', $this->UserPanel());
     387    $Output .= $this->Panel('Kamery', $this->WebcamPanel());
     388    $Output .= $this->Panel('Online počítače', $this->OnlineHostList());
    382389    $Output .= '<br />';
    383390    $Output .= '</td></tr></table>';
  • trunk/page.php

    r210 r251  
    133133    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'.
    134134    '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">'.
    135     '<head><link rel="stylesheet" href="'.$this->System->Config['Web']['RootFolder'].'/style.css" type="text/css" media="all" />'.
    136           '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->System->Config['Web']['Charset'].'" />'.
    137     '<script type="text/javascript" src="'.$this->System->Config['Web']['RootFolder'].'/global.js"></script>'.
     135    '<head><link rel="stylesheet" href="'.$this->System->Config['Web']['RootFolder'].'/style/'.$this->System->Config['Web']['Style'].'/style.css" type="text/css" media="all" />'.
     136    '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->System->Config['Web']['Charset'].'" />'.
     137    '<script type="text/javascript" src="'.$this->System->Config['Web']['RootFolder'].'/style/'.$this->System->Config['Web']['Style'].'/global.js"></script>'.
    138138    '<title>'.$this->System->Config['Web']['Title'].' - '.$Path.'</title>
    139139    </head><body'.$BodyParam.'>
     
    153153  function ShowFooter()
    154154  {
    155         global $ScriptTimeStart;
     155  global $ScriptTimeStart;
    156156    $Time = round(GetMicrotime() - $ScriptTimeStart, 2);
    157157    $Output = '<div id="Footer">
    158158   <i>| Správa webu: '.$this->System->Config['Web']['Admin'].' | e-mail: '.$this->System->Config['Web']['AdminEmail'].' |';
    159159    if($this->System->Config['Web']['ShowRuntimeInfo'] == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time').' s | Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B |';
    160         $Output .= '</i></div></body></html>';
     160  $Output .= '</i></div></body></html>';
    161161    return($Output);
    162162  }
     
    182182    {
    183183      $start = strpos($s, '<');
    184           $end = strpos($s, '>');
    185         if($start != 0)
    186         {
    187               $end = $start - 1;
    188               $start = 0;
    189             }
    190             $line = trim(substr($s, $start, $end + 1));
    191             if(strlen($line) > 0)
    192             if($line[0] == '<')
    193             {
    194             if($s[$start + 1] == '/')
    195               {
    196               $n = $n - 2;
    197                       $nn = $n;
    198               } else
    199               {
    200             if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);
    201                 else $cmd = substr($line, 1, strlen($line) - 2);
     184      $end = strpos($s, '>');
     185      if($start != 0)
     186      {
     187        $end = $start - 1;
     188        $start = 0;
     189      }
     190      $line = trim(substr($s, $start, $end + 1));
     191      if(strlen($line) > 0)
     192      if($line[0] == '<')
     193      {
     194        if($s[$start + 1] == '/')
     195        {
     196          $n = $n - 2;
     197          $nn = $n;
     198        } else
     199        {
     200          if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);
     201          else $cmd = substr($line, 1, strlen($line) - 2);
    202202          //echo('['.$cmd.']');
    203                       if(strpos($s, '</'.$cmd.'>')) $n = $n + 2;
    204               }   
    205             }// else $line = '['.$line.']';
     203          if(strpos($s, '</'.$cmd.'>')) $n = $n + 2;
     204        }   
     205      }// else $line = '['.$line.']';
    206206      //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));
    207             if($line != '') $out .= (str_repeat(' ', $nn).$line."\n");
    208             $s = substr($s, $end + 1, strlen($s));
    209             $nn = $n;
     207      if($line != '') $out .= (str_repeat(' ', $nn).$line."\n");
     208      $s = substr($s, $end + 1, strlen($s));
     209      $nn = $n;
    210210    }
    211211    return($out);
  • trunk/style.php

    r148 r251  
    11<?php
     2
    23include_once('global.php');
    34
     
    1617  global $Time_Start, $refresh, $Config, $User, $PathTree, $Database, $System;
    1718
    18   $Time_Start = GetMicrotime();         // Zjisti počáteční čas
     19  $Time_Start = GetMicrotime();   // Zjisti počáteční čas
    1920  $ScriptName = $_SERVER['SCRIPT_NAME'];
    2021  while(strpos($ScriptName, '//') !== false)
     
    135136
    136137  $Output = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?>'.
    137   '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'.
    138   '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'.
    139   '<head><link rel="stylesheet" href="'.$Config['Web']['RootFolder'].'/style.css" type="text/css" media="all" />'.
     138  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'.
     139  '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">'.
     140  '<head><link rel="stylesheet" href="'.$Config['Web']['RootFolder'].'/style/'.$Config['Web']['Style'].'/style.css" type="text/css" media="all" />'.
    140141  '<meta http-equiv="content-type" content="text/html; charset='.$Config['Web']['Charset'].'" />'.
    141   '<script type="text/javascript" src="'.$Config['Web']['RootFolder'].'/global.js"></script>'.
     142  '<script type="text/javascript" src="'.$Config['Web']['RootFolder'].'/style/'.$Config['Web']['Style'].'/global.js"></script>'.
    142143  '<title>'.$Config['Web']['Title'].' - '.$Path.'</title>
    143144  </head><body'.$BodyParam.'>
     
    163164}
    164165
    165 
    166166?>
Note: See TracChangeset for help on using the changeset viewer.