Changeset 279 for branches/web/UNewsPage.pas
- Timestamp:
- Mar 5, 2010, 8:52:50 PM (15 years ago)
- Location:
- branches/web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/web
- Property svn:ignore
-
old new 3 3 *.o 4 4 backup 5 6 5 index.cgi 7 8 6 index.compiled 9 10 7 UConfig.pas 8 bin
-
- Property svn:ignore
-
branches/web/UNewsPage.pas
r139 r279 12 12 13 13 uses 14 USqlDatabase, UCore, SysUtils, pwmain,UNews, UConfig;14 USqlDatabase, UCore, SysUtils, UNews, UConfig; 15 15 16 16 function NewsChannelBuild: string; … … 23 23 Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality'); 24 24 URL := ''; 25 Count := CountCgiVars;25 //Count := CountCgiVars; 26 26 for I := 0 to Count - 1 do begin 27 Index := FetchCgiVarName(I);27 //Index := FetchCgiVarName(I); 28 28 if Copy(Index, 1, 8) = 'category' then URL := URL + '-' + Copy(Index, 9, Length(Index)); 29 29 end; … … 67 67 NewsItem := TNewsItem.Create; 68 68 Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality'); 69 if GetCgiVar('id') = '' then Id := 1 else Id := StrToInt(GetCgiVar('id'));69 //if GetCgiVar('id') = '' then Id := 1 else Id := StrToInt(GetCgiVar('id')); 70 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)); 71 71 if DbRows.Count > 0 then begin … … 110 110 begin 111 111 Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality'); 112 if GetCgiVar('category') = '' then Category := 1 else Category := StrToInt(GetCgiVar('category')); 112 // if GetCgiVar('category') = '' then Category := 1 else Category := StrToInt(GetCgiVar('category')); 113 113 NewsItem := TNewsItem.Create; 114 114 DbRows := TDbRows.Create; … … 116 116 PageMax := StrToInt(DbRows[0].ValuesAtIndex[0]); 117 117 DbRows.Free; 118 if GetCgiVar('page') = '' then Page := 0 else Page := StrToInt(GetCgiVar('page'));118 // if GetCgiVar('page') = '' then Page := 0 else Page := StrToInt(GetCgiVar('page')); 119 119 CategoryName := ''; 120 120 Result := Result + '<strong>Seznam aktualit kategorie ' + CategoryName + ':</strong><div style="font-size: small;">';
Note:
See TracChangeset
for help on using the changeset viewer.