Changeset 139


Ignore:
Timestamp:
Jan 16, 2009, 1:41:07 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazní aktualit na hlavní stránce.
  • Přidáno: Nástřel databázové objektové vrstvy.
Location:
devel/web
Files:
12 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • devel/web

    • Property svn:ignore
      •  

        old new  
        77
        88index.compiled
         9
         10UConfig.pas
  • devel/web/UCore.pas

    r137 r139  
    3636
    3737uses 
    38   pwenvvar, pwmain, SysUtils;
     38  pwenvvar, pwmain, SysUtils, UConfig;
    3939
    4040procedure RegisterPage(Name: string; Producer: TPageProducer);
     
    6565    '  <title>Centrála - ' + Path + '</title>' +
    6666    '  </head><body>' +
    67     '<div id="Title">' + Title + '</div>'+
     67    '<div class="PageTitle">' + Title + '</div>'+
    6868    '<div class="Navigation"><strong>Navigace &gt;&gt;</strong> ' + Navigace + '</div>';
    6969end;
     
    7676  UpdateDate := '2.5.2007';
    7777  GenerateTime := '1 s';
    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 + ' |' +
     78  Result := '<div class="Footer">| Web mistr: Jiří Hajda | e-mail: robie@centrum.cz | ICQ: 277158770 | Vygenerováno za ' + GenerateTime + ' s | Verze: 1.0 | Naposledy aktualizováno: ' + UpdateDate + ' |' +
    7979    '</div>';
    8080  //ShowArray($GLOBALS);
     
    117117  Database := TSqlDatabase.Create;
    118118  with Database do begin
    119     Hostname := 'localhost';
    120     Database := 'is';
    121     UserName := 'root';
    122     Password := 'severjih';
     119    Hostname := DatabaseHostName;
     120    Database := DatabaseDatabase;
     121    UserName := DatabaseUserName;
     122    Password := DatabasePassword;
    123123    Connect;
    124124  end;
  • devel/web/UMainPage.pas

    r138 r139  
    1010
    1111uses
    12   USqlDatabase, UCore, UHtmlClasses, SysUtils;
    13 
    14 function ShowNews(Category: Integer): string;
    15 var
    16   DbRows: TDbRows;
    17   Index: Integer;
    18   FontSize: Integer;
    19   I: Integer;
    20   II: Integer;
    21   Enclosures: TArrayOfString;
    22   Content: string;
    23 const
    24   NewsCountPerCategory = 3;
    25 //  UploadedFilesFolder = 'aktuality/uploads/';
    26 begin
    27 //  global $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder;
    28 
    29   DbRows := Database.Select('news_category', '*', 'id=' + IntToStr(Category));
    30 
    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;';
    36   Result := Result + '</td></tr><tr><td colspan="2">'+
    37     '<table>';
    38   Index := 0;
    39   FontSize := 12;
    40   DbRows := Database.Select('news', '*', 'category=' + IntToStr(Category) + ' ORDER BY date DESC LIMIT 0,' + IntToStr(NewsCountPerCategory));
    41   for I := 0 to DbRows.Count - 1 do with DbRows[I] do begin
    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%">'+
    45       '<tr><td style="font-size: ' + IntToStr(FontSize) + 'pt"><strong>' + Values['title'] + '</strong></td>'+
    46       '<td align="right" style="font-size: ' + IntToStr(FontSize) + 'pt">' + Values['author'] + ' (' + HumanDate(Values['date']) + ')</td></tr></table>'+
    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;
    48 
    49     if Values['enclosure'] <> '' then begin
    50       Result := Result + '<br />Přílohy: ';
    51       Enclosures := Explode(';', Values['enclosure']);
    52             for II := 0 to High(Enclosures) do begin
    53               // if(file_exists($UploadedFilesFolder.$Enclosure)) echo(' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>')
    54       end;
    55     end;
    56     Result := Result + '</div></td></tr>';
    57     Index := Index + 1;   
    58     FontSize := FontSize - 2;
    59   end;
    60   Result := Result + '</table></td></tr></table>';
    61 end;
     12  USqlDatabase, UCore, SysUtils, UNews;
    6213
    6314function MainPage: string;
     
    6617  DbRows: TDbRows;
    6718  I: Integer;
     19  News: TNews;
    6820begin
    6921  Output := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Rozcestní­k');
     
    13284'<div class="Panel">';
    13385
    134   // Zobrazení seznamu online poèítaèù
     86  // Zobrazení seznamu online počítačů
    13587  Output := Output + '<strong>Online počítače:</strong><br /><span style="font-size: smaller;">';
    13688  DbRows := Database.Select('hosts', 'name', 'online=1 AND show_online=1 ORDER BY name');
     
    169121$Uptime = str_replace('day,','den a',$Uptime);
    170122$Uptime = str_replace('min,','minut',$Uptime);
    171 echo('Server bì¾í '.$Uptime);
     123echo('Server běží '.$Uptime);
    172124*)
    173125  Output := Output + '</div></td><td valign="top">';
     
    183135*)
    184136
    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);
     137  News := TNews.Create;
     138  News.LoadFromDb;
     139  with News do
     140    Output := Output + '<div onmouseout="skryj(predchozi)">' + ShowNews(5) + ShowNews(3) + ShowNews(1) + ShowNews(2) + ShowNews(4) + ShowNews(6) + ShowNews(8) + ShowNews(9) + ShowNews(10);
     141  News.Free;
    186142
    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>'+
     143  Output := Output + '<a href="?p=news-selection"><img src="images/rss20.png" alt="Aktuality přes RSS" /></a>  <a href="?p=news-selection">Automatické sledování novinek</a>'+
    188144  '</div></td></tr></table>';
    189145  Output := Output + ShowFooter;
     
    191147end;
    192148
    193 //var
    194 //  MainPage: THtmlPage;
    195149begin
    196   //MainPage := THtmlPage.Create;
    197   RegisterPage('index', @MainPage);   
     150  RegisterPage('index', @MainPage);
    198151end.
  • devel/web/UNews.pas

    r138 r139  
    66
    77uses
    8   USqlDatabase, SysUtils, UCore, Classes, DOM;
     8  USqlDatabase, SysUtils, UCore, Classes, UDatabase;
    99
    1010type
     
    1212  { TNewsCategory }
    1313
    14   TNewsCategory = class
    15     Id: Integer;
     14  TNewsCategory = class(TDbObject)
    1615    Title: string;
    1716    Permission: Integer;
    1817    procedure LoadFromDbRecord(DbRow: TAssocArray);
     18    procedure Store; override;
    1919  end;
    2020 
    21   TNewsItem = class
    22     Id: Integer;
     21  { TNewsItem }
     22
     23  TNewsItem = class(TDbObject)
    2324    Title: string;
    2425    Content: string;
     
    2829    Category: Integer;
    2930    procedure LoadFromDbRecord(DbRow: TAssocArray);
     31    procedure Store; override;
    3032  end;
    3133
     
    3739    destructor Destroy; override;
    3840    procedure LoadFromDb;
     41    function ShowNews(Category: Integer): string;
    3942  end;
    4043
     
    5962end;
    6063
     64procedure TNewsItem.Store;
     65var
     66  Values: TAssocArray;
     67begin
     68  Values := TAssocArray.Create;
     69  Values.AddKeyValue('content', Content);
     70  Values.AddKeyValue('title', Title);
     71  Values.AddKeyValue('author', Author);
     72  Values.AddKeyValue('ip', IPAddress);
     73  Values.AddKeyValue('time', IntToStr(DateTimeToUnix(Time)));
     74  Values.AddKeyValue('category', IntToStr(Category));
     75  Database.Update('news', Values, 'id=' + IntToStr(Id));
     76  Values.Free;
     77  inherited;
     78end;
     79
    6180function GenerateRSS: string;
    6281const
    6382  MaxNewsItemCount = 15;
    64   UploadedFilesFolder = 'uploads/';
     83//  UploadedFilesFolder = 'uploads/';
    6584var
    6685  RSSChannel:  TRSSChannel;
     
    168187end;
    169188
     189procedure TNewsCategory.Store;
     190var
     191  Values: TAssocArray;
     192begin
     193  Values := TAssocArray.Create;
     194  Values.AddKeyValue('permission', IntToStr(Permission));
     195  Values.AddKeyValue('title', Title);
     196  Database.Update('news_category', Values, 'id=' + IntToStr(Id));
     197  Values.Free;
     198  inherited;
     199end;
     200
     201function TNews.ShowNews(Category: Integer): string;
     202var
     203  DbRows: TDbRows;
     204  FontSize: Integer;
     205  I: Integer;
     206  II: Integer;
     207  Enclosures: TArrayOfString;
     208  Content: string;
     209const
     210  NewsCountPerCategory = 5;
     211//  UploadedFilesFolder = 'aktuality/uploads/';
     212begin
     213//  global $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder;
     214  Result := '<table class="MainTable"><tr>' +
     215    '<td>' + TNewsCategory(NewsCategoryList[Category]).Title + '</td><td align="right">'+
     216    '<a href="?p=news-list&amp;category=' + IntToStr(Category) + '">Zobrazit všechny aktuality</a>&nbsp;';
     217  if TNewsCategory(NewsCategoryList[Category]).Permission = 1 then
     218    Result := Result + '<a href="?p=news-add&amp;category=' + IntToStr(Category) + '">Přidat aktualitu</a>&nbsp;';
     219  Result := Result + '</td></tr><tr><td colspan="2" style="NewsTable">' +
     220    '<table class="NewsTable" cellspacing="0" cellpadding="0">';
     221  FontSize := 12;
     222  DbRows := Database.Select('news', '*', 'category=' + IntToStr(Category) + ' ORDER BY date DESC LIMIT 0,' + IntToStr(NewsCountPerCategory));
     223  for I := 0 to DbRows.Count - 1 do with DbRows[I] do begin
     224    Content := Values['content'];
     225    Content := StringReplace(Content, '<br>', '<br />', [rfReplaceAll]);
     226    Result := Result + '<tr><td  onclick="window.location=''?p=news-item&amp;id=' + Values['id'] + '''" onmouseover="zobraz(''new' + Values['id'] + ''')" class="NewsTableItemTitle">' +
     227      '<table class="NewsTableItemTitle">' +
     228      '<tr><td style="font-size: ' + IntToStr(FontSize) + 'pt"><strong>' + Values['title'] + '</strong></td>'+
     229      '<td align="right" style="font-size: ' + IntToStr(FontSize) + 'pt">' + Values['author'] + ' (' + HumanDate(Values['date']) + ')' +
     230      '</td></tr></table>' +
     231      '<div id="new' + Values['id'] + '" class="NewsTableItem">' + Content;
     232
     233    if Values['enclosure'] <> '' then begin
     234      Result := Result + '<br />Přílohy: ';
     235      Enclosures := Explode(';', Values['enclosure']);
     236            for II := 0 to High(Enclosures) do begin
     237              // if(file_exists($UploadedFilesFolder.$Enclosure)) echo(' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>')
     238      end;
     239    end;
     240    Result := Result + '</div></td></tr>';
     241    FontSize := FontSize - 1;
     242  end;
     243  Result := Result + '</table></td></tr></table>';
     244end;
     245
    170246end.
  • devel/web/UNewsPage.pas

    r138 r139  
    1212
    1313uses
    14   USqlDatabase, UCore, SysUtils, pwmain, UNews;
     14  USqlDatabase, UCore, SysUtils, pwmain, UNews, UConfig;
     15
     16function NewsChannelBuild: string;
     17var
     18  URL: string;
     19  I: Integer;
     20  Count: Integer;
     21  Index: string;
     22begin
     23  Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality');
     24  URL := '';
     25  Count := CountCgiVars;
     26  for I := 0 to Count - 1 do begin
     27    Index := FetchCgiVarName(I);
     28    if Copy(Index, 1, 8) = 'category' then URL := URL + '-' + Copy(Index, 9, Length(Index));
     29  end;
     30  URL := WebServerAddress + '?p=news-rss&amp;select=' + Copy(URL, 2, Length(URL));
     31  Result := Result + 'Výsledný RSS kanál: <a href="' + URL + '">' + URL + '</a>';
     32  Result := Result + ShowFooter;
     33end;
    1534
    1635function NewsChannelSelection: string;
     36var
     37  DbRows: TDbRows;
     38  I: Integer;
    1739begin
    1840  Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality');
     41  Result := Result + 'Vytvořte si vlastní RSS kanál, díky kterému budete moci automaticky sledovat novinky pomocí vaší RSS čtečky. ' +
     42  'Informace o technologii RSS a programech pro čtení kanálů najdete např. <a href="http://www.lupa.cz/clanky/prehled-rss-ctecek/">zde</a><br />' +
     43  '<br />Kategorie:<br />';
     44  Result := Result + '<form action="?p=news-build" method="post">';
     45  DbRows := Database.Select('news_category', '*', '1 ORDER BY caption');
     46  for I := 0 to DbRows.Count - 1 do
     47    Result := Result + '<input type="checkbox" name="category' + DbRows[I].Values['id'] + '">' +
     48      DbRows[I].Values['caption']+ '<br />';
     49  Result := Result + '<input type="submit" value="Sestavit ">' +
     50    '</form>';
    1951  Result := Result + ShowFooter;
    2052end;
     
    3668  Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality');
    3769  if GetCgiVar('id') = '' then Id := 1 else Id := StrToInt(GetCgiVar('id')); 
    38   DbRows := Database.Query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE  `news`.`id`=' + IntToStr(Id));
     70  DbRows := Database.Query('SELECT `news`.*, UNIX_TIMESTAMP(`news`.date) as time, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE  `news`.`id`=' + IntToStr(Id));
    3971  if DbRows.Count > 0 then begin
    4072    NewsItem.LoadFromDbRecord(DbRows[0]);
     
    89121  Result := Result + PagesList('?p=news-list&amp;category=' + IntToStr(Category) + '&amp;page=', Page, PageMax, PerPage);
    90122
    91   DbRows := Database.Query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `category`=' + IntToStr(Category) + ' ORDER BY `news`.`id` DESC LIMIT ' + IntToStr(Page * PerPage) + ',' + IntToStr(PerPage));
     123  DbRows := Database.Query('SELECT `news`.*, UNIX_TIMESTAMP(`news`.date) as time, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `category`=' + IntToStr(Category) + ' ORDER BY `news`.`id` DESC LIMIT ' + IntToStr(Page * PerPage) + ',' + IntToStr(PerPage));
    92124  for I := 0 to DbRows.Count - 1 do begin
    93125    NewsItem.LoadFromDbRecord(DbRows[I]);
     
    128160RegisterPage('news-rss', @RSSChannel);
    129161RegisterPage('news-selection', @NewsChannelSelection);
     162RegisterPage('news-build', @NewsChannelBuild);
    130163
    131164end.
  • devel/web/index.lpi

    r138 r139  
    1212      <MainUnit Value="0"/>
    1313      <TargetFileExt Value=".exe"/>
    14       <ActiveEditorIndexAtStart Value="9"/>
     14      <ActiveEditorIndexAtStart Value="2"/>
    1515    </General>
    1616    <VersionInfo>
     
    2929      </local>
    3030    </RunParams>
    31     <Units Count="17">
     31    <Units Count="23">
    3232      <Unit0>
    3333        <Filename Value="index.pas"/>
    3434        <IsPartOfProject Value="True"/>
    3535        <UnitName Value="Index"/>
    36         <CursorPos X="1" Y="21"/>
    37         <TopLine Value="1"/>
    38         <EditorIndex Value="1"/>
    39         <UsageCount Value="44"/>
     36        <CursorPos X="37" Y="7"/>
     37        <TopLine Value="1"/>
     38        <EditorIndex Value="3"/>
     39        <UsageCount Value="57"/>
    4040        <Loaded Value="True"/>
    4141      </Unit0>
     
    4444        <IsPartOfProject Value="True"/>
    4545        <UnitName Value="UMainPage"/>
    46         <CursorPos X="32" Y="33"/>
    47         <TopLine Value="155"/>
    48         <EditorIndex Value="2"/>
    49         <UsageCount Value="44"/>
     46        <CursorPos X="80" Y="21"/>
     47        <TopLine Value="1"/>
     48        <EditorIndex Value="5"/>
     49        <UsageCount Value="57"/>
    5050        <Loaded Value="True"/>
    5151      </Unit1>
     
    5454        <IsPartOfProject Value="True"/>
    5555        <UnitName Value="USqlDatabase"/>
    56         <CursorPos X="51" Y="97"/>
    57         <TopLine Value="84"/>
     56        <CursorPos X="74" Y="69"/>
     57        <TopLine Value="45"/>
    5858        <EditorIndex Value="0"/>
    59         <UsageCount Value="44"/>
     59        <UsageCount Value="57"/>
    6060        <Loaded Value="True"/>
    6161      </Unit2>
     
    6363        <Filename Value="UXmlClasses.pas"/>
    6464        <IsPartOfProject Value="True"/>
    65         <UsageCount Value="44"/>
     65        <UsageCount Value="57"/>
    6666      </Unit3>
    6767      <Unit4>
     
    6969        <IsPartOfProject Value="True"/>
    7070        <UnitName Value="UCore"/>
    71         <CursorPos X="50" Y="18"/>
    72         <TopLine Value="1"/>
    73         <EditorIndex Value="4"/>
    74         <UsageCount Value="44"/>
     71        <CursorPos X="21" Y="33"/>
     72        <TopLine Value="15"/>
     73        <EditorIndex Value="8"/>
     74        <UsageCount Value="57"/>
    7575        <Loaded Value="True"/>
    7676      </Unit4>
     
    8181        <CursorPos X="1" Y="1"/>
    8282        <TopLine Value="81"/>
    83         <EditorIndex Value="3"/>
    84         <UsageCount Value="44"/>
    85         <Loaded Value="True"/>
     83        <UsageCount Value="57"/>
    8684      </Unit5>
    8785      <Unit6>
     
    8987        <IsPartOfProject Value="True"/>
    9088        <UnitName Value="UFinancePage"/>
    91         <CursorPos X="38" Y="65"/>
     89        <CursorPos X="31" Y="19"/>
    9290        <TopLine Value="11"/>
    93         <EditorIndex Value="7"/>
    94         <UsageCount Value="44"/>
     91        <EditorIndex Value="10"/>
     92        <UsageCount Value="57"/>
    9593        <Loaded Value="True"/>
    9694      </Unit6>
     
    10199        <CursorPos X="34" Y="30"/>
    102100        <TopLine Value="17"/>
    103         <EditorIndex Value="5"/>
    104         <UsageCount Value="44"/>
    105         <Loaded Value="True"/>
     101        <UsageCount Value="57"/>
    106102      </Unit7>
    107103      <Unit8>
     
    109105        <IsPartOfProject Value="True"/>
    110106        <UnitName Value="UNews"/>
    111         <CursorPos X="38" Y="118"/>
    112         <TopLine Value="98"/>
     107        <CursorPos X="17" Y="232"/>
     108        <TopLine Value="1"/>
    113109        <EditorIndex Value="9"/>
    114         <UsageCount Value="44"/>
     110        <UsageCount Value="57"/>
    115111        <Loaded Value="True"/>
    116112      </Unit8>
     
    119115        <IsPartOfProject Value="True"/>
    120116        <UnitName Value="UNewsPage"/>
    121         <CursorPos X="93" Y="96"/>
    122         <TopLine Value="78"/>
    123         <EditorIndex Value="8"/>
    124         <UsageCount Value="44"/>
     117        <CursorPos X="81" Y="123"/>
     118        <TopLine Value="96"/>
     119        <EditorIndex Value="7"/>
     120        <UsageCount Value="57"/>
    125121        <Loaded Value="True"/>
    126122      </Unit9>
     
    130126        <CursorPos X="10" Y="94"/>
    131127        <TopLine Value="81"/>
    132         <UsageCount Value="8"/>
     128        <UsageCount Value="6"/>
    133129      </Unit10>
    134130      <Unit11>
     
    136132        <CursorPos X="26" Y="17"/>
    137133        <TopLine Value="121"/>
    138         <UsageCount Value="8"/>
     134        <UsageCount Value="6"/>
    139135      </Unit11>
    140136      <Unit12>
     
    142138        <CursorPos X="4" Y="33"/>
    143139        <TopLine Value="18"/>
    144         <UsageCount Value="8"/>
     140        <UsageCount Value="6"/>
    145141      </Unit12>
    146142      <Unit13>
     
    149145        <CursorPos X="24" Y="364"/>
    150146        <TopLine Value="351"/>
    151         <EditorIndex Value="6"/>
    152         <UsageCount Value="23"/>
    153         <Loaded Value="True"/>
     147        <UsageCount Value="21"/>
    154148      </Unit13>
    155149      <Unit14>
     
    159153        <CursorPos X="56" Y="86"/>
    160154        <TopLine Value="42"/>
    161         <EditorIndex Value="10"/>
    162         <UsageCount Value="32"/>
     155        <EditorIndex Value="11"/>
     156        <UsageCount Value="45"/>
    163157        <Loaded Value="True"/>
    164158      </Unit14>
     
    167161        <CursorPos X="10" Y="117"/>
    168162        <TopLine Value="115"/>
    169         <UsageCount Value="10"/>
     163        <UsageCount Value="8"/>
    170164      </Unit15>
    171165      <Unit16>
     
    173167        <CursorPos X="3" Y="624"/>
    174168        <TopLine Value="34"/>
    175         <UsageCount Value="10"/>
     169        <UsageCount Value="8"/>
    176170      </Unit16>
     171      <Unit17>
     172        <Filename Value="uconfig.pas"/>
     173        <IsPartOfProject Value="True"/>
     174        <UnitName Value="UConfig"/>
     175        <CursorPos X="28" Y="14"/>
     176        <TopLine Value="1"/>
     177        <EditorIndex Value="4"/>
     178        <UsageCount Value="32"/>
     179        <Loaded Value="True"/>
     180      </Unit17>
     181      <Unit18>
     182        <Filename Value="style/style.css"/>
     183        <IsPartOfProject Value="True"/>
     184        <CursorPos X="1" Y="134"/>
     185        <TopLine Value="108"/>
     186        <UsageCount Value="32"/>
     187        <SyntaxHighlighter Value="None"/>
     188      </Unit18>
     189      <Unit19>
     190        <Filename Value="style/global.js"/>
     191        <IsPartOfProject Value="True"/>
     192        <CursorPos X="1" Y="1"/>
     193        <TopLine Value="1"/>
     194        <UsageCount Value="32"/>
     195        <SyntaxHighlighter Value="JScript"/>
     196      </Unit19>
     197      <Unit20>
     198        <Filename Value="udatabase.pas"/>
     199        <IsPartOfProject Value="True"/>
     200        <UnitName Value="UDatabase"/>
     201        <CursorPos X="3" Y="52"/>
     202        <TopLine Value="50"/>
     203        <EditorIndex Value="1"/>
     204        <UsageCount Value="26"/>
     205        <Loaded Value="True"/>
     206      </Unit20>
     207      <Unit21>
     208        <Filename Value="uuser.pas"/>
     209        <IsPartOfProject Value="True"/>
     210        <UnitName Value="UUser"/>
     211        <CursorPos X="47" Y="52"/>
     212        <TopLine Value="34"/>
     213        <EditorIndex Value="6"/>
     214        <UsageCount Value="26"/>
     215        <Loaded Value="True"/>
     216      </Unit21>
     217      <Unit22>
     218        <Filename Value="uuserpage.pas"/>
     219        <IsPartOfProject Value="True"/>
     220        <UnitName Value="UUserPage"/>
     221        <CursorPos X="69" Y="18"/>
     222        <TopLine Value="5"/>
     223        <EditorIndex Value="2"/>
     224        <UsageCount Value="22"/>
     225        <Loaded Value="True"/>
     226      </Unit22>
    177227    </Units>
    178     <JumpHistory Count="23" HistoryIndex="22">
     228    <JumpHistory Count="30" HistoryIndex="29">
    179229      <Position1>
    180         <Filename Value="UNews.pas"/>
    181         <Caret Line="14" Column="3" TopLine="11"/>
     230        <Filename Value="UMainPage.pas"/>
     231        <Caret Line="138" Column="17" TopLine="111"/>
    182232      </Position1>
    183233      <Position2>
    184         <Filename Value="UNews.pas"/>
    185         <Caret Line="113" Column="64" TopLine="97"/>
     234        <Filename Value="index.pas"/>
     235        <Caret Line="7" Column="33" TopLine="1"/>
    186236      </Position2>
    187237      <Position3>
    188         <Filename Value="UNews.pas"/>
    189         <Caret Line="115" Column="2" TopLine="95"/>
     238        <Filename Value="uuser.pas"/>
     239        <Caret Line="14" Column="3" TopLine="1"/>
    190240      </Position3>
    191241      <Position4>
    192         <Filename Value="UNews.pas"/>
    193         <Caret Line="139" Column="33" TopLine="128"/>
     242        <Filename Value="udatabase.pas"/>
     243        <Caret Line="19" Column="3" TopLine="9"/>
    194244      </Position4>
    195245      <Position5>
    196         <Filename Value="urss.pas"/>
    197         <Caret Line="56" Column="1" TopLine="26"/>
     246        <Filename Value="uuser.pas"/>
     247        <Caret Line="43" Column="5" TopLine="7"/>
    198248      </Position5>
    199249      <Position6>
    200         <Filename Value="UNews.pas"/>
    201         <Caret Line="46" Column="8" TopLine="18"/>
     250        <Filename Value="uuser.pas"/>
     251        <Caret Line="42" Column="12" TopLine="11"/>
    202252      </Position6>
    203253      <Position7>
    204         <Filename Value="UNews.pas"/>
    205         <Caret Line="118" Column="20" TopLine="100"/>
     254        <Filename Value="udatabase.pas"/>
     255        <Caret Line="13" Column="31" TopLine="1"/>
    206256      </Position7>
    207257      <Position8>
    208258        <Filename Value="UNews.pas"/>
    209         <Caret Line="76" Column="14" TopLine="58"/>
     259        <Caret Line="173" Column="5" TopLine="137"/>
    210260      </Position8>
    211261      <Position9>
    212262        <Filename Value="UNews.pas"/>
    213         <Caret Line="171" Column="24" TopLine="150"/>
     263        <Caret Line="178" Column="8" TopLine="171"/>
    214264      </Position9>
    215265      <Position10>
    216         <Filename Value="UNews.pas"/>
    217         <Caret Line="120" Column="29" TopLine="94"/>
     266        <Filename Value="UCore.pas"/>
     267        <Caret Line="33" Column="21" TopLine="15"/>
    218268      </Position10>
    219269      <Position11>
    220270        <Filename Value="UNews.pas"/>
    221         <Caret Line="55" Column="73" TopLine="37"/>
     271        <Caret Line="23" Column="3" TopLine="21"/>
    222272      </Position11>
    223273      <Position12>
    224         <Filename Value="UNewsPage.pas"/>
    225         <Caret Line="18" Column="50" TopLine="1"/>
     274        <Filename Value="UNews.pas"/>
     275        <Caret Line="65" Column="1" TopLine="64"/>
    226276      </Position12>
    227277      <Position13>
    228         <Filename Value="urss.pas"/>
    229         <Caret Line="22" Column="3" TopLine="20"/>
     278        <Filename Value="UNews.pas"/>
     279        <Caret Line="72" Column="50" TopLine="64"/>
    230280      </Position13>
    231281      <Position14>
    232         <Filename Value="urss.pas"/>
    233         <Caret Line="96" Column="9" TopLine="64"/>
     282        <Filename Value="UNews.pas"/>
     283        <Caret Line="74" Column="45" TopLine="53"/>
    234284      </Position14>
    235285      <Position15>
    236         <Filename Value="urss.pas"/>
    237         <Caret Line="92" Column="26" TopLine="64"/>
     286        <Filename Value="UNews.pas"/>
     287        <Caret Line="73" Column="61" TopLine="55"/>
    238288      </Position15>
    239289      <Position16>
    240         <Filename Value="urss.pas"/>
    241         <Caret Line="8" Column="31" TopLine="1"/>
     290        <Filename Value="uuser.pas"/>
     291        <Caret Line="27" Column="3" TopLine="25"/>
    242292      </Position16>
    243293      <Position17>
    244         <Filename Value="urss.pas"/>
    245         <Caret Line="92" Column="63" TopLine="64"/>
     294        <Filename Value="udatabase.pas"/>
     295        <Caret Line="14" Column="3" TopLine="2"/>
    246296      </Position17>
    247297      <Position18>
    248         <Filename Value="urss.pas"/>
    249         <Caret Line="93" Column="15" TopLine="64"/>
     298        <Filename Value="udatabase.pas"/>
     299        <Caret Line="28" Column="3" TopLine="25"/>
    250300      </Position18>
    251301      <Position19>
    252         <Filename Value="urss.pas"/>
    253         <Caret Line="96" Column="16" TopLine="64"/>
     302        <Filename Value="udatabase.pas"/>
     303        <Caret Line="36" Column="3" TopLine="34"/>
    254304      </Position19>
    255305      <Position20>
    256         <Filename Value="urss.pas"/>
    257         <Caret Line="8" Column="39" TopLine="1"/>
     306        <Filename Value="uuserpage.pas"/>
     307        <Caret Line="17" Column="5" TopLine="1"/>
    258308      </Position20>
    259309      <Position21>
    260         <Filename Value="urss.pas"/>
    261         <Caret Line="91" Column="22" TopLine="64"/>
     310        <Filename Value="udatabase.pas"/>
     311        <Caret Line="37" Column="31" TopLine="11"/>
    262312      </Position21>
    263313      <Position22>
    264         <Filename Value="UNewsPage.pas"/>
    265         <Caret Line="43" Column="101" TopLine="25"/>
     314        <Filename Value="udatabase.pas"/>
     315        <Caret Line="31" Column="18" TopLine="13"/>
    266316      </Position22>
    267317      <Position23>
    268         <Filename Value="UNews.pas"/>
    269         <Caret Line="104" Column="27" TopLine="99"/>
     318        <Filename Value="udatabase.pas"/>
     319        <Caret Line="75" Column="14" TopLine="54"/>
    270320      </Position23>
     321      <Position24>
     322        <Filename Value="udatabase.pas"/>
     323        <Caret Line="53" Column="5" TopLine="17"/>
     324      </Position24>
     325      <Position25>
     326        <Filename Value="uuser.pas"/>
     327        <Caret Line="29" Column="23" TopLine="1"/>
     328      </Position25>
     329      <Position26>
     330        <Filename Value="uuser.pas"/>
     331        <Caret Line="73" Column="5" TopLine="37"/>
     332      </Position26>
     333      <Position27>
     334        <Filename Value="uuser.pas"/>
     335        <Caret Line="72" Column="3" TopLine="40"/>
     336      </Position27>
     337      <Position28>
     338        <Filename Value="uuser.pas"/>
     339        <Caret Line="44" Column="39" TopLine="26"/>
     340      </Position28>
     341      <Position29>
     342        <Filename Value="uuserpage.pas"/>
     343        <Caret Line="29" Column="33" TopLine="3"/>
     344      </Position29>
     345      <Position30>
     346        <Filename Value="uuserpage.pas"/>
     347        <Caret Line="23" Column="48" TopLine="1"/>
     348      </Position30>
    271349    </JumpHistory>
    272350  </ProjectOptions>
  • devel/web/index.pas

    r138 r139  
    55uses
    66  UCore, USqlDatabase, SysUtils, UMainPage, pwinit, pwmain,
    7   UFinancePage, UNewsPage;
     7  UFinancePage, UNewsPage, UUserPage;
    88
    99var
     
    1414  SetHeader('Content-Type', 'text/html; charset=utf-8');
    1515  PageName := GetCgiVar('p');
    16   if PageName = '' then PageName := 'news-rss';
     16  if PageName = '' then PageName := 'index';
    1717  I := 0;
    1818  while (I < Length(Pages)) and (Pages[I].Name <> PageName) do Inc(I);
  • devel/web/style

    • Property svn:ignore set to

      backup
  • devel/web/style/style.css

    r137 r139  
    44}
    55
    6 #MainTable
    7 {
    8   width: 100%;
    9 }
    10 
    11 #MainTable td
     6.MainTable
     7{
     8  width: 100%;
     9}
     10
     11.MainTable td
    1212{
    1313  border-width: 0px 1px 0px 0px;
     
    1717}
    1818
    19 #MainTable td .Panel
     19.MainTable td .Panel
    2020{
    2121  border-width: 0px 0px 0px 0px;
     
    2525}
    2626
    27 #MainTable td .PanelTitle
     27.MainTable td .PanelTitle
    2828{
    2929  border-width: 0px 0px 2px 0px;
     
    3434}
    3535
    36 #MainTable td .PanelTitleRight
     36.MainTable td .PanelTitleRight
    3737{
    3838  border-width: 0px 0px 2px 0px;
     
    4343}
    4444
    45 #MainTable td td
     45.MainTable td td
    4646{
    4747  border-width: 0px 0px 0px 0px;
     
    6767}
    6868
    69 #Footer
     69.Footer
    7070{
    7171  border-style: solid;
     
    9595}
    9696
    97 #Title
     97.PageTitle
    9898{
    9999  padding: 3px;
     
    108108.NewsTable
    109109{
    110   padding: 2px 2px 2px 2px;
     110  padding: 0px;
    111111  font-size: small;
    112112  border-style: solid;
     
    114114  border-width: 1px;
    115115  background-color: #FFF0F0;
     116  width: 100%;
     117  border-spacing: 0px;
     118  margin: 0px;
    116119}
    117120
     
    124127  padding: 3px;
    125128  font-size: 9pt;
     129  color: black;
     130}
     131
     132.NewsTableItemTitle
     133{
     134  cursor: pointer;
     135  margin: 0px;
     136  padding: 0px;
     137  padding: 0px;
     138  color: red;
     139  width: 100%;
     140  border-spacing: 0px;
    126141}
    127142
Note: See TracChangeset for help on using the changeset viewer.