Changeset 42
- Timestamp:
- Nov 21, 2010, 8:49:46 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UCustomApplication.pas
r41 r42 6 6 7 7 uses 8 Classes, SysUtils, UHTTPServerCGI, Contnrs,USqlDatabase, UConfig, DateUtils,9 UXmlClasses, UHtmlClasses, UCore, U StringListEx, UHTTPServer, UHTTPServerTCP,10 UHTTPSessionMySQL, UHTTPSessionFile, UUser ;8 Classes, SysUtils, UHTTPServerCGI, USqlDatabase, UConfig, DateUtils, 9 UXmlClasses, UHtmlClasses, UCore, UHTTPServer, UHTTPServerTCP, 10 UHTTPSessionMySQL, UHTTPSessionFile, UUser, SpecializedObjectList; 11 11 12 12 type … … 41 41 Keywords: string; 42 42 HtmlDocument: THtmlDocument; 43 Pages: T ObjectList;43 Pages: TListObject; 44 44 Database: TSqlDatabase; 45 45 PageName: string; … … 137 137 inherited; 138 138 Database := TSqlDatabase.Create; 139 Pages := T ObjectList.Create;139 Pages := TListObject.Create; 140 140 HtmlDocument := THtmlDocument.Create; 141 141 User := TWebUser.Create; … … 246 246 Text := Text + '</ul>' + 247 247 '<ul class="MenuItem2">' + 248 '<li> </li>'; 249 //'<li>' + MakeLink('Přihlášení', NavigationLink('/uzivatel/prihlaseni/')) + '</li>'; 250 //$Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Translate('UserRegistration'), $this->System->MakeLink('UserList', 'Register')).'</li>'; 248 '<li>' + MakeLink('Přihlášení', NavigationLink('/uzivatel/prihlaseni/')) + '</li>'; 249 // $Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Translate('UserRegistration'), $this->System->MakeLink('UserList', 'Register')).'</li>'; 251 250 end else begin 252 251 Text := Text + '</ul>' + -
trunk/CGI.lpi
r41 r42 50 50 <IsPartOfProject Value="True"/> 51 51 <UnitName Value="CGI"/> 52 <EditorIndex Value=" 10"/>53 <WindowIndex Value="0"/> 54 <TopLine Value="1"/> 55 <CursorPos X=" 33" Y="4"/>52 <EditorIndex Value="2"/> 53 <WindowIndex Value="0"/> 54 <TopLine Value="1"/> 55 <CursorPos X="43" Y="6"/> 56 56 <UsageCount Value="203"/> 57 57 <Loaded Value="True"/> … … 62 62 <IsPartOfProject Value="True"/> 63 63 <UnitName Value="UMainPage"/> 64 <EditorIndex Value=" 4"/>65 <WindowIndex Value="0"/> 66 <TopLine Value=" 354"/>64 <EditorIndex Value="13"/> 65 <WindowIndex Value="0"/> 66 <TopLine Value="1"/> 67 67 <CursorPos X="47" Y="360"/> 68 68 <UsageCount Value="200"/> … … 88 88 <IsPartOfProject Value="True"/> 89 89 <UnitName Value="UCore"/> 90 <WindowIndex Value="0"/> 91 <TopLine Value="1"/> 90 <EditorIndex Value="10"/> 91 <WindowIndex Value="0"/> 92 <TopLine Value="33"/> 92 93 <CursorPos X="69" Y="51"/> 93 94 <UsageCount Value="203"/> 95 <Loaded Value="True"/> 94 96 <DefaultSyntaxHighlighter Value="Delphi"/> 95 97 </Unit4> … … 167 169 <IsPartOfProject Value="True"/> 168 170 <UnitName Value="UConfig"/> 169 <WindowIndex Value="0"/> 170 <TopLine Value="1"/> 171 <CursorPos X="58" Y="10"/> 171 <EditorIndex Value="1"/> 172 <WindowIndex Value="0"/> 173 <TopLine Value="1"/> 174 <CursorPos X="1" Y="1"/> 172 175 <UsageCount Value="294"/> 176 <Loaded Value="True"/> 173 177 <DefaultSyntaxHighlighter Value="Delphi"/> 174 178 </Unit13> … … 277 281 <Unit26> 278 282 <Filename Value="Common/UStringListEx.pas"/> 279 <IsPartOfProject Value="True"/>280 283 <UnitName Value="UStringListEx"/> 281 <EditorIndex Value="16"/> 282 <WindowIndex Value="0"/> 283 <TopLine Value="19"/> 284 <WindowIndex Value="0"/> 285 <TopLine Value="17"/> 284 286 <CursorPos X="32" Y="36"/> 285 287 <UsageCount Value="200"/> 286 <Loaded Value="True"/>287 288 <DefaultSyntaxHighlighter Value="Delphi"/> 288 289 </Unit26> … … 310 311 <IsPartOfProject Value="True"/> 311 312 <UnitName Value="UHtmlClasses"/> 312 <EditorIndex Value=" 9"/>313 <WindowIndex Value="0"/> 314 <TopLine Value="5 82"/>315 <CursorPos X=" 29" Y="600"/>313 <EditorIndex Value="11"/> 314 <WindowIndex Value="0"/> 315 <TopLine Value="549"/> 316 <CursorPos X="19" Y="569"/> 316 317 <UsageCount Value="200"/> 317 318 <Loaded Value="True"/> … … 322 323 <IsPartOfProject Value="True"/> 323 324 <UnitName Value="USqlDatabase"/> 324 <EditorIndex Value="5"/>325 325 <WindowIndex Value="0"/> 326 326 <TopLine Value="1"/> 327 327 <CursorPos X="64" Y="14"/> 328 328 <UsageCount Value="200"/> 329 <Loaded Value="True"/>330 329 <DefaultSyntaxHighlighter Value="Delphi"/> 331 330 </Unit30> … … 334 333 <IsPartOfProject Value="True"/> 335 334 <UnitName Value="UXmlClasses"/> 336 <EditorIndex Value=" 8"/>337 <WindowIndex Value="0"/> 338 <TopLine Value="1 "/>339 <CursorPos X=" 71" Y="7"/>335 <EditorIndex Value="7"/> 336 <WindowIndex Value="0"/> 337 <TopLine Value="101"/> 338 <CursorPos X="19" Y="119"/> 340 339 <UsageCount Value="200"/> 341 340 <Loaded Value="True"/> … … 429 428 <IsPartOfProject Value="True"/> 430 429 <UnitName Value="UHTTPServer"/> 431 <EditorIndex Value=" 7"/>432 <WindowIndex Value="0"/> 433 <TopLine Value=" 1"/>434 <CursorPos X=" 49" Y="9"/>430 <EditorIndex Value="3"/> 431 <WindowIndex Value="0"/> 432 <TopLine Value="265"/> 433 <CursorPos X="1" Y="269"/> 435 434 <UsageCount Value="340"/> 436 435 <Loaded Value="True"/> … … 441 440 <IsPartOfProject Value="True"/> 442 441 <UnitName Value="UHTTPServerTCP"/> 443 <WindowIndex Value="0"/> 444 <TopLine Value="1"/> 445 <CursorPos X="65" Y="100"/> 442 <EditorIndex Value="12"/> 443 <WindowIndex Value="0"/> 444 <TopLine Value="44"/> 445 <CursorPos X="27" Y="61"/> 446 446 <UsageCount Value="340"/> 447 <Loaded Value="True"/> 447 448 <DefaultSyntaxHighlighter Value="Delphi"/> 448 449 </Unit42> … … 451 452 <IsPartOfProject Value="True"/> 452 453 <UnitName Value="UHTTPServerCGI"/> 453 <WindowIndex Value="0"/> 454 <TopLine Value="1"/> 455 <CursorPos X="3" Y="29"/> 454 <EditorIndex Value="6"/> 455 <WindowIndex Value="0"/> 456 <TopLine Value="1"/> 457 <CursorPos X="50" Y="8"/> 456 458 <UsageCount Value="340"/> 459 <Loaded Value="True"/> 457 460 <DefaultSyntaxHighlighter Value="Delphi"/> 458 461 </Unit43> … … 461 464 <IsPartOfProject Value="True"/> 462 465 <UnitName Value="UTCPServer"/> 463 <EditorIndex Value="3"/>464 466 <WindowIndex Value="0"/> 465 467 <TopLine Value="1"/> 466 468 <CursorPos X="6" Y="15"/> 467 469 <UsageCount Value="339"/> 468 <Loaded Value="True"/>469 470 <DefaultSyntaxHighlighter Value="Delphi"/> 470 471 </Unit44> … … 473 474 <IsPartOfProject Value="True"/> 474 475 <UnitName Value="UPool"/> 475 <EditorIndex Value="6"/>476 476 <WindowIndex Value="0"/> 477 477 <TopLine Value="1"/> 478 478 <CursorPos X="53" Y="8"/> 479 479 <UsageCount Value="339"/> 480 <Loaded Value="True"/>481 480 <DefaultSyntaxHighlighter Value="Delphi"/> 482 481 </Unit45> … … 523 522 <IsPartOfProject Value="True"/> 524 523 <UnitName Value="UCustomApplication"/> 525 <IsVisibleTab Value="True"/> 526 <EditorIndex Value="2"/> 527 <WindowIndex Value="0"/> 528 <TopLine Value="231"/> 529 <CursorPos X="34" Y="247"/> 524 <EditorIndex Value="0"/> 525 <WindowIndex Value="0"/> 526 <TopLine Value="11"/> 527 <CursorPos X="20" Y="28"/> 530 528 <UsageCount Value="339"/> 531 529 <Loaded Value="True"/> … … 553 551 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedList.pas"/> 554 552 <UnitName Value="SpecializedList"/> 555 <EditorIndex Value=" 13"/>556 <WindowIndex Value="0"/> 557 <TopLine Value=" 144"/>558 <CursorPos X=" 37" Y="157"/>559 <UsageCount Value="1 1"/>553 <EditorIndex Value="4"/> 554 <WindowIndex Value="0"/> 555 <TopLine Value="39"/> 556 <CursorPos X="20" Y="56"/> 557 <UsageCount Value="10"/> 560 558 <Loaded Value="True"/> 561 559 </Unit53> 562 560 <Unit54> 563 561 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/> 564 <EditorIndex Value="12"/> 565 <WindowIndex Value="0"/> 566 <TopLine Value="1"/> 567 <CursorPos X="20" Y="15"/> 562 <IsVisibleTab Value="True"/> 563 <EditorIndex Value="5"/> 564 <WindowIndex Value="0"/> 565 <TopLine Value="23"/> 566 <CursorPos X="15" Y="40"/> 568 567 <UsageCount Value="100"/> 569 568 <Loaded Value="True"/> … … 571 570 <Unit55> 572 571 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/> 573 <EditorIndex Value=" 1"/>574 <WindowIndex Value="0"/> 575 <TopLine Value=" 33"/>576 <CursorPos X=" 39" Y="49"/>577 <UsageCount Value="1 1"/>572 <EditorIndex Value="9"/> 573 <WindowIndex Value="0"/> 574 <TopLine Value="1"/> 575 <CursorPos X="24" Y="11"/> 576 <UsageCount Value="10"/> 578 577 <Loaded Value="True"/> 579 578 </Unit55> 580 579 <Unit56> 581 580 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericQueue.inc"/> 582 <EditorIndex Value="11"/>583 581 <WindowIndex Value="0"/> 584 582 <TopLine Value="1"/> 585 583 <CursorPos X="50" Y="43"/> 586 <UsageCount Value="11"/> 587 <Loaded Value="True"/> 584 <UsageCount Value="10"/> 588 585 </Unit56> 589 586 <Unit57> 590 587 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericTree.inc"/> 591 <EditorIndex Value="15"/>592 588 <WindowIndex Value="0"/> 593 589 <TopLine Value="1"/> 594 590 <CursorPos X="49" Y="47"/> 595 <UsageCount Value="11"/> 596 <Loaded Value="True"/> 591 <UsageCount Value="10"/> 597 592 </Unit57> 598 593 <Unit58> 599 594 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedDictionary.pas"/> 600 595 <UnitName Value="SpecializedDictionary"/> 601 <EditorIndex Value=" 0"/>602 <WindowIndex Value="0"/> 603 <TopLine Value="1"/> 604 <CursorPos X="2 2" Y="21"/>596 <EditorIndex Value="8"/> 597 <WindowIndex Value="0"/> 598 <TopLine Value="1"/> 599 <CursorPos X="26" Y="18"/> 605 600 <UsageCount Value="100"/> 606 601 <Loaded Value="True"/> … … 609 604 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedObjectList.pas"/> 610 605 <UnitName Value="SpecializedObjectList"/> 611 <EditorIndex Value="14"/>612 606 <WindowIndex Value="0"/> 613 607 <TopLine Value="1"/> 614 608 <CursorPos X="27" Y="20"/> 615 <UsageCount Value="11"/> 616 <Loaded Value="True"/> 609 <UsageCount Value="10"/> 617 610 </Unit59> 618 611 </Units> 619 <JumpHistory Count=" 26" HistoryIndex="25">612 <JumpHistory Count="30" HistoryIndex="29"> 620 613 <Position1> 621 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>622 <Caret Line=" 6" Column="29" TopLine="1"/>614 <Filename Value="WebServer/UHTTPServer.pas"/> 615 <Caret Line="279" Column="24" TopLine="261"/> 623 616 </Position1> 624 617 <Position2> 625 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>626 <Caret Line=" 13" Column="6" TopLine="1"/>618 <Filename Value="WebServer/UHTTPServer.pas"/> 619 <Caret Line="281" Column="38" TopLine="264"/> 627 620 </Position2> 628 621 <Position3> 629 <Filename Value=" Common/USqlDatabase.pas"/>630 <Caret Line=" 123" Column="23" TopLine="106"/>622 <Filename Value="WebServer/UHTTPServer.pas"/> 623 <Caret Line="272" Column="19" TopLine="266"/> 631 624 </Position3> 632 625 <Position4> 633 <Filename Value=" Common/USqlDatabase.pas"/>634 <Caret Line=" 117" Column="19" TopLine="109"/>626 <Filename Value="WebServer/UHTTPServerCGI.pas"/> 627 <Caret Line="29" Column="3" TopLine="1"/> 635 628 </Position4> 636 629 <Position5> 637 <Filename Value=" Common/USqlDatabase.pas"/>638 <Caret Line=" 132" Column="46" TopLine="116"/>630 <Filename Value="WebServer/UHTTPServerCGI.pas"/> 631 <Caret Line="60" Column="69" TopLine="43"/> 639 632 </Position5> 640 633 <Position6> 641 <Filename Value="Common/U Pool.pas"/>642 <Caret Line=" 8" Column="43" TopLine="1"/>634 <Filename Value="Common/UXmlClasses.pas"/> 635 <Caret Line="7" Column="50" TopLine="1"/> 643 636 </Position6> 644 637 <Position7> 645 <Filename Value=" WebServer/UHTTPServer.pas"/>646 <Caret Line=" 11" Column="62" TopLine="1"/>638 <Filename Value="Common/UXmlClasses.pas"/> 639 <Caret Line="31" Column="28" TopLine="14"/> 647 640 </Position7> 648 641 <Position8> 649 642 <Filename Value="Common/UXmlClasses.pas"/> 650 <Caret Line=" 61" Column="29" TopLine="44"/>643 <Caret Line="59" Column="28" TopLine="42"/> 651 644 </Position8> 652 645 <Position9> 653 <Filename Value="Common/U HtmlClasses.pas"/>654 <Caret Line=" 299" Column="56" TopLine="279"/>646 <Filename Value="Common/UXmlClasses.pas"/> 647 <Caret Line="60" Column="1" TopLine="43"/> 655 648 </Position9> 656 649 <Position10> 657 <Filename Value="Common/U HtmlClasses.pas"/>658 <Caret Line="8 " Column="71" TopLine="1"/>650 <Filename Value="Common/UXmlClasses.pas"/> 651 <Caret Line="83" Column="54" TopLine="66"/> 659 652 </Position10> 660 653 <Position11> 661 <Filename Value="Common/U HtmlClasses.pas"/>662 <Caret Line=" 16" Column="42" TopLine="1"/>654 <Filename Value="Common/UXmlClasses.pas"/> 655 <Caret Line="31" Column="26" TopLine="14"/> 663 656 </Position11> 664 657 <Position12> 665 <Filename Value="Common/U SqlDatabase.pas"/>666 <Caret Line=" 125" Column="27" TopLine="120"/>658 <Filename Value="Common/UXmlClasses.pas"/> 659 <Caret Line="83" Column="55" TopLine="66"/> 667 660 </Position12> 668 661 <Position13> 669 <Filename Value="Common/U HtmlClasses.pas"/>670 <Caret Line=" 19" Column="46" TopLine="1"/>662 <Filename Value="Common/UXmlClasses.pas"/> 663 <Caret Line="8" Column="24" TopLine="1"/> 671 664 </Position13> 672 665 <Position14> 673 <Filename Value="Common/U HtmlClasses.pas"/>674 <Caret Line=" 383" Column="8" TopLine="367"/>666 <Filename Value="Common/UXmlClasses.pas"/> 667 <Caret Line="60" Column="21" TopLine="43"/> 675 668 </Position14> 676 669 <Position15> 677 <Filename Value="Common/U HtmlClasses.pas"/>678 <Caret Line=" 386" Column="10" TopLine="367"/>670 <Filename Value="Common/UXmlClasses.pas"/> 671 <Caret Line="84" Column="93" TopLine="67"/> 679 672 </Position15> 680 673 <Position16> 681 <Filename Value="Common/U HtmlClasses.pas"/>682 <Caret Line=" 387" Column="10" TopLine="367"/>674 <Filename Value="Common/UXmlClasses.pas"/> 675 <Caret Line="118" Column="14" TopLine="101"/> 683 676 </Position16> 684 677 <Position17> 685 <Filename Value="Common/U HtmlClasses.pas"/>686 <Caret Line="3 89" Column="22" TopLine="367"/>678 <Filename Value="Common/UXmlClasses.pas"/> 679 <Caret Line="32" Column="23" TopLine="15"/> 687 680 </Position17> 688 681 <Position18> 689 682 <Filename Value="Common/UHtmlClasses.pas"/> 690 <Caret Line=" 390" Column="34" TopLine="367"/>683 <Caret Line="600" Column="29" TopLine="579"/> 691 684 </Position18> 692 685 <Position19> 693 686 <Filename Value="Common/UHtmlClasses.pas"/> 694 <Caret Line=" 391" Column="34" TopLine="367"/>687 <Caret Line="8" Column="50" TopLine="1"/> 695 688 </Position19> 696 689 <Position20> 697 690 <Filename Value="Common/UHtmlClasses.pas"/> 698 <Caret Line=" 392" Column="34" TopLine="367"/>691 <Caret Line="273" Column="25" TopLine="242"/> 699 692 </Position20> 700 693 <Position21> 701 694 <Filename Value="Common/UHtmlClasses.pas"/> 702 <Caret Line=" 393" Column="34" TopLine="367"/>695 <Caret Line="280" Column="25" TopLine="262"/> 703 696 </Position21> 704 697 <Position22> 705 698 <Filename Value="Common/UHtmlClasses.pas"/> 706 <Caret Line="3 99" Column="10" TopLine="383"/>699 <Caret Line="388" Column="39" TopLine="366"/> 707 700 </Position22> 708 701 <Position23> 709 702 <Filename Value="Common/UHtmlClasses.pas"/> 710 <Caret Line=" 582" Column="9" TopLine="566"/>703 <Caret Line="472" Column="22" TopLine="450"/> 711 704 </Position23> 712 705 <Position24> 713 706 <Filename Value="Common/UHtmlClasses.pas"/> 714 <Caret Line=" 583" Column="17" TopLine="566"/>707 <Caret Line="499" Column="28" TopLine="482"/> 715 708 </Position24> 716 709 <Position25> 717 <Filename Value=" Common/UHtmlClasses.pas"/>718 <Caret Line=" 595" Column="11" TopLine="566"/>710 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 711 <Caret Line="100" Column="65" TopLine="1"/> 719 712 </Position25> 720 713 <Position26> 721 <Filename Value=" Common/UHtmlClasses.pas"/>722 <Caret Line=" 598" Column="11" TopLine="582"/>714 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 715 <Caret Line="8" Column="62" TopLine="1"/> 723 716 </Position26> 717 <Position27> 718 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 719 <Caret Line="32" Column="25" TopLine="15"/> 720 </Position27> 721 <Position28> 722 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 723 <Caret Line="48" Column="27" TopLine="31"/> 724 </Position28> 725 <Position29> 726 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 727 <Caret Line="52" Column="52" TopLine="35"/> 728 </Position29> 729 <Position30> 730 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 731 <Caret Line="61" Column="27" TopLine="44"/> 732 </Position30> 724 733 </JumpHistory> 725 734 </ProjectOptions> -
trunk/CGI.lpr
r36 r42 4 4 5 5 uses 6 UCore, USqlDatabase, SysUtils, Contnrs, UStringListEx,6 UCore, USqlDatabase, SysUtils, Contnrs, 7 7 UMainPage, UCustomApplication, UUser, UHTTPSessionMySQL, UHTTPSessionFile, 8 8 UCommon, UHTTPServer, UHTTPServerTCP, UHTTPServerCGI, UTCPServer, UPool, -
trunk/Common/UHtmlClasses.pas
r40 r42 6 6 7 7 uses 8 UXmlClasses, Classes, SysUtils, UStringListEx, SpecializedObjectList;8 UXmlClasses, Classes, SysUtils, SpecializedList, SpecializedObjectList; 9 9 10 10 type … … 257 257 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 258 258 Name := 'meta'; 259 Attributes.Add NameValue('http-equiv', 'Content-Language');260 Attributes.Add NameValue('content', ContentLanguage);259 Attributes.Add('http-equiv', 'Content-Language'); 260 Attributes.Add('content', ContentLanguage); 261 261 end; 262 262 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 263 263 Name := 'meta'; 264 Attributes.Add NameValue('http-equiv', 'Content-Type');265 Attributes.Add NameValue('content', 'text/html; charset=' + ContentEncoding);264 Attributes.Add('http-equiv', 'Content-Type'); 265 Attributes.Add('content', 'text/html; charset=' + ContentEncoding); 266 266 end; 267 267 for I := 0 to Styles.Count - 1 do 268 268 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 269 269 Name := 'link'; 270 Attributes.Add NameValue('rel', 'stylesheet');271 Attributes.Add NameValue('href', Styles[I]);272 Attributes.Add NameValue('type', 'text/css');273 Attributes.Add NameValue('media', 'all');270 Attributes.Add('rel', 'stylesheet'); 271 Attributes.Add('href', Styles[I]); 272 Attributes.Add('type', 'text/css'); 273 Attributes.Add('media', 'all'); 274 274 end; 275 275 for I := 0 to Scripts.Count - 1 do … … 277 277 Name := 'script'; 278 278 ShringEmpty := False; 279 Attributes.Add NameValue('type', 'text/javascript');280 Attributes.Add NameValue('src', Scripts[I]);279 Attributes.Add('type', 'text/javascript'); 280 Attributes.Add('src', Scripts[I]); 281 281 end; 282 282 end; … … 381 381 procedure TIpAddress.SetAsString(const Value: string); 382 382 var 383 Parts: T StringListEx;383 Parts: TListString; 384 384 begin 385 385 try 386 Parts := T StringListEx.Create;387 Parts.Explode( '.', Value);386 Parts := TListString.Create; 387 Parts.Explode(Value, '.', StrToStr); 388 388 try 389 389 // if Length(Parts) = 4 then begin … … 465 465 procedure TDomainAddress.SetAsString(const Value: string); 466 466 var 467 StrArray: T StringListEx;467 StrArray: TListString; 468 468 I: Integer; 469 469 begin 470 470 try 471 StrArray := T StringListEx.Create;472 StrArray.Explode( '.', Value);471 StrArray := TListString.Create; 472 StrArray.Explode(Value, '.', StrToStr); 473 473 SetLength(Levels, StrArray.Count); 474 474 for I := 0 to StrArray.Count do … … 497 497 with TXmlTag(Result) do begin 498 498 Name := 'a'; 499 Attributes.Add('href ='+Target.AsString);499 Attributes.Add('href', Target.AsString); 500 500 if Assigned(Content) then SubElements.Add(Content.AsXmlElement); 501 501 end; … … 564 564 with TXmlTag(Result) do begin 565 565 Name := 'img'; 566 Attributes.Add NameValue('src', Source.AsString);567 Attributes.Add NameValue('width', IntToStr(Size.Width));568 Attributes.Add NameValue('height', IntToStr(Size.Height));569 Attributes.Add NameValue('alt', AlternateText);566 Attributes.Add('src', Source.AsString); 567 Attributes.Add('width', IntToStr(Size.Width)); 568 Attributes.Add('height', IntToStr(Size.Height)); 569 Attributes.Add('alt', AlternateText); 570 570 end; 571 571 end; -
trunk/Common/UXmlClasses.pas
r40 r42 5 5 interface 6 6 7 uses Classes, SysUtils, StrUtils, UStringListEx, SpecializedObjectList; 7 uses Classes, SysUtils, StrUtils, SpecializedList, SpecializedObjectList, 8 SpecializedDictionary; 8 9 9 10 type … … 29 30 ShringEmpty: Boolean; 30 31 Name: string; 31 Attributes: T StringListEx;32 Attributes: TDictionaryStringString; 32 33 SubElements: TListObject; // TListObject<TXmlElement>; 33 34 constructor Create; … … 57 58 begin 58 59 ShringEmpty := True; 59 Attributes := TStringListEx.Create; 60 Attributes.NameValueSeparator := '='; 60 Attributes := TDictionaryStringString.Create; 61 61 SubElements := TListObject.Create; 62 62 EndTagSymbol := '/'; … … 82 82 AttributesText := ''; 83 83 for I := 0 to Attributes.Count - 1 do 84 AttributesText := AttributesText + ' ' + Attributes. Names[I] + '="' + Attributes.ValueFromIndex[I]+ '"';84 AttributesText := AttributesText + ' ' + Attributes.Keys[I] + '="' + Attributes[I].Value + '"'; 85 85 86 86 if Name <> '' then begin … … 116 116 Name := '?xml'; 117 117 EndTagSymbol := '?'; 118 Attributes.Add NameValue('version', '1.0');119 Attributes.Add NameValue('encoding', 'utf-8');118 Attributes.Add('version', '1.0'); 119 Attributes.Add('encoding', 'utf-8'); 120 120 end; 121 121 Content := TXmlTag.Create; -
trunk/WebServer/UHTTPServer.pas
r40 r42 7 7 uses 8 8 Classes, SysUtils, UTCPServer, UCommon, UMemoryStreamEx, UMIMEType, 9 Synautil, UStringListEx, SpecializedObjectList;9 Synautil, SpecializedObjectList, SpecializedList; 10 10 11 11 type … … 29 29 THTTPRequest = class 30 30 Query: TQueryParameterList; 31 QueryParts: T StringListEx;31 QueryParts: TListString; 32 32 Path: string; 33 33 Method: string; … … 253 253 begin 254 254 Query := TQueryParameterList.Create; 255 QueryParts := T StringListEx.Create;255 QueryParts := TListString.Create; 256 256 Headers := TStringList.Create; 257 257 Cookies := TCookieList.Create; … … 272 272 var 273 273 I: Integer; 274 Parts: T StringListEx;275 Pair: T StringListEx;274 Parts: TListString; 275 Pair: TListString; 276 276 begin 277 277 try 278 Parts := T StringListEx.Create;279 Pair := T StringListEx.Create;278 Parts := TListString.Create; 279 Pair := TListString.Create; 280 280 Clear; 281 Parts.Explode( '&', Text);281 Parts.Explode(Text, '&', StrToStr); 282 282 for I := 0 to Parts.Count - 1 do begin 283 Pair.Explode( '=', Parts[I]);283 Pair.Explode(Parts[I], '=', StrToStr); 284 284 if Pair.Count >= 2 then 285 285 Values[Pair[0]] := Pair[1]; … … 307 307 var 308 308 I: Integer; 309 Parts: T StringListEx;310 Pair: T StringListEx;309 Parts: TListString; 310 Pair: TListString; 311 311 begin 312 312 try 313 Parts := T StringListEx.Create;314 Pair := T StringListEx.Create;313 Parts := TListString.Create; 314 Pair := TListString.Create; 315 315 Clear; 316 Parts.Explode( ';', Text);316 Parts.Explode(Text, ';', StrToStr); 317 317 for I := 0 to Parts.Count - 1 do begin 318 Pair.Explode( '=', Parts[I]);318 Pair.Explode(Parts[I], '=', StrToStr); 319 319 if Pair.Count >= 2 then 320 320 Values[Trim(Pair[0])] := Trim(Pair[1]); -
trunk/WebServer/UHTTPServerCGI.pas
r34 r42 6 6 7 7 uses 8 Classes, SysUtils, UHTTPServer ;8 Classes, SysUtils, UHTTPServer, SpecializedList; 9 9 10 10 type … … 58 58 EnvVars.Values['QUERY_STRING'] := Copy(EnvVars.Values['QUERY_STRING'], 1, 59 59 Length(EnvVars.Values['QUERY_STRING']) - 1); 60 Request.QueryParts.Explode( '/', EnvVars.Values['QUERY_STRING']);60 Request.QueryParts.Explode(EnvVars.Values['QUERY_STRING'], '/', StrToStr); 61 61 if Pos('?', EnvVars.Values['REQUEST_URI']) > 0 then 62 62 Request.Query.Parse(Copy(EnvVars.Values['REQUEST_URI'], -
trunk/WebServer/UHTTPServerTCP.pas
r32 r42 6 6 7 7 uses 8 Classes, SysUtils, UHTTPServer, UTCPServer, UStringListEx, SynaUtil;8 Classes, SysUtils, UHTTPServer, UTCPServer, SpecializedList, SynaUtil; 9 9 10 10 type … … 30 30 Line: string; 31 31 LineIndex: Integer; 32 LineParts: T StringListEx;32 LineParts: TListString; 33 33 HandlerData: THTTPHandlerData; 34 34 I: Integer; … … 46 46 LineIndex := 0; 47 47 try 48 LineParts := T StringListEx.Create;48 LineParts := TListString.Create; 49 49 repeat 50 50 Line := RecvString(10000); 51 51 if (LineIndex = 0) then begin 52 LineParts.Explode( ' ', Line);52 LineParts.Explode(Line, ' ', StrToStr); 53 53 if (LineParts.Count >= 3) then begin 54 54 Request.Method := LineParts[0]; … … 59 59 end; 60 60 end else begin 61 LineParts.Explode( ' ', Line, 2);61 LineParts.Explode(Line, ' ', StrToStr, 2); 62 62 if (LineParts.Count = 2) and (LineParts[0][Length(LineParts[0])] = ':') then begin 63 63 LineParts[0] := Copy(LineParts[0], 1, Length(LineParts[0]) - 1);
Note:
See TracChangeset
for help on using the changeset viewer.