Changeset 138
- Timestamp:
- Jan 15, 2009, 9:57:44 PM (16 years ago)
- Location:
- devel/web
- Files:
-
- 1 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/web/UFinancePage.pas
r137 r138 10 10 11 11 uses 12 USqlDatabase, UCore, UHtmlClasses,SysUtils, pwmain, UFinance;12 USqlDatabase, UCore, SysUtils, pwmain, UFinance; 13 13 14 14 function FinanceOverviewPage: string; -
devel/web/UHtmlClasses.pas
r1 r138 6 6 7 7 uses 8 UXmlClasses, Classes, SysUtils , StrUtils;8 UXmlClasses, Classes, SysUtils; 9 9 10 10 type … … 495 495 496 496 procedure THostAddress.SetAsString(const Value: string); 497 var498 Parts: TStringArray;499 I: Integer;500 497 begin 501 498 State := asIpAddress; -
devel/web/UMainPage.pas
r137 r138 82 82 InsertIcon('apple.gif') + ' <a href="/jidelna">Jídelníček</a><br />' + 83 83 InsertIcon('clear.gif') + ' <a href="http://tv.zdechov.net/">Televize</a><br />' + 84 InsertIcon('cube.gif') + ' <a href="http://game -server.zdechov.net/">Herní server</a><br />' +84 InsertIcon('cube.gif') + ' <a href="http://game.zdechov.net/">Herní server</a><br />' + 85 85 InsertIcon('cfix.gif') + ' <a href="/farnost">Rozpis mší</a><br />' + 86 86 InsertIcon('tel.gif') + ' <a href="/telseznam.php">Telefonní seznam</a><br />' + -
devel/web/UNews.pas
r137 r138 6 6 7 7 uses 8 USqlDatabase, SysUtils, UCore, Classes ;8 USqlDatabase, SysUtils, UCore, Classes, DOM; 9 9 10 10 type 11 12 { TNewsCategory } 13 11 14 TNewsCategory = class 15 Id: Integer; 16 Title: string; 17 Permission: Integer; 18 procedure LoadFromDbRecord(DbRow: TAssocArray); 12 19 end; 13 20 … … 16 23 Title: string; 17 24 Content: string; 18 Date: TDateTime;25 Time: TDateTime; 19 26 Author: string; 20 27 IPAddress: string; … … 23 30 end; 24 31 32 { TNews } 33 34 TNews = class 35 NewsCategoryList: TList; 36 constructor Create; 37 destructor Destroy; override; 38 procedure LoadFromDb; 39 end; 40 41 function GenerateRSS: string; 42 25 43 implementation 44 45 uses 46 URSS, pwmain, dateutils; 26 47 27 48 { TNewsItem } … … 32 53 Title := DbRow.Values['title']; 33 54 Content := DbRow.Values['content']; 34 Date := Now;55 Time := UnixToDateTime(StrToInt(DbRow.Values['time'])); 35 56 Author := DbRow.Values['author']; 36 57 IPAddress := DbRow.Values['ip']; … … 38 59 end; 39 60 61 function GenerateRSS: string; 62 const 63 MaxNewsItemCount = 15; 64 UploadedFilesFolder = 'uploads/'; 65 var 66 RSSChannel: TRSSChannel; 67 Select: string; 68 SelectParts: TArrayOfString; 69 Where: string; 70 DbRows: TDbRows; 71 NewItem: TRSSChannelItem; 72 I: Integer; 73 News: TNews; 74 NewsItem: TNewsItem; 75 begin 76 News := TNews.Create; 77 News.LoadFromDb; 78 NewsItem := TNewsItem.Create; 79 RSSChannel := TRSSChannel.Create; 80 with RSSChannel do begin 81 Title := 'ZděchovNET - Aktuality'; 82 Link := 'http://centrala.zdechov.net/'; 83 Description := 'Aktuality komunitní počítačové sítě ZděchovNET'; 84 WebMasterEmail := 'robie@centrum.cz'; 85 86 (* 87 $Category = ''; 88 $CategoryOption = ''; 89 $CategoryOptionURL = ''; 90 $CategoryName = ''; 91 *) 92 93 if GetCgiVar('select') = '' then Select := '' else Select := GetCgiVar('select'); 94 SelectParts := Explode('-', Select); 95 Where := ''; 96 for I := 0 to High(SelectParts) do 97 Where := Where + 'OR (category=' + SelectParts[I] + ')'; 98 Where := Copy(Where, 3, Length(Where)); 99 if Where = '' then Where := '1'; 100 101 DbRows := Database.Query('SELECT *,UNIX_TIMESTAMP(date) as time FROM news WHERE ' + Where + ' ORDER BY date DESC LIMIT 0,' + IntToStr(MaxNewsItemCount)); for I := 0 to DbRows.Count - 1 do begin 102 NewsItem.LoadFromDbRecord(DbRows[I]); 103 NewItem := TRSSChannelItem.Create; 104 with NewItem do begin 105 (* 106 EnclosuresText := ''; 107 if Values['enclosure'] <> '' then begin 108 EnclosuresText := EnclosureText + '<br />Přílohy: '; 109 Enclosures := explode(';', $Row['enclosure']); 110 foreach($Enclosures as $Enclosure) 111 { 112 if(file_exists($UploadedFilesFolder.$Enclosure)) $EnclosuresText .= ' <a href="http://centrala.zdechov.net/aktuality/'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 113 } 114 } 115 *) 116 Title := TNewsCategory(News.NewsCategoryList[NewsItem.Category]).Title + ' - ' + NewsItem.Title; 117 Link := 'http://centrala.zdechov.net/aktuality/index.php?category=' + IntToStr(NewsItem.Category); 118 Description := NewsItem.Content + ' (' + NewsItem.Author + ')'; // + EnclosuresText; 119 Time := NewsItem.Time; 120 end; 121 Items.Add(NewItem); 122 end; 123 end; 124 NewsItem.Free; 125 News.Free; 126 Result := RSSChannel.ProduceOutput; 127 end; 128 129 { TNews } 130 131 constructor TNews.Create; 132 begin 133 NewsCategoryList := TList.Create; 134 end; 135 136 destructor TNews.Destroy; 137 var 138 I: Integer; 139 begin 140 for I := 0 to NewsCategoryList.Count - 1 do 141 TNewsCategory(NewsCategoryList[I]).Free; 142 NewsCategoryList.Free; 143 inherited Destroy; 144 end; 145 146 procedure TNews.LoadFromDb; 147 var 148 DbRows: TDbRows; 149 I: Integer; 150 NewCategory: TNewsCategory; 151 begin 152 DbRows := Database.Select('news_category', '*'); 153 for I := 0 to DbRows.Count - 1 do begin 154 NewCategory := TNewsCategory.Create; 155 NewCategory.LoadFromDbRecord(DbRows[I]); 156 NewsCategoryList.Add(NewCategory); 157 end; 158 DbRows.Free; 159 end; 160 161 { TNewsCategory } 162 163 procedure TNewsCategory.LoadFromDbRecord(DbRow: TAssocArray); 164 begin 165 Id := StrToInt(DbRow.Values['id']); 166 Title := DbRow.Values['caption']; 167 Permission := StrToInt(DbRow.Values['permission']); 168 end; 169 40 170 end. -
devel/web/UNewsPage.pas
r137 r138 6 6 7 7 function NewsShowItemPage: string; 8 8 function NewsShowListPage: string; 9 function RSSChannel: string; 10 9 11 implementation 10 12 11 13 uses 12 USqlDatabase, UCore, UHtmlClasses, SysUtils, pwmain, UNews; 14 USqlDatabase, UCore, SysUtils, pwmain, UNews; 15 16 function NewsChannelSelection: string; 17 begin 18 Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality'); 19 Result := Result + ShowFooter; 20 end; 21 22 function RSSChannel: string; 23 begin 24 // Result := ShowHeader('<strong>ZděchovNET</strong> - komunitní počítačová síť', 'Aktuality'); 25 Result := GenerateRSS; 26 // Result := Result + ShowFooter; 27 end; 13 28 14 29 function NewsShowItemPage: string; … … 26 41 Result := Result + '<div style="border: thin dotted #97ADFF; background: #F6F7FF; margin-top: 5px; ' + 27 42 'padding: 0px 5px 5px 5px;"><div style="padding-bottom: 1px; border-bottom-width: 1; border-bottom-style: ' + 28 'solid; border-bottom-color: silver;"><strong>' + NewsItem.Title + ' (' + DateToStr(NewsItem. Date) + ', ' + NewsItem.Author + ')</strong>';43 'solid; border-bottom-color: silver;"><strong>' + NewsItem.Title + ' (' + DateToStr(NewsItem.Time) + ', ' + NewsItem.Author + ')</strong>'; 29 44 (* if($this->System->Modules['User']->User['Id'] == $Row['User']) 30 45 { … … 79 94 Result := Result + '<div style="border: thin dotted #97ADFF; background: #F6F7FF; margin-top: 5px; padding: 0px 5px 5px 5px;"><div style="padding-bottom: 1px; border-bottom-width: 1;' + 80 95 'border-bottom-style: solid; border-bottom-color: silver;"><strong><a href="?p=news-item&id=' + 81 IntToStr(NewsItem.Id) + '">' + NewsItem.Title + '</a> (' + DateToStr(NewsItem. Date) + ', ' + NewsItem.Author + ')</strong>';96 IntToStr(NewsItem.Id) + '">' + NewsItem.Title + '</a> (' + DateToStr(NewsItem.Time) + ', ' + NewsItem.Author + ')</strong>'; 82 97 (* 83 98 if($this->System->Modules['User']->User['Id'] == $Row['User']) … … 111 126 RegisterPage('news-item', @NewsShowItemPage); 112 127 RegisterPage('news-list', @NewsShowListPage); 128 RegisterPage('news-rss', @RSSChannel); 129 RegisterPage('news-selection', @NewsChannelSelection); 113 130 114 131 end. -
devel/web/index.lpi
r137 r138 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <PathDelim Value="/"/> 5 <Version Value="6"/> 4 <Version Value="7"/> 6 5 <General> 7 6 <Flags> … … 9 8 <MainUnitHasCreateFormStatements Value="False"/> 10 9 <MainUnitHasTitleStatement Value="False"/> 10 <LRSInOutputDirectory Value="False"/> 11 11 </Flags> 12 12 <MainUnit Value="0"/> 13 <IconPath Value="./"/>14 13 <TargetFileExt Value=".exe"/> 15 <ActiveEditorIndexAtStart Value=" 2"/>14 <ActiveEditorIndexAtStart Value="9"/> 16 15 </General> 17 16 <VersionInfo> … … 30 29 </local> 31 30 </RunParams> 32 <Units Count="1 3">31 <Units Count="17"> 33 32 <Unit0> 34 33 <Filename Value="index.pas"/> 35 34 <IsPartOfProject Value="True"/> 36 <UnitName Value=" Hello"/>37 <CursorPos X=" 43" Y="16"/>35 <UnitName Value="Index"/> 36 <CursorPos X="1" Y="21"/> 38 37 <TopLine Value="1"/> 39 38 <EditorIndex Value="1"/> 40 <UsageCount Value=" 21"/>39 <UsageCount Value="44"/> 41 40 <Loaded Value="True"/> 42 41 </Unit0> … … 46 45 <UnitName Value="UMainPage"/> 47 46 <CursorPos X="32" Y="33"/> 48 <TopLine Value=" 28"/>47 <TopLine Value="155"/> 49 48 <EditorIndex Value="2"/> 50 <UsageCount Value=" 21"/>49 <UsageCount Value="44"/> 51 50 <Loaded Value="True"/> 52 51 </Unit1> … … 55 54 <IsPartOfProject Value="True"/> 56 55 <UnitName Value="USqlDatabase"/> 57 <CursorPos X=" 47" Y="96"/>58 <TopLine Value=" 79"/>56 <CursorPos X="51" Y="97"/> 57 <TopLine Value="84"/> 59 58 <EditorIndex Value="0"/> 60 <UsageCount Value=" 21"/>59 <UsageCount Value="44"/> 61 60 <Loaded Value="True"/> 62 61 </Unit2> … … 64 63 <Filename Value="UXmlClasses.pas"/> 65 64 <IsPartOfProject Value="True"/> 66 <UsageCount Value=" 21"/>65 <UsageCount Value="44"/> 67 66 </Unit3> 68 67 <Unit4> … … 70 69 <IsPartOfProject Value="True"/> 71 70 <UnitName Value="UCore"/> 72 <CursorPos X=" 38" Y="79"/>73 <TopLine Value=" 61"/>71 <CursorPos X="50" Y="18"/> 72 <TopLine Value="1"/> 74 73 <EditorIndex Value="4"/> 75 <UsageCount Value=" 21"/>74 <UsageCount Value="44"/> 76 75 <Loaded Value="True"/> 77 76 </Unit4> … … 83 82 <TopLine Value="81"/> 84 83 <EditorIndex Value="3"/> 85 <UsageCount Value=" 21"/>84 <UsageCount Value="44"/> 86 85 <Loaded Value="True"/> 87 86 </Unit5> … … 90 89 <IsPartOfProject Value="True"/> 91 90 <UnitName Value="UFinancePage"/> 92 <CursorPos X=" 45" Y="19"/>93 <TopLine Value="1 0"/>94 <EditorIndex Value=" 6"/>95 <UsageCount Value=" 21"/>91 <CursorPos X="38" Y="65"/> 92 <TopLine Value="11"/> 93 <EditorIndex Value="7"/> 94 <UsageCount Value="44"/> 96 95 <Loaded Value="True"/> 97 96 </Unit6> … … 100 99 <IsPartOfProject Value="True"/> 101 100 <UnitName Value="UHtmlClasses"/> 102 <CursorPos X=" 1" Y="1"/>103 <TopLine Value="1 "/>101 <CursorPos X="34" Y="30"/> 102 <TopLine Value="17"/> 104 103 <EditorIndex Value="5"/> 105 <UsageCount Value=" 21"/>104 <UsageCount Value="44"/> 106 105 <Loaded Value="True"/> 107 106 </Unit7> … … 110 109 <IsPartOfProject Value="True"/> 111 110 <UnitName Value="UNews"/> 112 <CursorPos X=" 5" Y="40"/>113 <TopLine Value=" 8"/>114 <EditorIndex Value=" 8"/>115 <UsageCount Value=" 21"/>111 <CursorPos X="38" Y="118"/> 112 <TopLine Value="98"/> 113 <EditorIndex Value="9"/> 114 <UsageCount Value="44"/> 116 115 <Loaded Value="True"/> 117 116 </Unit8> … … 120 119 <IsPartOfProject Value="True"/> 121 120 <UnitName Value="UNewsPage"/> 122 <CursorPos X=" 38" Y="100"/>123 <TopLine Value=" 82"/>124 <EditorIndex Value=" 7"/>125 <UsageCount Value=" 21"/>121 <CursorPos X="93" Y="96"/> 122 <TopLine Value="78"/> 123 <EditorIndex Value="8"/> 124 <UsageCount Value="44"/> 126 125 <Loaded Value="True"/> 127 126 </Unit9> … … 131 130 <CursorPos X="10" Y="94"/> 132 131 <TopLine Value="81"/> 133 <UsageCount Value=" 10"/>132 <UsageCount Value="8"/> 134 133 </Unit10> 135 134 <Unit11> … … 137 136 <CursorPos X="26" Y="17"/> 138 137 <TopLine Value="121"/> 139 <UsageCount Value=" 10"/>138 <UsageCount Value="8"/> 140 139 </Unit11> 141 140 <Unit12> … … 143 142 <CursorPos X="4" Y="33"/> 144 143 <TopLine Value="18"/> 144 <UsageCount Value="8"/> 145 </Unit12> 146 <Unit13> 147 <Filename Value="../../../../other/powtils/main/pwmain.pas"/> 148 <UnitName Value="pwmain"/> 149 <CursorPos X="24" Y="364"/> 150 <TopLine Value="351"/> 151 <EditorIndex Value="6"/> 152 <UsageCount Value="23"/> 153 <Loaded Value="True"/> 154 </Unit13> 155 <Unit14> 156 <Filename Value="urss.pas"/> 157 <IsPartOfProject Value="True"/> 158 <UnitName Value="URSS"/> 159 <CursorPos X="56" Y="86"/> 160 <TopLine Value="42"/> 161 <EditorIndex Value="10"/> 162 <UsageCount Value="32"/> 163 <Loaded Value="True"/> 164 </Unit14> 165 <Unit15> 166 <Filename Value="../../../../../../../usr/share/fpcsrc/rtl/objpas/sysutils/datih.inc"/> 167 <CursorPos X="10" Y="117"/> 168 <TopLine Value="115"/> 145 169 <UsageCount Value="10"/> 146 </Unit12> 170 </Unit15> 171 <Unit16> 172 <Filename Value="../../../../../../../usr/share/fpcsrc/rtl/objpas/dateutil.inc"/> 173 <CursorPos X="3" Y="624"/> 174 <TopLine Value="34"/> 175 <UsageCount Value="10"/> 176 </Unit16> 147 177 </Units> 148 <JumpHistory Count="2 8" HistoryIndex="27">178 <JumpHistory Count="23" HistoryIndex="22"> 149 179 <Position1> 150 <Filename Value="U MainPage.pas"/>151 <Caret Line=" 89" Column="88" TopLine="73"/>180 <Filename Value="UNews.pas"/> 181 <Caret Line="14" Column="3" TopLine="11"/> 152 182 </Position1> 153 183 <Position2> 154 <Filename Value="U MainPage.pas"/>155 <Caret Line=" 90" Column="80" TopLine="74"/>184 <Filename Value="UNews.pas"/> 185 <Caret Line="113" Column="64" TopLine="97"/> 156 186 </Position2> 157 187 <Position3> 158 <Filename Value="U MainPage.pas"/>159 <Caret Line=" 91" Column="96" TopLine="75"/>188 <Filename Value="UNews.pas"/> 189 <Caret Line="115" Column="2" TopLine="95"/> 160 190 </Position3> 161 191 <Position4> 162 <Filename Value="U MainPage.pas"/>163 <Caret Line=" 93" Column="39" TopLine="77"/>192 <Filename Value="UNews.pas"/> 193 <Caret Line="139" Column="33" TopLine="128"/> 164 194 </Position4> 165 195 <Position5> 166 <Filename Value=" UMainPage.pas"/>167 <Caret Line=" 94" Column="71" TopLine="78"/>196 <Filename Value="urss.pas"/> 197 <Caret Line="56" Column="1" TopLine="26"/> 168 198 </Position5> 169 199 <Position6> 170 <Filename Value="U MainPage.pas"/>171 <Caret Line=" 95" Column="84" TopLine="79"/>200 <Filename Value="UNews.pas"/> 201 <Caret Line="46" Column="8" TopLine="18"/> 172 202 </Position6> 173 203 <Position7> 174 <Filename Value="U MainPage.pas"/>175 <Caret Line=" 96" Column="76" TopLine="80"/>204 <Filename Value="UNews.pas"/> 205 <Caret Line="118" Column="20" TopLine="100"/> 176 206 </Position7> 177 207 <Position8> 178 <Filename Value="U MainPage.pas"/>179 <Caret Line=" 97" Column="80" TopLine="81"/>208 <Filename Value="UNews.pas"/> 209 <Caret Line="76" Column="14" TopLine="58"/> 180 210 </Position8> 181 211 <Position9> 182 <Filename Value="U MainPage.pas"/>183 <Caret Line=" 98" Column="77" TopLine="82"/>212 <Filename Value="UNews.pas"/> 213 <Caret Line="171" Column="24" TopLine="150"/> 184 214 </Position9> 185 215 <Position10> 186 <Filename Value="U MainPage.pas"/>187 <Caret Line="1 06" Column="88" TopLine="83"/>216 <Filename Value="UNews.pas"/> 217 <Caret Line="120" Column="29" TopLine="94"/> 188 218 </Position10> 189 219 <Position11> 190 <Filename Value="U MainPage.pas"/>191 <Caret Line=" 124" Column="104" TopLine="103"/>220 <Filename Value="UNews.pas"/> 221 <Caret Line="55" Column="73" TopLine="37"/> 192 222 </Position11> 193 223 <Position12> 194 <Filename Value="U MainPage.pas"/>195 <Caret Line="1 32" Column="64" TopLine="116"/>224 <Filename Value="UNewsPage.pas"/> 225 <Caret Line="18" Column="50" TopLine="1"/> 196 226 </Position12> 197 227 <Position13> 198 <Filename Value=" UMainPage.pas"/>199 <Caret Line=" 135" Column="47" TopLine="119"/>228 <Filename Value="urss.pas"/> 229 <Caret Line="22" Column="3" TopLine="20"/> 200 230 </Position13> 201 231 <Position14> 202 <Filename Value=" UMainPage.pas"/>203 <Caret Line=" 138" Column="35" TopLine="122"/>232 <Filename Value="urss.pas"/> 233 <Caret Line="96" Column="9" TopLine="64"/> 204 234 </Position14> 205 235 <Position15> 206 <Filename Value=" UMainPage.pas"/>207 <Caret Line=" 142" Column="56" TopLine="126"/>236 <Filename Value="urss.pas"/> 237 <Caret Line="92" Column="26" TopLine="64"/> 208 238 </Position15> 209 239 <Position16> 210 <Filename Value=" UMainPage.pas"/>211 <Caret Line=" 145" Column="51" TopLine="129"/>240 <Filename Value="urss.pas"/> 241 <Caret Line="8" Column="31" TopLine="1"/> 212 242 </Position16> 213 243 <Position17> 214 <Filename Value=" UMainPage.pas"/>215 <Caret Line=" 24" Column="3" TopLine="8"/>244 <Filename Value="urss.pas"/> 245 <Caret Line="92" Column="63" TopLine="64"/> 216 246 </Position17> 217 247 <Position18> 218 <Filename Value=" UMainPage.pas"/>219 <Caret Line=" 7" Column="48" TopLine="1"/>248 <Filename Value="urss.pas"/> 249 <Caret Line="93" Column="15" TopLine="64"/> 220 250 </Position18> 221 251 <Position19> 222 <Filename Value=" UMainPage.pas"/>223 <Caret Line=" 104" Column="39" TopLine="89"/>252 <Filename Value="urss.pas"/> 253 <Caret Line="96" Column="16" TopLine="64"/> 224 254 </Position19> 225 255 <Position20> 226 <Filename Value=" UMainPage.pas"/>227 <Caret Line=" 112" Column="36" TopLine="97"/>256 <Filename Value="urss.pas"/> 257 <Caret Line="8" Column="39" TopLine="1"/> 228 258 </Position20> 229 259 <Position21> 230 <Filename Value=" UMainPage.pas"/>231 <Caret Line=" 123" Column="44" TopLine="108"/>260 <Filename Value="urss.pas"/> 261 <Caret Line="91" Column="22" TopLine="64"/> 232 262 </Position21> 233 263 <Position22> 234 <Filename Value="U MainPage.pas"/>235 <Caret Line=" 178" Column="36" TopLine="163"/>264 <Filename Value="UNewsPage.pas"/> 265 <Caret Line="43" Column="101" TopLine="25"/> 236 266 </Position22> 237 267 <Position23> 238 <Filename Value="U MainPage.pas"/>239 <Caret Line=" 3" Column="109" TopLine="1"/>268 <Filename Value="UNews.pas"/> 269 <Caret Line="104" Column="27" TopLine="99"/> 240 270 </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>261 271 </JumpHistory> 262 272 </ProjectOptions> -
devel/web/index.pas
r137 r138 1 program Hello;1 program Index; 2 2 3 3 {$mode delphi}{$H+} … … 14 14 SetHeader('Content-Type', 'text/html; charset=utf-8'); 15 15 PageName := GetCgiVar('p'); 16 if PageName = '' then PageName := ' index';16 if PageName = '' then PageName := 'news-rss'; 17 17 I := 0; 18 18 while (I < Length(Pages)) and (Pages[I].Name <> PageName) do Inc(I);
Note:
See TracChangeset
for help on using the changeset viewer.