Changeset 137


Ignore:
Timestamp:
Jan 14, 2009, 7:38:30 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Ikony odkazů a soubor stylů a javaskriptů.
  • Přidáno: .htaccess pro přímé spouštění CGI z jiné složky web serveru.
  • Opraveno: Validace některých stránek na XHTML 1.0 strict.
  • Přidáno: Funkce pro pěkné formátování výstupního HTML kódu.
  • Přidáno: Zobrazení aktualit.
Location:
devel/web
Files:
68 added
7 edited

Legend:

Unmodified
Added
Removed
  • devel/web

    • Property svn:ignore
      •  

        old new  
        44backup
        55
        6 index
         6index.cgi
         7
         8index.compiled
  • devel/web/UCore.pas

    r135 r137  
    1919function HumanDate(Date: string): string;
    2020procedure RegisterPage(Name: string; Producer: TPageProducer);
     21function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer): string;
     22function StrRepeat(Data: string; Count: Integer): string;
     23function FormatOutput(Data: string): string;
    2124 
    2225type
     
    5255begin
    5356  Navigace := CgiEnvVar.RequestURI;
    54   Result := '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' +
    55     '<html><head>' +
    56     '  <meta http-equiv="Content-Language" content="cs">' +
    57     '  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' +
     57  Result := '<?xml version="1.0" encoding="utf-8"?>' +
     58    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' +
     59        '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' +
     60    '<head>' +
     61    '  <meta http-equiv="Content-Language" content="cs" />' +
     62    '  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' +
     63        '  <link rel="stylesheet" href="style/style.css" type="text/css" media="all" />' +
     64    '  <script type="text/javascript" src="style/global.js"></script>' +
    5865    '  <title>Centrála - ' + Path + '</title>' +
    59     '  </head><body style="font-family: sans-serif;">' +
    60     '<div style="padding: 3px; font-size: 20px; border-style: solid; border-color: blue; border-width: 1; background-color: #F0F0FF; margin-bottom: 4px;">' + Title + '</div>'+
    61     '<div style="border-style: solid; border-bottom-color: gray; border-width: 0 0 1 0; margin-bottom: 3px; padding-bottom: 2px;"><strong>Navigace &gt;&gt;</strong> ' + Navigace + '</div>';
     66    '  </head><body>' +
     67    '<div id="Title">' + Title + '</div>'+
     68    '<div class="Navigation"><strong>Navigace &gt;&gt;</strong> ' + Navigace + '</div>';
    6269end;
    6370
     
    6976  UpdateDate := '2.5.2007';
    7077  GenerateTime := '1 s';
    71   Result := '<div style="border-style: solid; border-top-color: gray; border-width: 1 0 0 0; margin-top: 7px; padding-top: 2px;" align="center">'+
    72 '  <i style="font-size: 10;">| Web mistr: Jiří Hajda | e-mail: robie@centrum.cz | ICQ: 277158770 | Vygenerováno za ' + GenerateTime + ' s | Verze: 1.0 | Naposledy aktualizováno: ' + UpdateDate + ' |</i>'+
    73 '  </div>';
     78  Result := '<div id="Footer">| Web mistr: Jiří Hajda | e-mail: robie@centrum.cz | ICQ: 277158770 | Vygenerováno za ' + GenerateTime + ' s | Verze: 1.0 | Naposledy aktualizováno: ' + UpdateDate + ' |' +
     79    '</div>';
    7480  //ShowArray($GLOBALS);
    7581  Result := Result + '</body></html>';
     
    102108function InsertIcon(FileName: string): string;
    103109begin
    104   Result := '<img alt="" src="/dev/centrala/www/images/favicons/' + FileName + '" width="16" height="16">';
     110  Result := '<img alt="" src="images/favicons/' + FileName + '" width="16" height="16" />';
    105111end;
    106112
     
    126132end;
    127133
     134function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer): string;
     135const
     136  Around: Integer = 10;
     137var
     138  Count: Integer;
     139  PagesMax: Integer;
     140  PagesMin: Integer;
     141  I: Integer;
     142begin
     143  Count := Round(TotalCount / CountPerPage);
     144  Result := '';
     145  if Count > 1 then begin
     146    if Page > 0 then begin
     147      Result := Result + '<a href="' + URL + '0">&lt;&lt;</a> ';
     148      Result := Result + '<a href="' + URL + IntToStr(Page - 1) + '">&lt;</a> ';
     149    end;
     150    PagesMax := Count - 1;
     151    PagesMin := 0;
     152    if PagesMax > (Page + Around) then PagesMax := Page + Around;
     153    if PagesMin < (Page - Around) then begin
     154      Result := Result + ' .. ';
     155      PagesMin := Page - Around;
     156    end;
     157    for I := PagesMin to PagesMax do begin
     158      if I = Page then Result := Result + '<strong>';
     159      Result := Result + '<a href="' + URL + IntToStr(I) + '">' + IntToStr(I + 1) + '</a> ';
     160      if I = Page then Result := Result + '</strong>';
     161    end;
     162    if PagesMax < (Count - 1) then Result := Result + ' .. ';
     163    if Page < (Count - 1) then begin
     164      Result := Result + '<a href="' + URL + IntToStr(Page + 1) + '">&gt;</a> ';
     165      Result := Result + '<a href="' + URL + IntToStr(Count - 1) + '">&gt;&gt;</a>';
     166    end;
     167  end;
     168end;
     169
     170function StrRepeat(Data: string; Count: Integer): string;
     171var
     172  I: Integer;
     173begin 
     174  Result := '';
     175  for I := 1 to Count do
     176    Result := Result + Data;
     177end;
     178
     179function FormatOutput(Data: string): string;
     180var
     181  BlockStart, BlockEnd: Integer;
     182  Indention: Integer;
     183  Indention2: Integer;
     184  Line: string;
     185  Command: string;
     186begin
     187  Result := '';
     188  Indention := 0;
     189  Indention2 := 0;
     190  while Data <> '' do begin
     191    //WebWrite('.');
     192    BlockStart := Pos('<', Data);
     193        BlockEnd := Pos('>', Data);
     194    if BlockStart > 1 then begin
     195          BlockEnd := BlockStart - 1;
     196          BlockStart := 1;
     197        end;
     198        Line := Trim(Copy(Data, BlockStart, BlockEnd));
     199        //WebWriteLn(Line);
     200        if Length(Line) > 0 then
     201          if Line[1] = '<' then begin
     202            if Data[BlockStart + 1] = '/' then begin
     203              Indention := Indention - 2;
     204              Indention2 := Indention;
     205            end else begin
     206          if Pos(' ', Line) > 0 then Command := Copy(Line, 2, Pos(' ', Line) - 2)
     207                else Command := Copy(Line, 2, Length(Line) - 2);
     208                  //WebWriteLn(Command + ' ' + IntToStr(Indention));
     209          if Pos('</' + Command + '>', Data) > 0 then Indention := Indention + 2;
     210                  //WebWriteLn(IntToStr(Indention) + ',' + IntToStr(Indention2));
     211            end;   
     212          end;
     213          if Line <> '' then Result := Result + StrRepeat(' ', Indention2) + Line + #13#10;
     214          Data := Copy(Data, BlockEnd + 1, Length(Data));
     215          Indention2 := Indention;
     216  end;
     217end;
     218
    128219initialization
    129220
  • devel/web/UFinancePage.pas

    r135 r137  
    1515begin
    1616  Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Finance');
    17   Result := Result + '<table><tr><td valign="top"><table><tr><td width="30%">' +
     17  Result := Result + '<table><tr><td valign="top"><table><tr><td>' +
    1818HtmlLink('Výpis zařízení', 'zarizeni.php') + '<br />' +
    19 HtmlLink('Seznam členů', 'clenove.php') + '<br />' +
     19HtmlLink('Seznam členů', '?p=finance-clenove') + '<br />' +
    2020HtmlLink('Spotřeba energie', 'spotreba.php') + '<br />' +
    2121HtmlLink('Investice v síti', '/aktuality/index.php?category=9') + '<br />' +
     
    2525HtmlLink('Výpis skladových zásob', 'inventory.php') + '<br />' +
    2626HtmlLink('Porovnání tarifů s konkurencí', 'srovnani.php') + '<br />' +
    27 '</td><td width="50%"></td></tr></table><br /><strong>Souhrn:</strong><br />Aktuální měsíční poplatek za společný internet (10240/10240 kbit/s):' +
     27'</td><td></td></tr></table><br /><strong>Souhrn:</strong><br />Aktuální měsíční poplatek za společný internet (10240/10240 kbit/s):' +
    2828' <strong>15351 Kč</strong><br />Počet členů (s internetem): <strong>79 (79)</strong><br />Celková cena zařízení sítě: <strong>106335 Kč</strong><br />Celkem peněz na účtech: <strong>' +
    2929'-14537 Kč</strong><br />Stanovená cena jedné kWh: <strong>3 Kč</strong><br />V připojených domácnostech celkem <strong>273</strong>' +
  • devel/web/UMainPage.pas

    r134 r137  
    2020  II: Integer;
    2121  Enclosures: TArrayOfString;
     22  Content: string;
    2223const
    2324  NewsCountPerCategory = 3;
    24   UploadedFilesFolder = 'aktuality/uploads/'; 
     25//  UploadedFilesFolder = 'aktuality/uploads/';
    2526begin
    2627//  global $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder;
     
    2829  DbRows := Database.Select('news_category', '*', 'id=' + IntToStr(Category));
    2930
    30   Result := '<table cellspacing="0" cellpadding="0" border="0" width="100%" style="font-size: small; padding-bottom: 5px;"><tr>'+
    31     '<td width="40%">' + DbRows[0].Values['caption'] + '</td><td width="80%" align="right">'+
    32     '<a href="aktuality/index.php?category=' + IntToStr(Category) + '">Zobrazit všechny aktuality</a>&nbsp;';
    33   if StrToInt(DbRows[0].Values['permission']) = 1 then Result := Result + '<a href="aktuality/index.php?action=add&amp;category=' + IntToStr(Category) + '">Přidat aktualitu</a>&nbsp;';
     31  Result := '<table class="MainTable"><tr>' +
     32    '<td>' + DbRows[0].Values['caption'] + '</td><td align="right">'+
     33    '<a href="?p=news-list&amp;category=' + IntToStr(Category) + '">Zobrazit všechny aktuality</a>&nbsp;';
     34  if StrToInt(DbRows[0].Values['permission']) = 1 then
     35    Result := Result + '<a href="aktuality/index.php?action=add&amp;category=' + IntToStr(Category) + '">Přidat aktualitu</a>&nbsp;';
    3436  Result := Result + '</td></tr><tr><td colspan="2">'+
    35     '<table cellspacing="0" width="100%" style="padding: 2px 2px 2px 2px; font-size: small; border-style: solid; border-color: red; border-width: 1; background-color: #FFF0F0;">';
     37    '<table>';
    3638  Index := 0;
    3739  FontSize := 12;
    3840  DbRows := Database.Select('news', '*', 'category=' + IntToStr(Category) + ' ORDER BY date DESC LIMIT 0,' + IntToStr(NewsCountPerCategory));
    3941  for I := 0 to DbRows.Count - 1 do with DbRows[I] do begin
    40     Result := Result + '<tr><td onmouseover="zobraz(''."''new".$Category.$Index."''".'')" style="cursor: pointer; margin: 0px;"><table cellspacing="0" cellpadding="0" style="padding: 0px; margin: 0px; font-size: small; color: red;" width="100%">'+
     42    Content := Values['content'];
     43    Content := StringReplace(Content, '<br>', '<br />', [rfReplaceAll]);
     44    Result := Result + '<tr><td onmouseover="zobraz(''new' + IntToStr(Category) + '_' + IntToStr(I) + ''')" style="cursor: pointer; margin: 0px;"><table cellspacing="0" cellpadding="0" style="padding: 0px; margin: 0px; font-size: small; color: red;" width="100%">'+
    4145      '<tr><td style="font-size: ' + IntToStr(FontSize) + 'pt"><strong>' + Values['title'] + '</strong></td>'+
    4246      '<td align="right" style="font-size: ' + IntToStr(FontSize) + 'pt">' + Values['author'] + ' (' + HumanDate(Values['date']) + ')</td></tr></table>'+
    43       '<div id="new' + IntToStr(Category) + IntToStr(Index) + '" class="skryty" style="display: none; border-width: 1; border-style: solid; border-color: blue; padding: 3px; font-size: 9pt;">' + Values['content'];
     47      '<div id="new' + IntToStr(Category) + '_' + IntToStr(Index) + '" class="skryty" style="display: none; border-width: 1; border-style: solid; border-color: blue; padding: 3px; font-size: 9pt;">' + Content;
    4448
    4549    if Values['enclosure'] <> '' then begin
    46       Result := Result + '<br>Přílohy: ';
     50      Result := Result + '<br />Přílohy: ';
    4751      Enclosures := Explode(';', Values['enclosure']);
    4852            for II := 0 to High(Enclosures) do begin
     
    6468begin
    6569  Output := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Rozcestní­k');
    66   Output := Output + '<script type="text/javascript">'+
    67     '<!--'+
    68     'function openClient(client_type)'+
    69     '{'+
    70     'if(client_type=="java")clientWindow = window.open("http://go.icq.com/icq2go/web.html","ICQ2Go","left=20,top=20,width=156,height=446,toolbar=0,resizable=0");'+
    71     'else clientWindow = window.open("http://go.icq.com/icq2go/flicq.html","ICQ2Go","left=20,top=20,width=176,height=441,toolbar=0,resizable=0");'+
    72     '}'+
     70  Output := Output + '<table width="100%"><tr><td valign="top">' +
     71'<div class="Panel">' +
     72'<strong>Důležité odkazy:</strong><br />' +
     73InsertIcon('money.gif') + ' <a href="?p=finance">Finance</a><br />' +
     74InsertIcon('chart.gif') + ' <a href="?p=statistic">Statistika</a><br />' +
     75InsertIcon('prohledavac_sdileni.gif') + ' <a href="/share">Prohledat sdílení</a><br />' +
     76InsertIcon('comp.gif') + ' <a href="/userlist.php">Seznam uživatelů</a><br />' +
     77InsertIcon('comp.gif') + ' <a href="/hostlist.php">Seznam počítačů</a><br />' +
     78InsertIcon('sunrisechat.gif') + ' <a href="/sunrisechat/history.php">Historie SunriseChatu</a><br />' +
     79InsertIcon('sunrisechat.gif') + ' <a href="/sunrisechat/webchat.php">Webový SunriseChatu</a><br />' +
     80InsertIcon('discus.gif') + ' <a href="/forum">Diskusní fórum</a><br />' +
     81InsertIcon('openwebmail.gif') + ' <a href="https://centrala.zdechov.net/cgi-bin/openwebmail/openwebmail.pl">WebMail</a><br />' +
     82InsertIcon('apple.gif') + ' <a href="/jidelna">Jídelníček</a><br />' +
     83InsertIcon('clear.gif') + ' <a href="http://tv.zdechov.net/">Televize</a><br />' +
     84InsertIcon('cube.gif') + ' <a href="http://game-server.zdechov.net/">Herní server</a><br />' +
     85InsertIcon('cfix.gif') + ' <a href="/farnost">Rozpis mší</a><br />' +
     86InsertIcon('tel.gif') + ' <a href="/telseznam.php">Telefonní seznam</a><br />' +
     87InsertIcon('pripoj.gif') + ' <a href="/nabidky_pripojeni.php">Nabídky připojení</a><br />' +
     88InsertIcon('zapisy.gif') + ' <a href="/docs/zapisy/zapisy.php">Zápisy ze schůzí</a><br />' +
     89InsertIcon('lear.gif') + ' <a href="/mapy/mapa.php">Mapa Zděchova</a><br />' +
     90InsertIcon('otv_doby.gif') + '<a href="/otevreno.php">Otvírací doby</a><br />' +
     91InsertIcon('topologie.gif') + ' <a href="/is/topologie.php">Topologie sítě</a><br />' +
     92InsertIcon('satellite.gif') + ' <a href="/is/dostupnost.php">Dostupnost sítě</a><br />' +
     93InsertIcon('tech.gif') + ' <a href="/network.php">Technické informace</a><br />' +
     94InsertIcon('socer.gif') + ' <a href="http://fotbal.zdechov.net/">Fotbal Sokol Zděchov</a><br />' +
     95'</div><div class="Panel">' +
     96'<strong>Další odkazy:</strong><br />' +
     97InsertIcon('tv.gif') + ' <a href="/tkr.php">Kanály kabelovky</a><br />' +
     98InsertIcon('clear.gif') + ' <a href="/mapy/mapa_nabidka.php">Nabídka mapy</a><br />' +
     99InsertIcon('clear.gif') + ' <a href="/history.php">Historie sítě</a><br />' +
     100InsertIcon('electric.gif') + ' <a href="/merak.php">Měřič spotřeby</a><br />' +
     101InsertIcon('clear.gif') + ' <a href="/ukoly.php">Plány do budoucna</a><br />' +
     102InsertIcon('clear.gif') + ' <a href="/navody.php">Návody</a><br />' +
     103InsertIcon('info.gif') + ' <a href="/infokanal/index.htm">Infokanál</a><br />' +
     104InsertIcon('progman.gif') + ' <a href="/manualy.php">Programátorské manuály</a><br />' +
     105'</div></td><td valign="top">' +
     106'<div class="Panel">' +
     107'<strong>Vyhledávání:</strong><br />'+
     108InsertIcon('www_google_com.gif') + ' <a href="http://www.google.cz/">Google</a><br />' +
     109InsertIcon('morfeo.png') + ' <a href="http://morfeo.centrum.cz">Morfeo</a><br />' +
     110InsertIcon('www_centrum_cz.gif') + '<a href="http://www.centrum.cz">Centrum</a><br />' +
     111InsertIcon('www_seznam_cz.gif') + ' <a href="http://www.seznam.cz">Seznam</a><br />' +
     112InsertIcon('www_atlas_cz.gif') + ' <a href="http://www.atlas.cz">Atlas</a><br />' +
     113InsertIcon('www_tiscali_cz.gif') + ' <a href="http://www.tiscali.cz">Tiscali</a><br />' +
     114'</div><div class="Panel">' +
     115'<strong>Užitečné:</strong><br />'+
     116InsertIcon('clear.gif') + ' <a href="http://www.zdechov.net">Stránky naší sítě</a><br />' +
     117InsertIcon('www_tvinfo_cz.gif') + ' <a href="http://www.tvinfo.cz/live/televize/cz">Online TV</a><br />' +
     118InsertIcon('www_idos_cz.gif') + ' <a href="http://www.idos.cz/ConnForm.asp?tt=c">Jízdní řády</a><br />' +
     119InsertIcon('www_atlas_cz.gif') + ' <a href="http://tv.atlas.cz">TV programy</a><br />' +
     120InsertIcon('www_icq_com.gif') + ' Web ICQ <a href="javascript:openClient(''flash'')">Flash</a>&nbsp;<a href="javascript:openClient(''java'')">Java</a><br />' +
     121InsertIcon('www_centrum_cz.gif') + ' <a href="http://slovniky.centrum.cz">Slovníky</a><br />' +
     122InsertIcon('pocasi.gif') + ' <a href="http://www.meteopress.cz/">Počasí</a><br />' +
     123InsertIcon('www_tzones_cz.gif') + ' <a href="http://www.tzones.cz/">T-Mobile SMS</a><br />' +
     124InsertIcon('www_mvk_cz.png') + ' <a href="http://www.mvk.cz/">Knihovna&nbsp;Vsetín</a><br />' +
     125'</div><div class="Panel">' +
     126'<strong>Prodej počítačů:</strong><br />'+
     127InsertIcon('www_computershop_cz.png') + ' <a href="http://shop.computershop.cz/eshop/">SOFTCOM</a><br />' +
     128InsertIcon('www_alfacomp_cz.gif') + ' <a href="http://www.alfacomp.cz/php/zbozi.php?akc=2">Alfacomp</a><br />' +
     129InsertIcon('www_petracomp_cz.png') + ' <a href="http://www.petracomp.cz/">Petracomp</a><br />' +
     130InsertIcon('www_tsbohemia_cz.png') + ' <a href="http://interlink.tsbohemia.cz/">TS Bohemia</a><br />' +
     131'</div></td><td valign="top">' +
     132'<div class="Panel">';
    73133
    74 'var predchozi = ''first'';'+
    75 ''+
    76 'function zobraz(idecko)'+
    77 '{'+
    78 '  skryj(predchozi);'+
    79   'el=document.getElementById(idecko).style;'+
    80   '  el.display=''block'';'+
    81   'predchozi = idecko;'+
    82   '}'+
    83 ''+
    84 'function skryj(idecko)'+
    85 '{'+
    86   'if(idecko != ''first'')'+
    87   '{'+
    88   '  el=document.getElementById(idecko).style;'+
    89   '  el.display=''none'';'+
    90   '}'+
    91 '}'+
    92 '//-->'+
    93 '</script>'+
    94 ''+
    95 '<table width="100%"><tr><td valign="top">' +
    96 '<table width="100%">' +
    97 '<tr><td width="20%" valign="top">' +
    98 '<strong>Důležité odkazy:</strong><br>' +
    99 InsertIcon('money.gif') + ' <a href="?p=finance">Finance</a><br>' +
    100 InsertIcon('chart.gif') + ' <a href="?p=statistic">Statistika</a><br>' +
    101 InsertIcon('prohledavac_sdileni.gif') + ' <a href="/share">Prohledat sdílení</a><br>' +
    102 InsertIcon('comp.gif') + ' <a href="/userlist.php">Seznam uživatelů</a><br>' +
    103 InsertIcon('comp.gif') + ' <a href="/hostlist.php">Seznam počítačù</a><br>' +
    104 InsertIcon('sunrisechat.gif') + ' <a href="/sunrisechat/history.php">Historie SunriseChatu</a><br>' +
    105 InsertIcon('sunrisechat.gif') + ' <a href="/sunrisechat/webchat.php">Webový SunriseChatu</a><br>' +
    106 InsertIcon('discus.gif') + ' <a href="/forum">Diskusní fórum</a><br>' +
    107 InsertIcon('openwebmail.gif') + ' <a href="https://centrala.zdechov.net/cgi-bin/openwebmail/openwebmail.pl">WebMail</a><br>' +
    108 InsertIcon('apple.gif') + ' <a href="/jidelna">Jídelníček</a><br>' +
    109 InsertIcon('clear.gif') + ' <a href="http://tv.zdechov.net/">Televize</a><br>' +
    110 InsertIcon('cube.gif') + ' <a href="http://game-server.zdechov.net/">Herní server</a><br>' +
    111 InsertIcon('cfix.gif') + ' <a href="/farnost">Rozpis mší</a><br>' +
    112 InsertIcon('tel.gif') + ' <a href="/telseznam.php">Telefonní seznam</a><br>' +
    113 InsertIcon('pripoj.gif') + ' <a href="/nabidky_pripojeni.php">Nabídky připojení</a><br>' +
    114 InsertIcon('zapisy.gif') + ' <a href="/docs/zapisy/zapisy.php">Zápisy ze schůzí</a><br>' +
    115 InsertIcon('lear.gif') + ' <a href="/mapy/mapa.php">Mapa Zděchova</a><br>' +
    116 InsertIcon('otv_doby.gif') + '<a href="/otevreno.php">Otvírací doby</a><br>' +
    117 InsertIcon('topologie.gif') + ' <a href="/is/topologie.php">Topologie sítě</a><br>' +
    118 InsertIcon('satellite.gif') + ' <a href="/is/dostupnost.php">Dostupnost sítě</a><br>' +
    119 InsertIcon('tech.gif') + ' <a href="/network.php">Technické informace</a><br>' +
    120 InsertIcon('socer.gif') + ' <a href="http://fotbal.zdechov.net/">Fotbal Sokol Zděchov</a><br>' +
    121 '<br>' +
    122 '<strong>Další odkazy:</strong><br>' +
    123 InsertIcon('tv.gif') + ' <a href="/tkr.php">Kanály kabelovky</a><br>'+
    124 InsertIcon('clear.gif') + ' <a href="/mapy/mapa_nabidka.php">Nabídka mapy</a><br>'+
    125 InsertIcon('clear.gif') + ' <a href="/history.php">Historie sítě</a><br>'+
    126 InsertIcon('electric.gif') + ' <a href="/merak.php">Měřič spotřeby</a><br>'+
    127 InsertIcon('clear.gif') + ' <a href="/sluzby.php">Seznam služeb</a><br>'+
    128 InsertIcon('clear.gif') + ' <a href="/ukoly.php">Plány do budoucna</a><br>'+
    129 InsertIcon('clear.gif') + ' <a href="/navody.php">Návody</a><br>'+
    130 InsertIcon('info.gif') + ' <a href="/infokanal/index.htm">Infokanál</a><br>'+
    131 InsertIcon('progman.gif') + ' <a href="/manualy.php">Programátorské manuály</a><br>'+
    132 '<br>'+
    133 '</td><td width="13%" valign="top">'+
    134 '<strong>Vyhledávání:</strong><br>'+
    135 InsertIcon('www_google_com.gif') + ' <a href="http://www.google.cz/">Google</a><br>'+
    136 InsertIcon('morfeo.png') + ' <a href="http://morfeo.centrum.cz">Morfeo</a><br>'+
    137 InsertIcon('www_centrum_cz.gif"') + '<a href="http://www.centrum.cz">Centrum</a><br>'+
    138 InsertIcon('www_seznam_cz.gif') + ' <a href="http://www.seznam.cz">Seznam</a><br>'+
    139 InsertIcon('www_atlas_cz.gif') + ' <a href="http://www.atlas.cz">Atlas</a><br>'+
    140 InsertIcon('www_tiscali_cz.gif') + ' <a href="http://www.tiscali.cz">Tiscali</a><br>'+
    141 '<br>'+
    142 '<strong>Užitečné:</strong><br>'+
    143 InsertIcon('clear.gif') + ' <a href="http://www.zdechov.net">Stránky naší sítě</a><br>'+
    144 InsertIcon('www_tvinfo_cz.gif') + ' <a href="http://www.tvinfo.cz/live/televize/cz">Online TV</a><br>'+
    145 InsertIcon('www_idos_cz.gif') + ' <a href="http://www.idos.cz/ConnForm.asp?tt=c">Jízdní řády</a><br>'+
    146 InsertIcon('www_atlas_cz.gif') + ' <a href="http://tv.atlas.cz">TV programy</a><br>'+
    147 InsertIcon('www_icq_com.gif') + ' Web ICQ <a href="javascript:openClient(''flash'')">Flash</a>&nbsp;<a href="javascript:openClient(''java'')">Java</a><br>'+
    148 InsertIcon('www_centrum_cz.gif') + ' <a href="http://slovniky.centrum.cz">Slovníky</a><br>'+
    149 InsertIcon('pocasi.gif') + ' <a href="http://www.meteopress.cz/">Počasí</a><br>'+
    150 InsertIcon('www_tzones_cz.gif') + ' <a href="http://www.tzones.cz/">T-Mobile SMS</a><br>'+
    151 InsertIcon('www_mvk_cz.png') + ' <a href="http://www.mvk.cz/">Knihovna&nbsp;Vsetín</a><br>'+
    152 '<br>'+
    153 '<strong>Prodej počítačů:</strong><br>'+
    154 InsertIcon('www_computershop_cz.png') + ' <a href="http://shop.computershop.cz/eshop/">SOFTCOM</a><br>'+
    155 InsertIcon('www_alfacomp_cz.gif') + ' <a href="http://www.alfacomp.cz/php/zbozi.php?akc=2">Alfacomp</a><br>'+
    156 InsertIcon('www_petracomp_cz.png') + ' <a href="http://www.petracomp.cz/">Petracomp</a><br>'+
    157 InsertIcon('www_tsbohemia_cz.png') + ' <a href="http://interlink.tsbohemia.cz/">TS Bohemia</a><br>'+
    158 '<br>' +
    159 '</td>' +
    160 '<td width="15%" valign="top">';
    161134  // Zobrazení seznamu online poèítaèù
    162   Output := Output + '<strong>Online počítače:</strong><br><span style="font-size: smaller;">';
     135  Output := Output + '<strong>Online počítače:</strong><br /><span style="font-size: smaller;">';
    163136  DbRows := Database.Select('hosts', 'name', 'online=1 AND show_online=1 ORDER BY name');
    164137  for I := 0 to DbRows.Count - 1 do with DbRows[I] do begin
    165     Output := Output + Values['name'] + '<br>';
     138    Output := Output + Values['name'] + '<br />';
    166139  end;
    167140  DbRows.Free;
    168   Output := Output + '</span><br>';
     141  Output := Output + '</span><br />';
    169142
    170   // Zobrazení seznamu dlu¾níkù
    171   Output := Output + '<strong>Dlužníci:</strong><br><span style="font-size: smaller;">';
     143  (*
     144  // Zobrazení seznamu dlužníkù
     145  Output := Output + '<strong>Dlužníci:</strong><br /><span style="font-size: smaller;">';
    172146  DbRows := Database.Select('users', 'fullname', 'cash<0 ORDER BY cash');
    173147  for I := 0 to DbRows.Count - 1 do with DbRows[I] do begin
    174     Output := Output + Values['fullname'] + '<br>';
     148    Output := Output + Values['fullname'] + '<br />';
    175149  end;
    176150  DbRows.Free;
    177151  Output := Output + '</span>';
    178152  Output := Output + '</td></tr></table>';
    179 
    180  (*
     153  *)
     154 
     155  (*
    181156  // Zobrazení èasu bìhu poèítaèe
    182157  Data = explode(' ', exec('uptime'));
     
    196171echo('Server bì¾í '.$Uptime);
    197172*)
    198   Output := Output + '</td><td width="50%" valign="top" style="font-size: smaller;">';
     173  Output := Output + '</div></td><td valign="top">';
    199174 
    200175(* 
     
    208183*)
    209184
    210   Output := Output + '<div onmouseout="skryj(predchozi)">'+ ShowNews(5) + ShowNews(3) + ShowNews(1) + ShowNews(2) + ShowNews(4) + ShowNews(6) + ShowNews(8) + ShowNews(9) + ShowNews(10);
     185  Output := Output + '<div onmouseout="skryj(predchozi)">' + ShowNews(5) + ShowNews(3) + ShowNews(1) + ShowNews(2) + ShowNews(4) + ShowNews(6) + ShowNews(8) + ShowNews(9) + ShowNews(10);
    211186
    212   Output := Output + '<a href="aktuality/subscription.php"><img style="margin: 0px 0px 0px 0px;" border="0" src="images/rss20.png" alt="Aktuality pøes RSS"></a>  <a href="aktuality/subscription.php">Automatické sledování novinek</a>'+
     187  Output := Output + '<a href="aktuality/subscription.php"><img src="images/rss20.png" alt="Aktuality přes RSS" /></a>  <a href="aktuality/subscription.php">Automatické sledování novinek</a>'+
    213188  '</div></td></tr></table>';
    214189  Output := Output + ShowFooter;
  • devel/web/deploy.sh

    r134 r137  
    88-Xs -XX -CX index.pas
    99
    10 cp index /var/www/cgi-bin/index.cgi
     10mv index index.cgi
  • devel/web/index.lpi

    r134 r137  
    1313      <IconPath Value="./"/>
    1414      <TargetFileExt Value=".exe"/>
    15       <ActiveEditorIndexAtStart Value="1"/>
     15      <ActiveEditorIndexAtStart Value="2"/>
    1616    </General>
    1717    <VersionInfo>
    1818      <ProjectVersion Value=""/>
    19       <Language Value=""/>
    20       <CharSet Value=""/>
    2119    </VersionInfo>
    2220    <PublishOptions>
     
    3230      </local>
    3331    </RunParams>
    34     <Units Count="3">
     32    <Units Count="13">
    3533      <Unit0>
    3634        <Filename Value="index.pas"/>
    3735        <IsPartOfProject Value="True"/>
    3836        <UnitName Value="Hello"/>
    39         <CursorPos X="8" Y="6"/>
     37        <CursorPos X="43" Y="16"/>
    4038        <TopLine Value="1"/>
    41         <EditorIndex Value="0"/>
    42         <UsageCount Value="20"/>
     39        <EditorIndex Value="1"/>
     40        <UsageCount Value="21"/>
    4341        <Loaded Value="True"/>
    4442      </Unit0>
     
    4745        <IsPartOfProject Value="True"/>
    4846        <UnitName Value="UMainPage"/>
    49         <CursorPos X="1" Y="1"/>
    50         <TopLine Value="1"/>
     47        <CursorPos X="32" Y="33"/>
     48        <TopLine Value="28"/>
    5149        <EditorIndex Value="2"/>
    52         <UsageCount Value="20"/>
     50        <UsageCount Value="21"/>
    5351        <Loaded Value="True"/>
    5452      </Unit1>
    5553      <Unit2>
    5654        <Filename Value="USqlDatabase.pas"/>
     55        <IsPartOfProject Value="True"/>
    5756        <UnitName Value="USqlDatabase"/>
    58         <CursorPos X="22" Y="8"/>
     57        <CursorPos X="47" Y="96"/>
     58        <TopLine Value="79"/>
     59        <EditorIndex Value="0"/>
     60        <UsageCount Value="21"/>
     61        <Loaded Value="True"/>
     62      </Unit2>
     63      <Unit3>
     64        <Filename Value="UXmlClasses.pas"/>
     65        <IsPartOfProject Value="True"/>
     66        <UsageCount Value="21"/>
     67      </Unit3>
     68      <Unit4>
     69        <Filename Value="UCore.pas"/>
     70        <IsPartOfProject Value="True"/>
     71        <UnitName Value="UCore"/>
     72        <CursorPos X="38" Y="79"/>
     73        <TopLine Value="61"/>
     74        <EditorIndex Value="4"/>
     75        <UsageCount Value="21"/>
     76        <Loaded Value="True"/>
     77      </Unit4>
     78      <Unit5>
     79        <Filename Value="UFinance.pas"/>
     80        <IsPartOfProject Value="True"/>
     81        <UnitName Value="UFinance"/>
     82        <CursorPos X="1" Y="1"/>
     83        <TopLine Value="81"/>
     84        <EditorIndex Value="3"/>
     85        <UsageCount Value="21"/>
     86        <Loaded Value="True"/>
     87      </Unit5>
     88      <Unit6>
     89        <Filename Value="UFinancePage.pas"/>
     90        <IsPartOfProject Value="True"/>
     91        <UnitName Value="UFinancePage"/>
     92        <CursorPos X="45" Y="19"/>
     93        <TopLine Value="10"/>
     94        <EditorIndex Value="6"/>
     95        <UsageCount Value="21"/>
     96        <Loaded Value="True"/>
     97      </Unit6>
     98      <Unit7>
     99        <Filename Value="UHtmlClasses.pas"/>
     100        <IsPartOfProject Value="True"/>
     101        <UnitName Value="UHtmlClasses"/>
     102        <CursorPos X="1" Y="1"/>
    59103        <TopLine Value="1"/>
    60         <EditorIndex Value="1"/>
     104        <EditorIndex Value="5"/>
     105        <UsageCount Value="21"/>
     106        <Loaded Value="True"/>
     107      </Unit7>
     108      <Unit8>
     109        <Filename Value="UNews.pas"/>
     110        <IsPartOfProject Value="True"/>
     111        <UnitName Value="UNews"/>
     112        <CursorPos X="5" Y="40"/>
     113        <TopLine Value="8"/>
     114        <EditorIndex Value="8"/>
     115        <UsageCount Value="21"/>
     116        <Loaded Value="True"/>
     117      </Unit8>
     118      <Unit9>
     119        <Filename Value="UNewsPage.pas"/>
     120        <IsPartOfProject Value="True"/>
     121        <UnitName Value="UNewsPage"/>
     122        <CursorPos X="38" Y="100"/>
     123        <TopLine Value="82"/>
     124        <EditorIndex Value="7"/>
     125        <UsageCount Value="21"/>
     126        <Loaded Value="True"/>
     127      </Unit9>
     128      <Unit10>
     129        <Filename Value="../../../../../../../usr/share/fpcsrc/rtl/unix/sysutils.pp"/>
     130        <UnitName Value="sysutils"/>
     131        <CursorPos X="10" Y="94"/>
     132        <TopLine Value="81"/>
    61133        <UsageCount Value="10"/>
    62         <Loaded Value="True"/>
    63       </Unit2>
     134      </Unit10>
     135      <Unit11>
     136        <Filename Value="../../../../../../../usr/share/fpcsrc/rtl/objpas/sysutils/sysutils.inc"/>
     137        <CursorPos X="26" Y="17"/>
     138        <TopLine Value="121"/>
     139        <UsageCount Value="10"/>
     140      </Unit11>
     141      <Unit12>
     142        <Filename Value="../../../../../../../usr/share/fpcsrc/rtl/objpas/sysutils/sysstrh.inc"/>
     143        <CursorPos X="4" Y="33"/>
     144        <TopLine Value="18"/>
     145        <UsageCount Value="10"/>
     146      </Unit12>
    64147    </Units>
    65     <JumpHistory Count="2" HistoryIndex="1">
     148    <JumpHistory Count="28" HistoryIndex="27">
    66149      <Position1>
    67         <Filename Value="USqlDatabase.pas"/>
    68         <Caret Line="1" Column="1" TopLine="1"/>
     150        <Filename Value="UMainPage.pas"/>
     151        <Caret Line="89" Column="88" TopLine="73"/>
    69152      </Position1>
    70153      <Position2>
    71         <Filename Value="USqlDatabase.pas"/>
    72         <Caret Line="8" Column="27" TopLine="1"/>
     154        <Filename Value="UMainPage.pas"/>
     155        <Caret Line="90" Column="80" TopLine="74"/>
    73156      </Position2>
     157      <Position3>
     158        <Filename Value="UMainPage.pas"/>
     159        <Caret Line="91" Column="96" TopLine="75"/>
     160      </Position3>
     161      <Position4>
     162        <Filename Value="UMainPage.pas"/>
     163        <Caret Line="93" Column="39" TopLine="77"/>
     164      </Position4>
     165      <Position5>
     166        <Filename Value="UMainPage.pas"/>
     167        <Caret Line="94" Column="71" TopLine="78"/>
     168      </Position5>
     169      <Position6>
     170        <Filename Value="UMainPage.pas"/>
     171        <Caret Line="95" Column="84" TopLine="79"/>
     172      </Position6>
     173      <Position7>
     174        <Filename Value="UMainPage.pas"/>
     175        <Caret Line="96" Column="76" TopLine="80"/>
     176      </Position7>
     177      <Position8>
     178        <Filename Value="UMainPage.pas"/>
     179        <Caret Line="97" Column="80" TopLine="81"/>
     180      </Position8>
     181      <Position9>
     182        <Filename Value="UMainPage.pas"/>
     183        <Caret Line="98" Column="77" TopLine="82"/>
     184      </Position9>
     185      <Position10>
     186        <Filename Value="UMainPage.pas"/>
     187        <Caret Line="106" Column="88" TopLine="83"/>
     188      </Position10>
     189      <Position11>
     190        <Filename Value="UMainPage.pas"/>
     191        <Caret Line="124" Column="104" TopLine="103"/>
     192      </Position11>
     193      <Position12>
     194        <Filename Value="UMainPage.pas"/>
     195        <Caret Line="132" Column="64" TopLine="116"/>
     196      </Position12>
     197      <Position13>
     198        <Filename Value="UMainPage.pas"/>
     199        <Caret Line="135" Column="47" TopLine="119"/>
     200      </Position13>
     201      <Position14>
     202        <Filename Value="UMainPage.pas"/>
     203        <Caret Line="138" Column="35" TopLine="122"/>
     204      </Position14>
     205      <Position15>
     206        <Filename Value="UMainPage.pas"/>
     207        <Caret Line="142" Column="56" TopLine="126"/>
     208      </Position15>
     209      <Position16>
     210        <Filename Value="UMainPage.pas"/>
     211        <Caret Line="145" Column="51" TopLine="129"/>
     212      </Position16>
     213      <Position17>
     214        <Filename Value="UMainPage.pas"/>
     215        <Caret Line="24" Column="3" TopLine="8"/>
     216      </Position17>
     217      <Position18>
     218        <Filename Value="UMainPage.pas"/>
     219        <Caret Line="7" Column="48" TopLine="1"/>
     220      </Position18>
     221      <Position19>
     222        <Filename Value="UMainPage.pas"/>
     223        <Caret Line="104" Column="39" TopLine="89"/>
     224      </Position19>
     225      <Position20>
     226        <Filename Value="UMainPage.pas"/>
     227        <Caret Line="112" Column="36" TopLine="97"/>
     228      </Position20>
     229      <Position21>
     230        <Filename Value="UMainPage.pas"/>
     231        <Caret Line="123" Column="44" TopLine="108"/>
     232      </Position21>
     233      <Position22>
     234        <Filename Value="UMainPage.pas"/>
     235        <Caret Line="178" Column="36" TopLine="163"/>
     236      </Position22>
     237      <Position23>
     238        <Filename Value="UMainPage.pas"/>
     239        <Caret Line="3" Column="109" TopLine="1"/>
     240      </Position23>
     241      <Position24>
     242        <Filename Value="UMainPage.pas"/>
     243        <Caret Line="7" Column="93" TopLine="1"/>
     244      </Position24>
     245      <Position25>
     246        <Filename Value="UFinancePage.pas"/>
     247        <Caret Line="19" Column="21" TopLine="11"/>
     248      </Position25>
     249      <Position26>
     250        <Filename Value="UMainPage.pas"/>
     251        <Caret Line="12" Column="44" TopLine="1"/>
     252      </Position26>
     253      <Position27>
     254        <Filename Value="UMainPage.pas"/>
     255        <Caret Line="43" Column="23" TopLine="28"/>
     256      </Position27>
     257      <Position28>
     258        <Filename Value="UMainPage.pas"/>
     259        <Caret Line="43" Column="27" TopLine="28"/>
     260      </Position28>
    74261    </JumpHistory>
    75262  </ProjectOptions>
    76263  <CompilerOptions>
    77264    <Version Value="8"/>
     265    <Target>
     266      <Filename Value="index.cgi"/>
     267    </Target>
     268    <SearchPaths>
     269      <OtherUnitFiles Value="/var/www/html/other/powtils/extras/;/var/www/html/other/powtils/main/"/>
     270      <LCLWidgetType Value="gtk2"/>
     271    </SearchPaths>
     272    <Parsing>
     273      <SyntaxOptions>
     274        <CStyleOperator Value="False"/>
     275      </SyntaxOptions>
     276    </Parsing>
     277    <CodeGeneration>
     278      <SmartLinkUnit Value="True"/>
     279      <Checks>
     280        <IOChecks Value="True"/>
     281        <RangeChecks Value="True"/>
     282        <OverflowChecks Value="True"/>
     283        <StackChecks Value="True"/>
     284      </Checks>
     285      <VerifyObjMethodCallValidity Value="True"/>
     286    </CodeGeneration>
     287    <Linking>
     288      <LinkSmart Value="True"/>
     289    </Linking>
    78290    <Other>
    79291      <CompilerPath Value="$(CompPath)"/>
  • devel/web/index.pas

    r134 r137  
    55uses
    66  UCore, USqlDatabase, SysUtils, UMainPage, pwinit, pwmain,
    7   UFinancePage;
     7  UFinancePage, UNewsPage;
    88
    99var
     
    1414  SetHeader('Content-Type', 'text/html; charset=utf-8');
    1515  PageName := GetCgiVar('p');
    16   if PageName = '' then PageName := 'finance-clenove';
     16  if PageName = '' then PageName := 'index';
    1717  I := 0;
    1818  while (I < Length(Pages)) and (Pages[I].Name <> PageName) do Inc(I);
    1919  if I < Length(Pages) then Output := Pages[I].Producer
    2020    else Output := 'Stránka nenalezena';
    21   WebWriteLn(Output);
     21  WebWriteLn(FormatOutput(Output));
    2222end.
Note: See TracChangeset for help on using the changeset viewer.