.
+
+
+PHP4Delphi forum
+http://sourceforge.net/forum/forum.php?forum_id=324242
+
+Authors:
+Serhiy Perevoznyk
+Belgium
+serge_perevoznyk@hotmail.com
+http://users.telenet.be/ws36637
+http://delphi32.blogspot.com
+
+Lew Zienin
+Ukraine
+levzenin@pm.me
+
+Nikita Ganzikov
+Ukraine
+pig-l@mail.ru
diff --git a/Source/Clear.bat b/Source/Clear.bat
new file mode 100644
index 0000000..a1358fa
--- /dev/null
+++ b/Source/Clear.bat
@@ -0,0 +1,8 @@
+del /f php4delphi.dcu
+del /f phpFunctions.dcu
+del /f DelphiFunctions.dcu
+del /f PHPCommon.dcu
+del /f PHPAPI.dcu
+del /f ZENDAPI.dcu
+del /f PHPTypes.dcu
+del /f ZendTypes.dcu
diff --git a/Source/ConverterBackup/php4DelphiR2010.dpk b/Source/ConverterBackup/php4DelphiR2010.dpk
new file mode 100644
index 0000000..8ffc056
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dpk
@@ -0,0 +1,50 @@
+package php4DelphiR2010;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/ConverterBackup/php4DelphiR2010.dproj b/Source/ConverterBackup/php4DelphiR2010.dproj
new file mode 100644
index 0000000..113eeaf
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dproj
@@ -0,0 +1,122 @@
+
+
+ {DB360964-FCA5-4943-AD27-13C4B2BC0549}
+ php4DelphiR2010.dpk
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ ..\..\..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2010.bpl
+ 00400000
+ true
+ x86
+ php4Delphi (run-rime)
+ true
+ false
+ false
+ true
+ true
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2010.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/ConverterBackup/php4DelphiR2010.dproj.2007 b/Source/ConverterBackup/php4DelphiR2010.dproj.2007
new file mode 100644
index 0000000..3d746af
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dproj.2007
@@ -0,0 +1,120 @@
+
+
+ {DB360964-FCA5-4943-AD27-13C4B2BC0549}
+ php4DelphiR2010.dpk
+ Debug
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ ..\..\..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2010.bpl
+ 00400000
+ true
+ x86
+ php4Delphi (run-rime)
+ true
+ false
+ false
+ true
+ true
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2010.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/DelphiFunctions.pas b/Source/DelphiFunctions.pas
new file mode 100644
index 0000000..23892b4
--- /dev/null
+++ b/Source/DelphiFunctions.pas
@@ -0,0 +1,123 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: DelphiFunctions.pas,v 7.2 10/2009 delphi32 Exp $ }
+
+unit DelphiFunctions;
+
+interface
+uses
+ Dialogs,
+ SysUtils, Classes,
+ ZendTypes, ZendAPI, PHPTypes, PHPAPI, typinfo;
+
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+
+var
+
+ author_class_entry : Tzend_class_entry;
+ delphi_object_entry : TZend_class_entry;
+ DelphiObject : pzend_class_entry;
+ ce : pzend_class_entry;
+ DelphiObjectHandlers : _zend_object_handlers;
+
+
+procedure RegisterInternalClasses(p : pointer);
+
+//proto string delphi_str_date(void)
+procedure delphi_str_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+
+//proto float delphi_date(void)
+procedure delphi_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+
+//proto string delphi_input_box(string caption, string prompt, string default)
+procedure delphi_input_box(ht : integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+
+procedure delphi_get_author(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+
+const
+ SimpleProps = [tkInteger, tkChar, tkEnumeration, tkFloat,
+ tkString, tkWChar, tkLString, tkWString, tkVariant];
+
+implementation
+
+//proto string delphi_str_date(void)
+procedure delphi_str_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+begin
+ ZVAL_STRING(return_value, zend_pchar(DateToStr(Date)), true);
+end;
+
+//proto float delphi_date(void)
+procedure delphi_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+begin
+ ZVALVAL(return_value, Date);
+end;
+//proto string delphi_input_box(string caption, string prompt, string default)
+procedure delphi_input_box(ht : integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var p: pzval_array;
+begin
+if ht <> 3 then
+begin
+ zend_wrong_param_count(TSRMLS_DC);
+ exit;
+end;
+ zend_get_parameters_my(ht, p, TSRMLS_DC);
+ {$IFNDEF PHP7}
+ ZVAL_STRINGW(return_value, PWideChar(InputBox( Z_STRVAL(p[0]^), Z_STRVAL(p[1]^), Z_STRVAL(p[2]^) )), true);
+ {$ENDIF}
+ dispose_pzval_array(p);
+end;
+
+//Delphi objects support
+procedure delphi_get_author(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ properties : array[0..3] of zend_pchar;
+begin
+ properties[0] := 'name';
+ properties[1] := 'last';
+ properties[2] := 'height';
+ properties[3] := 'email';
+ object_init(return_value, ce, TSRMLS_DC );
+ add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
+ add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Perevoznyk', 1, TSRMLS_DC);
+ add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
+ add_property_string_ex(return_value, properties[3], strlen(properties[3]) + 1, 'serge_perevoznyk@hotmail.com', 1, TSRMLS_DC);
+end;
+
+
+
+
+procedure RegisterInternalClasses(p : pointer);
+
+begin
+ {$IFDEF PHP7}
+ !
+ {$ELSE}
+ Move(zend_get_std_object_handlers()^, DelphiObjectHandlers, sizeof(_zend_object_handlers));
+
+ DelphiObject := zend_register_internal_class(@delphi_object_entry, p);
+
+ INIT_CLASS_ENTRY(author_class_entry, 'php4delphi_author', nil);
+ ce := zend_register_internal_class(@author_class_entry, p);
+ {$ENDIF}
+end;
+end.
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class_module.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.ddp
similarity index 100%
rename from Demos/Extensions/Delphi Class 1/delphi_class_module.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.ddp
diff --git a/Demos/Extensions/Borland Demo/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dfm
similarity index 93%
rename from Demos/Extensions/Borland Demo/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dfm
index d037d11..adbf54b 100644
--- a/Demos/Extensions/Borland Demo/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dfm
@@ -1,248 +1,246 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- OnCreate = PHPExtensionCreate
- OnDestroy = PHPExtensionDestroy
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'produce_page'
- Tag = 0
- Parameters = <
- item
- Name = 'Action'
- ParamType = tpString
- end>
- OnExecute = PHPExtension1Functions0Execute
- end
- item
- FunctionName = 'runquery'
- Tag = 0
- Parameters = <
- item
- Name = 'CustNo'
- ParamType = tpString
- end>
- OnExecute = PHPExtension1Functions1Execute
- end>
- ModuleName = 'borland_demo'
- Left = 192
- Top = 168
- Height = 640
- Width = 870
- object Customer: TTable
- DatabaseName = 'Phpdemo'
- SessionName = 'Session1_2'
- IndexFieldNames = 'Company'
- TableName = 'CUSTOMER.DB'
- Left = 26
- Top = 64
- object CustomerCustNo: TFloatField
- FieldName = 'CustNo'
- end
- object CustomerCompany: TStringField
- FieldName = 'Company'
- Size = 30
- end
- end
- object BioLife: TTable
- DatabaseName = 'Phpdemo'
- SessionName = 'Session1_2'
- TableName = 'biolife.db'
- Left = 25
- Top = 126
- object BioLifeSpeciesNo: TFloatField
- FieldName = 'Species No'
- end
- object BioLifeCategory: TStringField
- FieldName = 'Category'
- Size = 15
- end
- object BioLifeCommon_Name: TStringField
- FieldName = 'Common_Name'
- Size = 30
- end
- object BioLifeSpeciesName: TStringField
- FieldName = 'Species Name'
- Size = 40
- end
- object BioLifeLengthcm: TFloatField
- FieldName = 'Length (cm)'
- end
- object BioLifeLength_In: TFloatField
- FieldName = 'Length_In'
- end
- object BioLifeNotes: TMemoField
- FieldName = 'Notes'
- OnGetText = BioLifeNotesGetText
- BlobType = ftMemo
- Size = 50
- end
- object BioLifeGraphic: TGraphicField
- FieldName = 'Graphic'
- OnGetText = BioLifeGraphicGetText
- BlobType = ftGraphic
- end
- end
- object Root: TPageProducer
- HTMLDoc.Strings = (
- ''
- 'PHP Example ( Former ISAPI/NSAPI/CGI Example) '
- ''
- 'PHP Example server '
- ''
- 'Web Examples '
- '
'
- 'TPageProducer using a Custom Tag '
- 'For an example of using a TPageProducer with a Custom Tag click'
-
- 'here . This exam' +
- 'ple returns'
-
- 'list of all customers from the Customer.DB table. You can click' +
- ' the customer'#39's'
- 'name to view a listing of their orders.'
- '
'
- 'TDatasetPageProducer '
-
- 'For an example of using the TDatasetPageProducer and of returnin' +
- 'g a graphic'
-
- 'from a table click here' +
- 'A>. This example'
-
- 'makes use of the JPeg unit to display a bitmap stored in the gra' +
- 'phic field of the'
- 'Biolife.DB table.'
- ''
- 'Server Redirect '
-
- 'Click here for a dem' +
- 'onstration of'
- 'how to redirect a use to an other web site. '
- ''
- ''
- ''
- ''
- ' '
- ' ')
- OnHTMLTag = RootHTMLTag
- Left = 26
- Top = 176
- end
- object BioLifeProducer: TDataSetPageProducer
- HTMLDoc.Strings = (
- ''
- '
'
- ' Biolife Data '
- ''
- ''
- '
'
- ''
- 'Category: '
- ''
- '<#Category> '
- ' '
- ''
- ''
- 'Common Name: '
- ''
- '<#Common_Name> '
- ' '
- ''
- ''
- 'Notes: '
- ''
- '<#Notes> '
- ' '
- ''
- ''
- 'Picture: '
- ''
- '<#Graphic> '
- ' '
- '
'
- ''
- ''
- '')
- DataSet = BioLife
- Left = 110
- Top = 126
- end
- object CustSource: TDataSource
- DataSet = Customer
- Left = 90
- Top = 65
- end
- object CustomerOrders: TQueryTableProducer
- Caption = 'Customer Orders'
- Columns = <
- item
- FieldName = 'OrderNo'
- end
- item
- FieldName = 'SaleDate'
- Title.Align = haCenter
- end
- item
- FieldName = 'ShipDate'
- end>
- Query = Query1
- TableAttributes.Border = 1
- TableAttributes.CellSpacing = 1
- TableAttributes.CellPadding = 1
- TableAttributes.Width = 50
- Left = 170
- Top = 64
- end
- object CustomerList: TPageProducer
- HTMLDoc.Strings = (
- ''
- ''
- ''
- ''
- ''
- 'Sample Delphi Web server application '
- ''
- ''
- 'Customer Order Information '
- ' '
- 'Click a customer name to view their orders.'
- '<#CUSTLIST>
'
- ''
- ''
- ' ')
- OnHTMLTag = CustomerListHTMLTag
- Left = 118
- Top = 9
- end
- object Query1: TQuery
- DatabaseName = 'Phpdemo'
- SessionName = 'Session1_2'
- DataSource = CustSource
- SQL.Strings = (
- 'SELECT *'
- 'FROM ORDERS'
- 'WHERE'
- '(CustNo = :CustNo)')
- Left = 24
- Top = 8
- ParamData = <
- item
- DataType = ftFloat
- Name = 'CustNo'
- ParamType = ptUnknown
- end>
- end
- object Database1: TDatabase
- AliasName = 'DBDEMOS'
- DatabaseName = 'Phpdemo'
- SessionName = 'Session1_2'
- Left = 240
- Top = 200
- end
- object Session1: TSession
- AutoSessionName = True
- Left = 164
- Top = 212
- end
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ OnCreate = PHPExtensionCreate
+ OnDestroy = PHPExtensionDestroy
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'produce_page'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Action'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'runquery'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'CustNo'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'borland_demo'
+ Height = 640
+ Width = 870
+ object Customer: TTable
+ DatabaseName = 'Phpdemo'
+ SessionName = 'Session1_1'
+ IndexFieldNames = 'Company'
+ TableName = 'CUSTOMER.DB'
+ Left = 26
+ Top = 64
+ object CustomerCustNo: TFloatField
+ FieldName = 'CustNo'
+ end
+ object CustomerCompany: TStringField
+ FieldName = 'Company'
+ Size = 30
+ end
+ end
+ object BioLife: TTable
+ DatabaseName = 'Phpdemo'
+ SessionName = 'Session1_1'
+ TableName = 'biolife.db'
+ Left = 25
+ Top = 126
+ object BioLifeSpeciesNo: TFloatField
+ FieldName = 'Species No'
+ end
+ object BioLifeCategory: TStringField
+ FieldName = 'Category'
+ Size = 15
+ end
+ object BioLifeCommon_Name: TStringField
+ FieldName = 'Common_Name'
+ Size = 30
+ end
+ object BioLifeSpeciesName: TStringField
+ FieldName = 'Species Name'
+ Size = 40
+ end
+ object BioLifeLengthcm: TFloatField
+ FieldName = 'Length (cm)'
+ end
+ object BioLifeLength_In: TFloatField
+ FieldName = 'Length_In'
+ end
+ object BioLifeNotes: TMemoField
+ FieldName = 'Notes'
+ OnGetText = BioLifeNotesGetText
+ BlobType = ftMemo
+ Size = 50
+ end
+ object BioLifeGraphic: TGraphicField
+ FieldName = 'Graphic'
+ OnGetText = BioLifeGraphicGetText
+ BlobType = ftGraphic
+ end
+ end
+ object Root: TPageProducer
+ HTMLDoc.Strings = (
+ ''
+ '
PHP Example ( Former ISAPI/NSAPI/CGI Example) '
+ ''
+ 'PHP Example server '
+ ''
+ 'Web Examples '
+ '
'
+ 'TPageProducer using a Custom Tag '
+ 'For an example of using a TPageProducer with a Custom Tag click'
+
+ 'here . This exam' +
+ 'ple returns'
+
+ 'list of all customers from the Customer.DB table. You can click' +
+ ' the customer'#39's'
+ 'name to view a listing of their orders.'
+ '
'
+ 'TDatasetPageProducer '
+
+ 'For an example of using the TDatasetPageProducer and of returnin' +
+ 'g a graphic'
+
+ 'from a table click here' +
+ 'A>. This example'
+
+ 'makes use of the JPeg unit to display a bitmap stored in the gra' +
+ 'phic field of the'
+ 'Biolife.DB table.'
+ ''
+ 'Server Redirect '
+
+ 'Click here for a dem' +
+ 'onstration of'
+ 'how to redirect a use to an other web site. '
+ ''
+ ''
+ ''
+ ''
+ ' '
+ ' ')
+ OnHTMLTag = RootHTMLTag
+ Left = 26
+ Top = 176
+ end
+ object BioLifeProducer: TDataSetPageProducer
+ HTMLDoc.Strings = (
+ ''
+ '
'
+ ' Biolife Data '
+ ''
+ ''
+ '
'
+ ''
+ 'Category: '
+ ''
+ '<#Category> '
+ ' '
+ ''
+ ''
+ 'Common Name: '
+ ''
+ '<#Common_Name> '
+ ' '
+ ''
+ ''
+ 'Notes: '
+ ''
+ '<#Notes> '
+ ' '
+ ''
+ ''
+ 'Picture: '
+ ''
+ '<#Graphic> '
+ ' '
+ '
'
+ ''
+ ''
+ '')
+ DataSet = BioLife
+ Left = 110
+ Top = 126
+ end
+ object CustSource: TDataSource
+ DataSet = Customer
+ Left = 90
+ Top = 65
+ end
+ object CustomerOrders: TQueryTableProducer
+ Caption = 'Customer Orders'
+ Columns = <
+ item
+ FieldName = 'OrderNo'
+ end
+ item
+ FieldName = 'SaleDate'
+ Title.Align = haCenter
+ end
+ item
+ FieldName = 'ShipDate'
+ end>
+ Query = Query1
+ TableAttributes.Border = 1
+ TableAttributes.CellSpacing = 1
+ TableAttributes.CellPadding = 1
+ TableAttributes.Width = 50
+ Left = 170
+ Top = 64
+ end
+ object CustomerList: TPageProducer
+ HTMLDoc.Strings = (
+ ''
+ ''
+ ''
+ ''
+ ''
+ 'Sample Delphi Web server application '
+ ''
+ ''
+ 'Customer Order Information '
+ ' '
+ 'Click a customer name to view their orders.'
+ '<#CUSTLIST>
'
+ ''
+ ''
+ ' ')
+ OnHTMLTag = CustomerListHTMLTag
+ Left = 118
+ Top = 9
+ end
+ object Query1: TQuery
+ DatabaseName = 'Phpdemo'
+ SessionName = 'Session1_1'
+ DataSource = CustSource
+ SQL.Strings = (
+ 'SELECT *'
+ 'FROM ORDERS'
+ 'WHERE'
+ '(CustNo = :CustNo)')
+ Left = 24
+ Top = 8
+ ParamData = <
+ item
+ DataType = ftFloat
+ Name = 'CustNo'
+ ParamType = ptUnknown
+ end>
+ end
+ object Database1: TDatabase
+ AliasName = 'DBDEMOS'
+ DatabaseName = 'Phpdemo'
+ SessionName = 'Session1_1'
+ Left = 240
+ Top = 200
+ end
+ object Session1: TSession
+ AutoSessionName = True
+ Left = 164
+ Top = 212
+ end
+end
diff --git a/Demos/Extensions/Borland Demo/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dti
similarity index 92%
rename from Demos/Extensions/Borland Demo/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dti
index db23cf9..69a56ab 100644
--- a/Demos/Extensions/Borland Demo/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1\PHPExtension1.Functions
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/Borland Demo/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.pas
similarity index 84%
rename from Demos/Extensions/Borland Demo/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.pas
index 13d8348..8f8f2dd 100644
--- a/Demos/Extensions/Borland Demo/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/Unit1.pas
@@ -1,253 +1,244 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules, DBWeb, Db, DSProd, HTTPApp, DBTables, Graphics, JPeg;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- Customer: TTable;
- CustomerCustNo: TFloatField;
- CustomerCompany: TStringField;
- BioLife: TTable;
- BioLifeSpeciesNo: TFloatField;
- BioLifeCategory: TStringField;
- BioLifeCommon_Name: TStringField;
- BioLifeSpeciesName: TStringField;
- BioLifeLengthcm: TFloatField;
- BioLifeLength_In: TFloatField;
- BioLifeNotes: TMemoField;
- BioLifeGraphic: TGraphicField;
- Root: TPageProducer;
- BioLifeProducer: TDataSetPageProducer;
- CustSource: TDataSource;
- CustomerOrders: TQueryTableProducer;
- CustomerList: TPageProducer;
- Query1: TQuery;
- Database1: TDatabase;
- Session1: TSession;
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure RootHTMLTag(Sender: TObject; Tag: TTag;
- const TagString: String; TagParams: TStrings;
- var ReplaceText: String);
- procedure CustomerListHTMLTag(Sender: TObject; Tag: TTag;
- const TagString: String; TagParams: TStrings;
- var ReplaceText: String);
- procedure PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure PHPExtensionCreate(Sender: TObject);
- procedure BioLifeGraphicGetText(Sender: TField; var Text: String;
- DisplayText: Boolean);
- procedure BioLifeNotesGetText(Sender: TField; var Text: String;
- DisplayText: Boolean);
- procedure PHPExtensionDestroy(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- Action : string;
- _redirect : PChar;
- _content_type : PChar;
- gl : Psapi_globals_struct;
- ts : pointer;
- Jpg: TJpegImage;
- S: TMemoryStream;
- B: TBitmap;
-
-begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
-
- Action := Parameters.Values('Action');
- if Action = '' then
- begin
- ReturnValue := Root.Content;
- Exit;
- end;
-
- if SameText(Action, 'redirect') then
- begin
- _redirect := 'Location: http://www.borland.com';
- php_header_write(_redirect, strlen(_redirect) + 1, TSRMLS_DC);
- gl.sapi_headers.http_response_code := 302;
- Exit;
- end;
-
- if SameText(Action, 'customerlist') then
- begin
- ReturnValue := CustomerList.Content;
- Exit;
- end;
-
- if SameText(Action, 'biolife') then
- begin
- ReturnValue := BioLifeProducer.Content;
- Exit;
- end;
-
- if SameText(Action, 'getimage') then
- begin
- Jpg := TJpegImage.Create;
- try
- B := TBitmap.Create;
- try
- B.Assign(BioLifeGraphic);
- Jpg.Assign(B);
- finally
- B.Free;
- end;
- S := TMemoryStream.Create;
- Jpg.SaveToStream(S);
- S.Position := 0;
- _content_type := 'Content-type: image/jpeg';
- php_header_write(_content_type, strlen(_content_type), TSRMLS_DC);
- php_body_write(PChar(S.memory), S.Size, TSRMLS_DC);
- S.Free;
- finally
- Jpg.Free;
- end;
-
- end;
-
- ReturnValue := 'Unknown action: ' + Action;
-end;
-
-
-
-procedure TPHPExtension1.RootHTMLTag(Sender: TObject; Tag: TTag;
- const TagString: String; TagParams: TStrings; var ReplaceText: String);
-var
- gl : Psapi_globals_struct;
- ts : pointer;
-begin
-
- if SameText(TagString, 'MODULENAME') then
- begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
- ReplaceText := gl.request_info.request_uri;
- end;
-end;
-
-procedure TPHPExtension1.CustomerListHTMLTag(Sender: TObject; Tag: TTag;
- const TagString: String; TagParams: TStrings; var ReplaceText: String);
-var
- Customers: String;
- Scriptname : string;
- gl : Psapi_globals_struct;
- ts : pointer;
-begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
- ScriptName := gl.request_info.request_uri;
-
- if CompareText(TagString, 'CUSTLIST') = 0 then
- begin
- Customers := '';
- Customer.First;
- while not Customer.Eof do
- begin
- Customers := Customers + Format('%s ',
- [ScriptName, CustomerCustNo.AsInteger, CustomerCompany.AsString]);
- Customer.Next;
- end;
- end;
- ReplaceText := Customers;
-end;
-
-procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- CustNo : string;
-begin
- CustNo := Parameters.Values('CustNo');
- if Customer.Locate('CustNo', CustNo, []) then
- begin
- CustomerOrders.Header.Clear;
- CustomerOrders.Header.Add('The following table was produced using a TDatasetTableProducer.
');
- CustomerOrders.Header.Add('Orders for: ' + CustomerCompany.AsString);
- ReturnValue := CustomerOrders.Content;
- end
- else
- ReturnValue := Format('
Customer: %s not found ',
- [CustNo]);
-
-end;
-
-procedure TPHPExtension1.PHPExtensionCreate(Sender: TObject);
-begin
- Customer.Open;
- BioLife.Open;
-end;
-
-procedure TPHPExtension1.BioLifeGraphicGetText(Sender: TField;
- var Text: String; DisplayText: Boolean);
-var
- Scriptname : string;
- gl : Psapi_globals_struct;
- ts : pointer;
-
-begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
- ScriptName := gl.request_info.request_uri;
-
- Text := Format(' ',
- [ScriptName, BiolifeCommon_Name.Text]);
-end;
-
-procedure TPHPExtension1.BioLifeNotesGetText(Sender: TField;
- var Text: String; DisplayText: Boolean);
-begin
- Text := Sender.AsString;
-end;
-
-procedure TPHPExtension1.PHPExtensionDestroy(Sender: TObject);
-begin
- try
- Database1.Connected := false;
- except
- end;
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules, DBWeb, Db, DSProd, HTTPApp, DBTables, Graphics, JPeg,
+ DBBdeWeb, HTTPProd;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ Customer: TTable;
+ CustomerCustNo: TFloatField;
+ CustomerCompany: TStringField;
+ BioLife: TTable;
+ BioLifeSpeciesNo: TFloatField;
+ BioLifeCategory: TStringField;
+ BioLifeCommon_Name: TStringField;
+ BioLifeSpeciesName: TStringField;
+ BioLifeLengthcm: TFloatField;
+ BioLifeLength_In: TFloatField;
+ BioLifeNotes: TMemoField;
+ BioLifeGraphic: TGraphicField;
+ Root: TPageProducer;
+ BioLifeProducer: TDataSetPageProducer;
+ CustSource: TDataSource;
+ CustomerOrders: TQueryTableProducer;
+ CustomerList: TPageProducer;
+ Query1: TQuery;
+ Database1: TDatabase;
+ Session1: TSession;
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure RootHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings;
+ var ReplaceText: String);
+ procedure CustomerListHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings;
+ var ReplaceText: String);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtensionCreate(Sender: TObject);
+ procedure BioLifeGraphicGetText(Sender: TField; var Text: String;
+ DisplayText: Boolean);
+ procedure BioLifeNotesGetText(Sender: TField; var Text: String;
+ DisplayText: Boolean);
+ procedure PHPExtensionDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Action : string;
+ _redirect : PAnsiChar;
+ _content_type : PAnsiChar;
+ gl : Psapi_globals_struct;
+ Jpg: TJpegImage;
+ S: TMemoryStream;
+ B: TBitmap;
+
+begin
+ gl := GetSAPIGlobals;
+
+ Action := Parameters.Values('Action');
+ if Action = '' then
+ begin
+ ReturnValue := Root.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'redirect') then
+ begin
+ _redirect := 'Location: http://www.borland.com';
+ php_header_write(_redirect, strlen(_redirect) + 1, TSRMLS_DC);
+ gl.sapi_headers.http_response_code := 302;
+ Exit;
+ end;
+
+ if SameText(Action, 'customerlist') then
+ begin
+ ReturnValue := CustomerList.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'biolife') then
+ begin
+ ReturnValue := BioLifeProducer.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'getimage') then
+ begin
+ Jpg := TJpegImage.Create;
+ try
+ B := TBitmap.Create;
+ try
+ B.Assign(BioLifeGraphic);
+ Jpg.Assign(B);
+ finally
+ B.Free;
+ end;
+ S := TMemoryStream.Create;
+ Jpg.SaveToStream(S);
+ S.Position := 0;
+ _content_type := 'Content-type: image/jpeg';
+ php_header_write(_content_type, strlen(_content_type), TSRMLS_DC);
+ php_body_write(PAnsiChar(S.memory), S.Size, TSRMLS_DC);
+ S.Free;
+ finally
+ Jpg.Free;
+ end;
+
+ end;
+
+ ReturnValue := 'Unknown action: ' + Action;
+end;
+
+
+
+procedure TPHPExtension1.RootHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings; var ReplaceText: String);
+var
+ gl : Psapi_globals_struct;
+begin
+ if SameText(TagString, 'MODULENAME') then
+ begin
+ gl := GetSAPIGlobals;
+ ReplaceText := WideString(gl.request_info.request_uri);
+ end;
+end;
+
+procedure TPHPExtension1.CustomerListHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings; var ReplaceText: String);
+var
+ Customers: String;
+ Scriptname : string;
+ gl : Psapi_globals_struct;
+begin
+ gl := GetSAPIGlobals;
+ ScriptName := WideString(gl.request_info.request_uri);
+
+ if CompareText(TagString, 'CUSTLIST') = 0 then
+ begin
+ Customers := '';
+ Customer.First;
+ while not Customer.Eof do
+ begin
+ Customers := Customers + Format('%s ',
+ [ScriptName, CustomerCustNo.AsInteger, CustomerCompany.AsString]);
+ Customer.Next;
+ end;
+ end;
+ ReplaceText := Customers;
+end;
+
+procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ CustNo : string;
+begin
+ CustNo := Parameters.Values('CustNo');
+ if Customer.Locate('CustNo', CustNo, []) then
+ begin
+ CustomerOrders.Header.Clear;
+ CustomerOrders.Header.Add('The following table was produced using a TDatasetTableProducer.');
+ CustomerOrders.Header.Add('Orders for: ' + CustomerCompany.AsString);
+ ReturnValue := CustomerOrders.Content;
+ end
+ else
+ ReturnValue := Format('
Customer: %s not found ',
+ [CustNo]);
+
+end;
+
+procedure TPHPExtension1.PHPExtensionCreate(Sender: TObject);
+begin
+ Customer.Open;
+ BioLife.Open;
+end;
+
+procedure TPHPExtension1.BioLifeGraphicGetText(Sender: TField;
+ var Text: String; DisplayText: Boolean);
+var
+ Scriptname : string;
+ gl : Psapi_globals_struct;
+begin
+ gl := GetSAPIGlobals;
+ ScriptName := WideString(gl.request_info.request_uri);
+
+ Text := Format(' ',
+ [ScriptName, BiolifeCommon_Name.Text]);
+end;
+
+procedure TPHPExtension1.BioLifeNotesGetText(Sender: TField;
+ var Text: String; DisplayText: Boolean);
+begin
+ Text := Sender.AsString;
+end;
+
+procedure TPHPExtension1.PHPExtensionDestroy(Sender: TObject);
+begin
+ try
+ Database1.Connected := false;
+ except
+ end;
+end;
+
end.
\ No newline at end of file
diff --git a/Demos/Extensions/Borland Demo/borland_demo.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dpr
similarity index 94%
rename from Demos/Extensions/Borland Demo/borland_demo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dpr
index 23660a2..f9cbef4 100644
--- a/Demos/Extensions/Borland Demo/borland_demo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dpr
@@ -1,16 +1,16 @@
-library borland_demo;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library borland_demo;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dproj
new file mode 100644
index 0000000..9fc0d0e
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.dproj
@@ -0,0 +1,107 @@
+
+
+ {804C0AD1-D695-4267-96F9-74229215D71B}
+ borland_demo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ borland_demo.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ borland_demo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Borland Demo/borland_demo.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.php
similarity index 92%
rename from Demos/Extensions/Borland Demo/borland_demo.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.php
index 2ceaa6e..4ea9335 100644
--- a/Demos/Extensions/Borland Demo/borland_demo.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.php
@@ -1,18 +1,18 @@
-
-
-if (isset($_GET) && !empty($_GET['action']))
- $action = $_GET["action"];
- else
- $action = "";
-
-if ($action == "runquery")
-{
- $id = $_GET["CustNo"];
- echo runquery($id);
-}
- else
- echo produce_page($action);
-
-
-?>
-
+
+
+if (isset($_GET) && !empty($_GET['action']))
+ $action = $_GET["action"];
+ else
+ $action = "";
+
+if ($action == "runquery")
+{
+ $id = $_GET["CustNo"];
+ echo runquery($id);
+}
+ else
+ echo produce_page($action);
+
+
+?>
+
diff --git a/Demos/Extensions/Borland Demo/borland_demo.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.res
similarity index 100%
rename from Demos/Extensions/Borland Demo/borland_demo.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Borland Demo/borland_demo.res
diff --git a/Demos/Extensions/Class demo/class_demo.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dpr
similarity index 94%
rename from Demos/Extensions/Class demo/class_demo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dpr
index cd91421..afe9e58 100644
--- a/Demos/Extensions/Class demo/class_demo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dpr
@@ -1,16 +1,16 @@
-library class_demo;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- dm_Class in 'dm_Class.pas' {classdemo: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(Tclassdemo, classdemo);
- Application.Run;
+library class_demo;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ dm_Class in 'dm_Class.pas' {classdemo: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(Tclassdemo, classdemo);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dproj
new file mode 100644
index 0000000..34bf411
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.dproj
@@ -0,0 +1,112 @@
+
+
+ {09B38AE4-09C2-414F-8414-961ADA921FA7}
+ class_demo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ C:\php\ext\
+ 00400000
+ false
+ x86
+ C:\php\ext\class_demo.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ true
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ class_demo.dpr
+
+
+ False
+ True
+ False
+ c:\php\test_class.php
+ C:\php\php.exe
+ c:\php
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Class demo/class_demo.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.res
similarity index 100%
rename from Demos/Extensions/Class demo/class_demo.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/class_demo.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dfm
new file mode 100644
index 0000000..5f4c652
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dfm
@@ -0,0 +1,61 @@
+object classdemo: Tclassdemo
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'new_class'
+ Tag = 0
+ Parameters = <>
+ OnExecute = classdemoFunctions0Execute
+ end>
+ ModuleName = 'class_demo'
+ Height = 479
+ Width = 741
+ object PHPDemoClass: TPHPClass
+ Properties = <
+ item
+ Name = 'prop'
+ Value = 'hello'
+ end>
+ Methods = <
+ item
+ Name = 'get_email'
+ Tag = 0
+ Parameters = <>
+ OnExecute = GetEmailExecute
+ end
+ item
+ Name = 'get_address'
+ Tag = 0
+ Parameters = <>
+ OnExecute = GetAddressExecute
+ end
+ item
+ Name = 'print_text'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'AText'
+ ParamType = tpString
+ end>
+ OnExecute = PrintTextExecute
+ end
+ item
+ Name = 'add_int'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'Y'
+ ParamType = tpInteger
+ end>
+ OnExecute = AddIntExecute
+ end>
+ PHPClassName = 'demo_class'
+ Left = 120
+ Top = 48
+ end
+end
diff --git a/Demos/Extensions/Class demo/dm_Class.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dti
similarity index 92%
rename from Demos/Extensions/Class demo/dm_Class.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dti
index 2ef2126..a60ac35 100644
--- a/Demos/Extensions/Class demo/dm_Class.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=classdemo\PHPDemoClass\PHPDemoClass.Methods
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=classdemo\PHPDemoClass\PHPDemoClass.Methods
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.pas
new file mode 100644
index 0000000..28f8076
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/dm_Class.pas
@@ -0,0 +1,102 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+
+{ $Id: dm_Class.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit dm_Class;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ phpClass,
+ PHPModules, PHPCommon;
+
+type
+
+ Tclassdemo = class(TPHPExtension)
+ PHPDemoClass: TPHPClass;
+ procedure PrintTextExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure AddIntExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure GetAddressExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure GetEmailExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure classdemoFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ classdemo: Tclassdemo;
+
+implementation
+
+uses
+ Dialogs;
+
+{$R *.DFM}
+
+
+procedure Tclassdemo.PrintTextExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Parameters[0].Value;
+end;
+
+procedure Tclassdemo.AddIntExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Parameters[0].Value + Parameters[1].Value;
+end;
+
+procedure Tclassdemo.GetAddressExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := AnsiString('www.php.net');
+end;
+
+procedure Tclassdemo.GetEmailExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := AnsiString('myaddress@hotmail.com');
+end;
+
+procedure Tclassdemo.classdemoFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ PHPDemoClass.ProduceInstance(ZendVar.AsZendVariable);
+end;
+
+end.
diff --git a/Demos/Extensions/Class demo/test_class.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/test_class.php
similarity index 91%
rename from Demos/Extensions/Class demo/test_class.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/test_class.php
index 28283e4..604a5c0 100644
--- a/Demos/Extensions/Class demo/test_class.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Class demo/test_class.php
@@ -1,15 +1,15 @@
-
-if(!extension_loaded('class_demo')) {
- dl('class_demo.dll');
-}
-
-$a = new demo_class();
-echo $a->get_email();
-
-echo "\n";
-
-$b = new_class();
-echo $b->prop;
-
-?>
-
+
+if(!extension_loaded('class_demo')) {
+ dl('class_demo.dll');
+}
+
+$a = new demo_class();
+echo $a->get_email();
+
+echo "\n";
+
+$b = new_class();
+echo $b->prop;
+
+?>
+
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dpr
similarity index 95%
rename from Demos/Extensions/Delphi Class 1/delphi_class.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dpr
index f5c05c2..5b64f71 100644
--- a/Demos/Extensions/Delphi Class 1/delphi_class.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dpr
@@ -1,16 +1,16 @@
-library delphi_class;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- delphi_class_module in 'delphi_class_module.pas' {PHDelphiPExtension: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHDelphiPExtension, PHDelphiPExtension);
- Application.Run;
+library delphi_class;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ delphi_class_module in 'delphi_class_module.pas' {PHDelphiPExtension: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHDelphiPExtension, PHDelphiPExtension);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dproj
new file mode 100644
index 0000000..5984fad
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.dproj
@@ -0,0 +1,111 @@
+
+
+ {41410412-F5C7-42D4-A798-9F9BFAB6A058}
+ delphi_class.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ C:\php\ext\
+ 00400000
+ false
+ x86
+ C:\php\ext\delphi_class.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ true
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ delphi_class.dpr
+
+
+ False
+ True
+ False
+ c:\php\delphi_class.php
+ C:\php\php.exe
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.php
similarity index 93%
rename from Demos/Extensions/Delphi Class 1/delphi_class.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.php
index cab7d63..524c9da 100644
--- a/Demos/Extensions/Delphi Class 1/delphi_class.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.php
@@ -1,15 +1,15 @@
-
-if(!extension_loaded('delphi_class')) {
- dl('delphi_class.dll');
-}
-
-$a = delphi_class_create("TButton", 'btnOK');
-delphi_set_prop($a, "Caption", "OK");
-echo delphi_get_prop($a, "Caption");
-
-echo "\n";
-
-delphi_class_free($a);
-
-?>
-
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+$a = delphi_class_create("TButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+delphi_class_free($a);
+
+?>
+
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.res
similarity index 100%
rename from Demos/Extensions/Delphi Class 1/delphi_class.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dfm
new file mode 100644
index 0000000..1be9eef
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dfm
@@ -0,0 +1,89 @@
+object PHDelphiPExtension: TPHDelphiPExtension
+ OldCreateOrder = False
+ OnCreate = PHPExtensionCreate
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'delphi_class_create'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'ClassName'
+ ParamType = tpString
+ end
+ item
+ Name = 'ComponentName'
+ ParamType = tpString
+ end>
+ OnExecute = ClassCreateExecute
+ end
+ item
+ FunctionName = 'delphi_get_prop'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'PropName'
+ ParamType = tpString
+ end>
+ OnExecute = GetPropertyExecute
+ end
+ item
+ FunctionName = 'delphi_class_free'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end>
+ OnExecute = ClassFreeExecute
+ end
+ item
+ FunctionName = 'delphi_set_prop'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'PropName'
+ ParamType = tpString
+ end
+ item
+ Name = 'PropValue'
+ ParamType = tpString
+ end>
+ OnExecute = SetPropertyExecute
+ end
+ item
+ FunctionName = 'delphi_form_create'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'ClassName'
+ ParamType = tpString
+ end
+ item
+ Name = 'ComponentName'
+ ParamType = tpString
+ end>
+ OnExecute = FormCreateExecute
+ end
+ item
+ FunctionName = 'delphi_message'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Message'
+ ParamType = tpString
+ end>
+ OnExecute = DelphiMessageExecute
+ end>
+ ModuleName = 'delphi_class'
+ Height = 479
+ Width = 741
+end
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class_module.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dti
similarity index 92%
rename from Demos/Extensions/Delphi Class 1/delphi_class_module.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dti
index 165f1af..5187263 100644
--- a/Demos/Extensions/Delphi Class 1/delphi_class_module.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHDelphiPExtension\PHDelphiPExtension.Functions
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHDelphiPExtension\PHDelphiPExtension.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.pas
new file mode 100644
index 0000000..16574fe
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/delphi_class_module.pas
@@ -0,0 +1,344 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{ This example is suitable only for Delphi 7 or higher }
+{*******************************************************}
+{$I PHP.INC}
+
+unit delphi_class_module;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ Dialogs,
+ TypInfo,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ stdctrls,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHDelphiPExtension = class(TPHPExtension)
+ procedure DelphiMessageExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure FormCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure SetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure ClassFreeExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure PHPExtensionCreate(Sender: TObject);
+ procedure GetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure ClassCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+
+{$IFDEF VERSION7}
+type
+{$METHODINFO ON}
+ TPHPButton = class(TButton)
+ private
+ FScriptText: string;
+ procedure SetScriptText(const Value: string);
+ public
+ function GetClassName : String;
+ procedure Click; override;
+ published
+ property Parent;
+ property ScriptText : string read FScriptText write SetScriptText;
+ end;
+
+ TPHPForm = class(TCustomForm)
+ public
+ procedure Show;
+ function ShowModal: Integer; override;
+ published
+ property Action;
+ property ActiveControl;
+ property Align;
+ property AlphaBlend default False;
+ property AlphaBlendValue default 255;
+ property Anchors;
+ property AutoScroll;
+ property AutoSize;
+ property BiDiMode;
+ property BorderIcons;
+ property BorderStyle;
+ property BorderWidth;
+ property Caption;
+ property ClientHeight;
+ property ClientWidth;
+ property Color;
+ property TransparentColor default False;
+ property TransparentColorValue default 0;
+ property Constraints;
+ property Ctl3D;
+ property UseDockManager;
+ property DefaultMonitor;
+ property DockSite;
+ property DragKind;
+ property DragMode;
+ property Enabled;
+ property ParentFont default False;
+ property Font;
+ property FormStyle;
+ property Height;
+ property HelpFile;
+ property HorzScrollBar;
+ property Icon;
+ property KeyPreview;
+ property Menu;
+ property OldCreateOrder;
+ property ObjectMenuItem;
+ property ParentBiDiMode;
+ property PixelsPerInch;
+ property PopupMenu;
+ property Position;
+ property PrintScale;
+ property Scaled;
+ property ScreenSnap default False;
+ property ShowHint;
+ property SnapBuffer default 10;
+ property VertScrollBar;
+ property Visible;
+ property Width;
+ property WindowState;
+ property WindowMenu;
+ property OnActivate;
+ property OnCanResize;
+ property OnClick;
+ property OnClose;
+ property OnCloseQuery;
+ property OnConstrainedResize;
+ property OnContextPopup;
+ property OnCreate;
+ property OnDblClick;
+ property OnDestroy;
+ property OnDeactivate;
+ property OnDockDrop;
+ property OnDockOver;
+ property OnDragDrop;
+ property OnDragOver;
+ property OnEndDock;
+ property OnGetSiteInfo;
+ property OnHide;
+ property OnHelp;
+ property OnKeyDown;
+ property OnKeyPress;
+ property OnKeyUp;
+ property OnMouseDown;
+ property OnMouseMove;
+ property OnMouseUp;
+ property OnMouseWheel;
+ property OnMouseWheelDown;
+ property OnMouseWheelUp;
+ property OnPaint;
+ property OnResize;
+ property OnShortCut;
+ property OnShow;
+ property OnStartDock;
+ property OnUnDock;
+ end;
+{$METHODINFO OFF}
+{$ENDIF}
+
+var
+ PHDelphiPExtension: TPHDelphiPExtension;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHDelphiPExtension.ClassCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+var
+ CN : string;
+ DC : TComponentClass;
+ PC : TPersistentClass;
+ obj : TComponent;
+begin
+ CN := Parameters[0].ZendVariable.AsString;
+ if CN = '' then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+
+ PC := FindClass(CN);
+ if PC.InheritsFrom(TComponent) then
+ DC := TComponentClass(PC)
+ else
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+ //create Delphi class instance
+
+ if DC <> nil then
+ begin
+ obj := DC.Create(nil);
+ obj.Name := Parameters[1].ZendVariable.AsString;
+ ReturnValue := integer(Obj);
+ end
+ else
+ ReturnValue := 0;
+end;
+
+procedure TPHDelphiPExtension.GetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Obj : TObject;
+ PN : String;
+begin
+ obj := TObject(Parameters[0].ZendVariable.AsInteger);
+ PN := Parameters[1].ZendVariable.AsString;
+ ReturnValue := GetPropValue(Obj, PN, true);
+end;
+
+procedure TPHDelphiPExtension.ClassFreeExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ TObject(Parameters[0].ZendVariable.AsInteger).Free;
+end;
+
+procedure TPHDelphiPExtension.SetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Obj : TObject;
+ PN : String;
+begin
+ obj := TObject(Parameters[0].ZendVariable.AsInteger);
+ PN := Parameters[1].ZendVariable.AsString;
+ SetPropValue(Obj, PN, Parameters[2].Value );
+end;
+
+procedure TPHDelphiPExtension.FormCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ CN : string;
+ PC : TPersistentClass;
+ obj : TComponent;
+begin
+ CN := Parameters[0].ZendVariable.AsString;
+ if CN = '' then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+
+ PC := FindClass(CN);
+ if not PC.InheritsFrom(TCustomForm) then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+ //create Delphi class instance
+
+ if PC <> nil then
+ begin
+ obj := TCustomFormClass(PC).CreateNew(nil);
+ obj.Name := Parameters[1].ZendVariable.AsString;
+ ReturnValue := integer(Obj);
+ end
+ else
+ ReturnValue := 0;
+end;
+
+procedure TPHDelphiPExtension.DelphiMessageExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ShowMessage(Parameters[0].ZendVariable.AsString);
+end;
+
+procedure TPHDelphiPExtension.PHPExtensionCreate(Sender: TObject);
+begin
+ {$IFDEF VERSION7}
+ RegisterClass(TButton);
+ RegisterClass(TPHPButton);
+ RegisterClass(TPHPForm);
+ {$ENDIF}
+end;
+
+{$IFDEF VERSION7}
+{ TPHPButton }
+
+function TPHPButton.GetClassName: String;
+begin
+ Result := ClassName;
+end;
+
+
+procedure TPHPButton.Click;
+var
+ AnsiScriptText : AnsiString;
+begin
+ inherited;
+ if FScriptText <> '' then
+ begin
+ AnsiScriptText := AnsiString(FScriptText);
+ zend_eval_string(PAnsiChar(AnsiScriptText), nil, 'delphi', ts_resource(0));
+ end;
+end;
+
+procedure TPHPButton.SetScriptText(const Value: string);
+var
+ L : integer;
+begin
+ if FScriptText <> Value then
+ begin
+ L := Length(Value);
+ SetLength(FScriptText, L);
+ Move(Value[1], FScriptText[1], L * SizeOf(Char));
+ end;
+end;
+
+{ TPHPForm }
+
+procedure TPHPForm.Show;
+begin
+ inherited Show;
+end;
+
+function TPHPForm.ShowModal: Integer;
+begin
+ Result := inherited ShowModal;
+end;
+
+{$ENDIF}
+
+end.
+
+
diff --git a/Demos/Extensions/Delphi Class 1/readme.txt b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/readme.txt
similarity index 100%
rename from Demos/Extensions/Delphi Class 1/readme.txt
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 1/readme.txt
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class.php
new file mode 100644
index 0000000..e0267b4
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class.php
@@ -0,0 +1,42 @@
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+if(!extension_loaded('delphi_class2')) {
+ dl('delphi_class2.dll');
+}
+
+$a = delphi_class_create("TPHPButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+
+$b = register_delphi_object($a);
+$b->Caption = "Click";
+echo $b->caption;
+
+echo "\n";
+
+echo $b->GetClassName();
+
+
+$f = delphi_form_create("TPHPForm", "MyForm");
+$form = register_delphi_object($f);
+$form->Caption = "This is a Delphi form!";
+$form->BorderStyle = 3;
+$form->Color = 333;
+$form->Position = 4;
+$b->Parent = $f;
+$b->Left = 20;
+$b->Top = 50;
+$b->ScriptText = "delphi_message('Hello');";
+$form->ShowModal();
+
+delphi_class_free($a);
+delphi_class_free($f);
+
+?>
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr
new file mode 100644
index 0000000..9879358
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr
@@ -0,0 +1,124 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+library delphi_class2;
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, DelphiFunctions;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('Delphi classes support'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterInternalClasses(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ DelphiTable : array [0..12] of zend_function_entry;
+
+
+procedure InitDelphiFunctions;
+begin
+ PHP_FUNCTION(DelphiTable[0], 'delphi_date', @delphi_date);
+ PHP_FUNCTION(DelphiTable[1], 'delphi_extract_file_dir', @delphi_extract_file_dir);
+ PHP_FUNCTION(DelphiTable[2], 'delphi_extract_file_drive', @delphi_extract_file_drive);
+ PHP_FUNCTION(DelphiTable[3], 'delphi_extract_file_name', @delphi_extract_file_name);
+
+ DelphiTable[4].fname := 'delphi_extract_file_ext';
+ DelphiTable[4].handler := @delphi_extract_file_ext;
+ DelphiTable[4].arg_info := nil;
+
+ DelphiTable[5].fname := 'delphi_show_message';
+ DelphiTable[5].handler := @delphi_show_message;
+ DelphiTable[5].arg_info := nil;
+
+ DelphiTable[6].fname := 'register_delphi_object';
+ delphitable[6].handler := @register_delphi_object;
+ DelphiTable[6].arg_info := nil;
+
+ DelphiTable[7].fname := 'delphi_get_author';
+ DelphiTable[7].handler := @delphi_get_author;
+ DelphiTable[7].arg_info := nil;
+
+
+ DelphiTable[8].fname := 'delphi_str_date';
+ DelphiTable[8].handler := @delphi_str_date;
+ DelphiTable[8].arg_info := nil;
+
+
+ PHP_FUNCTION(DelphiTable[9], 'delphi_get_system_directory', @delphi_get_system_directory);
+
+
+ PHP_FUNCTION(DelphiTable[10], 'delphi_input_box', @delphi_input_box);
+ PHP_FUNCTION(DelphiTable[11], 'register_delphi_component', @register_delphi_component);
+ DelphiTable[12].fname := nil;
+ DelphiTable[12].handler := nil;
+end;
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ InitDelphiFunctions;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'delphi_class2';
+ ModuleEntry.version := '1.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ ModuleEntry.functions := @DelphiTable[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dproj
new file mode 100644
index 0000000..bc26602
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dproj
@@ -0,0 +1,108 @@
+
+
+ {44B881E6-0C8B-4432-9752-D90921566886}
+ delphi_class2.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ delphi_class2.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ C:\php\ext\
+ C:\php\ext\delphi_class2.dll
+ true
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ delphi_class2.dpr
+
+
+ False
+ True
+ False
+ c:\php\delphi_class.php
+ C:\php\php.exe
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Delphi Class 2/delphi_class2.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.php
similarity index 93%
rename from Demos/Extensions/Delphi Class 2/delphi_class2.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.php
index bbcc7fc..6c0f3a8 100644
--- a/Demos/Extensions/Delphi Class 2/delphi_class2.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.php
@@ -1,26 +1,26 @@
-
-if(!extension_loaded('delphi_class')) {
- dl('delphi_class.dll');
-}
-
-if(!extension_loaded('delphi_class2')) {
- dl('delphi_class2.dll');
-}
-
-$a = delphi_class_create("TButton", 'btnOK');
-delphi_set_prop($a, "Caption", "OK");
-echo delphi_get_prop($a, "Caption");
-
-echo "\n";
-
-
-$b = register_delphi_object($a);
-$b->caption = "Cancel";
-echo $b->caption;
-
-echo "\n";
-
-delphi_class_free($a);
-
-?>
-
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+if(!extension_loaded('delphi_class2')) {
+ dl('delphi_class2.dll');
+}
+
+$a = delphi_class_create("TButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+
+$b = register_delphi_object($a);
+$b->caption = "Cancel";
+echo $b->caption;
+
+echo "\n";
+
+delphi_class_free($a);
+
+?>
+
diff --git a/Demos/Extensions/Delphi Class 2/readme.txt b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/readme.txt
similarity index 100%
rename from Demos/Extensions/Delphi Class 2/readme.txt
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/readme.txt
diff --git a/Demos/Extensions/Math/delphi_math.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dpr
similarity index 94%
rename from Demos/Extensions/Math/delphi_math.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dpr
index 27628fd..bbab1b8 100644
--- a/Demos/Extensions/Math/delphi_math.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dpr
@@ -1,16 +1,16 @@
-library delphi_math;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- extmain in 'extmain.pas' {MathExtension: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TMathExtension, MathExtension);
- Application.Run;
+library delphi_math;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ extmain in 'extmain.pas' {MathExtension: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TMathExtension, MathExtension);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dproj
new file mode 100644
index 0000000..9cb998d
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.dproj
@@ -0,0 +1,107 @@
+
+
+ {5C2F1E39-363F-499A-8BE2-AC4C4EDDCA3D}
+ delphi_math.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ delphi_math.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ delphi_math.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Math/delphi_math.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.res
similarity index 100%
rename from Demos/Extensions/Math/delphi_math.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/delphi_math.res
diff --git a/Demos/Extensions/Math/extmain.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.ddp
similarity index 100%
rename from Demos/Extensions/Math/extmain.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.ddp
diff --git a/Demos/Extensions/Math/extmain.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dfm
similarity index 95%
rename from Demos/Extensions/Math/extmain.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dfm
index 8b9145d..0d81aa0 100644
--- a/Demos/Extensions/Math/extmain.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dfm
@@ -1,50 +1,50 @@
-object MathExtension: TMathExtension
- OldCreateOrder = False
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'delphi_sin'
- Tag = 0
- Parameters = <
- item
- Name = 'X'
- ParamType = tpFloat
- end>
- OnExecute = SinExecute
- end
- item
- FunctionName = 'delphi_cosh'
- Tag = 0
- Parameters = <
- item
- Name = 'X'
- ParamType = tpFloat
- end>
- OnExecute = CoshExecute
- end
- item
- FunctionName = 'delphi_arcsin'
- Tag = 0
- Parameters = <
- item
- Name = 'X'
- ParamType = tpFloat
- end>
- OnExecute = ArcsinExecute
- end
- item
- FunctionName = 'delphi_arccosh'
- Tag = 0
- Parameters = <
- item
- Name = 'X'
- ParamType = tpFloat
- end>
- OnExecute = ArccoshExecute
- end>
- ModuleName = 'delphi_math'
- Left = 619
- Top = 344
- Height = 266
- Width = 269
-end
+object MathExtension: TMathExtension
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'delphi_sin'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = SinExecute
+ end
+ item
+ FunctionName = 'delphi_cosh'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = CoshExecute
+ end
+ item
+ FunctionName = 'delphi_arcsin'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = ArcsinExecute
+ end
+ item
+ FunctionName = 'delphi_arccosh'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = ArccoshExecute
+ end>
+ ModuleName = 'delphi_math'
+ Left = 619
+ Top = 344
+ Height = 266
+ Width = 269
+end
diff --git a/Demos/Extensions/Math/extmain.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dti
similarity index 92%
rename from Demos/Extensions/Math/extmain.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dti
index 6e658e8..978bf1b 100644
--- a/Demos/Extensions/Math/extmain.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=MathExtension\MathExtension.Functions
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=MathExtension\MathExtension.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/Math/extmain.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.pas
similarity index 75%
rename from Demos/Extensions/Math/extmain.pas
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.pas
index fcddfab..ddb3402 100644
--- a/Demos/Extensions/Math/extmain.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/extmain.pas
@@ -1,86 +1,86 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: extmain.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit extmain;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules,
- math;
-
-type
-
- TMathExtension = class(TPHPExtension)
- procedure SinExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure CoshExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure ArcsinExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure ArccoshExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- MathExtension: TMathExtension;
-
-implementation
-
-{$R *.DFM}
-
-procedure TMathExtension.SinExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- ReturnValue := Sin(Parameters[0].ZendVariable.AsFloat);
-end;
-
-procedure TMathExtension.CoshExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- ReturnValue := Cosh(Parameters[0].Value);
-end;
-
-procedure TMathExtension.ArcsinExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- ReturnValue := ArcSin(Parameters[0].value);
-end;
-
-procedure TMathExtension.ArccoshExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- ReturnValue := ArcCosh(Parameters[0].ZendVariable.AsFloat);
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: extmain.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit extmain;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules,
+ math;
+
+type
+
+ TMathExtension = class(TPHPExtension)
+ procedure SinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure CoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure ArcsinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure ArccoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MathExtension: TMathExtension;
+
+implementation
+
+{$R *.DFM}
+
+procedure TMathExtension.SinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Sin(Parameters[0].ZendVariable.AsFloat);
+end;
+
+procedure TMathExtension.CoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Cosh(Parameters[0].Value);
+end;
+
+procedure TMathExtension.ArcsinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := ArcSin(Parameters[0].value);
+end;
+
+procedure TMathExtension.ArccoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := ArcCosh(Parameters[0].ZendVariable.AsFloat);
+end;
+
end.
\ No newline at end of file
diff --git a/Demos/Extensions/Math/test_math.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/test_math.php
similarity index 94%
rename from Demos/Extensions/Math/test_math.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Math/test_math.php
index 00ca0a6..bbd4dfe 100644
--- a/Demos/Extensions/Math/test_math.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Math/test_math.php
@@ -1,30 +1,30 @@
-
-if(!extension_loaded('delphi_math')) {
- dl('delphi_math.dll');
-}
-
-
-$module = 'delphi_math';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-
-echo "Sin(90.0) = ";
-$str = delphi_sin(90.0);
-echo "$str\n";
-
-echo "Cosh(45.0) = ";
-$str = delphi_cosh(45.0);
-echo "$str\n\n";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." \n";
-}
-
-?>
+
+if(!extension_loaded('delphi_math')) {
+ dl('delphi_math.dll');
+}
+
+
+$module = 'delphi_math';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+echo "Sin(90.0) = ";
+$str = delphi_sin(90.0);
+echo "$str\n";
+
+echo "Cosh(45.0) = ";
+$str = delphi_cosh(45.0);
+echo "$str\n\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Demos/Extensions/Resources/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.ddp
similarity index 100%
rename from Demos/Extensions/Resources/Unit1.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.ddp
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.dfm
new file mode 100644
index 0000000..ca60b10
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.dfm
@@ -0,0 +1,23 @@
+object OneWireWrapper: TOneWireWrapper
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'blah'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'i'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'a'
+ ParamType = tpArray
+ end>
+ OnExecute = OneWireWrapperFunctions0Execute
+ Description = 'Test function for passing arrays'
+ end>
+ ModuleName = 'rarp'
+ Height = 150
+ Width = 215
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.pas
new file mode 100644
index 0000000..ae39336
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/Unit1.pas
@@ -0,0 +1,68 @@
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TOneWireWrapper = class(TPHPExtension)
+ procedure OneWireWrapperFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ OneWireWrapper: TOneWireWrapper;
+
+implementation
+
+{$R *.DFM}
+
+procedure TOneWireWrapper.OneWireWrapperFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ variable : pzval;
+ ar : array of AnsiString;
+ cnt : integer;
+ tmp : ^ppzval;
+begin
+ //This function reads array parameter
+ variable := Parameters.ParamByName('a').ZendValue;
+ if variable^._type = IS_ARRAY then
+ begin
+ SetLength(ar, zend_hash_num_elements(variable^.value.ht));
+ for cnt := 0 to zend_hash_num_elements(variable^.value.ht) -1 do
+ begin
+ new(tmp);
+ zend_hash_index_find(variable^.value.ht, cnt, tmp);
+ ar[cnt] := tmp^^^.value.str.val;
+ freemem(tmp);
+ end;
+ //Array is stored now in "ar" variable
+ //Lets do something with it
+ ReturnValue := '';
+ for cnt := 0 to Length(ar) - 1 do
+ ReturnValue := ReturnValue + ar[cnt];
+ end
+ else
+ ReturnValue := '';
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dpr
new file mode 100644
index 0000000..b4402d8
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dpr
@@ -0,0 +1,16 @@
+library rarp;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {OneWireWrapper: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TOneWireWrapper, OneWireWrapper);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dproj
new file mode 100644
index 0000000..190379e
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.dproj
@@ -0,0 +1,107 @@
+
+
+ {1571F9BE-F9B9-4649-A8EA-05FCCB0F6615}
+ rarp.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ rarp.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ rarp.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/Resources/res_ext.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.res
similarity index 100%
rename from Demos/Extensions/Resources/res_ext.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarp.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarptest.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarptest.php
new file mode 100644
index 0000000..a2c0aa7
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Read array parameters/rarptest.php
@@ -0,0 +1,13 @@
+
+
+//Load extension here... etc....
+
+if(!extension_loaded('rarp')) {
+ dl('rarp.dll');
+}
+
+$a = blah(1,array('a','b','c'));
+echo $a;
+
+?>
+
\ No newline at end of file
diff --git a/Demos/psvPHP/sample1/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.ddp
similarity index 100%
rename from Demos/psvPHP/sample1/Unit1.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.ddp
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dfm
new file mode 100644
index 0000000..c011f0f
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dfm
@@ -0,0 +1,25 @@
+object res_module: Tres_module
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'res_create'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'res_get'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpInteger
+ end>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'res_ext'
+ OnModuleInit = PHPExtensionModuleInit
+ Height = 150
+ Width = 215
+end
diff --git a/Demos/Extensions/killer/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dti
similarity index 91%
rename from Demos/Extensions/killer/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dti
index e053eae..aa0c5c1 100644
--- a/Demos/Extensions/killer/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.pas
new file mode 100644
index 0000000..1ed3810
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/Unit1.pas
@@ -0,0 +1,94 @@
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ Tres_module = class(TPHPExtension)
+ procedure PHPExtensionModuleInit(Sender: TObject; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ res_module: Tres_module;
+
+type
+ PMyResource = ^TMyResource;
+ TMyResource = record
+ resource_link : integer;
+ resource_string : PAnsiChar;
+ end;
+
+implementation
+
+{$R *.DFM}
+
+var
+ le_myresource : integer;
+
+const
+ le_myresource_name = 'My type of resource';
+
+procedure my_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
+var
+ my_resource : PMyResource;
+begin
+ my_resource := rsrc^.ptr;
+ my_resource.resource_string := nil;
+end;
+
+procedure Tres_module.PHPExtensionModuleInit(Sender: TObject;
+ TSRMLS_DC: Pointer);
+begin
+ le_myresource := zend_register_list_destructors_ex(@my_destructor_handler, nil, PAnsiChar(le_myresource_name), Application.ModuleNumber);
+end;
+
+procedure Tres_module.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ rc : PMyResource;
+ rn : integer;
+begin
+ rc := emalloc(sizeof(TMyResource));
+ rc^.resource_link := 1;
+ rc^.resource_string := 'Hello';
+ rn := zend_register_resource(ZendVar.AsZendVariable, rc, le_myresource);
+ ZVAL_RESOURCE(ZendVar.AsZendVariable, rn);
+end;
+
+procedure Tres_module.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ rc : PMyResource;
+ Z : PZVAL;
+begin
+ Z := Parameters[0].ZendValue;
+ rc := zend_fetch_resource(@Z, TSRMLS_DC, -1, 'my resource', nil, 1, le_myresource);
+ ReturnValue := String(rc^.resource_string);
+end;
+
+end.
diff --git a/Demos/Extensions/Resources/res_ext.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dpr
similarity index 94%
rename from Demos/Extensions/Resources/res_ext.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dpr
index 6015dd1..cb198ea 100644
--- a/Demos/Extensions/Resources/res_ext.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dpr
@@ -1,16 +1,16 @@
-library res_ext;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {res_module: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(Tres_module, res_module);
- Application.Run;
+library res_ext;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {res_module: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(Tres_module, res_module);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dproj
new file mode 100644
index 0000000..eb3611d
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.dproj
@@ -0,0 +1,107 @@
+
+
+ {A8281194-743A-45B6-9A10-56AB7A543213}
+ res_ext.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ res_ext.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ res_ext.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/phpDLL/phpDLL.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.res
similarity index 100%
rename from Demos/Extensions/phpDLL/phpDLL.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/res_ext.res
diff --git a/Demos/Extensions/Resources/test_resource.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/test_resource.php
similarity index 92%
rename from Demos/Extensions/Resources/test_resource.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/test_resource.php
index 10e924b..6313579 100644
--- a/Demos/Extensions/Resources/test_resource.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Resources/test_resource.php
@@ -1,21 +1,21 @@
-
-if(!extension_loaded('res_ext')) {
- dl('res_ext.dll');
-}
-
-$module = 'res_ext';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-
-
-$i = res_create();
-echo res_get($i);
-
-
-
-?>
+
+if(!extension_loaded('res_ext')) {
+ dl('res_ext.dll');
+}
+
+$module = 'res_ext';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+
+$i = res_create();
+echo res_get($i);
+
+
+
+?>
diff --git a/Demos/psvPHP/sample2/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.ddp
similarity index 100%
rename from Demos/psvPHP/sample2/Unit1.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.ddp
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.dfm
new file mode 100644
index 0000000..708a070
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.dfm
@@ -0,0 +1,20 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'get_month_names'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'get_year_info'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'rarray'
+ Height = 500
+ Width = 624
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.pas
new file mode 100644
index 0000000..3d7b428
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/Unit1.pas
@@ -0,0 +1,119 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+var
+ pval : pzval;
+ cnt : integer;
+ MonthName : AnsiString;
+begin
+ // Function get_my_array returns an array as result
+ // This demo shows how to use zend variable and work with complex
+ // PHP types
+
+ pval := ZendVar.AsZendVariable;
+ if _array_init(pval, nil, 0) = FAILURE then
+ begin
+ php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
+ ZVAL_FALSE(pval);
+ Exit;
+ end;
+
+ for cnt := 1 to 12 do
+ begin
+ MonthName := AnsiString(LongMonthNames[cnt]);
+ add_next_index_string(pval, PAnsiChar(MonthName), 1);
+ end;
+
+end;
+
+procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ pval : pzval;
+ cnt : integer;
+ months : pzval;
+ smonths : pzval;
+
+ MonthNameLong : AnsiString;
+ MonthNameShort : AnsiString;
+begin
+ pval := ZendVar.AsZendVariable;
+ if _array_init(pval, nil, 0) = FAILURE then
+ begin
+ php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
+ ZVAL_FALSE(pval);
+ Exit;
+ end;
+
+ months := MAKE_STD_ZVAL;
+ smonths := MAKE_STD_ZVAL;
+
+ _array_init(months, nil, 0);
+ _array_init(smonths, nil, 0);
+
+ for cnt := 1 to 12 do
+ begin
+ MonthNameLong := AnsiString(LongMonthNames[cnt]);
+ MonthNameShort := AnsiString(ShortMonthNames[cnt]);
+ add_next_index_string(months, PAnsiChar(MonthNameLong), 1);
+ add_next_index_string(smonths, PAnsiChar(MonthNameShort), 1);
+ end;
+
+ add_assoc_zval_ex(pval, 'months', strlen('months') + 1, months);
+ add_assoc_zval_ex(pval, 'abbrevmonths', strlen('abbrevmonths') + 1, smonths);
+
+end;
+
+end.
\ No newline at end of file
diff --git a/Demos/Extensions/array result/rarray.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dpr
similarity index 94%
rename from Demos/Extensions/array result/rarray.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dpr
index e73b64b..0590f3e 100644
--- a/Demos/Extensions/array result/rarray.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dpr
@@ -1,16 +1,16 @@
-library rarray;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library rarray;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dproj
new file mode 100644
index 0000000..992b698
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.dproj
@@ -0,0 +1,112 @@
+
+
+ {6FA51797-10CE-4466-AD51-C8637FC8936F}
+ rarray.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ C:\php\ext\
+ 00400000
+ false
+ x86
+ C:\php\ext\rarray.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ C:\php\ext\
+ true
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ rarray.dpr
+
+
+ False
+ True
+ False
+ c:\php\rarray.php
+ C:\php\php.exe
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/array result/rarray.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.php
similarity index 93%
rename from Demos/Extensions/array result/rarray.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.php
index d827d47..9920e28 100644
--- a/Demos/Extensions/array result/rarray.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.php
@@ -1,31 +1,31 @@
-
-
-if(!extension_loaded('rarray')) {
- dl('rarray.dll');
-}
-
-
-$ar = get_month_names();
-
-for ($i=0; $i<12; $i++):
- $x = $i + 1;
- echo sprintf("%02d : ", $x);
- print "$ar[$i]\n";
-endfor;
-
-$ar2 = get_year_info();
-$months = $ar2["months"];
-$smonths = $ar2["abbrevmonths"];
-
-echo "\n";
-
-
-for ($i=0; $i<12; $i++):
- $x = $i + 1;
- echo sprintf("%02d : ", $x);
- echo sprintf("%12s : ", $months[$i]);
- print "$smonths[$i]\n";
-endfor;
-
-?>
-
+
+
+if(!extension_loaded('rarray')) {
+ dl('rarray.dll');
+}
+
+
+$ar = get_month_names();
+
+for ($i=0; $i<12; $i++):
+ $x = $i + 1;
+ echo sprintf("%02d : ", $x);
+ print "$ar[$i]\n";
+endfor;
+
+$ar2 = get_year_info();
+$months = $ar2["months"];
+$smonths = $ar2["abbrevmonths"];
+
+echo "\n";
+
+
+for ($i=0; $i<12; $i++):
+ $x = $i + 1;
+ echo sprintf("%02d : ", $x);
+ echo sprintf("%12s : ", $months[$i]);
+ print "$smonths[$i]\n";
+endfor;
+
+?>
+
diff --git a/Demos/Extensions/array result/rarray.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.res
similarity index 100%
rename from Demos/Extensions/array result/rarray.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/array result/rarray.res
diff --git a/Demos/Extensions/css/CREDITS b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/CREDITS
similarity index 100%
rename from Demos/Extensions/css/CREDITS
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/css/CREDITS
diff --git a/Demos/Extensions/css/EXPERIMENTAL b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/EXPERIMENTAL
similarity index 100%
rename from Demos/Extensions/css/EXPERIMENTAL
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/css/EXPERIMENTAL
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr
new file mode 100644
index 0000000..52aae8e
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr
@@ -0,0 +1,133 @@
+(*
+ +----------------------------------------------------------------------+
+ | PHP Version 4 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2002 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.02 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Colin Viebrock |
+ +----------------------------------------------------------------------+
+*)
+
+{$I PHP.INC}
+
+library css;
+
+uses
+ Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('Delphi CSS'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+
+{$IFDEF PHP510}
+procedure delphi_css (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure delphi_css (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+
+
+procedure Puts(Str : string);
+var
+ BodyString : AnsiString;
+begin
+ str := StringReplace(str, '\n', #13#10, [rfReplaceAll]);
+ BodyString := AnsiString(str);
+ php_body_write(PAnsiChar(BodyString), Length(BodyString), TSRMLS_DC);
+end;
+
+begin
+ PUTS('body {background-color: #ffffff; color: #000000;}\n');
+ PUTS('body, td, th, h1, h2 {font-family: sans-serif;}\n');
+ PUTS('pre {margin: 0px; font-family: monospace;}\n');
+ PUTS('a:link {color: #000099; text-decoration: none;}\n');
+ PUTS('a:hover {text-decoration: underline;}\n');
+ PUTS('table {border-collapse: collapse;}\n');
+ PUTS('.center {text-align: center;}\n');
+ PUTS('.center table { margin-left: auto; margin-right: auto; text-align: left;}\n');
+ PUTS('.center th { text-align: center; !important }\n');
+ PUTS('td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}\n');
+ PUTS('h1 {font-size: 150%;}\n');
+ PUTS('h2 {font-size: 125%;}\n');
+ PUTS('.p {text-align: left;}\n');
+ PUTS('.e {background-color: #ccccff; font-weight: bold;}\n');
+ PUTS('.h {background-color: #9999cc; font-weight: bold;}\n');
+ PUTS('.v {background-color: #cccccc;}\n');
+ PUTS('i {color: #666666;}\n');
+ PUTS('img {float: right; border: 0px;}\n');
+ PUTS('hr {width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;}\n');
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'css';
+ ModuleEntry.version := '0.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ module_entry_table[0].fname := 'delphi_css';
+ module_entry_table[0].handler := @delphi_css;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ result := @ModuleEntry;
+end;
+
+exports
+ get_module;
+
+
+end.
+
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dproj
new file mode 100644
index 0000000..bba35cd
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dproj
@@ -0,0 +1,103 @@
+
+
+ {B6A5D89E-2C15-4B2B-95C7-32734CC81DCD}
+ css.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ css.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ css.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr
new file mode 100644
index 0000000..fe9c521
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr
@@ -0,0 +1,147 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP class demo extension }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{ $Id: php_class.dpr,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library php_class;
+
+uses
+ Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+var
+ demo_class_functions : array[0..2] of zend_function_entry;
+ demo_class_entry : Tzend_class_entry;
+ ce : pzend_class_entry;
+
+{$IFDEF PHP510}
+procedure demo_email (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure demo_email (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ str : AnsiString;
+begin
+ str := 'name@mail.com';
+ ZVAL_STRING(return_value, PAnsiChar(str), true);
+end;
+
+{$IFDEF PHP510}
+procedure demo_homepage (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure demo_homepage (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ str : AnsiString;
+begin
+ str := 'http://www.demo.com';
+ ZVAL_STRING(return_value, PAnsiChar(str), true);
+end;
+
+procedure RegisterDemoClass(p : pointer);
+begin
+ demo_class_functions[0].fname := 'demo_email';
+ demo_class_functions[0].handler := @demo_email;
+ demo_class_functions[1].fname := 'demo_homepage';
+ demo_class_functions[1].handler := @demo_homepage;
+ INIT_CLASS_ENTRY(demo_class_entry, 'php_demo_class', @demo_class_functions);
+ ce := zend_register_internal_class(@demo_class_entry, p);
+end;
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('PHP Demo Class'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterDemoClass(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure get_demo_class (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure get_demo_class (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ properties : array[0..2] of PAnsiChar;
+begin
+ properties[0] := 'name';
+ properties[1] := 'tool';
+ properties[2] := 'height';
+ object_init(return_value, ce, TSRMLS_DC );
+
+ add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
+ add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1, TSRMLS_DC);
+
+ add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'php_class';
+ ModuleEntry.version := '0.2';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ module_entry_table[0].fname := 'get_demo_class';
+ module_entry_table[0].handler := @get_demo_class;
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dproj
new file mode 100644
index 0000000..dae7bfa
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dproj
@@ -0,0 +1,103 @@
+
+
+ {BDB59203-8FFB-4B82-92D1-B1CFE020B023}
+ php_class.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ php_class.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ php_class.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/php class/test_class.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/test_class.php
similarity index 91%
rename from Demos/Extensions/php class/test_class.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/php class/test_class.php
index 0de102c..f626e59 100644
--- a/Demos/Extensions/php class/test_class.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/test_class.php
@@ -1,15 +1,15 @@
-
-if(!extension_loaded('php_class')) {
- dl('php_class.dll');
-}
-
-$a = new php_demo_class();
-echo $a->demo_email();
-
-echo "\n";
-
-$b = get_demo_class();
-echo $b->tool;
-
-?>
-
+
+if(!extension_loaded('php_class')) {
+ dl('php_class.dll');
+}
+
+$a = new php_demo_class();
+echo $a->demo_email();
+
+echo "\n";
+
+$b = get_demo_class();
+echo $b->tool;
+
+?>
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dfm
new file mode 100644
index 0000000..4e99c1b
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dfm
@@ -0,0 +1,18 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'mygettext'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'AText'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'some_functions'
+ Height = 150
+ Width = 215
+end
diff --git a/Demos/Extensions/Resources/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dti
similarity index 91%
rename from Demos/Extensions/Resources/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dti
index e053eae..aa0c5c1 100644
--- a/Demos/Extensions/Resources/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.pas
new file mode 100644
index 0000000..3115dee
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/Unit1.pas
@@ -0,0 +1,59 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+var
+ ReturnString : AnsiString;
+begin
+ ReturnString := AnsiString(Parameters[0].Value + ' from DLL');
+ ReturnValue := ReturnString;
+end;
+
+end.
\ No newline at end of file
diff --git a/Demos/Extensions/phpDLL/phpDLL.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dpr
similarity index 94%
rename from Demos/Extensions/phpDLL/phpDLL.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dpr
index 02e5dc0..4462aac 100644
--- a/Demos/Extensions/phpDLL/phpDLL.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dpr
@@ -1,16 +1,16 @@
-library phpDLL;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library phpDLL;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dproj
new file mode 100644
index 0000000..1b2d6f8
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.dproj
@@ -0,0 +1,107 @@
+
+
+ {76FCDBA5-C096-496F-86A7-DD65BE290420}
+ phpDLL.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ phpDLL.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ phpDLL.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/reference/php_ref.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.res
similarity index 100%
rename from Demos/Extensions/reference/php_ref.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/phpDLL.res
diff --git a/Demos/Extensions/phpDLL/testdll.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/testdll.php
similarity index 95%
rename from Demos/Extensions/phpDLL/testdll.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/testdll.php
index 31b1d0b..a616618 100644
--- a/Demos/Extensions/phpDLL/testdll.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/phpDLL/testdll.php
@@ -1,24 +1,24 @@
-
-if(!extension_loaded('phpDll')) {
- dl('phpDll.dll');
-}
-$module = 'some_functions';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str ";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." ";
-}
-
-$str = MyGetText("Hello!"); //This Delphi function is : ... ReturnValue:='Hello From DLL';
-
-echo "Delphi ret -->$str ";
-
-?>
+
+if(!extension_loaded('phpDll')) {
+ dl('phpDll.dll');
+}
+$module = 'some_functions';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str ";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." ";
+}
+
+$str = MyGetText("Hello!"); //This Delphi function is : ... ReturnValue:='Hello From DLL';
+
+echo "Delphi ret -->$str ";
+
+?>
diff --git a/Demos/psvPHP/Encryption/uMain.ddp b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.ddp
similarity index 100%
rename from Demos/psvPHP/Encryption/uMain.ddp
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.ddp
diff --git a/Demos/Extensions/reference/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.dfm
similarity index 95%
rename from Demos/Extensions/reference/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.dfm
index 2766761..928797f 100644
--- a/Demos/Extensions/reference/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.dfm
@@ -1,24 +1,24 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'helloworld'
- Tag = 0
- Parameters = <
- item
- Name = 'Param1'
- ParamType = tpString
- end
- item
- Name = 'Param2'
- ParamType = tpString
- end>
- OnExecute = PHPExtension1Functions0Execute
- end>
- ModuleName = 'php_ref'
- Left = 192
- Top = 114
- Height = 150
- Width = 215
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'helloworld'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpString
+ end
+ item
+ Name = 'Param2'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'php_ref'
+ Left = 192
+ Top = 114
+ Height = 150
+ Width = 215
+end
diff --git a/Demos/Extensions/reference/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.pas
similarity index 81%
rename from Demos/Extensions/reference/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.pas
index 8b57eaf..3207ba9 100644
--- a/Demos/Extensions/reference/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/Unit1.pas
@@ -1,45 +1,45 @@
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-begin
- ZVAL_STRING(Parameters[0].ZendValue, 'hello', true);
- ZVAL_STRING(Parameters[1].ZendValue, 'world', true);
-end;
-
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ZVAL_STRING(Parameters[0].ZendValue, 'hello', true);
+ ZVAL_STRING(Parameters[1].ZendValue, 'world', true);
+end;
+
end.
\ No newline at end of file
diff --git a/Demos/Extensions/reference/php_ref.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dpr
similarity index 94%
rename from Demos/Extensions/reference/php_ref.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dpr
index 9221ead..b9cf9f3 100644
--- a/Demos/Extensions/reference/php_ref.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dpr
@@ -1,16 +1,16 @@
-library php_ref;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library php_ref;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dproj
new file mode 100644
index 0000000..4d05ff5
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.dproj
@@ -0,0 +1,107 @@
+
+
+ {0773DC5D-79DB-4080-AD29-0272364C43AE}
+ php_ref.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ php_ref.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ php_ref.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/psvPHP/Encryption/EncDemo.res b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.res
similarity index 100%
rename from Demos/psvPHP/Encryption/EncDemo.res
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/php_ref.res
diff --git a/Demos/Extensions/reference/testref.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/testref.php
similarity index 94%
rename from Demos/Extensions/reference/testref.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/reference/testref.php
index 46c20cf..071d7bf 100644
--- a/Demos/Extensions/reference/testref.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/reference/testref.php
@@ -1,28 +1,28 @@
-
-if(!extension_loaded('php_ref')) {
- dl('php_ref.dll');
-}
-
-$module = 'php_ref';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str ";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." ";
-}
-
-$a = "";
-$b = "";
-
-helloworld($a, $b);
-
-echo $a." ".$b;
-
-?>
+
+if(!extension_loaded('php_ref')) {
+ dl('php_ref.dll');
+}
+
+$module = 'php_ref';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str ";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." ";
+}
+
+$a = "";
+$b = "";
+
+helloworld($a, $b);
+
+echo $a." ".$b;
+
+?>
diff --git a/Demos/Extensions/skeleton/CREDITS b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/CREDITS
similarity index 100%
rename from Demos/Extensions/skeleton/CREDITS
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/CREDITS
diff --git a/Demos/Extensions/skeleton/EXPERIMENTAL b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/EXPERIMENTAL
similarity index 100%
rename from Demos/Extensions/skeleton/EXPERIMENTAL
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/EXPERIMENTAL
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.bdsproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.bdsproj
new file mode 100644
index 0000000..86a7418
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {486042C3-7869-4681-B499-D6AA42BE8981}
+
+
+
+
+ skeleton.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+ C:\php\ext
+
+
+
+ $(DELPHI)\Lib\Debug
+ vcl;rtl;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;vclx;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;php4DelphiR7;CoolTrayIcon_D6plus;psvLabelsR7;PSCControlsR7;cxLibraryVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtItemsD7;dxBarExtDBItemsD7;dxsbD7;dxDockingD7;dxNavBarD7;dxPSCoreD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSTeeChartD7;dxPSDBTeeChartD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxVerticalGridVCLD7;cxPageControlVCLD7;cxGridVCLD7;FreeBurner;FBTranscoder;FBAudioGrabber;SqlDir70;Vcwd7;MSICS_D7_Rtl;VirtualTreesD7;DSPack_D7;DirectX9_D7;WPTools5_D7;RemObjects_WebBroker_D7;RemObjects_Indy_D7;RemObjects_RODX_D7;RemObjects_BPDX_D7;DataAbstract_Core_D7;DataAbstract_IDE_D7;DataAbstract_DBXDriver_D7;DataAbstract_Scripting_D7;PascalScript_RO_D7;RaizeComponentsVcl
+
+
+ False
+
+
+ c:\php\skeleton.php
+ C:\php\php.exe
+
+ False
+ c:\php
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/Demos/Extensions/skeleton/skeleton.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
similarity index 82%
rename from Demos/Extensions/skeleton/skeleton.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
index 9712780..a2c7c38 100644
--- a/Demos/Extensions/skeleton/skeleton.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
@@ -1,116 +1,123 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: skeleton.dpr,v 6.2 02/2006 delphi32 Exp $ }
-{$I php.inc}
-
-library skeleton;
-
-uses
- Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI;
-
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('extname support'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-{$IFDEF PHP510}
-procedure confirm_extname_compiled (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure confirm_extname_compiled (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-arg : PChar;
-str : string;
-param : pzval_array;
-begin
- if return_value_ptr = nil then
- begin
- end;
-
- if ht = 0 then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- arg := param[0]^.value.str.val;
- str := Format('Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.', ['extname', arg]);
- ZVAL_STRING(return_value, PChar(str), true);
- dispose_pzval_array(param);
-end;
-
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..1] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'extname';
- ModuleEntry.version := '0.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- Module_entry_table[0].fname := 'confirm_extname_compiled';
- Module_entry_table[0].handler := @confirm_extname_compiled;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- Result := @ModuleEntry;
-end;
-
-
-
-exports
- get_module;
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{ $Id: skeleton.dpr,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library skeleton;
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('extname support'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure confirm_extname_compiled (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure confirm_extname_compiled (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+arg : PAnsiChar;
+str : AnsiString;
+param : pzval_array;
+begin
+ {$IFDEF PHP510}
+ if return_value_ptr = nil then
+ begin
+ end;
+ {$ENDIF}
+
+ if ht = 0 then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ arg := param[0]^.value.str.val;
+ str := Format('Congratulations! Module %.78s is now compiled into PHP.', [arg]);
+ ZVAL_STRING(return_value, PAnsiChar(str), true);
+ dispose_pzval_array(param);
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'extname';
+ ModuleEntry.version := '0.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ Module_entry_table[0].fname := 'confirm_extname_compiled';
+ Module_entry_table[0].handler := @confirm_extname_compiled;
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dproj b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dproj
new file mode 100644
index 0000000..ebc68dd
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dproj
@@ -0,0 +1,111 @@
+
+
+ {486042C3-7869-4681-B499-D6AA42BE8981}
+ skeleton.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ C:\php\ext\skeleton.dll
+ 00400000
+ vcl;rtl;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;vclx;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;php4DelphiR7;CoolTrayIcon_D6plus;psvLabelsR7;PSCControlsR7;cxLibraryVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtItemsD7;dxBarExtDBItemsD7;dxsbD7;dxDockingD7;dxNavBarD7;dxPSCoreD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSTeeChartD7;dxPSDBTeeChartD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxVerticalGridVCLD7;cxPageControlVCLD7;cxGridVCLD7;FreeBurner;FBTranscoder;FBAudioGrabber;SqlDir70;Vcwd7;MSICS_D7_Rtl;VirtualTreesD7;DSPack_D7;DirectX9_D7;WPTools5_D7;RemObjects_WebBroker_D7;RemObjects_Indy_D7;RemObjects_RODX_D7;RemObjects_BPDX_D7;DataAbstract_Core_D7;DataAbstract_IDE_D7;DataAbstract_DBXDriver_D7;DataAbstract_Scripting_D7;PascalScript_RO_D7;RaizeComponentsVcl
+ $(DELPHI)\Lib\Debug;$(DCC_UnitSearchPath)
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)
+ x86
+ C:\php\ext
+ true
+ false
+ true
+ false
+ 1
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ skeleton.dpr
+
+
+ c:\php\test_skeleton.php
+ C:\php\php.exe
+ False
+ c:\php
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/skeleton/tests/skeleton.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/skeleton.php
similarity index 95%
rename from Demos/Extensions/skeleton/tests/skeleton.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/skeleton.php
index bb40048..1866534 100644
--- a/Demos/Extensions/skeleton/tests/skeleton.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/skeleton.php
@@ -1,19 +1,19 @@
-
-if(!extension_loaded('extname')) {
- dl('skeleton.dll');
-}
-$module = 'extname';
-$functions = get_extension_funcs($module);
-echo "Functions available in the test extension: \n";
-foreach($functions as $func) {
- echo $func." \n";
-}
-echo " \n";
-$function = 'confirm_' . $module . '_compiled';
-if (extension_loaded($module)) {
- $str = $function($module);
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-?>
+
+if(!extension_loaded('extname')) {
+ dl('skeleton.dll');
+}
+$module = 'extname';
+$functions = get_extension_funcs($module);
+echo "Functions available in the test extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+echo " \n";
+$function = 'confirm_' . $module . '_compiled';
+if (extension_loaded($module)) {
+ $str = $function($module);
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+?>
diff --git a/Demos/Extensions/skeleton/tests/test_skeleton.php b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/test_skeleton.php
similarity index 94%
rename from Demos/Extensions/skeleton/tests/test_skeleton.php
rename to Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/test_skeleton.php
index c1c78a0..c189599 100644
--- a/Demos/Extensions/skeleton/tests/test_skeleton.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/tests/test_skeleton.php
@@ -1,25 +1,25 @@
-
-if(!extension_loaded('extname')) {
- dl('skeleton.dll');
-}
-
-
-$str = confirm_extname_compiled("skeleton");
-echo "$str\n";
-
-$module = 'extname';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." \n";
-}
-
-?>
+
+if(!extension_loaded('extname')) {
+ dl('skeleton.dll');
+}
+
+
+$str = confirm_extname_compiled("skeleton");
+echo "$str\n";
+
+$module = 'extname';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Demos/Tutorial/Step.01/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dpr
similarity index 94%
rename from Demos/Tutorial/Step.01/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dpr
index 0c8b444..598d21f 100644
--- a/Demos/Tutorial/Step.01/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dpr
@@ -1,16 +1,16 @@
-library Project1;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dproj
new file mode 100644
index 0000000..0f6efd5
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.dproj
@@ -0,0 +1,107 @@
+
+
+ {DD722C04-1B93-46B2-9E05-D74A1003601F}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Tutorial/Step.01/Project1.res b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.res
similarity index 100%
rename from Demos/Tutorial/Step.01/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.ddp differ
diff --git a/Demos/Tutorial/Step.01/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dfm
similarity index 65%
rename from Demos/Tutorial/Step.01/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dfm
index 59d99f7..1f4f79b 100644
--- a/Demos/Tutorial/Step.01/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dfm
@@ -1,7 +1,9 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '0.0'
- Functions = <>
- Height = 0
- Width = 0
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <>
+ Left = 512
+ Top = 312
+ Height = 331
+ Width = 444
+end
diff --git a/Demos/Tutorial/Step.01/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dti
similarity index 91%
rename from Demos/Tutorial/Step.01/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dti
index 332c5f1..25ebfd4 100644
--- a/Demos/Tutorial/Step.01/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=267
-Top=308
-Width=696
-Height=480
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=267
+Top=308
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Tutorial/Step.04/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.pas
similarity index 90%
rename from Demos/Tutorial/Step.04/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.pas
index 9f24204..1fcf616 100644
--- a/Demos/Tutorial/Step.04/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.01/Unit1.pas
@@ -1,45 +1,45 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
end.
\ No newline at end of file
diff --git a/Demos/Tutorial/Step.02/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dpr
similarity index 94%
rename from Demos/Tutorial/Step.02/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dpr
index 0c8b444..598d21f 100644
--- a/Demos/Tutorial/Step.02/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dpr
@@ -1,16 +1,16 @@
-library Project1;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dproj
new file mode 100644
index 0000000..da78540
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.dproj
@@ -0,0 +1,107 @@
+
+
+ {8DF133D6-16D5-4538-B6B0-C529C2CC6A9A}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Tutorial/Step.02/Project1.res b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.res
similarity index 100%
rename from Demos/Tutorial/Step.02/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.ddp differ
diff --git a/Demos/Tutorial/Step.02/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dfm
similarity index 70%
rename from Demos/Tutorial/Step.02/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dfm
index 4152a0a..19fa4f3 100644
--- a/Demos/Tutorial/Step.02/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dfm
@@ -1,8 +1,10 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '1.0'
- Functions = <>
- ModuleName = 'mymodule'
- Height = 0
- Width = 0
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <>
+ ModuleName = 'mymodule'
+ Left = 541
+ Top = 282
+ Height = 376
+ Width = 406
+end
diff --git a/Demos/Tutorial/Step.02/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dti
similarity index 91%
rename from Demos/Tutorial/Step.02/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dti
index 049680b..17f5861 100644
--- a/Demos/Tutorial/Step.02/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=192
-Top=130
-Width=696
-Height=480
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Tutorial/Step.02/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.pas
similarity index 90%
rename from Demos/Tutorial/Step.02/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.pas
index 9f24204..1fcf616 100644
--- a/Demos/Tutorial/Step.02/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.02/Unit1.pas
@@ -1,45 +1,45 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
end.
\ No newline at end of file
diff --git a/Demos/Tutorial/Step.03/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dpr
similarity index 94%
rename from Demos/Tutorial/Step.03/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dpr
index 0c8b444..598d21f 100644
--- a/Demos/Tutorial/Step.03/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dpr
@@ -1,16 +1,16 @@
-library Project1;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dproj
new file mode 100644
index 0000000..94687bb
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.dproj
@@ -0,0 +1,107 @@
+
+
+ {C5C7A78C-9E0D-4C1C-B0D8-D4B730D6C440}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Tutorial/Step.03/Project1.res b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.res
similarity index 100%
rename from Demos/Tutorial/Step.03/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.ddp differ
diff --git a/Demos/Tutorial/Step.03/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dfm
similarity index 79%
rename from Demos/Tutorial/Step.03/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dfm
index fa1174e..03f8fa1 100644
--- a/Demos/Tutorial/Step.03/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dfm
@@ -1,13 +1,15 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'myfunction'
- Tag = 0
- Parameters = <>
- end>
- ModuleName = 'mymodule'
- Height = 0
- Width = 0
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <>
+ end>
+ ModuleName = 'mymodule'
+ Left = 499
+ Top = 235
+ Height = 443
+ Width = 508
+end
diff --git a/Demos/Tutorial/Step.03/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dti
similarity index 92%
rename from Demos/Tutorial/Step.03/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dti
index a545ff6..3af6432 100644
--- a/Demos/Tutorial/Step.03/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=192
-Top=130
-Width=696
-Height=480
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1\PHPExtension1.Functions
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Tutorial/Step.01/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.pas
similarity index 90%
rename from Demos/Tutorial/Step.01/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.pas
index 9f24204..00bf20a 100644
--- a/Demos/Tutorial/Step.01/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.03/Unit1.pas
@@ -1,45 +1,45 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
end.
\ No newline at end of file
diff --git a/Demos/Tutorial/Step.04/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dpr
similarity index 94%
rename from Demos/Tutorial/Step.04/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dpr
index 0c8b444..598d21f 100644
--- a/Demos/Tutorial/Step.04/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dpr
@@ -1,16 +1,16 @@
-library Project1;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TPHPExtension1, PHPExtension1);
- Application.Run;
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dproj
new file mode 100644
index 0000000..dc630b7
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.dproj
@@ -0,0 +1,107 @@
+
+
+ {1661D7C8-971E-48ED-8A13-4E232A479ECE}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Tutorial/Step.04/Project1.res b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.res
similarity index 100%
rename from Demos/Tutorial/Step.04/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.ddp differ
diff --git a/Demos/Tutorial/Step.04/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dfm
similarity index 84%
rename from Demos/Tutorial/Step.04/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dfm
index a93362b..7f21115 100644
--- a/Demos/Tutorial/Step.04/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dfm
@@ -1,17 +1,19 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'myfunction'
- Tag = 0
- Parameters = <
- item
- Name = 'myparameter'
- ParamType = tpString
- end>
- end>
- ModuleName = 'mymodule'
- Height = 0
- Width = 0
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'myparameter'
+ ParamType = tpString
+ end>
+ end>
+ ModuleName = 'mymodule'
+ Left = 397
+ Top = 234
+ Height = 497
+ Width = 591
+end
diff --git a/Demos/Tutorial/Step.05/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dti
similarity index 92%
rename from Demos/Tutorial/Step.05/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dti
index 7c4bc17..9090a91 100644
--- a/Demos/Tutorial/Step.05/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=192
-Top=130
-Width=696
-Height=480
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Tutorial/Step.03/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.pas
similarity index 90%
rename from Demos/Tutorial/Step.03/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.pas
index 209050f..1fcf616 100644
--- a/Demos/Tutorial/Step.03/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.04/Unit1.pas
@@ -1,45 +1,45 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dproj
new file mode 100644
index 0000000..f1c98da
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.dproj
@@ -0,0 +1,113 @@
+
+
+ {FC81AF33-A828-4A15-A5F3-F350290FFE2B}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.dll
+ false
+ false
+ true
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ C:\php\ext\Project1.dll
+ C:\php\ext\
+ true
+ true
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+ c:\php\test_script.php
+ C:\php\php.exe
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Tutorial/Step.05/Project1.res b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.res
similarity index 100%
rename from Demos/Tutorial/Step.05/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.ddp differ
diff --git a/Demos/Tutorial/Step.05/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dfm
similarity index 86%
rename from Demos/Tutorial/Step.05/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dfm
index 5bb4741..8e8c523 100644
--- a/Demos/Tutorial/Step.05/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dfm
@@ -1,18 +1,20 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'myfunction'
- Tag = 0
- Parameters = <
- item
- Name = 'myparameter'
- ParamType = tpString
- end>
- OnExecute = PHPExtension1Functions0Execute
- end>
- ModuleName = 'mymodule'
- Height = 0
- Width = 0
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'myparameter'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'mymodule'
+ Left = 414
+ Top = 262
+ Height = 359
+ Width = 478
+end
diff --git a/Demos/Tutorial/Step.04/Unit1.dti b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dti
similarity index 92%
rename from Demos/Tutorial/Step.04/Unit1.dti
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dti
index 7c4bc17..9090a91 100644
--- a/Demos/Tutorial/Step.04/Unit1.dti
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=192
-Top=130
-Width=696
-Height=480
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Tutorial/Step.05/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.pas
similarity index 83%
rename from Demos/Tutorial/Step.05/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.pas
index e7da6bc..292a871 100644
--- a/Demos/Tutorial/Step.05/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.05/Unit1.pas
@@ -1,57 +1,57 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-
-begin
- //just returns the received value back
- ReturnValue := Parameters[0].Value;
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+begin
+ //just returns the received value back
+ ReturnValue := Parameters[0].Value;
+end;
+
end.
\ No newline at end of file
diff --git a/Demos/Tutorial/Step.06/test_script.php b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.06/test_script.php
similarity index 94%
rename from Demos/Tutorial/Step.06/test_script.php
rename to Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.06/test_script.php
index e97564a..e4c40cb 100644
--- a/Demos/Tutorial/Step.06/test_script.php
+++ b/Source/Demos Delphi 2009 (WideString support)/Tutorial/Step.06/test_script.php
@@ -1,22 +1,22 @@
-
-if(!extension_loaded('mymodule')) {
- dl('project1.dll');
-}
-
-
-$module = 'mymodule';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." \n";
-}
-
-?>
+
+if(!extension_loaded('mymodule')) {
+ dl('project1.dll');
+}
+
+
+$module = 'mymodule';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Demos/php4Applications/C#/PHP4DelphiDemo/App.ico b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/App.ico
similarity index 100%
rename from Demos/php4Applications/C#/PHP4DelphiDemo/App.ico
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/App.ico
diff --git a/Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
similarity index 97%
rename from Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
index 177a4f0..9f89a32 100644
--- a/Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
@@ -1,58 +1,58 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-// (*) If no key is specified, the assembly is not signed.
-// (*) KeyName refers to a key that has been installed in the Crypto Service
-// Provider (CSP) on your machine. KeyFile refers to a file which contains
-// a key.
-// (*) If the KeyFile and the KeyName values are both specified, the
-// following processing occurs:
-// (1) If the KeyName can be found in the CSP, that key is used.
-// (2) If the KeyName does not exist and the KeyFile does exist, the key
-// in the KeyFile is installed into the CSP and used.
-// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-// When specifying the KeyFile, the location of the KeyFile should be
-// relative to the project output directory which is
-// %Project Directory%\obj\. For example, if your KeyFile is
-// located in the project directory, you would specify the AssemblyKeyFile
-// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-// documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.cs b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.cs
new file mode 100644
index 0000000..5e71f07
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Text;
+using System.Data;
+using System.Runtime.InteropServices;
+
+
+
+namespace PHP4DelphiDemo
+{
+ ///
+ /// Summary description for Form1.
+ ///
+ public class Form1 : System.Windows.Forms.Form
+ {
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ private Panel panel1;
+ private Button btnExecuteScript;
+ private Button btnExecuteCode;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
+
+ public Form1()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
+
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.btnExecuteScript = new System.Windows.Forms.Button();
+ this.btnExecuteCode = new System.Windows.Forms.Button();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox1.Location = new System.Drawing.Point(0, 0);
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.textBox1.Size = new System.Drawing.Size(326, 197);
+ this.textBox1.TabIndex = 0;
+ //
+ // openFileDialog1
+ //
+ this.openFileDialog1.Filter = "PHP files|*.php";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.btnExecuteCode);
+ this.panel1.Controls.Add(this.btnExecuteScript);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel1.Location = new System.Drawing.Point(0, 197);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(326, 49);
+ this.panel1.TabIndex = 2;
+ //
+ // btnExecuteScript
+ //
+ this.btnExecuteScript.Location = new System.Drawing.Point(12, 12);
+ this.btnExecuteScript.Name = "btnExecuteScript";
+ this.btnExecuteScript.Size = new System.Drawing.Size(94, 23);
+ this.btnExecuteScript.TabIndex = 2;
+ this.btnExecuteScript.Text = "Execute Script";
+ //
+ // btnExecuteCode
+ //
+ this.btnExecuteCode.Location = new System.Drawing.Point(112, 12);
+ this.btnExecuteCode.Name = "btnExecuteCode";
+ this.btnExecuteCode.Size = new System.Drawing.Size(96, 23);
+ this.btnExecuteCode.TabIndex = 3;
+ this.btnExecuteCode.Text = "Execute Code";
+ this.btnExecuteCode.UseVisualStyleBackColor = true;
+ this.btnExecuteCode.Click += new System.EventHandler(this.btnExecuteCode_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(326, 246);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.panel1);
+ this.Name = "Form1";
+ this.Text = "PHP";
+ this.panel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+ #endregion
+
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+ private void button1_Click(object sender, System.EventArgs e)
+ {
+ int l = 0;
+ int RequestID = 0;
+ StringBuilder builder = new StringBuilder();
+
+ if(openFileDialog1.ShowDialog() == DialogResult.OK)
+ {
+ RequestID = InitRequest();
+ string fn = openFileDialog1.FileName;
+ ExecutePHP(RequestID, fn);
+ l = GetResultBufferSize(RequestID);
+ builder.Capacity = l;
+ l = GetResultText(RequestID, builder, builder.Capacity + 1);
+ textBox1.Text = builder.ToString();
+ DoneRequest(RequestID);
+ }
+
+
+ }
+
+
+ [DllImport("PHP4App.dll")]
+ public static extern int InitRequest();
+
+ ///
+ /// Execute PHP script
+ ///
+ [DllImport("PHP4App.dll")]
+ public static extern int ExecutePHP(int RequestID, string FileName);
+
+ [DllImport("PHP4App.dll", SetLastError=true)]
+ public static extern void DoneRequest(int RequestID);
+
+ [DllImport("PHP4App.dll", SetLastError=true)]
+ public static extern int GetResultText(int RequestID, StringBuilder Buf, int BufLen);
+
+ [DllImport("PHP4App.dll")]
+ public static extern void RegisterVariable(int RequestID, string AName, string AValue);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int ExecuteCode(int RequestID, string ACode);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetVariable(int RequestID, string AName, StringBuilder Buffer, int BufLen);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int SaveToFile(int RequestID, string AFileName);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetVariableSize(int RequestID, string AName);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetResultBufferSize(int RequestID);
+
+ private void btnExecuteCode_Click(object sender, EventArgs e)
+ {
+ int l = 0;
+ int RequestID = 0;
+ StringBuilder builder = new StringBuilder();
+ StringBuilder varbuilder = new StringBuilder();
+
+ RequestID = InitRequest();
+ RegisterVariable(RequestID, "x","2");
+ RegisterVariable(RequestID, "y","3");
+ RegisterVariable(RequestID, "z","0");
+ ExecuteCode(RequestID, "$z = $x + $y; echo \"Result \"; echo $z;");
+ l = GetResultBufferSize(RequestID);
+ if (l > 0)
+ {
+ builder.Capacity = l;
+ GetResultText(RequestID, builder, builder.Capacity + 1);
+ textBox1.Text = builder.ToString();
+ }
+
+ l = GetVariableSize(RequestID, "z");
+ if (l > 0)
+ {
+ varbuilder.Capacity = l;
+ GetVariable(RequestID, "z", varbuilder, varbuilder.Capacity + 1);
+ MessageBox.Show(String.Concat("After execution z=", varbuilder.ToString()));
+ }
+ DoneRequest(RequestID);
+ }
+
+ }
+}
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.resx b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.resx
new file mode 100644
index 0000000..6e58fa8
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/Form1.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj
new file mode 100644
index 0000000..05de69b
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj
@@ -0,0 +1,112 @@
+
+
+ Local
+ 8.0.50727
+ 2.0
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}
+ Debug
+ AnyCPU
+ App.ico
+
+
+ PHP4DelphiDemo
+
+
+ JScript
+ Grid
+ IE50
+ false
+ WinExe
+ PHP4DelphiDemo
+ OnBuildSuccess
+
+
+
+
+
+
+
+
+ bin\Debug\
+ false
+ 285212672
+ false
+
+
+ DEBUG;TRACE
+
+
+ true
+ 4096
+ false
+
+
+ false
+ false
+ false
+ false
+ 4
+ full
+ prompt
+
+
+ bin\Release\
+ false
+ 285212672
+ false
+
+
+ TRACE
+
+
+ false
+ 4096
+ false
+
+
+ true
+ false
+ false
+ false
+ 4
+ none
+ prompt
+
+
+
+ System
+
+
+ System.Data
+
+
+ System.Drawing
+
+
+ System.Windows.Forms
+
+
+ System.XML
+
+
+
+
+
+
+ Code
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user
new file mode 100644
index 0000000..5414047
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user
@@ -0,0 +1,58 @@
+
+
+ 7.10.3077
+ Debug
+ AnyCPU
+
+
+
+
+
+
+ 0
+ ProjectFiles
+ 0
+
+
+ false
+ false
+ false
+ false
+ false
+
+
+ Project
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+ false
+ false
+ false
+ false
+
+
+ Project
+
+
+
+
+
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln
new file mode 100644
index 0000000..9758dfe
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln
@@ -0,0 +1,19 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PHP4DelphiDemo", "PHP4DelphiDemo.csproj", "{0DA732DE-42B5-436C-8BD0-9036B7D79EAA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/app.config b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/app.config
new file mode 100644
index 0000000..b7d8d1d
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/app.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Demos/php4Applications/C#/PHP4DelphiDemo/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/test.php
similarity index 89%
rename from Demos/php4Applications/C#/PHP4DelphiDemo/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/test.php
index 852e574..d3fccb8 100644
--- a/Demos/php4Applications/C#/PHP4DelphiDemo/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C#/PHP4DelphiDemo/test.php
@@ -1,4 +1,4 @@
-
- $z = $x + $y;
- phpinfo();
-?>
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Demos/php4Applications/C++ VS 2005/StdAfx.cpp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.cpp
similarity index 97%
rename from Demos/php4Applications/C++ VS 2005/StdAfx.cpp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.cpp
index 5679876..976384e 100644
--- a/Demos/php4Applications/C++ VS 2005/StdAfx.cpp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.cpp
@@ -1,8 +1,8 @@
-// stdafx.cpp : source file that includes just the standard includes
-// cdemo.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+// stdafx.cpp : source file that includes just the standard includes
+// cdemo.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Demos/php4Applications/C++ VS 6.0/StdAfx.h b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.h
similarity index 96%
rename from Demos/php4Applications/C++ VS 6.0/StdAfx.h
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.h
index d193529..1b40500 100644
--- a/Demos/php4Applications/C++ VS 6.0/StdAfx.h
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/StdAfx.h
@@ -1,19 +1,19 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
-#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
diff --git a/Demos/php4Applications/C++ VS 2005/cdemo.cpp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.cpp
similarity index 95%
rename from Demos/php4Applications/C++ VS 2005/cdemo.cpp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.cpp
index 496409d..02f788a 100644
--- a/Demos/php4Applications/C++ VS 2005/cdemo.cpp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.cpp
@@ -1,102 +1,101 @@
-// cdemo.cpp : Defines the entry point for the console application.
-//
-
-{ $Id: cdemo.cpp,v 6.2 02/2006 delphi32 Exp $ }
-
-# include "stdafx.h"
-# include
-# include
-# include
-# include
-
-
-typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
-typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
-typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
-typedef int (WINAPI * InitRequest)(void);
-typedef void (WINAPI * DoneRequest)(int request_id);
-typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
-typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
-typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
-typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
-typedef int (WINAPI * GetResultBufferSize)(int request_id);
-
-int main(int argc, char* argv[])
-{
- ExecutePHP lpfnExecutePHP;
- RegisterVariable lpfnRegisterVariable;
- ExecuteCode lpfnExecuteCode;
- InitRequest lpfnInitRequest;
- DoneRequest lpfnDoneRequest;
- GetResultText lpfnGetResultText;
- GetVariableSize lpfnGetVariableSize;
- GetVariable lpfnGetVariable;
- SaveToFile lpfnSaveToFile;
- GetResultBufferSize lpfnGetResultBufferSize;
-
- HMODULE handle;
- char *array;
- int request_id;
- int len;
-
- handle = LoadLibrary("php4app.dll");
- if( handle == NULL )
- return FALSE ;
-
- lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
- lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
- lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
- lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
- lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
- lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
- lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
- lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
- lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
- lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
-
- if(lpfnRegisterVariable == NULL ||
- lpfnExecutePHP == NULL ||
- lpfnExecuteCode == NULL )
- {
- FreeLibrary( handle ) ;
- return FALSE ;
- }
-
- request_id = lpfnInitRequest();
- lpfnRegisterVariable(request_id, "x", "2");
- lpfnRegisterVariable(request_id, "y", "3");
- lpfnRegisterVariable(request_id, "z", "0");
-
- lpfnExecutePHP(request_id, "test.php");
-
- len = lpfnGetResultText(request_id, NULL, 0);
- array = (char *)malloc(len);
- lpfnGetResultText(request_id, array, len);
- printf("\n");
- printf("%s\n",array);
- free(array);
-
- //get variable value after execution
- len = lpfnGetVariableSize(request_id, "z");
- if (len > 0) {
- array = (char *)malloc(len);
- lpfnGetVariable(request_id, "z", array, len);
- printf("after execution variable z = %s\n", array);
- free(array);
- }
- lpfnDoneRequest(request_id);
-
- request_id = lpfnInitRequest();
- lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
- len = lpfnGetResultText(request_id, NULL, 0);
- array = (char *)malloc(len);
- lpfnGetResultText(request_id, array, len);
- printf("\n");
- printf("%s\n",array);
- free(array);
- lpfnDoneRequest(request_id);
-
- FreeLibrary(handle);
-
- return 0;
-}
+// cdemo.cpp : Defines the entry point for the console application.
+//
+
+
+# include "stdafx.h"
+# include
+# include
+# include
+# include
+
+
+typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
+typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
+typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
+typedef int (WINAPI * InitRequest)(void);
+typedef void (WINAPI * DoneRequest)(int request_id);
+typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
+typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
+typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
+typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
+typedef int (WINAPI * GetResultBufferSize)(int request_id);
+
+int main(int argc, char* argv[])
+{
+ ExecutePHP lpfnExecutePHP;
+ RegisterVariable lpfnRegisterVariable;
+ ExecuteCode lpfnExecuteCode;
+ InitRequest lpfnInitRequest;
+ DoneRequest lpfnDoneRequest;
+ GetResultText lpfnGetResultText;
+ GetVariableSize lpfnGetVariableSize;
+ GetVariable lpfnGetVariable;
+ SaveToFile lpfnSaveToFile;
+ GetResultBufferSize lpfnGetResultBufferSize;
+
+ HMODULE handle;
+ char *array;
+ int request_id;
+ int len;
+
+ handle = LoadLibrary("php4app.dll");
+ if( handle == NULL )
+ return FALSE ;
+
+ lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
+ lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
+ lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
+ lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
+ lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
+ lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
+ lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
+ lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
+ lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
+ lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
+
+ if(lpfnRegisterVariable == NULL ||
+ lpfnExecutePHP == NULL ||
+ lpfnExecuteCode == NULL )
+ {
+ FreeLibrary( handle ) ;
+ return FALSE ;
+ }
+
+ request_id = lpfnInitRequest();
+ lpfnRegisterVariable(request_id, "x", "2");
+ lpfnRegisterVariable(request_id, "y", "3");
+ lpfnRegisterVariable(request_id, "z", "0");
+
+ lpfnExecutePHP(request_id, "test.php");
+
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+
+ //get variable value after execution
+ len = lpfnGetVariableSize(request_id, "z");
+ if (len > 0) {
+ array = (char *)malloc(len);
+ lpfnGetVariable(request_id, "z", array, len);
+ printf("after execution variable z = %s\n", array);
+ free(array);
+ }
+ lpfnDoneRequest(request_id);
+
+ request_id = lpfnInitRequest();
+ lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+ lpfnDoneRequest(request_id);
+
+ FreeLibrary(handle);
+
+ return 0;
+}
diff --git a/Demos/php4Applications/C++ VS 2005/cdemo.dsp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsp
similarity index 97%
rename from Demos/php4Applications/C++ VS 2005/cdemo.dsp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsp
index a9ff39d..a6c53b0 100644
--- a/Demos/php4Applications/C++ VS 2005/cdemo.dsp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsp
@@ -1,113 +1,113 @@
-# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cdemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "cdemo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cdemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "cdemo - Win32 Release"
-# Name "cdemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cdemo.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"stdafx.h"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\StdAfx.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Source File
-
-SOURCE=.\ReadMe.txt
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cdemo - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdemo - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdemo - Win32 Release"
+# Name "cdemo - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\cdemo.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/Demos/php4Applications/C++ VS 2005/cdemo.dsw b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsw
similarity index 94%
rename from Demos/php4Applications/C++ VS 2005/cdemo.dsw
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsw
index a7b42f3..883b7e0 100644
--- a/Demos/php4Applications/C++ VS 2005/cdemo.dsw
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.dsw
@@ -1,29 +1,29 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Demos/php4Applications/C++ VS 2005/cdemo.sln b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.sln
similarity index 97%
rename from Demos/php4Applications/C++ VS 2005/cdemo.sln
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.sln
index 9ca35a3..7d26c36 100644
--- a/Demos/php4Applications/C++ VS 2005/cdemo.sln
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdemo", "cdemo.vcproj", "{30D7BBD6-5766-4A88-818A-47AC1520B484}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.ActiveCfg = Debug|Win32
- {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.Build.0 = Debug|Win32
- {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.ActiveCfg = Release|Win32
- {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdemo", "cdemo.vcproj", "{30D7BBD6-5766-4A88-818A-47AC1520B484}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.ActiveCfg = Debug|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.Build.0 = Debug|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.ActiveCfg = Release|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Demos/php4Applications/C++ VS 2005/cdemo.vcproj b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.vcproj
similarity index 95%
rename from Demos/php4Applications/C++ VS 2005/cdemo.vcproj
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.vcproj
index 735e786..f5d0004 100644
--- a/Demos/php4Applications/C++ VS 2005/cdemo.vcproj
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/cdemo.vcproj
@@ -1,268 +1,268 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Demos/php4Applications/Delphi/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/test.php
similarity index 90%
rename from Demos/php4Applications/Delphi/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/test.php
index 04b297f..54b255b 100644
--- a/Demos/php4Applications/Delphi/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 2005/test.php
@@ -1,5 +1,5 @@
-
- $z = $x + $y;
- echo "Result " ;
- echo $z;
-?>
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Demos/php4Applications/C++ VS 6.0/StdAfx.cpp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.cpp
similarity index 97%
rename from Demos/php4Applications/C++ VS 6.0/StdAfx.cpp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.cpp
index 5679876..976384e 100644
--- a/Demos/php4Applications/C++ VS 6.0/StdAfx.cpp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.cpp
@@ -1,8 +1,8 @@
-// stdafx.cpp : source file that includes just the standard includes
-// cdemo.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+// stdafx.cpp : source file that includes just the standard includes
+// cdemo.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Demos/php4Applications/C++ VS 2005/StdAfx.h b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.h
similarity index 96%
rename from Demos/php4Applications/C++ VS 2005/StdAfx.h
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.h
index d193529..1b40500 100644
--- a/Demos/php4Applications/C++ VS 2005/StdAfx.h
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/StdAfx.h
@@ -1,19 +1,19 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
-#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
diff --git a/Demos/php4Applications/C++ VS 6.0/cdemo.cpp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.cpp
similarity index 95%
rename from Demos/php4Applications/C++ VS 6.0/cdemo.cpp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.cpp
index 496409d..02f788a 100644
--- a/Demos/php4Applications/C++ VS 6.0/cdemo.cpp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.cpp
@@ -1,102 +1,101 @@
-// cdemo.cpp : Defines the entry point for the console application.
-//
-
-{ $Id: cdemo.cpp,v 6.2 02/2006 delphi32 Exp $ }
-
-# include "stdafx.h"
-# include
-# include
-# include
-# include
-
-
-typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
-typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
-typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
-typedef int (WINAPI * InitRequest)(void);
-typedef void (WINAPI * DoneRequest)(int request_id);
-typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
-typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
-typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
-typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
-typedef int (WINAPI * GetResultBufferSize)(int request_id);
-
-int main(int argc, char* argv[])
-{
- ExecutePHP lpfnExecutePHP;
- RegisterVariable lpfnRegisterVariable;
- ExecuteCode lpfnExecuteCode;
- InitRequest lpfnInitRequest;
- DoneRequest lpfnDoneRequest;
- GetResultText lpfnGetResultText;
- GetVariableSize lpfnGetVariableSize;
- GetVariable lpfnGetVariable;
- SaveToFile lpfnSaveToFile;
- GetResultBufferSize lpfnGetResultBufferSize;
-
- HMODULE handle;
- char *array;
- int request_id;
- int len;
-
- handle = LoadLibrary("php4app.dll");
- if( handle == NULL )
- return FALSE ;
-
- lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
- lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
- lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
- lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
- lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
- lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
- lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
- lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
- lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
- lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
-
- if(lpfnRegisterVariable == NULL ||
- lpfnExecutePHP == NULL ||
- lpfnExecuteCode == NULL )
- {
- FreeLibrary( handle ) ;
- return FALSE ;
- }
-
- request_id = lpfnInitRequest();
- lpfnRegisterVariable(request_id, "x", "2");
- lpfnRegisterVariable(request_id, "y", "3");
- lpfnRegisterVariable(request_id, "z", "0");
-
- lpfnExecutePHP(request_id, "test.php");
-
- len = lpfnGetResultText(request_id, NULL, 0);
- array = (char *)malloc(len);
- lpfnGetResultText(request_id, array, len);
- printf("\n");
- printf("%s\n",array);
- free(array);
-
- //get variable value after execution
- len = lpfnGetVariableSize(request_id, "z");
- if (len > 0) {
- array = (char *)malloc(len);
- lpfnGetVariable(request_id, "z", array, len);
- printf("after execution variable z = %s\n", array);
- free(array);
- }
- lpfnDoneRequest(request_id);
-
- request_id = lpfnInitRequest();
- lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
- len = lpfnGetResultText(request_id, NULL, 0);
- array = (char *)malloc(len);
- lpfnGetResultText(request_id, array, len);
- printf("\n");
- printf("%s\n",array);
- free(array);
- lpfnDoneRequest(request_id);
-
- FreeLibrary(handle);
-
- return 0;
-}
+// cdemo.cpp : Defines the entry point for the console application.
+//
+
+
+# include "stdafx.h"
+# include
+# include
+# include
+# include
+
+
+typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
+typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
+typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
+typedef int (WINAPI * InitRequest)(void);
+typedef void (WINAPI * DoneRequest)(int request_id);
+typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
+typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
+typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
+typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
+typedef int (WINAPI * GetResultBufferSize)(int request_id);
+
+int main(int argc, char* argv[])
+{
+ ExecutePHP lpfnExecutePHP;
+ RegisterVariable lpfnRegisterVariable;
+ ExecuteCode lpfnExecuteCode;
+ InitRequest lpfnInitRequest;
+ DoneRequest lpfnDoneRequest;
+ GetResultText lpfnGetResultText;
+ GetVariableSize lpfnGetVariableSize;
+ GetVariable lpfnGetVariable;
+ SaveToFile lpfnSaveToFile;
+ GetResultBufferSize lpfnGetResultBufferSize;
+
+ HMODULE handle;
+ char *array;
+ int request_id;
+ int len;
+
+ handle = LoadLibrary("php4app.dll");
+ if( handle == NULL )
+ return FALSE ;
+
+ lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
+ lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
+ lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
+ lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
+ lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
+ lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
+ lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
+ lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
+ lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
+ lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
+
+ if(lpfnRegisterVariable == NULL ||
+ lpfnExecutePHP == NULL ||
+ lpfnExecuteCode == NULL )
+ {
+ FreeLibrary( handle ) ;
+ return FALSE ;
+ }
+
+ request_id = lpfnInitRequest();
+ lpfnRegisterVariable(request_id, "x", "2");
+ lpfnRegisterVariable(request_id, "y", "3");
+ lpfnRegisterVariable(request_id, "z", "0");
+
+ lpfnExecutePHP(request_id, "test.php");
+
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+
+ //get variable value after execution
+ len = lpfnGetVariableSize(request_id, "z");
+ if (len > 0) {
+ array = (char *)malloc(len);
+ lpfnGetVariable(request_id, "z", array, len);
+ printf("after execution variable z = %s\n", array);
+ free(array);
+ }
+ lpfnDoneRequest(request_id);
+
+ request_id = lpfnInitRequest();
+ lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+ lpfnDoneRequest(request_id);
+
+ FreeLibrary(handle);
+
+ return 0;
+}
diff --git a/Demos/php4Applications/C++ VS 6.0/cdemo.dsp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsp
similarity index 97%
rename from Demos/php4Applications/C++ VS 6.0/cdemo.dsp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsp
index a9ff39d..a6c53b0 100644
--- a/Demos/php4Applications/C++ VS 6.0/cdemo.dsp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsp
@@ -1,113 +1,113 @@
-# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cdemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "cdemo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cdemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "cdemo - Win32 Release"
-# Name "cdemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cdemo.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"stdafx.h"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\StdAfx.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Source File
-
-SOURCE=.\ReadMe.txt
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cdemo - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdemo - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdemo - Win32 Release"
+# Name "cdemo - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\cdemo.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/Demos/php4Applications/C++ VS 6.0/cdemo.dsw b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsw
similarity index 94%
rename from Demos/php4Applications/C++ VS 6.0/cdemo.dsw
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsw
index a7b42f3..883b7e0 100644
--- a/Demos/php4Applications/C++ VS 6.0/cdemo.dsw
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/cdemo.dsw
@@ -1,29 +1,29 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Demos/php4Applications/C++ VS 2005/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/test.php
similarity index 90%
rename from Demos/php4Applications/C++ VS 2005/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/test.php
index 04b297f..54b255b 100644
--- a/Demos/php4Applications/C++ VS 2005/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/C++ VS 6.0/test.php
@@ -1,5 +1,5 @@
-
- $z = $x + $y;
- echo "Result " ;
- echo $z;
-?>
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
similarity index 96%
rename from Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
index 97ebced..d503729 100644
--- a/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
@@ -1,142 +1,142 @@
-unit php4Delphi.MainForm;
-
-interface
-
-uses
- System.Drawing, System.Collections, System.ComponentModel,
- System.Windows.Forms, System.Data, System.Text, System.Runtime.InteropServices;
-
-type
- TWinForm = class(System.Windows.Forms.Form)
- {$REGION 'Designer Managed Code'}
- strict private
- ///
- /// Required designer variable.
- ///
- Components: System.ComponentModel.Container;
- TextBox1: System.Windows.Forms.TextBox;
- Button1: System.Windows.Forms.Button;
- OpenFileDialog1: System.Windows.Forms.OpenFileDialog;
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- procedure InitializeComponent;
- procedure Button1_Click(sender: System.Object; e: System.EventArgs);
- {$ENDREGION}
- strict protected
- ///
- /// Clean up any resources being used.
- ///
- procedure Dispose(Disposing: Boolean); override;
- private
- { Private Declarations }
- public
- constructor Create;
- end;
-
- [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
-
-implementation
-
-uses php4Delphi.Standard;
-
-{$AUTOBOX ON}
-
-{$REGION 'Windows Form Designer generated code'}
-///
-/// Required method for Designer support -- do not modify
-/// the contents of this method with the code editor.
-///
-procedure TWinForm.InitializeComponent;
-begin
- Self.TextBox1 := System.Windows.Forms.TextBox.Create;
- Self.Button1 := System.Windows.Forms.Button.Create;
- Self.OpenFileDialog1 := System.Windows.Forms.OpenFileDialog.Create;
- Self.SuspendLayout;
- //
- // TextBox1
- //
- Self.TextBox1.Location := System.Drawing.Point.Create(8, 16);
- Self.TextBox1.Multiline := True;
- Self.TextBox1.Name := 'TextBox1';
- Self.TextBox1.ScrollBars := System.Windows.Forms.ScrollBars.Both;
- Self.TextBox1.Size := System.Drawing.Size.Create(272, 180);
- Self.TextBox1.TabIndex := 0;
- Self.TextBox1.Text := '';
- //
- // Button1
- //
- Self.Button1.Location := System.Drawing.Point.Create(12, 224);
- Self.Button1.Name := 'Button1';
- Self.Button1.TabIndex := 1;
- Self.Button1.Text := 'Execute';
- Include(Self.Button1.Click, Self.Button1_Click);
- //
- // OpenFileDialog1
- //
- Self.OpenFileDialog1.Filter := 'PHP files|*.php';
- //
- // TWinForm
- //
- Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
- Self.ClientSize := System.Drawing.Size.Create(292, 266);
- Self.Controls.Add(Self.Button1);
- Self.Controls.Add(Self.TextBox1);
- Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedDialog;
- Self.MaximizeBox := False;
- Self.MinimizeBox := False;
- Self.Name := 'TWinForm';
- Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen;
- Self.Text := 'php4delphi';
- Self.ResumeLayout(False);
-end;
-{$ENDREGION}
-
-procedure TWinForm.Dispose(Disposing: Boolean);
-begin
- if Disposing then
- begin
- if Components <> nil then
- Components.Dispose();
- end;
- inherited Dispose(Disposing);
-end;
-
-constructor TWinForm.Create;
-begin
- inherited Create;
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent;
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
-end;
-
-procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
-var
- RequestID : integer;
- L : integer;
- builder : StringBuilder;
-begin
- if OpenFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK then
- begin
- RequestID := InitRequest;
- ExecutePHP(RequestID, OpenFileDialog1.FileName);
- L := GetResultBufferSize(RequestID);
- if L > 0 then
- begin
- builder := StringBuilder.Create;
- builder.Capacity := L;
- GetResultText(RequestID, builder, L +1);
- TextBox1.Text := builder.ToString;
- DoneRequest(RequestID);
- builder.Free;
- end;
- end;
-
-end;
-
-end.
+unit php4Delphi.MainForm;
+
+interface
+
+uses
+ System.Drawing, System.Collections, System.ComponentModel,
+ System.Windows.Forms, System.Data, System.Text, System.Runtime.InteropServices;
+
+type
+ TWinForm = class(System.Windows.Forms.Form)
+ {$REGION 'Designer Managed Code'}
+ strict private
+ ///
+ /// Required designer variable.
+ ///
+ Components: System.ComponentModel.Container;
+ TextBox1: System.Windows.Forms.TextBox;
+ Button1: System.Windows.Forms.Button;
+ OpenFileDialog1: System.Windows.Forms.OpenFileDialog;
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ procedure InitializeComponent;
+ procedure Button1_Click(sender: System.Object; e: System.EventArgs);
+ {$ENDREGION}
+ strict protected
+ ///
+ /// Clean up any resources being used.
+ ///
+ procedure Dispose(Disposing: Boolean); override;
+ private
+ { Private Declarations }
+ public
+ constructor Create;
+ end;
+
+ [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
+
+implementation
+
+uses php4Delphi.Standard;
+
+{$AUTOBOX ON}
+
+{$REGION 'Windows Form Designer generated code'}
+///
+/// Required method for Designer support -- do not modify
+/// the contents of this method with the code editor.
+///
+procedure TWinForm.InitializeComponent;
+begin
+ Self.TextBox1 := System.Windows.Forms.TextBox.Create;
+ Self.Button1 := System.Windows.Forms.Button.Create;
+ Self.OpenFileDialog1 := System.Windows.Forms.OpenFileDialog.Create;
+ Self.SuspendLayout;
+ //
+ // TextBox1
+ //
+ Self.TextBox1.Location := System.Drawing.Point.Create(8, 16);
+ Self.TextBox1.Multiline := True;
+ Self.TextBox1.Name := 'TextBox1';
+ Self.TextBox1.ScrollBars := System.Windows.Forms.ScrollBars.Both;
+ Self.TextBox1.Size := System.Drawing.Size.Create(272, 180);
+ Self.TextBox1.TabIndex := 0;
+ Self.TextBox1.Text := '';
+ //
+ // Button1
+ //
+ Self.Button1.Location := System.Drawing.Point.Create(12, 224);
+ Self.Button1.Name := 'Button1';
+ Self.Button1.TabIndex := 1;
+ Self.Button1.Text := 'Execute';
+ Include(Self.Button1.Click, Self.Button1_Click);
+ //
+ // OpenFileDialog1
+ //
+ Self.OpenFileDialog1.Filter := 'PHP files|*.php';
+ //
+ // TWinForm
+ //
+ Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
+ Self.ClientSize := System.Drawing.Size.Create(292, 266);
+ Self.Controls.Add(Self.Button1);
+ Self.Controls.Add(Self.TextBox1);
+ Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedDialog;
+ Self.MaximizeBox := False;
+ Self.MinimizeBox := False;
+ Self.Name := 'TWinForm';
+ Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen;
+ Self.Text := 'php4delphi';
+ Self.ResumeLayout(False);
+end;
+{$ENDREGION}
+
+procedure TWinForm.Dispose(Disposing: Boolean);
+begin
+ if Disposing then
+ begin
+ if Components <> nil then
+ Components.Dispose();
+ end;
+ inherited Dispose(Disposing);
+end;
+
+constructor TWinForm.Create;
+begin
+ inherited Create;
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent;
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+end;
+
+procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
+var
+ RequestID : integer;
+ L : integer;
+ builder : StringBuilder;
+begin
+ if OpenFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK then
+ begin
+ RequestID := InitRequest;
+ ExecutePHP(RequestID, OpenFileDialog1.FileName);
+ L := GetResultBufferSize(RequestID);
+ if L > 0 then
+ begin
+ builder := StringBuilder.Create;
+ builder.Capacity := L;
+ GetResultText(RequestID, builder, L +1);
+ TextBox1.Text := builder.ToString;
+ DoneRequest(RequestID);
+ builder.Free;
+ end;
+ end;
+
+end;
+
+end.
diff --git a/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
similarity index 98%
rename from Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
index bee20ba..acc72bf 100644
--- a/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
@@ -1,142 +1,142 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- False
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- 17, 17
-
-
- False
-
-
- (Default)
-
-
- False
-
-
- False
-
-
- 4, 4
-
-
- True
-
-
- 80
-
-
- True
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ False
+
+
+ Private
+
+
+ False
+
+
+ Private
+
+
+ Private
+
+
+ 17, 17
+
+
+ False
+
+
+ (Default)
+
+
+ False
+
+
+ False
+
+
+ 4, 4
+
+
+ True
+
+
+ 80
+
+
+ True
+
+
diff --git a/Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.Standard.pas
similarity index 97%
rename from Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.Standard.pas
index a89000d..207997d 100644
--- a/Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.Standard.pas
@@ -1,52 +1,52 @@
-unit php4Delphi.Standard;
-
-interface
-uses
- Types, System.Text, System.Runtime.InteropServices;
-
-function InitRequest : integer;
-procedure DoneRequest(RequestID : integer);
-procedure RegisterVariable(RequestID : integer; AName : string; AValue : string);
-function ExecutePHP(RequestID : integer; FileName : string) : integer;
-function ExecuteCode(RequestID : integer; ACode : string) : integer;
-function GetResultText(RequestID : integer; Buffer : StringBuilder; BufLen : integer) : integer;
-function GetVariable(RequestID : integer; AName : string; Buffer : StringBuilder; BufLen : integer) : integer;
-procedure SaveToFile(RequestID : integer; AFileName : string);
-function GetVariableSize(RequestID : integer; AName : string) : integer;
-function GetResultBufferSize(RequestID : integer) : integer;
-
-implementation
-uses
- System.Security;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function InitRequest; external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-procedure DoneRequest; external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-procedure RegisterVariable;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function ExecutePHP;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function ExecuteCode;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function GetResultText;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function GetVariable;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-procedure SaveToFile;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function GetVariableSize;external;
-
-[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
-function GetResultBufferSize;external;
-
-end.
+unit php4Delphi.Standard;
+
+interface
+uses
+ Types, System.Text, System.Runtime.InteropServices;
+
+function InitRequest : integer;
+procedure DoneRequest(RequestID : integer);
+procedure RegisterVariable(RequestID : integer; AName : string; AValue : string);
+function ExecutePHP(RequestID : integer; FileName : string) : integer;
+function ExecuteCode(RequestID : integer; ACode : string) : integer;
+function GetResultText(RequestID : integer; Buffer : StringBuilder; BufLen : integer) : integer;
+function GetVariable(RequestID : integer; AName : string; Buffer : StringBuilder; BufLen : integer) : integer;
+procedure SaveToFile(RequestID : integer; AFileName : string);
+function GetVariableSize(RequestID : integer; AName : string) : integer;
+function GetResultBufferSize(RequestID : integer) : integer;
+
+implementation
+uses
+ System.Security;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function InitRequest; external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure DoneRequest; external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure RegisterVariable;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function ExecutePHP;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function ExecuteCode;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetResultText;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetVariable;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure SaveToFile;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetVariableSize;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetResultBufferSize;external;
+
+end.
diff --git a/Demos/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources
similarity index 100%
rename from Demos/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources
diff --git a/Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
similarity index 97%
rename from Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
index 07d266a..12c9a32 100644
--- a/Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
@@ -1,235 +1,235 @@
-
-
-
-
- DelphiDotNet.Personality
-
- 2.0
- {239C567F-CA65-4E23-A4FF-609E27F1003C}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- php4DelphiDemo.dpr
-
-
- 7.0
-
-
- 0
- 0
- 1
- 1
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- True
- True
- WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
- False
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
-
-
-
- 0
- 0
- False
- 1
- True
- False
- False
- 4096
- 1048576
- 4194304
-
-
-
-
-
-
-
- c:\windows\microsoft.net\framework\v1.1.4322
- c:\windows\microsoft.net\framework\v1.1.4322\System.XML.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Data.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll
-
-
- True
-
-
-
-
-
- False
-
-
- True
- False
-
-
-
- $00000000
-
-
-
- False
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 2067
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ DelphiDotNet.Personality
+
+ 2.0
+ {239C567F-CA65-4E23-A4FF-609E27F1003C}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ php4DelphiDemo.dpr
+
+
+ 7.0
+
+
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ True
+ False
+ False
+ 4096
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+ c:\windows\microsoft.net\framework\v1.1.4322
+ c:\windows\microsoft.net\framework\v1.1.4322\System.XML.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Data.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll
+
+
+ True
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2067
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.dpr
similarity index 97%
rename from Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.dpr
index 9f5784b..d37c1ac 100644
--- a/Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.dpr
@@ -1,100 +1,100 @@
-program php4DelphiDemo;
-
-{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll'}
-{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll'}
-{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'}
-{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'}
-{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll'}
-{$R 'php4Delphi.TWinForm.resources' 'php4Delphi.MainForm.resx'}
-
-uses
- System.Reflection,
- System.Runtime.CompilerServices,
- System.Runtime.InteropServices,
- System.Windows.Forms,
- php4Delphi.MainForm in 'php4Delphi.MainForm.pas' {php4Delphi.MainForm.TWinForm: System.Windows.Forms.Form},
- php4Delphi.Standard in 'php4Delphi.Standard.pas';
-
-{$R *.res}
-
-{$REGION 'Program/Assembly Information'}
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyDescription('')]
-[assembly: AssemblyConfiguration('')]
-[assembly: AssemblyCompany('')]
-[assembly: AssemblyProduct('')]
-[assembly: AssemblyCopyright('')]
-[assembly: AssemblyTrademark('')]
-[assembly: AssemblyCulture('')]
-
-// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription.
-// You can set this in the IDE via the Project Options.
-// Manually setting the AssemblyTitle attribute below will override the IDE
-// setting.
-// [assembly: AssemblyTitle('')]
-
-
-//
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion('1.0.*')]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-// (*) If no key is specified, the assembly is not signed.
-// (*) KeyName refers to a key that has been installed in the Crypto Service
-// Provider (CSP) on your machine. KeyFile refers to a file which contains
-// a key.
-// (*) If the KeyFile and the KeyName values are both specified, the
-// following processing occurs:
-// (1) If the KeyName can be found in the CSP, that key is used.
-// (2) If the KeyName does not exist and the KeyFile does exist, the key
-// in the KeyFile is installed into the CSP and used.
-// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-// When specifying the KeyFile, the location of the KeyFile should be
-// relative to the project output directory. For example, if your KeyFile is
-// located in the project directory, you would specify the AssemblyKeyFile
-// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output
-// directory is the project directory (the default).
-// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-// documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile('')]
-[assembly: AssemblyKeyName('')]
-
-
-//
-// Use the attributes below to control the COM visibility of your assembly. By
-// default the entire assembly is visible to COM. Setting ComVisible to false
-// is the recommended default for your assembly. To then expose a class and interface
-// to COM set ComVisible to true on each one. It is also recommended to add a
-// Guid attribute.
-//
-
-[assembly: ComVisible(False)]
-//[assembly: Guid('')]
-//[assembly: TypeLibVersion(1, 0)]
-{$ENDREGION}
-
-[STAThread]
-begin
- Application.Run(TWinForm.Create);
-end.
+program php4DelphiDemo;
+
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll'}
+{$R 'php4Delphi.TWinForm.resources' 'php4Delphi.MainForm.resx'}
+
+uses
+ System.Reflection,
+ System.Runtime.CompilerServices,
+ System.Runtime.InteropServices,
+ System.Windows.Forms,
+ php4Delphi.MainForm in 'php4Delphi.MainForm.pas' {php4Delphi.MainForm.TWinForm: System.Windows.Forms.Form},
+ php4Delphi.Standard in 'php4Delphi.Standard.pas';
+
+{$R *.res}
+
+{$REGION 'Program/Assembly Information'}
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyDescription('')]
+[assembly: AssemblyConfiguration('')]
+[assembly: AssemblyCompany('')]
+[assembly: AssemblyProduct('')]
+[assembly: AssemblyCopyright('')]
+[assembly: AssemblyTrademark('')]
+[assembly: AssemblyCulture('')]
+
+// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription.
+// You can set this in the IDE via the Project Options.
+// Manually setting the AssemblyTitle attribute below will override the IDE
+// setting.
+// [assembly: AssemblyTitle('')]
+
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion('1.0.*')]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output
+// directory is the project directory (the default).
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile('')]
+[assembly: AssemblyKeyName('')]
+
+
+//
+// Use the attributes below to control the COM visibility of your assembly. By
+// default the entire assembly is visible to COM. Setting ComVisible to false
+// is the recommended default for your assembly. To then expose a class and interface
+// to COM set ComVisible to true on each one. It is also recommended to add a
+// Guid attribute.
+//
+
+[assembly: ComVisible(False)]
+//[assembly: Guid('')]
+//[assembly: TypeLibVersion(1, 0)]
+{$ENDREGION}
+
+[STAThread]
+begin
+ Application.Run(TWinForm.Create);
+end.
diff --git a/Demos/php4Applications/Delphi .NET/php4DelphiDemo.res b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.res
similarity index 100%
rename from Demos/php4Applications/Delphi .NET/php4DelphiDemo.res
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi .NET/php4DelphiDemo.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr
new file mode 100644
index 0000000..0114347
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr
@@ -0,0 +1,15 @@
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1},
+ php4AppIntf in '..\..\..\php4AppIntf.pas',
+ ZendTypes in '..\..\..\ZendTypes.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dproj
new file mode 100644
index 0000000..dbaa902
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dproj
@@ -0,0 +1,105 @@
+
+
+ {B674DAD8-5C53-4B84-BE6D-7CD1D1C5ACDB}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/psvPHP/Graph/Project1.res b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.res
similarity index 100%
rename from Demos/psvPHP/Graph/Project1.res
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.ddp differ
diff --git a/Demos/php4Applications/Delphi/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.dfm
similarity index 94%
rename from Demos/php4Applications/Delphi/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.dfm
index c15ee57..b1b2df7 100644
--- a/Demos/php4Applications/Delphi/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.dfm
@@ -1,62 +1,62 @@
-object Form1: TForm1
- Left = 259
- Top = 321
- BorderStyle = bsDialog
- Caption = 'Form1'
- ClientHeight = 296
- ClientWidth = 609
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object Memo1: TMemo
- Left = 16
- Top = 12
- Width = 581
- Height = 241
- Lines.Strings = (
- '')
- TabOrder = 0
- end
- object btnExecuteScript: TButton
- Left = 16
- Top = 264
- Width = 101
- Height = 25
- Caption = 'Execute script'
- TabOrder = 1
- OnClick = btnExecuteScriptClick
- end
- object btnExecuteCode: TButton
- Left = 124
- Top = 264
- Width = 109
- Height = 25
- Caption = 'Execute Code'
- TabOrder = 2
- OnClick = btnExecuteCodeClick
- end
- object btnClose: TButton
- Left = 524
- Top = 264
- Width = 75
- Height = 25
- Caption = 'Close'
- TabOrder = 3
- OnClick = btnCloseClick
- end
- object btnExecuteAndSave: TButton
- Left = 240
- Top = 264
- Width = 145
- Height = 25
- Caption = 'Execute and Save'
- TabOrder = 4
- OnClick = btnExecuteAndSaveClick
- end
-end
+object Form1: TForm1
+ Left = 259
+ Top = 321
+ BorderStyle = bsDialog
+ Caption = 'Form1'
+ ClientHeight = 296
+ ClientWidth = 609
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 16
+ Top = 12
+ Width = 581
+ Height = 241
+ Lines.Strings = (
+ '$z = $x + $y; echo "Result "; echo $z;')
+ TabOrder = 0
+ end
+ object btnExecuteScript: TButton
+ Left = 16
+ Top = 264
+ Width = 101
+ Height = 25
+ Caption = 'Execute script'
+ TabOrder = 1
+ OnClick = btnExecuteScriptClick
+ end
+ object btnExecuteCode: TButton
+ Left = 124
+ Top = 264
+ Width = 109
+ Height = 25
+ Caption = 'Execute Code'
+ TabOrder = 2
+ OnClick = btnExecuteCodeClick
+ end
+ object btnClose: TButton
+ Left = 524
+ Top = 264
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 3
+ OnClick = btnCloseClick
+ end
+ object btnExecuteAndSave: TButton
+ Left = 240
+ Top = 264
+ Width = 145
+ Height = 25
+ Caption = 'Execute and Save'
+ TabOrder = 4
+ OnClick = btnExecuteAndSaveClick
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas
new file mode 100644
index 0000000..b5d3415
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas
@@ -0,0 +1,121 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls,
+ php4AppIntf;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ btnExecuteScript: TButton;
+ btnExecuteCode: TButton;
+ btnClose: TButton;
+ btnExecuteAndSave: TButton;
+ procedure btnExecuteScriptClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure btnExecuteCodeClick(Sender: TObject);
+ procedure btnExecuteAndSaveClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ RequestID : integer;
+ end;
+
+var
+ Form1: TForm1;
+
+
+implementation
+
+{$R *.DFM}
+
+procedure TForm1.btnExecuteScriptClick(Sender: TObject);
+var
+ S : AnsiString;
+ L : integer;
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+ ExecutePHP(RequestID, 'test.php');
+ L := GetResultText(RequestID, nil, 0);
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetResultText(RequestID, PAnsiChar(S), L);
+ end;
+ memo1.Lines.Text := WideString(S);
+ L := GetVariableSize(RequestID, 'z');
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetVariable(RequestID, 'z', PAnsiChar(S), L);
+ ShowMessage('After execution z = ' + WideString(S));
+ end;
+ DoneRequest(RequestID);
+end;
+
+procedure TForm1.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TForm1.btnExecuteCodeClick(Sender: TObject);
+var
+ S : AnsiString;
+ L : integer;
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+ ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
+ L := GetResultBufferSize(RequestID);
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetResultText(RequestID, PAnsiChar(S), L);
+ end;
+ memo1.Lines.Text := WideString(S);
+ L := GetVariableSize(RequestID, 'z');
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetVariable(RequestID, 'z', PAnsiChar(S), L);
+ ShowMessage('After execution z = ' + WideString(S));
+ end;
+ DoneRequest(RequestID);
+end;
+
+procedure TForm1.btnExecuteAndSaveClick(Sender: TObject);
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+ ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
+ SaveToFile(RequestID, 'result.txt');
+ memo1.Lines.LoadFromFile('result.txt');
+ DoneRequest(RequestID);
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/result.txt b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/result.txt
new file mode 100644
index 0000000..0f9b03d
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/result.txt
@@ -0,0 +1 @@
+Result 5
\ No newline at end of file
diff --git a/Demos/php4Applications/C++ VS 6.0/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/test.php
similarity index 90%
rename from Demos/php4Applications/C++ VS 6.0/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/test.php
index 04b297f..54b255b 100644
--- a/Demos/php4Applications/C++ VS 6.0/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/test.php
@@ -1,5 +1,5 @@
-
- $z = $x + $y;
- echo "Result " ;
- echo $z;
-?>
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Demos/php4Applications/MS Word/Doc1.doc b/Source/Demos Delphi 2009 (WideString support)/php4Applications/MS Word/Doc1.doc
similarity index 100%
rename from Demos/php4Applications/MS Word/Doc1.doc
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/MS Word/Doc1.doc
diff --git a/Demos/php4Applications/MS Word/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/MS Word/test.php
similarity index 89%
rename from Demos/php4Applications/MS Word/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/MS Word/test.php
index 852e574..d3fccb8 100644
--- a/Demos/php4Applications/MS Word/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/MS Word/test.php
@@ -1,4 +1,4 @@
-
- $z = $x + $y;
- phpinfo();
-?>
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi.sln
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi.sln
index ff74d51..5eb86b4 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "php4delphi", "php4delphi\php4delphi.vbproj", "{98A25626-5C96-46EB-8A80-2D2C7236D025}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "php4delphi", "php4delphi\php4delphi.vbproj", "{98A25626-5C96-46EB-8A80-2D2C7236D025}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
index 8d713bd..3dc6448 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
@@ -1,15 +1,15 @@
-Namespace My
-
- ' The following events are availble for MyApplication:
- '
- ' Startup: Raised when the application starts, before the startup form is created.
- ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
- ' UnhandledException: Raised if the application encounters an unhandled exception.
- ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
- ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
- Partial Friend Class MyApplication
-
- End Class
-
-End Namespace
-
+Namespace My
+
+ ' The following events are availble for MyApplication:
+ '
+ ' Startup: Raised when the application starts, before the startup form is created.
+ ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
+ ' UnhandledException: Raised if the application encounters an unhandled exception.
+ ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
+ ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
+ Partial Friend Class MyApplication
+
+ End Class
+
+End Namespace
+
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
index d4d90e7..3adb089 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
@@ -1,71 +1,71 @@
- _
-Partial Class Form1
- Inherits System.Windows.Forms.Form
-
- 'Form overrides dispose to clean up the component list.
- _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- MyBase.Dispose(disposing)
- End Sub
-
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
-
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
- _
- Private Sub InitializeComponent()
- Me.TextBox1 = New System.Windows.Forms.TextBox
- Me.Button1 = New System.Windows.Forms.Button
- Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
- Me.SuspendLayout()
- '
- 'TextBox1
- '
- Me.TextBox1.Location = New System.Drawing.Point(10, 16)
- Me.TextBox1.Multiline = True
- Me.TextBox1.Name = "TextBox1"
- Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both
- Me.TextBox1.Size = New System.Drawing.Size(588, 177)
- Me.TextBox1.TabIndex = 0
- '
- 'Button1
- '
- Me.Button1.Location = New System.Drawing.Point(13, 223)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(75, 23)
- Me.Button1.TabIndex = 1
- Me.Button1.Text = "Execute"
- Me.Button1.UseVisualStyleBackColor = True
- '
- 'OpenFileDialog1
- '
- Me.OpenFileDialog1.Filter = "PHP files|*.php"
- Me.OpenFileDialog1.Title = "Select script to execute"
- '
- 'Form1
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(610, 266)
- Me.Controls.Add(Me.Button1)
- Me.Controls.Add(Me.TextBox1)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "Form1"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "php4delphi"
- Me.ResumeLayout(False)
- Me.PerformLayout()
-
- End Sub
- Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
-
-End Class
+ _
+Partial Class Form1
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+ _
+ Private Sub InitializeComponent()
+ Me.TextBox1 = New System.Windows.Forms.TextBox
+ Me.Button1 = New System.Windows.Forms.Button
+ Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
+ Me.SuspendLayout()
+ '
+ 'TextBox1
+ '
+ Me.TextBox1.Location = New System.Drawing.Point(10, 16)
+ Me.TextBox1.Multiline = True
+ Me.TextBox1.Name = "TextBox1"
+ Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both
+ Me.TextBox1.Size = New System.Drawing.Size(588, 177)
+ Me.TextBox1.TabIndex = 0
+ '
+ 'Button1
+ '
+ Me.Button1.Location = New System.Drawing.Point(13, 223)
+ Me.Button1.Name = "Button1"
+ Me.Button1.Size = New System.Drawing.Size(75, 23)
+ Me.Button1.TabIndex = 1
+ Me.Button1.Text = "Execute"
+ Me.Button1.UseVisualStyleBackColor = True
+ '
+ 'OpenFileDialog1
+ '
+ Me.OpenFileDialog1.Filter = "PHP files|*.php"
+ Me.OpenFileDialog1.Title = "Select script to execute"
+ '
+ 'Form1
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(610, 266)
+ Me.Controls.Add(Me.Button1)
+ Me.Controls.Add(Me.TextBox1)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "Form1"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "php4delphi"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+ Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
+ Friend WithEvents Button1 As System.Windows.Forms.Button
+ Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
+
+End Class
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
index 5d4a9b8..710a648 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
@@ -1,123 +1,123 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 17, 17
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
\ No newline at end of file
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
similarity index 98%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
index 69e31f6..06fe6d4 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
@@ -1,32 +1,32 @@
-Imports System.Runtime.InteropServices
-
-Public Class Form1
-
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim L As Integer
- Dim builder As StringBuilder = New StringBuilder
- Dim RequestID As Integer
- Dim fn As String
- If OpenFileDialog1.ShowDialog Then
- RequestID = InitRequest()
- fn = OpenFileDialog1.FileName
- ExecutePHP(RequestID, fn)
- L = GetResultText(RequestID, builder, 0)
- builder.Capacity = L
- L = GetResultText(RequestID, builder, builder.Capacity + 1)
- TextBox1.Text = builder.ToString()
- DoneRequest(RequestID)
- End If
- End Sub
- Public Declare Ansi Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Integer, ByVal FileName As String) As Integer
- Public Declare Ansi Function InitRequest Lib "php4app.dll" () As Integer
- Public Declare Ansi Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Integer)
- Public Declare Ansi Function GetResultText Lib "php4app.dll" (ByVal RequestID As Integer, ByVal Buf As StringBuilder, ByVal Buflen As Integer) As Integer
- Public Declare Ansi Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal AValue As String)
- Public Declare Ansi Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Integer, ByVal ACode As String) As Integer
- Public Declare Ansi Function GetVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal Buffer As StringBuilder, ByVal BufLen As Integer) As Integer
- Public Declare Ansi Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AFileName As String)
- Public Declare Ansi Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String) As Integer
- Public Declare Ansi Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Integer) As Integer
-
-End Class
+Imports System.Runtime.InteropServices
+
+Public Class Form1
+
+ Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
+ Dim L As Integer
+ Dim builder As StringBuilder = New StringBuilder
+ Dim RequestID As Integer
+ Dim fn As String
+ If OpenFileDialog1.ShowDialog Then
+ RequestID = InitRequest()
+ fn = OpenFileDialog1.FileName
+ ExecutePHP(RequestID, fn)
+ L = GetResultText(RequestID, builder, 0)
+ builder.Capacity = L
+ L = GetResultText(RequestID, builder, builder.Capacity + 1)
+ TextBox1.Text = builder.ToString()
+ DoneRequest(RequestID)
+ End If
+ End Sub
+ Public Declare Ansi Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Integer, ByVal FileName As String) As Integer
+ Public Declare Ansi Function InitRequest Lib "php4app.dll" () As Integer
+ Public Declare Ansi Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Integer)
+ Public Declare Ansi Function GetResultText Lib "php4app.dll" (ByVal RequestID As Integer, ByVal Buf As StringBuilder, ByVal Buflen As Integer) As Integer
+ Public Declare Ansi Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal AValue As String)
+ Public Declare Ansi Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Integer, ByVal ACode As String) As Integer
+ Public Declare Ansi Function GetVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal Buffer As StringBuilder, ByVal BufLen As Integer) As Integer
+ Public Declare Ansi Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AFileName As String)
+ Public Declare Ansi Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String) As Integer
+ Public Declare Ansi Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Integer) As Integer
+
+End Class
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
index 214503f..83b31ad 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
@@ -1,38 +1,38 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:2.0.50727.42
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
- ' or if you encounter build errors in this file, go to the Project Designer
- ' (go to Project Properties or double-click the My Project node in
- ' Solution Explorer), and make changes on the Application tab.
- '
- Partial Friend Class MyApplication
-
- _
- Public Sub New()
- MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
- Me.IsSingleInstance = false
- Me.EnableVisualStyles = true
- Me.SaveMySettingsOnExit = true
- Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
- End Sub
-
- _
- Protected Overrides Sub OnCreateMainForm()
- Me.MainForm = Global.php4delphi.Form1
- End Sub
- End Class
-End Namespace
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.42
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
+ ' or if you encounter build errors in this file, go to the Project Designer
+ ' (go to Project Properties or double-click the My Project node in
+ ' Solution Explorer), and make changes on the Application tab.
+ '
+ Partial Friend Class MyApplication
+
+ _
+ Public Sub New()
+ MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
+ Me.IsSingleInstance = false
+ Me.EnableVisualStyles = true
+ Me.SaveMySettingsOnExit = true
+ Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
+ End Sub
+
+ _
+ Protected Overrides Sub OnCreateMainForm()
+ Me.MainForm = Global.php4delphi.Form1
+ End Sub
+ End Class
+End Namespace
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
similarity index 98%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
index 458ea32..c0f7fef 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
@@ -1,10 +1,10 @@
-
-
- true
- Form1
- false
- 0
- true
- 0
- true
+
+
+ true
+ Form1
+ false
+ 0
+ true
+ 0
+ true
\ No newline at end of file
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
index 569c587..c09f7d4 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
@@ -1,88 +1,88 @@
-
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {98A25626-5C96-46EB-8A80-2D2C7236D025}
- WinExe
- php4delphi.My.MyApplication
- php4delphi
- php4delphi
- WindowsForms
-
-
- true
- full
- true
- true
- bin\Debug\
- php4delphi.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- php4delphi.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Form
-
-
- Form1.vb
- Form
-
-
- True
- Application.myapp
-
-
-
-
- Designer
- Form1.vb
-
-
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}
+ WinExe
+ php4delphi.My.MyApplication
+ php4delphi
+ php4delphi
+ WindowsForms
+
+
+ true
+ full
+ true
+ true
+ bin\Debug\
+ php4delphi.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ pdbonly
+ false
+ true
+ true
+ bin\Release\
+ php4delphi.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.vb
+ Form
+
+
+ True
+ Application.myapp
+
+
+
+
+ Designer
+ Form1.vb
+
+
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+
+
\ No newline at end of file
diff --git a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
similarity index 97%
rename from Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
index 9c0b2d9..c8dfea1 100644
--- a/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
@@ -1,16 +1,16 @@
-
-
- publish\
-
-
-
-
-
-
-
-
- 0
- en-US
- false
-
+
+
+ publish\
+
+
+
+
+
+
+
+
+ 0
+ en-US
+ false
+
\ No newline at end of file
diff --git a/Demos/php4Applications/Visual Basic/Form1.frm b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/Form1.frm
similarity index 96%
rename from Demos/php4Applications/Visual Basic/Form1.frm
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/Form1.frm
index f8dd426..c42d183 100644
--- a/Demos/php4Applications/Visual Basic/Form1.frm
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/Form1.frm
@@ -1,50 +1,50 @@
-VERSION 5.00
-Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 6870
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 8790
- LinkTopic = "Form1"
- ScaleHeight = 6870
- ScaleWidth = 8790
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton ButtonExecute
- Caption = "Execute"
- Height = 375
- Left = 7560
- TabIndex = 1
- Top = 360
- Width = 1095
- End
- Begin VB.TextBox Text1
- Height = 6495
- Left = 240
- MultiLine = -1 'True
- TabIndex = 0
- Top = 240
- Width = 7215
- End
-End
-Attribute VB_Name = "Form1"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Private Sub ButtonExecute_Click()
-Dim code As Long
-Dim RequestID As Long
-Dim L As Long
-Dim Res As String
-
- Res = ""
- RequestID = InitRequest()
- code = ExecutePHP(RequestID, "c:\php5\test.php")
- L = GetResultText(RequestID, Res, 0)
- Res = Space(L + 1)
-
- L = GetResultText(RequestID, Res, L)
- DoneRequest (RequestID)
- Text1.Text = Res
-
-End Sub
+VERSION 5.00
+Begin VB.Form Form1
+ Caption = "Form1"
+ ClientHeight = 6870
+ ClientLeft = 60
+ ClientTop = 345
+ ClientWidth = 8790
+ LinkTopic = "Form1"
+ ScaleHeight = 6870
+ ScaleWidth = 8790
+ StartUpPosition = 3 'Windows Default
+ Begin VB.CommandButton ButtonExecute
+ Caption = "Execute"
+ Height = 375
+ Left = 7560
+ TabIndex = 1
+ Top = 360
+ Width = 1095
+ End
+ Begin VB.TextBox Text1
+ Height = 6495
+ Left = 240
+ MultiLine = -1 'True
+ TabIndex = 0
+ Top = 240
+ Width = 7215
+ End
+End
+Attribute VB_Name = "Form1"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Private Sub ButtonExecute_Click()
+Dim code As Long
+Dim RequestID As Long
+Dim L As Long
+Dim Res As String
+
+ Res = ""
+ RequestID = InitRequest()
+ code = ExecutePHP(RequestID, "c:\php5\test.php")
+ L = GetResultText(RequestID, Res, 0)
+ Res = Space(L + 1)
+
+ L = GetResultText(RequestID, Res, L)
+ DoneRequest (RequestID)
+ Text1.Text = Res
+
+End Sub
diff --git a/Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/MSSCCPRJ.SCC
similarity index 97%
rename from Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/MSSCCPRJ.SCC
index fb38a99..57528cb 100644
--- a/Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/MSSCCPRJ.SCC
@@ -1,5 +1,5 @@
-[SCC]
-SCC=This is a source code control file
-[php_VB.vbp]
-SCC_Project_Name=this project is not under source code control
-SCC_Aux_Path=
+[SCC]
+SCC=This is a source code control file
+[php_VB.vbp]
+SCC_Project_Name=this project is not under source code control
+SCC_Aux_Path=
diff --git a/Demos/php4Applications/Visual Basic/php_VB.vbp b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbp
similarity index 95%
rename from Demos/php4Applications/Visual Basic/php_VB.vbp
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbp
index 3c4772a..99d5b15 100644
--- a/Demos/php4Applications/Visual Basic/php_VB.vbp
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbp
@@ -1,32 +1,32 @@
-Type=Exe
-Form=Form1.frm
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\StdOle2.Tlb#OLE Automation
-Module=php_module; php_module.bas
-IconForm="Form1"
-Startup="Form1"
-ExeName32="php_VB.exe"
-Command32=""
-Name="php_VB"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="Fedpol"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=0
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
+Type=Exe
+Form=Form1.frm
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\StdOle2.Tlb#OLE Automation
+Module=php_module; php_module.bas
+IconForm="Form1"
+Startup="Form1"
+ExeName32="php_VB.exe"
+Command32=""
+Name="php_VB"
+HelpContextID="0"
+CompatibleMode="0"
+MajorVer=1
+MinorVer=0
+RevisionVer=0
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionCompanyName="Fedpol"
+CompilationType=0
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=0
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
diff --git a/Demos/php4Applications/Visual Basic/php_VB.vbw b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbw
similarity index 97%
rename from Demos/php4Applications/Visual Basic/php_VB.vbw
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbw
index 457b520..0c44b62 100644
--- a/Demos/php4Applications/Visual Basic/php_VB.vbw
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_VB.vbw
@@ -1,2 +1,2 @@
-Form1 = 66, 66, 702, 613, , 22, 22, 658, 569, C
-php_module = 44, 44, 680, 591,
+Form1 = 66, 66, 702, 613, , 22, 22, 658, 569, C
+php_module = 44, 44, 680, 591,
diff --git a/Demos/php4Applications/Visual Basic/php_module.bas b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_module.bas
similarity index 98%
rename from Demos/php4Applications/Visual Basic/php_module.bas
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_module.bas
index de82c82..ff67043 100644
--- a/Demos/php4Applications/Visual Basic/php_module.bas
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/php_module.bas
@@ -1,14 +1,14 @@
-Attribute VB_Name = "php_module"
-Option Explicit
-
-Public Declare Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Long, ByVal FileName As String) As Long
-Public Declare Function InitRequest Lib "php4app.dll" () As Long
-Public Declare Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Long)
-Public Declare Function GetResultText Lib "php4app.dll" (ByVal RequestID As Long, ByVal Buf As String, ByVal Buflen As Long) As Long
-Public Declare Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal AValue As String)
-Public Declare Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Long, ByVal ACode As String) As Long
-Public Declare Function GetVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal Buffer As String, ByVal BufLen As Long) As Long
-Public Declare Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Long, ByVal AFileName As String)
-Public Declare Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String) As Long
-Public Declare Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Long) As Long
-
+Attribute VB_Name = "php_module"
+Option Explicit
+
+Public Declare Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Long, ByVal FileName As String) As Long
+Public Declare Function InitRequest Lib "php4app.dll" () As Long
+Public Declare Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Long)
+Public Declare Function GetResultText Lib "php4app.dll" (ByVal RequestID As Long, ByVal Buf As String, ByVal Buflen As Long) As Long
+Public Declare Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal AValue As String)
+Public Declare Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Long, ByVal ACode As String) As Long
+Public Declare Function GetVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal Buffer As String, ByVal BufLen As Long) As Long
+Public Declare Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Long, ByVal AFileName As String)
+Public Declare Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String) As Long
+Public Declare Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Long) As Long
+
diff --git a/Demos/php4Applications/Visual Basic/test.php b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/test.php
similarity index 89%
rename from Demos/php4Applications/Visual Basic/test.php
rename to Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/test.php
index 852e574..d3fccb8 100644
--- a/Demos/php4Applications/Visual Basic/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Visual Basic/test.php
@@ -1,4 +1,4 @@
-
- $z = $x + $y;
- phpinfo();
-?>
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Demos/psvPHP/Components/ComponentsDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dpr
similarity index 81%
rename from Demos/psvPHP/Components/ComponentsDemo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dpr
index 1f6fbff..0e34a1e 100644
--- a/Demos/psvPHP/Components/ComponentsDemo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dpr
@@ -1,13 +1,14 @@
-program ComponentsDemo;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {frmTest};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TfrmTest, frmTest);
- Application.Run;
-end.
+program ComponentsDemo;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {frmTest};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Components Demo';
+ Application.CreateForm(TfrmTest, frmTest);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dproj
new file mode 100644
index 0000000..1352cc9
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.dproj
@@ -0,0 +1,105 @@
+
+
+ {7CFB4CFF-6CCB-4B1C-8CBB-047C7C66BD18}
+ ComponentsDemo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ ComponentsDemo.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ ComponentsDemo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/ComponentsDemo.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.ddp differ
diff --git a/Demos/psvPHP/Components/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.dfm
similarity index 83%
rename from Demos/psvPHP/Components/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.dfm
index 22c2e25..b51da76 100644
--- a/Demos/psvPHP/Components/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.dfm
@@ -1,63 +1,60 @@
-object frmTest: TfrmTest
- Left = 399
- Top = 356
- BorderStyle = bsDialog
- Caption = 'Components demo'
- ClientHeight = 252
- ClientWidth = 472
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 0
- Top = 226
- Width = 472
- Height = 26
- Align = alBottom
- Caption =
- 'This demo project shows how to access published property'#13#10'of Del' +
- 'phi components from PHP script'
- Color = clInfoBk
- ParentColor = False
- WordWrap = True
- end
- object memScript: TMemo
- Left = 8
- Top = 8
- Width = 369
- Height = 213
- TabOrder = 0
- end
- object btnExecute: TButton
- Left = 384
- Top = 12
- Width = 75
- Height = 25
- Caption = '&Execute'
- TabOrder = 1
- OnClick = btnExecuteClick
- end
- object btnClose: TButton
- Left = 384
- Top = 42
- Width = 75
- Height = 25
- Caption = '&Close'
- TabOrder = 2
- OnClick = btnCloseClick
- end
- object PHP: TpsvPHP
- Constants = <>
- Variables = <>
- Left = 400
- Top = 136
- end
-end
+object frmTest: TfrmTest
+ Left = 399
+ Top = 356
+ BorderStyle = bsDialog
+ Caption = 'Components demo'
+ ClientHeight = 252
+ ClientWidth = 472
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 0
+ Top = 226
+ Width = 472
+ Height = 26
+ Align = alBottom
+ Caption =
+ 'This demo project shows how to access published property'#13#10'of Del' +
+ 'phi components from PHP script'
+ Color = clInfoBk
+ ParentColor = False
+ WordWrap = True
+ end
+ object memScript: TMemo
+ Left = 8
+ Top = 8
+ Width = 369
+ Height = 213
+ TabOrder = 0
+ end
+ object btnExecute: TButton
+ Left = 384
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = '&Execute'
+ TabOrder = 1
+ OnClick = btnExecuteClick
+ end
+ object PHP: TpsvPHP
+ Variables = <>
+ Left = 400
+ Top = 136
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 408
+ Top = 88
+ end
+end
diff --git a/Demos/psvPHP/Components/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
similarity index 64%
rename from Demos/psvPHP/Components/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
index 35c4755..5a9e4e9 100644
--- a/Demos/psvPHP/Components/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
@@ -1,90 +1,121 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-//This demo project shows how to access published property
-//of Delphi components from PHP script
-
-{$I PHP.INC}
-
-unit Unit1;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, php4delphi;
-
-type
- TfrmTest = class(TForm)
- memScript: TMemo;
- btnExecute: TButton;
- btnClose: TButton;
- PHP: TpsvPHP;
- Label1: TLabel;
- procedure btnExecuteClick(Sender: TObject);
- procedure btnCloseClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- frmTest: TfrmTest;
-
-implementation
-
-{$R *.DFM}
-
-procedure TfrmTest.btnExecuteClick(Sender: TObject);
-begin
- PHP.RunCode(memScript.Lines.Text);
-end;
-
-procedure TfrmTest.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TfrmTest.FormCreate(Sender: TObject);
-begin
- memScript.Lines.Clear;
- with memScript.Lines do
- begin
- {$IFDEF PHP4}
- Add('$btnClose = register_delphi_component("btnClose");');
- Add('$frmTest = register_delphi_component("frmTest");');
- Add('$btnClose->Caption = "&Exit";');
- Add('$frmTest->Caption = "PHP4Delphi demo";');
- Add('$btnClose->Top = 150;');
- Add('$btnClose->Font->Size = 10;');
- Add('$btnClose->Cursor = -21;');
- Add('$frmTest->Color = clGreen;');
- Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
- Add('delphi_show_message($st);');
- {$ELSE}
- Add('$btnClose = register_delphi_component("btnClose");');
- Add('$frmTest = register_delphi_component("frmTest");');
- Add('$btnClose->Caption = "&Exit";');
- Add('$frmTest->Caption = "PHP4Delphi demo";');
- Add('$btnClose->Top = 150;');
- Add('$Font = $btnClose->Font;');
- Add('$Font->Size = 10;');
- Add('$btnClose->Cursor = -21;');
- Add('$frmTest->Color = clGreen;');
- Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
- Add('delphi_show_message($st);');
- {$ENDIF}
- end;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This demo project shows how to access published property
+//of Delphi components from PHP script
+
+{$I PHP.INC}
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, php4delphi, PHPCommon;
+
+type
+
+ TMyButton = class(TButton)
+ private
+ function GetFontSize: integer;
+ procedure SetFontSize(const Value: integer);
+ published
+ property FontSize : integer read GetFontSize write SetFontSize;
+ end;
+
+ TfrmTest = class(TForm)
+ memScript: TMemo;
+ btnExecute: TButton;
+ PHP: TpsvPHP;
+ Label1: TLabel;
+ PHPEngine: TPHPEngine;
+ procedure btnExecuteClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ btnClose : TMyButton;
+ end;
+
+var
+ frmTest: TfrmTest;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmTest.btnExecuteClick(Sender: TObject);
+begin
+ PHP.RunCode(memScript.Lines.Text);
+end;
+
+procedure TfrmTest.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmTest.FormCreate(Sender: TObject);
+begin
+ btnClose := TMyButton.Create(Self);
+ with btnClose do
+ begin
+ Name := 'btnClose';
+ Parent := Self;
+ Left := 384;
+ Top := 42;
+ Width := 75;
+ Height := 25;
+ Caption := '&Close';
+ TabOrder := 2;
+ OnClick := btnCloseClick;
+ end;
+
+ memScript.Lines.Clear;
+ with memScript.Lines do
+ begin
+ Add('$btnClose = register_delphi_component("btnClose");');
+ Add('$frmTest = register_delphi_component("frmTest");');
+ Add('$btnClose->Caption = "&Exit";');
+ Add('$frmTest->Caption = "PHP4Delphi demo";');
+ Add('$btnClose->Top = 150;');
+ Add('$btnClose->FontSize = 10;');
+ Add('$btnClose->Cursor = -21;');
+ Add('$frmTest->Color = clGreen;');
+ Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
+ Add('delphi_show_message($st);');
+ end;
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmTest.FormDestroy(Sender: TObject);
+begin
+ btnClose.Free;
+ PHPEngine.ShutdownEngine;
+end;
+
+{ TMyButton }
+
+function TMyButton.GetFontSize: integer;
+begin
+ Result := Font.Size;
+end;
+
+procedure TMyButton.SetFontSize(const Value: integer);
+begin
+ Font.Size := Value;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.dfm
new file mode 100644
index 0000000..2ba78a3
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.dfm
@@ -0,0 +1,40 @@
+object Form1: TForm1
+ Left = 484
+ Top = 330
+ BorderStyle = bsDialog
+ Caption = 'Shell Demo'
+ ClientHeight = 160
+ ClientWidth = 235
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 12
+ Top = 120
+ Width = 75
+ Height = 25
+ Caption = 'Run'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object psvPHP: TpsvPHP
+ Variables = <>
+ Left = 24
+ Top = 20
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 24
+ Top = 72
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.pas
new file mode 100644
index 0000000..018bb49
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/DemoMain.pas
@@ -0,0 +1,49 @@
+unit DemoMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ phpShellLibrary, StdCtrls, php4delphi, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ Button1: TButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ Lib : TphpShellLibrary;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ Lib := TphpShellLibrary.Create(Self);
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ Lib.Free;
+ PHPEngine.ShutdownEngine;
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ psvPHP.RunCode('shellexecute(0, "open", "calc.exe", "", "", 0);');
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dpr
new file mode 100644
index 0000000..e2d6586
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dpr
@@ -0,0 +1,13 @@
+program ExtDemo;
+
+uses
+ Forms,
+ DemoMain in 'DemoMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dproj
new file mode 100644
index 0000000..c1e5a51
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.dproj
@@ -0,0 +1,105 @@
+
+
+ {27187867-4284-46FA-A57E-1EB08287FB00}
+ ExtDemo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ ExtDemo.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ ExtDemo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/ExtDemo.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/WindowsXP.res differ
diff --git a/Demos/psvPHP/Custom Library/phpShellLibrary.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/phpShellLibrary.pas
similarity index 88%
rename from Demos/psvPHP/Custom Library/phpShellLibrary.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/phpShellLibrary.pas
index a8a1179..219a349 100644
--- a/Demos/psvPHP/Custom Library/phpShellLibrary.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Custom Library/phpShellLibrary.pas
@@ -1,106 +1,104 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: phpShellLibrary.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-//This sample shows how to create custom library for psvPHP component
-unit phpShellLibrary;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Controls, Graphics, Dialogs,
- PHPAPI, ZENDAPI, phpCustomLibrary, ShellAPI, phpFunctions,
- ZendTypes, phpTypes;
-
-
-
-type
- TphpShellLibrary = class(TCustomPHPLibrary)
- protected
- procedure _ShellExecute(Sender: TObject; Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- public
- procedure Refresh; override;
- published
- property Executor;
- end;
-
-procedure Register;
-
-implementation
-
-
-procedure Register;
-begin
- RegisterComponents('PHP', [TphpShellLibrary]);
-end;
-
-
-{ TphpShellLibrary }
-
-procedure TphpShellLibrary._ShellExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- hWnd : THandle;
- Operation, FileName, AParameters,
- Directory: string; ShowCmd: Integer;
-
-begin
- hWnd := Parameters[0].Value;
- Operation := Parameters[1].Value;
- FileName := Parameters[2].Value;
- AParameters := Parameters[3].Value;
- Directory := Parameters[4].Value;
- ShowCmd := Parameters[5].Value;
- ShellExecute(hWnd, PChar(Operation), PChar(FileName), PChar(AParameters), PChar(Directory), ShowCmd);
-end;
-
-procedure TphpShellLibrary.Refresh;
-var
- Func : TphpFunction;
- Parm : TFunctionParam;
-begin
- Functions.Clear;
-
- Func := TphpFunction(Functions.Add);
- Func.FunctionName := 'shellexecute';
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'hwnd';
- Parm.ParamType := tpInteger;
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'operation';
- Parm.ParamType := tpString;
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'filename';
- Parm.ParamType := tpString;
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'parameters';
- Parm.ParamType := tpString;
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'directory';
- Parm.ParamType := tpString;
-
- Parm := TFunctionParam(Func.Parameters.Add);
- Parm.Name := 'showcmd';
- Parm.ParamType := tpInteger;
-
- Func.OnExecute := _ShellExecute;
-
-
- inherited;
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: phpShellLibrary.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This sample shows how to create custom library for psvPHP component
+unit phpShellLibrary;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Controls, Graphics, Dialogs,
+ PHPAPI, ZENDAPI, phpCustomLibrary, ShellAPI, phpFunctions,
+ ZendTypes, phpTypes;
+
+
+
+type
+ TphpShellLibrary = class(TCustomPHPLibrary)
+ protected
+ procedure _ShellExecute(Sender: TObject; Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+ public
+ procedure Refresh; override;
+ end;
+
+procedure Register;
+
+implementation
+
+
+procedure Register;
+begin
+ RegisterComponents('PHP', [TphpShellLibrary]);
+end;
+
+
+{ TphpShellLibrary }
+
+procedure TphpShellLibrary._ShellExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ hWnd : THandle;
+ Operation, FileName, AParameters,
+ Directory: string; ShowCmd: Integer;
+
+begin
+ hWnd := Parameters[0].Value;
+ Operation := Parameters[1].Value;
+ FileName := Parameters[2].Value;
+ AParameters := Parameters[3].Value;
+ Directory := Parameters[4].Value;
+ ShowCmd := Parameters[5].Value;
+ ShellExecute(hWnd, PChar(Operation), PChar(FileName), PChar(AParameters), PChar(Directory), ShowCmd);
+end;
+
+procedure TphpShellLibrary.Refresh;
+var
+ Func : TphpFunction;
+ Parm : TFunctionParam;
+begin
+ Functions.Clear;
+
+ Func := TphpFunction(Functions.Add);
+ Func.FunctionName := 'shellexecute';
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'hwnd';
+ Parm.ParamType := tpInteger;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'operation';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'filename';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'parameters';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'directory';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'showcmd';
+ Parm.ParamType := tpInteger;
+
+ Func.OnExecute := _ShellExecute;
+
+
+ inherited;
+end;
+
end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dpr
new file mode 100644
index 0000000..11b1b95
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dpr
@@ -0,0 +1,26 @@
+{$APPTYPE CONSOLE}
+program dynamic_array;
+
+uses
+ Windows, SysUtils, Classes, ZENDAPI, zend_dynamic_array;
+
+var
+ ar : TDynamicArray;
+ P : pointer;
+ El : PAnsiChar;
+begin
+ zend_dynamic_array_init(@ar,sizeof(PAnsiChar), 3);
+ El := 'Test1';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ El := 'Test2';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ El := 'Test3';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ P := zend_dynamic_array_get_element(@ar, 1);
+ El := PAnsiChar(P^);
+ writeln(el);
+ Readln;
+end.
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dproj
new file mode 100644
index 0000000..7fc93af
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Dynamic Array/dynamic_array.dproj
@@ -0,0 +1,102 @@
+
+
+ {F8C7576D-0982-4AF6-A5A1-5125A03FD478}
+ dynamic_array.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ dynamic_array.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ dynamic_array.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/psvPHP/Encryption/EncDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dpr
similarity index 81%
rename from Demos/psvPHP/Encryption/EncDemo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dpr
index 70f3f63..200b019 100644
--- a/Demos/psvPHP/Encryption/EncDemo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dpr
@@ -1,13 +1,14 @@
-program EncDemo;
-
-uses
- Forms,
- uMain in 'uMain.pas' {frmMain};
-
-{$R *.res}
-
-begin
- Application.Initialize;
- Application.CreateForm(TfrmMain, frmMain);
- Application.Run;
-end.
+program EncDemo;
+
+uses
+ Forms,
+ uMain in 'uMain.pas' {frmMain};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Encryption Demo';
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dproj
new file mode 100644
index 0000000..f77a012
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.dproj
@@ -0,0 +1,105 @@
+
+
+ {B7CB4E60-B659-41B1-A05E-202CF09C7BFE}
+ EncDemo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ EncDemo.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ EncDemo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/EncDemo.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/WindowsXP.res differ
diff --git a/Demos/psvPHP/Encryption/std.encryption.class.inc b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/std.encryption.class.inc
similarity index 97%
rename from Demos/psvPHP/Encryption/std.encryption.class.inc
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/std.encryption.class.inc
index 7ee1296..be24147 100644
--- a/Demos/psvPHP/Encryption/std.encryption.class.inc
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/std.encryption.class.inc
@@ -1,253 +1,253 @@
-
-// Distributed under the GNU General Public Licence
-// *****************************************************************************
-
-class Encryption {
-
- var $scramble1; // 1st string of ASCII characters
- var $scramble2; // 2nd string of ASCII characters
- var $errors; // array of error messages
- var $adj; // 1st adjustment value (optional)
- var $mod; // 2nd adjustment value (optional)
-
- // ****************************************************************************
- // class constructor
- // ****************************************************************************
- function encryption ()
- {
- //DebugBreak();
- $this->errors = array();
-
- // Each of these two strings must contain the same characters, but in a different order.
- // Use only printable characters from the ASCII table.
- // Each character can only appear once in each string EXCEPT for the first character
- // which must be duplicated at the end (this gets round a bijou problemette when the
- // first character of the password is also the first character in $scramble1)
- $this->scramble1 = '! "#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!';
- $this->scramble2 = 'f^jAE]okI\OzU[2&q1{3`h5w_794p@6s8?BgP>dFV=m Dscramble1) <> strlen($this->scramble2)) {
- $this->errors[] = '** SCRAMBLE1 is not same length as SCRAMBLE2 **';
- } // if
-
- $this->adj = 1.75; // this value is added to the rolling fudgefactors
- $this->mod = 3; // if divisible by this the adjustment is made negative
-
- } // constructor
-
- // ****************************************************************************
- function decrypt ($key, $source)
- // decrypt string into its original form
- {
- //DebugBreak();
- // convert $key into a sequence of numbers
- $fudgefactor = $this->_convertKey($key);
- if ($this->errors) return;
-
- if (empty($source)) {
- $this->errors[] = 'No value has been supplied for decryption';
- return;
- } // if
-
- $target = null;
- $factor2 = 0;
-
- for ($i = 0; $i < strlen($source); $i++) {
- // extract a character from $source
- $char2 = substr($source, $i, 1);
-
- // identify its position in $scramble2
- $num2 = strpos($this->scramble2, $char2);
- if ($num2 === false) {
- $this->errors[] = "Source string contains an invalid character ($char)";
- return;
- } // if
-
- // get an adjustment value using $fudgefactor
- $adj = $this->_applyFudgeFactor($fudgefactor);
- $factor1 = $factor2 + $adj; // accumulate in $factor1
- $num1 = round($factor1 * -1) + ($num2); // generate offset for $scramble1
- $num1 = $this->_checkRange($num1); // check range
- $factor2 = $factor1 + $num2; // accumulate in $factor2
-
- // extract character from $scramble1
- $char1 = substr($this->scramble1, $num1, 1);
-
- // append to $target string
- $target .= $char1;
-
- //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
-
- } // for
-
- return rtrim($target);
-
- } // decrypt
-
- // ****************************************************************************
- function encrypt ($key, $source, $sourcelen = 0)
- // encrypt string into a garbled form
- {
- //DebugBreak();
- // convert $key into a sequence of numbers
- $fudgefactor = $this->_convertKey($key);
- if ($this->errors) return;
-
- if (empty($source)) {
- $this->errors[] = 'No value has been supplied for encryption';
- return;
- } // if
-
- // pad $source with spaces up to $sourcelen
- while (strlen($source) < $sourcelen) {
- $source .= ' ';
- } // while
-
- $target = null;
- $factor2 = 0;
-
- for ($i = 0; $i < strlen($source); $i++) {
- // extract a character from $source
- $char1 = substr($source, $i, 1);
-
- // identify its position in $scramble1
- $num1 = strpos($this->scramble1, $char1);
- if ($num1 === false) {
- $this->errors[] = "Source string contains an invalid character ($char)";
- return;
- } // if
-
- // get an adjustment value using $fudgefactor
- $adj = $this->_applyFudgeFactor($fudgefactor);
- $factor1 = $factor2 + $adj; // accumulate in $factor1
- $num2 = round($factor1) + ($num1); // generate offset for $scramble2
- $num2 = $this->_checkRange($num2); // check range
- $factor2 = $factor1 + $num2; // accumulate in $factor2
-
- // extract character from $scramble2
- $char2 = substr($this->scramble2, $num2, 1);
-
- // append to $target string
- $target .= $char2;
-
- //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
-
- } // for
-
- return $target;
-
- } // encrypt
-
- // ****************************************************************************
- function getAdjustment ()
- // return the adjustment value
- {
- return $this->adj;
-
- } // setAdjustment
-
- // ****************************************************************************
- function getModulus ()
- // return the modulus value
- {
- return $this->mod;
-
- } // setModulus
-
- // ****************************************************************************
- function setAdjustment ($adj)
- // set the adjustment value
- {
- $this->adj = (float)$adj;
-
- } // setAdjustment
-
- // ****************************************************************************
- function setModulus ($mod)
- // set the modulus value
- {
- $this->mod = (int)abs($mod); // must be a positive whole number
-
- } // setModulus
-
- // ****************************************************************************
- // private methods
- // ****************************************************************************
- function _applyFudgeFactor (&$fudgefactor)
- // return an adjustment value based on the contents of $fudgefactor
- // NOTE: $fudgefactor is passed by reference so that it can be modified
- {
- $fudge = array_shift($fudgefactor); // extract 1st number from array
- $fudge = $fudge + $this->adj; // add in adjustment value
- $fudgefactor[] = $fudge; // put it back at end of array
-
- if (!empty($this->mod)) { // if modifier has been supplied
- if ($fudge % $this->mod == 0) { // if it is divisible by modifier
- $fudge = $fudge * -1; // make it negative
- } // if
- } // if
-
- return $fudge;
-
- } // _applyFudgeFactor
-
- // ****************************************************************************
- function _checkRange ($num)
- // check that $num points to an entry in $this->scramble1
- {
- $num = round($num); // round up to nearest whole number
-
- // indexing starts at 0, not 1, so subtract 1 from string length
- $limit = strlen($this->scramble1)-1;
-
- while ($num > $limit) {
- $num = $num - $limit; // value too high, so reduce it
- } // while
- while ($num < 0) {
- $num = $num + $limit; // value too low, so increase it
- } // while
-
- return $num;
-
- } // _checkRange
-
- // ****************************************************************************
- function _convertKey ($key)
- // convert $key into an array of numbers
- {
- if (empty($key)) {
- $this->errors[] = 'No value has been supplied for the encryption key';
- return;
- } // if
-
- $array[] = strlen($key); // first entry in array is length of $key
-
- $tot = 0;
- for ($i = 0; $i < strlen($key); $i++) {
- // extract a character from $key
- $char = substr($key, $i, 1);
-
- // identify its position in $scramble1
- $num = strpos($this->scramble1, $char);
- if ($num === false) {
- $this->errors[] = "Key contains an invalid character ($char)";
- return;
- } // if
-
- $array[] = $num; // store in output array
- $tot = $tot + $num; // accumulate total for later
- } // for
-
- $array[] = $tot; // insert total as last entry in array
-
- return $array;
-
- } // _convertKey
-
-// ****************************************************************************
-} // end Encryption
-// ****************************************************************************
-
+
+// Distributed under the GNU General Public Licence
+// *****************************************************************************
+
+class Encryption {
+
+ var $scramble1; // 1st string of ASCII characters
+ var $scramble2; // 2nd string of ASCII characters
+ var $errors; // array of error messages
+ var $adj; // 1st adjustment value (optional)
+ var $mod; // 2nd adjustment value (optional)
+
+ // ****************************************************************************
+ // class constructor
+ // ****************************************************************************
+ function encryption ()
+ {
+ //DebugBreak();
+ $this->errors = array();
+
+ // Each of these two strings must contain the same characters, but in a different order.
+ // Use only printable characters from the ASCII table.
+ // Each character can only appear once in each string EXCEPT for the first character
+ // which must be duplicated at the end (this gets round a bijou problemette when the
+ // first character of the password is also the first character in $scramble1)
+ $this->scramble1 = '! "#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!';
+ $this->scramble2 = 'f^jAE]okI\OzU[2&q1{3`h5w_794p@6s8?BgP>dFV=m Dscramble1) <> strlen($this->scramble2)) {
+ $this->errors[] = '** SCRAMBLE1 is not same length as SCRAMBLE2 **';
+ } // if
+
+ $this->adj = 1.75; // this value is added to the rolling fudgefactors
+ $this->mod = 3; // if divisible by this the adjustment is made negative
+
+ } // constructor
+
+ // ****************************************************************************
+ function decrypt ($key, $source)
+ // decrypt string into its original form
+ {
+ //DebugBreak();
+ // convert $key into a sequence of numbers
+ $fudgefactor = $this->_convertKey($key);
+ if ($this->errors) return;
+
+ if (empty($source)) {
+ $this->errors[] = 'No value has been supplied for decryption';
+ return;
+ } // if
+
+ $target = null;
+ $factor2 = 0;
+
+ for ($i = 0; $i < strlen($source); $i++) {
+ // extract a character from $source
+ $char2 = substr($source, $i, 1);
+
+ // identify its position in $scramble2
+ $num2 = strpos($this->scramble2, $char2);
+ if ($num2 === false) {
+ $this->errors[] = "Source string contains an invalid character ($char)";
+ return;
+ } // if
+
+ // get an adjustment value using $fudgefactor
+ $adj = $this->_applyFudgeFactor($fudgefactor);
+ $factor1 = $factor2 + $adj; // accumulate in $factor1
+ $num1 = round($factor1 * -1) + ($num2); // generate offset for $scramble1
+ $num1 = $this->_checkRange($num1); // check range
+ $factor2 = $factor1 + $num2; // accumulate in $factor2
+
+ // extract character from $scramble1
+ $char1 = substr($this->scramble1, $num1, 1);
+
+ // append to $target string
+ $target .= $char1;
+
+ //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
+
+ } // for
+
+ return rtrim($target);
+
+ } // decrypt
+
+ // ****************************************************************************
+ function encrypt ($key, $source, $sourcelen = 0)
+ // encrypt string into a garbled form
+ {
+ //DebugBreak();
+ // convert $key into a sequence of numbers
+ $fudgefactor = $this->_convertKey($key);
+ if ($this->errors) return;
+
+ if (empty($source)) {
+ $this->errors[] = 'No value has been supplied for encryption';
+ return;
+ } // if
+
+ // pad $source with spaces up to $sourcelen
+ while (strlen($source) < $sourcelen) {
+ $source .= ' ';
+ } // while
+
+ $target = null;
+ $factor2 = 0;
+
+ for ($i = 0; $i < strlen($source); $i++) {
+ // extract a character from $source
+ $char1 = substr($source, $i, 1);
+
+ // identify its position in $scramble1
+ $num1 = strpos($this->scramble1, $char1);
+ if ($num1 === false) {
+ $this->errors[] = "Source string contains an invalid character ($char)";
+ return;
+ } // if
+
+ // get an adjustment value using $fudgefactor
+ $adj = $this->_applyFudgeFactor($fudgefactor);
+ $factor1 = $factor2 + $adj; // accumulate in $factor1
+ $num2 = round($factor1) + ($num1); // generate offset for $scramble2
+ $num2 = $this->_checkRange($num2); // check range
+ $factor2 = $factor1 + $num2; // accumulate in $factor2
+
+ // extract character from $scramble2
+ $char2 = substr($this->scramble2, $num2, 1);
+
+ // append to $target string
+ $target .= $char2;
+
+ //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
+
+ } // for
+
+ return $target;
+
+ } // encrypt
+
+ // ****************************************************************************
+ function getAdjustment ()
+ // return the adjustment value
+ {
+ return $this->adj;
+
+ } // setAdjustment
+
+ // ****************************************************************************
+ function getModulus ()
+ // return the modulus value
+ {
+ return $this->mod;
+
+ } // setModulus
+
+ // ****************************************************************************
+ function setAdjustment ($adj)
+ // set the adjustment value
+ {
+ $this->adj = (float)$adj;
+
+ } // setAdjustment
+
+ // ****************************************************************************
+ function setModulus ($mod)
+ // set the modulus value
+ {
+ $this->mod = (int)abs($mod); // must be a positive whole number
+
+ } // setModulus
+
+ // ****************************************************************************
+ // private methods
+ // ****************************************************************************
+ function _applyFudgeFactor (&$fudgefactor)
+ // return an adjustment value based on the contents of $fudgefactor
+ // NOTE: $fudgefactor is passed by reference so that it can be modified
+ {
+ $fudge = array_shift($fudgefactor); // extract 1st number from array
+ $fudge = $fudge + $this->adj; // add in adjustment value
+ $fudgefactor[] = $fudge; // put it back at end of array
+
+ if (!empty($this->mod)) { // if modifier has been supplied
+ if ($fudge % $this->mod == 0) { // if it is divisible by modifier
+ $fudge = $fudge * -1; // make it negative
+ } // if
+ } // if
+
+ return $fudge;
+
+ } // _applyFudgeFactor
+
+ // ****************************************************************************
+ function _checkRange ($num)
+ // check that $num points to an entry in $this->scramble1
+ {
+ $num = round($num); // round up to nearest whole number
+
+ // indexing starts at 0, not 1, so subtract 1 from string length
+ $limit = strlen($this->scramble1)-1;
+
+ while ($num > $limit) {
+ $num = $num - $limit; // value too high, so reduce it
+ } // while
+ while ($num < 0) {
+ $num = $num + $limit; // value too low, so increase it
+ } // while
+
+ return $num;
+
+ } // _checkRange
+
+ // ****************************************************************************
+ function _convertKey ($key)
+ // convert $key into an array of numbers
+ {
+ if (empty($key)) {
+ $this->errors[] = 'No value has been supplied for the encryption key';
+ return;
+ } // if
+
+ $array[] = strlen($key); // first entry in array is length of $key
+
+ $tot = 0;
+ for ($i = 0; $i < strlen($key); $i++) {
+ // extract a character from $key
+ $char = substr($key, $i, 1);
+
+ // identify its position in $scramble1
+ $num = strpos($this->scramble1, $char);
+ if ($num === false) {
+ $this->errors[] = "Key contains an invalid character ($char)";
+ return;
+ } // if
+
+ $array[] = $num; // store in output array
+ $tot = $tot + $num; // accumulate total for later
+ } // for
+
+ $array[] = $tot; // insert total as last entry in array
+
+ return $array;
+
+ } // _convertKey
+
+// ****************************************************************************
+} // end Encryption
+// ****************************************************************************
+
?>
\ No newline at end of file
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.ddp differ
diff --git a/Demos/psvPHP/Encryption/uMain.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.dfm
similarity index 93%
rename from Demos/psvPHP/Encryption/uMain.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.dfm
index 7fad699..9389e02 100644
--- a/Demos/psvPHP/Encryption/uMain.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.dfm
@@ -1,229 +1,235 @@
-object frmMain: TfrmMain
- Left = 184
- Top = 121
- BorderStyle = bsDialog
- Caption = 'Encryption/Decryption'
- ClientHeight = 345
- ClientWidth = 555
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- PixelsPerInch = 96
- TextHeight = 13
- object lblCaption: TLabel
- Left = 0
- Top = 0
- Width = 555
- Height = 29
- Align = alTop
- Alignment = taCenter
- Caption = 'Test Encryption/Decryption routines'
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -24
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- Layout = tlCenter
- end
- object Label2: TLabel
- Left = 16
- Top = 52
- Width = 46
- Height = 13
- Caption = 'Enter Key'
- end
- object Label3: TLabel
- Left = 16
- Top = 77
- Width = 74
- Height = 13
- Caption = 'Enter Password'
- end
- object Label4: TLabel
- Left = 16
- Top = 102
- Width = 110
- Height = 13
- Caption = 'Enter Password Length'
- end
- object Label5: TLabel
- Left = 16
- Top = 128
- Width = 80
- Height = 13
- Caption = 'Enter Adjustment'
- end
- object Label6: TLabel
- Left = 16
- Top = 153
- Width = 68
- Height = 13
- Caption = 'Enter Modulus'
- end
- object lblEncrypt: TLabel
- Left = 152
- Top = 180
- Width = 3
- Height = 13
- end
- object lblDecrypt: TLabel
- Left = 152
- Top = 200
- Width = 3
- Height = 13
- end
- object Label9: TLabel
- Left = 236
- Top = 104
- Width = 83
- Height = 13
- Caption = '( positive integer )'
- end
- object Label10: TLabel
- Left = 236
- Top = 128
- Width = 49
- Height = 13
- Caption = '( numeric )'
- end
- object Label11: TLabel
- Left = 236
- Top = 152
- Width = 83
- Height = 13
- Caption = '( positive integer )'
- end
- object Label1: TLabel
- Left = 148
- Top = 232
- Width = 27
- Height = 13
- Caption = 'Errors'
- end
- object btnEncrypt: TButton
- Left = 16
- Top = 178
- Width = 75
- Height = 25
- Caption = 'Encrypt'
- TabOrder = 0
- OnClick = btnEncryptClick
- end
- object btnDecrypt: TButton
- Left = 16
- Top = 208
- Width = 75
- Height = 25
- Caption = 'Decrypt'
- TabOrder = 1
- OnClick = btnDecryptClick
- end
- object edtKey: TEdit
- Left = 152
- Top = 48
- Width = 245
- Height = 21
- TabOrder = 2
- Text = 'Fred'
- end
- object edtPassword: TEdit
- Left = 152
- Top = 73
- Width = 249
- Height = 21
- TabOrder = 3
- Text = 'passWORD'
- end
- object edtPassLen: TEdit
- Left = 152
- Top = 98
- Width = 70
- Height = 21
- TabOrder = 4
- Text = '16'
- end
- object edtAjustment: TEdit
- Left = 152
- Top = 124
- Width = 70
- Height = 21
- TabOrder = 5
- Text = '1.75'
- end
- object edtModulus: TEdit
- Left = 152
- Top = 149
- Width = 70
- Height = 21
- TabOrder = 6
- Text = '3'
- end
- object btnClose: TButton
- Left = 476
- Top = 312
- Width = 75
- Height = 25
- Caption = 'Close'
- TabOrder = 7
- OnClick = btnCloseClick
- end
- object Errors: TMemo
- Left = 148
- Top = 248
- Width = 305
- Height = 89
- Lines.Strings = (
- '')
- TabOrder = 8
- end
- object psvPHP: TpsvPHP
- Constants = <>
- Variables = <
- item
- Name = 'key'
- end
- item
- Name = 'password'
- end
- item
- Name = 'pswdlen'
- end
- item
- Name = 'adj'
- end
- item
- Name = 'mod'
- end
- item
- Name = 'encrypt_result'
- end
- item
- Name = 'decrypt_result'
- end>
- Left = 356
- Top = 116
- end
- object PHPLibrary1: TPHPLibrary
- Executor = psvPHP
- LibraryName = 'ErrorsLib'
- Functions = <
- item
- FunctionName = 'printerror'
- Tag = 0
- Parameters = <
- item
- Name = 'line'
- ParamType = tpString
- end>
- OnExecute = PHPLibrary1Functions0Execute
- end>
- Left = 360
- Top = 168
- end
-end
+object frmMain: TfrmMain
+ Left = 331
+ Top = 235
+ BorderStyle = bsDialog
+ Caption = 'Encryption/Decryption'
+ ClientHeight = 345
+ ClientWidth = 555
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lblCaption: TLabel
+ Left = 0
+ Top = 0
+ Width = 555
+ Height = 29
+ Align = alTop
+ Alignment = taCenter
+ Caption = 'Test Encryption/Decryption routines'
+ Font.Charset = RUSSIAN_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -24
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Layout = tlCenter
+ end
+ object Label2: TLabel
+ Left = 16
+ Top = 52
+ Width = 46
+ Height = 13
+ Caption = 'Enter Key'
+ end
+ object Label3: TLabel
+ Left = 16
+ Top = 77
+ Width = 74
+ Height = 13
+ Caption = 'Enter Password'
+ end
+ object Label4: TLabel
+ Left = 16
+ Top = 102
+ Width = 110
+ Height = 13
+ Caption = 'Enter Password Length'
+ end
+ object Label5: TLabel
+ Left = 16
+ Top = 128
+ Width = 80
+ Height = 13
+ Caption = 'Enter Adjustment'
+ end
+ object Label6: TLabel
+ Left = 16
+ Top = 153
+ Width = 68
+ Height = 13
+ Caption = 'Enter Modulus'
+ end
+ object lblEncrypt: TLabel
+ Left = 152
+ Top = 180
+ Width = 3
+ Height = 13
+ end
+ object lblDecrypt: TLabel
+ Left = 152
+ Top = 200
+ Width = 3
+ Height = 13
+ end
+ object Label9: TLabel
+ Left = 236
+ Top = 104
+ Width = 83
+ Height = 13
+ Caption = '( positive integer )'
+ end
+ object Label10: TLabel
+ Left = 236
+ Top = 128
+ Width = 49
+ Height = 13
+ Caption = '( numeric )'
+ end
+ object Label11: TLabel
+ Left = 236
+ Top = 152
+ Width = 83
+ Height = 13
+ Caption = '( positive integer )'
+ end
+ object Label1: TLabel
+ Left = 148
+ Top = 232
+ Width = 27
+ Height = 13
+ Caption = 'Errors'
+ end
+ object btnEncrypt: TButton
+ Left = 16
+ Top = 178
+ Width = 75
+ Height = 25
+ Caption = 'Encrypt'
+ TabOrder = 0
+ OnClick = btnEncryptClick
+ end
+ object btnDecrypt: TButton
+ Left = 16
+ Top = 208
+ Width = 75
+ Height = 25
+ Caption = 'Decrypt'
+ TabOrder = 1
+ OnClick = btnDecryptClick
+ end
+ object edtKey: TEdit
+ Left = 152
+ Top = 48
+ Width = 245
+ Height = 21
+ TabOrder = 2
+ Text = 'Fred'
+ end
+ object edtPassword: TEdit
+ Left = 152
+ Top = 73
+ Width = 249
+ Height = 21
+ TabOrder = 3
+ Text = 'passWORD'
+ end
+ object edtPassLen: TEdit
+ Left = 152
+ Top = 98
+ Width = 70
+ Height = 21
+ TabOrder = 4
+ Text = '16'
+ end
+ object edtAjustment: TEdit
+ Left = 152
+ Top = 124
+ Width = 70
+ Height = 21
+ TabOrder = 5
+ Text = '1.75'
+ end
+ object edtModulus: TEdit
+ Left = 152
+ Top = 149
+ Width = 70
+ Height = 21
+ TabOrder = 6
+ Text = '3'
+ end
+ object btnClose: TButton
+ Left = 476
+ Top = 312
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 7
+ OnClick = btnCloseClick
+ end
+ object Errors: TMemo
+ Left = 148
+ Top = 248
+ Width = 305
+ Height = 89
+ Lines.Strings = (
+ '')
+ TabOrder = 8
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'key'
+ end
+ item
+ Name = 'password'
+ end
+ item
+ Name = 'pswdlen'
+ end
+ item
+ Name = 'adj'
+ end
+ item
+ Name = 'mod'
+ end
+ item
+ Name = 'encrypt_result'
+ end
+ item
+ Name = 'decrypt_result'
+ end>
+ Left = 356
+ Top = 116
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'ErrorsLib'
+ Functions = <
+ item
+ FunctionName = 'printerror'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'line'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibrary1Functions0Execute
+ end>
+ Left = 360
+ Top = 168
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 424
+ Top = 124
+ end
+end
diff --git a/Demos/psvPHP/Encryption/uMain.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.pas
similarity index 83%
rename from Demos/psvPHP/Encryption/uMain.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.pas
index 572cc90..0c97302 100644
--- a/Demos/psvPHP/Encryption/uMain.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Encryption/uMain.pas
@@ -1,125 +1,143 @@
-unit uMain;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, php4delphi, PHPCustomLibrary, phpLibrary, phpFunctions,
- ZendTypes;
-
-type
- TfrmMain = class(TForm)
- lblCaption: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- btnEncrypt: TButton;
- btnDecrypt: TButton;
- edtKey: TEdit;
- edtPassword: TEdit;
- edtPassLen: TEdit;
- edtAjustment: TEdit;
- edtModulus: TEdit;
- btnClose: TButton;
- lblEncrypt: TLabel;
- lblDecrypt: TLabel;
- Label9: TLabel;
- Label10: TLabel;
- Label11: TLabel;
- psvPHP: TpsvPHP;
- Errors: TMemo;
- Label1: TLabel;
- PHPLibrary1: TPHPLibrary;
- procedure btnEncryptClick(Sender: TObject);
- procedure btnDecryptClick(Sender: TObject);
- procedure btnCloseClick(Sender: TObject);
- procedure PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- procedure Execute(Encrypt : boolean);
- end;
-
-var
- frmMain: TfrmMain;
-
-implementation
-
-{$R *.dfm}
-
-{ TfrmMain }
-
-procedure TfrmMain.Execute(Encrypt: boolean);
-var
- Script : TStringList;
-begin
- psvPHP.VariableByName('key').Value := edtKey.Text;
- psvPHP.VariableByName('password').Value := edtPassword.Text;
- psvPHP.VariableByName('pswdlen').Value := edtPassLen.Text;
- psvPHP.VariableByName('adj').Value := edtAjustment.Text;
- psvPHP.VariableByName('mod').Value := edtModulus.Text;
- psvPHP.Variables[5].Value := lblEncrypt.Caption;
- psvPHP.Variables[6].Value := lblDecrypt.Caption;
-
- Script := TStringList.Create;
- With Script do
- begin
- Add('require ''std.encryption.class.inc'';');
- Add('$crypt = new Encryption;');
- Add('ini_set(''session.bug_compat_warn'', 0);');
- Add('$crypt->setAdjustment($adj);');
- Add('$crypt->setModulus($mod);');
- Add('$adj = $crypt->getAdjustment();');
- Add('$mod = $crypt->getModulus();');
- Add('$errors = array();');
-
- if Encrypt then
- begin
- Add('$encrypt_result = $crypt->encrypt($key, $password, $pswdlen);');
- Add('$errors = $crypt->errors;');
- end
- else
- begin
- Add('$decrypt_result = $crypt->decrypt($key, $encrypt_result);');
- Add('$errors = $crypt->errors;');
- end;
- Add('foreach ($errors as $error) {');
- Add('printerror($error);');
- Add('echo $error;');
- Add('} // foreach');
-
- end;
- psvPHP.RunCode(Script.Text);
- lblEncrypt.Caption := psvPHP.Variables[5].Value;
- lblDecrypt.Caption := psvPHP.Variables[6].Value;
- Script.Free;
-end;
-
-procedure TfrmMain.btnEncryptClick(Sender: TObject);
-begin
- Execute(true);
-end;
-
-procedure TfrmMain.btnDecryptClick(Sender: TObject);
-begin
- Execute(false);
-end;
-
-procedure TfrmMain.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TfrmMain.PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- Errors.Lines.Add(Parameters[0].Value);
-end;
-
-end.
+{$I PHP.INC}
+
+unit uMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$IFDEF VERSION6}Variants, {$ENDIF}
+ Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, php4delphi, PHPCustomLibrary, phpLibrary, phpFunctions,
+ ZendTypes, PHPCommon;
+
+type
+ TfrmMain = class(TForm)
+ lblCaption: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ Label5: TLabel;
+ Label6: TLabel;
+ btnEncrypt: TButton;
+ btnDecrypt: TButton;
+ edtKey: TEdit;
+ edtPassword: TEdit;
+ edtPassLen: TEdit;
+ edtAjustment: TEdit;
+ edtModulus: TEdit;
+ btnClose: TButton;
+ lblEncrypt: TLabel;
+ lblDecrypt: TLabel;
+ Label9: TLabel;
+ Label10: TLabel;
+ Label11: TLabel;
+ psvPHP: TpsvPHP;
+ Errors: TMemo;
+ Label1: TLabel;
+ PHPLibrary1: TPHPLibrary;
+ PHPEngine: TPHPEngine;
+ procedure btnEncryptClick(Sender: TObject);
+ procedure btnDecryptClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ procedure Execute(Encrypt : boolean);
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+{$R *.dfm}
+{$R WindowsXP.res}
+
+{ TfrmMain }
+
+procedure TfrmMain.Execute(Encrypt: boolean);
+var
+ Script : TStringList;
+begin
+ psvPHP.VariableByName('key').Value := edtKey.Text;
+ psvPHP.VariableByName('password').Value := edtPassword.Text;
+ psvPHP.VariableByName('pswdlen').Value := edtPassLen.Text;
+ psvPHP.VariableByName('adj').Value := edtAjustment.Text;
+ psvPHP.VariableByName('mod').Value := edtModulus.Text;
+ psvPHP.Variables[5].Value := lblEncrypt.Caption;
+ psvPHP.Variables[6].Value := lblDecrypt.Caption;
+
+ Script := TStringList.Create;
+ With Script do
+ begin
+ Add('require ''std.encryption.class.inc'';');
+ Add('$crypt = new Encryption;');
+ Add('ini_set(''session.bug_compat_warn'', 0);');
+ Add('$crypt->setAdjustment($adj);');
+ Add('$crypt->setModulus($mod);');
+ Add('$adj = $crypt->getAdjustment();');
+ Add('$mod = $crypt->getModulus();');
+ Add('$errors = array();');
+
+ if Encrypt then
+ begin
+ Add('$encrypt_result = $crypt->encrypt($key, $password, $pswdlen);');
+ Add('$errors = $crypt->errors;');
+ end
+ else
+ begin
+ Add('$decrypt_result = $crypt->decrypt($key, $encrypt_result);');
+ Add('$errors = $crypt->errors;');
+ end;
+ Add('foreach ($errors as $error) {');
+ Add('printerror($error);');
+ Add('echo $error;');
+ Add('} // foreach');
+
+ end;
+ psvPHP.RunCode(Script.Text);
+ lblEncrypt.Caption := psvPHP.Variables[5].Value;
+ lblDecrypt.Caption := psvPHP.Variables[6].Value;
+ Script.Free;
+end;
+
+procedure TfrmMain.btnEncryptClick(Sender: TObject);
+begin
+ Execute(true);
+end;
+
+procedure TfrmMain.btnDecryptClick(Sender: TObject);
+begin
+ Execute(false);
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ Errors.Lines.Add(Parameters[0].Value);
+end;
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownEngine;
+end;
+
+end.
diff --git a/Demos/php4Applications/Delphi/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dpr
similarity index 93%
rename from Demos/php4Applications/Delphi/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dpr
index 79c301d..dfa3f13 100644
--- a/Demos/php4Applications/Delphi/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dpr
@@ -1,13 +1,13 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dproj
new file mode 100644
index 0000000..0c76f65
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.dproj
@@ -0,0 +1,105 @@
+
+
+ {4AF32029-1A67-47E6-9BAB-2D46E1FDD3BD}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/Extensions/killer/killer.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.res
similarity index 100%
rename from Demos/Extensions/killer/killer.res
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Project1.res
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.dfm
new file mode 100644
index 0000000..ba5f4fd
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.dfm
@@ -0,0 +1,120 @@
+object Form1: TForm1
+ Left = 404
+ Top = 217
+ BorderStyle = bsDialog
+ Caption = 'PHP Graph demo'
+ ClientHeight = 531
+ ClientWidth = 630
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PaintBox: TPaintBox
+ Left = 4
+ Top = 9
+ Width = 512
+ Height = 512
+ OnPaint = PaintBoxPaint
+ end
+ object btnExecute: TButton
+ Left = 524
+ Top = 4
+ Width = 97
+ Height = 25
+ Caption = '&Execute'
+ TabOrder = 0
+ OnClick = btnExecuteClick
+ end
+ object Button1: TButton
+ Left = 524
+ Top = 32
+ Width = 97
+ Height = 25
+ Caption = 'Use Library'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'X'
+ Value = '0'
+ end
+ item
+ Name = 'Y'
+ Value = '0'
+ end
+ item
+ Name = 'T'
+ Value = '0'
+ end>
+ Left = 236
+ Top = 36
+ end
+ object PHPEngine: TPHPEngine
+ HandleErrors = False
+ Constants = <
+ item
+ Name = 'MinT'
+ Value = '0'
+ end
+ item
+ Name = 'MaxT'
+ Value = '82'
+ end
+ item
+ Name = 'Steps'
+ Value = '2000'
+ end>
+ ReportDLLError = False
+ Left = 172
+ Top = 212
+ end
+ object PHPLibrary: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'gr_prepare'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions0Execute
+ end
+ item
+ FunctionName = 'gr_paint'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end
+ item
+ Name = 'Y'
+ ParamType = tpFloat
+ end>
+ OnExecute = PHPLibraryFunctions1Execute
+ end
+ item
+ FunctionName = 'gr_move'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end
+ item
+ Name = 'Y'
+ ParamType = tpFloat
+ end>
+ OnExecute = PHPLibraryFunctions2Execute
+ end>
+ Left = 288
+ Top = 196
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.pas
new file mode 100644
index 0000000..fa4da5b
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/Unit1.pas
@@ -0,0 +1,210 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, php4delphi, StdCtrls, PHPCommon, PHPCustomLibrary, phpLibrary,
+ PHPFunctions, ZendTypes, PHPTypes, ZendAPI, PHPAPI;
+
+type
+ TForm1 = class(TForm)
+ PaintBox: TPaintBox;
+ psvPHP: TpsvPHP;
+ btnExecute: TButton;
+ PHPEngine: TPHPEngine;
+ PHPLibrary: TPHPLibrary;
+ Button1: TButton;
+ procedure btnExecuteClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure PaintBoxPaint(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPLibraryFunctions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure Button1Click(Sender: TObject);
+ procedure PHPLibraryFunctions2Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ Busy : boolean;
+ procedure PaintBoxImage;
+ public
+ { Public declarations }
+ B : TBitmap;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.btnExecuteClick(Sender: TObject);
+var
+ Script : TStringList;
+ Steps, X, Y: integer;
+ MinT, MaxT, DeltaT, T: double;
+begin
+ psvPHP.UseDelimiters := true;
+ B.Canvas.Brush.Color := clWhite;
+ B.Canvas.FillRect(B.Canvas.ClipRect);
+ B.Canvas.Pen.Color := clSilver;
+ B.Canvas.MoveTo(0, 256);
+ B.Canvas.LineTo(512, 256);
+ B.Canvas.MoveTo(256, 0);
+ B.Canvas.LineTo(256, 512);
+ B.Canvas.Pen.Color := clBlack;
+
+ Script := TStringList.Create;
+ Script.Add('$R1 = 90.0;');
+ Script.Add('$R2 = 26.0;');
+ Script.Add('$O = 70.0;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+
+ MinT := StrToFloat(PHPEngine.Constants.Items[0].Value);
+ MaxT := StrToFloat(PHPEngine.Constants.Items[1].Value);
+ Steps := StrToInt(PHPEngine.Constants.Items[2].Value);
+ DeltaT := (MaxT - MinT) / Steps;
+ T := MinT;
+
+ psvPHP.VariableByName('T').AsFloat := T;
+ psvPHP.RunCode(Script);
+ X := psvPHP.VariableByName('X').AsInteger;
+ Y := psvPHP.VariableByName('Y').AsInteger;
+ B.Canvas.MoveTo(X, Y);
+
+ repeat
+ T := T + DeltaT;
+ psvPHP.VariableByName('T').AsFloat := T;
+ psvPHP.RunCode(Script);
+ X := psvPHP.VariableByName('X').AsInteger;
+ Y := psvPHP.VariableByName('Y').AsInteger;
+ B.Canvas.LineTo(X, Y);
+ PaintBoxImage;
+ Application.ProcessMessages;
+ until T >= MaxT;
+ Script.Free;
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ B := TBitmap.Create;
+ B.Width := Paintbox.Width;
+ B.Height := PaintBox.Height;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownEngine;
+ B.Free;
+ B := nil;
+end;
+
+procedure TForm1.PaintBoxImage;
+begin
+ if Busy then
+ Exit;
+ Busy := true;
+ try
+ bitBlt(PaintBox.Canvas.Handle, 0, 0, PaintBox.Width, PaintBox.Height,
+ B.Canvas.Handle, 0, 0, SRCCOPY);
+ finally
+ Busy := false;
+ end;
+end;
+
+procedure TForm1.PaintBoxPaint(Sender: TObject);
+begin
+ PaintBoxImage;
+end;
+
+procedure TForm1.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ B.Canvas.Brush.Color := clWhite;
+ B.Canvas.FillRect(B.Canvas.ClipRect);
+ B.Canvas.Pen.Color := clSilver;
+ B.Canvas.MoveTo(0, 256);
+ B.Canvas.LineTo(512, 256);
+ B.Canvas.MoveTo(256, 0);
+ B.Canvas.LineTo(256, 512);
+ B.Canvas.Pen.Color := clBlack;
+end;
+
+procedure TForm1.PHPLibraryFunctions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ X, Y : integer;
+begin
+ X := Parameters.ParamByName('X').ZendVariable.AsInteger;
+ Y := Parameters.ParamByName('Y').ZendVariable.AsInteger;
+ B.Canvas.LineTo(X, Y);
+ PaintBoxImage;
+ Application.ProcessMessages;
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ Script : TStringList;
+begin
+ Script := TStringList.Create;
+ try
+ Script.Add('gr_prepare();');
+ Script.Add('$R1 = 90.0;');
+ Script.Add('$R2 = 26.0;');
+ Script.Add('$O = 70.0;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$DeltaT = (MaxT - MinT) / Steps;');
+ Script.Add('$T = MinT;');
+ Script.Add('gr_move($X, $Y);');
+ Script.Add('gr_paint($X, $Y);');
+ Script.Add('do {');
+ Script.Add('$T = $T + $DeltaT;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('gr_paint($X, $Y);');
+ Script.Add('} while ($T <= MaxT);');
+ psvPHP.RunCode(Script);
+ finally
+ Script.Free;
+ end;
+end;
+
+procedure TForm1.PHPLibraryFunctions2Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ X, Y : integer;
+begin
+ X := Parameters.ParamByName('X').ZendVariable.AsInteger;
+ Y := Parameters.ParamByName('Y').ZendVariable.AsInteger;
+ B.Canvas.MoveTo(X, Y);
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Graph/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.dfm
new file mode 100644
index 0000000..cd57b69
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.dfm
@@ -0,0 +1,30 @@
+object EngineModule: TEngineModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ OnDestroy = DataModuleDestroy
+ Left = 562
+ Top = 381
+ Height = 150
+ Width = 215
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 72
+ Top = 24
+ end
+ object PHPLibrary: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'nb_test'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'nb_pointer'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibraryFunctions0Execute
+ end>
+ Left = 120
+ Top = 32
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.pas
new file mode 100644
index 0000000..2ece809
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmEngine.pas
@@ -0,0 +1,56 @@
+unit dmEngine;
+
+interface
+
+uses
+ SysUtils, Classes, PHPCommon, php4delphi, PHPCustomLibrary, phpLibrary,
+ PHPFunctions;
+
+type
+ TEngineModule = class(TDataModule)
+ PHPEngine: TPHPEngine;
+ PHPLibrary: TPHPLibrary;
+ procedure DataModuleCreate(Sender: TObject);
+ procedure DataModuleDestroy(Sender: TObject);
+ procedure PHPLibraryFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ EngineModule: TEngineModule;
+
+implementation
+
+uses dmMain;
+
+{$R *.dfm}
+
+procedure TEngineModule.DataModuleCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TEngineModule.DataModuleDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TEngineModule.PHPLibraryFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+var
+ DM : TMainModule;
+begin
+ DM := TMainModule(Parameters.ParamByName('nb_pointer').ZendVariable.AsInteger);
+ if DM <> nil then
+ ZendVar.AsString := DM.EventString
+ else
+ ZendVar.AsString := 'Result is not defined';
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.dfm
new file mode 100644
index 0000000..e77350a
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.dfm
@@ -0,0 +1,23 @@
+object MainModule: TMainModule
+ OldCreateOrder = False
+ OnCreate = WebModuleCreate
+ Actions = <
+ item
+ Default = True
+ Name = 'WebActionItem1'
+ PathInfo = '/'
+ OnAction = MainModuleWebActionItem1Action
+ end>
+ Left = 513
+ Top = 319
+ Height = 254
+ Width = 333
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'nb'
+ end>
+ Left = 64
+ Top = 56
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.pas
new file mode 100644
index 0000000..f702c6d
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/dmMain.pas
@@ -0,0 +1,51 @@
+unit dmMain;
+
+interface
+
+uses
+ SysUtils, Classes, HTTPApp, PHPCommon, php4delphi;
+
+type
+ TMainModule = class(TWebModule)
+ psvPHP: TpsvPHP;
+ procedure WebModuleCreate(Sender: TObject);
+ procedure MainModuleWebActionItem1Action(Sender: TObject;
+ Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
+ private
+ { Private declarations }
+ FEvent : TDateTime;
+ public
+ { Public declarations }
+ function EventString : string;
+ end;
+
+var
+ MainModule: TMainModule;
+
+implementation
+
+{$R *.dfm}
+
+{ TMainModule }
+
+function TMainModule.EventString: string;
+begin
+ Result := DateTimeToStr(FEvent);
+end;
+
+procedure TMainModule.WebModuleCreate(Sender: TObject);
+begin
+ FEvent := Now;
+end;
+
+procedure TMainModule.MainModuleWebActionItem1Action(Sender: TObject;
+ Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
+var
+ S : string;
+begin
+ psvPHP.VariableByName('nb').AsInteger := integer(Self);
+ S := psvPHP.RunCode(' print nb_test($nb); ?>');
+ Response.Content := S;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpISAPITest.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpISAPITest.dpr
new file mode 100644
index 0000000..bddf2a7
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpISAPITest.dpr
@@ -0,0 +1,54 @@
+library phpisapitest;
+
+uses
+ Windows,
+ ActiveX,
+ ComObj,
+ WebBroker,
+ ISAPIApp,
+ ISAPIThreadPool,
+ ZendTypes,
+ PHPTypes,
+ ZendAPI,
+ PHPAPI,
+ php4Delphi,
+ dmMain in 'dmMain.pas' {MainModule: TWebModule},
+ dmEngine in 'dmEngine.pas' {EngineModule: TDataModule};
+
+{$R *.res}
+
+exports
+ GetExtensionVersion,
+ HttpExtensionProc,
+ TerminateExtension;
+
+var
+ OrgDLLProc : TDLLProc;
+ EngineModule : TEngineModule;
+
+procedure HandlerExitProc(reason : integer);
+begin
+ case Reason of
+ DLL_THREAD_DETACH:
+ begin
+ ts_free_thread;
+ end;
+ DLL_PROCESS_DETACH:
+ begin
+ EngineModule.Free;
+ end;
+ end;
+
+ if Assigned(OrgDLLProc) then
+ OrgDLLProc(reason);
+end;
+
+begin
+ CoInitFlags := COINIT_MULTITHREADED;
+ EngineModule := TEngineModule.Create(nil);
+ Application.Initialize;
+ OrgDLLProc := DLLProc;
+ DLLProc := HandlerExitProc;
+ Application.CreateForm(TMainModule, MainModule);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.bdsproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.bdsproj
new file mode 100644
index 0000000..587b308
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.bdsproj
@@ -0,0 +1,177 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {CCA83CB5-84D7-4C78-854E-622B6A1DCFDE}
+
+
+
+
+ phpISAPITest.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+ vcl;rtl;vclx;dbrtl;vcldb;adortl;dbxcds;dbexpress;vclib;ibxpress;xmlrtl;vclactnband;inet;IntrawebDB_80_100;Intraweb_80_100;vclie;inetdbbde;inetdbxpress;IndyCore;IndySystem;dclOfficeXP;VclSmp;soaprtl;dsnap;IndyProtocols;bdertl;teeui;teedb;tee;vcldbx;dsnapcon;websnap;webdsnap;B304_r100;OERT100;cxLibraryD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxsbD10;cxEditorsD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxVerticalGridD10;dxNavBarD10;dxPSCoreD10;dxPSTeeChartD10;dxPsPrVwAdvD10;dxPSLnksD10;vclshlctrls;dxPSDBTeeChartD10;dxPScxCommonD10;dxPScxExtCommonD10;dxPScxVGridLnkD10;SimpleObjectsR10;TortoisePlugIn100;DBLibR10;PSCControlsR10;FCLRD10;FCLR10;ZLibExR10;gtFiltersBDS2006;gtCompressionBDS2006;gtRtlBDS2006;gtCryptBDS2006;gtFontBDS2006;FreeImageR100;PSCSystemR100;PSCControlsDBR10
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.dproj
new file mode 100644
index 0000000..8ab744b
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.dproj
@@ -0,0 +1,114 @@
+
+
+ {CCA83CB5-84D7-4C78-854E-622B6A1DCFDE}
+ phpISAPITest.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ vcl;rtl;vclx;dbrtl;vcldb;adortl;dbxcds;dbexpress;vclib;ibxpress;xmlrtl;vclactnband;inet;IntrawebDB_80_100;Intraweb_80_100;vclie;inetdbbde;inetdbxpress;IndyCore;IndySystem;dclOfficeXP;VclSmp;soaprtl;dsnap;IndyProtocols;bdertl;teeui;teedb;tee;vcldbx;dsnapcon;websnap;webdsnap;B304_r100;OERT100;cxLibraryD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxsbD10;cxEditorsD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxVerticalGridD10;dxNavBarD10;dxPSCoreD10;dxPSTeeChartD10;dxPsPrVwAdvD10;dxPSLnksD10;vclshlctrls;dxPSDBTeeChartD10;dxPScxCommonD10;dxPScxExtCommonD10;dxPScxVGridLnkD10;SimpleObjectsR10;TortoisePlugIn100;DBLibR10;PSCControlsR10;FCLRD10;FCLR10;ZLibExR10;gtFiltersBDS2006;gtCompressionBDS2006;gtRtlBDS2006;gtCryptBDS2006;gtFontBDS2006;FreeImageR100;PSCSystemR100;PSCControlsDBR10
+ 1
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)
+ x86
+ phpisapitest.dll
+ true
+ false
+ true
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TWebModule
+
+
+
+ TDataModule
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ phpISAPITest.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.res
new file mode 100644
index 0000000..28e5361
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/ISAPI Module/phpisapitest.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dpr
new file mode 100644
index 0000000..8afed48
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dpr
@@ -0,0 +1,18 @@
+program LibraryDemo;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {frmLibDemo},
+ dm_Main in 'dm_Main.pas' {dmMain: TDataModule},
+ frm_dialog in 'frm_dialog.pas' {Form2};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Library Demo';
+ Application.CreateForm(TfrmLibDemo, frmLibDemo);
+ Application.CreateForm(TdmMain, dmMain);
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dproj
new file mode 100644
index 0000000..3450d9a
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.dproj
@@ -0,0 +1,112 @@
+
+
+ {54CCA877-66B1-4454-9C2D-B2101E6EE4C1}
+ LibraryDemo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ LibraryDemo.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ LibraryDemo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/LibraryDemo.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.ddp differ
diff --git a/Demos/psvPHP/Library demo/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.dfm
similarity index 79%
rename from Demos/psvPHP/Library demo/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.dfm
index da1ac3f..2e6cf63 100644
--- a/Demos/psvPHP/Library demo/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.dfm
@@ -1,73 +1,80 @@
-object Form1: TForm1
- Left = 395
- Top = 303
- Caption = 'Form1'
- ClientHeight = 209
- ClientWidth = 377
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object Memo1: TMemo
- Left = 8
- Top = 8
- Width = 185
- Height = 189
- Lines.Strings = (
- 'formcaption("Hello from PHP");'
- 'buttonclick();')
- TabOrder = 0
- end
- object Button1: TButton
- Left = 292
- Top = 172
- Width = 75
- Height = 25
- Caption = 'Click'
- TabOrder = 1
- OnClick = Button1Click
- end
- object Button2: TButton
- Left = 292
- Top = 12
- Width = 75
- Height = 25
- Caption = 'Execute'
- TabOrder = 2
- OnClick = Button2Click
- end
- object psvPHP1: TpsvPHP
- Constants = <>
- Variables = <>
- Left = 32
- Top = 28
- end
- object PHPLibrary1: TPHPLibrary
- Executor = psvPHP1
- LibraryName = 'SimpleLib'
- Functions = <
- item
- FunctionName = 'formcaption'
- Tag = 0
- Parameters = <
- item
- Name = 'Param1'
- ParamType = tpString
- end>
- OnExecute = PHPLibrary1Functions0Execute
- end
- item
- FunctionName = 'buttonclick'
- Tag = 0
- Parameters = <>
- OnExecute = PHPLibrary1Functions1Execute
- end>
- Left = 68
- Top = 28
- end
-end
+object frmLibDemo: TfrmLibDemo
+ Left = 395
+ Top = 303
+ BorderStyle = bsDialog
+ Caption = 'PHP Demo'
+ ClientHeight = 209
+ ClientWidth = 377
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 8
+ Top = 8
+ Width = 185
+ Height = 189
+ Lines.Strings = (
+ 'formcaption("Hello from PHP");'
+ 'buttonclick();'
+ 'my_createcontrol();')
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 292
+ Top = 172
+ Width = 75
+ Height = 25
+ Caption = 'Click'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object btnExecute: TButton
+ Left = 292
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 2
+ OnClick = btnExecuteClick
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <>
+ Left = 32
+ Top = 28
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'SimpleLib'
+ Functions = <
+ item
+ FunctionName = 'formcaption'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibrary1Functions0Execute
+ end
+ item
+ FunctionName = 'buttonclick'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions1Execute
+ end>
+ Left = 88
+ Top = 108
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 212
+ Top = 64
+ end
+end
diff --git a/Demos/psvPHP/Library demo/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.pas
similarity index 60%
rename from Demos/psvPHP/Library demo/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.pas
index 0ebde95..a734e5a 100644
--- a/Demos/psvPHP/Library demo/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/Unit1.pas
@@ -1,73 +1,77 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit Unit1;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, PHPCustomLibrary, phpLibrary, php4delphi, PHPAPI, ZENDAPI,
- PHPFunctions, ZendTypes, phpTypes, PHPCommon;
-
-type
- TForm1 = class(TForm)
- psvPHP1: TpsvPHP;
- PHPLibrary1: TPHPLibrary;
- Memo1: TMemo;
- Button1: TButton;
- Button2: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure PHPLibrary1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TForm1.Button1Click(Sender: TObject);
-begin
- ShowMessage('Click');
-end;
-
-procedure TForm1.Button2Click(Sender: TObject);
-begin
- psvPhp1.RunCode(memo1.Lines.text);
-end;
-
-procedure TForm1.PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- Form1.Caption := Parameters[0].Value;
-end;
-
-procedure TForm1.PHPLibrary1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- Button1.Click;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, PHPCustomLibrary, phpLibrary, php4delphi, PHPAPI, ZENDAPI,
+ PHPFunctions, ZendTypes, phpTypes, PHPCommon;
+
+type
+ TfrmLibDemo = class(TForm)
+ psvPHP1: TpsvPHP;
+ PHPLibrary1: TPHPLibrary;
+ Memo1: TMemo;
+ Button1: TButton;
+ btnExecute: TButton;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure btnExecuteClick(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPLibrary1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmLibDemo: TfrmLibDemo;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmLibDemo.Button1Click(Sender: TObject);
+begin
+ ShowMessage('Click');
+end;
+
+procedure TfrmLibDemo.btnExecuteClick(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ psvPhp1.RunCode(memo1.Lines.text);
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TfrmLibDemo.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ frmLibDemo.Caption := Parameters[0].Value;
+end;
+
+procedure TfrmLibDemo.PHPLibrary1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ Button1.Click;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dfm
new file mode 100644
index 0000000..b957280
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dfm
@@ -0,0 +1,18 @@
+object dmMain: TdmMain
+ OldCreateOrder = False
+ Left = 332
+ Top = 246
+ Height = 508
+ Width = 730
+ object PHPLibrary1: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'my_createcontrol'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions0Execute
+ end>
+ Left = 44
+ Top = 44
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dti b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dti
new file mode 100644
index 0000000..862f513
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=332
+Top=246
+Width=730
+Height=508
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=dmMain\PHPLibrary1\PHPLibrary1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.pas
new file mode 100644
index 0000000..59bc840
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/dm_Main.pas
@@ -0,0 +1,39 @@
+unit dm_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCommon, PHPCustomLibrary, phpLibrary, PHPFunctions, ZendTypes;
+
+type
+ TdmMain = class(TDataModule)
+ PHPLibrary1: TPHPLibrary;
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ThisPtr: pzval; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ dmMain: TdmMain;
+
+implementation
+
+uses frm_dialog;
+
+{$R *.DFM}
+
+procedure TdmMain.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
+ TSRMLS_DC: Pointer);
+begin
+ Form2 := TForm2.Create(Application);
+ Form2.ShowModal;
+ Form2.Free;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.dfm
new file mode 100644
index 0000000..a9a3ded
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.dfm
@@ -0,0 +1,34 @@
+object Form2: TForm2
+ Left = 434
+ Top = 330
+ BorderStyle = bsDialog
+ Caption = 'Dialog'
+ ClientHeight = 231
+ ClientWidth = 396
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 16
+ Top = 52
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Edit1: TEdit
+ Left = 16
+ Top = 20
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.pas
new file mode 100644
index 0000000..266a6e9
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Library demo/frm_dialog.pas
@@ -0,0 +1,32 @@
+unit frm_dialog;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TForm2 = class(TForm)
+ Button1: TButton;
+ Edit1: TEdit;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.DFM}
+
+procedure TForm2.Button1Click(Sender: TObject);
+begin
+ Close;
+end;
+
+end.
diff --git a/Demos/psvPHP/Logo/LogoDemo.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dpr
similarity index 93%
rename from Demos/psvPHP/Logo/LogoDemo.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dpr
index 17ea943..7dedaa4 100644
--- a/Demos/psvPHP/Logo/LogoDemo.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dpr
@@ -1,13 +1,13 @@
-program LogoDemo;
-
-uses
- Forms,
- uMain in 'uMain.pas' {Form1};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program LogoDemo;
+
+uses
+ Forms,
+ uMain in 'uMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dproj
new file mode 100644
index 0000000..4b6b0d8
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.dproj
@@ -0,0 +1,105 @@
+
+
+ {F0C6D9FD-A1AA-4B17-A453-5FBCD2432A41}
+ LogoDemo.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ LogoDemo.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ LogoDemo.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/LogoDemo.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/egg.gif b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/egg.gif
new file mode 100644
index 0000000..afecb6f
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/egg.gif differ
diff --git a/Demos/psvPHP/Logo/uMain.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.dfm
similarity index 95%
rename from Demos/psvPHP/Logo/uMain.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.dfm
index bb20edb..63d1244 100644
--- a/Demos/psvPHP/Logo/uMain.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.dfm
@@ -1,36 +1,36 @@
-object Form1: TForm1
- Left = 520
- Top = 365
- BorderStyle = bsDialog
- Caption = 'Logo demo'
- ClientHeight = 52
- ClientWidth = 178
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- PixelsPerInch = 96
- TextHeight = 13
- object Button1: TButton
- Left = 11
- Top = 14
- Width = 75
- Height = 25
- Caption = 'PHP egg'
- TabOrder = 0
- OnClick = Button1Click
- end
- object Button2: TButton
- Left = 91
- Top = 14
- Width = 75
- Height = 25
- Caption = 'Close'
- TabOrder = 1
- OnClick = Button2Click
- end
-end
+object Form1: TForm1
+ Left = 520
+ Top = 365
+ BorderStyle = bsDialog
+ Caption = 'Logo demo'
+ ClientHeight = 52
+ ClientWidth = 178
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 11
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'PHP egg'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 91
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+end
diff --git a/Demos/psvPHP/Logo/uMain.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.pas
similarity index 94%
rename from Demos/psvPHP/Logo/uMain.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.pas
index fa2ede2..2371130 100644
--- a/Demos/psvPHP/Logo/uMain.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Logo/uMain.pas
@@ -1,45 +1,46 @@
-unit uMain;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ShellAPI;
-
-type
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- Form1: TForm1;
-
-implementation
-uses
- logos;
-
-{$R *.DFM}
-
-procedure TForm1.Button1Click(Sender: TObject);
-var
- FS : TFileStream;
-begin
- FS := TFileStream.Create('egg.gif', fmCreate);
- FS.Write(php_egg_logo, 7538);
- FS.Free;
- ShellExecute(0, 'open', 'egg.gif', nil, nil, SW_SHOWNORMAL);
-end;
-
-procedure TForm1.Button2Click(Sender: TObject);
-begin
- Close;
-end;
-
-end.
+unit uMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ShellAPI;
+
+type
+ TForm1 = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+uses
+ logos;
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ FS : TFileStream;
+begin
+ FS := TFileStream.Create('egg.gif', fmCreate);
+ FS.Write(php_egg_logo, 7538);
+ FS.Free;
+ ShellExecute(0, 'open', 'egg.gif', nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dpr
new file mode 100644
index 0000000..2a38013
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dpr
@@ -0,0 +1,14 @@
+program MultithreadSample;
+
+uses
+ Forms,
+ frm_main in 'frm_main.pas' {frmMain},
+ php_thread in 'php_thread.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj
new file mode 100644
index 0000000..8e2a16e
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj
@@ -0,0 +1,169 @@
+
+
+ {94D8351C-D7FA-4AB4-B4FA-8A463EB52A65}
+ MultithreadSample.dpr
+ Debug
+ DCC32
+ 18.2
+ VCL
+ True
+ Win32
+ 1
+ Application
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ MultithreadSample
+ 2057
+ 00400000
+ false
+ x86
+ MultithreadSample.exe
+ false
+ false
+ false
+ false
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ $(BDS)\bin\default_app.manifest
+ MultithreadSample_Icon4.ico
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
+ 1033
+ true
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Debug
+
+
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
+ MultithreadSample_Icon4.ico
+ $(BDS)\bin\default_app.manifest
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
+ true
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ 0
+
+
+ true
+ true
+
+
+ DEBUG;$(DCC_Define)
+
+
+ true
+ true
+
+
+
+ MainSource
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ MultithreadSample.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ True
+ False
+
+
+ 12
+
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares
new file mode 100644
index 0000000..7435995
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res
new file mode 100644
index 0000000..8afa5b2
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.dfm
new file mode 100644
index 0000000..e29e9c3
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.dfm
@@ -0,0 +1,44 @@
+object frmMain: TfrmMain
+ Left = 513
+ Top = 399
+ BorderStyle = bsDialog
+ Caption = 'PHP Multithread sample'
+ ClientHeight = 81
+ ClientWidth = 306
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btnRun: TButton
+ Left = 136
+ Top = 48
+ Width = 75
+ Height = 25
+ Caption = 'Run'
+ TabOrder = 0
+ OnClick = btnRunClick
+ end
+ object btnClose: TButton
+ Left = 220
+ Top = 48
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = btnCloseClick
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 12
+ Top = 12
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.pas
new file mode 100644
index 0000000..8ba9a62
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/frm_main.pas
@@ -0,0 +1,62 @@
+unit frm_main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCommon, php4delphi, StdCtrls;
+
+type
+ TfrmMain = class(TForm)
+ PHPEngine: TPHPEngine;
+ btnRun: TButton;
+ btnClose: TButton;
+ procedure btnRunClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+uses php_thread;
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmMain.btnRunClick(Sender: TObject);
+var
+ cnt : integer;
+ T : TPHPThread;
+begin
+ for cnt := 0 to 99 do
+ begin
+ T := TPHPThread.Create(true);
+ T.FreeOnTerminate := true;
+ T.Resume;
+ end;
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/php_thread.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/php_thread.pas
new file mode 100644
index 0000000..76f207c
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/php_thread.pas
@@ -0,0 +1,45 @@
+unit php_thread;
+
+interface
+
+uses
+ Windows, Classes, Forms, PHPCommon, php4Delphi, PHPTypes, ZendTypes, ZENDAPI, PHPAPI;
+
+type
+ TPHPThread = class(TThread)
+ private
+ { Private declarations }
+ PHP : TpsvPHP;
+ protected
+ procedure Execute; override;
+ procedure ComeBack;
+ end;
+
+implementation
+
+
+{ TPHPThread }
+
+procedure TPHPThread.ComeBack;
+begin
+ Application.ProcessMessages;
+end;
+
+procedure TPHPThread.Execute;
+begin
+ PHP := TpsvPHP.Create(nil);
+ PHP.RunCode('echo "Threaded";');
+ PHP.Free;
+ Synchronize(ComeBack);
+ sleep(250); //for zend_timeout to kill timer
+ Synchronize(ComeBack);
+ try
+ //This will release thread allocated resources
+ //The better way is to reuse existsing threads
+ //to save time and memory
+ ts_free_thread;
+ except
+ end;
+end;
+
+end.
diff --git a/Demos/psvPHP/Graph/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/Graph/Project1.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dpr
index 79c301d..dfa3f13 100644
--- a/Demos/psvPHP/Graph/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dpr
@@ -1,13 +1,13 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dproj
new file mode 100644
index 0000000..c370b49
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.dproj
@@ -0,0 +1,105 @@
+
+
+ {0F421CA1-6A27-4406-B069-E1B488D1AE88}
+ Project1.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Project1.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Project1.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Project1.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.ddp differ
diff --git a/Demos/psvPHP/array demo/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.dfm
similarity index 74%
rename from Demos/psvPHP/array demo/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.dfm
index ff2d68d..bcac6ee 100644
--- a/Demos/psvPHP/array demo/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.dfm
@@ -1,52 +1,60 @@
-object Form1: TForm1
- Left = 283
- Top = 220
- Width = 264
- Height = 194
- Caption = 'Array demo'
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object Button1: TButton
- Left = 16
- Top = 64
- Width = 75
- Height = 25
- Caption = 'Button1'
- TabOrder = 0
- OnClick = Button1Click
- end
- object ListBox1: TListBox
- Left = 108
- Top = 4
- Width = 121
- Height = 97
- ItemHeight = 13
- TabOrder = 1
- end
- object psvPHP1: TpsvPHP
- Constants = <>
- Variables = <>
- Left = 20
- Top = 16
- end
- object PHPLibrary1: TPHPLibrary
- Executor = psvPHP1
- LibraryName = 'ArrayLib'
- Functions = <
- item
- FunctionName = 'get_php_array'
- Tag = 0
- Parameters = <>
- OnExecute = PHPLibrary1Functions0Execute
- end>
- Left = 52
- Top = 16
- end
-end
+object Form1: TForm1
+ Left = 490
+ Top = 294
+ BorderStyle = bsDialog
+ Caption = 'Array demo'
+ ClientHeight = 160
+ ClientWidth = 256
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 16
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Button1'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object ListBox1: TListBox
+ Left = 108
+ Top = 4
+ Width = 121
+ Height = 97
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <>
+ Left = 20
+ Top = 16
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'ArrayLib'
+ Functions = <
+ item
+ FunctionName = 'get_php_array'
+ Tag = 0
+ Parameters = <>
+ OnExecute = ExecuteGetArray
+ end>
+ Left = 52
+ Top = 16
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 44
+ Top = 112
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.pas
new file mode 100644
index 0000000..51ee04e
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/Unit1.pas
@@ -0,0 +1,108 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This sample shows how to return an array as a result of PHP function
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCustomLibrary, phpLibrary, php4delphi, phpFunctions, ZendAPI, PHPAPI,
+ StdCtrls, ZendTypes, phpTypes, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP1: TpsvPHP;
+ PHPLibrary1: TPHPLibrary;
+ Button1: TButton;
+ ListBox1: TListBox;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure ExecuteGetArray(Sender: TObject; Parameters: TFunctionParams;
+ var ReturnValue: Variant; ZendVar: TZendVariable;
+ TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ ar : array of string;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ cnt : integer;
+begin
+ //Clear array
+ SetLength(ar,0);
+ //Execute code
+ psvPHP1.RunCode('$z=0; $y=0; $ar=array("la","hu"); $x=45; $z = $x + $y; $count=count($ar); get_php_array();');
+ //Display new value of the array
+ ListBox1.Items.Clear;
+ for cnt := 0 to Length(ar) - 1 do
+ ListBox1.Items.Add(ar[cnt]);
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownEngine;
+end;
+
+procedure TForm1.ExecuteGetArray(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+var
+ ht : PHashTable;
+ data: ^ppzval;
+ cnt : integer;
+ variable : pzval;
+ tmp : ^ppzval;
+begin
+ ht := GetSymbolsTable;
+ if Assigned(ht) then
+ begin
+ new(data);
+ if zend_hash_find(ht, 'ar', 3, data) = SUCCESS then
+ begin
+ variable := data^^;
+ if variable^._type = IS_ARRAY then
+ begin
+ SetLength(ar, zend_hash_num_elements(variable^.value.ht));
+ for cnt := 0 to zend_hash_num_elements(variable^.value.ht) -1 do
+ begin
+ new(tmp);
+ zend_hash_index_find(variable^.value.ht, cnt, tmp);
+ ar[cnt] := tmp^^^.value.str.val;
+ freemem(tmp);
+ end;
+ end;
+ end;
+ freemem(data);
+ end;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/array demo/WindowsXP.res differ
diff --git a/Demos/psvPHP/console/phpcon.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dpr
similarity index 78%
rename from Demos/psvPHP/console/phpcon.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dpr
index e24b63b..bfe499a 100644
--- a/Demos/psvPHP/console/phpcon.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dpr
@@ -1,30 +1,35 @@
-{$APPTYPE CONSOLE}
-
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: phpcon.dpr,v 6.2 02/2006 delphi32 Exp $ }
-
-program phpcon;
-
-uses SysUtils, php4delphi;
-
-var
- php : TpsvPHP;
-begin
- if ParamCount <> 1 then
- begin
- writeln(Format('Usage: %s ', [ParamStr(0)]));
- Halt(1);
- end;
- php := TpsvPHP.Create(nil);
- php.FileName := ParamStr(1);
- write(php.Execute);
- php.Free;
-end.
+{$APPTYPE CONSOLE}
+
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: phpcon.dpr,v 7.0 04/2007 delphi32 Exp $ }
+
+program phpcon;
+
+uses SysUtils, php4delphi;
+
+var
+ php : TpsvPHP;
+ Engine : TPHPEngine;
+begin
+ if ParamCount <> 1 then
+ begin
+ writeln(Format('Usage: %s ', [ParamStr(0)]));
+ Halt(1);
+ end;
+ Engine := TPHPEngine.Create(nil);
+ Engine.StartupEngine;
+ php := TpsvPHP.Create(nil);
+ php.FileName := AnsiString(ParamStr(1));
+ write(php.Execute);
+ php.Free;
+ Engine.ShutdownEngine;
+ Engine.Free;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dproj
new file mode 100644
index 0000000..8fbe681
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/phpcon.dproj
@@ -0,0 +1,102 @@
+
+
+ {CDD13A49-7E43-43C4-B155-14EA1434D06A}
+ phpcon.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ phpcon.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ phpcon.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Demos/psvPHP/sample1/test.php b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/test.php
similarity index 85%
rename from Demos/psvPHP/sample1/test.php
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/console/test.php
index 62eb52c..f4f3614 100644
--- a/Demos/psvPHP/sample1/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/console/test.php
@@ -1,4 +1,4 @@
-
-
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dpr
new file mode 100644
index 0000000..35dbf7c
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dpr
@@ -0,0 +1,16 @@
+program Sample1;
+
+uses
+ Forms,
+ frm_phpDemo in 'frm_phpDemo.pas' {frmPHPDemo},
+ zendAPI,
+ php4delphi,
+ phpAPI;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmPHPDemo, frmPHPDemo);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dproj
new file mode 100644
index 0000000..eadb198
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.dproj
@@ -0,0 +1,110 @@
+
+
+ {918ad693-3b86-4b4f-9d15-809746772557}
+ Sample1.dpr
+ Debug
+ AnyCPU
+ DCC32
+ Sample1.exe
+ 12.0
+ Debug
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;xmlrtl;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;websnap;webdsnap;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DataSnapServer;DbxClientDriver;DBXInterBaseDriver;DBXMySQLDriver;dbxcds;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;php4DelphiR2009
+ Sample1.exe
+ true
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE;$(DCC_Define)
+
+
+ 7.0
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ False
+ False
+ 2067
+ 1252
+
+
+ Serhiy Perevoznyk
+
+ 1.0.0.1
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ Sample1.dpr
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.res
new file mode 100644
index 0000000..55bac8d
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/Sample1.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.ddp differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.dfm
new file mode 100644
index 0000000..c174976
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.dfm
@@ -0,0 +1,192 @@
+object frmPHPDemo: TfrmPHPDemo
+ Left = 299
+ Top = 239
+ Caption = 'psvPHP demo'
+ ClientHeight = 506
+ ClientWidth = 775
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 484
+ Top = 0
+ Width = 4
+ Height = 465
+ Align = alRight
+ end
+ object pnlButtons: TPanel
+ Left = 0
+ Top = 465
+ Width = 775
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 590
+ Top = 0
+ Width = 185
+ Height = 41
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btnExecuteCode: TButton
+ Left = 88
+ Top = 8
+ Width = 87
+ Height = 25
+ Caption = 'Execute Code'
+ TabOrder = 0
+ OnClick = btnExecuteCodeClick
+ end
+ object btnExecuteFile: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Execute File'
+ TabOrder = 1
+ OnClick = btnExecuteFileClick
+ end
+ end
+ end
+ object WebBrowser1: TWebBrowser
+ Left = 0
+ Top = 0
+ Width = 484
+ Height = 465
+ Align = alClient
+ TabOrder = 1
+ ControlData = {
+ 4C000000063200000F3000000000000000000000000000000000000000000000
+ 000000004C000000000000000000000001000000E0D057007335CF11AE690800
+ 2B2E126208000000000000004C0000000114020000000000C000000000000046
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000100000000000000000000000000000000000000}
+ end
+ object Panel3: TPanel
+ Left = 488
+ Top = 0
+ Width = 287
+ Height = 465
+ Align = alRight
+ Caption = 'Panel3'
+ TabOrder = 2
+ object Label1: TLabel
+ Left = 1
+ Top = 1
+ Width = 285
+ Height = 13
+ Align = alTop
+ Caption = ' PHP code'
+ ExplicitWidth = 55
+ end
+ object Label2: TLabel
+ Left = 1
+ Top = 295
+ Width = 285
+ Height = 13
+ Align = alBottom
+ Caption = ' Result values'
+ ExplicitWidth = 70
+ end
+ object memPHPCode: TMemo
+ Left = 1
+ Top = 14
+ Width = 285
+ Height = 281
+ Align = alClient
+ Lines.Strings = (
+ 'echo "Before function declaration... \n";'
+ ''
+ 'function print_something_multiple_times($something,$times)'
+ '{'
+
+ ' echo "---- \nIn function, printing the string \"$something\' +
+ '" $times times \n";'
+ ' for ($i=0; $i<$times; $i++) {'
+ ' echo "$i) $something \n";'
+ ' }'
+ ' echo "Done with function... \n----- \n";'
+ '}'
+ ''
+ 'function some_other_function()'
+ '{'
+
+ ' echo "This is some other function, to ensure more than just on' +
+ 'e function works fine... \n";'
+ '}'
+ ''
+ ''
+ 'echo "After function declaration... \n";'
+ ''
+ 'echo "Calling function for the first time... \n";'
+ 'print_something_multiple_times($test,10);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'echo "Calling the function for the second time... \n";'
+
+ 'print_something_multiple_times("This like, really works and stuf' +
+ 'f...",3);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'some_other_function();'
+ ''
+ '$test = "I don'#39't believe";'
+ '$tool = "PHP";')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ WordWrap = False
+ end
+ object lbVariables: TListBox
+ Left = 1
+ Top = 308
+ Width = 285
+ Height = 156
+ Align = alBottom
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'test'
+ Value = 'This works!'
+ end
+ item
+ Name = 'tool'
+ Value = 'Delphi'
+ end>
+ OnReadPost = psvPHPReadPost
+ RequestType = prtPost
+ Left = 116
+ Top = 28
+ end
+ object OpenDialog1: TOpenDialog
+ DefaultExt = '.php'
+ Filter = 'PHP script (*.php)|*.php|Any File (*.*)|*.*'
+ Left = 196
+ Top = 132
+ end
+ object PHPEngine: TPHPEngine
+ OnLogMessage = PHPEngineLogMessage
+ Constants = <>
+ ReportDLLError = False
+ Left = 72
+ Top = 124
+ end
+ object PHPSystemLibrary1: TPHPSystemLibrary
+ Left = 200
+ Top = 280
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas
new file mode 100644
index 0000000..38f0f7f
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas
@@ -0,0 +1,174 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+unit frm_phpDemo;
+
+{ $Id: frm_phpDemo.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ OleCtrls, SHDocVw, StdCtrls, ExtCtrls, ActiveX, php4delphi, PHPCommon,
+ PHPCustomLibrary, phpLibrary;
+
+type
+ TfrmPHPDemo = class(TForm)
+ pnlButtons: TPanel;
+ Panel2: TPanel;
+ btnExecuteCode: TButton;
+ WebBrowser1: TWebBrowser;
+ psvPHP: TpsvPHP;
+ btnExecuteFile: TButton;
+ OpenDialog1: TOpenDialog;
+ Panel3: TPanel;
+ memPHPCode: TMemo;
+ lbVariables: TListBox;
+ Splitter1: TSplitter;
+ Label1: TLabel;
+ Label2: TLabel;
+ PHPEngine: TPHPEngine;
+ PHPSystemLibrary1: TPHPSystemLibrary;
+ procedure FormCreate(Sender: TObject);
+ procedure btnExecuteFileClick(Sender: TObject);
+ procedure btnExecuteCodeClick(Sender: TObject);
+ procedure psvPHPReadPost(Sender: TObject; Stream: TStream);
+ procedure FormDestroy(Sender: TObject);
+ procedure PHPEngineLogMessage(Sender: TObject; AText: AnsiString);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ procedure DisplayResultInBrowser(AStr : AnsiString);
+ procedure DisplayVariables;
+ end;
+
+var
+ frmPHPDemo: TfrmPHPDemo;
+
+implementation
+
+
+
+{$R *.DFM}
+{$R internal.res}
+
+function StringToOleStream(const AString: AnsiString): IStream;
+var
+ MemHandle: THandle;
+ Len : integer;
+begin
+ Len := strlen(PAnsiChar(AString));
+ MemHandle := GlobalAlloc(GPTR, len + 1);
+ if MemHandle <> 0 then begin
+ Move(AString[1], PChar(MemHandle)^, strlen(PAnsiChar(AString)) + 1);
+ CreateStreamOnHGlobal(MemHandle, True, Result);
+ end else
+ Result := nil;
+end;
+
+procedure TfrmPHPDemo.FormCreate(Sender: TObject);
+var
+ Url : OleVariant;
+ Doc : AnsiString;
+begin
+ PHPEngine.StartupEngine;
+ Url := 'about:blank';
+ Webbrowser1.Navigate2(Url);
+ Doc := psvPHP.RunCode('phpinfo();');
+ DisplayResultInBrowser(Doc);
+ DisplayVariables;
+end;
+
+
+
+procedure TfrmPHPDemo.btnExecuteFileClick(Sender: TObject);
+var
+ doc : string;
+begin
+ if OpenDialog1.Execute then
+ begin
+ doc := '';
+ MemPHPCode.Lines.Clear;
+ MemPHPCode.Lines.LoadFromFile(OpenDialog1.FileName);
+ doc := psvPHP.Execute(OpenDialog1.FileName);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+ end;
+end;
+
+procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: AnsiString);
+var
+ Stream: IStream;
+ StreamInit: IPersistStreamInit;
+begin
+ if AStr = '' then
+ begin
+ WebBrowser1.Navigate('about:The script returns no result');
+ Exit;
+ end;
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
+
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
+
+ Stream := StringToOleStream(AStr);
+ StreamInit := Webbrowser1.Document as IPersistStreamInit;
+ StreamInit.InitNew;
+ StreamInit.Load(Stream);
+end;
+
+procedure TfrmPHPDemo.DisplayVariables;
+var
+ i : integer;
+begin
+ lbVariables.Items.Clear;
+ for i := 0 to psvPHP.Variables.Count - 1 do
+ begin
+ lbVariables.Items.Add(psvphp.Variables[i].Name + '=' + psvPHP.Variables[i].Value);
+ end;
+ lbVariables.Items.Add('');
+ lbVariables.Items.Add('Headers:');
+ lbVariables.Items.Add('');
+ for i := 0 to psvPHP.Headers.Count - 1 do
+ lbVariables.Items.Add(psvPHP.Headers[i].Header);
+end;
+
+procedure TfrmPHPDemo.btnExecuteCodeClick(Sender: TObject);
+var
+ doc : string;
+begin
+ doc := '';
+ doc := psvPHP.RunCode(memPHPCode.Text);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+end;
+
+procedure TfrmPHPDemo.psvPHPReadPost(Sender: TObject; Stream: TStream);
+var
+ PostData : string;
+begin
+ PostData :='postname=postvalue'#0;
+ Stream.Write(PostData[1], length(PostData));
+end;
+
+procedure TfrmPHPDemo.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TfrmPHPDemo.PHPEngineLogMessage(Sender: TObject; AText: AnsiString);
+begin
+ ShowMessage('Trapped ' + AText);
+end;
+
+end.
diff --git a/Demos/psvPHP/sample1/internal.RES b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/internal.RES
similarity index 100%
rename from Demos/psvPHP/sample1/internal.RES
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/internal.RES
diff --git a/Demos/psvPHP/sample1/internal.rc b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/internal.rc
similarity index 96%
rename from Demos/psvPHP/sample1/internal.rc
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/internal.rc
index cdba328..7af5bd7 100644
--- a/Demos/psvPHP/sample1/internal.rc
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/internal.rc
@@ -1,3 +1,3 @@
-php 23 DISCARDABLE php.gif
-zend2 23 DISCARDABLE zend2.gif
-zend1 23 DISCARDABLE zend1.gif
+php 23 DISCARDABLE php.gif
+zend2 23 DISCARDABLE zend2.gif
+zend1 23 DISCARDABLE zend1.gif
diff --git a/Demos/psvPHP/sample1/php.gif b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/php.gif
similarity index 100%
rename from Demos/psvPHP/sample1/php.gif
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/php.gif
diff --git a/Demos/psvPHP/console/test.php b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/test.php
similarity index 85%
rename from Demos/psvPHP/console/test.php
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/test.php
index 62eb52c..f4f3614 100644
--- a/Demos/psvPHP/console/test.php
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/test.php
@@ -1,4 +1,4 @@
-
-
+
+
diff --git a/Demos/psvPHP/sample1/zend1.gif b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/zend1.gif
similarity index 100%
rename from Demos/psvPHP/sample1/zend1.gif
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/zend1.gif
diff --git a/Demos/psvPHP/sample1/zend2.gif b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/zend2.gif
similarity index 100%
rename from Demos/psvPHP/sample1/zend2.gif
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/zend2.gif
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dpr
new file mode 100644
index 0000000..c6f5c16
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dpr
@@ -0,0 +1,14 @@
+program Sample2;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1},
+ PHP4Delphi;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dproj
new file mode 100644
index 0000000..e4d9403
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.dproj
@@ -0,0 +1,105 @@
+
+
+ {16E51842-8708-49A4-B246-6A7FA41BEA1B}
+ Sample2.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Sample2.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Sample2.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Sample2.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.ddp differ
diff --git a/Demos/psvPHP/sample2/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.dfm
similarity index 85%
rename from Demos/psvPHP/sample2/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.dfm
index 13db704..11b602d 100644
--- a/Demos/psvPHP/sample2/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.dfm
@@ -1,77 +1,84 @@
-object Form1: TForm1
- Left = 414
- Top = 391
- Width = 344
- Height = 154
- Caption = 'Form1'
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 40
- Top = 36
- Width = 6
- Height = 13
- Caption = '+'
- end
- object Label2: TLabel
- Left = 140
- Top = 36
- Width = 6
- Height = 13
- Caption = '='
- end
- object Label3: TLabel
- Left = 156
- Top = 36
- Width = 3
- Height = 13
- end
- object Edit1: TEdit
- Left = 8
- Top = 8
- Width = 121
- Height = 21
- TabOrder = 0
- Text = '2'
- end
- object Edit2: TEdit
- Left = 8
- Top = 52
- Width = 121
- Height = 21
- TabOrder = 1
- Text = '2'
- end
- object Button1: TButton
- Left = 244
- Top = 88
- Width = 75
- Height = 25
- Caption = 'Calculate'
- TabOrder = 2
- OnClick = Button1Click
- end
- object psvPHP1: TpsvPHP
- Constants = <>
- Variables = <
- item
- Name = 'x'
- end
- item
- Name = 'y'
- end
- item
- Name = 'z'
- Value = '0'
- end>
- Left = 20
- Top = 80
- end
-end
+object Form1: TForm1
+ Left = 414
+ Top = 391
+ BorderStyle = bsDialog
+ Caption = 'Calculator'
+ ClientHeight = 120
+ ClientWidth = 336
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 40
+ Top = 36
+ Width = 6
+ Height = 13
+ Caption = '+'
+ end
+ object Label2: TLabel
+ Left = 140
+ Top = 36
+ Width = 6
+ Height = 13
+ Caption = '='
+ end
+ object Label3: TLabel
+ Left = 156
+ Top = 36
+ Width = 3
+ Height = 13
+ end
+ object Edit1: TEdit
+ Left = 8
+ Top = 8
+ Width = 121
+ Height = 21
+ TabOrder = 0
+ Text = '2'
+ end
+ object Edit2: TEdit
+ Left = 8
+ Top = 52
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ Text = '2'
+ end
+ object Button1: TButton
+ Left = 244
+ Top = 88
+ Width = 75
+ Height = 25
+ Caption = 'Calculate'
+ TabOrder = 2
+ OnClick = Button1Click
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <
+ item
+ Name = 'x'
+ end
+ item
+ Name = 'y'
+ end
+ item
+ Name = 'z'
+ Value = '0'
+ end>
+ Left = 20
+ Top = 80
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 76
+ Top = 84
+ end
+end
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.pas
new file mode 100644
index 0000000..6e95849
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/Unit1.pas
@@ -0,0 +1,54 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, php4delphi, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP1: TpsvPHP;
+ Edit1: TEdit;
+ Edit2: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Button1: TButton;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ psvPHP1.Variables.Items[0].Value := AnsiString(Edit1.text);
+ psvPHP1.Variables.Items[1].Value := AnsiString(Edit2.text);
+ psvPHP1.RunCode('$z = $x + $y;');
+ Label3.Caption := string(psvPHP1.VariableByName('z').Value);
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample2/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dpr
new file mode 100644
index 0000000..b90060c
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dpr
@@ -0,0 +1,13 @@
+program Sample3;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dproj
new file mode 100644
index 0000000..2a15990
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.dproj
@@ -0,0 +1,105 @@
+
+
+ {F3DB80DF-A660-4692-938A-40B8E527E182}
+ Sample3.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ Sample3.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ Sample3.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Sample3.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.ddp differ
diff --git a/Demos/psvPHP/sample3/Unit1.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.dfm
similarity index 91%
rename from Demos/psvPHP/sample3/Unit1.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.dfm
index 62f3213..e6deda2 100644
--- a/Demos/psvPHP/sample3/Unit1.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.dfm
@@ -1,84 +1,91 @@
-object Form1: TForm1
- Left = 309
- Top = 184
- BorderStyle = bsDialog
- Caption = 'Built-in functions and class sample'
- ClientHeight = 331
- ClientWidth = 460
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- PixelsPerInch = 96
- TextHeight = 13
- object Memo1: TMemo
- Left = 8
- Top = 8
- Width = 329
- Height = 89
- Lines.Strings = (
- 'delphi_Show_Message("Hello, Delphi!");')
- TabOrder = 0
- end
- object Memo2: TMemo
- Left = 8
- Top = 108
- Width = 329
- Height = 89
- Lines.Strings = (
- '$a = new php4delphi_author();'
- '$a->send_email();')
- TabOrder = 1
- end
- object Memo3: TMemo
- Left = 8
- Top = 212
- Width = 329
- Height = 89
- Lines.Strings = (
- 'echo delphi_get_system_directory();')
- TabOrder = 2
- end
- object Button1: TButton
- Left = 364
- Top = 60
- Width = 75
- Height = 25
- Caption = 'Execute'
- TabOrder = 3
- OnClick = Button1Click
- end
- object Button2: TButton
- Left = 364
- Top = 160
- Width = 75
- Height = 25
- Caption = 'Execute'
- TabOrder = 4
- OnClick = Button2Click
- end
- object Button3: TButton
- Left = 372
- Top = 268
- Width = 75
- Height = 25
- Caption = 'Execute'
- TabOrder = 5
- OnClick = Button3Click
- end
- object psvPHP1: TpsvPHP
- Constants = <>
- Variables = <
- item
- Name = 'test'
- Value = 'test'
- end>
- HandleErrors = False
- Left = 112
- Top = 140
- end
-end
+object Form1: TForm1
+ Left = 309
+ Top = 184
+ BorderStyle = bsDialog
+ Caption = 'Built-in functions and class sample'
+ ClientHeight = 331
+ ClientWidth = 460
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 8
+ Top = 8
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ 'delphi_Show_Message("Hello, Delphi!");')
+ TabOrder = 0
+ end
+ object Memo2: TMemo
+ Left = 8
+ Top = 108
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ '$a = new php4delphi_author();'
+ '$a->send_email();')
+ TabOrder = 1
+ end
+ object Memo3: TMemo
+ Left = 8
+ Top = 212
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ 'echo delphi_get_system_directory();')
+ TabOrder = 2
+ end
+ object Button1: TButton
+ Left = 364
+ Top = 60
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 3
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 364
+ Top = 160
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 4
+ OnClick = Button2Click
+ end
+ object Button3: TButton
+ Left = 372
+ Top = 268
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 5
+ OnClick = Button3Click
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <
+ item
+ Name = 'test'
+ Value = 'test'
+ end>
+ Left = 112
+ Top = 140
+ end
+ object PHPEngine: TPHPEngine
+ HandleErrors = False
+ Constants = <>
+ ReportDLLError = False
+ Left = 116
+ Top = 252
+ end
+end
diff --git a/Demos/psvPHP/sample3/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.pas
similarity index 77%
rename from Demos/psvPHP/sample3/Unit1.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.pas
index cef9513..a71263f 100644
--- a/Demos/psvPHP/sample3/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/Unit1.pas
@@ -1,63 +1,77 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit Unit1;
-
-{$I PHP.INC}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows, Messages, SysUtils,
- {$IFDEF VERSION6} Variants, {$ENDIF} Classes, Graphics, Controls, Forms,
- Dialogs, php4delphi, StdCtrls;
-
-type
- TForm1 = class(TForm)
- Memo1: TMemo;
- Memo2: TMemo;
- Memo3: TMemo;
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- psvPHP1: TpsvPHP;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-procedure TForm1.Button1Click(Sender: TObject);
-begin
- psvPHP1.RunCode(Memo1.Lines.text);
-end;
-
-procedure TForm1.Button2Click(Sender: TObject);
-begin
- psvPHP1.RunCode(Memo2.Lines.text);
-end;
-
-procedure TForm1.Button3Click(Sender: TObject);
-begin
- ShowMessage(psvPHP1.RunCode(Memo3.Lines.text));
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{$I PHP.INC}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$IFDEF VERSION6} Variants, {$ENDIF} Classes, Graphics, Controls, Forms,
+ Dialogs, php4delphi, StdCtrls, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Memo3: TMemo;
+ Button1: TButton;
+ Button2: TButton;
+ Button3: TButton;
+ psvPHP1: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure Button3Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.dfm}
+{$R WindowsXP.res}
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ psvPHP1.RunCode(Memo1.Lines.text);
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ psvPHP1.RunCode(Memo2.Lines.text);
+end;
+
+procedure TForm1.Button3Click(Sender: TObject);
+begin
+ ShowMessage(psvPHP1.RunCode(Memo3.Lines.text));
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample3/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/WindowsXP.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/WindowsXP.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.ddp b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.ddp differ
diff --git a/Demos/psvPHP/sample4/frm_PHPTest.dfm b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.dfm
similarity index 91%
rename from Demos/psvPHP/sample4/frm_PHPTest.dfm
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.dfm
index 153e4eb..c7ba0a4 100644
--- a/Demos/psvPHP/sample4/frm_PHPTest.dfm
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.dfm
@@ -1,96 +1,103 @@
-object frmPHPTest: TfrmPHPTest
- Left = 218
- Top = 174
- Width = 590
- Height = 435
- Caption = 'psvPHP test'
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object Splitter1: TSplitter
- Left = 241
- Top = 0
- Width = 3
- Height = 360
- Cursor = crHSplit
- end
- object Panel1: TPanel
- Left = 0
- Top = 360
- Width = 582
- Height = 41
- Align = alBottom
- BevelOuter = bvNone
- TabOrder = 0
- object Panel2: TPanel
- Left = 397
- Top = 0
- Width = 185
- Height = 41
- Align = alRight
- BevelOuter = bvNone
- TabOrder = 0
- object Button1: TButton
- Left = 100
- Top = 8
- Width = 75
- Height = 25
- Caption = 'Execute'
- TabOrder = 0
- OnClick = Button1Click
- end
- end
- end
- object Panel3: TPanel
- Left = 0
- Top = 0
- Width = 241
- Height = 360
- Align = alLeft
- BevelOuter = bvNone
- Caption = 'Panel3'
- TabOrder = 1
- object memoScript: TMemo
- Left = 0
- Top = 0
- Width = 241
- Height = 360
- Align = alClient
- Lines.Strings = (
- 'phpinfo();')
- ScrollBars = ssBoth
- TabOrder = 0
- end
- end
- object Panel4: TPanel
- Left = 244
- Top = 0
- Width = 338
- Height = 360
- Align = alClient
- BevelOuter = bvNone
- Caption = 'Panel4'
- TabOrder = 2
- object MemoResult: TMemo
- Left = 0
- Top = 0
- Width = 338
- Height = 360
- Align = alClient
- ScrollBars = ssBoth
- TabOrder = 0
- end
- end
- object psvPHP: TpsvPHP
- Constants = <>
- Variables = <>
- Left = 84
- Top = 148
- end
-end
+object frmPHPTest: TfrmPHPTest
+ Left = 422
+ Top = 286
+ Width = 590
+ Height = 435
+ Caption = 'psvPHP test'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 241
+ Top = 0
+ Width = 3
+ Height = 360
+ Cursor = crHSplit
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 360
+ Width = 582
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 397
+ Top = 0
+ Width = 185
+ Height = 41
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Button1: TButton
+ Left = 100
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 0
+ Width = 241
+ Height = 360
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ TabOrder = 1
+ object memoScript: TMemo
+ Left = 0
+ Top = 0
+ Width = 241
+ Height = 360
+ Align = alClient
+ Lines.Strings = (
+ 'phpinfo();')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ end
+ object Panel4: TPanel
+ Left = 244
+ Top = 0
+ Width = 338
+ Height = 360
+ Align = alClient
+ BevelOuter = bvNone
+ Caption = 'Panel4'
+ TabOrder = 2
+ object MemoResult: TMemo
+ Left = 0
+ Top = 0
+ Width = 338
+ Height = 360
+ Align = alClient
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ end
+ object psvPHP: TpsvPHP
+ Variables = <>
+ Left = 84
+ Top = 148
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 80
+ Top = 248
+ end
+end
diff --git a/Demos/psvPHP/sample4/frm_PHPTest.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.pas
similarity index 64%
rename from Demos/psvPHP/sample4/frm_PHPTest.pas
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.pas
index 7e6750f..6227652 100644
--- a/Demos/psvPHP/sample4/frm_PHPTest.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/frm_PHPTest.pas
@@ -1,39 +1,53 @@
-unit frm_PHPTest;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- php4delphi, StdCtrls, ExtCtrls;
-
-type
- TfrmPHPTest = class(TForm)
- Panel1: TPanel;
- Panel2: TPanel;
- Button1: TButton;
- Panel3: TPanel;
- Splitter1: TSplitter;
- Panel4: TPanel;
- memoScript: TMemo;
- MemoResult: TMemo;
- psvPHP: TpsvPHP;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- frmPHPTest: TfrmPHPTest;
-
-implementation
-
-{$R *.DFM}
-
-procedure TfrmPHPTest.Button1Click(Sender: TObject);
-begin
- MemoResult.Text := psvPHP.RunCode(memoScript.Text);
-end;
-
-end.
+unit frm_PHPTest;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ php4delphi, StdCtrls, ExtCtrls, PHPCommon;
+
+type
+ TfrmPHPTest = class(TForm)
+ Panel1: TPanel;
+ Panel2: TPanel;
+ Button1: TButton;
+ Panel3: TPanel;
+ Splitter1: TSplitter;
+ Panel4: TPanel;
+ memoScript: TMemo;
+ MemoResult: TMemo;
+ psvPHP: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmPHPTest: TfrmPHPTest;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmPHPTest.Button1Click(Sender: TObject);
+begin
+ MemoResult.Text := psvPHP.RunCode(memoScript.Text);
+end;
+
+procedure TfrmPHPTest.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmPHPTest.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Demos/psvPHP/sample4/psvPHP_test.dpr b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dpr
similarity index 94%
rename from Demos/psvPHP/sample4/psvPHP_test.dpr
rename to Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dpr
index ad20b28..b15444a 100644
--- a/Demos/psvPHP/sample4/psvPHP_test.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dpr
@@ -1,13 +1,13 @@
-program psvPHP_test;
-
-uses
- Forms,
- frm_PHPTest in 'frm_PHPTest.pas' {frmPHPTest};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TfrmPHPTest, frmPHPTest);
- Application.Run;
-end.
+program psvPHP_test;
+
+uses
+ Forms,
+ frm_PHPTest in 'frm_PHPTest.pas' {frmPHPTest};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmPHPTest, frmPHPTest);
+ Application.Run;
+end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dproj
new file mode 100644
index 0000000..f733c63
--- /dev/null
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.dproj
@@ -0,0 +1,105 @@
+
+
+ {94D56EFB-C720-4470-B405-9E63F8B63477}
+ psvPHP_test.dpr
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ x86
+ psvPHP_test.exe
+ false
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ psvPHP_test.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample4/psvPHP_test.res differ
diff --git a/Source/Demos/Bonus/JpegConverter/php_jpeg.bdsproj b/Source/Demos/Bonus/JpegConverter/php_jpeg.bdsproj
new file mode 100644
index 0000000..57df14a
--- /dev/null
+++ b/Source/Demos/Bonus/JpegConverter/php_jpeg.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {DAE5A84E-3F11-42AB-A514-F9A8C6139C56}
+
+
+
+
+ php_jpeg.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/Bonus/JpegConverter/php_jpeg.dpr b/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
similarity index 91%
rename from Demos/Bonus/JpegConverter/php_jpeg.dpr
rename to Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
index 9e02784..4ab728d 100644
--- a/Demos/Bonus/JpegConverter/php_jpeg.dpr
+++ b/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
@@ -1,278 +1,289 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: php_jpeg.dpr,v 6.2 02/2006 delphi32 Exp $ }
-{$I PHP.INC}
-
-library php_jpeg;
-
-uses
- Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, jpeg, graphics,
- Classes;
-
-
-procedure Bmp2Jpg(ABitmap : TBitmap; AJpeg : TJpegImage);
-begin
- if not Assigned(ABitmap) then
- Exit;
-
- if not Assigned(AJPeg) then
- Exit;
-
- AJPeg.Assign(ABitmap);
-end;
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('JPEG support'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-{$IFDEF PHP510}
-procedure convert_bmp_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure convert_bmp_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- bmpName : PChar;
- JpgName : PChar;
- param : pzval_array;
- Bitmap : TBitmap;
- Jpg : TJPEGImage;
-begin
- if ht <> 2 then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- bmpName := param[0]^.value.str.val;
- JpgName := param[1]^.value.str.val;
- dispose_pzval_array(param);
-
- if not FileExists(bmpName) then
- begin
- ZVAL_FALSE(return_value);
- exit;
- end;
-
- try
- BitMap := TBitmap.Create;
- Bitmap.LoadFromFile(bmpName);
- Jpg := TJPegImage.Create;
- Bmp2Jpg(Bitmap, Jpg);
- Jpg.SaveToFile(JpgName);
- ZVAL_TRUE(return_value);
- except
- ZVAL_FALSE(return_value);
- end;
-end;
-
-
-{$IFDEF PHP510}
-procedure show_bmp_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure show_bmp_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- bmpName : PChar;
- param : pzval_array;
- Bitmap : TBitmap;
- Jpg : TJPEGImage;
- MS : TMemoryStream;
- _content_type : PChar;
-begin
- if ht <> 1 then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- bmpName := param[0]^.value.str.val;
- dispose_pzval_array(param);
- if not FileExists(bmpName) then
- begin
- ZVAL_FALSE(return_value);
- Exit;
- end;
-
- try
- BitMap := TBitmap.Create;
- Bitmap.LoadFromFile(bmpName);
- Jpg := TJPegImage.Create;
- Bmp2Jpg(Bitmap, Jpg);
- MS := TMemoryStream.Create;
- Jpg.SaveToStream(MS);
- _content_type := 'Content-type: image/jpeg';
- sapi_add_header_ex(_content_type, strlen(_content_type), true, true, TSRMLS_DC);
- php_body_write(MS.Memory, MS.Size, TSRMLS_DC);
- MS.Free;
- ZVAL_TRUE(return_value);
- except
- ZVAL_FALSE(return_value);
- end;
-end;
-
-
-{$IFDEF PHP510}
-procedure sign_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure sign_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- JpgName : PChar;
- FontName : PChar;
- Color : TColor;
- Size : integer;
- X : integer;
- Y : integer;
- Sign : PChar;
-
- param : pzval_array;
- Jpg : TJPEGImage;
- Bmp : TBitmap;
-
- MS : TMemoryStream;
- _content_type : PChar;
-
-begin
- if ht <> 7 then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- JpgName := param[0]^.value.str.val;
- FontName := param[1]^.value.str.val;
- Color := param[2]^.value.lval;
- Size := param[3]^.value.lval;
- X := param[4]^.value.lval;
- Y := param[5]^.value.lval;
- Sign := param[6]^.value.str.val;
-
- dispose_pzval_array(param);
-
- if not FileExists(JpgName) then
- begin
- ZVAL_FALSE(return_value);
- Exit;
- end;
-
- try
- Jpg := TJpegImage.Create;
- Jpg.LoadFromFile(JpgName);
- Bmp := TBitmap.Create;
- Bmp.Assign(JPG);
- Bmp.Canvas.Font.Name := FontName;
- Bmp.Canvas.Font.Size := Size;
- Bmp.canvas.Font.Color := Color;
- Bmp.Canvas.Pen.Style := psClear;
- Bmp.Canvas.Brush.Style := bsClear;
- Bmp.Canvas.TextOut(X, Y, Sign);
- Jpg.Assign(bmp);
- Bmp.Free;
- MS := TMemoryStream.Create;
- Jpg.SaveToStream(MS);
- _content_type := 'Content-type: image/jpeg';
- sapi_add_header_ex(_content_type, strlen(_content_type), true, true, TSRMLS_DC);
- php_body_write(MS.Memory, MS.Size, TSRMLS_DC);
- MS.Free;
- ZVAL_TRUE(return_value);
- except
- ZVAL_FALSE(return_value);
- end;
-end;
-
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..3] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'php_jpeg';
- ModuleEntry.version := '1.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
-
- Module_entry_table[0].fname := 'convert_bmp_jpeg';
- Module_entry_table[0].handler := @convert_bmp_jpeg;
-
- Module_entry_table[1].fname := 'show_bmp_jpeg';
- Module_entry_table[1].handler := @show_bmp_jpeg;
-
- Module_entry_table[2].fname := 'sign_jpeg';
- Module_entry_table[2].handler := @sign_jpeg;
-
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- Result := @ModuleEntry;
-end;
-
-
-
-exports
- get_module;
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{ $Id: php_jpeg.dpr,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library php_jpeg;
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, jpeg, graphics,
+ Classes;
+
+
+procedure Bmp2Jpg(ABitmap : TBitmap; AJpeg : TJpegImage);
+begin
+ if not Assigned(ABitmap) then
+ Exit;
+
+ if not Assigned(AJPeg) then
+ Exit;
+
+ AJPeg.Assign(ABitmap);
+end;
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('JPEG support'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure convert_bmp_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure convert_bmp_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ bmpName : PAnsiChar;
+ JpgName : PAnsiChar;
+ param : pzval_array;
+ Bitmap : TBitmap;
+ Jpg : TJPEGImage;
+begin
+ if ht <> 2 then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ bmpName := param[0]^.value.str.val;
+ JpgName := param[1]^.value.str.val;
+ dispose_pzval_array(param);
+
+ if not FileExists(bmpName) then
+ begin
+ ZVAL_FALSE(return_value);
+ exit;
+ end;
+
+ try
+ BitMap := TBitmap.Create;
+ Bitmap.LoadFromFile(bmpName);
+ Jpg := TJPegImage.Create;
+ Bmp2Jpg(Bitmap, Jpg);
+ Jpg.SaveToFile(JpgName);
+ ZVAL_TRUE(return_value);
+ except
+ ZVAL_FALSE(return_value);
+ end;
+end;
+
+
+{$IFDEF PHP510}
+procedure show_bmp_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure show_bmp_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ bmpName : PAnsiChar;
+ param : pzval_array;
+ Bitmap : TBitmap;
+ Jpg : TJPEGImage;
+ MS : TMemoryStream;
+ _content_type : PAnsiChar;
+begin
+ if ht <> 1 then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ bmpName := param[0]^.value.str.val;
+ dispose_pzval_array(param);
+ if not FileExists(bmpName) then
+ begin
+ ZVAL_FALSE(return_value);
+ Exit;
+ end;
+
+ try
+ BitMap := TBitmap.Create;
+ Bitmap.LoadFromFile(bmpName);
+ Jpg := TJPegImage.Create;
+ Bmp2Jpg(Bitmap, Jpg);
+ MS := TMemoryStream.Create;
+ Jpg.SaveToStream(MS);
+ _content_type := 'Content-type: image/jpeg';
+ sapi_add_header_ex(_content_type, strlen(_content_type), true, true, TSRMLS_DC);
+ php_body_write(MS.Memory, MS.Size, TSRMLS_DC);
+ MS.Free;
+ ZVAL_TRUE(return_value);
+ except
+ ZVAL_FALSE(return_value);
+ end;
+end;
+
+
+{$IFDEF PHP510}
+procedure sign_jpeg (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure sign_jpeg (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ JpgName : PAnsiChar;
+ FontName : PAnsiChar;
+ Color : TColor;
+ Size : integer;
+ X : integer;
+ Y : integer;
+ Sign : PAnsiChar;
+
+ param : pzval_array;
+ Jpg : TJPEGImage;
+ Bmp : TBitmap;
+
+ MS : TMemoryStream;
+ _content_type : PAnsiChar;
+
+begin
+ if ht <> 7 then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ JpgName := param[0]^.value.str.val;
+ FontName := param[1]^.value.str.val;
+ Color := param[2]^.value.lval;
+ Size := param[3]^.value.lval;
+ X := param[4]^.value.lval;
+ Y := param[5]^.value.lval;
+ Sign := param[6]^.value.str.val;
+
+ dispose_pzval_array(param);
+
+ if not FileExists(JpgName) then
+ begin
+ ZVAL_FALSE(return_value);
+ Exit;
+ end;
+
+ try
+ Jpg := TJpegImage.Create;
+ Jpg.LoadFromFile(JpgName);
+ Bmp := TBitmap.Create;
+ Bmp.Assign(JPG);
+ Bmp.Canvas.Font.Name := FontName;
+ Bmp.Canvas.Font.Size := Size;
+ Bmp.canvas.Font.Color := Color;
+ Bmp.Canvas.Pen.Style := psClear;
+ Bmp.Canvas.Brush.Style := bsClear;
+ Bmp.Canvas.TextOut(X, Y, Sign);
+ Jpg.Assign(bmp);
+ Bmp.Free;
+ MS := TMemoryStream.Create;
+ Jpg.SaveToStream(MS);
+ _content_type := 'Content-type: image/jpeg';
+ sapi_add_header_ex(_content_type, strlen(_content_type), true, true, TSRMLS_DC);
+ php_body_write(MS.Memory, MS.Size, TSRMLS_DC);
+ MS.Free;
+ ZVAL_TRUE(return_value);
+ except
+ ZVAL_FALSE(return_value);
+ end;
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..3] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'php_jpeg';
+ ModuleEntry.version := '1.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+
+ Module_entry_table[0].fname := 'convert_bmp_jpeg';
+ Module_entry_table[0].handler := @convert_bmp_jpeg;
+
+ Module_entry_table[1].fname := 'show_bmp_jpeg';
+ Module_entry_table[1].handler := @show_bmp_jpeg;
+
+ Module_entry_table[2].fname := 'sign_jpeg';
+ Module_entry_table[2].handler := @sign_jpeg;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Demos/Bonus/JpegConverter/php_jpeg.php b/Source/Demos/Bonus/JpegConverter/php_jpeg.php
similarity index 95%
rename from Demos/Bonus/JpegConverter/php_jpeg.php
rename to Source/Demos/Bonus/JpegConverter/php_jpeg.php
index 09531ec..bfcc65b 100644
--- a/Demos/Bonus/JpegConverter/php_jpeg.php
+++ b/Source/Demos/Bonus/JpegConverter/php_jpeg.php
@@ -1,16 +1,16 @@
-
- $j = $_SERVER['DOCUMENT_ROOT'] . "/test.jpg";
- $b = $_SERVER['DOCUMENT_ROOT'] . "/test.bmp";
-
- //show_bmp_jpeg($b);
-
- //convert_bmp_jpeg($b, $j);
-
- $color = 0xFFFFFF;
- $fontname = "Arial Bold";
- $fontsize = 10;
- $x = 10;
- $y = 10;
- sign_jpeg($j, $fontname, $color, $fontsize, $x, $y, "Signed by Me");
-
-?>
+
+ $j = $_SERVER['DOCUMENT_ROOT'] . "/test.jpg";
+ $b = $_SERVER['DOCUMENT_ROOT'] . "/test.bmp";
+
+ //show_bmp_jpeg($b);
+
+ //convert_bmp_jpeg($b, $j);
+
+ $color = 0xFFFFFF;
+ $fontname = "Arial Bold";
+ $fontsize = 10;
+ $x = 10;
+ $y = 10;
+ sign_jpeg($j, $fontname, $color, $fontsize, $x, $y, "Signed by Me");
+
+?>
diff --git a/Source/Demos/Bonus/PHPEncoder/phpencoder.bdsproj b/Source/Demos/Bonus/PHPEncoder/phpencoder.bdsproj
new file mode 100644
index 0000000..26ef967
--- /dev/null
+++ b/Source/Demos/Bonus/PHPEncoder/phpencoder.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {FC2567E0-D12E-4A20-9D73-79C5FCCFE731}
+
+
+
+
+ phpencoder.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/Bonus/PHPEncoder/phpencoder.dpr b/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
similarity index 86%
rename from Demos/Bonus/PHPEncoder/phpencoder.dpr
rename to Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
index 21c37f5..93396ad 100644
--- a/Demos/Bonus/PHPEncoder/phpencoder.dpr
+++ b/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
@@ -1,98 +1,107 @@
-library phpencoder;
-
-{$I PHP.INC}
-
-uses
- Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, Classes;
-
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('php encryption'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-{$IFDEF PHP510}
-procedure ex_dec(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure ex_dec(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- FileName : PChar;
- S : TFileStream;
- st : string;
- i : integer;
-begin
- FileName := zend_get_executed_filename(TSRMLS_DC);
-
- S := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone);
- SetLength(St, S.Size);
- S.Read(St[1], S.Size);
- S.Free;
- i := pos('?>', St);
- Delete(St, 1, I + 1);
- //Now st contains encrypted string
- //encryption is very simple: xor
- for i := 1 to length(st) do
- if (st[i] <> #10) and (st[i] <> #13) then
- st[i] := chr ( ord(st[i]) xor 8);
- zend_eval_string(PChar(st), nil, 'decoded', TSRMLS_DC);
-end;
-
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..1] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'phpencoder';
- ModuleEntry.version := '0.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- Module_entry_table[0].fname := 'ex_dec';
- Module_entry_table[0].handler := @ex_dec;
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- Result := @ModuleEntry;
-end;
-
-
-
-exports
- get_module;
-
-end.
-
+library phpencoder;
+
+{$I PHP.INC}
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, Classes;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('php encryption'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure ex_dec(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure ex_dec(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ FileName : PAnsiChar;
+ S : TFileStream;
+ st : string;
+ i : integer;
+begin
+ FileName := zend_get_executed_filename(TSRMLS_DC);
+
+ S := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone);
+ SetLength(St, S.Size);
+ S.Read(St[1], S.Size);
+ S.Free;
+ i := pos('?>', St);
+ Delete(St, 1, I + 1);
+ //Now st contains encrypted string
+ //encryption is very simple: xor
+ for i := 1 to length(st) do
+ if (st[i] <> #10) and (st[i] <> #13) then
+ st[i] := chr ( ord(st[i]) xor 8);
+ zend_eval_string(PAnsiChar(st), nil, 'decoded', TSRMLS_DC);
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'phpencoder';
+ ModuleEntry.version := '0.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ Module_entry_table[0].fname := 'ex_dec';
+ Module_entry_table[0].handler := @ex_dec;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Demos/Bonus/PHPEncoder/test.php b/Source/Demos/Bonus/PHPEncoder/test.php
similarity index 92%
rename from Demos/Bonus/PHPEncoder/test.php
rename to Source/Demos/Bonus/PHPEncoder/test.php
index f3f0d07..d1edd8b 100644
--- a/Demos/Bonus/PHPEncoder/test.php
+++ b/Source/Demos/Bonus/PHPEncoder/test.php
@@ -1,5 +1,5 @@
-
- dl('phpencoder.dll');
- ex_dec();
-?>
+
+ dl('phpencoder.dll');
+ ex_dec();
+?>
x`xafng !3
\ No newline at end of file
diff --git a/Demos/Bonus/phpRegistry/Bin/php_registry.dll b/Source/Demos/Bonus/phpRegistry/Bin/php_registry.dll
similarity index 100%
rename from Demos/Bonus/phpRegistry/Bin/php_registry.dll
rename to Source/Demos/Bonus/phpRegistry/Bin/php_registry.dll
diff --git a/Demos/Bonus/phpRegistry/php_registry.dpr b/Source/Demos/Bonus/phpRegistry/php_registry.dpr
similarity index 92%
rename from Demos/Bonus/phpRegistry/php_registry.dpr
rename to Source/Demos/Bonus/phpRegistry/php_registry.dpr
index 8509823..39319e2 100644
--- a/Demos/Bonus/phpRegistry/php_registry.dpr
+++ b/Source/Demos/Bonus/phpRegistry/php_registry.dpr
@@ -1,646 +1,610 @@
-library php_registry;
-
-{$I PHP.INC}
-
-uses
- Windows, ZendTypes, ZENDAPI, PHPTypes, PHPAPI;
-
- const
- NAME_HKEY_CLASSES_ROOT = 'HKEY_CLASSES_ROOT';
- NAME_HKEY_CURRENT_USER = 'HKEY_CURRENT_USER';
- NAME_HKEY_LOCAL_MACHINE = 'HKEY_LOCAL_MACHINE';
- NAME_HKEY_USERS = 'HKEY_USERS';
- NAME_HKEY_PERFORMANCE_DATA = 'HKEY_PERFORMANCE_DATA';
- NAME_HKEY_CURRENT_CONFIG = 'HKEY_CURRENT_CONFIG';
- NAME_HKEY_DYN_DATA = 'HKEY_DYN_DATA';
-
-function StrLen(const Str: PChar): Cardinal; assembler;
-asm
- MOV EDX,EDI
- MOV EDI,EAX
- MOV ECX,0FFFFFFFFH
- XOR AL,AL
- REPNE SCASB
- MOV EAX,0FFFFFFFEH
- SUB EAX,ECX
- MOV EDI,EDX
-end;
-
-function int2HKEY(i : integer) : HKEY;
-begin
- case i of
- 0 : Result := HKEY_CLASSES_ROOT;
- 1 : Result := HKEY_CURRENT_USER;
- 2 : Result := HKEY_LOCAL_MACHINE;
- 3 : Result := HKEY_USERS;
- 4 : Result := HKEY_PERFORMANCE_DATA;
- 5 : Result := HKEY_CURRENT_CONFIG;
- else
- Result := HKEY_DYN_DATA;
- end;
-end;
-
-
-function RelativeKey(const Key: string): PChar;
-begin
- Result := PChar(Key);
- if (Key <> '') and (Key[1] = '\') then
- Inc(Result);
-end;
-
-function RegCreateKey(const RootKey: HKEY; const Key, Value: string): Longint;
-begin
- Result := RegSetValue(RootKey, RelativeKey(Key), REG_SZ, PChar(Value), Length(Value));
-end;
-
-function RegDeleteEntry(const RootKey: HKEY; const Key, Name: string): Boolean;
-var
- RegKey: HKEY;
-begin
- Result := False;
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
- begin
- Result := RegDeleteValue(RegKey, PChar(Name)) = ERROR_SUCCESS;
- RegCloseKey(RegKey);
- end;
-end;
-
-
-function RegDeleteKeyTree(const RootKey: HKEY; const Key: string): Boolean;
-var
- RegKey: HKEY;
- I: DWORD;
- Size: DWORD;
- NumSubKeys: DWORD;
- MaxSubKeyLen: DWORD;
- KeyName: string;
-begin
- Result := RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_ALL_ACCESS, RegKey) = ERROR_SUCCESS;
- if Result then
- begin
- RegQueryInfoKey(RegKey, nil, nil, nil, @NumSubKeys, @MaxSubKeyLen, nil, nil, nil, nil, nil, nil);
- if NumSubKeys <> 0 then
- for I := NumSubKeys-1 downto 0 do
- begin
- Size := MaxSubKeyLen+1;
- SetLength(KeyName, Size);
- RegEnumKeyEx(RegKey, I, PChar(KeyName), Size, nil, nil, nil, nil);
- SetLength(KeyName, StrLen(PChar(KeyName)));
- Result := RegDeleteKeyTree(RootKey, Key + '\' + KeyName);
- if not Result then
- Break;
- end;
- RegCloseKey(RegKey);
- if Result then
- Result := Windows.RegDeleteKey(RootKey, RelativeKey(Key)) = ERROR_SUCCESS;
- end
-end;
-
-
-function RegReadInteger(const RootKey: HKEY; const Key, Name: string): Integer;
-var
- RegKey: HKEY;
- Size: DWORD;
- IntVal: Integer;
- RegKind: DWORD;
- Ret: Longint;
-begin
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
- begin
- RegKind := 0;
- Size := SizeOf(Integer);
- Ret := RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, @IntVal, @Size);
- RegCloseKey(RegKey);
- if Ret = ERROR_SUCCESS then
- begin
- if RegKind = REG_DWORD then
- Result := IntVal
- else
- Result := -1;
- end
- else
- Result := -1;
- end
- else
- Result := -1;
-end;
-
-function RegReadBool(const RootKey: HKEY; const Key, Name: string): Boolean;
-begin
- Result := RegReadInteger(RootKey, Key, Name) <> 0;
-end;
-
-
-function RegReadString(const RootKey: HKEY; const Key, Name: string): string;
-var
- RegKey: HKEY;
- Size: DWORD;
- StrVal: string;
- RegKind: DWORD;
- Ret: Longint;
-begin
- Result := '';
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
- begin
- RegKind := 0;
- Size := 0;
- Ret := RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, nil, @Size);
- if Ret = ERROR_SUCCESS then
- if RegKind in [REG_SZ, REG_EXPAND_SZ] then
- begin
- SetLength(StrVal, Size);
- RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, PByte(StrVal), @Size);
- SetLength(StrVal, StrLen(PChar(StrVal)));
- Result := StrVal;
- end;
- RegCloseKey(RegKey);
- end;
-end;
-
-
-procedure RegWriteInteger(const RootKey: HKEY; const Key, Name: string; Value: Integer);
-var
- RegKey: HKEY;
-begin
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
- begin
- RegSetValueEx(RegKey, PChar(Name), 0, REG_DWORD, @Value, SizeOf(Integer));
- RegCloseKey(RegKey);
- end
-end;
-
-procedure RegWriteBool(const RootKey: HKEY; const Key, Name: string; Value: Boolean);
-begin
- RegWriteInteger(RootKey, Key, Name, Ord(Value));
-end;
-
-
-procedure RegWriteString(const RootKey: HKEY; const Key, Name, Value: string);
-var
- RegKey: HKEY;
-begin
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
- begin
- RegSetValueEx(RegKey, PChar(Name), 0, REG_SZ, PChar(Value), Length(Value)+1);
- RegCloseKey(RegKey);
- end
-end;
-
-
-function RegHasSubKeys(const RootKey: HKEY; const Key: string): Boolean;
-var
- RegKey: HKEY;
- NumSubKeys: Integer;
-begin
- Result := False;
- if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
- begin
- RegQueryInfoKey(RegKey, nil, nil, nil, @NumSubKeys, nil, nil, nil, nil, nil, nil, nil);
- Result := NumSubKeys <> 0;
- RegCloseKey(RegKey);
- end
-end;
-
-
-function RegKeyExists(const RootKey: HKEY; const Key: string): Boolean;
-var
- RegKey: HKEY;
-begin
- Result := (RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS);
- if Result then RegCloseKey(RegKey);
-end;
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('Windows registry support'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- zend_register_long_constant(PChar(NAME_HKEY_CLASSES_ROOT), strlen(PChar(NAME_HKEY_CLASSES_ROOT)) + 1, 0,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_CURRENT_USER), strlen(PChar(NAME_HKEY_CURRENT_USER)) + 1, 1,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_LOCAL_MACHINE), strlen(PChar(NAME_HKEY_LOCAL_MACHINE)) + 1, 2,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_USERS), strlen(PChar(NAME_HKEY_USERS)) + 1, 3,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_PERFORMANCE_DATA), strlen(PChar(NAME_HKEY_PERFORMANCE_DATA)) + 1, 4,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_CURRENT_CONFIG), strlen(PChar(NAME_HKEY_CURRENT_CONFIG)) + 1, 5,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- zend_register_long_constant(PChar(NAME_HKEY_DYN_DATA), strlen(PChar(NAME_HKEY_DYN_DATA)) + 1, 6,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-//function RegCreateKey(const RootKey: HKEY; const Key, Value: string): Longint;
-{$IFDEF PHP510}
-procedure php_RegCreateKey(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegCreateKey(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Value : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Value := param[2]^.value.str.val;
- ZVAL_LONG(return_value, RegCreateKey(RootKey, Key, Value));
- dispose_pzval_array(param);
-end;
-
-
-//function RegDeleteEntry(const RootKey: HKEY; const Key, Name: string): Boolean;
-{$IFDEF PHP510}
-procedure php_RegDeleteEntry(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegDeleteEntry(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Name : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- ZVAL_BOOL(return_value, RegDeleteEntry(RootKey, Key, Name));
- dispose_pzval_array(param);
-end;
-
-//function RegDeleteKeyTree(const RootKey: HKEY; const Key: string): Boolean;
-{$IFDEF PHP510}
-procedure php_RegDeleteKeyTree(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegDeleteKeyTree(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- ZVAL_BOOL(return_value, RegDeleteKeyTree(RootKey, Key));
- dispose_pzval_array(param);
-end;
-
-//function RegReadBool(const RootKey: HKEY; const Key, Name: string): Boolean;
-{$IFDEF PHP510}
-procedure php_RegReadBool(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegReadBool(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Name : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- ZVAL_BOOL(return_value, RegReadBool(RootKey, Key, Name));
- dispose_pzval_array(param);
-end;
-
-//function RegReadInteger(const RootKey: HKEY; const Key, Name: string): Integer;
-{$IFDEF PHP510}
-procedure php_RegReadInteger(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegReadInteger(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Name : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- ZVAL_LONG(return_value, RegReadInteger(RootKey, Key, Name));
- dispose_pzval_array(param);
-end;
-
-//function RegReadString(const RootKey: HKEY; const Key, Name: string): string;
-{$IFDEF PHP510}
-procedure php_RegReadString(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegReadString(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- RootKey : HKEY;
- Key : string;
- Name : string;
- param : pzval_array;
- st : string;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- st := regReadString(RootKey, Key, Name);
- ZVAL_STRING(return_value, PChar(st), true);
- dispose_pzval_array(param);
-end;
-
-//procedure RegWriteBool(const RootKey: HKEY; const Key, Name: string; Value: Boolean);
-{$IFDEF PHP510}
-procedure php_RegWriteBool(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegWriteBool(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- RootKey : HKEY;
- Key : string;
- Name : string;
- Value : boolean;
- param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- Value := Boolean(param[3]^.value.lval);
- RegWriteBool(RootKey, Key, Name, Value);
- dispose_pzval_array(param);
-end;
-
-//procedure RegWriteInteger(const RootKey: HKEY; const Key, Name: string; Value: Integer);
-{$IFDEF PHP510}
-procedure php_RegWriteInteger(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegWriteInteger(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Name : string;
-Value : integer;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- Value := param[3]^.value.lval;
- RegWriteInteger(RootKey, Key, Name, Value);
- dispose_pzval_array(param);
-end;
-
-//procedure RegWriteString(const RootKey: HKEY; const Key, Name, Value: string);
-{$IFDEF PHP510}
-procedure php_RegWriteString(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegWriteString(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-Name : string;
-Value : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- Name := param[2]^.value.str.val;
- Value := param[3]^.value.str.val;
- RegWriteString(RootKey, Key, Name, Value);
- dispose_pzval_array(param);
-end;
-
-//function RegHasSubKeys(const RootKey: HKEY; const Key: string): Boolean;
-{$IFDEF PHP510}
-procedure php_RegHasSubKeys(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegHasSubKeys(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- ZVAL_BOOL(return_value, RegHasSubKeys(RootKey, Key));
- dispose_pzval_array(param);
-end;
-
-//function RegKeyExists(const RootKey: HKEY; const Key: string): Boolean;
-{$IFDEF PHP510}
-procedure php_RegKeyExists(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure php_RegKeyExists(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
-RootKey : HKEY;
-Key : string;
-param : pzval_array;
-begin
- if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- RootKey := Int2HKey(param[0]^.value.lval);
- Key := param[1]^.value.str.val;
- ZVAL_BOOL(return_value, RegKeyExists(RootKey, Key));
- dispose_pzval_array(param);
-end;
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..11] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'php_registry';
- ModuleEntry.version := '1.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
-
- module_entry_table[0].fname := 'regcreatekey';
- module_entry_table[0].handler := @php_regcreatekey;
- {$IFDEF PHP4}
- module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[1].fname := 'regdeleteentry';
- module_entry_table[1].handler := @php_regdeleteentry;
- {$IFDEF PHP4}
- module_entry_table[1].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[2].fname := 'regdeletekeytree';
- module_entry_table[2].handler := @php_regdeletekeytree;
- {$IFDEF PHP4}
- module_entry_table[2].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[3].fname := 'reghassubkeys';
- module_entry_table[3].handler := @php_reghassubkeys;
- {$IFDEF PHP4}
- module_entry_table[3].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[4].fname := 'regkeyexists';
- module_entry_table[4].handler := @php_regkeyexists;
- {$IFDEF PHP4}
- module_entry_table[4].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[5].fname := 'regreadbool';
- module_entry_table[5].handler := @php_regreadbool;
- {$IFDEF PHP4}
- module_entry_table[5].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[6].fname := 'regreadinteger';
- module_entry_table[6].handler := @php_regreadinteger;
- {$IFDEF PHP4}
- module_entry_table[6].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[7].fname := 'regreadstring';
- module_entry_table[7].handler := @php_regreadstring;
- {$IFDEF PHP4}
- module_entry_table[7].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[8].fname := 'regwritebool';
- module_entry_table[8].handler := @php_regwritebool;
- {$IFDEF PHP4}
- module_entry_table[8].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[9].fname := 'regwriteinteger';
- module_entry_table[9].handler := @php_regwriteinteger;
- {$IFDEF PHP4}
- module_entry_table[9].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[10].fname := 'regwritestring';
- module_entry_table[10].handler := @php_regwritestring;
- {$IFDEF PHP4}
- module_entry_table[10].func_arg_types := nil;
- {$ENDIF}
-
- module_entry_table[11].fname := nil;
- module_entry_table[11].handler := nil;
- {$IFDEF PHP4}
- module_entry_table[11].func_arg_types := nil;
- {$ENDIF}
-
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
-
- result := @ModuleEntry;
-end;
-
-
-exports
- get_module;
-
-end.
-
+library php_registry;
+
+{$I PHP.INC}
+
+uses
+ Windows, ZendTypes, ZENDAPI, PHPTypes, PHPAPI;
+
+ const
+ NAME_HKEY_CLASSES_ROOT = 'HKEY_CLASSES_ROOT';
+ NAME_HKEY_CURRENT_USER = 'HKEY_CURRENT_USER';
+ NAME_HKEY_LOCAL_MACHINE = 'HKEY_LOCAL_MACHINE';
+ NAME_HKEY_USERS = 'HKEY_USERS';
+ NAME_HKEY_PERFORMANCE_DATA = 'HKEY_PERFORMANCE_DATA';
+ NAME_HKEY_CURRENT_CONFIG = 'HKEY_CURRENT_CONFIG';
+ NAME_HKEY_DYN_DATA = 'HKEY_DYN_DATA';
+
+function StrLen(const Str: PChar): Cardinal; assembler;
+asm
+ MOV EDX,EDI
+ MOV EDI,EAX
+ MOV ECX,0FFFFFFFFH
+ XOR AL,AL
+ REPNE SCASB
+ MOV EAX,0FFFFFFFEH
+ SUB EAX,ECX
+ MOV EDI,EDX
+end;
+
+function int2HKEY(i : integer) : HKEY;
+begin
+ case i of
+ 0 : Result := HKEY_CLASSES_ROOT;
+ 1 : Result := HKEY_CURRENT_USER;
+ 2 : Result := HKEY_LOCAL_MACHINE;
+ 3 : Result := HKEY_USERS;
+ 4 : Result := HKEY_PERFORMANCE_DATA;
+ 5 : Result := HKEY_CURRENT_CONFIG;
+ else
+ Result := HKEY_DYN_DATA;
+ end;
+end;
+
+
+function RelativeKey(const Key: string): PChar;
+begin
+ Result := PChar(Key);
+ if (Key <> '') and (Key[1] = '\') then
+ Inc(Result);
+end;
+
+function RegCreateKey(const RootKey: HKEY; const Key, Value: string): Longint;
+begin
+ Result := RegSetValue(RootKey, RelativeKey(Key), REG_SZ, PChar(Value), Length(Value));
+end;
+
+function RegDeleteEntry(const RootKey: HKEY; const Key, Name: string): Boolean;
+var
+ RegKey: HKEY;
+begin
+ Result := False;
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
+ begin
+ Result := RegDeleteValue(RegKey, PChar(Name)) = ERROR_SUCCESS;
+ RegCloseKey(RegKey);
+ end;
+end;
+
+
+function RegDeleteKeyTree(const RootKey: HKEY; const Key: string): Boolean;
+var
+ RegKey: HKEY;
+ I: DWORD;
+ Size: DWORD;
+ NumSubKeys: DWORD;
+ MaxSubKeyLen: DWORD;
+ KeyName: string;
+begin
+ Result := RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_ALL_ACCESS, RegKey) = ERROR_SUCCESS;
+ if Result then
+ begin
+ RegQueryInfoKey(RegKey, nil, nil, nil, @NumSubKeys, @MaxSubKeyLen, nil, nil, nil, nil, nil, nil);
+ if NumSubKeys <> 0 then
+ for I := NumSubKeys-1 downto 0 do
+ begin
+ Size := MaxSubKeyLen+1;
+ SetLength(KeyName, Size);
+ RegEnumKeyEx(RegKey, I, PChar(KeyName), Size, nil, nil, nil, nil);
+ SetLength(KeyName, StrLen(PChar(KeyName)));
+ Result := RegDeleteKeyTree(RootKey, Key + '\' + KeyName);
+ if not Result then
+ Break;
+ end;
+ RegCloseKey(RegKey);
+ if Result then
+ Result := Windows.RegDeleteKey(RootKey, RelativeKey(Key)) = ERROR_SUCCESS;
+ end
+end;
+
+
+function RegReadInteger(const RootKey: HKEY; const Key, Name: string): Integer;
+var
+ RegKey: HKEY;
+ Size: DWORD;
+ IntVal: Integer;
+ RegKind: DWORD;
+ Ret: Longint;
+begin
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
+ begin
+ RegKind := 0;
+ Size := SizeOf(Integer);
+ Ret := RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, @IntVal, @Size);
+ RegCloseKey(RegKey);
+ if Ret = ERROR_SUCCESS then
+ begin
+ if RegKind = REG_DWORD then
+ Result := IntVal
+ else
+ Result := -1;
+ end
+ else
+ Result := -1;
+ end
+ else
+ Result := -1;
+end;
+
+function RegReadBool(const RootKey: HKEY; const Key, Name: string): Boolean;
+begin
+ Result := RegReadInteger(RootKey, Key, Name) <> 0;
+end;
+
+
+function RegReadString(const RootKey: HKEY; const Key, Name: string): string;
+var
+ RegKey: HKEY;
+ Size: DWORD;
+ StrVal: string;
+ RegKind: DWORD;
+ Ret: Longint;
+begin
+ Result := '';
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
+ begin
+ RegKind := 0;
+ Size := 0;
+ Ret := RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, nil, @Size);
+ if Ret = ERROR_SUCCESS then
+ if RegKind in [REG_SZ, REG_EXPAND_SZ] then
+ begin
+ SetLength(StrVal, Size);
+ RegQueryValueEx(RegKey, PChar(Name), nil, @RegKind, PByte(StrVal), @Size);
+ SetLength(StrVal, StrLen(PChar(StrVal)));
+ Result := StrVal;
+ end;
+ RegCloseKey(RegKey);
+ end;
+end;
+
+
+procedure RegWriteInteger(const RootKey: HKEY; const Key, Name: string; Value: Integer);
+var
+ RegKey: HKEY;
+begin
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
+ begin
+ RegSetValueEx(RegKey, PChar(Name), 0, REG_DWORD, @Value, SizeOf(Integer));
+ RegCloseKey(RegKey);
+ end
+end;
+
+procedure RegWriteBool(const RootKey: HKEY; const Key, Name: string; Value: Boolean);
+begin
+ RegWriteInteger(RootKey, Key, Name, Ord(Value));
+end;
+
+
+procedure RegWriteString(const RootKey: HKEY; const Key, Name, Value: string);
+var
+ RegKey: HKEY;
+begin
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_SET_VALUE, RegKey) = ERROR_SUCCESS then
+ begin
+ RegSetValueEx(RegKey, PChar(Name), 0, REG_SZ, PChar(Value), Length(Value)+1);
+ RegCloseKey(RegKey);
+ end
+end;
+
+
+function RegHasSubKeys(const RootKey: HKEY; const Key: string): Boolean;
+var
+ RegKey: HKEY;
+ NumSubKeys: Integer;
+begin
+ Result := False;
+ if RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS then
+ begin
+ RegQueryInfoKey(RegKey, nil, nil, nil, @NumSubKeys, nil, nil, nil, nil, nil, nil, nil);
+ Result := NumSubKeys <> 0;
+ RegCloseKey(RegKey);
+ end
+end;
+
+
+function RegKeyExists(const RootKey: HKEY; const Key: string): Boolean;
+var
+ RegKey: HKEY;
+begin
+ Result := (RegOpenKeyEx(RootKey, RelativeKey(Key), 0, KEY_READ, RegKey) = ERROR_SUCCESS);
+ if Result then RegCloseKey(RegKey);
+end;
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PChar('Windows registry support'), PChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ zend_register_long_constant(PChar(NAME_HKEY_CLASSES_ROOT), strlen(PChar(NAME_HKEY_CLASSES_ROOT)) + 1, 0,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_CURRENT_USER), strlen(PChar(NAME_HKEY_CURRENT_USER)) + 1, 1,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_LOCAL_MACHINE), strlen(PChar(NAME_HKEY_LOCAL_MACHINE)) + 1, 2,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_USERS), strlen(PChar(NAME_HKEY_USERS)) + 1, 3,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_PERFORMANCE_DATA), strlen(PChar(NAME_HKEY_PERFORMANCE_DATA)) + 1, 4,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_CURRENT_CONFIG), strlen(PChar(NAME_HKEY_CURRENT_CONFIG)) + 1, 5,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ zend_register_long_constant(PChar(NAME_HKEY_DYN_DATA), strlen(PChar(NAME_HKEY_DYN_DATA)) + 1, 6,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+//function RegCreateKey(const RootKey: HKEY; const Key, Value: string): Longint;
+{$IFDEF PHP510}
+procedure php_RegCreateKey(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegCreateKey(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Value : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Value := param[2]^.value.str.val;
+ ZVAL_LONG(return_value, RegCreateKey(RootKey, Key, Value));
+ dispose_pzval_array(param);
+end;
+
+
+//function RegDeleteEntry(const RootKey: HKEY; const Key, Name: string): Boolean;
+{$IFDEF PHP510}
+procedure php_RegDeleteEntry(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegDeleteEntry(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Name : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ ZVAL_BOOL(return_value, RegDeleteEntry(RootKey, Key, Name));
+ dispose_pzval_array(param);
+end;
+
+//function RegDeleteKeyTree(const RootKey: HKEY; const Key: string): Boolean;
+{$IFDEF PHP510}
+procedure php_RegDeleteKeyTree(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegDeleteKeyTree(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ ZVAL_BOOL(return_value, RegDeleteKeyTree(RootKey, Key));
+ dispose_pzval_array(param);
+end;
+
+//function RegReadBool(const RootKey: HKEY; const Key, Name: string): Boolean;
+{$IFDEF PHP510}
+procedure php_RegReadBool(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegReadBool(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Name : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ ZVAL_BOOL(return_value, RegReadBool(RootKey, Key, Name));
+ dispose_pzval_array(param);
+end;
+
+//function RegReadInteger(const RootKey: HKEY; const Key, Name: string): Integer;
+{$IFDEF PHP510}
+procedure php_RegReadInteger(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegReadInteger(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Name : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ ZVAL_LONG(return_value, RegReadInteger(RootKey, Key, Name));
+ dispose_pzval_array(param);
+end;
+
+//function RegReadString(const RootKey: HKEY; const Key, Name: string): string;
+{$IFDEF PHP510}
+procedure php_RegReadString(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegReadString(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ RootKey : HKEY;
+ Key : string;
+ Name : string;
+ param : pzval_array;
+ st : string;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ st := regReadString(RootKey, Key, Name);
+ ZVAL_STRING(return_value, PChar(st), true);
+ dispose_pzval_array(param);
+end;
+
+//procedure RegWriteBool(const RootKey: HKEY; const Key, Name: string; Value: Boolean);
+{$IFDEF PHP510}
+procedure php_RegWriteBool(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegWriteBool(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ RootKey : HKEY;
+ Key : string;
+ Name : string;
+ Value : boolean;
+ param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ Value := Boolean(param[3]^.value.lval);
+ RegWriteBool(RootKey, Key, Name, Value);
+ dispose_pzval_array(param);
+end;
+
+//procedure RegWriteInteger(const RootKey: HKEY; const Key, Name: string; Value: Integer);
+{$IFDEF PHP510}
+procedure php_RegWriteInteger(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegWriteInteger(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Name : string;
+Value : integer;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ Value := param[3]^.value.lval;
+ RegWriteInteger(RootKey, Key, Name, Value);
+ dispose_pzval_array(param);
+end;
+
+//procedure RegWriteString(const RootKey: HKEY; const Key, Name, Value: string);
+{$IFDEF PHP510}
+procedure php_RegWriteString(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegWriteString(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+Name : string;
+Value : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ Name := param[2]^.value.str.val;
+ Value := param[3]^.value.str.val;
+ RegWriteString(RootKey, Key, Name, Value);
+ dispose_pzval_array(param);
+end;
+
+//function RegHasSubKeys(const RootKey: HKEY; const Key: string): Boolean;
+{$IFDEF PHP510}
+procedure php_RegHasSubKeys(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegHasSubKeys(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ ZVAL_BOOL(return_value, RegHasSubKeys(RootKey, Key));
+ dispose_pzval_array(param);
+end;
+
+//function RegKeyExists(const RootKey: HKEY; const Key: string): Boolean;
+{$IFDEF PHP510}
+procedure php_RegKeyExists(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure php_RegKeyExists(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+RootKey : HKEY;
+Key : string;
+param : pzval_array;
+begin
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ RootKey := Int2HKey(param[0]^.value.lval);
+ Key := param[1]^.value.str.val;
+ ZVAL_BOOL(return_value, RegKeyExists(RootKey, Key));
+ dispose_pzval_array(param);
+end;
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..11] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'php_registry';
+ ModuleEntry.version := '1.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+
+ module_entry_table[0].fname := 'regcreatekey';
+ module_entry_table[0].handler := @php_regcreatekey;
+
+ module_entry_table[1].fname := 'regdeleteentry';
+ module_entry_table[1].handler := @php_regdeleteentry;
+
+ module_entry_table[2].fname := 'regdeletekeytree';
+ module_entry_table[2].handler := p_regdeletekeytree;
+
+ module_entry_table[3].fname := 'reghassubkeys';
+ module_entry_table[3].handler := @php_reghassubkeys;
+
+ module_entry_table[4].fname := 'regkeyexists';
+ module_entry_table[4].handler := @php_regkeyexists;
+
+ module_entry_table[5].fname := 'regreadbool';
+ module_entry_table[5].handler := @php_regreadbool;
+
+ module_entry_table[6].fname := 'regreadinteger';
+ module_entry_table[6].handler := @php_regreadinteger;
+
+ module_entry_table[7].fname := 'regreadstring';
+ module_entry_table[7].handler := @php_regreadstring;
+
+ module_entry_table[8].fname := 'regwritebool';
+ module_entry_table[8].handler := @php_regwritebool;
+
+ module_entry_table[9].fname := 'regwriteinteger';
+ module_entry_table[9].handler := @php_regwriteinteger;
+
+ module_entry_table[10].fname := 'regwritestring';
+ module_entry_table[10].handler := @php_regwritestring;
+
+ module_entry_table[11].fname := nil;
+ module_entry_table[11].handler := nil;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+
+ result := @ModuleEntry;
+end;
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos/Bonus/phpRegistry/php_registry.dproj b/Source/Demos/Bonus/phpRegistry/php_registry.dproj
new file mode 100644
index 0000000..908d12e
--- /dev/null
+++ b/Source/Demos/Bonus/phpRegistry/php_registry.dproj
@@ -0,0 +1,97 @@
+
+
+ {BD821E37-7741-4995-A5BC-DF199938D093}
+ php_registry.dpr
+ True
+ Debug
+ 1
+ Library
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ false
+ 00400000
+ false
+ true
+ php_registry
+ System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ 1058
+ false
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ 1033
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Debug
+
+
+ RELEASE;$(DCC_Define)
+ 0
+ false
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ php_registry.dpr
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/Demos/Bonus/phpRegistry/php_registry.dproj.local b/Source/Demos/Bonus/phpRegistry/php_registry.dproj.local
new file mode 100644
index 0000000..b3811b7
--- /dev/null
+++ b/Source/Demos/Bonus/phpRegistry/php_registry.dproj.local
@@ -0,0 +1,2 @@
+
+
diff --git a/Source/Demos/Bonus/phpRegistry/php_registry.identcache b/Source/Demos/Bonus/phpRegistry/php_registry.identcache
new file mode 100644
index 0000000..b93c9d3
Binary files /dev/null and b/Source/Demos/Bonus/phpRegistry/php_registry.identcache differ
diff --git a/Source/Demos/Bonus/phpRegistry/php_registry.stat b/Source/Demos/Bonus/phpRegistry/php_registry.stat
new file mode 100644
index 0000000..9501bb7
--- /dev/null
+++ b/Source/Demos/Bonus/phpRegistry/php_registry.stat
@@ -0,0 +1,10 @@
+[Stats]
+EditorSecs=72
+DesignerSecs=3
+InspectorSecs=1
+CompileSecs=1
+OtherSecs=5
+StartTime=16.02.2019 19:24:32
+RealKeys=0
+EffectiveKeys=0
+DebugSecs=1
diff --git a/Demos/Bonus/wincon/Bin/php_wincon.dll b/Source/Demos/Bonus/wincon/Bin/php_wincon.dll
similarity index 100%
rename from Demos/Bonus/wincon/Bin/php_wincon.dll
rename to Source/Demos/Bonus/wincon/Bin/php_wincon.dll
diff --git a/Demos/Bonus/wincon/Bin/test_wincon.php b/Source/Demos/Bonus/wincon/Bin/test_wincon.php
similarity index 97%
rename from Demos/Bonus/wincon/Bin/test_wincon.php
rename to Source/Demos/Bonus/wincon/Bin/test_wincon.php
index 175df4d..3967338 100644
--- a/Demos/Bonus/wincon/Bin/test_wincon.php
+++ b/Source/Demos/Bonus/wincon/Bin/test_wincon.php
@@ -1,13 +1,13 @@
-
-if(!extension_loaded('php_wincon')) {
- dl('php_wincon.dll');
-}
-
-
-$hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
-SetConsoleTextAttribute($hStdout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE );
-writeconsole($hStdout, "PHP Console Extension\n");
-SetConsoleTextAttribute($hStdout, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
-writeconsole($hStdout, "Enables standard console functions for PHP\n");
-
-?>
+
+if(!extension_loaded('php_wincon')) {
+ dl('php_wincon.dll');
+}
+
+
+$hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
+SetConsoleTextAttribute($hStdout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE );
+writeconsole($hStdout, "PHP Console Extension\n");
+SetConsoleTextAttribute($hStdout, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
+writeconsole($hStdout, "Enables standard console functions for PHP\n");
+
+?>
diff --git a/Demos/Bonus/wincon/php_wincon.h b/Source/Demos/Bonus/wincon/php_wincon.h
similarity index 96%
rename from Demos/Bonus/wincon/php_wincon.h
rename to Source/Demos/Bonus/wincon/php_wincon.h
index 23ef163..c1c372c 100644
--- a/Demos/Bonus/wincon/php_wincon.h
+++ b/Source/Demos/Bonus/wincon/php_wincon.h
@@ -1,59 +1,59 @@
-#ifndef PHP_WINCON_H
-#define PHP_WINCON_H
-
-extern zend_module_entry extname_module_entry;
-#define phpext_extname_ptr &extname_module_entry
-
-#ifdef PHP_WIN32
-#define PHP_WINCON_API __declspec(dllexport)
-#else
-#define PHP_WINCON_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-PHP_MINIT_FUNCTION(wincon);
-PHP_MSHUTDOWN_FUNCTION(wincon);
-PHP_RINIT_FUNCTION(wincon);
-PHP_RSHUTDOWN_FUNCTION(wincon);
-PHP_MINFO_FUNCTION(wincon);
-
-PHP_FUNCTION(allocconsole);
-PHP_FUNCTION(createconsolescreenbuffer);
-PHP_FUNCTION(fillconsoleoutputattribute);
-PHP_FUNCTION(getstdhandle);
-PHP_FUNCTION(setconsoletitle);
-PHP_FUNCTION(readconsole);
-PHP_FUNCTION(flushconsoleinputbuffer);
-PHP_FUNCTION(freeconsole);
-PHP_FUNCTION(generateconsolectrlevent);
-PHP_FUNCTION(getconsolecp);
-PHP_FUNCTION(getconsolecursorsize);
-PHP_FUNCTION(getconsolecursorvisible);
-PHP_FUNCTION(getconsolemode);
-PHP_FUNCTION(getconsoleoutputcp);
-PHP_FUNCTION(getconsolescreenbufferinfo);
-PHP_FUNCTION(getconsoletitle);
-PHP_FUNCTION(getnumberofconsoleinputevents);
-PHP_FUNCTION(setconsolecp);
-PHP_FUNCTION(writeconsole);
-PHP_FUNCTION(setconsoletextattribute);
-PHP_FUNCTION(setconsoleoutputcp);
-PHP_FUNCTION(setstdhandle);
-PHP_FUNCTION(setconsolemode);
-PHP_FUNCTION(setconsolecursorposition);
-PHP_FUNCTION(setconsolecursorinfo);
-PHP_FUNCTION(writeconsoleoutputcharacter);
-
-
-
-#ifdef ZTS
-#define EXTNAME_G(v) TSRMG(wincon_globals_id, zend_wincon_globals *, v)
-#else
-#define EXTNAME_G(v) (wincon_globals.v)
-#endif
-
-#endif /* PHP_WINCON_H */
-
+#ifndef PHP_WINCON_H
+#define PHP_WINCON_H
+
+extern zend_module_entry extname_module_entry;
+#define phpext_extname_ptr &extname_module_entry
+
+#ifdef PHP_WIN32
+#define PHP_WINCON_API __declspec(dllexport)
+#else
+#define PHP_WINCON_API
+#endif
+
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
+PHP_MINIT_FUNCTION(wincon);
+PHP_MSHUTDOWN_FUNCTION(wincon);
+PHP_RINIT_FUNCTION(wincon);
+PHP_RSHUTDOWN_FUNCTION(wincon);
+PHP_MINFO_FUNCTION(wincon);
+
+PHP_FUNCTION(allocconsole);
+PHP_FUNCTION(createconsolescreenbuffer);
+PHP_FUNCTION(fillconsoleoutputattribute);
+PHP_FUNCTION(getstdhandle);
+PHP_FUNCTION(setconsoletitle);
+PHP_FUNCTION(readconsole);
+PHP_FUNCTION(flushconsoleinputbuffer);
+PHP_FUNCTION(freeconsole);
+PHP_FUNCTION(generateconsolectrlevent);
+PHP_FUNCTION(getconsolecp);
+PHP_FUNCTION(getconsolecursorsize);
+PHP_FUNCTION(getconsolecursorvisible);
+PHP_FUNCTION(getconsolemode);
+PHP_FUNCTION(getconsoleoutputcp);
+PHP_FUNCTION(getconsolescreenbufferinfo);
+PHP_FUNCTION(getconsoletitle);
+PHP_FUNCTION(getnumberofconsoleinputevents);
+PHP_FUNCTION(setconsolecp);
+PHP_FUNCTION(writeconsole);
+PHP_FUNCTION(setconsoletextattribute);
+PHP_FUNCTION(setconsoleoutputcp);
+PHP_FUNCTION(setstdhandle);
+PHP_FUNCTION(setconsolemode);
+PHP_FUNCTION(setconsolecursorposition);
+PHP_FUNCTION(setconsolecursorinfo);
+PHP_FUNCTION(writeconsoleoutputcharacter);
+
+
+
+#ifdef ZTS
+#define EXTNAME_G(v) TSRMG(wincon_globals_id, zend_wincon_globals *, v)
+#else
+#define EXTNAME_G(v) (wincon_globals.v)
+#endif
+
+#endif /* PHP_WINCON_H */
+
diff --git a/Demos/Bonus/wincon/resource.h b/Source/Demos/Bonus/wincon/resource.h
similarity index 96%
rename from Demos/Bonus/wincon/resource.h
rename to Source/Demos/Bonus/wincon/resource.h
index 8f85267..7af6201 100644
--- a/Demos/Bonus/wincon/resource.h
+++ b/Source/Demos/Bonus/wincon/resource.h
@@ -1,14 +1,14 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by wincon.rc
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 101
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by wincon.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Source/Demos/Bonus/wincon/test_wincon.php b/Source/Demos/Bonus/wincon/test_wincon.php
new file mode 100644
index 0000000..3967338
--- /dev/null
+++ b/Source/Demos/Bonus/wincon/test_wincon.php
@@ -0,0 +1,13 @@
+
+if(!extension_loaded('php_wincon')) {
+ dl('php_wincon.dll');
+}
+
+
+$hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
+SetConsoleTextAttribute($hStdout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE );
+writeconsole($hStdout, "PHP Console Extension\n");
+SetConsoleTextAttribute($hStdout, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
+writeconsole($hStdout, "Enables standard console functions for PHP\n");
+
+?>
diff --git a/Demos/Bonus/wincon/wincon.c b/Source/Demos/Bonus/wincon/wincon.c
similarity index 96%
rename from Demos/Bonus/wincon/wincon.c
rename to Source/Demos/Bonus/wincon/wincon.c
index 0c371f9..383ba1f 100644
--- a/Demos/Bonus/wincon/wincon.c
+++ b/Source/Demos/Bonus/wincon/wincon.c
@@ -1,666 +1,666 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "php_wincon.h"
-#include
-#include "zend_alloc.h"
-
-
-/* True global resources - no need for thread safety here */
-static int le_wincon;
-
-/* {{{ wincon_functions[]
- *
- * Every user visible function must have an entry in wincon_functions[].
- */
-function_entry wincon_functions[] = {
- PHP_FE(allocconsole, NULL)
- PHP_FE(createconsolescreenbuffer, NULL)
- PHP_FE(fillconsoleoutputattribute, NULL)
- PHP_FE(getstdhandle, NULL)
- PHP_FE(setconsoletitle, NULL)
- PHP_FE(readconsole, NULL)
- PHP_FE(flushconsoleinputbuffer, NULL)
- PHP_FE(freeconsole, NULL)
- PHP_FE(generateconsolectrlevent, NULL)
- PHP_FE(getconsolecp, NULL)
- PHP_FE(getconsolecursorsize, NULL)
- PHP_FE(getconsolecursorvisible, NULL)
- PHP_FE(getconsolemode, NULL)
- PHP_FE(getconsoleoutputcp, NULL)
- PHP_FE(getconsolescreenbufferinfo, NULL)
- PHP_FE(getconsoletitle, NULL)
- PHP_FE(getnumberofconsoleinputevents, NULL)
- PHP_FE(setconsolecp, NULL)
- PHP_FE(setconsoletextattribute, NULL)
- PHP_FE(writeconsole, NULL)
- PHP_FE(setconsoleoutputcp, NULL)
- PHP_FE(setstdhandle, NULL)
- PHP_FE(setconsolemode, NULL)
- PHP_FE(setconsolecursorposition, NULL)
- PHP_FE(setconsolecursorinfo, NULL)
- PHP_FE(writeconsoleoutputcharacter, NULL)
- {NULL, NULL, NULL}
-};
-/* }}} */
-
-/* {{{ wincon_module_entry
- */
-zend_module_entry wincon_module_entry = {
-#if ZEND_MODULE_API_NO >= 20010901
- STANDARD_MODULE_HEADER,
-#endif
- "php_wincon",
- wincon_functions,
- PHP_MINIT(wincon),
- PHP_MSHUTDOWN(wincon),
- PHP_RINIT(wincon),
- PHP_RSHUTDOWN(wincon),
- PHP_MINFO(wincon),
-#if ZEND_MODULE_API_NO >= 20010901
- "1.1",
-#endif
- STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_WINCON
-ZEND_GET_MODULE(wincon)
-#endif
-
-
-
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(wincon)
-{
- REGISTER_LONG_CONSTANT("STD_INPUT_HANDLE", STD_INPUT_HANDLE, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("STD_OUTPUT_HANDLE", STD_OUTPUT_HANDLE, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("STD_ERROR_HANDLE", STD_ERROR_HANDLE, CONST_CS|CONST_PERSISTENT);
-
- REGISTER_LONG_CONSTANT("CTRL_C_EVENT", CTRL_C_EVENT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CTRL_BREAK_EVENT", CTRL_BREAK_EVENT, CONST_CS|CONST_PERSISTENT);
-
- REGISTER_LONG_CONSTANT("ENABLE_LINE_INPUT", ENABLE_LINE_INPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_ECHO_INPUT", ENABLE_ECHO_INPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_PROCESSED_INPUT", ENABLE_PROCESSED_INPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_WINDOW_INPUT", ENABLE_WINDOW_INPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_MOUSE_INPUT", ENABLE_MOUSE_INPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_PROCESSED_OUTPUT", ENABLE_PROCESSED_OUTPUT, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENABLE_WRAP_AT_EOL_OUTPUT", ENABLE_WRAP_AT_EOL_OUTPUT, CONST_CS|CONST_PERSISTENT);
-
- REGISTER_LONG_CONSTANT("BACKGROUND_BLUE", BACKGROUND_BLUE, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("FOREGROUND_BLUE", FOREGROUND_BLUE, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("BACKGROUND_GREEN", BACKGROUND_GREEN, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("FOREGROUND_GREEN", FOREGROUND_GREEN, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("BACKGROUND_RED", BACKGROUND_RED, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("FOREGROUND_RED", FOREGROUND_RED, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("BACKGROUND_INTENSITY", BACKGROUND_INTENSITY, CONST_CS|CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("FOREGROUND_INTENSITY", FOREGROUND_INTENSITY, CONST_CS|CONST_PERSISTENT);
-
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(wincon)
-{
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(wincon)
-{
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_RSHUTDOWN_FUNCTION
- */
-PHP_RSHUTDOWN_FUNCTION(wincon)
-{
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MINFO_FUNCTION
- */
-PHP_MINFO_FUNCTION(wincon)
-{
- php_info_print_table_start();
- php_info_print_table_header(2, "Windows console support", "enabled");
- php_info_print_table_end();
-
- /* Remove comments if you have entries in php.ini
- DISPLAY_INI_ENTRIES();
- */
-}
-/* }}} */
-
-
-
-/* {{{ proto bool AllocConsole(void)
- */
-PHP_FUNCTION(allocconsole)
-{
- RETURN_BOOL(AllocConsole());
-}
-
-/* {{{ proto long createconsolescreenbuffer(int desiredaccess; int sharemode; int flags)
- */
-PHP_FUNCTION(createconsolescreenbuffer)
-{
- zval **desiredaccess;
- zval **sharemode;
- zval **flags;
- long ret;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &desiredaccess, &sharemode, &flags) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(desiredaccess);
- convert_to_long_ex(sharemode);
- convert_to_long_ex(flags);
-
- ret = (long)CreateConsoleScreenBuffer(Z_LVAL_PP(desiredaccess), Z_LVAL_PP(sharemode), NULL, Z_LVAL_PP(flags), NULL);
- RETURN_LONG(ret);
-}
-
-/* {{{ proto bool fillconsoleoutputattribute(int consoleoutput, int attribute, int len, int x, int y)
- */
-PHP_FUNCTION(fillconsoleoutputattribute)
-{
- zval **consoleoutput;
- zval **attribute;
- zval **len;
- zval **x;
- zval **y;
- DWORD dw;
-
- COORD coord;
-
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 5 || zend_get_parameters_ex(ac, &consoleoutput, &attribute, &len, &x, &y) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- convert_to_long_ex(attribute);
- convert_to_long_ex(len);
- convert_to_long_ex(x);
- convert_to_long_ex(y);
-
- coord.X = (short)Z_LVAL_PP(x);
- coord.Y = (short)Z_LVAL_PP(y);
- RETURN_BOOL(FillConsoleOutputAttribute((HANDLE)Z_LVAL_PP(consoleoutput), (WORD)Z_LVAL_PP(attribute), Z_LVAL_PP(len), coord, &dw));
-
-}
-
-/* {{{ proto long getstdhandle(int stdhandle)
- */
-PHP_FUNCTION(getstdhandle)
-{
- zval **stdhandle;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &stdhandle) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(stdhandle);
- RETURN_LONG((long)GetStdHandle(Z_LVAL_PP(stdhandle)));
-}
-
-/* {{{ proto bool setconsoletitle(string title)
- */
-PHP_FUNCTION(setconsoletitle)
-{
- zval **title;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &title) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_string_ex(title);
- RETURN_BOOL(SetConsoleTitle(Z_STRVAL_PP(title)));
-}
-
-
-/* {{{ proto string readconsole(int consoleinput, int buflen)
- */
-PHP_FUNCTION(readconsole)
-{
- char *buffer;
- DWORD buflen;
- zval **zbuflen;
- zval **consoleinput;
- DWORD cr;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &consoleinput, &zbuflen) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(zbuflen);
- convert_to_long_ex(consoleinput);
- buflen = (DWORD)Z_LVAL_PP(zbuflen);
- buffer = emalloc(buflen);
- ReadConsole( (HANDLE)Z_LVAL_PP(consoleinput), buffer, buflen, &cr, NULL);
- ZVAL_STRING(return_value, buffer, TRUE);
- efree(buffer);
-}
-
-
-/* {{{ proto bool flushconsoleinputbuffer(int consoleinput)
- */
-PHP_FUNCTION(flushconsoleinputbuffer)
-{
- zval **consoleinput;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consoleinput) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleinput);
- RETURN_BOOL(FlushConsoleInputBuffer((HANDLE)Z_LVAL_PP(consoleinput)));
-
-}
-
-
-/* {{{ proto bool freeconsole(void)
- */
-PHP_FUNCTION(freeconsole)
-{
- RETURN_BOOL(FreeConsole());
-}
-
-
-/* {{{ proto bool generateconsolectrlevent(int ctrlevent, int processgroupid)
- */
-PHP_FUNCTION(generateconsolectrlevent)
-{
- zval **ctrlevent;
- zval **processgroupid;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &ctrlevent, &processgroupid) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(ctrlevent);
- convert_to_long_ex(processgroupid);
-
- RETURN_BOOL(GenerateConsoleCtrlEvent(Z_LVAL_PP(ctrlevent), Z_LVAL_PP(processgroupid)));
-}
-
-
-/* {{{ proto int getconsolecp(void)
- */
-PHP_FUNCTION(getconsolecp)
-{
- RETURN_LONG(GetConsoleCP());
-}
-
-
-/* {{{ proto long getconsolecursorsize(int consoleoutput)
- */
-PHP_FUNCTION(getconsolecursorsize)
-{
- zval **consoleoutput;
- CONSOLE_CURSOR_INFO cursorinfo;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- GetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo);
-
- RETURN_LONG(cursorinfo.dwSize);
-}
-
-
-/* {{{ proto bool getconsolecursorvisible(int consoleoutput)
- */
-PHP_FUNCTION(getconsolecursorvisible)
-{
- zval **consoleoutput;
- CONSOLE_CURSOR_INFO cursorinfo;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- GetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo);
- RETURN_BOOL(cursorinfo.bVisible);
-}
-
-
-/* {{{ proto int getconsolemode(int consolehandle)
- */
-PHP_FUNCTION(getconsolemode)
-{
- zval **consolehandle;
- DWORD flags;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consolehandle) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consolehandle);
- GetConsoleMode((HANDLE)Z_LVAL_PP(consolehandle), &flags);
- RETURN_LONG(flags);
-}
-
-
-/* {{{ proto int getconsoleoutputcp(void)
- */
-PHP_FUNCTION(getconsoleoutputcp)
-{
- RETURN_LONG(GetConsoleOutputCP());
-}
-
-
-/* {{{ proto array getconsolescreenbufferinfo(int consoleoutput)
- */
-PHP_FUNCTION(getconsolescreenbufferinfo)
-{
-
- zval **consoleoutput;
- zval *size;
- zval *cursorposition;
- zval *srwindow;
- zval *maxwinsize;
-
- CONSOLE_SCREEN_BUFFER_INFO bufferinfo;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- GetConsoleScreenBufferInfo((HANDLE)Z_LVAL_PP(consoleoutput), &bufferinfo);
- array_init(return_value);
-
- MAKE_STD_ZVAL(size);
- MAKE_STD_ZVAL(cursorposition);
- MAKE_STD_ZVAL(srwindow);
- MAKE_STD_ZVAL(maxwinsize);
-
- array_init(size);
- array_init(cursorposition);
- array_init(srwindow);
- array_init(maxwinsize);
-
- add_assoc_long(size, "x", bufferinfo.dwSize.X);
- add_assoc_long(size, "y", bufferinfo.dwSize.Y);
-
- add_assoc_long(cursorposition, "x", bufferinfo.dwCursorPosition.X);
- add_assoc_long(cursorposition, "y", bufferinfo.dwCursorPosition.Y);
-
- add_assoc_zval(return_value, "dwsize", size);
- add_assoc_zval(return_value, "dwcursorposition", cursorposition);
-
- add_assoc_long(return_value, "wattributes", bufferinfo.wAttributes);
-
- add_assoc_long(srwindow, "left", bufferinfo.srWindow.Left);
- add_assoc_long(srwindow, "top", bufferinfo.srWindow.Top);
- add_assoc_long(srwindow, "right", bufferinfo.srWindow.Right);
- add_assoc_long(srwindow, "bottom", bufferinfo.srWindow.Bottom);
-
- add_assoc_zval(return_value, "srwindow", srwindow);
-
-
- add_assoc_long(maxwinsize, "x", bufferinfo.dwMaximumWindowSize.X);
- add_assoc_long(maxwinsize, "y", bufferinfo.dwMaximumWindowSize.Y);
-
- add_assoc_zval(return_value, "dwmaximumwindowsize", maxwinsize);
-
-}
-
-
-/* {{{ proto string getconsoletitle(int buflen)
- */
-PHP_FUNCTION(getconsoletitle)
-{
- char *buffer;
- DWORD buflen;
- zval **zbuflen;
-
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &zbuflen) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(zbuflen);
-
- buflen = (DWORD)Z_LVAL_PP(zbuflen);
- buffer = emalloc(buflen);
- GetConsoleTitle(buffer, buflen);
- ZVAL_STRING(return_value, buffer, TRUE);
- efree(buffer);
-
-}
-
-
-/* {{{ proto int getnumberofconsoleevents(int consoleinput)
- */
-PHP_FUNCTION(getnumberofconsoleinputevents)
-{
- zval **consoleinput;
- DWORD numberofevents;
-
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &consoleinput) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleinput);
-
- GetNumberOfConsoleInputEvents((HANDLE)Z_LVAL_PP(consoleinput), &numberofevents);
- RETURN_LONG(numberofevents);
-}
-
-/* {{{ proto bool setconsolecp(int codepage)
- */
-PHP_FUNCTION(setconsolecp)
-{
- zval **codepage;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &codepage) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(codepage);
- RETURN_BOOL(SetConsoleCP(Z_LVAL_PP(codepage)));
-
-}
-
-
-/* {{{ proto bool writeconsole(int consoleoutput, string str)
- */
-PHP_FUNCTION(writeconsole)
-{
- zval **consoleoutput;
- zval **str;
- DWORD nNumberOfCharsToWrite; // number of characters to write
- DWORD NumberOfCharsWritten; // number of characters written
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &consoleoutput, &str) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_long_ex(consoleoutput);
- convert_to_string_ex(str);
- nNumberOfCharsToWrite = Z_STRLEN_PP(str);
- RETURN_BOOL(WriteConsole((HANDLE)Z_LVAL_PP(consoleoutput), Z_STRVAL_PP(str), nNumberOfCharsToWrite, &NumberOfCharsWritten, NULL));
-
-}
-
-/* {{{ proto bool setconsoleattribute(int consoleoutput int attributes)
- */
-PHP_FUNCTION(setconsoletextattribute)
-{
- zval **consoleoutput;
- zval **attributes;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &consoleoutput, &attributes) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_long_ex(consoleoutput);
- convert_to_long_ex(attributes);
- RETURN_BOOL(SetConsoleTextAttribute((HANDLE)Z_LVAL_PP(consoleoutput), (WORD)Z_LVAL_PP(attributes)));
-}
-
-
-/* {{{ proto bool setconsoleoutputcp(int codepageid)
- */
-PHP_FUNCTION(setconsoleoutputcp)
-{
- zval **codepageid;
- int ac=ZEND_NUM_ARGS();
-
- if (ac != 1 || zend_get_parameters_ex(ac, &codepageid) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- RETURN_BOOL(SetConsoleOutputCP(Z_LVAL_PP(codepageid)));
-}
-
-
-/* {{{ proto bool setstdhandle(int stdhandle, int hHandle)
- */
-PHP_FUNCTION(setstdhandle)
-{
- zval **stdhandle;
- zval **hHandle;
-
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &stdhandle, &hHandle) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_long_ex(stdhandle);
- convert_to_long_ex(hHandle);
- RETURN_BOOL(SetStdHandle(Z_LVAL_PP(stdhandle), (HANDLE)Z_LVAL_PP(hHandle)));
-}
-
-/* {{{ proto bool setconsolemode(int consolehandle, int mode)
- */
-PHP_FUNCTION(setconsolemode)
-{
- zval **consolehandle;
- zval **mode;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 2 || zend_get_parameters_ex(ac, &consolehandle, &mode) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_long_ex(consolehandle);
- convert_to_long_ex(mode);
- RETURN_BOOL(SetConsoleMode((HANDLE)Z_LVAL_PP(consolehandle), Z_LVAL_PP(mode)));
-}
-
-/* {{{ proto bool setconsolecursorposition(int consoleoutput, int x, int y)
- */
-PHP_FUNCTION(setconsolecursorposition)
-{
- zval **consoleoutput;
- zval **x;
- zval **y;
- COORD coord;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 3 || zend_get_parameters_ex(ac, &consoleoutput, &x, &y) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- convert_to_long_ex(x);
- convert_to_long_ex(y);
- coord.X = (short)Z_LVAL_PP(x);
- coord.Y = (short)Z_LVAL_PP(y);
- RETURN_BOOL(SetConsoleCursorPosition((HANDLE)Z_LVAL_PP(consoleoutput), coord));
-}
-
-/* {{{ proto bool setconsolecursorinfo(int consoleoutput, int size, bool visible)
- */
-PHP_FUNCTION(setconsolecursorinfo)
-{
- zval **consoleoutput;
- zval **size;
- zval **visible;
- CONSOLE_CURSOR_INFO cursorinfo;
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 3 || zend_get_parameters_ex(ac, &consoleoutput, &size, &visible) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- convert_to_long_ex(size);
- convert_to_boolean_ex(visible);
- cursorinfo.dwSize = Z_LVAL_PP(size);
- cursorinfo.bVisible = Z_BVAL_PP(visible);
- RETURN_BOOL(SetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo));
-}
-
-/* {{{ proto bool writeconsoleoutputcharacter(int consoleoutput, string arg, int x, int y)
- */
-PHP_FUNCTION(writeconsoleoutputcharacter)
-{
- zval **consoleoutput;
- zval **characters;
- zval **x;
- zval **y;
- COORD coord;
- int n;
- int len;
-
- int ac = ZEND_NUM_ARGS();
-
- if (ac != 4 || zend_get_parameters_ex(ac, &consoleoutput, &characters, &x, &y) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_long_ex(consoleoutput);
- convert_to_long_ex(x);
- convert_to_long_ex(y);
- convert_to_string_ex(characters);
- len = Z_STRLEN_PP(characters);
- coord.X = (short)Z_LVAL_PP(x);
- coord.Y = (short)Z_LVAL_PP(y);
- RETURN_BOOL(WriteConsoleOutputCharacter((HANDLE)Z_LVAL_PP(consoleoutput), Z_STRVAL_PP(characters), len, coord, &n));
-}
-
-/* }}} */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "php.h"
+#include "php_ini.h"
+#include "ext/standard/info.h"
+#include "php_wincon.h"
+#include
+#include "zend_alloc.h"
+
+
+/* True global resources - no need for thread safety here */
+static int le_wincon;
+
+/* {{{ wincon_functions[]
+ *
+ * Every user visible function must have an entry in wincon_functions[].
+ */
+function_entry wincon_functions[] = {
+ PHP_FE(allocconsole, NULL)
+ PHP_FE(createconsolescreenbuffer, NULL)
+ PHP_FE(fillconsoleoutputattribute, NULL)
+ PHP_FE(getstdhandle, NULL)
+ PHP_FE(setconsoletitle, NULL)
+ PHP_FE(readconsole, NULL)
+ PHP_FE(flushconsoleinputbuffer, NULL)
+ PHP_FE(freeconsole, NULL)
+ PHP_FE(generateconsolectrlevent, NULL)
+ PHP_FE(getconsolecp, NULL)
+ PHP_FE(getconsolecursorsize, NULL)
+ PHP_FE(getconsolecursorvisible, NULL)
+ PHP_FE(getconsolemode, NULL)
+ PHP_FE(getconsoleoutputcp, NULL)
+ PHP_FE(getconsolescreenbufferinfo, NULL)
+ PHP_FE(getconsoletitle, NULL)
+ PHP_FE(getnumberofconsoleinputevents, NULL)
+ PHP_FE(setconsolecp, NULL)
+ PHP_FE(setconsoletextattribute, NULL)
+ PHP_FE(writeconsole, NULL)
+ PHP_FE(setconsoleoutputcp, NULL)
+ PHP_FE(setstdhandle, NULL)
+ PHP_FE(setconsolemode, NULL)
+ PHP_FE(setconsolecursorposition, NULL)
+ PHP_FE(setconsolecursorinfo, NULL)
+ PHP_FE(writeconsoleoutputcharacter, NULL)
+ {NULL, NULL, NULL}
+};
+/* }}} */
+
+/* {{{ wincon_module_entry
+ */
+zend_module_entry wincon_module_entry = {
+#if ZEND_MODULE_API_NO >= 20010901
+ STANDARD_MODULE_HEADER,
+#endif
+ "php_wincon",
+ wincon_functions,
+ PHP_MINIT(wincon),
+ PHP_MSHUTDOWN(wincon),
+ PHP_RINIT(wincon),
+ PHP_RSHUTDOWN(wincon),
+ PHP_MINFO(wincon),
+#if ZEND_MODULE_API_NO >= 20010901
+ "1.1",
+#endif
+ STANDARD_MODULE_PROPERTIES
+};
+/* }}} */
+
+#ifdef COMPILE_DL_WINCON
+ZEND_GET_MODULE(wincon)
+#endif
+
+
+
+/* {{{ PHP_MINIT_FUNCTION
+ */
+PHP_MINIT_FUNCTION(wincon)
+{
+ REGISTER_LONG_CONSTANT("STD_INPUT_HANDLE", STD_INPUT_HANDLE, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("STD_OUTPUT_HANDLE", STD_OUTPUT_HANDLE, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("STD_ERROR_HANDLE", STD_ERROR_HANDLE, CONST_CS|CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("CTRL_C_EVENT", CTRL_C_EVENT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CTRL_BREAK_EVENT", CTRL_BREAK_EVENT, CONST_CS|CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("ENABLE_LINE_INPUT", ENABLE_LINE_INPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_ECHO_INPUT", ENABLE_ECHO_INPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_PROCESSED_INPUT", ENABLE_PROCESSED_INPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_WINDOW_INPUT", ENABLE_WINDOW_INPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_MOUSE_INPUT", ENABLE_MOUSE_INPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_PROCESSED_OUTPUT", ENABLE_PROCESSED_OUTPUT, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("ENABLE_WRAP_AT_EOL_OUTPUT", ENABLE_WRAP_AT_EOL_OUTPUT, CONST_CS|CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("BACKGROUND_BLUE", BACKGROUND_BLUE, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("FOREGROUND_BLUE", FOREGROUND_BLUE, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("BACKGROUND_GREEN", BACKGROUND_GREEN, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("FOREGROUND_GREEN", FOREGROUND_GREEN, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("BACKGROUND_RED", BACKGROUND_RED, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("FOREGROUND_RED", FOREGROUND_RED, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("BACKGROUND_INTENSITY", BACKGROUND_INTENSITY, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("FOREGROUND_INTENSITY", FOREGROUND_INTENSITY, CONST_CS|CONST_PERSISTENT);
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
+PHP_MSHUTDOWN_FUNCTION(wincon)
+{
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_RINIT_FUNCTION
+ */
+PHP_RINIT_FUNCTION(wincon)
+{
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
+PHP_RSHUTDOWN_FUNCTION(wincon)
+{
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_MINFO_FUNCTION
+ */
+PHP_MINFO_FUNCTION(wincon)
+{
+ php_info_print_table_start();
+ php_info_print_table_header(2, "Windows console support", "enabled");
+ php_info_print_table_end();
+
+ /* Remove comments if you have entries in php.ini
+ DISPLAY_INI_ENTRIES();
+ */
+}
+/* }}} */
+
+
+
+/* {{{ proto bool AllocConsole(void)
+ */
+PHP_FUNCTION(allocconsole)
+{
+ RETURN_BOOL(AllocConsole());
+}
+
+/* {{{ proto long createconsolescreenbuffer(int desiredaccess; int sharemode; int flags)
+ */
+PHP_FUNCTION(createconsolescreenbuffer)
+{
+ zval **desiredaccess;
+ zval **sharemode;
+ zval **flags;
+ long ret;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &desiredaccess, &sharemode, &flags) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(desiredaccess);
+ convert_to_long_ex(sharemode);
+ convert_to_long_ex(flags);
+
+ ret = (long)CreateConsoleScreenBuffer(Z_LVAL_PP(desiredaccess), Z_LVAL_PP(sharemode), NULL, Z_LVAL_PP(flags), NULL);
+ RETURN_LONG(ret);
+}
+
+/* {{{ proto bool fillconsoleoutputattribute(int consoleoutput, int attribute, int len, int x, int y)
+ */
+PHP_FUNCTION(fillconsoleoutputattribute)
+{
+ zval **consoleoutput;
+ zval **attribute;
+ zval **len;
+ zval **x;
+ zval **y;
+ DWORD dw;
+
+ COORD coord;
+
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 5 || zend_get_parameters_ex(ac, &consoleoutput, &attribute, &len, &x, &y) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ convert_to_long_ex(attribute);
+ convert_to_long_ex(len);
+ convert_to_long_ex(x);
+ convert_to_long_ex(y);
+
+ coord.X = (short)Z_LVAL_PP(x);
+ coord.Y = (short)Z_LVAL_PP(y);
+ RETURN_BOOL(FillConsoleOutputAttribute((HANDLE)Z_LVAL_PP(consoleoutput), (WORD)Z_LVAL_PP(attribute), Z_LVAL_PP(len), coord, &dw));
+
+}
+
+/* {{{ proto long getstdhandle(int stdhandle)
+ */
+PHP_FUNCTION(getstdhandle)
+{
+ zval **stdhandle;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &stdhandle) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(stdhandle);
+ RETURN_LONG((long)GetStdHandle(Z_LVAL_PP(stdhandle)));
+}
+
+/* {{{ proto bool setconsoletitle(string title)
+ */
+PHP_FUNCTION(setconsoletitle)
+{
+ zval **title;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &title) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_string_ex(title);
+ RETURN_BOOL(SetConsoleTitle(Z_STRVAL_PP(title)));
+}
+
+
+/* {{{ proto string readconsole(int consoleinput, int buflen)
+ */
+PHP_FUNCTION(readconsole)
+{
+ char *buffer;
+ DWORD buflen;
+ zval **zbuflen;
+ zval **consoleinput;
+ DWORD cr;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &consoleinput, &zbuflen) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(zbuflen);
+ convert_to_long_ex(consoleinput);
+ buflen = (DWORD)Z_LVAL_PP(zbuflen);
+ buffer = emalloc(buflen);
+ ReadConsole( (HANDLE)Z_LVAL_PP(consoleinput), buffer, buflen, &cr, NULL);
+ ZVAL_STRING(return_value, buffer, TRUE);
+ efree(buffer);
+}
+
+
+/* {{{ proto bool flushconsoleinputbuffer(int consoleinput)
+ */
+PHP_FUNCTION(flushconsoleinputbuffer)
+{
+ zval **consoleinput;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consoleinput) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleinput);
+ RETURN_BOOL(FlushConsoleInputBuffer((HANDLE)Z_LVAL_PP(consoleinput)));
+
+}
+
+
+/* {{{ proto bool freeconsole(void)
+ */
+PHP_FUNCTION(freeconsole)
+{
+ RETURN_BOOL(FreeConsole());
+}
+
+
+/* {{{ proto bool generateconsolectrlevent(int ctrlevent, int processgroupid)
+ */
+PHP_FUNCTION(generateconsolectrlevent)
+{
+ zval **ctrlevent;
+ zval **processgroupid;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &ctrlevent, &processgroupid) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(ctrlevent);
+ convert_to_long_ex(processgroupid);
+
+ RETURN_BOOL(GenerateConsoleCtrlEvent(Z_LVAL_PP(ctrlevent), Z_LVAL_PP(processgroupid)));
+}
+
+
+/* {{{ proto int getconsolecp(void)
+ */
+PHP_FUNCTION(getconsolecp)
+{
+ RETURN_LONG(GetConsoleCP());
+}
+
+
+/* {{{ proto long getconsolecursorsize(int consoleoutput)
+ */
+PHP_FUNCTION(getconsolecursorsize)
+{
+ zval **consoleoutput;
+ CONSOLE_CURSOR_INFO cursorinfo;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ GetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo);
+
+ RETURN_LONG(cursorinfo.dwSize);
+}
+
+
+/* {{{ proto bool getconsolecursorvisible(int consoleoutput)
+ */
+PHP_FUNCTION(getconsolecursorvisible)
+{
+ zval **consoleoutput;
+ CONSOLE_CURSOR_INFO cursorinfo;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ GetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo);
+ RETURN_BOOL(cursorinfo.bVisible);
+}
+
+
+/* {{{ proto int getconsolemode(int consolehandle)
+ */
+PHP_FUNCTION(getconsolemode)
+{
+ zval **consolehandle;
+ DWORD flags;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consolehandle) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consolehandle);
+ GetConsoleMode((HANDLE)Z_LVAL_PP(consolehandle), &flags);
+ RETURN_LONG(flags);
+}
+
+
+/* {{{ proto int getconsoleoutputcp(void)
+ */
+PHP_FUNCTION(getconsoleoutputcp)
+{
+ RETURN_LONG(GetConsoleOutputCP());
+}
+
+
+/* {{{ proto array getconsolescreenbufferinfo(int consoleoutput)
+ */
+PHP_FUNCTION(getconsolescreenbufferinfo)
+{
+
+ zval **consoleoutput;
+ zval *size;
+ zval *cursorposition;
+ zval *srwindow;
+ zval *maxwinsize;
+
+ CONSOLE_SCREEN_BUFFER_INFO bufferinfo;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consoleoutput) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ GetConsoleScreenBufferInfo((HANDLE)Z_LVAL_PP(consoleoutput), &bufferinfo);
+ array_init(return_value);
+
+ MAKE_STD_ZVAL(size);
+ MAKE_STD_ZVAL(cursorposition);
+ MAKE_STD_ZVAL(srwindow);
+ MAKE_STD_ZVAL(maxwinsize);
+
+ array_init(size);
+ array_init(cursorposition);
+ array_init(srwindow);
+ array_init(maxwinsize);
+
+ add_assoc_long(size, "x", bufferinfo.dwSize.X);
+ add_assoc_long(size, "y", bufferinfo.dwSize.Y);
+
+ add_assoc_long(cursorposition, "x", bufferinfo.dwCursorPosition.X);
+ add_assoc_long(cursorposition, "y", bufferinfo.dwCursorPosition.Y);
+
+ add_assoc_zval(return_value, "dwsize", size);
+ add_assoc_zval(return_value, "dwcursorposition", cursorposition);
+
+ add_assoc_long(return_value, "wattributes", bufferinfo.wAttributes);
+
+ add_assoc_long(srwindow, "left", bufferinfo.srWindow.Left);
+ add_assoc_long(srwindow, "top", bufferinfo.srWindow.Top);
+ add_assoc_long(srwindow, "right", bufferinfo.srWindow.Right);
+ add_assoc_long(srwindow, "bottom", bufferinfo.srWindow.Bottom);
+
+ add_assoc_zval(return_value, "srwindow", srwindow);
+
+
+ add_assoc_long(maxwinsize, "x", bufferinfo.dwMaximumWindowSize.X);
+ add_assoc_long(maxwinsize, "y", bufferinfo.dwMaximumWindowSize.Y);
+
+ add_assoc_zval(return_value, "dwmaximumwindowsize", maxwinsize);
+
+}
+
+
+/* {{{ proto string getconsoletitle(int buflen)
+ */
+PHP_FUNCTION(getconsoletitle)
+{
+ char *buffer;
+ DWORD buflen;
+ zval **zbuflen;
+
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &zbuflen) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(zbuflen);
+
+ buflen = (DWORD)Z_LVAL_PP(zbuflen);
+ buffer = emalloc(buflen);
+ GetConsoleTitle(buffer, buflen);
+ ZVAL_STRING(return_value, buffer, TRUE);
+ efree(buffer);
+
+}
+
+
+/* {{{ proto int getnumberofconsoleevents(int consoleinput)
+ */
+PHP_FUNCTION(getnumberofconsoleinputevents)
+{
+ zval **consoleinput;
+ DWORD numberofevents;
+
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &consoleinput) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleinput);
+
+ GetNumberOfConsoleInputEvents((HANDLE)Z_LVAL_PP(consoleinput), &numberofevents);
+ RETURN_LONG(numberofevents);
+}
+
+/* {{{ proto bool setconsolecp(int codepage)
+ */
+PHP_FUNCTION(setconsolecp)
+{
+ zval **codepage;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &codepage) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(codepage);
+ RETURN_BOOL(SetConsoleCP(Z_LVAL_PP(codepage)));
+
+}
+
+
+/* {{{ proto bool writeconsole(int consoleoutput, string str)
+ */
+PHP_FUNCTION(writeconsole)
+{
+ zval **consoleoutput;
+ zval **str;
+ DWORD nNumberOfCharsToWrite; // number of characters to write
+ DWORD NumberOfCharsWritten; // number of characters written
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &consoleoutput, &str) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long_ex(consoleoutput);
+ convert_to_string_ex(str);
+ nNumberOfCharsToWrite = Z_STRLEN_PP(str);
+ RETURN_BOOL(WriteConsole((HANDLE)Z_LVAL_PP(consoleoutput), Z_STRVAL_PP(str), nNumberOfCharsToWrite, &NumberOfCharsWritten, NULL));
+
+}
+
+/* {{{ proto bool setconsoleattribute(int consoleoutput int attributes)
+ */
+PHP_FUNCTION(setconsoletextattribute)
+{
+ zval **consoleoutput;
+ zval **attributes;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &consoleoutput, &attributes) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long_ex(consoleoutput);
+ convert_to_long_ex(attributes);
+ RETURN_BOOL(SetConsoleTextAttribute((HANDLE)Z_LVAL_PP(consoleoutput), (WORD)Z_LVAL_PP(attributes)));
+}
+
+
+/* {{{ proto bool setconsoleoutputcp(int codepageid)
+ */
+PHP_FUNCTION(setconsoleoutputcp)
+{
+ zval **codepageid;
+ int ac=ZEND_NUM_ARGS();
+
+ if (ac != 1 || zend_get_parameters_ex(ac, &codepageid) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ RETURN_BOOL(SetConsoleOutputCP(Z_LVAL_PP(codepageid)));
+}
+
+
+/* {{{ proto bool setstdhandle(int stdhandle, int hHandle)
+ */
+PHP_FUNCTION(setstdhandle)
+{
+ zval **stdhandle;
+ zval **hHandle;
+
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &stdhandle, &hHandle) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long_ex(stdhandle);
+ convert_to_long_ex(hHandle);
+ RETURN_BOOL(SetStdHandle(Z_LVAL_PP(stdhandle), (HANDLE)Z_LVAL_PP(hHandle)));
+}
+
+/* {{{ proto bool setconsolemode(int consolehandle, int mode)
+ */
+PHP_FUNCTION(setconsolemode)
+{
+ zval **consolehandle;
+ zval **mode;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 2 || zend_get_parameters_ex(ac, &consolehandle, &mode) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long_ex(consolehandle);
+ convert_to_long_ex(mode);
+ RETURN_BOOL(SetConsoleMode((HANDLE)Z_LVAL_PP(consolehandle), Z_LVAL_PP(mode)));
+}
+
+/* {{{ proto bool setconsolecursorposition(int consoleoutput, int x, int y)
+ */
+PHP_FUNCTION(setconsolecursorposition)
+{
+ zval **consoleoutput;
+ zval **x;
+ zval **y;
+ COORD coord;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 3 || zend_get_parameters_ex(ac, &consoleoutput, &x, &y) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ convert_to_long_ex(x);
+ convert_to_long_ex(y);
+ coord.X = (short)Z_LVAL_PP(x);
+ coord.Y = (short)Z_LVAL_PP(y);
+ RETURN_BOOL(SetConsoleCursorPosition((HANDLE)Z_LVAL_PP(consoleoutput), coord));
+}
+
+/* {{{ proto bool setconsolecursorinfo(int consoleoutput, int size, bool visible)
+ */
+PHP_FUNCTION(setconsolecursorinfo)
+{
+ zval **consoleoutput;
+ zval **size;
+ zval **visible;
+ CONSOLE_CURSOR_INFO cursorinfo;
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 3 || zend_get_parameters_ex(ac, &consoleoutput, &size, &visible) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ convert_to_long_ex(size);
+ convert_to_boolean_ex(visible);
+ cursorinfo.dwSize = Z_LVAL_PP(size);
+ cursorinfo.bVisible = Z_BVAL_PP(visible);
+ RETURN_BOOL(SetConsoleCursorInfo((HANDLE)Z_LVAL_PP(consoleoutput), &cursorinfo));
+}
+
+/* {{{ proto bool writeconsoleoutputcharacter(int consoleoutput, string arg, int x, int y)
+ */
+PHP_FUNCTION(writeconsoleoutputcharacter)
+{
+ zval **consoleoutput;
+ zval **characters;
+ zval **x;
+ zval **y;
+ COORD coord;
+ int n;
+ int len;
+
+ int ac = ZEND_NUM_ARGS();
+
+ if (ac != 4 || zend_get_parameters_ex(ac, &consoleoutput, &characters, &x, &y) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long_ex(consoleoutput);
+ convert_to_long_ex(x);
+ convert_to_long_ex(y);
+ convert_to_string_ex(characters);
+ len = Z_STRLEN_PP(characters);
+ coord.X = (short)Z_LVAL_PP(x);
+ coord.Y = (short)Z_LVAL_PP(y);
+ RETURN_BOOL(WriteConsoleOutputCharacter((HANDLE)Z_LVAL_PP(consoleoutput), Z_STRVAL_PP(characters), len, coord, &n));
+}
+
+/* }}} */
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/Demos/Bonus/wincon/wincon.dsp b/Source/Demos/Bonus/wincon/wincon.dsp
similarity index 97%
rename from Demos/Bonus/wincon/wincon.dsp
rename to Source/Demos/Bonus/wincon/wincon.dsp
index 3ae22b1..0571990 100644
--- a/Demos/Bonus/wincon/wincon.dsp
+++ b/Source/Demos/Bonus/wincon/wincon.dsp
@@ -1,113 +1,113 @@
-# Microsoft Developer Studio Project File - Name="wincon" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=wincon - Win32 Release_TS
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "wincon.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "wincon.mak" CFG="wincon - Win32 Release_TS"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "wincon - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "wincon - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "wincon - Win32 Release_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release_TS"
-# PROP BASE Intermediate_Dir "Release_TS"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_TS"
-# PROP Intermediate_Dir "Release_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_WINCON" /D ZTS=1 /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINCON_EXPORTS" /D "COMPILE_DL_WINCON" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_WINCON=1 /D "LIBZEND_EXPORTS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x406 /d "NDEBUG"
-# ADD RSC /l 0x406 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_wincon.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
-
-!ELSEIF "$(CFG)" == "wincon - Win32 Debug_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Debug_TS"
-# PROP BASE Intermediate_Dir "Debug_TS"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Debug_TS"
-# PROP Intermediate_Dir "Debug_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_WINCON" /D ZTS=1 /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINCON_EXPORTS" /D "COMPILE_DL_WINCON" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_WINCON=1 /D "LIBZEND_EXPORTS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x406 /d "NDEBUG"
-# ADD RSC /l 0x406 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_wincon.dll" /libpath:"..\..\Debug_TS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "wincon - Win32 Release_TS"
-# Name "wincon - Win32 Debug_TS"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\wincon.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\php_wincon.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="wincon" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=wincon - Win32 Release_TS
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "wincon.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "wincon.mak" CFG="wincon - Win32 Release_TS"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "wincon - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "wincon - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "wincon - Win32 Release_TS"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release_TS"
+# PROP BASE Intermediate_Dir "Release_TS"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_TS"
+# PROP Intermediate_Dir "Release_TS"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_WINCON" /D ZTS=1 /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINCON_EXPORTS" /D "COMPILE_DL_WINCON" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_WINCON=1 /D "LIBZEND_EXPORTS" /FR /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x406 /d "NDEBUG"
+# ADD RSC /l 0x406 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_wincon.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
+
+!ELSEIF "$(CFG)" == "wincon - Win32 Debug_TS"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Debug_TS"
+# PROP BASE Intermediate_Dir "Debug_TS"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Debug_TS"
+# PROP Intermediate_Dir "Debug_TS"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_WINCON" /D ZTS=1 /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINCON_EXPORTS" /D "COMPILE_DL_WINCON" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_WINCON=1 /D "LIBZEND_EXPORTS" /FR /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x406 /d "NDEBUG"
+# ADD RSC /l 0x406 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_wincon.dll" /libpath:"..\..\Debug_TS"
+
+!ENDIF
+
+# Begin Target
+
+# Name "wincon - Win32 Release_TS"
+# Name "wincon - Win32 Debug_TS"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\wincon.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\php_wincon.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Demos/Bonus/wincon/wincon.dsw b/Source/Demos/Bonus/wincon/wincon.dsw
similarity index 94%
rename from Demos/Bonus/wincon/wincon.dsw
rename to Source/Demos/Bonus/wincon/wincon.dsw
index ed47022..6d0218b 100644
--- a/Demos/Bonus/wincon/wincon.dsw
+++ b/Source/Demos/Bonus/wincon/wincon.dsw
@@ -1,29 +1,29 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "wincon"=".\wincon.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "wincon"=".\wincon.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Demos/Bonus/wincon/wincon.rc b/Source/Demos/Bonus/wincon/wincon.rc
similarity index 95%
rename from Demos/Bonus/wincon/wincon.rc
rename to Source/Demos/Bonus/wincon/wincon.rc
index 65d94cb..0cef2a1 100644
--- a/Demos/Bonus/wincon/wincon.rc
+++ b/Source/Demos/Bonus/wincon/wincon.rc
@@ -1,115 +1,115 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-#ifdef _WIN32
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Russian resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Dutch (Belgium) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB)
-#ifdef _WIN32
-LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,0,1
- PRODUCTVERSION 6,2,0,1
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000904b0"
- BEGIN
- VALUE "CompanyName", "Serhiy Perevoznyk"
- VALUE "FileDescription", "Windows Console PHP Extension"
- VALUE "FileVersion", "6, 2, 0, 1"
- VALUE "InternalName", "wincon"
- VALUE "LegalCopyright", "Copyright (C) 2006, Serhiy Perevoznyk"
- VALUE "LegalTrademarks", "PHP4Delphi"
- VALUE "OriginalFilename", "wincon.dll"
- VALUE "ProductName", "PHP4Delphi"
- VALUE "ProductVersion", "6, 2, 0, 1"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x9, 1200
- END
-END
-
-#endif // Dutch (Belgium) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Russian resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+#ifdef _WIN32
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Russian resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Dutch (Belgium) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB)
+#ifdef _WIN32
+LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 6,2,0,1
+ PRODUCTVERSION 6,2,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000904b0"
+ BEGIN
+ VALUE "CompanyName", "Serhiy Perevoznyk"
+ VALUE "FileDescription", "Windows Console PHP Extension"
+ VALUE "FileVersion", "6, 2, 0, 1"
+ VALUE "InternalName", "wincon"
+ VALUE "LegalCopyright", "Copyright (C) 2006, Serhiy Perevoznyk"
+ VALUE "LegalTrademarks", "PHP4Delphi"
+ VALUE "OriginalFilename", "wincon.dll"
+ VALUE "ProductName", "PHP4Delphi"
+ VALUE "ProductVersion", "6, 2, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x9, 1200
+ END
+END
+
+#endif // Dutch (Belgium) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Demos/Bonus/wincon/wincon.sln b/Source/Demos/Bonus/wincon/wincon.sln
similarity index 97%
rename from Demos/Bonus/wincon/wincon.sln
rename to Source/Demos/Bonus/wincon/wincon.sln
index dd403b0..bf20a7e 100644
--- a/Demos/Bonus/wincon/wincon.sln
+++ b/Source/Demos/Bonus/wincon/wincon.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wincon", "wincon.vcproj", "{FA700C0B-DE1A-473D-8FCE-BE984E866697}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_TS|Win32 = Debug_TS|Win32
- Release_TS|Win32 = Release_TS|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Debug_TS|Win32.ActiveCfg = Debug_TS|Win32
- {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Debug_TS|Win32.Build.0 = Debug_TS|Win32
- {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Release_TS|Win32.ActiveCfg = Release_TS|Win32
- {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Release_TS|Win32.Build.0 = Release_TS|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wincon", "wincon.vcproj", "{FA700C0B-DE1A-473D-8FCE-BE984E866697}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_TS|Win32 = Debug_TS|Win32
+ Release_TS|Win32 = Release_TS|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Debug_TS|Win32.ActiveCfg = Debug_TS|Win32
+ {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Debug_TS|Win32.Build.0 = Debug_TS|Win32
+ {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Release_TS|Win32.ActiveCfg = Release_TS|Win32
+ {FA700C0B-DE1A-473D-8FCE-BE984E866697}.Release_TS|Win32.Build.0 = Release_TS|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Demos/Bonus/wincon/wincon.vcproj b/Source/Demos/Bonus/wincon/wincon.vcproj
similarity index 95%
rename from Demos/Bonus/wincon/wincon.vcproj
rename to Source/Demos/Bonus/wincon/wincon.vcproj
index b361d54..3ce8ac8 100644
--- a/Demos/Bonus/wincon/wincon.vcproj
+++ b/Source/Demos/Bonus/wincon/wincon.vcproj
@@ -1,267 +1,267 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr b/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr
new file mode 100644
index 0000000..aedcde9
--- /dev/null
+++ b/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr
@@ -0,0 +1,166 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+library d4pide;
+
+uses
+ Windows, SysUtils, Classes, zendTypes, ZENDAPI, phpTypes, PHPAPI, jclRegistry,
+ jclSysInfo;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PChar('Delphi for PHP support'), PChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+procedure d4p_getversion (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ str : string;
+begin
+ str := '1.0';
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+procedure d4p_getroot (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ str : string;
+begin
+ str := RegReadStringDef(HKEY_CURRENT_USER, 'Software\CodeGear\Delphi for PHP\1.0', 'App', '');
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+procedure d4p_getpackages (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ L : TStringList;
+ cnt : integer;
+begin
+ if _array_init(return_value, nil, 0) = FAILURE then
+ begin
+ php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
+ ZVAL_FALSE(return_value);
+ Exit;
+ end;
+
+ L := TStringList.Create;
+ try
+ RegGetValueNames (HKEY_CURRENT_USER, 'Software\CodeGear\Delphi for PHP\1.0\Packages', L);
+ except
+ L.Clear;
+ end;
+ for cnt := 0 to L.Count - 1 do
+
+ add_next_index_string(return_value, PChar(RegReadString(HKEY_CURRENT_USER, 'Software\CodeGear\Delphi for PHP\1.0\Packages', L[cnt])), 1);
+
+ L.Free;
+end;
+
+procedure d4p_getphpdir (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ str : string;
+begin
+ str := RegReadStringDef(HKEY_CURRENT_USER, 'Software\CodeGear\Delphi for PHP\1.0\Internal webserver', 'PHP Directory', '');
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+procedure d4p_getport (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ str : string;
+begin
+ str := RegReadStringDef(HKEY_CURRENT_USER, 'Software\CodeGear\Delphi for PHP\1.0\Internal webserver', 'Port', '');
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+procedure d4p_isrunning (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+var
+ H : DWORD;
+begin
+ H := GetPidFromProcessName('delphiforphp.exe');
+ if H = INVALID_HANDLE_VALUE then
+ ZVAL_FALSE(return_value)
+ else
+ ZVAL_TRUE(return_value);
+end;
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..6] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'd4pide';
+ ModuleEntry.version := '1.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+
+ Module_entry_table[0].fname := 'd4p_getversion';
+ Module_entry_table[0].handler := @d4p_getversion;
+ Module_entry_table[1].fname := 'd4p_getroot';
+ Module_entry_table[1].handler := @d4p_getroot;
+ Module_entry_table[2].fname := 'd4p_getpackages';
+ Module_entry_table[2].handler := @d4p_getpackages;
+ Module_entry_table[3].fname := 'd4p_getphpdir';
+ Module_entry_table[3].handler := @d4p_getphpdir;
+ Module_entry_table[4].fname := 'd4p_getport';
+ Module_entry_table[4].handler := @d4p_getport;
+ Module_entry_table[5].fname := 'd4p_isrunning';
+ Module_entry_table[5].handler := @d4p_isrunning;
+ Module_entry_table[6].fname := nil;
+ Module_entry_table[6].handler := nil;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos/Delphi4PHP/DesignIDE/readme.txt b/Source/Demos/Delphi4PHP/DesignIDE/readme.txt
new file mode 100644
index 0000000..f51cd9a
--- /dev/null
+++ b/Source/Demos/Delphi4PHP/DesignIDE/readme.txt
@@ -0,0 +1,59 @@
+PHP Extension for "Delphi for PHP"
+
+d4pide.dll is PHP Extension designed for Delphi for PHP.
+This extensions implements additional PHP functions that can be used in PHP scripts.
+
+Functions:
+
+1. d4p_getversion
+This function returns the version of Delphi for PHP
+Example: echo d4p_getversion();
+
+2. d4p_getroot
+This functions returns the root folder of Delphi for PHP
+Example: echo d4p_getroot();
+
+3. d4p_getpackages
+This function returns the list of the installed packages
+Example:
+
+ function Button3Click($sender, $params)
+ {
+ $array = d4p_getpackages();
+ $count = count($array);
+ for ($i = 0; $i < $count; $i++) {
+ $this->Memo1->AddLine($array[$i]) ;
+ }
+ }
+
+4. d4p_getphpdir
+This function returns the PHP root folder
+Example: echo d4p_getphpdir();
+
+5. d4p_getport
+This function returns the port number of the internal web server
+Example: echo d4p_getport();
+
+6. d4p_isrunning
+This function can be used to determine if Delphi for PHP is currently running
+Example:
+ if (d4p_isrunning())
+ {
+ $this->Memo1->AddLine("running");
+ }
+
+
+Installation:
+
+1. Close Delphi for PHP
+2. Copy d4pide.dll to Delphi for PHP \php\ext folder
+3. Add following line to php.ini.template file:
+ extension=d4pide.dll
+4. Launch Delphi for PHP
+
+
+
+Author:
+Serhiy Perevoznyk
+Belgium
+http://users.chello.be/ws36637/
diff --git a/Source/Demos/Extensions/Borland Demo/Unit1.ddp b/Source/Demos/Extensions/Borland Demo/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Extensions/Borland Demo/Unit1.ddp differ
diff --git a/Source/Demos/Extensions/Borland Demo/Unit1.dfm b/Source/Demos/Extensions/Borland Demo/Unit1.dfm
new file mode 100644
index 0000000..e64935b
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/Unit1.dfm
@@ -0,0 +1,139 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ OnCreate = PHPExtensionCreate
+ OnDestroy = PHPExtensionDestroy
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'produce_page'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Action'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'runquery'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'CustNo'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'borland_demo'
+ Height = 640
+ Width = 870
+ object Root: TPageProducer
+ HTMLDoc.Strings = (
+ ''
+ 'PHP Example ( Former ISAPI/NSAPI/CGI Example) '
+ ''
+ 'PHP Example server '
+ ''
+ 'Web Examples '
+ '
'
+ 'TPageProducer using a Custom Tag '
+ 'For an example of using a TPageProducer with a Custom Tag click'
+
+ 'here . This exam' +
+ 'ple returns'
+
+ 'list of all customers from the Customer.DB table. You can click' +
+ ' the customer'#39's'
+ 'name to view a listing of their orders.'
+ '
'
+ 'TDatasetPageProducer '
+
+ 'For an example of using the TDatasetPageProducer and of returnin' +
+ 'g a graphic'
+
+ 'from a table click here' +
+ 'A>. This example'
+
+ 'makes use of the JPeg unit to display a bitmap stored in the gra' +
+ 'phic field of the'
+ 'Biolife.DB table.'
+ ''
+ 'Server Redirect '
+
+ 'Click here for a dem' +
+ 'onstration of'
+ 'how to redirect a use to an other web site. '
+ ''
+ ''
+ ''
+ ''
+ ' '
+ ' ')
+ OnHTMLTag = RootHTMLTag
+ Left = 26
+ Top = 176
+ end
+ object BioLifeProducer: TDataSetPageProducer
+ HTMLDoc.Strings = (
+ ''
+ '
'
+ ' Biolife Data '
+ ''
+ ''
+ '
'
+ ''
+ 'Category: '
+ ''
+ '<#Category> '
+ ' '
+ ''
+ ''
+ 'Common Name: '
+ ''
+ '<#Common_Name> '
+ ' '
+ ''
+ ''
+ 'Notes: '
+ ''
+ '<#Notes> '
+ ' '
+ ''
+ ''
+ 'Picture: '
+ ''
+ '<#Graphic> '
+ ' '
+ '
'
+ ''
+ ''
+ '')
+ Left = 110
+ Top = 126
+ end
+ object CustSource: TDataSource
+ Left = 90
+ Top = 65
+ end
+ object CustomerList: TPageProducer
+ HTMLDoc.Strings = (
+ ''
+ ''
+ ''
+ ''
+ ''
+ 'Sample Delphi Web server application '
+ ''
+ ''
+ 'Customer Order Information '
+ ' '
+ 'Click a customer name to view their orders.'
+ '<#CUSTLIST>
'
+ ''
+ ''
+ ' ')
+ OnHTMLTag = CustomerListHTMLTag
+ Left = 118
+ Top = 9
+ end
+end
diff --git a/Source/Demos/Extensions/Borland Demo/Unit1.dti b/Source/Demos/Extensions/Borland Demo/Unit1.dti
new file mode 100644
index 0000000..69a56ab
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Extensions/Borland Demo/Unit1.pas b/Source/Demos/Extensions/Borland Demo/Unit1.pas
new file mode 100644
index 0000000..686a79e
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/Unit1.pas
@@ -0,0 +1,238 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules, DBWeb, Db, DSProd, HTTPApp, DBTables, Graphics, JPeg,
+ DBBdeWeb, HTTPProd;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ Root: TPageProducer;
+ BioLifeProducer: TDataSetPageProducer;
+ CustSource: TDataSource;
+ CustomerList: TPageProducer;
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure RootHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings;
+ var ReplaceText: String);
+ procedure CustomerListHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings;
+ var ReplaceText: String);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtensionCreate(Sender: TObject);
+ procedure BioLifeGraphicGetText(Sender: TField; var Text: String;
+ DisplayText: Boolean);
+ procedure BioLifeNotesGetText(Sender: TField; var Text: String;
+ DisplayText: Boolean);
+ procedure PHPExtensionDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Action : string;
+ _redirect : PChar;
+ _content_type : PChar;
+ gl : Psapi_globals_struct;
+ ts : pointer;
+ Jpg: TJpegImage;
+ S: TMemoryStream;
+ B: TBitmap;
+
+begin
+ ts := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals;
+
+ Action := Parameters.Values('Action');
+ if Action = '' then
+ begin
+ ReturnValue := Root.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'redirect') then
+ begin
+ _redirect := 'Location: http://www.borland.com';
+ php_header_write(_redirect, strlen(_redirect) + 1, TSRMLS_DC);
+ gl.sapi_headers.http_response_code := 302;
+ Exit;
+ end;
+
+ if SameText(Action, 'customerlist') then
+ begin
+ ReturnValue := CustomerList.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'biolife') then
+ begin
+ ReturnValue := BioLifeProducer.Content;
+ Exit;
+ end;
+
+ if SameText(Action, 'getimage') then
+ begin
+ Jpg := TJpegImage.Create;
+ try
+ B := TBitmap.Create;
+ try
+ B.Assign(BioLifeGraphic);
+ Jpg.Assign(B);
+ finally
+ B.Free;
+ end;
+ S := TMemoryStream.Create;
+ Jpg.SaveToStream(S);
+ S.Position := 0;
+ _content_type := 'Content-type: image/jpeg';
+ php_header_write(_content_type, strlen(_content_type), TSRMLS_DC);
+ php_body_write(PChar(S.memory), S.Size, TSRMLS_DC);
+ S.Free;
+ finally
+ Jpg.Free;
+ end;
+
+ end;
+
+ ReturnValue := 'Unknown action: ' + Action;
+end;
+
+
+
+procedure TPHPExtension1.RootHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings; var ReplaceText: String);
+var
+ gl : Psapi_globals_struct;
+ ts : pointer;
+begin
+
+ if SameText(TagString, 'MODULENAME') then
+ begin
+ ts := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals;
+ ReplaceText := gl.request_info.request_uri;
+ end;
+end;
+
+procedure TPHPExtension1.CustomerListHTMLTag(Sender: TObject; Tag: TTag;
+ const TagString: String; TagParams: TStrings; var ReplaceText: String);
+var
+ Customers: String;
+ Scriptname : string;
+ gl : Psapi_globals_struct;
+ ts : pointer;
+begin
+ ts := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals;
+ ScriptName := gl.request_info.request_uri;
+
+ if CompareText(TagString, 'CUSTLIST') = 0 then
+ begin
+ Customers := '';
+ Customer.First;
+ while not Customer.Eof do
+ begin
+ Customers := Customers + Format('%s ',
+ [ScriptName, CustomerCustNo.AsInteger, CustomerCompany.AsString]);
+ Customer.Next;
+ end;
+ end;
+ ReplaceText := Customers;
+end;
+
+procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ CustNo : string;
+begin
+ CustNo := Parameters.Values('CustNo');
+ if Customer.Locate('CustNo', CustNo, []) then
+ begin
+ CustomerOrders.Header.Clear;
+ CustomerOrders.Header.Add('The following table was produced using a TDatasetTableProducer.
');
+ CustomerOrders.Header.Add('Orders for: ' + CustomerCompany.AsString);
+ ReturnValue := CustomerOrders.Content;
+ end
+ else
+ ReturnValue := Format('
Customer: %s not found ',
+ [CustNo]);
+
+end;
+
+procedure TPHPExtension1.PHPExtensionCreate(Sender: TObject);
+begin
+ Customer.Open;
+ BioLife.Open;
+end;
+
+procedure TPHPExtension1.BioLifeGraphicGetText(Sender: TField;
+ var Text: String; DisplayText: Boolean);
+var
+ Scriptname : string;
+ gl : Psapi_globals_struct;
+ ts : pointer;
+
+begin
+ ts := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals;
+ ScriptName := gl.request_info.request_uri;
+
+ Text := Format(' ',
+ [ScriptName, BiolifeCommon_Name.Text]);
+end;
+
+procedure TPHPExtension1.BioLifeNotesGetText(Sender: TField;
+ var Text: String; DisplayText: Boolean);
+begin
+ Text := Sender.AsString;
+end;
+
+procedure TPHPExtension1.PHPExtensionDestroy(Sender: TObject);
+begin
+ try
+ Database1.Connected := false;
+ except
+ end;
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.dpr b/Source/Demos/Extensions/Borland Demo/borland_demo.dpr
new file mode 100644
index 0000000..f9cbef4
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/borland_demo.dpr
@@ -0,0 +1,16 @@
+library borland_demo;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.dproj b/Source/Demos/Extensions/Borland Demo/borland_demo.dproj
new file mode 100644
index 0000000..d32853c
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/borland_demo.dproj
@@ -0,0 +1,503 @@
+
+
+ {05F350A9-D317-4A71-AB3B-294D6EB85877}
+ borland_demo.dpr
+ True
+ Debug
+ 1
+ Library
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ false
+ borland_demo
+ false
+ false
+ 1058
+ false
+ true
+ false
+ System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl.Imaging;$(DCC_Namespace)
+ 00400000
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+
+
+ Debug
+ 1033
+ borland_demo_Icon.ico
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ borland_demo_Icon.ico
+
+
+ 0
+ RELEASE;$(DCC_Define)
+ false
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+
+ ..\..\..\php4Applications\PHP 5.3.0\php4App.dll
+ ..\..\..\php4Applications\PHP 5.3.0\php4App.dll
+
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ borland_demo.dpr
+
+
+
+ False
+ True
+ False
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ borland_demo.dll
+ true
+
+
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ classes
+ 1
+
+
+
+
+ Contents\MacOS
+ 0
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+
+
+ 0
+
+
+ 1
+ .framework
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 0
+ .bpl
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.dproj.local b/Source/Demos/Extensions/Borland Demo/borland_demo.dproj.local
new file mode 100644
index 0000000..b3811b7
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/borland_demo.dproj.local
@@ -0,0 +1,2 @@
+
+
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.identcache b/Source/Demos/Extensions/Borland Demo/borland_demo.identcache
new file mode 100644
index 0000000..a4de94c
Binary files /dev/null and b/Source/Demos/Extensions/Borland Demo/borland_demo.identcache differ
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.php b/Source/Demos/Extensions/Borland Demo/borland_demo.php
new file mode 100644
index 0000000..4ea9335
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/borland_demo.php
@@ -0,0 +1,18 @@
+
+
+if (isset($_GET) && !empty($_GET['action']))
+ $action = $_GET["action"];
+ else
+ $action = "";
+
+if ($action == "runquery")
+{
+ $id = $_GET["CustNo"];
+ echo runquery($id);
+}
+ else
+ echo produce_page($action);
+
+
+?>
+
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.res b/Source/Demos/Extensions/Borland Demo/borland_demo.res
new file mode 100644
index 0000000..ba6a362
Binary files /dev/null and b/Source/Demos/Extensions/Borland Demo/borland_demo.res differ
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo.stat b/Source/Demos/Extensions/Borland Demo/borland_demo.stat
new file mode 100644
index 0000000..09e68d2
--- /dev/null
+++ b/Source/Demos/Extensions/Borland Demo/borland_demo.stat
@@ -0,0 +1,10 @@
+[Stats]
+EditorSecs=17
+DesignerSecs=1
+InspectorSecs=1
+CompileSecs=1253
+OtherSecs=30
+StartTime=21.09.2018 15:39:40
+RealKeys=0
+EffectiveKeys=0
+DebugSecs=1
diff --git a/Source/Demos/Extensions/Borland Demo/borland_demo_Icon.ico b/Source/Demos/Extensions/Borland Demo/borland_demo_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/Demos/Extensions/Borland Demo/borland_demo_Icon.ico differ
diff --git a/Source/Demos/Extensions/Class demo/class_demo.bdsproj b/Source/Demos/Extensions/Class demo/class_demo.bdsproj
new file mode 100644
index 0000000..59f6d7a
--- /dev/null
+++ b/Source/Demos/Extensions/Class demo/class_demo.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {3EB971ED-0CF5-48F2-AA87-852FC3B9964D}
+
+
+
+
+ class_demo.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Class demo/class_demo.dpr b/Source/Demos/Extensions/Class demo/class_demo.dpr
new file mode 100644
index 0000000..afe9e58
--- /dev/null
+++ b/Source/Demos/Extensions/Class demo/class_demo.dpr
@@ -0,0 +1,16 @@
+library class_demo;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ dm_Class in 'dm_Class.pas' {classdemo: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(Tclassdemo, classdemo);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/Components/ComponentsDemo.res b/Source/Demos/Extensions/Class demo/class_demo.res
similarity index 100%
rename from Demos/psvPHP/Components/ComponentsDemo.res
rename to Source/Demos/Extensions/Class demo/class_demo.res
diff --git a/Source/Demos/Extensions/Class demo/dm_Class.ddp b/Source/Demos/Extensions/Class demo/dm_Class.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Extensions/Class demo/dm_Class.ddp differ
diff --git a/Demos/Extensions/Class demo/dm_Class.dfm b/Source/Demos/Extensions/Class demo/dm_Class.dfm
similarity index 95%
rename from Demos/Extensions/Class demo/dm_Class.dfm
rename to Source/Demos/Extensions/Class demo/dm_Class.dfm
index 8930bb9..2459a68 100644
--- a/Demos/Extensions/Class demo/dm_Class.dfm
+++ b/Source/Demos/Extensions/Class demo/dm_Class.dfm
@@ -1,63 +1,63 @@
-object classdemo: Tclassdemo
- OldCreateOrder = False
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'new_class'
- Tag = 0
- Parameters = <>
- OnExecute = classdemoFunctions0Execute
- end>
- ModuleName = 'class_demo'
- Left = 235
- Top = 225
- Height = 479
- Width = 741
- object PHPDemoClass: TPHPClass
- Properties = <
- item
- Name = 'prop'
- Value = 'hello'
- end>
- Methods = <
- item
- Name = 'get_email'
- Tag = 0
- Parameters = <>
- OnExecute = GetEmailExecute
- end
- item
- Name = 'get_address'
- Tag = 0
- Parameters = <>
- OnExecute = GetAddressExecute
- end
- item
- Name = 'print_text'
- Tag = 0
- Parameters = <
- item
- Name = 'AText'
- ParamType = tpString
- end>
- OnExecute = PrintTextExecute
- end
- item
- Name = 'add_int'
- Tag = 0
- Parameters = <
- item
- Name = 'X'
- ParamType = tpInteger
- end
- item
- Name = 'Y'
- ParamType = tpInteger
- end>
- OnExecute = AddIntExecute
- end>
- PHPClassName = 'demo_class'
- Left = 120
- Top = 48
- end
-end
+object classdemo: Tclassdemo
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'new_class'
+ Tag = 0
+ Parameters = <>
+ OnExecute = classdemoFunctions0Execute
+ end>
+ ModuleName = 'class_demo'
+ Left = 235
+ Top = 225
+ Height = 479
+ Width = 741
+ object PHPDemoClass: TPHPClass
+ Properties = <
+ item
+ Name = 'prop'
+ Value = 'hello'
+ end>
+ Methods = <
+ item
+ Name = 'get_email'
+ Tag = 0
+ Parameters = <>
+ OnExecute = GetEmailExecute
+ end
+ item
+ Name = 'get_address'
+ Tag = 0
+ Parameters = <>
+ OnExecute = GetAddressExecute
+ end
+ item
+ Name = 'print_text'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'AText'
+ ParamType = tpString
+ end>
+ OnExecute = PrintTextExecute
+ end
+ item
+ Name = 'add_int'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'Y'
+ ParamType = tpInteger
+ end>
+ OnExecute = AddIntExecute
+ end>
+ PHPClassName = 'demo_class'
+ Left = 120
+ Top = 48
+ end
+end
diff --git a/Source/Demos/Extensions/Class demo/dm_Class.dti b/Source/Demos/Extensions/Class demo/dm_Class.dti
new file mode 100644
index 0000000..a60ac35
--- /dev/null
+++ b/Source/Demos/Extensions/Class demo/dm_Class.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=classdemo\PHPDemoClass\PHPDemoClass.Methods
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/Class demo/dm_Class.pas b/Source/Demos/Extensions/Class demo/dm_Class.pas
similarity index 87%
rename from Demos/Extensions/Class demo/dm_Class.pas
rename to Source/Demos/Extensions/Class demo/dm_Class.pas
index ce1c304..8388fb5 100644
--- a/Demos/Extensions/Class demo/dm_Class.pas
+++ b/Source/Demos/Extensions/Class demo/dm_Class.pas
@@ -1,101 +1,101 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: dm_Class.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit dm_Class;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- phpClass,
- PHPModules, PHPCommon;
-
-type
-
- Tclassdemo = class(TPHPExtension)
- PHPDemoClass: TPHPClass;
- procedure PrintTextExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
- procedure AddIntExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
- procedure GetAddressExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
- procedure GetEmailExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
- procedure classdemoFunctions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- classdemo: Tclassdemo;
-
-implementation
-
-uses
- Dialogs;
-
-{$R *.DFM}
-
-
-procedure Tclassdemo.PrintTextExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
-begin
- ReturnValue := Parameters[0].Value;
-end;
-
-procedure Tclassdemo.AddIntExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
-begin
- ReturnValue := Parameters[0].Value + Parameters[1].Value;
-end;
-
-procedure Tclassdemo.GetAddressExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
-begin
- ReturnValue := 'www.php.net';
-end;
-
-procedure Tclassdemo.GetEmailExecute(Sender: TPHPClassInstance;
- Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
- this_ptr: Pzval; TSRMLS_DC: Pointer);
-begin
- ReturnValue := 'myaddress@hotmail.com';
-end;
-
-procedure Tclassdemo.classdemoFunctions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- PHPDemoClass.ProduceInstance(Functions[0].ZendVar.AsZendVariable);
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{ $Id: dm_Class.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit dm_Class;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ phpClass,
+ PHPModules, PHPCommon;
+
+type
+
+ Tclassdemo = class(TPHPExtension)
+ PHPDemoClass: TPHPClass;
+ procedure PrintTextExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure AddIntExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure GetAddressExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure GetEmailExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+ procedure classdemoFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ classdemo: Tclassdemo;
+
+implementation
+
+uses
+ Dialogs;
+
+{$R *.DFM}
+
+
+procedure Tclassdemo.PrintTextExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Parameters[0].Value;
+end;
+
+procedure Tclassdemo.AddIntExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Parameters[0].Value + Parameters[1].Value;
+end;
+
+procedure Tclassdemo.GetAddressExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := 'www.php.net';
+end;
+
+procedure Tclassdemo.GetEmailExecute(Sender: TPHPClassInstance;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendValue,
+ this_ptr: Pzval; TSRMLS_DC: Pointer);
+begin
+ ReturnValue := 'myaddress@hotmail.com';
+end;
+
+procedure Tclassdemo.classdemoFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ PHPDemoClass.ProduceInstance(ZendVar.AsZendVariable);
+end;
+
+end.
diff --git a/Source/Demos/Extensions/Class demo/test_class.php b/Source/Demos/Extensions/Class demo/test_class.php
new file mode 100644
index 0000000..604a5c0
--- /dev/null
+++ b/Source/Demos/Extensions/Class demo/test_class.php
@@ -0,0 +1,15 @@
+
+if(!extension_loaded('class_demo')) {
+ dl('class_demo.dll');
+}
+
+$a = new demo_class();
+echo $a->get_email();
+
+echo "\n";
+
+$b = new_class();
+echo $b->prop;
+
+?>
+
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class.bdsproj b/Source/Demos/Extensions/Delphi Class 1/delphi_class.bdsproj
new file mode 100644
index 0000000..16719f2
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {B848790E-DEC6-4533-8556-E0712AB2E529}
+
+
+
+
+ delphi_class.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class.dpr b/Source/Demos/Extensions/Delphi Class 1/delphi_class.dpr
new file mode 100644
index 0000000..5b64f71
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class.dpr
@@ -0,0 +1,16 @@
+library delphi_class;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ delphi_class_module in 'delphi_class_module.pas' {PHDelphiPExtension: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHDelphiPExtension, PHDelphiPExtension);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class.php b/Source/Demos/Extensions/Delphi Class 1/delphi_class.php
new file mode 100644
index 0000000..524c9da
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class.php
@@ -0,0 +1,15 @@
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+$a = delphi_class_create("TButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+delphi_class_free($a);
+
+?>
+
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class.res b/Source/Demos/Extensions/Delphi Class 1/delphi_class.res
new file mode 100644
index 0000000..42a5081
Binary files /dev/null and b/Source/Demos/Extensions/Delphi Class 1/delphi_class.res differ
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.ddp b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.ddp differ
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class_module.dfm b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dfm
similarity index 95%
rename from Demos/Extensions/Delphi Class 1/delphi_class_module.dfm
rename to Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dfm
index 2ad6291..556ee25 100644
--- a/Demos/Extensions/Delphi Class 1/delphi_class_module.dfm
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dfm
@@ -1,91 +1,91 @@
-object PHDelphiPExtension: TPHDelphiPExtension
- OldCreateOrder = False
- OnCreate = PHPExtensionCreate
- Version = '1.0'
- Functions = <
- item
- FunctionName = 'delphi_class_create'
- Tag = 0
- Parameters = <
- item
- Name = 'ClassName'
- ParamType = tpString
- end
- item
- Name = 'ComponentName'
- ParamType = tpString
- end>
- OnExecute = ClassCreateExecute
- end
- item
- FunctionName = 'delphi_get_prop'
- Tag = 0
- Parameters = <
- item
- Name = 'Instance'
- ParamType = tpInteger
- end
- item
- Name = 'PropName'
- ParamType = tpString
- end>
- OnExecute = GetPropertyExecute
- end
- item
- FunctionName = 'delphi_class_free'
- Tag = 0
- Parameters = <
- item
- Name = 'Instance'
- ParamType = tpInteger
- end>
- OnExecute = ClassFreeExecute
- end
- item
- FunctionName = 'delphi_set_prop'
- Tag = 0
- Parameters = <
- item
- Name = 'Instance'
- ParamType = tpInteger
- end
- item
- Name = 'PropName'
- ParamType = tpString
- end
- item
- Name = 'PropValue'
- ParamType = tpString
- end>
- OnExecute = SetPropertyExecute
- end
- item
- FunctionName = 'delphi_form_create'
- Tag = 0
- Parameters = <
- item
- Name = 'ClassName'
- ParamType = tpString
- end
- item
- Name = 'ComponentName'
- ParamType = tpString
- end>
- OnExecute = FormCreateExecute
- end
- item
- FunctionName = 'delphi_message'
- Tag = 0
- Parameters = <
- item
- Name = 'Message'
- ParamType = tpString
- end>
- OnExecute = DelphiMessageExecute
- end>
- ModuleName = 'delphi_class'
- Left = 285
- Top = 161
- Height = 479
- Width = 741
-end
+object PHDelphiPExtension: TPHDelphiPExtension
+ OldCreateOrder = False
+ OnCreate = PHPExtensionCreate
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'delphi_class_create'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'ClassName'
+ ParamType = tpString
+ end
+ item
+ Name = 'ComponentName'
+ ParamType = tpString
+ end>
+ OnExecute = ClassCreateExecute
+ end
+ item
+ FunctionName = 'delphi_get_prop'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'PropName'
+ ParamType = tpString
+ end>
+ OnExecute = GetPropertyExecute
+ end
+ item
+ FunctionName = 'delphi_class_free'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end>
+ OnExecute = ClassFreeExecute
+ end
+ item
+ FunctionName = 'delphi_set_prop'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Instance'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'PropName'
+ ParamType = tpString
+ end
+ item
+ Name = 'PropValue'
+ ParamType = tpString
+ end>
+ OnExecute = SetPropertyExecute
+ end
+ item
+ FunctionName = 'delphi_form_create'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'ClassName'
+ ParamType = tpString
+ end
+ item
+ Name = 'ComponentName'
+ ParamType = tpString
+ end>
+ OnExecute = FormCreateExecute
+ end
+ item
+ FunctionName = 'delphi_message'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Message'
+ ParamType = tpString
+ end>
+ OnExecute = DelphiMessageExecute
+ end>
+ ModuleName = 'delphi_class'
+ Left = 285
+ Top = 161
+ Height = 479
+ Width = 741
+end
diff --git a/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dti b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dti
new file mode 100644
index 0000000..5187263
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHDelphiPExtension\PHDelphiPExtension.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/Delphi Class 1/delphi_class_module.pas b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.pas
similarity index 85%
rename from Demos/Extensions/Delphi Class 1/delphi_class_module.pas
rename to Source/Demos/Extensions/Delphi Class 1/delphi_class_module.pas
index d338d33..94b4902 100644
--- a/Demos/Extensions/Delphi Class 1/delphi_class_module.pas
+++ b/Source/Demos/Extensions/Delphi Class 1/delphi_class_module.pas
@@ -1,341 +1,341 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{ This example is suitable only for Delphi 7 or higher }
-{*******************************************************}
-{$I PHP.INC}
-
-unit delphi_class_module;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- Dialogs,
- TypInfo,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- stdctrls,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHDelphiPExtension = class(TPHPExtension)
- procedure DelphiMessageExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- procedure FormCreateExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- procedure SetPropertyExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- procedure ClassFreeExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- procedure PHPExtensionCreate(Sender: TObject);
- procedure GetPropertyExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- procedure ClassCreateExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-
-{$IFDEF VERSION7}
-type
-{$METHODINFO ON}
- TPHPButton = class(TButton)
- private
- FScriptText: string;
- procedure SetScriptText(const Value: string);
- public
- function GetClassName : String;
- procedure Click; override;
- published
- property Parent;
- property ScriptText : string read FScriptText write SetScriptText;
- end;
-
- TPHPForm = class(TCustomForm)
- public
- procedure Show;
- function ShowModal: Integer; override;
- published
- property Action;
- property ActiveControl;
- property Align;
- property AlphaBlend default False;
- property AlphaBlendValue default 255;
- property Anchors;
- property AutoScroll;
- property AutoSize;
- property BiDiMode;
- property BorderIcons;
- property BorderStyle;
- property BorderWidth;
- property Caption;
- property ClientHeight;
- property ClientWidth;
- property Color;
- property TransparentColor default False;
- property TransparentColorValue default 0;
- property Constraints;
- property Ctl3D;
- property UseDockManager;
- property DefaultMonitor;
- property DockSite;
- property DragKind;
- property DragMode;
- property Enabled;
- property ParentFont default False;
- property Font;
- property FormStyle;
- property Height;
- property HelpFile;
- property HorzScrollBar;
- property Icon;
- property KeyPreview;
- property Menu;
- property OldCreateOrder;
- property ObjectMenuItem;
- property ParentBiDiMode;
- property PixelsPerInch;
- property PopupMenu;
- property Position;
- property PrintScale;
- property Scaled;
- property ScreenSnap default False;
- property ShowHint;
- property SnapBuffer default 10;
- property VertScrollBar;
- property Visible;
- property Width;
- property WindowState;
- property WindowMenu;
- property OnActivate;
- property OnCanResize;
- property OnClick;
- property OnClose;
- property OnCloseQuery;
- property OnConstrainedResize;
- property OnContextPopup;
- property OnCreate;
- property OnDblClick;
- property OnDestroy;
- property OnDeactivate;
- property OnDockDrop;
- property OnDockOver;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDock;
- property OnGetSiteInfo;
- property OnHide;
- property OnHelp;
- property OnKeyDown;
- property OnKeyPress;
- property OnKeyUp;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnMouseWheel;
- property OnMouseWheelDown;
- property OnMouseWheelUp;
- property OnPaint;
- property OnResize;
- property OnShortCut;
- property OnShow;
- property OnStartDock;
- property OnUnDock;
- end;
-{$METHODINFO OFF}
-{$ENDIF}
-
-var
- PHDelphiPExtension: TPHDelphiPExtension;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHDelphiPExtension.ClassCreateExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-
-var
- CN : string;
- DC : TComponentClass;
- PC : TPersistentClass;
- obj : TComponent;
-begin
- CN := Parameters[0].ZendVariable.AsString;
- if CN = '' then
- begin
- ReturnValue := 0;
- Exit;
- end;
-
- PC := FindClass(CN);
- if PC.InheritsFrom(TComponent) then
- DC := TComponentClass(PC)
- else
- begin
- ReturnValue := 0;
- Exit;
- end;
- //create Delphi class instance
-
- if DC <> nil then
- begin
- obj := DC.Create(nil);
- obj.Name := Parameters[1].ZendVariable.AsString;
- ReturnValue := integer(Obj);
- end
- else
- ReturnValue := 0;
-end;
-
-procedure TPHDelphiPExtension.GetPropertyExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-var
- Obj : TObject;
- PN : String;
-begin
- obj := TObject(Parameters[0].ZendVariable.AsInteger);
- PN := Parameters[1].ZendVariable.AsString;
- ReturnValue := GetPropValue(Obj, PN, true);
-end;
-
-procedure TPHDelphiPExtension.ClassFreeExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-begin
- TObject(Parameters[0].ZendVariable.AsInteger).Free;
-end;
-
-procedure TPHDelphiPExtension.SetPropertyExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-var
- Obj : TObject;
- PN : String;
-begin
- obj := TObject(Parameters[0].ZendVariable.AsInteger);
- PN := Parameters[1].ZendVariable.AsString;
- SetPropValue(Obj, PN, Parameters[2].Value );
-end;
-
-procedure TPHDelphiPExtension.FormCreateExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-var
- CN : string;
- PC : TPersistentClass;
- obj : TComponent;
-begin
- CN := Parameters[0].ZendVariable.AsString;
- if CN = '' then
- begin
- ReturnValue := 0;
- Exit;
- end;
-
- PC := FindClass(CN);
- if not PC.InheritsFrom(TCustomForm) then
- begin
- ReturnValue := 0;
- Exit;
- end;
- //create Delphi class instance
-
- if PC <> nil then
- begin
- obj := TCustomFormClass(PC).CreateNew(nil);
- obj.Name := Parameters[1].ZendVariable.AsString;
- ReturnValue := integer(Obj);
- end
- else
- ReturnValue := 0;
-end;
-
-procedure TPHDelphiPExtension.DelphiMessageExecute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
- TSRMLS_DC: Pointer);
-begin
- ShowMessage(Parameters[0].ZendVariable.AsString);
-end;
-
-procedure TPHDelphiPExtension.PHPExtensionCreate(Sender: TObject);
-begin
- {$IFDEF VERSION7}
- RegisterClass(TButton);
- RegisterClass(TPHPButton);
- RegisterClass(TPHPForm);
- {$ENDIF}
-end;
-
-{$IFDEF VERSION7}
-{ TPHPButton }
-
-function TPHPButton.GetClassName: String;
-begin
- Result := ClassName;
-end;
-
-
-procedure TPHPButton.Click;
-begin
- inherited;
- if FScriptText <> '' then
- begin
- zend_eval_string(PChar(FScriptText), nil, 'delphi', ts_resource(0));
- end;
-end;
-
-procedure TPHPButton.SetScriptText(const Value: string);
-var
- L : integer;
-begin
- if FScriptText <> Value then
- begin
- L := Length(Value);
- SetLength(FScriptText, L);
- Move(Value[1], FScriptText[1], L);
- end;
-end;
-
-{ TPHPForm }
-
-procedure TPHPForm.Show;
-begin
- inherited Show;
-end;
-
-function TPHPForm.ShowModal: Integer;
-begin
- Result := inherited ShowModal;
-end;
-
-{$ENDIF}
-
-end.
-
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{ This example is suitable only for Delphi 7 or higher }
+{*******************************************************}
+{$I PHP.INC}
+
+unit delphi_class_module;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ Dialogs,
+ TypInfo,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ stdctrls,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHDelphiPExtension = class(TPHPExtension)
+ procedure DelphiMessageExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure FormCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure SetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure ClassFreeExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure PHPExtensionCreate(Sender: TObject);
+ procedure GetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ procedure ClassCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+
+{$IFDEF VERSION7}
+type
+{$METHODINFO ON}
+ TPHPButton = class(TButton)
+ private
+ FScriptText: string;
+ procedure SetScriptText(const Value: string);
+ public
+ function GetClassName : String;
+ procedure Click; override;
+ published
+ property Parent;
+ property ScriptText : string read FScriptText write SetScriptText;
+ end;
+
+ TPHPForm = class(TCustomForm)
+ public
+ procedure Show;
+ function ShowModal: Integer; override;
+ published
+ property Action;
+ property ActiveControl;
+ property Align;
+ property AlphaBlend default False;
+ property AlphaBlendValue default 255;
+ property Anchors;
+ property AutoScroll;
+ property AutoSize;
+ property BiDiMode;
+ property BorderIcons;
+ property BorderStyle;
+ property BorderWidth;
+ property Caption;
+ property ClientHeight;
+ property ClientWidth;
+ property Color;
+ property TransparentColor default False;
+ property TransparentColorValue default 0;
+ property Constraints;
+ property Ctl3D;
+ property UseDockManager;
+ property DefaultMonitor;
+ property DockSite;
+ property DragKind;
+ property DragMode;
+ property Enabled;
+ property ParentFont default False;
+ property Font;
+ property FormStyle;
+ property Height;
+ property HelpFile;
+ property HorzScrollBar;
+ property Icon;
+ property KeyPreview;
+ property Menu;
+ property OldCreateOrder;
+ property ObjectMenuItem;
+ property ParentBiDiMode;
+ property PixelsPerInch;
+ property PopupMenu;
+ property Position;
+ property PrintScale;
+ property Scaled;
+ property ScreenSnap default False;
+ property ShowHint;
+ property SnapBuffer default 10;
+ property VertScrollBar;
+ property Visible;
+ property Width;
+ property WindowState;
+ property WindowMenu;
+ property OnActivate;
+ property OnCanResize;
+ property OnClick;
+ property OnClose;
+ property OnCloseQuery;
+ property OnConstrainedResize;
+ property OnContextPopup;
+ property OnCreate;
+ property OnDblClick;
+ property OnDestroy;
+ property OnDeactivate;
+ property OnDockDrop;
+ property OnDockOver;
+ property OnDragDrop;
+ property OnDragOver;
+ property OnEndDock;
+ property OnGetSiteInfo;
+ property OnHide;
+ property OnHelp;
+ property OnKeyDown;
+ property OnKeyPress;
+ property OnKeyUp;
+ property OnMouseDown;
+ property OnMouseMove;
+ property OnMouseUp;
+ property OnMouseWheel;
+ property OnMouseWheelDown;
+ property OnMouseWheelUp;
+ property OnPaint;
+ property OnResize;
+ property OnShortCut;
+ property OnShow;
+ property OnStartDock;
+ property OnUnDock;
+ end;
+{$METHODINFO OFF}
+{$ENDIF}
+
+var
+ PHDelphiPExtension: TPHDelphiPExtension;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHDelphiPExtension.ClassCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+var
+ CN : string;
+ DC : TComponentClass;
+ PC : TPersistentClass;
+ obj : TComponent;
+begin
+ CN := Parameters[0].ZendVariable.AsString;
+ if CN = '' then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+
+ PC := FindClass(CN);
+ if PC.InheritsFrom(TComponent) then
+ DC := TComponentClass(PC)
+ else
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+ //create Delphi class instance
+
+ if DC <> nil then
+ begin
+ obj := DC.Create(nil);
+ obj.Name := Parameters[1].ZendVariable.AsString;
+ ReturnValue := integer(Obj);
+ end
+ else
+ ReturnValue := 0;
+end;
+
+procedure TPHDelphiPExtension.GetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Obj : TObject;
+ PN : String;
+begin
+ obj := TObject(Parameters[0].ZendVariable.AsInteger);
+ PN := Parameters[1].ZendVariable.AsString;
+ ReturnValue := GetPropValue(Obj, PN, true);
+end;
+
+procedure TPHDelphiPExtension.ClassFreeExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ TObject(Parameters[0].ZendVariable.AsInteger).Free;
+end;
+
+procedure TPHDelphiPExtension.SetPropertyExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ Obj : TObject;
+ PN : String;
+begin
+ obj := TObject(Parameters[0].ZendVariable.AsInteger);
+ PN := Parameters[1].ZendVariable.AsString;
+ SetPropValue(Obj, PN, Parameters[2].Value );
+end;
+
+procedure TPHDelphiPExtension.FormCreateExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ CN : string;
+ PC : TPersistentClass;
+ obj : TComponent;
+begin
+ CN := Parameters[0].ZendVariable.AsString;
+ if CN = '' then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+
+ PC := FindClass(CN);
+ if not PC.InheritsFrom(TCustomForm) then
+ begin
+ ReturnValue := 0;
+ Exit;
+ end;
+ //create Delphi class instance
+
+ if PC <> nil then
+ begin
+ obj := TCustomFormClass(PC).CreateNew(nil);
+ obj.Name := Parameters[1].ZendVariable.AsString;
+ ReturnValue := integer(Obj);
+ end
+ else
+ ReturnValue := 0;
+end;
+
+procedure TPHDelphiPExtension.DelphiMessageExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ShowMessage(Parameters[0].ZendVariable.AsString);
+end;
+
+procedure TPHDelphiPExtension.PHPExtensionCreate(Sender: TObject);
+begin
+ {$IFDEF VERSION7}
+ RegisterClass(TButton);
+ RegisterClass(TPHPButton);
+ RegisterClass(TPHPForm);
+ {$ENDIF}
+end;
+
+{$IFDEF VERSION7}
+{ TPHPButton }
+
+function TPHPButton.GetClassName: String;
+begin
+ Result := ClassName;
+end;
+
+
+procedure TPHPButton.Click;
+begin
+ inherited;
+ if FScriptText <> '' then
+ begin
+ zend_eval_string(PChar(FScriptText), nil, 'delphi', ts_resource(0));
+ end;
+end;
+
+procedure TPHPButton.SetScriptText(const Value: string);
+var
+ L : integer;
+begin
+ if FScriptText <> Value then
+ begin
+ L := Length(Value);
+ SetLength(FScriptText, L);
+ Move(Value[1], FScriptText[1], L);
+ end;
+end;
+
+{ TPHPForm }
+
+procedure TPHPForm.Show;
+begin
+ inherited Show;
+end;
+
+function TPHPForm.ShowModal: Integer;
+begin
+ Result := inherited ShowModal;
+end;
+
+{$ENDIF}
+
+end.
+
+
diff --git a/Source/Demos/Extensions/Delphi Class 1/readme.txt b/Source/Demos/Extensions/Delphi Class 1/readme.txt
new file mode 100644
index 0000000..118018b
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 1/readme.txt
@@ -0,0 +1 @@
+This demo can be compiled using Delphi 7 or higher
\ No newline at end of file
diff --git a/Demos/Extensions/Delphi Class 2/delphi_class.php b/Source/Demos/Extensions/Delphi Class 2/delphi_class.php
similarity index 94%
rename from Demos/Extensions/Delphi Class 2/delphi_class.php
rename to Source/Demos/Extensions/Delphi Class 2/delphi_class.php
index 09355f3..a11c098 100644
--- a/Demos/Extensions/Delphi Class 2/delphi_class.php
+++ b/Source/Demos/Extensions/Delphi Class 2/delphi_class.php
@@ -1,42 +1,42 @@
-
-if(!extension_loaded('delphi_class')) {
- dl('delphi_class.dll');
-}
-
-if(!extension_loaded('delphi_class2')) {
- dl('delphi_class2.dll');
-}
-
-$a = delphi_class_create("TPHPButton", 'btnOK');
-delphi_set_prop($a, "Caption", "OK");
-echo delphi_get_prop($a, "Caption");
-
-echo "\n";
-
-
-$b = register_delphi_object($a);
-$b->Caption = "Cancel";
-echo $b->caption;
-
-echo "\n";
-
-echo $b->GetClassName();
-
-
-$f = delphi_form_create("TPHPForm", "MyForm");
-$form = register_delphi_object($f);
-$form->Caption = "This is a Delphi form!";
-$form->BorderStyle = 3;
-$form->Color = 333;
-$form->Position = 4;
-$b->Parent = $f;
-$b->Left = 20;
-$b->Top = 50;
-$b->ScriptText = "delphi_message('Hello');";
-$form->ShowModal();
-
-delphi_class_free($a);
-delphi_class_free($f);
-
-?>
-
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+if(!extension_loaded('delphi_class2')) {
+ dl('delphi_class2.dll');
+}
+
+$a = delphi_class_create("TPHPButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+
+$b = register_delphi_object($a);
+$b->Caption = "Cancel";
+echo $b->caption;
+
+echo "\n";
+
+echo $b->GetClassName();
+
+
+$f = delphi_form_create("TPHPForm", "MyForm");
+$form = register_delphi_object($f);
+$form->Caption = "This is a Delphi form!";
+$form->BorderStyle = 3;
+$form->Color = 333;
+$form->Position = 4;
+$b->Parent = $f;
+$b->Left = 20;
+$b->Top = 50;
+$b->ScriptText = "delphi_message('Hello');";
+$form->ShowModal();
+
+delphi_class_free($a);
+delphi_class_free($f);
+
+?>
+
diff --git a/Source/Demos/Extensions/Delphi Class 2/delphi_class2.bdsproj b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.bdsproj
new file mode 100644
index 0000000..8385cdd
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {BE9C0535-8C1A-4BD3-AF69-5693722CD69C}
+
+
+
+
+ delphi_class2.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/Extensions/Delphi Class 2/delphi_class2.dpr b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
similarity index 54%
rename from Demos/Extensions/Delphi Class 2/delphi_class2.dpr
rename to Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
index 082ca7a..cb67916 100644
--- a/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
+++ b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
@@ -1,81 +1,123 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{$I php.inc}
-
-library delphi_class2;
-
-uses
- Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, DelphiFunctions;
-
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('Delphi classes support'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RegisterInternalClasses(TSRMLS_DC);
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-
-
-var
- moduleEntry : Tzend_module_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- InitDelphiFunctions;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'delphi_class2';
- ModuleEntry.version := '1.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
- ModuleEntry.functions := @DelphiTable[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- Result := @ModuleEntry;
-end;
-
-
-
-exports
- get_module;
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+library delphi_class2;
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI, DelphiFunctions;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('Delphi classes support'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterInternalClasses(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ DelphiTable : array [0..12] of zend_function_entry;
+
+
+procedure InitDelphiFunctions;
+begin
+ PHP_FUNCTION(DelphiTable[0], 'delphi_date', @delphi_date);
+ PHP_FUNCTION(DelphiTable[1], 'delphi_extract_file_dir', @delphi_extract_file_dir);
+ PHP_FUNCTION(DelphiTable[2], 'delphi_extract_file_drive', @delphi_extract_file_drive);
+ PHP_FUNCTION(DelphiTable[3], 'delphi_extract_file_name', @delphi_extract_file_name);
+
+ DelphiTable[4].fname := 'delphi_extract_file_ext';
+ DelphiTable[4].handler := @delphi_extract_file_ext;
+ DelphiTable[4].arg_info := nil;
+
+ DelphiTable[5].fname := 'delphi_show_message';
+ DelphiTable[5].handler := @delphi_show_message;}
+ DelphiTable[5].arg_info := nil;
+
+ DelphiTable[6].fname := 'register_delphi_object';
+ delphitable[6].handler := @register_delphi_object;
+ DelphiTable[6].arg_info := nil;
+
+ DelphiTable[7].fname := 'delphi_get_author';
+ DelphiTable[7].handler := @delphi_get_author;
+ DelphiTable[7].arg_info := nil;}
+
+ DelphiTable[8].fname := 'delphi_str_date';
+ DelphiTable[8].handler := @delphi_str_date;
+ DelphiTable[8].arg_info := nil;
+
+
+ PHP_FUNCTION(DelphiTable[9], 'delphi_get_system_directory', @delphi_get_system_directory);
+
+
+ PHP_FUNCTION(DelphiTable[10], 'delphi_input_box', @delphi_input_box);
+ PHP_FUNCTION(DelphiTable[11], 'register_delphi_component', @register_delphi_component);
+ DelphiTable[12].fname := nil;
+ DelphiTable[12].handler := nil;
+end;
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ InitDelphiFunctions;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'delphi_class2';
+ ModuleEntry.version := '1.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ ModuleEntry.functions := @DelphiTable[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos/Extensions/Delphi Class 2/delphi_class2.php b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.php
new file mode 100644
index 0000000..6c0f3a8
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.php
@@ -0,0 +1,26 @@
+
+if(!extension_loaded('delphi_class')) {
+ dl('delphi_class.dll');
+}
+
+if(!extension_loaded('delphi_class2')) {
+ dl('delphi_class2.dll');
+}
+
+$a = delphi_class_create("TButton", 'btnOK');
+delphi_set_prop($a, "Caption", "OK");
+echo delphi_get_prop($a, "Caption");
+
+echo "\n";
+
+
+$b = register_delphi_object($a);
+$b->caption = "Cancel";
+echo $b->caption;
+
+echo "\n";
+
+delphi_class_free($a);
+
+?>
+
diff --git a/Source/Demos/Extensions/Delphi Class 2/readme.txt b/Source/Demos/Extensions/Delphi Class 2/readme.txt
new file mode 100644
index 0000000..118018b
--- /dev/null
+++ b/Source/Demos/Extensions/Delphi Class 2/readme.txt
@@ -0,0 +1 @@
+This demo can be compiled using Delphi 7 or higher
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Math/delphi_math.bdsproj b/Source/Demos/Extensions/Math/delphi_math.bdsproj
new file mode 100644
index 0000000..7a2c949
--- /dev/null
+++ b/Source/Demos/Extensions/Math/delphi_math.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {76B976FD-F727-4D1C-BFA4-DB8AC75FEE33}
+
+
+
+
+ delphi_math.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Math/delphi_math.dpr b/Source/Demos/Extensions/Math/delphi_math.dpr
new file mode 100644
index 0000000..bbab1b8
--- /dev/null
+++ b/Source/Demos/Extensions/Math/delphi_math.dpr
@@ -0,0 +1,16 @@
+library delphi_math;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ extmain in 'extmain.pas' {MathExtension: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TMathExtension, MathExtension);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/Library demo/Project1.res b/Source/Demos/Extensions/Math/delphi_math.res
similarity index 100%
rename from Demos/psvPHP/Library demo/Project1.res
rename to Source/Demos/Extensions/Math/delphi_math.res
diff --git a/Source/Demos/Extensions/Math/extmain.ddp b/Source/Demos/Extensions/Math/extmain.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/Extensions/Math/extmain.ddp differ
diff --git a/Source/Demos/Extensions/Math/extmain.dfm b/Source/Demos/Extensions/Math/extmain.dfm
new file mode 100644
index 0000000..0d81aa0
--- /dev/null
+++ b/Source/Demos/Extensions/Math/extmain.dfm
@@ -0,0 +1,50 @@
+object MathExtension: TMathExtension
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'delphi_sin'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = SinExecute
+ end
+ item
+ FunctionName = 'delphi_cosh'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = CoshExecute
+ end
+ item
+ FunctionName = 'delphi_arcsin'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = ArcsinExecute
+ end
+ item
+ FunctionName = 'delphi_arccosh'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end>
+ OnExecute = ArccoshExecute
+ end>
+ ModuleName = 'delphi_math'
+ Left = 619
+ Top = 344
+ Height = 266
+ Width = 269
+end
diff --git a/Source/Demos/Extensions/Math/extmain.dti b/Source/Demos/Extensions/Math/extmain.dti
new file mode 100644
index 0000000..978bf1b
--- /dev/null
+++ b/Source/Demos/Extensions/Math/extmain.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=MathExtension\MathExtension.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Extensions/Math/extmain.pas b/Source/Demos/Extensions/Math/extmain.pas
new file mode 100644
index 0000000..ddb3402
--- /dev/null
+++ b/Source/Demos/Extensions/Math/extmain.pas
@@ -0,0 +1,86 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: extmain.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit extmain;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules,
+ math;
+
+type
+
+ TMathExtension = class(TPHPExtension)
+ procedure SinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure CoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure ArcsinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure ArccoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MathExtension: TMathExtension;
+
+implementation
+
+{$R *.DFM}
+
+procedure TMathExtension.SinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Sin(Parameters[0].ZendVariable.AsFloat);
+end;
+
+procedure TMathExtension.CoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := Cosh(Parameters[0].Value);
+end;
+
+procedure TMathExtension.ArcsinExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := ArcSin(Parameters[0].value);
+end;
+
+procedure TMathExtension.ArccoshExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := ArcCosh(Parameters[0].ZendVariable.AsFloat);
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Math/test_math.php b/Source/Demos/Extensions/Math/test_math.php
new file mode 100644
index 0000000..bbd4dfe
--- /dev/null
+++ b/Source/Demos/Extensions/Math/test_math.php
@@ -0,0 +1,30 @@
+
+if(!extension_loaded('delphi_math')) {
+ dl('delphi_math.dll');
+}
+
+
+$module = 'delphi_math';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+echo "Sin(90.0) = ";
+$str = delphi_sin(90.0);
+echo "$str\n";
+
+echo "Cosh(45.0) = ";
+$str = delphi_cosh(45.0);
+echo "$str\n\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Source/Demos/Extensions/Read array parameters/Unit1.ddp b/Source/Demos/Extensions/Read array parameters/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/Extensions/Read array parameters/Unit1.ddp differ
diff --git a/Source/Demos/Extensions/Read array parameters/Unit1.dfm b/Source/Demos/Extensions/Read array parameters/Unit1.dfm
new file mode 100644
index 0000000..d1309d2
--- /dev/null
+++ b/Source/Demos/Extensions/Read array parameters/Unit1.dfm
@@ -0,0 +1,25 @@
+object OneWireWrapper: TOneWireWrapper
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'blah'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'i'
+ ParamType = tpInteger
+ end
+ item
+ Name = 'a'
+ ParamType = tpArray
+ end>
+ OnExecute = OneWireWrapperFunctions0Execute
+ Description = 'Test function for passing arrays'
+ end>
+ ModuleName = 'rarp'
+ Left = 192
+ Top = 114
+ Height = 150
+ Width = 215
+end
diff --git a/Source/Demos/Extensions/Read array parameters/Unit1.pas b/Source/Demos/Extensions/Read array parameters/Unit1.pas
new file mode 100644
index 0000000..46d4e03
--- /dev/null
+++ b/Source/Demos/Extensions/Read array parameters/Unit1.pas
@@ -0,0 +1,68 @@
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TOneWireWrapper = class(TPHPExtension)
+ procedure OneWireWrapperFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ OneWireWrapper: TOneWireWrapper;
+
+implementation
+
+{$R *.DFM}
+
+procedure TOneWireWrapper.OneWireWrapperFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ variable : pzval;
+ ar : array of string;
+ cnt : integer;
+ tmp : ^ppzval;
+begin
+ //This function reads array parameter
+ variable := Parameters.ParamByName('a').ZendValue;
+ if variable^._type = IS_ARRAY then
+ begin
+ SetLength(ar, zend_hash_num_elements(variable^.value.ht));
+ for cnt := 0 to zend_hash_num_elements(variable^.value.ht) -1 do
+ begin
+ new(tmp);
+ zend_hash_index_find(variable^.value.ht, cnt, tmp);
+ ar[cnt] := tmp^^^.value.str.val;
+ freemem(tmp);
+ end;
+ //Array is stored now in "ar" variable
+ //Lets do something with it
+ ReturnValue := '';
+ for cnt := 0 to Length(ar) - 1 do
+ ReturnValue := ReturnValue + ar[cnt];
+ end
+ else
+ ReturnValue := '';
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Read array parameters/rarp.bdsproj b/Source/Demos/Extensions/Read array parameters/rarp.bdsproj
new file mode 100644
index 0000000..482c70a
--- /dev/null
+++ b/Source/Demos/Extensions/Read array parameters/rarp.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {A3128904-5DE3-4F1F-ABFE-87F1D36DCF4F}
+
+
+
+
+ rarp.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Read array parameters/rarp.dpr b/Source/Demos/Extensions/Read array parameters/rarp.dpr
new file mode 100644
index 0000000..b4402d8
--- /dev/null
+++ b/Source/Demos/Extensions/Read array parameters/rarp.dpr
@@ -0,0 +1,16 @@
+library rarp;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {OneWireWrapper: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TOneWireWrapper, OneWireWrapper);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/php4DelphiR7.res b/Source/Demos/Extensions/Read array parameters/rarp.res
similarity index 54%
rename from php4DelphiR7.res
rename to Source/Demos/Extensions/Read array parameters/rarp.res
index 622f41e..1228533 100644
Binary files a/php4DelphiR7.res and b/Source/Demos/Extensions/Read array parameters/rarp.res differ
diff --git a/Source/Demos/Extensions/Read array parameters/rarptest.php b/Source/Demos/Extensions/Read array parameters/rarptest.php
new file mode 100644
index 0000000..a2c0aa7
--- /dev/null
+++ b/Source/Demos/Extensions/Read array parameters/rarptest.php
@@ -0,0 +1,13 @@
+
+
+//Load extension here... etc....
+
+if(!extension_loaded('rarp')) {
+ dl('rarp.dll');
+}
+
+$a = blah(1,array('a','b','c'));
+echo $a;
+
+?>
+
\ No newline at end of file
diff --git a/Source/Demos/Extensions/Resources/Unit1.ddp b/Source/Demos/Extensions/Resources/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/Extensions/Resources/Unit1.ddp differ
diff --git a/Demos/Extensions/Resources/Unit1.dfm b/Source/Demos/Extensions/Resources/Unit1.dfm
similarity index 95%
rename from Demos/Extensions/Resources/Unit1.dfm
rename to Source/Demos/Extensions/Resources/Unit1.dfm
index c04518d..a7b9ee7 100644
--- a/Demos/Extensions/Resources/Unit1.dfm
+++ b/Source/Demos/Extensions/Resources/Unit1.dfm
@@ -1,27 +1,27 @@
-object res_module: Tres_module
- OldCreateOrder = False
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'res_create'
- Tag = 0
- Parameters = <>
- OnExecute = PHPExtension1Functions0Execute
- end
- item
- FunctionName = 'res_get'
- Tag = 0
- Parameters = <
- item
- Name = 'Param1'
- ParamType = tpInteger
- end>
- OnExecute = PHPExtension1Functions1Execute
- end>
- ModuleName = 'res_ext'
- OnModuleInit = PHPExtensionModuleInit
- Left = 192
- Top = 160
- Height = 150
- Width = 215
-end
+object res_module: Tres_module
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'res_create'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'res_get'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpInteger
+ end>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'res_ext'
+ OnModuleInit = PHPExtensionModuleInit
+ Left = 192
+ Top = 160
+ Height = 150
+ Width = 215
+end
diff --git a/Demos/Extensions/phpDLL/Unit1.dti b/Source/Demos/Extensions/Resources/Unit1.dti
similarity index 91%
rename from Demos/Extensions/phpDLL/Unit1.dti
rename to Source/Demos/Extensions/Resources/Unit1.dti
index e053eae..aa0c5c1 100644
--- a/Demos/Extensions/phpDLL/Unit1.dti
+++ b/Source/Demos/Extensions/Resources/Unit1.dti
@@ -1,41 +1,41 @@
-[Designer]
-Version=1
-Left=285
-Top=161
-Width=741
-Height=479
-Splitter=185
-SelectedTab=Components
-
-[Components]
-Version=1
-Left=0
-Top=0
-
-[TreeView]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-PrintSelected=0
-PrintVisible=0
-ExpandedItems=
-
-[DataDiagrams]
-Version=1
-PrintHeader=1
-PrintToSingle=1
-PrintToFile=0
-PrintBorders=1
-Left=0
-Top=0
-ModeSelected=SelectionMode
-Count=1
-
-[DataDiagrams.Diagram.0]
-Islands=
-Comments=
-Bridges=
-Alludes=
-
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/Resources/Unit1.pas b/Source/Demos/Extensions/Resources/Unit1.pas
similarity index 75%
rename from Demos/Extensions/Resources/Unit1.pas
rename to Source/Demos/Extensions/Resources/Unit1.pas
index 06a760e..09e4e0a 100644
--- a/Demos/Extensions/Resources/Unit1.pas
+++ b/Source/Demos/Extensions/Resources/Unit1.pas
@@ -1,93 +1,94 @@
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- Tres_module = class(TPHPExtension)
- procedure PHPExtensionModuleInit(Sender: TObject; TSRMLS_DC: Pointer);
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- res_module: Tres_module;
-
-type
- PMyResource = ^TMyResource;
- TMyResource = record
- resource_link : integer;
- resource_string : PChar;
- end;
-
-implementation
-
-{$R *.DFM}
-
-var
- le_myresource : integer;
-
-const
- le_myresource_name = 'My type of resource';
-
-procedure my_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
-var
- my_resource : PMyResource;
-begin
- my_resource := rsrc^.ptr;
- my_resource.resource_string := nil;
-end;
-
-procedure Tres_module.PHPExtensionModuleInit(Sender: TObject;
- TSRMLS_DC: Pointer);
-begin
- le_myresource := zend_register_list_destructors_ex(@my_destructor_handler, nil, PChar(le_myresource_name), Application.ModuleNumber);
-end;
-
-procedure Tres_module.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- rc : PMyResource;
- rn : integer;
-begin
- rc := emalloc(sizeof(TMyResource));
- rc^.resource_link := 1;
- rc^.resource_string := 'Hello';
- rn := zend_register_resource(Functions[0].ZendVar.AsZendVariable, rc, le_myresource);
- ZVAL_RESOURCE(Functions[0].ZendVar.AsZendVariable, rn);
-end;
-
-procedure Tres_module.PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- rc : PMyResource;
-
-begin
- rc := zend_fetch_resource(@Parameters[0].ZendValue, TSRMLS_DC, -1, 'my resource', nil, 1, le_myresource);
- ReturnValue := String(rc^.resource_string);
-end;
-
-end.
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ Tres_module = class(TPHPExtension)
+ procedure PHPExtensionModuleInit(Sender: TObject; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ res_module: Tres_module;
+
+type
+ PMyResource = ^TMyResource;
+ TMyResource = record
+ resource_link : integer;
+ resource_string : PChar;
+ end;
+
+implementation
+
+{$R *.DFM}
+
+var
+ le_myresource : integer;
+
+const
+ le_myresource_name = 'My type of resource';
+
+procedure my_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
+var
+ my_resource : PMyResource;
+begin
+ my_resource := rsrc^.ptr;
+ my_resource.resource_string := nil;
+end;
+
+procedure Tres_module.PHPExtensionModuleInit(Sender: TObject;
+ TSRMLS_DC: Pointer);
+begin
+ le_myresource := zend_register_list_destructors_ex(@my_destructor_handler, nil, PChar(le_myresource_name), Application.ModuleNumber);
+end;
+
+procedure Tres_module.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ rc : PMyResource;
+ rn : integer;
+begin
+ rc := emalloc(sizeof(TMyResource));
+ rc^.resource_link := 1;
+ rc^.resource_string := 'Hello';
+ rn := zend_register_resource(ZendVar.AsZendVariable, rc, le_myresource);
+ ZVAL_RESOURCE(ZendVar.AsZendVariable, rn);
+end;
+
+procedure Tres_module.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ rc : PMyResource;
+ Z : PZVAL;
+begin
+ Z := Parameters[0].ZendValue;
+ rc := zend_fetch_resource(@Z, TSRMLS_DC, -1, 'my resource', nil, 1, le_myresource);
+ ReturnValue := String(rc^.resource_string);
+end;
+
+end.
diff --git a/Source/Demos/Extensions/Resources/res_ext.bdsproj b/Source/Demos/Extensions/Resources/res_ext.bdsproj
new file mode 100644
index 0000000..56f22f4
--- /dev/null
+++ b/Source/Demos/Extensions/Resources/res_ext.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9836EED5-B9F3-443C-A00F-4D45AC1BE0B9}
+
+
+
+
+ res_ext.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/Resources/res_ext.dpr b/Source/Demos/Extensions/Resources/res_ext.dpr
new file mode 100644
index 0000000..cb198ea
--- /dev/null
+++ b/Source/Demos/Extensions/Resources/res_ext.dpr
@@ -0,0 +1,16 @@
+library res_ext;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {res_module: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(Tres_module, res_module);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/php4DelphiD7.res b/Source/Demos/Extensions/Resources/res_ext.res
similarity index 54%
rename from php4DelphiD7.res
rename to Source/Demos/Extensions/Resources/res_ext.res
index 622f41e..1228533 100644
Binary files a/php4DelphiD7.res and b/Source/Demos/Extensions/Resources/res_ext.res differ
diff --git a/Source/Demos/Extensions/Resources/test_resource.php b/Source/Demos/Extensions/Resources/test_resource.php
new file mode 100644
index 0000000..6313579
--- /dev/null
+++ b/Source/Demos/Extensions/Resources/test_resource.php
@@ -0,0 +1,21 @@
+
+if(!extension_loaded('res_ext')) {
+ dl('res_ext.dll');
+}
+
+$module = 'res_ext';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+
+$i = res_create();
+echo res_get($i);
+
+
+
+?>
diff --git a/Source/Demos/Extensions/array result/Unit1.ddp b/Source/Demos/Extensions/array result/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/Extensions/array result/Unit1.ddp differ
diff --git a/Demos/Extensions/array result/Unit1.dfm b/Source/Demos/Extensions/array result/Unit1.dfm
similarity index 95%
rename from Demos/Extensions/array result/Unit1.dfm
rename to Source/Demos/Extensions/array result/Unit1.dfm
index c19ced5..36000be 100644
--- a/Demos/Extensions/array result/Unit1.dfm
+++ b/Source/Demos/Extensions/array result/Unit1.dfm
@@ -1,22 +1,22 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'get_month_names'
- Tag = 0
- Parameters = <>
- OnExecute = PHPExtension1Functions0Execute
- end
- item
- FunctionName = 'get_year_info'
- Tag = 0
- Parameters = <>
- OnExecute = PHPExtension1Functions1Execute
- end>
- ModuleName = 'rarray'
- Left = 311
- Top = 296
- Height = 500
- Width = 624
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'get_month_names'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions0Execute
+ end
+ item
+ FunctionName = 'get_year_info'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPExtension1Functions1Execute
+ end>
+ ModuleName = 'rarray'
+ Left = 311
+ Top = 296
+ Height = 500
+ Width = 624
+end
diff --git a/Demos/Extensions/array result/Unit1.pas b/Source/Demos/Extensions/array result/Unit1.pas
similarity index 83%
rename from Demos/Extensions/array result/Unit1.pas
rename to Source/Demos/Extensions/array result/Unit1.pas
index 9a38069..6b1e46d 100644
--- a/Demos/Extensions/array result/Unit1.pas
+++ b/Source/Demos/Extensions/array result/Unit1.pas
@@ -1,112 +1,112 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-
-var
- pval : pzval;
- cnt : integer;
-begin
- // Function get_my_array returns an array as result
- // This demo shows how to use zend variable and work with complex
- // PHP types
-
- pval := Functions[0].ZendVar.AsZendVariable;
- if _array_init(pval, nil, 0) = FAILURE then
- begin
- php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
- ZVAL_FALSE(pval);
- Exit;
- end;
-
- for cnt := 1 to 12 do
- begin
- add_next_index_string(pval, PChar(LongMonthNames[cnt]), 1);
- end;
-
-end;
-
-procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- pval : pzval;
- cnt : integer;
- months : pzval;
- smonths : pzval;
-begin
- pval := Functions[1].ZendVar.AsZendVariable;
- if _array_init(pval, nil, 0) = FAILURE then
- begin
- php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
- ZVAL_FALSE(pval);
- Exit;
- end;
-
- months := MAKE_STD_ZVAL;
- smonths := MAKE_STD_ZVAL;
-
- _array_init(months, nil, 0);
- _array_init(smonths, nil, 0);
-
- for cnt := 1 to 12 do
- begin
- add_next_index_string(months, PChar(LongMonthNames[cnt]), 1);
- add_next_index_string(smonths, PChar(ShortMonthNames[cnt]), 1);
- end;
-
- add_assoc_zval_ex(pval, 'months', strlen('months') + 1, months);
- add_assoc_zval_ex(pval, 'abbrevmonths', strlen('abbrevmonths') + 1, smonths);
-
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+var
+ pval : pzval;
+ cnt : integer;
+begin
+ // Function get_my_array returns an array as result
+ // This demo shows how to use zend variable and work with complex
+ // PHP types
+
+ pval := ZendVar.AsZendVariable;
+ if _array_init(pval, nil, 0) = FAILURE then
+ begin
+ php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
+ ZVAL_FALSE(pval);
+ Exit;
+ end;
+
+ for cnt := 1 to 12 do
+ begin
+ add_next_index_string(pval, PChar(LongMonthNames[cnt]), 1);
+ end;
+
+end;
+
+procedure TPHPExtension1.PHPExtension1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ pval : pzval;
+ cnt : integer;
+ months : pzval;
+ smonths : pzval;
+begin
+ pval := ZendVar.AsZendVariable;
+ if _array_init(pval, nil, 0) = FAILURE then
+ begin
+ php_error_docref(nil , TSRMLS_DC, E_ERROR, 'Unable to initialize array');
+ ZVAL_FALSE(pval);
+ Exit;
+ end;
+
+ months := MAKE_STD_ZVAL;
+ smonths := MAKE_STD_ZVAL;
+
+ _array_init(months, nil, 0);
+ _array_init(smonths, nil, 0);
+
+ for cnt := 1 to 12 do
+ begin
+ add_next_index_string(months, PChar(LongMonthNames[cnt]), 1);
+ add_next_index_string(smonths, PChar(ShortMonthNames[cnt]), 1);
+ end;
+
+ add_assoc_zval_ex(pval, 'months', strlen('months') + 1, months);
+ add_assoc_zval_ex(pval, 'abbrevmonths', strlen('abbrevmonths') + 1, smonths);
+
+end;
+
end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/array result/rarray.bdsproj b/Source/Demos/Extensions/array result/rarray.bdsproj
new file mode 100644
index 0000000..3178fb8
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {623FFC65-09C5-4426-8422-F7AB0072B09F}
+
+
+
+
+ rarray.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/array result/rarray.dpr b/Source/Demos/Extensions/array result/rarray.dpr
new file mode 100644
index 0000000..0590f3e
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.dpr
@@ -0,0 +1,16 @@
+library rarray;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/array result/rarray.dproj b/Source/Demos/Extensions/array result/rarray.dproj
new file mode 100644
index 0000000..cbba566
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.dproj
@@ -0,0 +1,112 @@
+
+
+ {623FFC65-09C5-4426-8422-F7AB0072B09F}
+ rarray.dpr
+ True
+ Debug
+ 1
+ Library
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ false
+ true
+ 00400000
+ 1
+ true
+ rarray
+ System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ 1
+ 2057
+ false
+ false
+
+
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ rarray_Icon.ico
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Debug
+
+
+ rarray_Icon.ico
+
+
+ RELEASE;$(DCC_Define)
+ 0
+ false
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ TPHPExtension
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ rarray.dpr
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/Demos/Extensions/array result/rarray.dproj.local b/Source/Demos/Extensions/array result/rarray.dproj.local
new file mode 100644
index 0000000..b3811b7
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.dproj.local
@@ -0,0 +1,2 @@
+
+
diff --git a/Source/Demos/Extensions/array result/rarray.identcache b/Source/Demos/Extensions/array result/rarray.identcache
new file mode 100644
index 0000000..46a0cdd
Binary files /dev/null and b/Source/Demos/Extensions/array result/rarray.identcache differ
diff --git a/Source/Demos/Extensions/array result/rarray.php b/Source/Demos/Extensions/array result/rarray.php
new file mode 100644
index 0000000..9920e28
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.php
@@ -0,0 +1,31 @@
+
+
+if(!extension_loaded('rarray')) {
+ dl('rarray.dll');
+}
+
+
+$ar = get_month_names();
+
+for ($i=0; $i<12; $i++):
+ $x = $i + 1;
+ echo sprintf("%02d : ", $x);
+ print "$ar[$i]\n";
+endfor;
+
+$ar2 = get_year_info();
+$months = $ar2["months"];
+$smonths = $ar2["abbrevmonths"];
+
+echo "\n";
+
+
+for ($i=0; $i<12; $i++):
+ $x = $i + 1;
+ echo sprintf("%02d : ", $x);
+ echo sprintf("%12s : ", $months[$i]);
+ print "$smonths[$i]\n";
+endfor;
+
+?>
+
diff --git a/Source/Demos/Extensions/array result/rarray.res b/Source/Demos/Extensions/array result/rarray.res
new file mode 100644
index 0000000..b09fbd1
Binary files /dev/null and b/Source/Demos/Extensions/array result/rarray.res differ
diff --git a/Source/Demos/Extensions/array result/rarray.stat b/Source/Demos/Extensions/array result/rarray.stat
new file mode 100644
index 0000000..167b96e
--- /dev/null
+++ b/Source/Demos/Extensions/array result/rarray.stat
@@ -0,0 +1,10 @@
+[Stats]
+EditorSecs=105
+DesignerSecs=1
+InspectorSecs=1
+CompileSecs=1376
+OtherSecs=22
+StartTime=17.02.2019 15:06:21
+RealKeys=0
+EffectiveKeys=0
+DebugSecs=1
diff --git a/Source/Demos/Extensions/array result/rarray_Icon.ico b/Source/Demos/Extensions/array result/rarray_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/Demos/Extensions/array result/rarray_Icon.ico differ
diff --git a/Source/Demos/Extensions/css/CREDITS b/Source/Demos/Extensions/css/CREDITS
new file mode 100644
index 0000000..493ec68
--- /dev/null
+++ b/Source/Demos/Extensions/css/CREDITS
@@ -0,0 +1 @@
+css
\ No newline at end of file
diff --git a/Source/Demos/Extensions/css/EXPERIMENTAL b/Source/Demos/Extensions/css/EXPERIMENTAL
new file mode 100644
index 0000000..e69de29
diff --git a/Source/Demos/Extensions/css/css.bdsproj b/Source/Demos/Extensions/css/css.bdsproj
new file mode 100644
index 0000000..601da01
--- /dev/null
+++ b/Source/Demos/Extensions/css/css.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {CE16E83A-351C-422B-9201-84377F49BCEF}
+
+
+
+
+ css.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/Extensions/css/css.dpr b/Source/Demos/Extensions/css/css.dpr
similarity index 89%
rename from Demos/Extensions/css/css.dpr
rename to Source/Demos/Extensions/css/css.dpr
index 59a0944..0b04986 100644
--- a/Demos/Extensions/css/css.dpr
+++ b/Source/Demos/Extensions/css/css.dpr
@@ -1,120 +1,127 @@
-(*
- +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2002 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.02 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available at through the world-wide-web at |
- | http://www.php.net/license/2_02.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Colin Viebrock |
- +----------------------------------------------------------------------+
-*)
-
-{$I PHP.INC}
-
-library css;
-
-uses
- Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
-
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('Delphi CSS'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-procedure delphi_css(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-
-procedure Puts(Str : string);
-begin
- str := StringReplace(str, '\n', #13#10, [rfReplaceAll]);
- php_body_write(Pchar(str), Length(str), TSRMLS_DC);
-end;
-
-begin
- PUTS('body {background-color: #ffffff; color: #000000;}\n');
- PUTS('body, td, th, h1, h2 {font-family: sans-serif;}\n');
- PUTS('pre {margin: 0px; font-family: monospace;}\n');
- PUTS('a:link {color: #000099; text-decoration: none;}\n');
- PUTS('a:hover {text-decoration: underline;}\n');
- PUTS('table {border-collapse: collapse;}\n');
- PUTS('.center {text-align: center;}\n');
- PUTS('.center table { margin-left: auto; margin-right: auto; text-align: left;}\n');
- PUTS('.center th { text-align: center; !important }\n');
- PUTS('td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}\n');
- PUTS('h1 {font-size: 150%;}\n');
- PUTS('h2 {font-size: 125%;}\n');
- PUTS('.p {text-align: left;}\n');
- PUTS('.e {background-color: #ccccff; font-weight: bold;}\n');
- PUTS('.h {background-color: #9999cc; font-weight: bold;}\n');
- PUTS('.v {background-color: #cccccc;}\n');
- PUTS('i {color: #666666;}\n');
- PUTS('img {float: right; border: 0px;}\n');
- PUTS('hr {width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;}\n');
-end;
-
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..1] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'css';
- ModuleEntry.version := '0.0';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- module_entry_table[0].fname := 'delphi_css';
- module_entry_table[0].handler := @delphi_css;
- module_entry_table[0].func_arg_types := nil;
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- result := @ModuleEntry;
-end;
-
-exports
- get_module;
-
-
-end.
-
-
-
+(*
+ +----------------------------------------------------------------------+
+ | PHP Version 4 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2002 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.02 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Colin Viebrock |
+ +----------------------------------------------------------------------+
+*)
+
+{$I PHP.INC}
+
+library css;
+
+uses
+ Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('Delphi CSS'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+procedure delphi_css(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+
+procedure Puts(Str : string);
+begin
+ str := StringReplace(str, '\n', #13#10, [rfReplaceAll]);
+ php_body_write(PAnsiChar(str), Length(str), TSRMLS_DC);
+end;
+
+begin
+ PUTS('body {background-color: #ffffff; color: #000000;}\n');
+ PUTS('body, td, th, h1, h2 {font-family: sans-serif;}\n');
+ PUTS('pre {margin: 0px; font-family: monospace;}\n');
+ PUTS('a:link {color: #000099; text-decoration: none;}\n');
+ PUTS('a:hover {text-decoration: underline;}\n');
+ PUTS('table {border-collapse: collapse;}\n');
+ PUTS('.center {text-align: center;}\n');
+ PUTS('.center table { margin-left: auto; margin-right: auto; text-align: left;}\n');
+ PUTS('.center th { text-align: center; !important }\n');
+ PUTS('td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}\n');
+ PUTS('h1 {font-size: 150%;}\n');
+ PUTS('h2 {font-size: 125%;}\n');
+ PUTS('.p {text-align: left;}\n');
+ PUTS('.e {background-color: #ccccff; font-weight: bold;}\n');
+ PUTS('.h {background-color: #9999cc; font-weight: bold;}\n');
+ PUTS('.v {background-color: #cccccc;}\n');
+ PUTS('i {color: #666666;}\n');
+ PUTS('img {float: right; border: 0px;}\n');
+ PUTS('hr {width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;}\n');
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'css';
+ ModuleEntry.version := '0.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ module_entry_table[0].fname := 'delphi_css';
+ module_entry_table[0].handler := @delphi_css;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+exports
+ get_module;
+
+
+end.
+
+
+
diff --git a/Source/Demos/Extensions/css/css.dproj b/Source/Demos/Extensions/css/css.dproj
new file mode 100644
index 0000000..b32fbbe
--- /dev/null
+++ b/Source/Demos/Extensions/css/css.dproj
@@ -0,0 +1,99 @@
+
+
+ {CE16E83A-351C-422B-9201-84377F49BCEF}
+ css.dpr
+ True
+ Debug
+ 1
+ Library
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ false
+ css
+ false
+ 2057
+ true
+ false
+ System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ true
+ false
+ 1
+ 00400000
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+
+
+ Debug
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+
+
+ 0
+ RELEASE;$(DCC_Define)
+ false
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ css.dpr
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/Demos/Extensions/css/css.dproj.local b/Source/Demos/Extensions/css/css.dproj.local
new file mode 100644
index 0000000..b3811b7
--- /dev/null
+++ b/Source/Demos/Extensions/css/css.dproj.local
@@ -0,0 +1,2 @@
+
+
diff --git a/Source/Demos/Extensions/css/css.identcache b/Source/Demos/Extensions/css/css.identcache
new file mode 100644
index 0000000..d847324
Binary files /dev/null and b/Source/Demos/Extensions/css/css.identcache differ
diff --git a/Source/Demos/Extensions/css/css.res b/Source/Demos/Extensions/css/css.res
new file mode 100644
index 0000000..4adeb59
Binary files /dev/null and b/Source/Demos/Extensions/css/css.res differ
diff --git a/Source/Demos/Extensions/css/css.stat b/Source/Demos/Extensions/css/css.stat
new file mode 100644
index 0000000..39291fb
--- /dev/null
+++ b/Source/Demos/Extensions/css/css.stat
@@ -0,0 +1,10 @@
+[Stats]
+EditorSecs=50
+DesignerSecs=1
+InspectorSecs=5
+CompileSecs=307
+OtherSecs=34
+StartTime=21.09.2018 15:41:42
+RealKeys=0
+EffectiveKeys=0
+DebugSecs=1
diff --git a/Demos/Extensions/killer/CREDITS b/Source/Demos/Extensions/killer/CREDITS
similarity index 100%
rename from Demos/Extensions/killer/CREDITS
rename to Source/Demos/Extensions/killer/CREDITS
diff --git a/Demos/Extensions/killer/ProcessViewer.pas b/Source/Demos/Extensions/killer/ProcessViewer.pas
similarity index 96%
rename from Demos/Extensions/killer/ProcessViewer.pas
rename to Source/Demos/Extensions/killer/ProcessViewer.pas
index 3029fa1..cfb44fa 100644
--- a/Demos/Extensions/killer/ProcessViewer.pas
+++ b/Source/Demos/Extensions/killer/ProcessViewer.pas
@@ -1,234 +1,234 @@
-{
- ProcessViewer Unit V1.0
- by Leo, March 2001
-
- See the file ProcessViewer.txt for informations about the properties and methods.
-}
-
-unit ProcessViewer;
-
-interface
-
-uses
- Windows, SysUtils, Forms, Classes, ShellAPI, TLHelp32;
-
-const
- SleepForReCheck = 5000;
-
-type
- TProcessInfo = record
- FileName : String;
- Caption : String;
- Visible : Boolean;
- Handle : DWord;
- PClass : String;
- ThreadID : DWord;
- PID : DWord;
- end;
-
-
-var
- PI_DateiList,
- PI_CaptionList,
- PI_VisibleList,
- PI_HandleList,
- PI_ClassList,
- PI_ThreadIdList,
- PI_PIDList : TStringList;
- ProcessInfo : Array of TProcessInfo;
-
-function EnumWindowsProc(hWnd: HWnd; lParam: LPARAM): Boolean; stdcall;
-function GetFileNameFromHandle(Handle: HWnd): String;
-procedure GetProcessList;
-function IsFileActive(FileName: String): Boolean;
-function KillProcessByFileName(FileName: String; KillAll: Boolean): Boolean;
-function KillProcessByPID(PID: DWord): Boolean;
-
-implementation
-
-function EnumWindowsProc(hWnd: HWnd; lParam: LPARAM): Boolean;
-var
- Capt,
- Cla : Array[0..255] of Char;
- Datei : String;
- ident : DWord;
-begin
- GetWindowText( hWnd, Capt, 255 );
- GetClassName( hwnd, Cla, 255 );
- PI_ThreadIdList.Add( IntToStr( GetWindowThreadProcessId( hwnd, nil ) ) );
- Datei := GetFileNameFromHandle( hwnd );
- PI_DateiList.Add( Datei );
- PI_HandleList.Add( IntToStr( HWnd ) );
- if IsWindowVisible( HWnd ) then
- PI_VisibleList.Add( '1' )
- else
- PI_VisibleList.Add( '0' );
- PI_ClassList.Add( Cla );
- PI_CaptionList.Add( Capt );
- GetWindowThreadProcessId( StrToInt( PI_HandleList[PI_HandleList.Count - 1] ), @ident );
- PI_PIDList.Add( IntToStr( ident ) );
- Result := True;
-end;
-
-function GetFileNameFromHandle(Handle: HWnd): String;
-var
- PID : DWord;
- aSnapShotHandle : THandle;
- ContinueLoop : Boolean;
- aProcessEntry32 : TProcessEntry32;
-begin
- GetWindowThreadProcessID( Handle, @PID );
- aSnapShotHandle := CreateToolHelp32SnapShot( TH32CS_SNAPPROCESS, 0 );
- try
- aProcessEntry32.dwSize := Sizeof( aProcessEntry32 );
- ContinueLoop := Process32First( aSnapShotHandle, aProcessEntry32 );
- while Integer( ContinueLoop ) <> 0 do
- begin
- if aProcessEntry32.th32ProcessID = PID then
- begin
- Result := aProcessEntry32.szExeFile;
- Break;
- end;
- ContinueLoop := Process32Next( aSnapShotHandle, aProcessEntry32 );
- end;
- finally
- CloseHandle( aSnapShotHandle );
- end;
-end;
-
-procedure GetProcessList;
-var
- i,
- Laenge : Integer;
-begin
- PI_DateiList.Clear;
- PI_HandleList.Clear;
- PI_ClassList.Clear;
- PI_CaptionList.Clear;
- PI_VisibleList.Clear;
- PI_ThreadIdList.Clear;
- PI_PIDList.Clear;
- EnumWindows( @EnumWindowsProc, 0 );
- Laenge := PI_DateiList.Count;
- SetLength( ProcessInfo,Laenge );
- for i := 0 to Laenge - 1 do
- begin
- PI_DateiList[i] := UpperCase( PI_DateiList[i] );
- with ProcessInfo[i] do
- begin
- FileName := PI_DateiList[i];
- Caption := PI_CaptionList[i];
- Visible := PI_VisibleList[i] = '1';
- Handle := StrToInt64( PI_HandleList[i] );
- PClass := PI_ClassList[i];
- ThreadID := StrToInt64( PI_ThreadIdList[i] );
- PID := StrToInt64( PI_PIDList[i] );
- end;
- end;
-end;
-
-function IsFileActive(FileName: String): Boolean;
-var
- i : Integer;
-begin
- Result := False;
- if FileName = '' then
- Exit;
- GetProcessList;
- FileName := UpperCase( ExtractFileName( FileName ) );
- for i := 0 to Length( ProcessInfo ) - 1 do
- begin
- if Pos( FileName, ProcessInfo[i].FileName ) > 0 then
- begin
- Result := True;
- Break;
- end;
- end;
-end;
-
-function KillProcessByFileName(FileName: String; KillAll: Boolean): Boolean;
-var
- i : Integer;
- FileFound : Boolean;
-begin
- Result := False;
- if FileName = '' then
- Exit;
- FileName := UpperCase( ExtractFileName( FileName ) );
- Result := True;
- GetProcessList;
- if KillAll then
- begin
- //Kill all
- repeat
- GetProcessList;
- FileFound := False;
- for i := 0 to PI_DateiList.Count - 1 do
- begin
- if Pos( Filename, PI_DateiList[i] ) > 0 then
- begin
- FileFound := True;
- Break;
- end;
- end;
- if i < PI_DateiList.Count then
- begin
- if not KillProcessByPID( StrToInt64( PI_PIDList[i] ) ) then
- begin
- Result := False;
- Exit;
- end;
- end;
- until not FileFound;
- end
- else
- begin
- //Kill one
- for i := 0 to PI_DateiList.Count - 1 do
- begin
- if Pos( Filename, PI_DateiList[i] ) > 0 then
- Break;
- end;
- if i < PI_DateiList.Count then
- begin
- if not KillProcessByPID( StrToInt64( PI_PIDList[i] ) ) then
- begin
- Result := False;
- Exit;
- end;
- end;
- end;
-end;
-
-function KillProcessByPID(PID: DWord): Boolean;
-var
- myhandle : THandle;
- i : Integer;
-begin
- myhandle := OpenProcess( PROCESS_TERMINATE, False, PID );
- TerminateProcess( myhandle, 0 );
- for i := 0 to SleepForReCheck do
- Application.ProcessMessages; //Genug Zeit geben
- GetProcessList;
- Result := PI_PIDList.IndexOf( IntToStr( PID ) ) = -1;
-end;
-
-initialization
- PI_DateiList := TStringList.Create;
- PI_HandleList := TStringList.Create;
- PI_ClassList := TStringList.Create;
- PI_CaptionList := TStringList.Create;
- PI_VisibleList := TStringList.Create;
- PI_ThreadIdList := TStringList.Create;
- PI_PIDList := TStringList.Create;
-
-finalization
- PI_DateiList.Free;
- PI_HandleList.Free;
- PI_ClassList.Free;
- PI_CaptionList.Free;
- PI_VisibleList.Free;
- PI_ThreadIdList.Free;
- PI_PIDList.Free;
-
-end.
+{
+ ProcessViewer Unit V1.0
+ by Leo, March 2001
+
+ See the file ProcessViewer.txt for informations about the properties and methods.
+}
+
+unit ProcessViewer;
+
+interface
+
+uses
+ Windows, SysUtils, Forms, Classes, ShellAPI, TLHelp32;
+
+const
+ SleepForReCheck = 5000;
+
+type
+ TProcessInfo = record
+ FileName : String;
+ Caption : String;
+ Visible : Boolean;
+ Handle : DWord;
+ PClass : String;
+ ThreadID : DWord;
+ PID : DWord;
+ end;
+
+
+var
+ PI_DateiList,
+ PI_CaptionList,
+ PI_VisibleList,
+ PI_HandleList,
+ PI_ClassList,
+ PI_ThreadIdList,
+ PI_PIDList : TStringList;
+ ProcessInfo : Array of TProcessInfo;
+
+function EnumWindowsProc(hWnd: HWnd; lParam: LPARAM): Boolean; stdcall;
+function GetFileNameFromHandle(Handle: HWnd): String;
+procedure GetProcessList;
+function IsFileActive(FileName: String): Boolean;
+function KillProcessByFileName(FileName: String; KillAll: Boolean): Boolean;
+function KillProcessByPID(PID: DWord): Boolean;
+
+implementation
+
+function EnumWindowsProc(hWnd: HWnd; lParam: LPARAM): Boolean;
+var
+ Capt,
+ Cla : Array[0..255] of Char;
+ Datei : String;
+ ident : DWord;
+begin
+ GetWindowText( hWnd, Capt, 255 );
+ GetClassName( hwnd, Cla, 255 );
+ PI_ThreadIdList.Add( IntToStr( GetWindowThreadProcessId( hwnd, nil ) ) );
+ Datei := GetFileNameFromHandle( hwnd );
+ PI_DateiList.Add( Datei );
+ PI_HandleList.Add( IntToStr( HWnd ) );
+ if IsWindowVisible( HWnd ) then
+ PI_VisibleList.Add( '1' )
+ else
+ PI_VisibleList.Add( '0' );
+ PI_ClassList.Add( Cla );
+ PI_CaptionList.Add( Capt );
+ GetWindowThreadProcessId( StrToInt( PI_HandleList[PI_HandleList.Count - 1] ), @ident );
+ PI_PIDList.Add( IntToStr( ident ) );
+ Result := True;
+end;
+
+function GetFileNameFromHandle(Handle: HWnd): String;
+var
+ PID : DWord;
+ aSnapShotHandle : THandle;
+ ContinueLoop : Boolean;
+ aProcessEntry32 : TProcessEntry32;
+begin
+ GetWindowThreadProcessID( Handle, @PID );
+ aSnapShotHandle := CreateToolHelp32SnapShot( TH32CS_SNAPPROCESS, 0 );
+ try
+ aProcessEntry32.dwSize := Sizeof( aProcessEntry32 );
+ ContinueLoop := Process32First( aSnapShotHandle, aProcessEntry32 );
+ while Integer( ContinueLoop ) <> 0 do
+ begin
+ if aProcessEntry32.th32ProcessID = PID then
+ begin
+ Result := aProcessEntry32.szExeFile;
+ Break;
+ end;
+ ContinueLoop := Process32Next( aSnapShotHandle, aProcessEntry32 );
+ end;
+ finally
+ CloseHandle( aSnapShotHandle );
+ end;
+end;
+
+procedure GetProcessList;
+var
+ i,
+ Laenge : Integer;
+begin
+ PI_DateiList.Clear;
+ PI_HandleList.Clear;
+ PI_ClassList.Clear;
+ PI_CaptionList.Clear;
+ PI_VisibleList.Clear;
+ PI_ThreadIdList.Clear;
+ PI_PIDList.Clear;
+ EnumWindows( @EnumWindowsProc, 0 );
+ Laenge := PI_DateiList.Count;
+ SetLength( ProcessInfo,Laenge );
+ for i := 0 to Laenge - 1 do
+ begin
+ PI_DateiList[i] := UpperCase( PI_DateiList[i] );
+ with ProcessInfo[i] do
+ begin
+ FileName := PI_DateiList[i];
+ Caption := PI_CaptionList[i];
+ Visible := PI_VisibleList[i] = '1';
+ Handle := StrToInt64( PI_HandleList[i] );
+ PClass := PI_ClassList[i];
+ ThreadID := StrToInt64( PI_ThreadIdList[i] );
+ PID := StrToInt64( PI_PIDList[i] );
+ end;
+ end;
+end;
+
+function IsFileActive(FileName: String): Boolean;
+var
+ i : Integer;
+begin
+ Result := False;
+ if FileName = '' then
+ Exit;
+ GetProcessList;
+ FileName := UpperCase( ExtractFileName( FileName ) );
+ for i := 0 to Length( ProcessInfo ) - 1 do
+ begin
+ if Pos( FileName, ProcessInfo[i].FileName ) > 0 then
+ begin
+ Result := True;
+ Break;
+ end;
+ end;
+end;
+
+function KillProcessByFileName(FileName: String; KillAll: Boolean): Boolean;
+var
+ i : Integer;
+ FileFound : Boolean;
+begin
+ Result := False;
+ if FileName = '' then
+ Exit;
+ FileName := UpperCase( ExtractFileName( FileName ) );
+ Result := True;
+ GetProcessList;
+ if KillAll then
+ begin
+ //Kill all
+ repeat
+ GetProcessList;
+ FileFound := False;
+ for i := 0 to PI_DateiList.Count - 1 do
+ begin
+ if Pos( Filename, PI_DateiList[i] ) > 0 then
+ begin
+ FileFound := True;
+ Break;
+ end;
+ end;
+ if i < PI_DateiList.Count then
+ begin
+ if not KillProcessByPID( StrToInt64( PI_PIDList[i] ) ) then
+ begin
+ Result := False;
+ Exit;
+ end;
+ end;
+ until not FileFound;
+ end
+ else
+ begin
+ //Kill one
+ for i := 0 to PI_DateiList.Count - 1 do
+ begin
+ if Pos( Filename, PI_DateiList[i] ) > 0 then
+ Break;
+ end;
+ if i < PI_DateiList.Count then
+ begin
+ if not KillProcessByPID( StrToInt64( PI_PIDList[i] ) ) then
+ begin
+ Result := False;
+ Exit;
+ end;
+ end;
+ end;
+end;
+
+function KillProcessByPID(PID: DWord): Boolean;
+var
+ myhandle : THandle;
+ i : Integer;
+begin
+ myhandle := OpenProcess( PROCESS_TERMINATE, False, PID );
+ TerminateProcess( myhandle, 0 );
+ for i := 0 to SleepForReCheck do
+ Application.ProcessMessages; //Genug Zeit geben
+ GetProcessList;
+ Result := PI_PIDList.IndexOf( IntToStr( PID ) ) = -1;
+end;
+
+initialization
+ PI_DateiList := TStringList.Create;
+ PI_HandleList := TStringList.Create;
+ PI_ClassList := TStringList.Create;
+ PI_CaptionList := TStringList.Create;
+ PI_VisibleList := TStringList.Create;
+ PI_ThreadIdList := TStringList.Create;
+ PI_PIDList := TStringList.Create;
+
+finalization
+ PI_DateiList.Free;
+ PI_HandleList.Free;
+ PI_ClassList.Free;
+ PI_CaptionList.Free;
+ PI_VisibleList.Free;
+ PI_ThreadIdList.Free;
+ PI_PIDList.Free;
+
+end.
diff --git a/Demos/Extensions/killer/Unit1.dfm b/Source/Demos/Extensions/killer/Unit1.dfm
similarity index 95%
rename from Demos/Extensions/killer/Unit1.dfm
rename to Source/Demos/Extensions/killer/Unit1.dfm
index d8dfcea..773e21a 100644
--- a/Demos/Extensions/killer/Unit1.dfm
+++ b/Source/Demos/Extensions/killer/Unit1.dfm
@@ -1,20 +1,20 @@
-object killerExt: TkillerExt
- OldCreateOrder = False
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'killprocessbypid'
- Tag = 0
- Parameters = <
- item
- Name = 'PID'
- ParamType = tpInteger
- end>
- OnExecute = PHPExtension1Functions0Execute
- end>
- ModuleName = 'killer'
- Left = 192
- Top = 198
- Height = 480
- Width = 696
-end
+object killerExt: TkillerExt
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'killprocessbypid'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'PID'
+ ParamType = tpInteger
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'killer'
+ Left = 192
+ Top = 198
+ Height = 480
+ Width = 696
+end
diff --git a/Source/Demos/Extensions/killer/Unit1.dti b/Source/Demos/Extensions/killer/Unit1.dti
new file mode 100644
index 0000000..aa0c5c1
--- /dev/null
+++ b/Source/Demos/Extensions/killer/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/killer/Unit1.pas b/Source/Demos/Extensions/killer/Unit1.pas
similarity index 95%
rename from Demos/Extensions/killer/Unit1.pas
rename to Source/Demos/Extensions/killer/Unit1.pas
index 4522a0f..8cdd10d 100644
--- a/Demos/Extensions/killer/Unit1.pas
+++ b/Source/Demos/Extensions/killer/Unit1.pas
@@ -1,54 +1,54 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- PHPFunctions,
- PHPModules;
-
-type
-
- TkillerExt = class(TPHPExtension)
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- killerExt: TkillerExt;
-
-implementation
-
-uses ProcessViewer;
-
-{$R *.DFM}
-
-procedure TkillerExt.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- ReturnValue := KillProcessByPID(Parameters.Items[0].Value);
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ PHPFunctions,
+ PHPModules;
+
+type
+
+ TkillerExt = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ThisPtr: Pzval; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ killerExt: TkillerExt;
+
+implementation
+
+uses ProcessViewer;
+
+{$R *.DFM}
+
+procedure TkillerExt.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue := KillProcessByPID(Parameters.Items[0].Value);
+end;
+
end.
\ No newline at end of file
diff --git a/Demos/Extensions/killer/killer.dpr b/Source/Demos/Extensions/killer/killer.dpr
similarity index 94%
rename from Demos/Extensions/killer/killer.dpr
rename to Source/Demos/Extensions/killer/killer.dpr
index ef7b48a..e9e39c9 100644
--- a/Demos/Extensions/killer/killer.dpr
+++ b/Source/Demos/Extensions/killer/killer.dpr
@@ -1,17 +1,17 @@
-library killer;
-
-uses
- Windows,
- SysUtils,
- phpApp,
- phpModules,
- Unit1 in 'Unit1.pas' {killerExt: TPHPExtension},
- ProcessViewer in 'ProcessViewer.pas';
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TkillerExt, killerExt);
- Application.Run;
+library killer;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {killerExt: TPHPExtension},
+ ProcessViewer in 'ProcessViewer.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TkillerExt, killerExt);
+ Application.Run;
end.
\ No newline at end of file
diff --git a/Demos/psvPHP/Logo/LogoDemo.res b/Source/Demos/Extensions/killer/killer.res
similarity index 87%
rename from Demos/psvPHP/Logo/LogoDemo.res
rename to Source/Demos/Extensions/killer/killer.res
index 71fa700..55f8742 100644
Binary files a/Demos/psvPHP/Logo/LogoDemo.res and b/Source/Demos/Extensions/killer/killer.res differ
diff --git a/Demos/Extensions/killer/tests/test_killer.php b/Source/Demos/Extensions/killer/tests/test_killer.php
similarity index 94%
rename from Demos/Extensions/killer/tests/test_killer.php
rename to Source/Demos/Extensions/killer/tests/test_killer.php
index f0727ed..b8e343d 100644
--- a/Demos/Extensions/killer/tests/test_killer.php
+++ b/Source/Demos/Extensions/killer/tests/test_killer.php
@@ -1,23 +1,23 @@
-
-if(!extension_loaded('killer')) {
- dl('killer.dll');
-}
-
-//killprocessbypid(100);
-
-$module = 'killer';
-
-if (extension_loaded($module)) {
- $str = "module loaded";
-} else {
- $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-
-$functions = get_extension_funcs($module);
-echo "Functions available in the $module extension: \n";
-foreach($functions as $func) {
- echo $func." \n";
-}
-
-?>
+
+if(!extension_loaded('killer')) {
+ dl('killer.dll');
+}
+
+//killprocessbypid(100);
+
+$module = 'killer';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Source/Demos/Extensions/php class/php_class.bdsproj b/Source/Demos/Extensions/php class/php_class.bdsproj
new file mode 100644
index 0000000..db113f1
--- /dev/null
+++ b/Source/Demos/Extensions/php class/php_class.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {E73CEBCB-F145-4A4C-A214-AC65F6358F01}
+
+
+
+
+ php_class.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/Extensions/php class/php_class.dpr b/Source/Demos/Extensions/php class/php_class.dpr
similarity index 86%
rename from Demos/Extensions/php class/php_class.dpr
rename to Source/Demos/Extensions/php class/php_class.dpr
index 3346ba5..8333ffc 100644
--- a/Demos/Extensions/php class/php_class.dpr
+++ b/Source/Demos/Extensions/php class/php_class.dpr
@@ -1,160 +1,151 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP class demo extension }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: php_class.dpr,v 6.2 02/2006 delphi32 Exp $ }
-
-{$I PHP.INC}
-
-library php_class;
-
-uses
- Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
-
-var
- demo_class_functions : array[0..2] of zend_function_entry;
- demo_class_entry : Tzend_class_entry;
- ce : pzend_class_entry;
-
-{$IFDEF PHP510}
-procedure demo_email (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure demo_email (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- str : string;
-begin
- str := 'name@mail.com';
- ZVAL_STRING(return_value, PChar(str), true);
-end;
-
-{$IFDEF PHP510}
-procedure demo_homepage (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure demo_homepage (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- str : string;
-begin
- str := 'http://www.demo.com';
- ZVAL_STRING(return_value, PChar(str), true);
-end;
-
-procedure RegisterDemoClass(p : pointer);
-begin
- demo_class_functions[0].fname := 'demo_email';
- demo_class_functions[0].handler := @demo_email;
- demo_class_functions[1].fname := 'demo_homepage';
- demo_class_functions[1].handler := @demo_homepage;
- INIT_CLASS_ENTRY(demo_class_entry, 'php_demo_class', @demo_class_functions);
- ce := zend_register_internal_class(@demo_class_entry, p);
-end;
-
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('PHP Demo Class'), PChar('enabled'));
- php_info_print_table_end();
-end;
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RegisterDemoClass(TSRMLS_DC);
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-{$IFDEF PHP510}
-procedure get_demo_class (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure get_demo_class (ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- properties : array[0..2] of pchar;
-begin
- properties[0] := 'name';
- properties[1] := 'tool';
- properties[2] := 'height';
- {$IFDEF PHP4}
- _object_init_ex(return_value, ce, nil, 0, TSRMLS_DC );
- {$ELSE}
- object_init(return_value, ce, TSRMLS_DC );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1);
- add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1);
- {$ELSE}
- add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
- add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1, TSRMLS_DC);
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185);
- {$ELSE}
- add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
- {$ENDIF}
-end;
-
-
-var
- moduleEntry : Tzend_module_entry;
- module_entry_table : array[0..1] of zend_function_entry;
-
-
-function get_module : Pzend_module_entry; cdecl;
-begin
- if not PHPLoaded then
- LoadPHP;
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- ModuleEntry.Name := 'php_class';
- ModuleEntry.version := '0.2';
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- module_entry_table[0].fname := 'get_demo_class';
- module_entry_table[0].handler := @get_demo_class;
- {$IFDEF PHP4}
- module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := MODULE_PERSISTENT;
- Result := @ModuleEntry;
-end;
-
-
-
-exports
- get_module;
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP class demo extension }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: php_class.dpr,v 7.0 04/2007 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library php_class;
+
+uses
+ Windows, SysUtils, ZendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+var
+ demo_class_functions : array[0..2] of zend_function_entry;
+ demo_class_entry : Tzend_class_entry;
+ ce : pzend_class_entry;
+
+{$IFDEF PHP510}
+procedure demo_email (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure demo_email (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ str : string;
+begin
+ str := 'name@mail.com';
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+{$IFDEF PHP510}
+procedure demo_homepage (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure demo_homepage (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ str : string;
+begin
+ str := 'http://www.demo.com';
+ ZVAL_STRING(return_value, PChar(str), true);
+end;
+
+procedure RegisterDemoClass(p : pointer);
+begin
+ demo_class_functions[0].fname := 'demo_email';
+ demo_class_functions[0].handler := @demo_email;
+ demo_class_functions[1].fname := 'demo_homepage';
+ demo_class_functions[1].handler := @demo_homepage;
+ INIT_CLASS_ENTRY(demo_class_entry, 'php_demo_class', @demo_class_functions);
+ ce := zend_register_internal_class(@demo_class_entry, p);
+end;
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PChar('PHP Demo Class'), PChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterDemoClass(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure get_demo_class (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure get_demo_class (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ properties : array[0..2] of pchar;
+begin
+ properties[0] := 'name';
+ properties[1] := 'tool';
+ properties[2] := 'height';
+ object_init(return_value, ce, TSRMLS_DC );
+ add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
+ add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1, TSRMLS_DC);
+
+ add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'php_class';
+ ModuleEntry.version := '0.2';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ module_entry_table[0].fname := 'get_demo_class';
+ module_entry_table[0].handler := @get_demo_class;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos/Extensions/php class/test_class.php b/Source/Demos/Extensions/php class/test_class.php
new file mode 100644
index 0000000..f626e59
--- /dev/null
+++ b/Source/Demos/Extensions/php class/test_class.php
@@ -0,0 +1,15 @@
+
+if(!extension_loaded('php_class')) {
+ dl('php_class.dll');
+}
+
+$a = new php_demo_class();
+echo $a->demo_email();
+
+echo "\n";
+
+$b = get_demo_class();
+echo $b->tool;
+
+?>
+
diff --git a/Source/Demos/Extensions/phpDLL/Unit1.ddp b/Source/Demos/Extensions/phpDLL/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Extensions/phpDLL/Unit1.ddp differ
diff --git a/Demos/Extensions/phpDLL/Unit1.dfm b/Source/Demos/Extensions/phpDLL/Unit1.dfm
similarity index 95%
rename from Demos/Extensions/phpDLL/Unit1.dfm
rename to Source/Demos/Extensions/phpDLL/Unit1.dfm
index 74b7e3c..7b00eef 100644
--- a/Demos/Extensions/phpDLL/Unit1.dfm
+++ b/Source/Demos/Extensions/phpDLL/Unit1.dfm
@@ -1,20 +1,20 @@
-object PHPExtension1: TPHPExtension1
- OldCreateOrder = False
- Version = '0.0'
- Functions = <
- item
- FunctionName = 'mygettext'
- Tag = 0
- Parameters = <
- item
- Name = 'AText'
- ParamType = tpString
- end>
- OnExecute = PHPExtension1Functions0Execute
- end>
- ModuleName = 'some_functions'
- Left = 411
- Top = 314
- Height = 150
- Width = 215
-end
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'mygettext'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'AText'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'some_functions'
+ Left = 411
+ Top = 314
+ Height = 150
+ Width = 215
+end
diff --git a/Source/Demos/Extensions/phpDLL/Unit1.dti b/Source/Demos/Extensions/phpDLL/Unit1.dti
new file mode 100644
index 0000000..aa0c5c1
--- /dev/null
+++ b/Source/Demos/Extensions/phpDLL/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=285
+Top=161
+Width=741
+Height=479
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Demos/Extensions/phpDLL/Unit1.pas b/Source/Demos/Extensions/phpDLL/Unit1.pas
similarity index 83%
rename from Demos/Extensions/phpDLL/Unit1.pas
rename to Source/Demos/Extensions/phpDLL/Unit1.pas
index 0dd81dd..919c87d 100644
--- a/Demos/Extensions/phpDLL/Unit1.pas
+++ b/Source/Demos/Extensions/phpDLL/Unit1.pas
@@ -1,56 +1,56 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit Unit1;
-
-interface
-
-uses
- Windows,
- Messages,
- SysUtils,
- Classes,
- Forms,
- zendTypes,
- zendAPI,
- phpTypes,
- phpAPI,
- phpFunctions,
- PHPModules;
-
-type
-
- TPHPExtension1 = class(TPHPExtension)
- procedure PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- PHPExtension1: TPHPExtension1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-
-begin
- ReturnValue := Parameters[0].Value + ' from DLL';
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+begin
+ ReturnValue := Parameters[0].Value + ' from DLL';
+end;
+
end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/phpDLL/phpDLL.bdsproj b/Source/Demos/Extensions/phpDLL/phpDLL.bdsproj
new file mode 100644
index 0000000..6c47695
--- /dev/null
+++ b/Source/Demos/Extensions/phpDLL/phpDLL.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2E580BF2-F066-4BE4-B9F0-F1804DBE617A}
+
+
+
+
+ phpDLL.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/phpDLL/phpDLL.dpr b/Source/Demos/Extensions/phpDLL/phpDLL.dpr
new file mode 100644
index 0000000..4462aac
--- /dev/null
+++ b/Source/Demos/Extensions/phpDLL/phpDLL.dpr
@@ -0,0 +1,16 @@
+library phpDLL;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/phpDLL/phpDLL.res b/Source/Demos/Extensions/phpDLL/phpDLL.res
new file mode 100644
index 0000000..1228533
Binary files /dev/null and b/Source/Demos/Extensions/phpDLL/phpDLL.res differ
diff --git a/Source/Demos/Extensions/phpDLL/testdll.php b/Source/Demos/Extensions/phpDLL/testdll.php
new file mode 100644
index 0000000..a616618
--- /dev/null
+++ b/Source/Demos/Extensions/phpDLL/testdll.php
@@ -0,0 +1,24 @@
+
+if(!extension_loaded('phpDll')) {
+ dl('phpDll.dll');
+}
+$module = 'some_functions';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str ";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." ";
+}
+
+$str = MyGetText("Hello!"); //This Delphi function is : ... ReturnValue:='Hello From DLL';
+
+echo "Delphi ret -->$str ";
+
+?>
diff --git a/Source/Demos/Extensions/reference/Unit1.ddp b/Source/Demos/Extensions/reference/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/Extensions/reference/Unit1.ddp differ
diff --git a/Source/Demos/Extensions/reference/Unit1.dfm b/Source/Demos/Extensions/reference/Unit1.dfm
new file mode 100644
index 0000000..928797f
--- /dev/null
+++ b/Source/Demos/Extensions/reference/Unit1.dfm
@@ -0,0 +1,24 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <
+ item
+ FunctionName = 'helloworld'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpString
+ end
+ item
+ Name = 'Param2'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'php_ref'
+ Left = 192
+ Top = 114
+ Height = 150
+ Width = 215
+end
diff --git a/Source/Demos/Extensions/reference/Unit1.pas b/Source/Demos/Extensions/reference/Unit1.pas
new file mode 100644
index 0000000..3207ba9
--- /dev/null
+++ b/Source/Demos/Extensions/reference/Unit1.pas
@@ -0,0 +1,45 @@
+unit Unit1;
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ZVAL_STRING(Parameters[0].ZendValue, 'hello', true);
+ ZVAL_STRING(Parameters[1].ZendValue, 'world', true);
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/reference/php_ref.bdsproj b/Source/Demos/Extensions/reference/php_ref.bdsproj
new file mode 100644
index 0000000..93dbff0
--- /dev/null
+++ b/Source/Demos/Extensions/reference/php_ref.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9533BCF2-7D4B-4596-AFBA-D6A6B38D9979}
+
+
+
+
+ php_ref.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/reference/php_ref.dpr b/Source/Demos/Extensions/reference/php_ref.dpr
new file mode 100644
index 0000000..b9cf9f3
--- /dev/null
+++ b/Source/Demos/Extensions/reference/php_ref.dpr
@@ -0,0 +1,16 @@
+library php_ref;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Extensions/reference/php_ref.res b/Source/Demos/Extensions/reference/php_ref.res
new file mode 100644
index 0000000..1228533
Binary files /dev/null and b/Source/Demos/Extensions/reference/php_ref.res differ
diff --git a/Source/Demos/Extensions/reference/testref.php b/Source/Demos/Extensions/reference/testref.php
new file mode 100644
index 0000000..071d7bf
--- /dev/null
+++ b/Source/Demos/Extensions/reference/testref.php
@@ -0,0 +1,28 @@
+
+if(!extension_loaded('php_ref')) {
+ dl('php_ref.dll');
+}
+
+$module = 'php_ref';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str ";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." ";
+}
+
+$a = "";
+$b = "";
+
+helloworld($a, $b);
+
+echo $a." ".$b;
+
+?>
diff --git a/Source/Demos/Extensions/skeleton/CREDITS b/Source/Demos/Extensions/skeleton/CREDITS
new file mode 100644
index 0000000..58fc710
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/CREDITS
@@ -0,0 +1 @@
+extname
\ No newline at end of file
diff --git a/Source/Demos/Extensions/skeleton/EXPERIMENTAL b/Source/Demos/Extensions/skeleton/EXPERIMENTAL
new file mode 100644
index 0000000..e69de29
diff --git a/Source/Demos/Extensions/skeleton/skeleton.bdsproj b/Source/Demos/Extensions/skeleton/skeleton.bdsproj
new file mode 100644
index 0000000..935ff46
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/skeleton.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {486042C3-7869-4681-B499-D6AA42BE8981}
+
+
+
+
+ skeleton.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+ C:\php\ext
+
+
+
+ $(DELPHI)\Lib\Debug
+ vcl;rtl;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;vclx;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;php4DelphiR7;CoolTrayIcon_D6plus;psvLabelsR7;PSCControlsR7;cxLibraryVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtItemsD7;dxBarExtDBItemsD7;dxsbD7;dxDockingD7;dxNavBarD7;dxPSCoreD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSTeeChartD7;dxPSDBTeeChartD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxVerticalGridVCLD7;cxPageControlVCLD7;cxGridVCLD7;FreeBurner;FBTranscoder;FBAudioGrabber;SqlDir70;Vcwd7;MSICS_D7_Rtl;VirtualTreesD7;DSPack_D7;DirectX9_D7;WPTools5_D7;RemObjects_WebBroker_D7;RemObjects_Indy_D7;RemObjects_RODX_D7;RemObjects_BPDX_D7;DataAbstract_Core_D7;DataAbstract_IDE_D7;DataAbstract_DBXDriver_D7;DataAbstract_Scripting_D7;PascalScript_RO_D7;RaizeComponentsVcl
+
+
+ False
+
+
+ c:\php\skeleton.php
+ C:\php\php.exe
+
+ False
+ c:\php
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/Extensions/skeleton/skeleton.dpr b/Source/Demos/Extensions/skeleton/skeleton.dpr
new file mode 100644
index 0000000..4bebef7
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/skeleton.dpr
@@ -0,0 +1,124 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+
+{ $Id: skeleton.dpr,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library skeleton;
+
+uses
+ Windows, SysUtils, zendTypes, ZENDAPI, phpTypes, PHPAPI;
+
+
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, PAnsiChar('extname support'), PAnsiChar('enabled'));
+ php_info_print_table_end();
+end;
+
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{$IFDEF PHP510}
+procedure confirm_extname_compiled (ht : integer; return_value : pzval; return_value_ptr : pointer; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure confirm_extname_compiled (ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+arg : PAnsiChar;
+str : string;
+param : pzval_array;
+begin
+ {$IFDEF PHP510}
+ if return_value_ptr = nil then
+ begin
+ end;
+ {$ENDIF}
+
+ if ht = 0 then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ arg := param[0]^.value.str.val;
+ str := Format('Congratulations! Module %.78s is now compiled into PHP.', [arg]);
+ ZVAL_STRING(return_value, PAnsiChar(str), true);
+ dispose_pzval_array(param);
+end;
+
+
+var
+ moduleEntry : Tzend_module_entry;
+ module_entry_table : array[0..1] of zend_function_entry;
+
+
+function get_module : Pzend_module_entry; cdecl;
+begin
+ if not PHPLoaded then
+ LoadPHP;
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleEntry.Name := 'extname';
+ ModuleEntry.version := '0.0';
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ Module_entry_table[0].fname := 'confirm_extname_compiled';
+ Module_entry_table[0].handler := @confirm_extname_compiled;
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := MODULE_PERSISTENT;
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := StrNew(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+ Result := @ModuleEntry;
+end;
+
+
+
+exports
+ get_module;
+
+end.
+
diff --git a/Source/Demos/Extensions/skeleton/skeleton.dproj b/Source/Demos/Extensions/skeleton/skeleton.dproj
new file mode 100644
index 0000000..5d1cf97
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/skeleton.dproj
@@ -0,0 +1,565 @@
+
+
+ {56fae2c6-8299-400a-ad86-fdd3f0aca7c0}
+ skeleton.dpr
+ Debug
+ AnyCPU
+ DCC32
+ C:\php\ext\skeleton.dll
+
+
+ 7.0
+ False
+ False
+ 0
+ C:\php\ext
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ RELEASE
+
+
+ 7.0
+ C:\php\ext
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ $(DELPHI)\Lib\Debug
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ c:\php\skeleton.php
+ C:\php\php.exe
+ False
+ c:\php
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ skeleton.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
diff --git a/Source/Demos/Extensions/skeleton/tests/skeleton.php b/Source/Demos/Extensions/skeleton/tests/skeleton.php
new file mode 100644
index 0000000..1866534
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/tests/skeleton.php
@@ -0,0 +1,19 @@
+
+if(!extension_loaded('extname')) {
+ dl('skeleton.dll');
+}
+$module = 'extname';
+$functions = get_extension_funcs($module);
+echo "Functions available in the test extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+echo " \n";
+$function = 'confirm_' . $module . '_compiled';
+if (extension_loaded($module)) {
+ $str = $function($module);
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+?>
diff --git a/Source/Demos/Extensions/skeleton/tests/test_skeleton.php b/Source/Demos/Extensions/skeleton/tests/test_skeleton.php
new file mode 100644
index 0000000..c189599
--- /dev/null
+++ b/Source/Demos/Extensions/skeleton/tests/test_skeleton.php
@@ -0,0 +1,25 @@
+
+if(!extension_loaded('extname')) {
+ dl('skeleton.dll');
+}
+
+
+$str = confirm_extname_compiled("skeleton");
+echo "$str\n";
+
+$module = 'extname';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Source/Demos/Tutorial/Step.01/Project1.dpr b/Source/Demos/Tutorial/Step.01/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.01/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/array demo/Project1.res b/Source/Demos/Tutorial/Step.01/Project1.res
similarity index 100%
rename from Demos/psvPHP/array demo/Project1.res
rename to Source/Demos/Tutorial/Step.01/Project1.res
diff --git a/Source/Demos/Tutorial/Step.01/Unit1.ddp b/Source/Demos/Tutorial/Step.01/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Tutorial/Step.01/Unit1.ddp differ
diff --git a/Source/Demos/Tutorial/Step.01/Unit1.dfm b/Source/Demos/Tutorial/Step.01/Unit1.dfm
new file mode 100644
index 0000000..1f4f79b
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.01/Unit1.dfm
@@ -0,0 +1,9 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '0.0'
+ Functions = <>
+ Left = 512
+ Top = 312
+ Height = 331
+ Width = 444
+end
diff --git a/Source/Demos/Tutorial/Step.01/Unit1.dti b/Source/Demos/Tutorial/Step.01/Unit1.dti
new file mode 100644
index 0000000..25ebfd4
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.01/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=267
+Top=308
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Tutorial/Step.01/Unit1.pas b/Source/Demos/Tutorial/Step.01/Unit1.pas
new file mode 100644
index 0000000..1fcf616
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.01/Unit1.pas
@@ -0,0 +1,45 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.02/Project1.dpr b/Source/Demos/Tutorial/Step.02/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.02/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/sample2/Project1.res b/Source/Demos/Tutorial/Step.02/Project1.res
similarity index 100%
rename from Demos/psvPHP/sample2/Project1.res
rename to Source/Demos/Tutorial/Step.02/Project1.res
diff --git a/Source/Demos/Tutorial/Step.02/Unit1.ddp b/Source/Demos/Tutorial/Step.02/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Tutorial/Step.02/Unit1.ddp differ
diff --git a/Source/Demos/Tutorial/Step.02/Unit1.dfm b/Source/Demos/Tutorial/Step.02/Unit1.dfm
new file mode 100644
index 0000000..19fa4f3
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.02/Unit1.dfm
@@ -0,0 +1,10 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <>
+ ModuleName = 'mymodule'
+ Left = 541
+ Top = 282
+ Height = 376
+ Width = 406
+end
diff --git a/Source/Demos/Tutorial/Step.02/Unit1.dti b/Source/Demos/Tutorial/Step.02/Unit1.dti
new file mode 100644
index 0000000..17f5861
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.02/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Tutorial/Step.02/Unit1.pas b/Source/Demos/Tutorial/Step.02/Unit1.pas
new file mode 100644
index 0000000..1fcf616
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.02/Unit1.pas
@@ -0,0 +1,45 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.03/Project1.dpr b/Source/Demos/Tutorial/Step.03/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.03/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/sample4/psvPHP_test.res b/Source/Demos/Tutorial/Step.03/Project1.res
similarity index 100%
rename from Demos/psvPHP/sample4/psvPHP_test.res
rename to Source/Demos/Tutorial/Step.03/Project1.res
diff --git a/Source/Demos/Tutorial/Step.03/Unit1.ddp b/Source/Demos/Tutorial/Step.03/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Tutorial/Step.03/Unit1.ddp differ
diff --git a/Source/Demos/Tutorial/Step.03/Unit1.dfm b/Source/Demos/Tutorial/Step.03/Unit1.dfm
new file mode 100644
index 0000000..03f8fa1
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.03/Unit1.dfm
@@ -0,0 +1,15 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <>
+ end>
+ ModuleName = 'mymodule'
+ Left = 499
+ Top = 235
+ Height = 443
+ Width = 508
+end
diff --git a/Source/Demos/Tutorial/Step.03/Unit1.dti b/Source/Demos/Tutorial/Step.03/Unit1.dti
new file mode 100644
index 0000000..3af6432
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.03/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Tutorial/Step.03/Unit1.pas b/Source/Demos/Tutorial/Step.03/Unit1.pas
new file mode 100644
index 0000000..00bf20a
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.03/Unit1.pas
@@ -0,0 +1,45 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.04/Project1.dpr b/Source/Demos/Tutorial/Step.04/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.04/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Demos/php4Applications/Delphi/Project1.res b/Source/Demos/Tutorial/Step.04/Project1.res
similarity index 87%
rename from Demos/php4Applications/Delphi/Project1.res
rename to Source/Demos/Tutorial/Step.04/Project1.res
index 71fa700..08ba56e 100644
Binary files a/Demos/php4Applications/Delphi/Project1.res and b/Source/Demos/Tutorial/Step.04/Project1.res differ
diff --git a/Source/Demos/Tutorial/Step.04/Unit1.ddp b/Source/Demos/Tutorial/Step.04/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Tutorial/Step.04/Unit1.ddp differ
diff --git a/Source/Demos/Tutorial/Step.04/Unit1.dfm b/Source/Demos/Tutorial/Step.04/Unit1.dfm
new file mode 100644
index 0000000..7f21115
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.04/Unit1.dfm
@@ -0,0 +1,19 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'myparameter'
+ ParamType = tpString
+ end>
+ end>
+ ModuleName = 'mymodule'
+ Left = 397
+ Top = 234
+ Height = 497
+ Width = 591
+end
diff --git a/Source/Demos/Tutorial/Step.04/Unit1.dti b/Source/Demos/Tutorial/Step.04/Unit1.dti
new file mode 100644
index 0000000..9090a91
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.04/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Tutorial/Step.04/Unit1.pas b/Source/Demos/Tutorial/Step.04/Unit1.pas
new file mode 100644
index 0000000..1fcf616
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.04/Unit1.pas
@@ -0,0 +1,45 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.05/Project1.dpr b/Source/Demos/Tutorial/Step.05/Project1.dpr
new file mode 100644
index 0000000..598d21f
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.05/Project1.dpr
@@ -0,0 +1,16 @@
+library Project1;
+
+uses
+ Windows,
+ SysUtils,
+ phpApp,
+ phpModules,
+ Unit1 in 'Unit1.pas' {PHPExtension1: TPHPExtension};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TPHPExtension1, PHPExtension1);
+ Application.Run;
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.05/Project1.dproj b/Source/Demos/Tutorial/Step.05/Project1.dproj
new file mode 100644
index 0000000..53020cd
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.05/Project1.dproj
@@ -0,0 +1,557 @@
+
+
+
+ {5e5de191-1320-4dd5-80c8-355592ca7340}
+ Project1.dpr
+ Debug
+ AnyCPU
+ DCC32
+ Project1.dll
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ Project1.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
diff --git a/php4DelphiD5.res b/Source/Demos/Tutorial/Step.05/Project1.res
similarity index 54%
rename from php4DelphiD5.res
rename to Source/Demos/Tutorial/Step.05/Project1.res
index 4aa33a2..08ba56e 100644
Binary files a/php4DelphiD5.res and b/Source/Demos/Tutorial/Step.05/Project1.res differ
diff --git a/Source/Demos/Tutorial/Step.05/Unit1.ddp b/Source/Demos/Tutorial/Step.05/Unit1.ddp
new file mode 100644
index 0000000..b8bd99b
Binary files /dev/null and b/Source/Demos/Tutorial/Step.05/Unit1.ddp differ
diff --git a/Source/Demos/Tutorial/Step.05/Unit1.dfm b/Source/Demos/Tutorial/Step.05/Unit1.dfm
new file mode 100644
index 0000000..8e8c523
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.05/Unit1.dfm
@@ -0,0 +1,20 @@
+object PHPExtension1: TPHPExtension1
+ OldCreateOrder = False
+ Version = '1.0'
+ Functions = <
+ item
+ FunctionName = 'myfunction'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'myparameter'
+ ParamType = tpString
+ end>
+ OnExecute = PHPExtension1Functions0Execute
+ end>
+ ModuleName = 'mymodule'
+ Left = 414
+ Top = 262
+ Height = 359
+ Width = 478
+end
diff --git a/Source/Demos/Tutorial/Step.05/Unit1.dti b/Source/Demos/Tutorial/Step.05/Unit1.dti
new file mode 100644
index 0000000..9090a91
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.05/Unit1.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=192
+Top=130
+Width=696
+Height=480
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=PHPExtension1\PHPExtension1.Functions\PHPExtension1.Functions[0]\TFunctionParams
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/Tutorial/Step.05/Unit1.pas b/Source/Demos/Tutorial/Step.05/Unit1.pas
new file mode 100644
index 0000000..292a871
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.05/Unit1.pas
@@ -0,0 +1,57 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows,
+ Messages,
+ SysUtils,
+ Classes,
+ Forms,
+ zendTypes,
+ zendAPI,
+ phpTypes,
+ phpAPI,
+ phpFunctions,
+ PHPModules;
+
+type
+
+ TPHPExtension1 = class(TPHPExtension)
+ procedure PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ PHPExtension1: TPHPExtension1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TPHPExtension1.PHPExtension1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+
+begin
+ //just returns the received value back
+ ReturnValue := Parameters[0].Value;
+end;
+
+end.
\ No newline at end of file
diff --git a/Source/Demos/Tutorial/Step.06/test_script.php b/Source/Demos/Tutorial/Step.06/test_script.php
new file mode 100644
index 0000000..e4c40cb
--- /dev/null
+++ b/Source/Demos/Tutorial/Step.06/test_script.php
@@ -0,0 +1,22 @@
+
+if(!extension_loaded('mymodule')) {
+ dl('project1.dll');
+}
+
+
+$module = 'mymodule';
+
+if (extension_loaded($module)) {
+ $str = "module loaded";
+} else {
+ $str = "Module $module is not compiled into PHP";
+}
+echo "$str\n";
+
+$functions = get_extension_funcs($module);
+echo "Functions available in the $module extension: \n";
+foreach($functions as $func) {
+ echo $func." \n";
+}
+
+?>
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/App.ico b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/App.ico
new file mode 100644
index 0000000..3a5525f
Binary files /dev/null and b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/App.ico differ
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
new file mode 100644
index 0000000..9f89a32
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/AssemblyInfo.cs
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.cs b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.cs
new file mode 100644
index 0000000..5e71f07
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Text;
+using System.Data;
+using System.Runtime.InteropServices;
+
+
+
+namespace PHP4DelphiDemo
+{
+ ///
+ /// Summary description for Form1.
+ ///
+ public class Form1 : System.Windows.Forms.Form
+ {
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ private Panel panel1;
+ private Button btnExecuteScript;
+ private Button btnExecuteCode;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
+
+ public Form1()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
+
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.btnExecuteScript = new System.Windows.Forms.Button();
+ this.btnExecuteCode = new System.Windows.Forms.Button();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox1.Location = new System.Drawing.Point(0, 0);
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.textBox1.Size = new System.Drawing.Size(326, 197);
+ this.textBox1.TabIndex = 0;
+ //
+ // openFileDialog1
+ //
+ this.openFileDialog1.Filter = "PHP files|*.php";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.btnExecuteCode);
+ this.panel1.Controls.Add(this.btnExecuteScript);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel1.Location = new System.Drawing.Point(0, 197);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(326, 49);
+ this.panel1.TabIndex = 2;
+ //
+ // btnExecuteScript
+ //
+ this.btnExecuteScript.Location = new System.Drawing.Point(12, 12);
+ this.btnExecuteScript.Name = "btnExecuteScript";
+ this.btnExecuteScript.Size = new System.Drawing.Size(94, 23);
+ this.btnExecuteScript.TabIndex = 2;
+ this.btnExecuteScript.Text = "Execute Script";
+ //
+ // btnExecuteCode
+ //
+ this.btnExecuteCode.Location = new System.Drawing.Point(112, 12);
+ this.btnExecuteCode.Name = "btnExecuteCode";
+ this.btnExecuteCode.Size = new System.Drawing.Size(96, 23);
+ this.btnExecuteCode.TabIndex = 3;
+ this.btnExecuteCode.Text = "Execute Code";
+ this.btnExecuteCode.UseVisualStyleBackColor = true;
+ this.btnExecuteCode.Click += new System.EventHandler(this.btnExecuteCode_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(326, 246);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.panel1);
+ this.Name = "Form1";
+ this.Text = "PHP";
+ this.panel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+ #endregion
+
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+ private void button1_Click(object sender, System.EventArgs e)
+ {
+ int l = 0;
+ int RequestID = 0;
+ StringBuilder builder = new StringBuilder();
+
+ if(openFileDialog1.ShowDialog() == DialogResult.OK)
+ {
+ RequestID = InitRequest();
+ string fn = openFileDialog1.FileName;
+ ExecutePHP(RequestID, fn);
+ l = GetResultBufferSize(RequestID);
+ builder.Capacity = l;
+ l = GetResultText(RequestID, builder, builder.Capacity + 1);
+ textBox1.Text = builder.ToString();
+ DoneRequest(RequestID);
+ }
+
+
+ }
+
+
+ [DllImport("PHP4App.dll")]
+ public static extern int InitRequest();
+
+ ///
+ /// Execute PHP script
+ ///
+ [DllImport("PHP4App.dll")]
+ public static extern int ExecutePHP(int RequestID, string FileName);
+
+ [DllImport("PHP4App.dll", SetLastError=true)]
+ public static extern void DoneRequest(int RequestID);
+
+ [DllImport("PHP4App.dll", SetLastError=true)]
+ public static extern int GetResultText(int RequestID, StringBuilder Buf, int BufLen);
+
+ [DllImport("PHP4App.dll")]
+ public static extern void RegisterVariable(int RequestID, string AName, string AValue);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int ExecuteCode(int RequestID, string ACode);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetVariable(int RequestID, string AName, StringBuilder Buffer, int BufLen);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int SaveToFile(int RequestID, string AFileName);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetVariableSize(int RequestID, string AName);
+
+ [DllImport("PHP4App.dll")]
+ public static extern int GetResultBufferSize(int RequestID);
+
+ private void btnExecuteCode_Click(object sender, EventArgs e)
+ {
+ int l = 0;
+ int RequestID = 0;
+ StringBuilder builder = new StringBuilder();
+ StringBuilder varbuilder = new StringBuilder();
+
+ RequestID = InitRequest();
+ RegisterVariable(RequestID, "x","2");
+ RegisterVariable(RequestID, "y","3");
+ RegisterVariable(RequestID, "z","0");
+ ExecuteCode(RequestID, "$z = $x + $y; echo \"Result \"; echo $z;");
+ l = GetResultBufferSize(RequestID);
+ if (l > 0)
+ {
+ builder.Capacity = l;
+ GetResultText(RequestID, builder, builder.Capacity + 1);
+ textBox1.Text = builder.ToString();
+ }
+
+ l = GetVariableSize(RequestID, "z");
+ if (l > 0)
+ {
+ varbuilder.Capacity = l;
+ GetVariable(RequestID, "z", varbuilder, varbuilder.Capacity + 1);
+ MessageBox.Show(String.Concat("After execution z=", varbuilder.ToString()));
+ }
+ DoneRequest(RequestID);
+ }
+
+ }
+}
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.resx b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.resx
new file mode 100644
index 0000000..6e58fa8
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/Form1.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj
new file mode 100644
index 0000000..05de69b
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj
@@ -0,0 +1,112 @@
+
+
+ Local
+ 8.0.50727
+ 2.0
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}
+ Debug
+ AnyCPU
+ App.ico
+
+
+ PHP4DelphiDemo
+
+
+ JScript
+ Grid
+ IE50
+ false
+ WinExe
+ PHP4DelphiDemo
+ OnBuildSuccess
+
+
+
+
+
+
+
+
+ bin\Debug\
+ false
+ 285212672
+ false
+
+
+ DEBUG;TRACE
+
+
+ true
+ 4096
+ false
+
+
+ false
+ false
+ false
+ false
+ 4
+ full
+ prompt
+
+
+ bin\Release\
+ false
+ 285212672
+ false
+
+
+ TRACE
+
+
+ false
+ 4096
+ false
+
+
+ true
+ false
+ false
+ false
+ 4
+ none
+ prompt
+
+
+
+ System
+
+
+ System.Data
+
+
+ System.Drawing
+
+
+ System.Windows.Forms
+
+
+ System.XML
+
+
+
+
+
+
+ Code
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user
new file mode 100644
index 0000000..5414047
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.csproj.user
@@ -0,0 +1,58 @@
+
+
+ 7.10.3077
+ Debug
+ AnyCPU
+
+
+
+
+
+
+ 0
+ ProjectFiles
+ 0
+
+
+ false
+ false
+ false
+ false
+ false
+
+
+ Project
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+ false
+ false
+ false
+ false
+
+
+ Project
+
+
+
+
+
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln
new file mode 100644
index 0000000..9758dfe
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/PHP4DelphiDemo.sln
@@ -0,0 +1,19 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PHP4DelphiDemo", "PHP4DelphiDemo.csproj", "{0DA732DE-42B5-436C-8BD0-9036B7D79EAA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0DA732DE-42B5-436C-8BD0-9036B7D79EAA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/app.config b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/app.config
new file mode 100644
index 0000000..b7d8d1d
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/app.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Source/Demos/php4Applications/C#/PHP4DelphiDemo/test.php b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/test.php
new file mode 100644
index 0000000..d3fccb8
--- /dev/null
+++ b/Source/Demos/php4Applications/C#/PHP4DelphiDemo/test.php
@@ -0,0 +1,4 @@
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Source/Demos/php4Applications/C++ VS 2005/StdAfx.cpp b/Source/Demos/php4Applications/C++ VS 2005/StdAfx.cpp
new file mode 100644
index 0000000..976384e
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/StdAfx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// cdemo.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Source/Demos/php4Applications/C++ VS 2005/StdAfx.h b/Source/Demos/php4Applications/C++ VS 2005/StdAfx.h
new file mode 100644
index 0000000..1b40500
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/StdAfx.h
@@ -0,0 +1,19 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
diff --git a/Source/Demos/php4Applications/C++ VS 2005/cdemo.cpp b/Source/Demos/php4Applications/C++ VS 2005/cdemo.cpp
new file mode 100644
index 0000000..02f788a
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/cdemo.cpp
@@ -0,0 +1,101 @@
+// cdemo.cpp : Defines the entry point for the console application.
+//
+
+
+# include "stdafx.h"
+# include
+# include
+# include
+# include
+
+
+typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
+typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
+typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
+typedef int (WINAPI * InitRequest)(void);
+typedef void (WINAPI * DoneRequest)(int request_id);
+typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
+typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
+typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
+typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
+typedef int (WINAPI * GetResultBufferSize)(int request_id);
+
+int main(int argc, char* argv[])
+{
+ ExecutePHP lpfnExecutePHP;
+ RegisterVariable lpfnRegisterVariable;
+ ExecuteCode lpfnExecuteCode;
+ InitRequest lpfnInitRequest;
+ DoneRequest lpfnDoneRequest;
+ GetResultText lpfnGetResultText;
+ GetVariableSize lpfnGetVariableSize;
+ GetVariable lpfnGetVariable;
+ SaveToFile lpfnSaveToFile;
+ GetResultBufferSize lpfnGetResultBufferSize;
+
+ HMODULE handle;
+ char *array;
+ int request_id;
+ int len;
+
+ handle = LoadLibrary("php4app.dll");
+ if( handle == NULL )
+ return FALSE ;
+
+ lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
+ lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
+ lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
+ lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
+ lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
+ lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
+ lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
+ lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
+ lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
+ lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
+
+ if(lpfnRegisterVariable == NULL ||
+ lpfnExecutePHP == NULL ||
+ lpfnExecuteCode == NULL )
+ {
+ FreeLibrary( handle ) ;
+ return FALSE ;
+ }
+
+ request_id = lpfnInitRequest();
+ lpfnRegisterVariable(request_id, "x", "2");
+ lpfnRegisterVariable(request_id, "y", "3");
+ lpfnRegisterVariable(request_id, "z", "0");
+
+ lpfnExecutePHP(request_id, "test.php");
+
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+
+ //get variable value after execution
+ len = lpfnGetVariableSize(request_id, "z");
+ if (len > 0) {
+ array = (char *)malloc(len);
+ lpfnGetVariable(request_id, "z", array, len);
+ printf("after execution variable z = %s\n", array);
+ free(array);
+ }
+ lpfnDoneRequest(request_id);
+
+ request_id = lpfnInitRequest();
+ lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+ lpfnDoneRequest(request_id);
+
+ FreeLibrary(handle);
+
+ return 0;
+}
diff --git a/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsp b/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsp
new file mode 100644
index 0000000..a6c53b0
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cdemo - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdemo - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdemo - Win32 Release"
+# Name "cdemo - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\cdemo.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsw b/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsw
new file mode 100644
index 0000000..883b7e0
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/cdemo.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Source/Demos/php4Applications/C++ VS 2005/cdemo.sln b/Source/Demos/php4Applications/C++ VS 2005/cdemo.sln
new file mode 100644
index 0000000..7d26c36
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/cdemo.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdemo", "cdemo.vcproj", "{30D7BBD6-5766-4A88-818A-47AC1520B484}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.ActiveCfg = Debug|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Debug|Win32.Build.0 = Debug|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.ActiveCfg = Release|Win32
+ {30D7BBD6-5766-4A88-818A-47AC1520B484}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Demos/php4Applications/C++ VS 2005/cdemo.vcproj b/Source/Demos/php4Applications/C++ VS 2005/cdemo.vcproj
new file mode 100644
index 0000000..f5d0004
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/cdemo.vcproj
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Demos/php4Applications/C++ VS 2005/test.php b/Source/Demos/php4Applications/C++ VS 2005/test.php
new file mode 100644
index 0000000..54b255b
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 2005/test.php
@@ -0,0 +1,5 @@
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.cpp b/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.cpp
new file mode 100644
index 0000000..976384e
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// cdemo.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.h b/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.h
new file mode 100644
index 0000000..1b40500
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/StdAfx.h
@@ -0,0 +1,19 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
+#define AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__B8E472A2_BB1C_46B3_B1A1_8D3133C82D8D__INCLUDED_)
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/cdemo.cpp b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.cpp
new file mode 100644
index 0000000..02f788a
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.cpp
@@ -0,0 +1,101 @@
+// cdemo.cpp : Defines the entry point for the console application.
+//
+
+
+# include "stdafx.h"
+# include
+# include
+# include
+# include
+
+
+typedef int (WINAPI * ExecutePHP)(int request_id, char * filename);
+typedef int (WINAPI * ExecuteCode)(int request_id, char * acode);
+typedef void (WINAPI * RegisterVariable)(int request_id, char * aname, char * avalue);
+typedef int (WINAPI * InitRequest)(void);
+typedef void (WINAPI * DoneRequest)(int request_id);
+typedef int (WINAPI * GetResultText)(int request_id, char *buf, int buflen);
+typedef int (WINAPI * GetVariableSize)(int request_id, char *aname);
+typedef int (WINAPI * GetVariable)(int request_id, char *aname, char *buf, int buflen);
+typedef void (WINAPI * SaveToFile)(int request_id, char *filename);
+typedef int (WINAPI * GetResultBufferSize)(int request_id);
+
+int main(int argc, char* argv[])
+{
+ ExecutePHP lpfnExecutePHP;
+ RegisterVariable lpfnRegisterVariable;
+ ExecuteCode lpfnExecuteCode;
+ InitRequest lpfnInitRequest;
+ DoneRequest lpfnDoneRequest;
+ GetResultText lpfnGetResultText;
+ GetVariableSize lpfnGetVariableSize;
+ GetVariable lpfnGetVariable;
+ SaveToFile lpfnSaveToFile;
+ GetResultBufferSize lpfnGetResultBufferSize;
+
+ HMODULE handle;
+ char *array;
+ int request_id;
+ int len;
+
+ handle = LoadLibrary("php4app.dll");
+ if( handle == NULL )
+ return FALSE ;
+
+ lpfnRegisterVariable = (RegisterVariable) GetProcAddress(handle, "RegisterVariable");
+ lpfnExecutePHP = (ExecutePHP) GetProcAddress(handle, "ExecutePHP");
+ lpfnExecuteCode = (ExecuteCode)GetProcAddress(handle, "ExecuteCode");
+ lpfnInitRequest = (InitRequest)GetProcAddress(handle, "InitRequest");
+ lpfnDoneRequest = (DoneRequest)GetProcAddress(handle, "DoneRequest");
+ lpfnGetResultText = (GetResultText)GetProcAddress(handle, "GetResultText");
+ lpfnGetVariableSize = (GetVariableSize)GetProcAddress(handle, "GetVariableSize");
+ lpfnGetVariable = (GetVariable)GetProcAddress(handle, "GetVariable");
+ lpfnSaveToFile = (SaveToFile)GetProcAddress(handle, "SaveToFile");
+ lpfnGetResultBufferSize = (GetResultBufferSize)GetProcAddress(handle, "GetResultBufferSize");
+
+ if(lpfnRegisterVariable == NULL ||
+ lpfnExecutePHP == NULL ||
+ lpfnExecuteCode == NULL )
+ {
+ FreeLibrary( handle ) ;
+ return FALSE ;
+ }
+
+ request_id = lpfnInitRequest();
+ lpfnRegisterVariable(request_id, "x", "2");
+ lpfnRegisterVariable(request_id, "y", "3");
+ lpfnRegisterVariable(request_id, "z", "0");
+
+ lpfnExecutePHP(request_id, "test.php");
+
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+
+ //get variable value after execution
+ len = lpfnGetVariableSize(request_id, "z");
+ if (len > 0) {
+ array = (char *)malloc(len);
+ lpfnGetVariable(request_id, "z", array, len);
+ printf("after execution variable z = %s\n", array);
+ free(array);
+ }
+ lpfnDoneRequest(request_id);
+
+ request_id = lpfnInitRequest();
+ lpfnExecuteCode(request_id, "echo \"embedded script demo\\n\";");
+ len = lpfnGetResultText(request_id, NULL, 0);
+ array = (char *)malloc(len);
+ lpfnGetResultText(request_id, array, len);
+ printf("\n");
+ printf("%s\n",array);
+ free(array);
+ lpfnDoneRequest(request_id);
+
+ FreeLibrary(handle);
+
+ return 0;
+}
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsp b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsp
new file mode 100644
index 0000000..a6c53b0
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="cdemo" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cdemo - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdemo.mak" CFG="cdemo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdemo - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdemo - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cdemo - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdemo - Win32 Release"
+# Name "cdemo - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\cdemo.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsw b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsw
new file mode 100644
index 0000000..883b7e0
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/cdemo.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "cdemo"=.\cdemo.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/Source/Demos/php4Applications/C++ VS 6.0/test.php b/Source/Demos/php4Applications/C++ VS 6.0/test.php
new file mode 100644
index 0000000..54b255b
--- /dev/null
+++ b/Source/Demos/php4Applications/C++ VS 6.0/test.php
@@ -0,0 +1,5 @@
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
new file mode 100644
index 0000000..d503729
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.pas
@@ -0,0 +1,142 @@
+unit php4Delphi.MainForm;
+
+interface
+
+uses
+ System.Drawing, System.Collections, System.ComponentModel,
+ System.Windows.Forms, System.Data, System.Text, System.Runtime.InteropServices;
+
+type
+ TWinForm = class(System.Windows.Forms.Form)
+ {$REGION 'Designer Managed Code'}
+ strict private
+ ///
+ /// Required designer variable.
+ ///
+ Components: System.ComponentModel.Container;
+ TextBox1: System.Windows.Forms.TextBox;
+ Button1: System.Windows.Forms.Button;
+ OpenFileDialog1: System.Windows.Forms.OpenFileDialog;
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ procedure InitializeComponent;
+ procedure Button1_Click(sender: System.Object; e: System.EventArgs);
+ {$ENDREGION}
+ strict protected
+ ///
+ /// Clean up any resources being used.
+ ///
+ procedure Dispose(Disposing: Boolean); override;
+ private
+ { Private Declarations }
+ public
+ constructor Create;
+ end;
+
+ [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
+
+implementation
+
+uses php4Delphi.Standard;
+
+{$AUTOBOX ON}
+
+{$REGION 'Windows Form Designer generated code'}
+///
+/// Required method for Designer support -- do not modify
+/// the contents of this method with the code editor.
+///
+procedure TWinForm.InitializeComponent;
+begin
+ Self.TextBox1 := System.Windows.Forms.TextBox.Create;
+ Self.Button1 := System.Windows.Forms.Button.Create;
+ Self.OpenFileDialog1 := System.Windows.Forms.OpenFileDialog.Create;
+ Self.SuspendLayout;
+ //
+ // TextBox1
+ //
+ Self.TextBox1.Location := System.Drawing.Point.Create(8, 16);
+ Self.TextBox1.Multiline := True;
+ Self.TextBox1.Name := 'TextBox1';
+ Self.TextBox1.ScrollBars := System.Windows.Forms.ScrollBars.Both;
+ Self.TextBox1.Size := System.Drawing.Size.Create(272, 180);
+ Self.TextBox1.TabIndex := 0;
+ Self.TextBox1.Text := '';
+ //
+ // Button1
+ //
+ Self.Button1.Location := System.Drawing.Point.Create(12, 224);
+ Self.Button1.Name := 'Button1';
+ Self.Button1.TabIndex := 1;
+ Self.Button1.Text := 'Execute';
+ Include(Self.Button1.Click, Self.Button1_Click);
+ //
+ // OpenFileDialog1
+ //
+ Self.OpenFileDialog1.Filter := 'PHP files|*.php';
+ //
+ // TWinForm
+ //
+ Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
+ Self.ClientSize := System.Drawing.Size.Create(292, 266);
+ Self.Controls.Add(Self.Button1);
+ Self.Controls.Add(Self.TextBox1);
+ Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedDialog;
+ Self.MaximizeBox := False;
+ Self.MinimizeBox := False;
+ Self.Name := 'TWinForm';
+ Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen;
+ Self.Text := 'php4delphi';
+ Self.ResumeLayout(False);
+end;
+{$ENDREGION}
+
+procedure TWinForm.Dispose(Disposing: Boolean);
+begin
+ if Disposing then
+ begin
+ if Components <> nil then
+ Components.Dispose();
+ end;
+ inherited Dispose(Disposing);
+end;
+
+constructor TWinForm.Create;
+begin
+ inherited Create;
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent;
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+end;
+
+procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
+var
+ RequestID : integer;
+ L : integer;
+ builder : StringBuilder;
+begin
+ if OpenFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK then
+ begin
+ RequestID := InitRequest;
+ ExecutePHP(RequestID, OpenFileDialog1.FileName);
+ L := GetResultBufferSize(RequestID);
+ if L > 0 then
+ begin
+ builder := StringBuilder.Create;
+ builder.Capacity := L;
+ GetResultText(RequestID, builder, L +1);
+ TextBox1.Text := builder.ToString;
+ DoneRequest(RequestID);
+ builder.Free;
+ end;
+ end;
+
+end;
+
+end.
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
new file mode 100644
index 0000000..acc72bf
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.MainForm.resx
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ False
+
+
+ Private
+
+
+ False
+
+
+ Private
+
+
+ Private
+
+
+ 17, 17
+
+
+ False
+
+
+ (Default)
+
+
+ False
+
+
+ False
+
+
+ 4, 4
+
+
+ True
+
+
+ 80
+
+
+ True
+
+
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas
new file mode 100644
index 0000000..207997d
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.Standard.pas
@@ -0,0 +1,52 @@
+unit php4Delphi.Standard;
+
+interface
+uses
+ Types, System.Text, System.Runtime.InteropServices;
+
+function InitRequest : integer;
+procedure DoneRequest(RequestID : integer);
+procedure RegisterVariable(RequestID : integer; AName : string; AValue : string);
+function ExecutePHP(RequestID : integer; FileName : string) : integer;
+function ExecuteCode(RequestID : integer; ACode : string) : integer;
+function GetResultText(RequestID : integer; Buffer : StringBuilder; BufLen : integer) : integer;
+function GetVariable(RequestID : integer; AName : string; Buffer : StringBuilder; BufLen : integer) : integer;
+procedure SaveToFile(RequestID : integer; AFileName : string);
+function GetVariableSize(RequestID : integer; AName : string) : integer;
+function GetResultBufferSize(RequestID : integer) : integer;
+
+implementation
+uses
+ System.Security;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function InitRequest; external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure DoneRequest; external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure RegisterVariable;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function ExecutePHP;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function ExecuteCode;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetResultText;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetVariable;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+procedure SaveToFile;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetVariableSize;external;
+
+[SuppressUnmanagedCodeSecurity, DllImport('php4app.dll', CharSet = CharSet.Ansi, SetLastError = True)]
+function GetResultBufferSize;external;
+
+end.
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources
new file mode 100644
index 0000000..f476cd2
Binary files /dev/null and b/Source/Demos/php4Applications/Delphi .NET/php4Delphi.TWinForm.resources differ
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
new file mode 100644
index 0000000..12c9a32
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.bdsproj
@@ -0,0 +1,235 @@
+
+
+
+
+ DelphiDotNet.Personality
+
+ 2.0
+ {239C567F-CA65-4E23-A4FF-609E27F1003C}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ php4DelphiDemo.dpr
+
+
+ 7.0
+
+
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ True
+ False
+ False
+ 4096
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+ c:\windows\microsoft.net\framework\v1.1.4322
+ c:\windows\microsoft.net\framework\v1.1.4322\System.XML.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Data.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll
+
+
+ True
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2067
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr
new file mode 100644
index 0000000..d37c1ac
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.dpr
@@ -0,0 +1,100 @@
+program php4DelphiDemo;
+
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'}
+{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll'}
+{$R 'php4Delphi.TWinForm.resources' 'php4Delphi.MainForm.resx'}
+
+uses
+ System.Reflection,
+ System.Runtime.CompilerServices,
+ System.Runtime.InteropServices,
+ System.Windows.Forms,
+ php4Delphi.MainForm in 'php4Delphi.MainForm.pas' {php4Delphi.MainForm.TWinForm: System.Windows.Forms.Form},
+ php4Delphi.Standard in 'php4Delphi.Standard.pas';
+
+{$R *.res}
+
+{$REGION 'Program/Assembly Information'}
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyDescription('')]
+[assembly: AssemblyConfiguration('')]
+[assembly: AssemblyCompany('')]
+[assembly: AssemblyProduct('')]
+[assembly: AssemblyCopyright('')]
+[assembly: AssemblyTrademark('')]
+[assembly: AssemblyCulture('')]
+
+// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription.
+// You can set this in the IDE via the Project Options.
+// Manually setting the AssemblyTitle attribute below will override the IDE
+// setting.
+// [assembly: AssemblyTitle('')]
+
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion('1.0.*')]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output
+// directory is the project directory (the default).
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile('')]
+[assembly: AssemblyKeyName('')]
+
+
+//
+// Use the attributes below to control the COM visibility of your assembly. By
+// default the entire assembly is visible to COM. Setting ComVisible to false
+// is the recommended default for your assembly. To then expose a class and interface
+// to COM set ComVisible to true on each one. It is also recommended to add a
+// Guid attribute.
+//
+
+[assembly: ComVisible(False)]
+//[assembly: Guid('')]
+//[assembly: TypeLibVersion(1, 0)]
+{$ENDREGION}
+
+[STAThread]
+begin
+ Application.Run(TWinForm.Create);
+end.
diff --git a/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.res b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.res
new file mode 100644
index 0000000..1a2a535
Binary files /dev/null and b/Source/Demos/php4Applications/Delphi .NET/php4DelphiDemo.res differ
diff --git a/Source/Demos/php4Applications/Delphi/Project1.bdsproj b/Source/Demos/php4Applications/Delphi/Project1.bdsproj
new file mode 100644
index 0000000..77b2016
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi/Project1.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {142099EB-674F-4132-8C40-C738A5BD0EC1}
+
+
+
+
+ Project1.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Demos/psvPHP/Library demo/Project1.dpr b/Source/Demos/php4Applications/Delphi/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/Library demo/Project1.dpr
rename to Source/Demos/php4Applications/Delphi/Project1.dpr
index 79c301d..dfa3f13 100644
--- a/Demos/psvPHP/Library demo/Project1.dpr
+++ b/Source/Demos/php4Applications/Delphi/Project1.dpr
@@ -1,13 +1,13 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/php4Applications/Delphi/Project1.res b/Source/Demos/php4Applications/Delphi/Project1.res
new file mode 100644
index 0000000..55f8742
Binary files /dev/null and b/Source/Demos/php4Applications/Delphi/Project1.res differ
diff --git a/Source/Demos/php4Applications/Delphi/Unit1.ddp b/Source/Demos/php4Applications/Delphi/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/php4Applications/Delphi/Unit1.ddp differ
diff --git a/Source/Demos/php4Applications/Delphi/Unit1.dfm b/Source/Demos/php4Applications/Delphi/Unit1.dfm
new file mode 100644
index 0000000..b1b2df7
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi/Unit1.dfm
@@ -0,0 +1,62 @@
+object Form1: TForm1
+ Left = 259
+ Top = 321
+ BorderStyle = bsDialog
+ Caption = 'Form1'
+ ClientHeight = 296
+ ClientWidth = 609
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 16
+ Top = 12
+ Width = 581
+ Height = 241
+ Lines.Strings = (
+ '$z = $x + $y; echo "Result "; echo $z;')
+ TabOrder = 0
+ end
+ object btnExecuteScript: TButton
+ Left = 16
+ Top = 264
+ Width = 101
+ Height = 25
+ Caption = 'Execute script'
+ TabOrder = 1
+ OnClick = btnExecuteScriptClick
+ end
+ object btnExecuteCode: TButton
+ Left = 124
+ Top = 264
+ Width = 109
+ Height = 25
+ Caption = 'Execute Code'
+ TabOrder = 2
+ OnClick = btnExecuteCodeClick
+ end
+ object btnClose: TButton
+ Left = 524
+ Top = 264
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 3
+ OnClick = btnCloseClick
+ end
+ object btnExecuteAndSave: TButton
+ Left = 240
+ Top = 264
+ Width = 145
+ Height = 25
+ Caption = 'Execute and Save'
+ TabOrder = 4
+ OnClick = btnExecuteAndSaveClick
+ end
+end
diff --git a/Demos/php4Applications/Delphi/Unit1.pas b/Source/Demos/php4Applications/Delphi/Unit1.pas
similarity index 77%
rename from Demos/php4Applications/Delphi/Unit1.pas
rename to Source/Demos/php4Applications/Delphi/Unit1.pas
index 91fa036..bbf6e65 100644
--- a/Demos/php4Applications/Delphi/Unit1.pas
+++ b/Source/Demos/php4Applications/Delphi/Unit1.pas
@@ -1,111 +1,127 @@
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit Unit1;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, PHP4AppIntf;
-
-type
- TForm1 = class(TForm)
- Memo1: TMemo;
- btnExecuteScript: TButton;
- btnExecuteCode: TButton;
- btnClose: TButton;
- btnExecuteAndSave: TButton;
- procedure btnExecuteScriptClick(Sender: TObject);
- procedure btnCloseClick(Sender: TObject);
- procedure btnExecuteCodeClick(Sender: TObject);
- procedure btnExecuteAndSaveClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- RequestID : integer;
- end;
-
-var
- Form1: TForm1;
-
-
-implementation
-
-{$R *.DFM}
-
-procedure TForm1.btnExecuteScriptClick(Sender: TObject);
-var
- S : String;
- L : integer;
-begin
- Memo1.Lines.Clear;
- RequestID := InitRequest;
- RegisterVariable(RequestID, 'x','2');
- RegisterVariable(RequestID, 'y','3');
- RegisterVariable(RequestID, 'z','0');
- ExecutePHP(RequestID, 'test.php');
- L := GetResultText(RequestID, nil, 0);
- if L > 0 then
- begin
- SetLength(S, L);
- GetResultText(RequestID, PChar(S), L);
- end;
- memo1.Lines.Text := S;
- L := GetVariableSize(RequestID, 'z');
- if L > 0 then
- begin
- SetLength(S, L);
- GetVariable(RequestID, 'z', PChar(S), L);
- ShowMessage('After execution z = ' + S);
- end;
- DoneRequest(RequestID);
-end;
-
-procedure TForm1.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TForm1.btnExecuteCodeClick(Sender: TObject);
-var
- S : String;
- L : integer;
-begin
- Memo1.Lines.Clear;
- RequestID := InitRequest;
- RegisterVariable(RequestID, 'x','2');
- RegisterVariable(RequestID, 'y','3');
- RegisterVariable(RequestID, 'z','0');
- ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
- L := GetResultBufferSize(RequestID);
- if L > 0 then
- begin
- SetLength(S, L);
- GetResultText(RequestID, PChar(S), L);
- end;
- memo1.Lines.Text := S;
- L := GetVariableSize(RequestID, 'z');
- if L > 0 then
- begin
- SetLength(S, L);
- GetVariable(RequestID, 'z', PChar(S), L);
- ShowMessage('After execution z = ' + S);
- end;
- DoneRequest(RequestID);
-end;
-
-procedure TForm1.btnExecuteAndSaveClick(Sender: TObject);
-begin
- Memo1.Lines.Clear;
- RequestID := InitRequest;
- RegisterVariable(RequestID, 'x','2');
- RegisterVariable(RequestID, 'y','3');
- RegisterVariable(RequestID, 'z','0');
- ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
- SaveToFile(RequestID, 'result.txt');
- memo1.Lines.LoadFromFile('result.txt');
- DoneRequest(RequestID);
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, PHP4AppIntf;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ btnExecuteScript: TButton;
+ btnExecuteCode: TButton;
+ btnClose: TButton;
+ btnExecuteAndSave: TButton;
+ procedure btnExecuteScriptClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure btnExecuteCodeClick(Sender: TObject);
+ procedure btnExecuteAndSaveClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ RequestID : integer;
+ end;
+
+var
+ Form1: TForm1;
+
+
+implementation
+
+{$R *.DFM}
+
+procedure TForm1.btnExecuteScriptClick(Sender: TObject);
+var
+ S : String;
+ L : integer;
+ FileName : string;
+ FilePath : string;
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+
+ FilePath := ExtractFilePath(ParamStr(0));
+ FileName := IncludeTrailingBackslash(FilePath) + 'test.php';
+
+ ExecutePHP(RequestID, PAnsiChar(FileName));
+
+ L := GetResultText(RequestID, nil, 0);
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetResultText(RequestID, PChar(S), L);
+ end;
+ memo1.Lines.Text := S;
+ L := GetVariableSize(RequestID, 'z');
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetVariable(RequestID, 'z', PChar(S), L);
+ ShowMessage('After execution z = ' + S);
+ end;
+ DoneRequest(RequestID);
+end;
+
+procedure TForm1.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TForm1.btnExecuteCodeClick(Sender: TObject);
+var
+ S : String;
+ L : integer;
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+ ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
+ L := GetResultBufferSize(RequestID);
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetResultText(RequestID, PChar(S), L);
+ end;
+ memo1.Lines.Text := S;
+ L := GetVariableSize(RequestID, 'z');
+ if L > 0 then
+ begin
+ SetLength(S, L);
+ GetVariable(RequestID, 'z', PChar(S), L);
+ ShowMessage('After execution z = ' + S);
+ end;
+ DoneRequest(RequestID);
+end;
+
+procedure TForm1.btnExecuteAndSaveClick(Sender: TObject);
+begin
+ Memo1.Lines.Clear;
+ RequestID := InitRequest;
+ RegisterVariable(RequestID, 'x','2');
+ RegisterVariable(RequestID, 'y','3');
+ RegisterVariable(RequestID, 'z','0');
+ ExecuteCode(RequestID, '$z = $x + $y; echo "Result "; echo $z;');
+ SaveToFile(RequestID, 'result.txt');
+ memo1.Lines.LoadFromFile('result.txt');
+ DoneRequest(RequestID);
+end;
+
+end.
diff --git a/Source/Demos/php4Applications/Delphi/result.txt b/Source/Demos/php4Applications/Delphi/result.txt
new file mode 100644
index 0000000..0f9b03d
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi/result.txt
@@ -0,0 +1 @@
+Result 5
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/Delphi/test.php b/Source/Demos/php4Applications/Delphi/test.php
new file mode 100644
index 0000000..54b255b
--- /dev/null
+++ b/Source/Demos/php4Applications/Delphi/test.php
@@ -0,0 +1,5 @@
+
+ $z = $x + $y;
+ echo "Result " ;
+ echo $z;
+?>
diff --git a/Source/Demos/php4Applications/MS Word/Doc1.doc b/Source/Demos/php4Applications/MS Word/Doc1.doc
new file mode 100644
index 0000000..8ec8081
Binary files /dev/null and b/Source/Demos/php4Applications/MS Word/Doc1.doc differ
diff --git a/Source/Demos/php4Applications/MS Word/test.php b/Source/Demos/php4Applications/MS Word/test.php
new file mode 100644
index 0000000..d3fccb8
--- /dev/null
+++ b/Source/Demos/php4Applications/MS Word/test.php
@@ -0,0 +1,4 @@
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln
new file mode 100644
index 0000000..5eb86b4
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "php4delphi", "php4delphi\php4delphi.vbproj", "{98A25626-5C96-46EB-8A80-2D2C7236D025}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
new file mode 100644
index 0000000..3dc6448
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/ApplicationEvents.vb
@@ -0,0 +1,15 @@
+Namespace My
+
+ ' The following events are availble for MyApplication:
+ '
+ ' Startup: Raised when the application starts, before the startup form is created.
+ ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
+ ' UnhandledException: Raised if the application encounters an unhandled exception.
+ ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
+ ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
+ Partial Friend Class MyApplication
+
+ End Class
+
+End Namespace
+
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
new file mode 100644
index 0000000..3adb089
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.Designer.vb
@@ -0,0 +1,71 @@
+ _
+Partial Class Form1
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+ _
+ Private Sub InitializeComponent()
+ Me.TextBox1 = New System.Windows.Forms.TextBox
+ Me.Button1 = New System.Windows.Forms.Button
+ Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
+ Me.SuspendLayout()
+ '
+ 'TextBox1
+ '
+ Me.TextBox1.Location = New System.Drawing.Point(10, 16)
+ Me.TextBox1.Multiline = True
+ Me.TextBox1.Name = "TextBox1"
+ Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both
+ Me.TextBox1.Size = New System.Drawing.Size(588, 177)
+ Me.TextBox1.TabIndex = 0
+ '
+ 'Button1
+ '
+ Me.Button1.Location = New System.Drawing.Point(13, 223)
+ Me.Button1.Name = "Button1"
+ Me.Button1.Size = New System.Drawing.Size(75, 23)
+ Me.Button1.TabIndex = 1
+ Me.Button1.Text = "Execute"
+ Me.Button1.UseVisualStyleBackColor = True
+ '
+ 'OpenFileDialog1
+ '
+ Me.OpenFileDialog1.Filter = "PHP files|*.php"
+ Me.OpenFileDialog1.Title = "Select script to execute"
+ '
+ 'Form1
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(610, 266)
+ Me.Controls.Add(Me.Button1)
+ Me.Controls.Add(Me.TextBox1)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "Form1"
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
+ Me.Text = "php4delphi"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+ Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
+ Friend WithEvents Button1 As System.Windows.Forms.Button
+ Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
+
+End Class
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
new file mode 100644
index 0000000..710a648
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
new file mode 100644
index 0000000..06fe6d4
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/Form1.vb
@@ -0,0 +1,32 @@
+Imports System.Runtime.InteropServices
+
+Public Class Form1
+
+ Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
+ Dim L As Integer
+ Dim builder As StringBuilder = New StringBuilder
+ Dim RequestID As Integer
+ Dim fn As String
+ If OpenFileDialog1.ShowDialog Then
+ RequestID = InitRequest()
+ fn = OpenFileDialog1.FileName
+ ExecutePHP(RequestID, fn)
+ L = GetResultText(RequestID, builder, 0)
+ builder.Capacity = L
+ L = GetResultText(RequestID, builder, builder.Capacity + 1)
+ TextBox1.Text = builder.ToString()
+ DoneRequest(RequestID)
+ End If
+ End Sub
+ Public Declare Ansi Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Integer, ByVal FileName As String) As Integer
+ Public Declare Ansi Function InitRequest Lib "php4app.dll" () As Integer
+ Public Declare Ansi Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Integer)
+ Public Declare Ansi Function GetResultText Lib "php4app.dll" (ByVal RequestID As Integer, ByVal Buf As StringBuilder, ByVal Buflen As Integer) As Integer
+ Public Declare Ansi Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal AValue As String)
+ Public Declare Ansi Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Integer, ByVal ACode As String) As Integer
+ Public Declare Ansi Function GetVariable Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String, ByVal Buffer As StringBuilder, ByVal BufLen As Integer) As Integer
+ Public Declare Ansi Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AFileName As String)
+ Public Declare Ansi Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Integer, ByVal AName As String) As Integer
+ Public Declare Ansi Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Integer) As Integer
+
+End Class
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
new file mode 100644
index 0000000..83b31ad
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.Designer.vb
@@ -0,0 +1,38 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.42
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
+ ' or if you encounter build errors in this file, go to the Project Designer
+ ' (go to Project Properties or double-click the My Project node in
+ ' Solution Explorer), and make changes on the Application tab.
+ '
+ Partial Friend Class MyApplication
+
+ _
+ Public Sub New()
+ MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
+ Me.IsSingleInstance = false
+ Me.EnableVisualStyles = true
+ Me.SaveMySettingsOnExit = true
+ Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
+ End Sub
+
+ _
+ Protected Overrides Sub OnCreateMainForm()
+ Me.MainForm = Global.php4delphi.Form1
+ End Sub
+ End Class
+End Namespace
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
new file mode 100644
index 0000000..c0f7fef
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/My Project/Application.myapp
@@ -0,0 +1,10 @@
+
+
+ true
+ Form1
+ false
+ 0
+ true
+ 0
+ true
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
new file mode 100644
index 0000000..c09f7d4
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj
@@ -0,0 +1,88 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {98A25626-5C96-46EB-8A80-2D2C7236D025}
+ WinExe
+ php4delphi.My.MyApplication
+ php4delphi
+ php4delphi
+ WindowsForms
+
+
+ true
+ full
+ true
+ true
+ bin\Debug\
+ php4delphi.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ pdbonly
+ false
+ true
+ true
+ bin\Release\
+ php4delphi.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.vb
+ Form
+
+
+ True
+ Application.myapp
+
+
+
+
+ Designer
+ Form1.vb
+
+
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
new file mode 100644
index 0000000..c8dfea1
--- /dev/null
+++ b/Source/Demos/php4Applications/VB .NET/php4delphi/php4delphi/php4delphi.vbproj.user
@@ -0,0 +1,16 @@
+
+
+ publish\
+
+
+
+
+
+
+
+
+ 0
+ en-US
+ false
+
+
\ No newline at end of file
diff --git a/Source/Demos/php4Applications/Visual Basic/Form1.frm b/Source/Demos/php4Applications/Visual Basic/Form1.frm
new file mode 100644
index 0000000..c42d183
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/Form1.frm
@@ -0,0 +1,50 @@
+VERSION 5.00
+Begin VB.Form Form1
+ Caption = "Form1"
+ ClientHeight = 6870
+ ClientLeft = 60
+ ClientTop = 345
+ ClientWidth = 8790
+ LinkTopic = "Form1"
+ ScaleHeight = 6870
+ ScaleWidth = 8790
+ StartUpPosition = 3 'Windows Default
+ Begin VB.CommandButton ButtonExecute
+ Caption = "Execute"
+ Height = 375
+ Left = 7560
+ TabIndex = 1
+ Top = 360
+ Width = 1095
+ End
+ Begin VB.TextBox Text1
+ Height = 6495
+ Left = 240
+ MultiLine = -1 'True
+ TabIndex = 0
+ Top = 240
+ Width = 7215
+ End
+End
+Attribute VB_Name = "Form1"
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = False
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Private Sub ButtonExecute_Click()
+Dim code As Long
+Dim RequestID As Long
+Dim L As Long
+Dim Res As String
+
+ Res = ""
+ RequestID = InitRequest()
+ code = ExecutePHP(RequestID, "c:\php5\test.php")
+ L = GetResultText(RequestID, Res, 0)
+ Res = Space(L + 1)
+
+ L = GetResultText(RequestID, Res, L)
+ DoneRequest (RequestID)
+ Text1.Text = Res
+
+End Sub
diff --git a/Source/Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC b/Source/Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC
new file mode 100644
index 0000000..57528cb
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/MSSCCPRJ.SCC
@@ -0,0 +1,5 @@
+[SCC]
+SCC=This is a source code control file
+[php_VB.vbp]
+SCC_Project_Name=this project is not under source code control
+SCC_Aux_Path=
diff --git a/Source/Demos/php4Applications/Visual Basic/php_VB.vbp b/Source/Demos/php4Applications/Visual Basic/php_VB.vbp
new file mode 100644
index 0000000..99d5b15
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/php_VB.vbp
@@ -0,0 +1,32 @@
+Type=Exe
+Form=Form1.frm
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\StdOle2.Tlb#OLE Automation
+Module=php_module; php_module.bas
+IconForm="Form1"
+Startup="Form1"
+ExeName32="php_VB.exe"
+Command32=""
+Name="php_VB"
+HelpContextID="0"
+CompatibleMode="0"
+MajorVer=1
+MinorVer=0
+RevisionVer=0
+AutoIncrementVer=0
+ServerSupportFiles=0
+VersionCompanyName="Fedpol"
+CompilationType=0
+OptimizationType=0
+FavorPentiumPro(tm)=0
+CodeViewDebugInfo=0
+NoAliasing=0
+BoundsCheck=0
+OverflowCheck=0
+FlPointCheck=0
+FDIVCheck=0
+UnroundedFP=0
+StartMode=0
+Unattended=0
+Retained=0
+ThreadPerObject=0
+MaxNumberOfThreads=1
diff --git a/Source/Demos/php4Applications/Visual Basic/php_VB.vbw b/Source/Demos/php4Applications/Visual Basic/php_VB.vbw
new file mode 100644
index 0000000..0c44b62
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/php_VB.vbw
@@ -0,0 +1,2 @@
+Form1 = 66, 66, 702, 613, , 22, 22, 658, 569, C
+php_module = 44, 44, 680, 591,
diff --git a/Source/Demos/php4Applications/Visual Basic/php_module.bas b/Source/Demos/php4Applications/Visual Basic/php_module.bas
new file mode 100644
index 0000000..ff67043
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/php_module.bas
@@ -0,0 +1,14 @@
+Attribute VB_Name = "php_module"
+Option Explicit
+
+Public Declare Function ExecutePHP Lib "php4app.dll" (ByVal RequestID As Long, ByVal FileName As String) As Long
+Public Declare Function InitRequest Lib "php4app.dll" () As Long
+Public Declare Sub DoneRequest Lib "php4app.dll" (ByVal RequestID As Long)
+Public Declare Function GetResultText Lib "php4app.dll" (ByVal RequestID As Long, ByVal Buf As String, ByVal Buflen As Long) As Long
+Public Declare Sub RegisterVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal AValue As String)
+Public Declare Function ExecuteCode Lib "php4app.dll" (ByVal RequestID As Long, ByVal ACode As String) As Long
+Public Declare Function GetVariable Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String, ByVal Buffer As String, ByVal BufLen As Long) As Long
+Public Declare Sub SaveToFile Lib "php4app.dll" (ByVal RequestID As Long, ByVal AFileName As String)
+Public Declare Function GetVariableSize Lib "php4app.dll" (ByVal RequestID As Long, ByVal AName As String) As Long
+Public Declare Function GetResultBufferSize Lib "php4app.dll" (ByVal RequestID As Long) As Long
+
diff --git a/Source/Demos/php4Applications/Visual Basic/test.php b/Source/Demos/php4Applications/Visual Basic/test.php
new file mode 100644
index 0000000..d3fccb8
--- /dev/null
+++ b/Source/Demos/php4Applications/Visual Basic/test.php
@@ -0,0 +1,4 @@
+
+ $z = $x + $y;
+ phpinfo();
+?>
diff --git a/Source/Demos/psvPHP/Components/ComponentsDemo.bdsproj b/Source/Demos/psvPHP/Components/ComponentsDemo.bdsproj
new file mode 100644
index 0000000..340b845
--- /dev/null
+++ b/Source/Demos/psvPHP/Components/ComponentsDemo.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {0942D453-FEC7-4353-8BB9-C43034FB5D28}
+
+
+
+
+ ComponentsDemo.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/Components/ComponentsDemo.dpr b/Source/Demos/psvPHP/Components/ComponentsDemo.dpr
new file mode 100644
index 0000000..0e34a1e
--- /dev/null
+++ b/Source/Demos/psvPHP/Components/ComponentsDemo.dpr
@@ -0,0 +1,14 @@
+program ComponentsDemo;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {frmTest};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Components Demo';
+ Application.CreateForm(TfrmTest, frmTest);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Components/ComponentsDemo.res b/Source/Demos/psvPHP/Components/ComponentsDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Components/ComponentsDemo.res differ
diff --git a/Source/Demos/psvPHP/Components/Unit1.ddp b/Source/Demos/psvPHP/Components/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Components/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/Components/Unit1.dfm b/Source/Demos/psvPHP/Components/Unit1.dfm
new file mode 100644
index 0000000..b51da76
--- /dev/null
+++ b/Source/Demos/psvPHP/Components/Unit1.dfm
@@ -0,0 +1,60 @@
+object frmTest: TfrmTest
+ Left = 399
+ Top = 356
+ BorderStyle = bsDialog
+ Caption = 'Components demo'
+ ClientHeight = 252
+ ClientWidth = 472
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 0
+ Top = 226
+ Width = 472
+ Height = 26
+ Align = alBottom
+ Caption =
+ 'This demo project shows how to access published property'#13#10'of Del' +
+ 'phi components from PHP script'
+ Color = clInfoBk
+ ParentColor = False
+ WordWrap = True
+ end
+ object memScript: TMemo
+ Left = 8
+ Top = 8
+ Width = 369
+ Height = 213
+ TabOrder = 0
+ end
+ object btnExecute: TButton
+ Left = 384
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = '&Execute'
+ TabOrder = 1
+ OnClick = btnExecuteClick
+ end
+ object PHP: TpsvPHP
+ Variables = <>
+ Left = 400
+ Top = 136
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 408
+ Top = 88
+ end
+end
diff --git a/Source/Demos/psvPHP/Components/Unit1.pas b/Source/Demos/psvPHP/Components/Unit1.pas
new file mode 100644
index 0000000..5a9e4e9
--- /dev/null
+++ b/Source/Demos/psvPHP/Components/Unit1.pas
@@ -0,0 +1,121 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This demo project shows how to access published property
+//of Delphi components from PHP script
+
+{$I PHP.INC}
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, php4delphi, PHPCommon;
+
+type
+
+ TMyButton = class(TButton)
+ private
+ function GetFontSize: integer;
+ procedure SetFontSize(const Value: integer);
+ published
+ property FontSize : integer read GetFontSize write SetFontSize;
+ end;
+
+ TfrmTest = class(TForm)
+ memScript: TMemo;
+ btnExecute: TButton;
+ PHP: TpsvPHP;
+ Label1: TLabel;
+ PHPEngine: TPHPEngine;
+ procedure btnExecuteClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ btnClose : TMyButton;
+ end;
+
+var
+ frmTest: TfrmTest;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmTest.btnExecuteClick(Sender: TObject);
+begin
+ PHP.RunCode(memScript.Lines.Text);
+end;
+
+procedure TfrmTest.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmTest.FormCreate(Sender: TObject);
+begin
+ btnClose := TMyButton.Create(Self);
+ with btnClose do
+ begin
+ Name := 'btnClose';
+ Parent := Self;
+ Left := 384;
+ Top := 42;
+ Width := 75;
+ Height := 25;
+ Caption := '&Close';
+ TabOrder := 2;
+ OnClick := btnCloseClick;
+ end;
+
+ memScript.Lines.Clear;
+ with memScript.Lines do
+ begin
+ Add('$btnClose = register_delphi_component("btnClose");');
+ Add('$frmTest = register_delphi_component("frmTest");');
+ Add('$btnClose->Caption = "&Exit";');
+ Add('$frmTest->Caption = "PHP4Delphi demo";');
+ Add('$btnClose->Top = 150;');
+ Add('$btnClose->FontSize = 10;');
+ Add('$btnClose->Cursor = -21;');
+ Add('$frmTest->Color = clGreen;');
+ Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
+ Add('delphi_show_message($st);');
+ end;
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmTest.FormDestroy(Sender: TObject);
+begin
+ btnClose.Free;
+ PHPEngine.ShutdownEngine;
+end;
+
+{ TMyButton }
+
+function TMyButton.GetFontSize: integer;
+begin
+ Result := Font.Size;
+end;
+
+procedure TMyButton.SetFontSize(const Value: integer);
+begin
+ Font.Size := Value;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Components/WindowsXP.res b/Source/Demos/psvPHP/Components/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Components/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Custom Library/DemoMain.dfm b/Source/Demos/psvPHP/Custom Library/DemoMain.dfm
new file mode 100644
index 0000000..2ba78a3
--- /dev/null
+++ b/Source/Demos/psvPHP/Custom Library/DemoMain.dfm
@@ -0,0 +1,40 @@
+object Form1: TForm1
+ Left = 484
+ Top = 330
+ BorderStyle = bsDialog
+ Caption = 'Shell Demo'
+ ClientHeight = 160
+ ClientWidth = 235
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 12
+ Top = 120
+ Width = 75
+ Height = 25
+ Caption = 'Run'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object psvPHP: TpsvPHP
+ Variables = <>
+ Left = 24
+ Top = 20
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 24
+ Top = 72
+ end
+end
diff --git a/Source/Demos/psvPHP/Custom Library/DemoMain.pas b/Source/Demos/psvPHP/Custom Library/DemoMain.pas
new file mode 100644
index 0000000..018bb49
--- /dev/null
+++ b/Source/Demos/psvPHP/Custom Library/DemoMain.pas
@@ -0,0 +1,49 @@
+unit DemoMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ phpShellLibrary, StdCtrls, php4delphi, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ Button1: TButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ Lib : TphpShellLibrary;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ Lib := TphpShellLibrary.Create(Self);
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ Lib.Free;
+ PHPEngine.ShutdownEngine;
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ psvPHP.RunCode('shellexecute(0, "open", "calc.exe", "", "", 0);');
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Custom Library/ExtDemo.bdsproj b/Source/Demos/psvPHP/Custom Library/ExtDemo.bdsproj
new file mode 100644
index 0000000..6626e63
--- /dev/null
+++ b/Source/Demos/psvPHP/Custom Library/ExtDemo.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {379827F6-60FF-4B98-9C25-2F5327DDFA29}
+
+
+
+
+ ExtDemo.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/Custom Library/ExtDemo.dpr b/Source/Demos/psvPHP/Custom Library/ExtDemo.dpr
new file mode 100644
index 0000000..e2d6586
--- /dev/null
+++ b/Source/Demos/psvPHP/Custom Library/ExtDemo.dpr
@@ -0,0 +1,13 @@
+program ExtDemo;
+
+uses
+ Forms,
+ DemoMain in 'DemoMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Custom Library/ExtDemo.res b/Source/Demos/psvPHP/Custom Library/ExtDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Custom Library/ExtDemo.res differ
diff --git a/Source/Demos/psvPHP/Custom Library/WindowsXP.res b/Source/Demos/psvPHP/Custom Library/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Custom Library/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Custom Library/phpShellLibrary.pas b/Source/Demos/psvPHP/Custom Library/phpShellLibrary.pas
new file mode 100644
index 0000000..219a349
--- /dev/null
+++ b/Source/Demos/psvPHP/Custom Library/phpShellLibrary.pas
@@ -0,0 +1,104 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: phpShellLibrary.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This sample shows how to create custom library for psvPHP component
+unit phpShellLibrary;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Controls, Graphics, Dialogs,
+ PHPAPI, ZENDAPI, phpCustomLibrary, ShellAPI, phpFunctions,
+ ZendTypes, phpTypes;
+
+
+
+type
+ TphpShellLibrary = class(TCustomPHPLibrary)
+ protected
+ procedure _ShellExecute(Sender: TObject; Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+ public
+ procedure Refresh; override;
+ end;
+
+procedure Register;
+
+implementation
+
+
+procedure Register;
+begin
+ RegisterComponents('PHP', [TphpShellLibrary]);
+end;
+
+
+{ TphpShellLibrary }
+
+procedure TphpShellLibrary._ShellExecute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ hWnd : THandle;
+ Operation, FileName, AParameters,
+ Directory: string; ShowCmd: Integer;
+
+begin
+ hWnd := Parameters[0].Value;
+ Operation := Parameters[1].Value;
+ FileName := Parameters[2].Value;
+ AParameters := Parameters[3].Value;
+ Directory := Parameters[4].Value;
+ ShowCmd := Parameters[5].Value;
+ ShellExecute(hWnd, PChar(Operation), PChar(FileName), PChar(AParameters), PChar(Directory), ShowCmd);
+end;
+
+procedure TphpShellLibrary.Refresh;
+var
+ Func : TphpFunction;
+ Parm : TFunctionParam;
+begin
+ Functions.Clear;
+
+ Func := TphpFunction(Functions.Add);
+ Func.FunctionName := 'shellexecute';
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'hwnd';
+ Parm.ParamType := tpInteger;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'operation';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'filename';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'parameters';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'directory';
+ Parm.ParamType := tpString;
+
+ Parm := TFunctionParam(Func.Parameters.Add);
+ Parm.Name := 'showcmd';
+ Parm.ParamType := tpInteger;
+
+ Func.OnExecute := _ShellExecute;
+
+
+ inherited;
+end;
+
+end.
\ No newline at end of file
diff --git a/Demos/psvPHP/Dynamic Array/dynamic_array.dpr b/Source/Demos/psvPHP/Dynamic Array/dynamic_array.dpr
similarity index 95%
rename from Demos/psvPHP/Dynamic Array/dynamic_array.dpr
rename to Source/Demos/psvPHP/Dynamic Array/dynamic_array.dpr
index 17498d2..281c69a 100644
--- a/Demos/psvPHP/Dynamic Array/dynamic_array.dpr
+++ b/Source/Demos/psvPHP/Dynamic Array/dynamic_array.dpr
@@ -1,25 +1,25 @@
-{$APPTYPE CONSOLE}
-program dynamic_array;
-
-uses
- Windows, SysUtils, Classes, ZENDAPI, zend_dynamic_array;
-
-var
- ar : TDynamicArray;
- P : pointer;
- El : PChar;
-begin
- zend_dynamic_array_init(@ar,sizeof(PChar), 3);
- El := 'Test1';
- P := zend_dynamic_array_push(@ar);
- Move(El, P^, sizeof(PChar));
- El := 'Test2';
- P := zend_dynamic_array_push(@ar);
- Move(El, P^, sizeof(PChar));
- El := 'Test3';
- P := zend_dynamic_array_push(@ar);
- Move(El, P^, sizeof(PChar));
- P := zend_dynamic_array_get_element(@ar, 1);
- El := PChar(P^);
- writeln(el);
+{$APPTYPE CONSOLE}
+program dynamic_array;
+
+uses
+ Windows, SysUtils, Classes, ZENDAPI, zend_dynamic_array;
+
+var
+ ar : TDynamicArray;
+ P : pointer;
+ El : PChar;
+begin
+ zend_dynamic_array_init(@ar,sizeof(PChar), 3);
+ El := 'Test1';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ El := 'Test2';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ El := 'Test3';
+ P := zend_dynamic_array_push(@ar);
+ Move(El, P^, sizeof(PChar));
+ P := zend_dynamic_array_get_element(@ar, 1);
+ El := PChar(P^);
+ writeln(el);
end.
\ No newline at end of file
diff --git a/Source/Demos/psvPHP/Encryption/EncDemo.dpr b/Source/Demos/psvPHP/Encryption/EncDemo.dpr
new file mode 100644
index 0000000..200b019
--- /dev/null
+++ b/Source/Demos/psvPHP/Encryption/EncDemo.dpr
@@ -0,0 +1,14 @@
+program EncDemo;
+
+uses
+ Forms,
+ uMain in 'uMain.pas' {frmMain};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Encryption Demo';
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Encryption/EncDemo.res b/Source/Demos/psvPHP/Encryption/EncDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Encryption/EncDemo.res differ
diff --git a/Source/Demos/psvPHP/Encryption/WindowsXP.res b/Source/Demos/psvPHP/Encryption/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Encryption/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Encryption/std.encryption.class.inc b/Source/Demos/psvPHP/Encryption/std.encryption.class.inc
new file mode 100644
index 0000000..be24147
--- /dev/null
+++ b/Source/Demos/psvPHP/Encryption/std.encryption.class.inc
@@ -0,0 +1,253 @@
+
+// Distributed under the GNU General Public Licence
+// *****************************************************************************
+
+class Encryption {
+
+ var $scramble1; // 1st string of ASCII characters
+ var $scramble2; // 2nd string of ASCII characters
+ var $errors; // array of error messages
+ var $adj; // 1st adjustment value (optional)
+ var $mod; // 2nd adjustment value (optional)
+
+ // ****************************************************************************
+ // class constructor
+ // ****************************************************************************
+ function encryption ()
+ {
+ //DebugBreak();
+ $this->errors = array();
+
+ // Each of these two strings must contain the same characters, but in a different order.
+ // Use only printable characters from the ASCII table.
+ // Each character can only appear once in each string EXCEPT for the first character
+ // which must be duplicated at the end (this gets round a bijou problemette when the
+ // first character of the password is also the first character in $scramble1)
+ $this->scramble1 = '! "#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!';
+ $this->scramble2 = 'f^jAE]okI\OzU[2&q1{3`h5w_794p@6s8?BgP>dFV=m Dscramble1) <> strlen($this->scramble2)) {
+ $this->errors[] = '** SCRAMBLE1 is not same length as SCRAMBLE2 **';
+ } // if
+
+ $this->adj = 1.75; // this value is added to the rolling fudgefactors
+ $this->mod = 3; // if divisible by this the adjustment is made negative
+
+ } // constructor
+
+ // ****************************************************************************
+ function decrypt ($key, $source)
+ // decrypt string into its original form
+ {
+ //DebugBreak();
+ // convert $key into a sequence of numbers
+ $fudgefactor = $this->_convertKey($key);
+ if ($this->errors) return;
+
+ if (empty($source)) {
+ $this->errors[] = 'No value has been supplied for decryption';
+ return;
+ } // if
+
+ $target = null;
+ $factor2 = 0;
+
+ for ($i = 0; $i < strlen($source); $i++) {
+ // extract a character from $source
+ $char2 = substr($source, $i, 1);
+
+ // identify its position in $scramble2
+ $num2 = strpos($this->scramble2, $char2);
+ if ($num2 === false) {
+ $this->errors[] = "Source string contains an invalid character ($char)";
+ return;
+ } // if
+
+ // get an adjustment value using $fudgefactor
+ $adj = $this->_applyFudgeFactor($fudgefactor);
+ $factor1 = $factor2 + $adj; // accumulate in $factor1
+ $num1 = round($factor1 * -1) + ($num2); // generate offset for $scramble1
+ $num1 = $this->_checkRange($num1); // check range
+ $factor2 = $factor1 + $num2; // accumulate in $factor2
+
+ // extract character from $scramble1
+ $char1 = substr($this->scramble1, $num1, 1);
+
+ // append to $target string
+ $target .= $char1;
+
+ //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
+
+ } // for
+
+ return rtrim($target);
+
+ } // decrypt
+
+ // ****************************************************************************
+ function encrypt ($key, $source, $sourcelen = 0)
+ // encrypt string into a garbled form
+ {
+ //DebugBreak();
+ // convert $key into a sequence of numbers
+ $fudgefactor = $this->_convertKey($key);
+ if ($this->errors) return;
+
+ if (empty($source)) {
+ $this->errors[] = 'No value has been supplied for encryption';
+ return;
+ } // if
+
+ // pad $source with spaces up to $sourcelen
+ while (strlen($source) < $sourcelen) {
+ $source .= ' ';
+ } // while
+
+ $target = null;
+ $factor2 = 0;
+
+ for ($i = 0; $i < strlen($source); $i++) {
+ // extract a character from $source
+ $char1 = substr($source, $i, 1);
+
+ // identify its position in $scramble1
+ $num1 = strpos($this->scramble1, $char1);
+ if ($num1 === false) {
+ $this->errors[] = "Source string contains an invalid character ($char)";
+ return;
+ } // if
+
+ // get an adjustment value using $fudgefactor
+ $adj = $this->_applyFudgeFactor($fudgefactor);
+ $factor1 = $factor2 + $adj; // accumulate in $factor1
+ $num2 = round($factor1) + ($num1); // generate offset for $scramble2
+ $num2 = $this->_checkRange($num2); // check range
+ $factor2 = $factor1 + $num2; // accumulate in $factor2
+
+ // extract character from $scramble2
+ $char2 = substr($this->scramble2, $num2, 1);
+
+ // append to $target string
+ $target .= $char2;
+
+ //echo "char1=$char1, num1=$num1, adj= $adj, factor1= $factor1, num2=$num2, char2=$char2, factor2= $factor2 \n";
+
+ } // for
+
+ return $target;
+
+ } // encrypt
+
+ // ****************************************************************************
+ function getAdjustment ()
+ // return the adjustment value
+ {
+ return $this->adj;
+
+ } // setAdjustment
+
+ // ****************************************************************************
+ function getModulus ()
+ // return the modulus value
+ {
+ return $this->mod;
+
+ } // setModulus
+
+ // ****************************************************************************
+ function setAdjustment ($adj)
+ // set the adjustment value
+ {
+ $this->adj = (float)$adj;
+
+ } // setAdjustment
+
+ // ****************************************************************************
+ function setModulus ($mod)
+ // set the modulus value
+ {
+ $this->mod = (int)abs($mod); // must be a positive whole number
+
+ } // setModulus
+
+ // ****************************************************************************
+ // private methods
+ // ****************************************************************************
+ function _applyFudgeFactor (&$fudgefactor)
+ // return an adjustment value based on the contents of $fudgefactor
+ // NOTE: $fudgefactor is passed by reference so that it can be modified
+ {
+ $fudge = array_shift($fudgefactor); // extract 1st number from array
+ $fudge = $fudge + $this->adj; // add in adjustment value
+ $fudgefactor[] = $fudge; // put it back at end of array
+
+ if (!empty($this->mod)) { // if modifier has been supplied
+ if ($fudge % $this->mod == 0) { // if it is divisible by modifier
+ $fudge = $fudge * -1; // make it negative
+ } // if
+ } // if
+
+ return $fudge;
+
+ } // _applyFudgeFactor
+
+ // ****************************************************************************
+ function _checkRange ($num)
+ // check that $num points to an entry in $this->scramble1
+ {
+ $num = round($num); // round up to nearest whole number
+
+ // indexing starts at 0, not 1, so subtract 1 from string length
+ $limit = strlen($this->scramble1)-1;
+
+ while ($num > $limit) {
+ $num = $num - $limit; // value too high, so reduce it
+ } // while
+ while ($num < 0) {
+ $num = $num + $limit; // value too low, so increase it
+ } // while
+
+ return $num;
+
+ } // _checkRange
+
+ // ****************************************************************************
+ function _convertKey ($key)
+ // convert $key into an array of numbers
+ {
+ if (empty($key)) {
+ $this->errors[] = 'No value has been supplied for the encryption key';
+ return;
+ } // if
+
+ $array[] = strlen($key); // first entry in array is length of $key
+
+ $tot = 0;
+ for ($i = 0; $i < strlen($key); $i++) {
+ // extract a character from $key
+ $char = substr($key, $i, 1);
+
+ // identify its position in $scramble1
+ $num = strpos($this->scramble1, $char);
+ if ($num === false) {
+ $this->errors[] = "Key contains an invalid character ($char)";
+ return;
+ } // if
+
+ $array[] = $num; // store in output array
+ $tot = $tot + $num; // accumulate total for later
+ } // for
+
+ $array[] = $tot; // insert total as last entry in array
+
+ return $array;
+
+ } // _convertKey
+
+// ****************************************************************************
+} // end Encryption
+// ****************************************************************************
+
+?>
\ No newline at end of file
diff --git a/Source/Demos/psvPHP/Encryption/uMain.ddp b/Source/Demos/psvPHP/Encryption/uMain.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Encryption/uMain.ddp differ
diff --git a/Source/Demos/psvPHP/Encryption/uMain.dfm b/Source/Demos/psvPHP/Encryption/uMain.dfm
new file mode 100644
index 0000000..9389e02
--- /dev/null
+++ b/Source/Demos/psvPHP/Encryption/uMain.dfm
@@ -0,0 +1,235 @@
+object frmMain: TfrmMain
+ Left = 331
+ Top = 235
+ BorderStyle = bsDialog
+ Caption = 'Encryption/Decryption'
+ ClientHeight = 345
+ ClientWidth = 555
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lblCaption: TLabel
+ Left = 0
+ Top = 0
+ Width = 555
+ Height = 29
+ Align = alTop
+ Alignment = taCenter
+ Caption = 'Test Encryption/Decryption routines'
+ Font.Charset = RUSSIAN_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -24
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Layout = tlCenter
+ end
+ object Label2: TLabel
+ Left = 16
+ Top = 52
+ Width = 46
+ Height = 13
+ Caption = 'Enter Key'
+ end
+ object Label3: TLabel
+ Left = 16
+ Top = 77
+ Width = 74
+ Height = 13
+ Caption = 'Enter Password'
+ end
+ object Label4: TLabel
+ Left = 16
+ Top = 102
+ Width = 110
+ Height = 13
+ Caption = 'Enter Password Length'
+ end
+ object Label5: TLabel
+ Left = 16
+ Top = 128
+ Width = 80
+ Height = 13
+ Caption = 'Enter Adjustment'
+ end
+ object Label6: TLabel
+ Left = 16
+ Top = 153
+ Width = 68
+ Height = 13
+ Caption = 'Enter Modulus'
+ end
+ object lblEncrypt: TLabel
+ Left = 152
+ Top = 180
+ Width = 3
+ Height = 13
+ end
+ object lblDecrypt: TLabel
+ Left = 152
+ Top = 200
+ Width = 3
+ Height = 13
+ end
+ object Label9: TLabel
+ Left = 236
+ Top = 104
+ Width = 83
+ Height = 13
+ Caption = '( positive integer )'
+ end
+ object Label10: TLabel
+ Left = 236
+ Top = 128
+ Width = 49
+ Height = 13
+ Caption = '( numeric )'
+ end
+ object Label11: TLabel
+ Left = 236
+ Top = 152
+ Width = 83
+ Height = 13
+ Caption = '( positive integer )'
+ end
+ object Label1: TLabel
+ Left = 148
+ Top = 232
+ Width = 27
+ Height = 13
+ Caption = 'Errors'
+ end
+ object btnEncrypt: TButton
+ Left = 16
+ Top = 178
+ Width = 75
+ Height = 25
+ Caption = 'Encrypt'
+ TabOrder = 0
+ OnClick = btnEncryptClick
+ end
+ object btnDecrypt: TButton
+ Left = 16
+ Top = 208
+ Width = 75
+ Height = 25
+ Caption = 'Decrypt'
+ TabOrder = 1
+ OnClick = btnDecryptClick
+ end
+ object edtKey: TEdit
+ Left = 152
+ Top = 48
+ Width = 245
+ Height = 21
+ TabOrder = 2
+ Text = 'Fred'
+ end
+ object edtPassword: TEdit
+ Left = 152
+ Top = 73
+ Width = 249
+ Height = 21
+ TabOrder = 3
+ Text = 'passWORD'
+ end
+ object edtPassLen: TEdit
+ Left = 152
+ Top = 98
+ Width = 70
+ Height = 21
+ TabOrder = 4
+ Text = '16'
+ end
+ object edtAjustment: TEdit
+ Left = 152
+ Top = 124
+ Width = 70
+ Height = 21
+ TabOrder = 5
+ Text = '1.75'
+ end
+ object edtModulus: TEdit
+ Left = 152
+ Top = 149
+ Width = 70
+ Height = 21
+ TabOrder = 6
+ Text = '3'
+ end
+ object btnClose: TButton
+ Left = 476
+ Top = 312
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 7
+ OnClick = btnCloseClick
+ end
+ object Errors: TMemo
+ Left = 148
+ Top = 248
+ Width = 305
+ Height = 89
+ Lines.Strings = (
+ '')
+ TabOrder = 8
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'key'
+ end
+ item
+ Name = 'password'
+ end
+ item
+ Name = 'pswdlen'
+ end
+ item
+ Name = 'adj'
+ end
+ item
+ Name = 'mod'
+ end
+ item
+ Name = 'encrypt_result'
+ end
+ item
+ Name = 'decrypt_result'
+ end>
+ Left = 356
+ Top = 116
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'ErrorsLib'
+ Functions = <
+ item
+ FunctionName = 'printerror'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'line'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibrary1Functions0Execute
+ end>
+ Left = 360
+ Top = 168
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 424
+ Top = 124
+ end
+end
diff --git a/Source/Demos/psvPHP/Encryption/uMain.pas b/Source/Demos/psvPHP/Encryption/uMain.pas
new file mode 100644
index 0000000..0c97302
--- /dev/null
+++ b/Source/Demos/psvPHP/Encryption/uMain.pas
@@ -0,0 +1,143 @@
+{$I PHP.INC}
+
+unit uMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$IFDEF VERSION6}Variants, {$ENDIF}
+ Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, php4delphi, PHPCustomLibrary, phpLibrary, phpFunctions,
+ ZendTypes, PHPCommon;
+
+type
+ TfrmMain = class(TForm)
+ lblCaption: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ Label5: TLabel;
+ Label6: TLabel;
+ btnEncrypt: TButton;
+ btnDecrypt: TButton;
+ edtKey: TEdit;
+ edtPassword: TEdit;
+ edtPassLen: TEdit;
+ edtAjustment: TEdit;
+ edtModulus: TEdit;
+ btnClose: TButton;
+ lblEncrypt: TLabel;
+ lblDecrypt: TLabel;
+ Label9: TLabel;
+ Label10: TLabel;
+ Label11: TLabel;
+ psvPHP: TpsvPHP;
+ Errors: TMemo;
+ Label1: TLabel;
+ PHPLibrary1: TPHPLibrary;
+ PHPEngine: TPHPEngine;
+ procedure btnEncryptClick(Sender: TObject);
+ procedure btnDecryptClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ procedure Execute(Encrypt : boolean);
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+{$R *.dfm}
+{$R WindowsXP.res}
+
+{ TfrmMain }
+
+procedure TfrmMain.Execute(Encrypt: boolean);
+var
+ Script : TStringList;
+begin
+ psvPHP.VariableByName('key').Value := edtKey.Text;
+ psvPHP.VariableByName('password').Value := edtPassword.Text;
+ psvPHP.VariableByName('pswdlen').Value := edtPassLen.Text;
+ psvPHP.VariableByName('adj').Value := edtAjustment.Text;
+ psvPHP.VariableByName('mod').Value := edtModulus.Text;
+ psvPHP.Variables[5].Value := lblEncrypt.Caption;
+ psvPHP.Variables[6].Value := lblDecrypt.Caption;
+
+ Script := TStringList.Create;
+ With Script do
+ begin
+ Add('require ''std.encryption.class.inc'';');
+ Add('$crypt = new Encryption;');
+ Add('ini_set(''session.bug_compat_warn'', 0);');
+ Add('$crypt->setAdjustment($adj);');
+ Add('$crypt->setModulus($mod);');
+ Add('$adj = $crypt->getAdjustment();');
+ Add('$mod = $crypt->getModulus();');
+ Add('$errors = array();');
+
+ if Encrypt then
+ begin
+ Add('$encrypt_result = $crypt->encrypt($key, $password, $pswdlen);');
+ Add('$errors = $crypt->errors;');
+ end
+ else
+ begin
+ Add('$decrypt_result = $crypt->decrypt($key, $encrypt_result);');
+ Add('$errors = $crypt->errors;');
+ end;
+ Add('foreach ($errors as $error) {');
+ Add('printerror($error);');
+ Add('echo $error;');
+ Add('} // foreach');
+
+ end;
+ psvPHP.RunCode(Script.Text);
+ lblEncrypt.Caption := psvPHP.Variables[5].Value;
+ lblDecrypt.Caption := psvPHP.Variables[6].Value;
+ Script.Free;
+end;
+
+procedure TfrmMain.btnEncryptClick(Sender: TObject);
+begin
+ Execute(true);
+end;
+
+procedure TfrmMain.btnDecryptClick(Sender: TObject);
+begin
+ Execute(false);
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ Errors.Lines.Add(Parameters[0].Value);
+end;
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownEngine;
+end;
+
+end.
diff --git a/Demos/psvPHP/array demo/Project1.dpr b/Source/Demos/psvPHP/Graph/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/array demo/Project1.dpr
rename to Source/Demos/psvPHP/Graph/Project1.dpr
index 79c301d..dfa3f13 100644
--- a/Demos/psvPHP/array demo/Project1.dpr
+++ b/Source/Demos/psvPHP/Graph/Project1.dpr
@@ -1,13 +1,13 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Graph/Project1.res b/Source/Demos/psvPHP/Graph/Project1.res
new file mode 100644
index 0000000..55f8742
Binary files /dev/null and b/Source/Demos/psvPHP/Graph/Project1.res differ
diff --git a/Source/Demos/psvPHP/Graph/Unit1.ddp b/Source/Demos/psvPHP/Graph/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Graph/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/Graph/Unit1.dfm b/Source/Demos/psvPHP/Graph/Unit1.dfm
new file mode 100644
index 0000000..ba5f4fd
--- /dev/null
+++ b/Source/Demos/psvPHP/Graph/Unit1.dfm
@@ -0,0 +1,120 @@
+object Form1: TForm1
+ Left = 404
+ Top = 217
+ BorderStyle = bsDialog
+ Caption = 'PHP Graph demo'
+ ClientHeight = 531
+ ClientWidth = 630
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PaintBox: TPaintBox
+ Left = 4
+ Top = 9
+ Width = 512
+ Height = 512
+ OnPaint = PaintBoxPaint
+ end
+ object btnExecute: TButton
+ Left = 524
+ Top = 4
+ Width = 97
+ Height = 25
+ Caption = '&Execute'
+ TabOrder = 0
+ OnClick = btnExecuteClick
+ end
+ object Button1: TButton
+ Left = 524
+ Top = 32
+ Width = 97
+ Height = 25
+ Caption = 'Use Library'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'X'
+ Value = '0'
+ end
+ item
+ Name = 'Y'
+ Value = '0'
+ end
+ item
+ Name = 'T'
+ Value = '0'
+ end>
+ Left = 236
+ Top = 36
+ end
+ object PHPEngine: TPHPEngine
+ HandleErrors = False
+ Constants = <
+ item
+ Name = 'MinT'
+ Value = '0'
+ end
+ item
+ Name = 'MaxT'
+ Value = '82'
+ end
+ item
+ Name = 'Steps'
+ Value = '2000'
+ end>
+ ReportDLLError = False
+ Left = 172
+ Top = 212
+ end
+ object PHPLibrary: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'gr_prepare'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions0Execute
+ end
+ item
+ FunctionName = 'gr_paint'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end
+ item
+ Name = 'Y'
+ ParamType = tpFloat
+ end>
+ OnExecute = PHPLibraryFunctions1Execute
+ end
+ item
+ FunctionName = 'gr_move'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'X'
+ ParamType = tpFloat
+ end
+ item
+ Name = 'Y'
+ ParamType = tpFloat
+ end>
+ OnExecute = PHPLibraryFunctions2Execute
+ end>
+ Left = 288
+ Top = 196
+ end
+end
diff --git a/Source/Demos/psvPHP/Graph/Unit1.pas b/Source/Demos/psvPHP/Graph/Unit1.pas
new file mode 100644
index 0000000..b088061
--- /dev/null
+++ b/Source/Demos/psvPHP/Graph/Unit1.pas
@@ -0,0 +1,209 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, php4delphi, StdCtrls, PHPCommon, PHPCustomLibrary, phpLibrary,
+ PHPFunctions, ZendTypes, PHPTypes, ZendAPI, PHPAPI;
+
+type
+ TForm1 = class(TForm)
+ PaintBox: TPaintBox;
+ psvPHP: TpsvPHP;
+ btnExecute: TButton;
+ PHPEngine: TPHPEngine;
+ PHPLibrary: TPHPLibrary;
+ Button1: TButton;
+ procedure btnExecuteClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure PaintBoxPaint(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPLibraryFunctions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure Button1Click(Sender: TObject);
+ procedure PHPLibraryFunctions2Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ Busy : boolean;
+ procedure PaintBoxImage;
+ public
+ { Public declarations }
+ B : TBitmap;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.btnExecuteClick(Sender: TObject);
+var
+ Script : TStringList;
+ Steps, X, Y: integer;
+ MinT, MaxT, DeltaT, T: double;
+begin
+ psvPHP.UseDelimiters := true;
+ B.Canvas.Brush.Color := clWhite;
+ B.Canvas.FillRect(B.Canvas.ClipRect);
+ B.Canvas.Pen.Color := clSilver;
+ B.Canvas.MoveTo(0, 256);
+ B.Canvas.LineTo(512, 256);
+ B.Canvas.MoveTo(256, 0);
+ B.Canvas.LineTo(256, 512);
+ B.Canvas.Pen.Color := clBlack;
+
+ Script := TStringList.Create;
+ Script.Add('$R1 = 90.0;');
+ Script.Add('$R2 = 26.0;');
+ Script.Add('$O = 70.0;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+
+ MinT := StrToFloat(PHPEngine.Constants.Items[0].Value);
+ MaxT := StrToFloat(PHPEngine.Constants.Items[1].Value);
+ Steps := StrToInt(PHPEngine.Constants.Items[2].Value);
+ DeltaT := (MaxT - MinT) / Steps;
+ T := MinT;
+
+ psvPHP.VariableByName('T').AsFloat := T;
+ psvPHP.RunCode(Script);
+ X := psvPHP.VariableByName('X').AsInteger;
+ Y := psvPHP.VariableByName('Y').AsInteger;
+ B.Canvas.MoveTo(X, Y);
+
+ repeat
+ T := T + DeltaT;
+ psvPHP.VariableByName('T').AsFloat := T;
+ psvPHP.RunCode(Script);
+ X := psvPHP.VariableByName('X').AsInteger;
+ Y := psvPHP.VariableByName('Y').AsInteger;
+ B.Canvas.LineTo(X, Y);
+ PaintBoxImage;
+ Application.ProcessMessages;
+ until T >= MaxT;
+ Script.Free;
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ B := TBitmap.Create;
+ B.Width := Paintbox.Width;
+ B.Height := PaintBox.Height;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownEngine;
+ B.Free;
+ B := nil;
+end;
+
+procedure TForm1.PaintBoxImage;
+begin
+ if Busy then
+ Exit;
+ Busy := true;
+ try
+ bitBlt(PaintBox.Canvas.Handle, 0, 0, PaintBox.Width, PaintBox.Height,
+ B.Canvas.Handle, 0, 0, SRCCOPY);
+ finally
+ Busy := false;
+ end;
+end;
+
+procedure TForm1.PaintBoxPaint(Sender: TObject);
+begin
+ PaintBoxImage;
+end;
+
+procedure TForm1.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ B.Canvas.Brush.Color := clWhite;
+ B.Canvas.FillRect(B.Canvas.ClipRect);
+ B.Canvas.Pen.Color := clSilver;
+ B.Canvas.MoveTo(0, 256);
+ B.Canvas.LineTo(512, 256);
+ B.Canvas.MoveTo(256, 0);
+ B.Canvas.LineTo(256, 512);
+ B.Canvas.Pen.Color := clBlack;
+end;
+
+procedure TForm1.PHPLibraryFunctions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ X, Y : integer;
+begin
+ X := Parameters.ParamByName('X').ZendVariable.AsInteger;
+ Y := Parameters.ParamByName('Y').ZendVariable.AsInteger;
+ B.Canvas.LineTo(X, Y);
+ PaintBoxImage;
+ Application.ProcessMessages;
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ Script : TStringList;
+begin
+ Script := TStringList.Create;
+ try
+ Script.Add('gr_prepare();');
+ Script.Add('$R1 = 90.0;');
+ Script.Add('$R2 = 26.0;');
+ Script.Add('$O = 70.0;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$DeltaT = (MaxT - MinT) / Steps;');
+ Script.Add('$T = MinT;');
+ Script.Add('gr_move($X, $Y);');
+ Script.Add('gr_paint($X, $Y);');
+ Script.Add('do {');
+ Script.Add('$T = $T + $DeltaT;');
+ Script.Add('$X = ($R1+$R2)*cos($T) - ($R2+$O)*cos((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('$Y = ($R1+$R2)*sin($T) - ($R2+$O)*sin((($R1+$R2)/$R2)*$T) + 256;');
+ Script.Add('gr_paint($X, $Y);');
+ Script.Add('} while ($T <= MaxT);');
+ psvPHP.RunCode(Script);
+ finally
+ Script.Free;
+ end;
+end;
+
+procedure TForm1.PHPLibraryFunctions2Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ X, Y : integer;
+begin
+ X := Parameters.ParamByName('X').ZendVariable.AsInteger;
+ Y := Parameters.ParamByName('Y').ZendVariable.AsInteger;
+ B.Canvas.MoveTo(X, Y);
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Graph/WindowsXP.res b/Source/Demos/psvPHP/Graph/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Graph/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmEngine.ddp b/Source/Demos/psvPHP/ISAPI Module/dmEngine.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/ISAPI Module/dmEngine.ddp differ
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmEngine.dfm b/Source/Demos/psvPHP/ISAPI Module/dmEngine.dfm
new file mode 100644
index 0000000..cd57b69
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/dmEngine.dfm
@@ -0,0 +1,30 @@
+object EngineModule: TEngineModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ OnDestroy = DataModuleDestroy
+ Left = 562
+ Top = 381
+ Height = 150
+ Width = 215
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 72
+ Top = 24
+ end
+ object PHPLibrary: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'nb_test'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'nb_pointer'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibraryFunctions0Execute
+ end>
+ Left = 120
+ Top = 32
+ end
+end
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmEngine.pas b/Source/Demos/psvPHP/ISAPI Module/dmEngine.pas
new file mode 100644
index 0000000..2ece809
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/dmEngine.pas
@@ -0,0 +1,56 @@
+unit dmEngine;
+
+interface
+
+uses
+ SysUtils, Classes, PHPCommon, php4delphi, PHPCustomLibrary, phpLibrary,
+ PHPFunctions;
+
+type
+ TEngineModule = class(TDataModule)
+ PHPEngine: TPHPEngine;
+ PHPLibrary: TPHPLibrary;
+ procedure DataModuleCreate(Sender: TObject);
+ procedure DataModuleDestroy(Sender: TObject);
+ procedure PHPLibraryFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ EngineModule: TEngineModule;
+
+implementation
+
+uses dmMain;
+
+{$R *.dfm}
+
+procedure TEngineModule.DataModuleCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TEngineModule.DataModuleDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TEngineModule.PHPLibraryFunctions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+var
+ DM : TMainModule;
+begin
+ DM := TMainModule(Parameters.ParamByName('nb_pointer').ZendVariable.AsInteger);
+ if DM <> nil then
+ ZendVar.AsString := DM.EventString
+ else
+ ZendVar.AsString := 'Result is not defined';
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmMain.ddp b/Source/Demos/psvPHP/ISAPI Module/dmMain.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/ISAPI Module/dmMain.ddp differ
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmMain.dfm b/Source/Demos/psvPHP/ISAPI Module/dmMain.dfm
new file mode 100644
index 0000000..e77350a
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/dmMain.dfm
@@ -0,0 +1,23 @@
+object MainModule: TMainModule
+ OldCreateOrder = False
+ OnCreate = WebModuleCreate
+ Actions = <
+ item
+ Default = True
+ Name = 'WebActionItem1'
+ PathInfo = '/'
+ OnAction = MainModuleWebActionItem1Action
+ end>
+ Left = 513
+ Top = 319
+ Height = 254
+ Width = 333
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'nb'
+ end>
+ Left = 64
+ Top = 56
+ end
+end
diff --git a/Source/Demos/psvPHP/ISAPI Module/dmMain.pas b/Source/Demos/psvPHP/ISAPI Module/dmMain.pas
new file mode 100644
index 0000000..f702c6d
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/dmMain.pas
@@ -0,0 +1,51 @@
+unit dmMain;
+
+interface
+
+uses
+ SysUtils, Classes, HTTPApp, PHPCommon, php4delphi;
+
+type
+ TMainModule = class(TWebModule)
+ psvPHP: TpsvPHP;
+ procedure WebModuleCreate(Sender: TObject);
+ procedure MainModuleWebActionItem1Action(Sender: TObject;
+ Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
+ private
+ { Private declarations }
+ FEvent : TDateTime;
+ public
+ { Public declarations }
+ function EventString : string;
+ end;
+
+var
+ MainModule: TMainModule;
+
+implementation
+
+{$R *.dfm}
+
+{ TMainModule }
+
+function TMainModule.EventString: string;
+begin
+ Result := DateTimeToStr(FEvent);
+end;
+
+procedure TMainModule.WebModuleCreate(Sender: TObject);
+begin
+ FEvent := Now;
+end;
+
+procedure TMainModule.MainModuleWebActionItem1Action(Sender: TObject;
+ Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
+var
+ S : string;
+begin
+ psvPHP.VariableByName('nb').AsInteger := integer(Self);
+ S := psvPHP.RunCode(' print nb_test($nb); ?>');
+ Response.Content := S;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/ISAPI Module/phpisapitest.bdsproj b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.bdsproj
new file mode 100644
index 0000000..587b308
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.bdsproj
@@ -0,0 +1,177 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {CCA83CB5-84D7-4C78-854E-622B6A1DCFDE}
+
+
+
+
+ phpISAPITest.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+ vcl;rtl;vclx;dbrtl;vcldb;adortl;dbxcds;dbexpress;vclib;ibxpress;xmlrtl;vclactnband;inet;IntrawebDB_80_100;Intraweb_80_100;vclie;inetdbbde;inetdbxpress;IndyCore;IndySystem;dclOfficeXP;VclSmp;soaprtl;dsnap;IndyProtocols;bdertl;teeui;teedb;tee;vcldbx;dsnapcon;websnap;webdsnap;B304_r100;OERT100;cxLibraryD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxsbD10;cxEditorsD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxVerticalGridD10;dxNavBarD10;dxPSCoreD10;dxPSTeeChartD10;dxPsPrVwAdvD10;dxPSLnksD10;vclshlctrls;dxPSDBTeeChartD10;dxPScxCommonD10;dxPScxExtCommonD10;dxPScxVGridLnkD10;SimpleObjectsR10;TortoisePlugIn100;DBLibR10;PSCControlsR10;FCLRD10;FCLR10;ZLibExR10;gtFiltersBDS2006;gtCompressionBDS2006;gtRtlBDS2006;gtCryptBDS2006;gtFontBDS2006;FreeImageR100;PSCSystemR100;PSCControlsDBR10
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/ISAPI Module/phpisapitest.dpr b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.dpr
new file mode 100644
index 0000000..bddf2a7
--- /dev/null
+++ b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.dpr
@@ -0,0 +1,54 @@
+library phpisapitest;
+
+uses
+ Windows,
+ ActiveX,
+ ComObj,
+ WebBroker,
+ ISAPIApp,
+ ISAPIThreadPool,
+ ZendTypes,
+ PHPTypes,
+ ZendAPI,
+ PHPAPI,
+ php4Delphi,
+ dmMain in 'dmMain.pas' {MainModule: TWebModule},
+ dmEngine in 'dmEngine.pas' {EngineModule: TDataModule};
+
+{$R *.res}
+
+exports
+ GetExtensionVersion,
+ HttpExtensionProc,
+ TerminateExtension;
+
+var
+ OrgDLLProc : TDLLProc;
+ EngineModule : TEngineModule;
+
+procedure HandlerExitProc(reason : integer);
+begin
+ case Reason of
+ DLL_THREAD_DETACH:
+ begin
+ ts_free_thread;
+ end;
+ DLL_PROCESS_DETACH:
+ begin
+ EngineModule.Free;
+ end;
+ end;
+
+ if Assigned(OrgDLLProc) then
+ OrgDLLProc(reason);
+end;
+
+begin
+ CoInitFlags := COINIT_MULTITHREADED;
+ EngineModule := TEngineModule.Create(nil);
+ Application.Initialize;
+ OrgDLLProc := DLLProc;
+ DLLProc := HandlerExitProc;
+ Application.CreateForm(TMainModule, MainModule);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/ISAPI Module/phpisapitest.res b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.res
new file mode 100644
index 0000000..28e5361
Binary files /dev/null and b/Source/Demos/psvPHP/ISAPI Module/phpisapitest.res differ
diff --git a/Source/Demos/psvPHP/Library demo/LibraryDemo.dpr b/Source/Demos/psvPHP/Library demo/LibraryDemo.dpr
new file mode 100644
index 0000000..8afed48
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/LibraryDemo.dpr
@@ -0,0 +1,18 @@
+program LibraryDemo;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {frmLibDemo},
+ dm_Main in 'dm_Main.pas' {dmMain: TDataModule},
+ frm_dialog in 'frm_dialog.pas' {Form2};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Library Demo';
+ Application.CreateForm(TfrmLibDemo, frmLibDemo);
+ Application.CreateForm(TdmMain, dmMain);
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Library demo/LibraryDemo.res b/Source/Demos/psvPHP/Library demo/LibraryDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Library demo/LibraryDemo.res differ
diff --git a/Source/Demos/psvPHP/Library demo/Project1.dpr b/Source/Demos/psvPHP/Library demo/Project1.dpr
new file mode 100644
index 0000000..dfa3f13
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/Project1.dpr
@@ -0,0 +1,13 @@
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/php4DelphiR5.res b/Source/Demos/psvPHP/Library demo/Project1.res
similarity index 54%
rename from php4DelphiR5.res
rename to Source/Demos/psvPHP/Library demo/Project1.res
index 4aa33a2..08ba56e 100644
Binary files a/php4DelphiR5.res and b/Source/Demos/psvPHP/Library demo/Project1.res differ
diff --git a/Source/Demos/psvPHP/Library demo/Unit1.ddp b/Source/Demos/psvPHP/Library demo/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Library demo/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/Library demo/Unit1.dfm b/Source/Demos/psvPHP/Library demo/Unit1.dfm
new file mode 100644
index 0000000..2e6cf63
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/Unit1.dfm
@@ -0,0 +1,80 @@
+object frmLibDemo: TfrmLibDemo
+ Left = 395
+ Top = 303
+ BorderStyle = bsDialog
+ Caption = 'PHP Demo'
+ ClientHeight = 209
+ ClientWidth = 377
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 8
+ Top = 8
+ Width = 185
+ Height = 189
+ Lines.Strings = (
+ 'formcaption("Hello from PHP");'
+ 'buttonclick();'
+ 'my_createcontrol();')
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 292
+ Top = 172
+ Width = 75
+ Height = 25
+ Caption = 'Click'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object btnExecute: TButton
+ Left = 292
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 2
+ OnClick = btnExecuteClick
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <>
+ Left = 32
+ Top = 28
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'SimpleLib'
+ Functions = <
+ item
+ FunctionName = 'formcaption'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibrary1Functions0Execute
+ end
+ item
+ FunctionName = 'buttonclick'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions1Execute
+ end>
+ Left = 88
+ Top = 108
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 212
+ Top = 64
+ end
+end
diff --git a/Source/Demos/psvPHP/Library demo/Unit1.pas b/Source/Demos/psvPHP/Library demo/Unit1.pas
new file mode 100644
index 0000000..a734e5a
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/Unit1.pas
@@ -0,0 +1,77 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, PHPCustomLibrary, phpLibrary, php4delphi, PHPAPI, ZENDAPI,
+ PHPFunctions, ZendTypes, phpTypes, PHPCommon;
+
+type
+ TfrmLibDemo = class(TForm)
+ psvPHP1: TpsvPHP;
+ PHPLibrary1: TPHPLibrary;
+ Memo1: TMemo;
+ Button1: TButton;
+ btnExecute: TButton;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure btnExecuteClick(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure PHPLibrary1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmLibDemo: TfrmLibDemo;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmLibDemo.Button1Click(Sender: TObject);
+begin
+ ShowMessage('Click');
+end;
+
+procedure TfrmLibDemo.btnExecuteClick(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ psvPhp1.RunCode(memo1.Lines.text);
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TfrmLibDemo.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ frmLibDemo.Caption := Parameters[0].Value;
+end;
+
+procedure TfrmLibDemo.PHPLibrary1Functions1Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ Button1.Click;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Library demo/WindowsXP.res b/Source/Demos/psvPHP/Library demo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Library demo/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Library demo/dm_Main.dfm b/Source/Demos/psvPHP/Library demo/dm_Main.dfm
new file mode 100644
index 0000000..b957280
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/dm_Main.dfm
@@ -0,0 +1,18 @@
+object dmMain: TdmMain
+ OldCreateOrder = False
+ Left = 332
+ Top = 246
+ Height = 508
+ Width = 730
+ object PHPLibrary1: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'my_createcontrol'
+ Tag = 0
+ Parameters = <>
+ OnExecute = PHPLibrary1Functions0Execute
+ end>
+ Left = 44
+ Top = 44
+ end
+end
diff --git a/Source/Demos/psvPHP/Library demo/dm_Main.dti b/Source/Demos/psvPHP/Library demo/dm_Main.dti
new file mode 100644
index 0000000..862f513
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/dm_Main.dti
@@ -0,0 +1,41 @@
+[Designer]
+Version=1
+Left=332
+Top=246
+Width=730
+Height=508
+Splitter=185
+SelectedTab=Components
+
+[Components]
+Version=1
+Left=0
+Top=0
+
+[TreeView]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+PrintSelected=0
+PrintVisible=0
+ExpandedItems=dmMain\PHPLibrary1\PHPLibrary1.Functions
+
+[DataDiagrams]
+Version=1
+PrintHeader=1
+PrintToSingle=1
+PrintToFile=0
+PrintBorders=1
+Left=0
+Top=0
+ModeSelected=SelectionMode
+Count=1
+
+[DataDiagrams.Diagram.0]
+Islands=
+Comments=
+Bridges=
+Alludes=
+
diff --git a/Source/Demos/psvPHP/Library demo/dm_Main.pas b/Source/Demos/psvPHP/Library demo/dm_Main.pas
new file mode 100644
index 0000000..59bc840
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/dm_Main.pas
@@ -0,0 +1,39 @@
+unit dm_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCommon, PHPCustomLibrary, phpLibrary, PHPFunctions, ZendTypes;
+
+type
+ TdmMain = class(TDataModule)
+ PHPLibrary1: TPHPLibrary;
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ThisPtr: pzval; TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ dmMain: TdmMain;
+
+implementation
+
+uses frm_dialog;
+
+{$R *.DFM}
+
+procedure TdmMain.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: pzval;
+ TSRMLS_DC: Pointer);
+begin
+ Form2 := TForm2.Create(Application);
+ Form2.ShowModal;
+ Form2.Free;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Library demo/frm_dialog.dfm b/Source/Demos/psvPHP/Library demo/frm_dialog.dfm
new file mode 100644
index 0000000..a9a3ded
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/frm_dialog.dfm
@@ -0,0 +1,34 @@
+object Form2: TForm2
+ Left = 434
+ Top = 330
+ BorderStyle = bsDialog
+ Caption = 'Dialog'
+ ClientHeight = 231
+ ClientWidth = 396
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 16
+ Top = 52
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Edit1: TEdit
+ Left = 16
+ Top = 20
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ end
+end
diff --git a/Source/Demos/psvPHP/Library demo/frm_dialog.pas b/Source/Demos/psvPHP/Library demo/frm_dialog.pas
new file mode 100644
index 0000000..266a6e9
--- /dev/null
+++ b/Source/Demos/psvPHP/Library demo/frm_dialog.pas
@@ -0,0 +1,32 @@
+unit frm_dialog;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TForm2 = class(TForm)
+ Button1: TButton;
+ Edit1: TEdit;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.DFM}
+
+procedure TForm2.Button1Click(Sender: TObject);
+begin
+ Close;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Logo/LogoDemo.dpr b/Source/Demos/psvPHP/Logo/LogoDemo.dpr
new file mode 100644
index 0000000..7dedaa4
--- /dev/null
+++ b/Source/Demos/psvPHP/Logo/LogoDemo.dpr
@@ -0,0 +1,13 @@
+program LogoDemo;
+
+uses
+ Forms,
+ uMain in 'uMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Logo/LogoDemo.res b/Source/Demos/psvPHP/Logo/LogoDemo.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Logo/LogoDemo.res differ
diff --git a/Source/Demos/psvPHP/Logo/WindowsXP.res b/Source/Demos/psvPHP/Logo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Logo/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Logo/egg.gif b/Source/Demos/psvPHP/Logo/egg.gif
new file mode 100644
index 0000000..afecb6f
Binary files /dev/null and b/Source/Demos/psvPHP/Logo/egg.gif differ
diff --git a/Source/Demos/psvPHP/Logo/uMain.dfm b/Source/Demos/psvPHP/Logo/uMain.dfm
new file mode 100644
index 0000000..63d1244
--- /dev/null
+++ b/Source/Demos/psvPHP/Logo/uMain.dfm
@@ -0,0 +1,36 @@
+object Form1: TForm1
+ Left = 520
+ Top = 365
+ BorderStyle = bsDialog
+ Caption = 'Logo demo'
+ ClientHeight = 52
+ ClientWidth = 178
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 11
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'PHP egg'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 91
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+end
diff --git a/Source/Demos/psvPHP/Logo/uMain.pas b/Source/Demos/psvPHP/Logo/uMain.pas
new file mode 100644
index 0000000..2371130
--- /dev/null
+++ b/Source/Demos/psvPHP/Logo/uMain.pas
@@ -0,0 +1,46 @@
+unit uMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ShellAPI;
+
+type
+ TForm1 = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+uses
+ logos;
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ FS : TFileStream;
+begin
+ FS := TFileStream.Create('egg.gif', fmCreate);
+ FS.Write(php_egg_logo, 7538);
+ FS.Free;
+ ShellExecute(0, 'open', 'egg.gif', nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Multithread simple/MultithreadSample.dpr b/Source/Demos/psvPHP/Multithread simple/MultithreadSample.dpr
new file mode 100644
index 0000000..2a38013
--- /dev/null
+++ b/Source/Demos/psvPHP/Multithread simple/MultithreadSample.dpr
@@ -0,0 +1,14 @@
+program MultithreadSample;
+
+uses
+ Forms,
+ frm_main in 'frm_main.pas' {frmMain},
+ php_thread in 'php_thread.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Multithread simple/MultithreadSample.res b/Source/Demos/psvPHP/Multithread simple/MultithreadSample.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Multithread simple/MultithreadSample.res differ
diff --git a/Source/Demos/psvPHP/Multithread simple/WindowsXP.res b/Source/Demos/psvPHP/Multithread simple/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/Multithread simple/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/Multithread simple/frm_main.ddp b/Source/Demos/psvPHP/Multithread simple/frm_main.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Multithread simple/frm_main.ddp differ
diff --git a/Source/Demos/psvPHP/Multithread simple/frm_main.dfm b/Source/Demos/psvPHP/Multithread simple/frm_main.dfm
new file mode 100644
index 0000000..e29e9c3
--- /dev/null
+++ b/Source/Demos/psvPHP/Multithread simple/frm_main.dfm
@@ -0,0 +1,44 @@
+object frmMain: TfrmMain
+ Left = 513
+ Top = 399
+ BorderStyle = bsDialog
+ Caption = 'PHP Multithread sample'
+ ClientHeight = 81
+ ClientWidth = 306
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btnRun: TButton
+ Left = 136
+ Top = 48
+ Width = 75
+ Height = 25
+ Caption = 'Run'
+ TabOrder = 0
+ OnClick = btnRunClick
+ end
+ object btnClose: TButton
+ Left = 220
+ Top = 48
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = btnCloseClick
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 12
+ Top = 12
+ end
+end
diff --git a/Source/Demos/psvPHP/Multithread simple/frm_main.pas b/Source/Demos/psvPHP/Multithread simple/frm_main.pas
new file mode 100644
index 0000000..8ba9a62
--- /dev/null
+++ b/Source/Demos/psvPHP/Multithread simple/frm_main.pas
@@ -0,0 +1,62 @@
+unit frm_main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCommon, php4delphi, StdCtrls;
+
+type
+ TfrmMain = class(TForm)
+ PHPEngine: TPHPEngine;
+ btnRun: TButton;
+ btnClose: TButton;
+ procedure btnRunClick(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+uses php_thread;
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmMain.btnRunClick(Sender: TObject);
+var
+ cnt : integer;
+ T : TPHPThread;
+begin
+ for cnt := 0 to 99 do
+ begin
+ T := TPHPThread.Create(true);
+ T.FreeOnTerminate := true;
+ T.Resume;
+ end;
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Multithread simple/php_thread.pas b/Source/Demos/psvPHP/Multithread simple/php_thread.pas
new file mode 100644
index 0000000..76f207c
--- /dev/null
+++ b/Source/Demos/psvPHP/Multithread simple/php_thread.pas
@@ -0,0 +1,45 @@
+unit php_thread;
+
+interface
+
+uses
+ Windows, Classes, Forms, PHPCommon, php4Delphi, PHPTypes, ZendTypes, ZENDAPI, PHPAPI;
+
+type
+ TPHPThread = class(TThread)
+ private
+ { Private declarations }
+ PHP : TpsvPHP;
+ protected
+ procedure Execute; override;
+ procedure ComeBack;
+ end;
+
+implementation
+
+
+{ TPHPThread }
+
+procedure TPHPThread.ComeBack;
+begin
+ Application.ProcessMessages;
+end;
+
+procedure TPHPThread.Execute;
+begin
+ PHP := TpsvPHP.Create(nil);
+ PHP.RunCode('echo "Threaded";');
+ PHP.Free;
+ Synchronize(ComeBack);
+ sleep(250); //for zend_timeout to kill timer
+ Synchronize(ComeBack);
+ try
+ //This will release thread allocated resources
+ //The better way is to reuse existsing threads
+ //to save time and memory
+ ts_free_thread;
+ except
+ end;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Thread Management/ManageThreads.dpr b/Source/Demos/psvPHP/Thread Management/ManageThreads.dpr
new file mode 100644
index 0000000..ee4433b
--- /dev/null
+++ b/Source/Demos/psvPHP/Thread Management/ManageThreads.dpr
@@ -0,0 +1,14 @@
+program ManageThreads;
+
+uses
+ Forms,
+ frm_main in 'frm_main.pas' {frmMain},
+ php_thread in 'php_thread.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Thread Management/ManageThreads.res b/Source/Demos/psvPHP/Thread Management/ManageThreads.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Thread Management/ManageThreads.res differ
diff --git a/Source/Demos/psvPHP/Thread Management/frm_main.dfm b/Source/Demos/psvPHP/Thread Management/frm_main.dfm
new file mode 100644
index 0000000..093da6e
--- /dev/null
+++ b/Source/Demos/psvPHP/Thread Management/frm_main.dfm
@@ -0,0 +1,56 @@
+object frmMain: TfrmMain
+ Left = 457
+ Top = 410
+ BorderStyle = bsDialog
+ Caption = 'Thread Management'
+ ClientHeight = 110
+ ClientWidth = 358
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btnRun: TButton
+ Left = 192
+ Top = 72
+ Width = 75
+ Height = 25
+ Caption = 'Run'
+ TabOrder = 0
+ OnClick = btnRunClick
+ end
+ object btnClose: TButton
+ Left = 272
+ Top = 72
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = btnCloseClick
+ end
+ object Memo1: TMemo
+ Left = 8
+ Top = 8
+ Width = 177
+ Height = 89
+ TabOrder = 2
+ end
+ object Pool: TIdThreadMgrPool
+ PoolSize = 200
+ Left = 16
+ Top = 8
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 16
+ Top = 64
+ end
+end
diff --git a/Source/Demos/psvPHP/Thread Management/frm_main.pas b/Source/Demos/psvPHP/Thread Management/frm_main.pas
new file mode 100644
index 0000000..2d40ca6
--- /dev/null
+++ b/Source/Demos/psvPHP/Thread Management/frm_main.pas
@@ -0,0 +1,67 @@
+unit frm_main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, PHPCommon, php4delphi, IdBaseComponent, IdThreadMgr,
+ IdThreadMgrPool, StdCtrls, psAPI;
+
+type
+ TfrmMain = class(TForm)
+ Pool: TIdThreadMgrPool;
+ PHPEngine: TPHPEngine;
+ btnRun: TButton;
+ btnClose: TButton;
+ Memo1: TMemo;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure btnRunClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+uses php_thread;
+
+{$R *.dfm}
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ Pool.ThreadClass := TPHPThread;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.btnRunClick(Sender: TObject);
+var
+ cnt : integer;
+ T : TPHPThread;
+begin
+ EmptyWorkingSet(GetCurrentProcess);
+ Memo1.Lines.Clear;
+ for cnt := 0 to 99 do
+ begin
+ T := TPHPThread(Pool.GetThread);
+ T.Pool := Pool;
+ T.Start;
+ end;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Thread Management/php_thread.pas b/Source/Demos/psvPHP/Thread Management/php_thread.pas
new file mode 100644
index 0000000..5c814dc
--- /dev/null
+++ b/Source/Demos/psvPHP/Thread Management/php_thread.pas
@@ -0,0 +1,61 @@
+unit php_thread;
+
+interface
+
+uses
+ Windows, Classes, PHPCommon, php4Delphi, PHPTypes, ZendTypes, ZENDAPI, PHPAPI,
+ idThread, IdBaseComponent, IdThreadMgr,
+ IdThreadMgrPool;
+
+type
+ TPHPThread = class(TidThread)
+ private
+ { Private declarations }
+ PHP : TpsvPHP;
+ S : string;
+ procedure Report;
+ public
+ Pool: TIdThreadMgrPool;
+ procedure Run; override;
+ procedure AfterRun; override;
+ end;
+
+implementation
+
+uses
+ frm_Main;
+
+{ TPHPThread }
+
+procedure TPHPThread.AfterRun;
+begin
+ inherited;
+ Pool.ReleaseThread(Self);
+end;
+
+procedure TPHPThread.Report;
+begin
+ frmMain.Memo1.Lines.Add(S);
+end;
+
+procedure TPHPThread.Run;
+begin
+ PHP := TpsvPHP.Create(nil);
+ S := PHP.RunCode('echo "Threaded";');
+ PHP.Free;
+ Synchronize(Report);
+ Stop;
+ //We will not destroy thread resources of TSRM
+ //(PHP thread safe resource manager)
+ //because theads will be reused
+ //It's faster then create new thread every time
+ //for a new request and all web-servers also do it
+ //if you change your php.ini file and add
+ // max_execution_time = 0 - Maximum execution time
+ //of each script, in seconds
+ // max_input_time = 0 - Maximum amount of time each
+ //script may spend parsing request data
+ //PHP will work faster
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Threads Library/ManageThreads.dpr b/Source/Demos/psvPHP/Threads Library/ManageThreads.dpr
new file mode 100644
index 0000000..ee4433b
--- /dev/null
+++ b/Source/Demos/psvPHP/Threads Library/ManageThreads.dpr
@@ -0,0 +1,14 @@
+program ManageThreads;
+
+uses
+ Forms,
+ frm_main in 'frm_main.pas' {frmMain},
+ php_thread in 'php_thread.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/Threads Library/ManageThreads.res b/Source/Demos/psvPHP/Threads Library/ManageThreads.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/Threads Library/ManageThreads.res differ
diff --git a/Source/Demos/psvPHP/Threads Library/frm_main.ddp b/Source/Demos/psvPHP/Threads Library/frm_main.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/Threads Library/frm_main.ddp differ
diff --git a/Source/Demos/psvPHP/Threads Library/frm_main.dfm b/Source/Demos/psvPHP/Threads Library/frm_main.dfm
new file mode 100644
index 0000000..1a0df70
--- /dev/null
+++ b/Source/Demos/psvPHP/Threads Library/frm_main.dfm
@@ -0,0 +1,98 @@
+object frmMain: TfrmMain
+ Left = 457
+ Top = 410
+ BorderStyle = bsDialog
+ Caption = 'Thread Management'
+ ClientHeight = 225
+ ClientWidth = 358
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btnRun: TButton
+ Left = 192
+ Top = 72
+ Width = 157
+ Height = 25
+ Caption = 'Run in threads'
+ TabOrder = 0
+ OnClick = btnRunClick
+ end
+ object btnClose: TButton
+ Left = 280
+ Top = 192
+ Width = 75
+ Height = 25
+ Caption = 'Close'
+ TabOrder = 1
+ OnClick = btnCloseClick
+ end
+ object MemoCode: TMemo
+ Left = 8
+ Top = 8
+ Width = 177
+ Height = 89
+ Lines.Strings = (
+ '')
+ ScrollBars = ssBoth
+ TabOrder = 2
+ end
+ object MemoOut: TMemo
+ Left = 8
+ Top = 108
+ Width = 177
+ Height = 89
+ ScrollBars = ssBoth
+ TabOrder = 3
+ end
+ object btnNoThreads: TButton
+ Left = 192
+ Top = 108
+ Width = 157
+ Height = 25
+ Caption = 'Run no threads'
+ TabOrder = 4
+ OnClick = btnNoThreadsClick
+ end
+ object Pool: TIdThreadMgrPool
+ PoolSize = 200
+ Left = 272
+ Top = 12
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 232
+ Top = 12
+ end
+ object PHPLibrary1: TPHPLibrary
+ Functions = <
+ item
+ FunctionName = 'nb_test'
+ Tag = 0
+ Parameters = <
+ item
+ Name = 'Param1'
+ ParamType = tpString
+ end>
+ OnExecute = PHPLibrary1Functions0Execute
+ end>
+ Left = 48
+ Top = 140
+ end
+ object psvPHP: TpsvPHP
+ Variables = <>
+ Left = 288
+ Top = 148
+ end
+end
diff --git a/Source/Demos/psvPHP/Threads Library/frm_main.pas b/Source/Demos/psvPHP/Threads Library/frm_main.pas
new file mode 100644
index 0000000..b3bf5df
--- /dev/null
+++ b/Source/Demos/psvPHP/Threads Library/frm_main.pas
@@ -0,0 +1,93 @@
+unit frm_main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs, PHPCommon, php4delphi, IdBaseComponent, IdThreadMgr,
+ IdThreadMgrPool, StdCtrls, psAPI, PHPCustomLibrary, phpLibrary,
+ phpFunctions, ZendAPI, PHPAPI, ZendTypes, PHPTypes;
+
+type
+ TfrmMain = class(TForm)
+ Pool: TIdThreadMgrPool;
+ PHPEngine: TPHPEngine;
+ btnRun: TButton;
+ btnClose: TButton;
+ MemoCode: TMemo;
+ MemoOut: TMemo;
+ PHPLibrary1: TPHPLibrary;
+ btnNoThreads: TButton;
+ psvPHP: TpsvPHP;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure btnCloseClick(Sender: TObject);
+ procedure btnRunClick(Sender: TObject);
+ procedure PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar : TZendVariable; TSRMLS_DC: Pointer);
+ procedure btnNoThreadsClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+uses php_thread;
+
+{$R *.dfm}
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ Pool.ThreadClass := TPHPThread;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+procedure TfrmMain.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.btnRunClick(Sender: TObject);
+var
+ cnt : integer;
+ T : TPHPThread;
+begin
+ EmptyWorkingSet(GetCurrentProcess);
+ MemoOut.Lines.Clear;
+ for cnt := 0 to 100 do
+ begin
+ T := TPHPThread(Pool.GetThread);
+ T.Pool := Pool;
+ T.Code := memoCode.Text;
+ T.Start;
+ end;
+end;
+
+procedure TfrmMain.PHPLibrary1Functions0Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+begin
+ ReturnValue:= Parameters[0].ZendVariable.AsString;
+end;
+
+procedure TfrmMain.btnNoThreadsClick(Sender: TObject);
+var
+ cnt : integer;
+begin
+ MemoOut.Lines.Clear;
+ for cnt := 0 to 100 do
+ MemoOut.Lines.Add(psvPHP.RunCode(MemoCode.Lines));
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/Threads Library/php_thread.pas b/Source/Demos/psvPHP/Threads Library/php_thread.pas
new file mode 100644
index 0000000..4008053
--- /dev/null
+++ b/Source/Demos/psvPHP/Threads Library/php_thread.pas
@@ -0,0 +1,81 @@
+unit php_thread;
+
+interface
+
+uses
+ Windows, Classes, Forms, PHPCommon, php4Delphi, PHPTypes, ZendTypes, ZENDAPI, PHPAPI,
+ idThread, IdBaseComponent, IdThreadMgr,
+ IdThreadMgrPool;
+
+type
+ TPHPThread = class(TidThread)
+ private
+ { Private declarations }
+ PHP : TpsvPHP;
+ S : string;
+ procedure Report;
+ public
+ Pool: TIdThreadMgrPool;
+ Code : string;
+ constructor Create(ACreateSuspended: Boolean = True); override;
+ destructor Destroy; override;
+ procedure Run; override;
+ procedure AfterRun; override;
+ end;
+
+implementation
+
+uses
+ frm_Main;
+
+{ TPHPThread }
+
+procedure TPHPThread.AfterRun;
+begin
+ inherited;
+ Pool.ReleaseThread(Self);
+end;
+
+constructor TPHPThread.Create(ACreateSuspended: Boolean);
+begin
+ inherited;
+ PHP := TpsvPHP.Create(nil);
+end;
+
+destructor TPHPThread.Destroy;
+begin
+ PHP.Free;
+ inherited;
+end;
+
+procedure TPHPThread.Report;
+begin
+ Application.ProcessMessages;
+ frmMain.MemoOut.Lines.Add(S);
+ Application.ProcessMessages;
+end;
+
+procedure TPHPThread.Run;
+var
+ cnt : integer;
+begin
+ for cnt := 1 to 100 do
+ begin
+ S := PHP.RunCode(Code);
+ Synchronize(Report);
+ end;
+ Stop;
+ //We will not destroy thread resources of TSRM
+ //(PHP thread safe resource manager)
+ //because theads will be reused
+ //It's faster then create new thread every time
+ //for a new request and all web-servers also do it
+ //if you change your php.ini file and add
+ // max_execution_time = 0 - Maximum execution time
+ //of each script, in seconds
+ // max_input_time = 0 - Maximum amount of time each
+ //script may spend parsing request data
+ //PHP will work faster
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/array demo/Project1.bdsproj b/Source/Demos/psvPHP/array demo/Project1.bdsproj
new file mode 100644
index 0000000..952c85e
--- /dev/null
+++ b/Source/Demos/psvPHP/array demo/Project1.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9674AF21-AA22-4C4D-9353-DF35F1664172}
+
+
+
+
+ Project1.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/array demo/Project1.dpr b/Source/Demos/psvPHP/array demo/Project1.dpr
new file mode 100644
index 0000000..dfa3f13
--- /dev/null
+++ b/Source/Demos/psvPHP/array demo/Project1.dpr
@@ -0,0 +1,13 @@
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/array demo/Project1.res b/Source/Demos/psvPHP/array demo/Project1.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/array demo/Project1.res differ
diff --git a/Source/Demos/psvPHP/array demo/Unit1.ddp b/Source/Demos/psvPHP/array demo/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/array demo/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/array demo/Unit1.dfm b/Source/Demos/psvPHP/array demo/Unit1.dfm
new file mode 100644
index 0000000..bcac6ee
--- /dev/null
+++ b/Source/Demos/psvPHP/array demo/Unit1.dfm
@@ -0,0 +1,60 @@
+object Form1: TForm1
+ Left = 490
+ Top = 294
+ BorderStyle = bsDialog
+ Caption = 'Array demo'
+ ClientHeight = 160
+ ClientWidth = 256
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Button1: TButton
+ Left = 16
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Button1'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object ListBox1: TListBox
+ Left = 108
+ Top = 4
+ Width = 121
+ Height = 97
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <>
+ Left = 20
+ Top = 16
+ end
+ object PHPLibrary1: TPHPLibrary
+ LibraryName = 'ArrayLib'
+ Functions = <
+ item
+ FunctionName = 'get_php_array'
+ Tag = 0
+ Parameters = <>
+ OnExecute = ExecuteGetArray
+ end>
+ Left = 52
+ Top = 16
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 44
+ Top = 112
+ end
+end
diff --git a/Demos/psvPHP/array demo/Unit1.pas b/Source/Demos/psvPHP/array demo/Unit1.pas
similarity index 75%
rename from Demos/psvPHP/array demo/Unit1.pas
rename to Source/Demos/psvPHP/array demo/Unit1.pas
index bb26299..8b8979d 100644
--- a/Demos/psvPHP/array demo/Unit1.pas
+++ b/Source/Demos/psvPHP/array demo/Unit1.pas
@@ -1,93 +1,107 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-//This sample shows how to return an array as a result of PHP function
-unit Unit1;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- PHPCustomLibrary, phpLibrary, php4delphi, phpFunctions, ZendAPI, PHPAPI,
- StdCtrls, ZendTypes, phpTypes;
-
-type
- TForm1 = class(TForm)
- psvPHP1: TpsvPHP;
- PHPLibrary1: TPHPLibrary;
- Button1: TButton;
- ListBox1: TListBox;
- procedure PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- ar : array of string;
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TForm1.PHPLibrary1Functions0Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
- variable : pzval;
- tmp : ^ppzval;
-begin
- ht := GetSymbolsTable(TSRMLS_DC);
- if Assigned(ht) then
- begin
- new(data);
- if zend_hash_find(ht, 'ar', 3, data) = SUCCESS then
- begin
- variable := data^^;
- if variable^._type = IS_ARRAY then
- begin
- SetLength(ar, zend_hash_num_elements(variable^.value.ht));
- for cnt := 0 to zend_hash_num_elements(variable^.value.ht) -1 do
- begin
- new(tmp);
- zend_hash_index_find(variable^.value.ht, cnt, tmp);
- ar[cnt] := tmp^^^.value.str.val;
- freemem(tmp);
- end;
- end;
- end;
- freemem(data);
- end;
-end;
-
-procedure TForm1.Button1Click(Sender: TObject);
-var
- cnt : integer;
-begin
- //Clear array
- SetLength(ar,0);
- //Execute code
- psvPHP1.RunCode('$z=0; $y=0; $ar=array("la","hu"); $x=45; $z = $x + $y; $count=count($ar); get_php_array();');
- //Display new value of the array
- ListBox1.Items.Clear;
- for cnt := 0 to Length(ar) - 1 do
- ListBox1.Items.Add(ar[cnt]);
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+//This sample shows how to return an array as a result of PHP function
+unit Unit1;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ PHPCustomLibrary, phpLibrary, php4delphi, phpFunctions, ZendAPI, PHPAPI,
+ StdCtrls, ZendTypes, phpTypes, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP1: TpsvPHP;
+ PHPLibrary1: TPHPLibrary;
+ Button1: TButton;
+ ListBox1: TListBox;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure ExecuteGetArray(Sender: TObject; Parameters: TFunctionParams;
+ var ReturnValue: Variant; ZendVar: TZendVariable;
+ TSRMLS_DC: Pointer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ ar : array of string;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ cnt : integer;
+begin
+ //Clear array
+ SetLength(ar,0);
+ //Execute code
+ psvPHP1.RunCode('$z=0; $y=0; $ar=array("la","hu"); $x=45; $z = $x + $y; $count=count($ar); get_php_array();');
+ //Display new value of the array
+ ListBox1.Items.Clear;
+ for cnt := 0 to Length(ar) - 1 do
+ ListBox1.Items.Add(ar[cnt]);
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ // PHPEngine.ShutdownEngine;
+end;
+
+procedure TForm1.ExecuteGetArray(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+var
+ ht : PHashTable;
+ data: ^ppzval;
+ cnt : integer;
+ variable : pzval;
+ tmp : ^ppzval;
+begin
+ ht := GetSymbolsTable;
+ if Assigned(ht) then
+ begin
+ new(data);
+ if zend_hash_find(ht, 'ar', 3, data) = SUCCESS then
+ begin
+ variable := data^^;
+ if variable^._type = IS_ARRAY then
+ begin
+ SetLength(ar, zend_hash_num_elements(variable^.value.ht));
+ for cnt := 0 to zend_hash_num_elements(variable^.value.ht) -1 do
+ begin
+ new(tmp);
+ zend_hash_index_find(variable^.value.ht, cnt, tmp);
+ ar[cnt] := tmp^^^.value.str.val;
+ freemem(tmp);
+ end;
+ end;
+ end;
+ freemem(data);
+ end;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/array demo/WindowsXP.res b/Source/Demos/psvPHP/array demo/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/array demo/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/console/phpcon.dpr b/Source/Demos/psvPHP/console/phpcon.dpr
new file mode 100644
index 0000000..59005ac
--- /dev/null
+++ b/Source/Demos/psvPHP/console/phpcon.dpr
@@ -0,0 +1,74 @@
+{$APPTYPE CONSOLE}
+
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{ $Id: phpcon.dpr,v 7.0 04/2007 delphi32 Exp $ }
+
+program phpcon;
+
+uses
+ SysUtils,
+ Dialogs,
+ php4delphi,
+ zendAPI,
+ ZENDTypes;
+
+var
+ php : TpsvPHP;
+ Engine : TPHPEngine;
+ ft : Byte = 0;
+
+procedure gui_message(ht: integer; return_value: pzval;
+ return_value_ptr: pzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer); cdecl;
+var
+ Text: pzval;
+begin
+ if zend_parse_method_parameters(1, TSRMLS_DC, this_ptr, 'z', @Text) = 0 then
+ begin
+ ShowMessage(Z_STRVAL(Text));
+ end;
+end;
+ procedure grc(ht: integer; return_value: pzval;
+ return_value_ptr: pzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer); cdecl;
+var
+ p: pzval;
+begin
+ if zend_parse_method_parameters(1, TSRMLS_DC, this_ptr, 'z', @p) = 0 then
+ begin
+ ZVAL_STRINGW(p,'ðŸ†ðŸ†ðŸ† .-=WPD=-. ðŸ†ðŸ†ðŸ†',true);
+ end;
+end;
+begin
+ Engine := TPHPEngine.Create(nil);
+ Engine.AddFunction('gui_message', @gui_message);
+ Engine.AddFunction('g_r_c', @grc);
+ Engine.HandleErrors := True;
+ Engine.StartupEngine;
+ php := TpsvPHP.Create(nil);
+ if ParamCount = 1 then
+ begin
+ php.FileName := zend_ustr(ParamStr(1));
+ if FileExists(ParamStr(1)) then
+ ft := 1;
+ end;
+
+ if ft = 1 then
+ write(php.Execute)
+ else
+ begin
+ writeLn(Format('Usage: %s ', [ParamStr(0)]));
+ writeLn(php.RunCode(''));
+ end;
+ php.Free;
+ Engine.ShutdownEngine;
+ Engine.Free;
+end.
diff --git a/Source/Demos/psvPHP/console/phpcon.dproj b/Source/Demos/psvPHP/console/phpcon.dproj
new file mode 100644
index 0000000..3847e22
--- /dev/null
+++ b/Source/Demos/psvPHP/console/phpcon.dproj
@@ -0,0 +1,511 @@
+
+
+ {BDB76098-EDD6-4A5A-AF30-D7A6B0BCF914}
+ phpcon.dpr
+ True
+ Debug
+ 3
+ Console
+ None
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ phpcon.exe
+ ..\..\..\;$(DCC_UnitSearchPath)
+
+ false
+ 1058
+ false
+ 00400000
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ $(BDS)\bin\delphi_PROJECTICON.ico
+ phpcon
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ false
+ $(BDS)\bin\delphi_PROJECTICNS.icns
+
+
+ 0
+ false
+ 0
+ RELEASE;$(DCC_Define)
+
+
+ true
+ DEBUG;$(DCC_Define)
+ false
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ phpcon.dpr
+
+
+ Embarcadero C++Builder Office 2000 Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ True
+ True
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ phpcon.exe
+ true
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ classes
+ 1
+
+
+
+
+ Contents\MacOS
+ 0
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+
+
+ 0
+
+
+ 1
+ .framework
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 0
+ .bpl
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos/psvPHP/console/test.php b/Source/Demos/psvPHP/console/test.php
new file mode 100644
index 0000000..97d44b7
--- /dev/null
+++ b/Source/Demos/psvPHP/console/test.php
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/Demos/psvPHP/sample1/Project1.dpr b/Source/Demos/psvPHP/sample1/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/sample1/Project1.dpr
rename to Source/Demos/psvPHP/sample1/Project1.dpr
index 6c2b75e..56ace9c 100644
--- a/Demos/psvPHP/sample1/Project1.dpr
+++ b/Source/Demos/psvPHP/sample1/Project1.dpr
@@ -1,18 +1,18 @@
-program Project1;
-
-{%ToDo 'Project1.todo'}
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {frmPHPDemo},
- zendAPI,
- php4delphi,
- phpAPI;
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TfrmPHPDemo, frmPHPDemo);
- Application.Run;
-end.
+program Project1;
+
+{%ToDo 'Project1.todo'}
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {frmPHPDemo},
+ zendAPI,
+ php4delphi,
+ phpAPI;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmPHPDemo, frmPHPDemo);
+ Application.Run;
+end.
diff --git a/Demos/psvPHP/sample1/Project1.res b/Source/Demos/psvPHP/sample1/Project1.res
similarity index 100%
rename from Demos/psvPHP/sample1/Project1.res
rename to Source/Demos/psvPHP/sample1/Project1.res
diff --git a/Source/Demos/psvPHP/sample1/Sample1.bdsproj b/Source/Demos/psvPHP/sample1/Sample1.bdsproj
new file mode 100644
index 0000000..ad495de
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/Sample1.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4089316D-CB7D-4EB4-9347-4BE2A97D7188}
+
+
+
+
+ Sample1.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/sample1/Sample1.dpr b/Source/Demos/psvPHP/sample1/Sample1.dpr
new file mode 100644
index 0000000..35dbf7c
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/Sample1.dpr
@@ -0,0 +1,16 @@
+program Sample1;
+
+uses
+ Forms,
+ frm_phpDemo in 'frm_phpDemo.pas' {frmPHPDemo},
+ zendAPI,
+ php4delphi,
+ phpAPI;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmPHPDemo, frmPHPDemo);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/sample1/Sample1.dproj b/Source/Demos/psvPHP/sample1/Sample1.dproj
new file mode 100644
index 0000000..477ea4e
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/Sample1.dproj
@@ -0,0 +1,37 @@
+
+
+
+ {918ad693-3b86-4b4f-9d15-809746772557}
+ Sample1.dpr
+ Debug
+ AnyCPU
+ DCC32
+ Sample1.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+False True False True False 1 0 0 1 False False False False False 2067 1252 Serhiy Perevoznyk 1.0.0.1 1.0.0.0 Sample1.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/psvPHP/sample1/Sample1.res b/Source/Demos/psvPHP/sample1/Sample1.res
new file mode 100644
index 0000000..d09f372
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/Sample1.res differ
diff --git a/Source/Demos/psvPHP/sample1/Thumbs.db b/Source/Demos/psvPHP/sample1/Thumbs.db
new file mode 100644
index 0000000..3292cf9
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/Thumbs.db differ
diff --git a/Source/Demos/psvPHP/sample1/Unit1.ddp b/Source/Demos/psvPHP/sample1/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/Unit1.ddp differ
diff --git a/Demos/psvPHP/sample1/Unit1.dfm b/Source/Demos/psvPHP/sample1/Unit1.dfm
similarity index 96%
rename from Demos/psvPHP/sample1/Unit1.dfm
rename to Source/Demos/psvPHP/sample1/Unit1.dfm
index 43af372..87db932 100644
--- a/Demos/psvPHP/sample1/Unit1.dfm
+++ b/Source/Demos/psvPHP/sample1/Unit1.dfm
@@ -1,181 +1,181 @@
-object frmPHPDemo: TfrmPHPDemo
- Left = 299
- Top = 239
- Width = 783
- Height = 540
- Caption = 'psvPHP demo'
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object Splitter1: TSplitter
- Left = 484
- Top = 0
- Width = 4
- Height = 465
- Cursor = crHSplit
- Align = alRight
- end
- object pnlButtons: TPanel
- Left = 0
- Top = 465
- Width = 775
- Height = 41
- Align = alBottom
- BevelOuter = bvNone
- TabOrder = 0
- object Panel2: TPanel
- Left = 590
- Top = 0
- Width = 185
- Height = 41
- Align = alRight
- BevelOuter = bvNone
- TabOrder = 0
- object btnExecuteCode: TButton
- Left = 88
- Top = 8
- Width = 87
- Height = 25
- Caption = 'Execute Code'
- TabOrder = 0
- OnClick = btnExecuteCodeClick
- end
- object btnExecuteFile: TButton
- Left = 8
- Top = 8
- Width = 75
- Height = 25
- Caption = 'Execute File'
- TabOrder = 1
- OnClick = btnExecuteFileClick
- end
- end
- end
- object WebBrowser1: TWebBrowser
- Left = 0
- Top = 0
- Width = 484
- Height = 465
- Align = alClient
- TabOrder = 1
- ControlData = {
- 4C000000063200000F3000000000000000000000000000000000000000000000
- 000000004C000000000000000000000001000000E0D057007335CF11AE690800
- 2B2E126208000000000000004C0000000114020000000000C000000000000046
- 8000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000100000000000000000000000000000000000000}
- end
- object Panel3: TPanel
- Left = 488
- Top = 0
- Width = 287
- Height = 465
- Align = alRight
- Caption = 'Panel3'
- TabOrder = 2
- object Label1: TLabel
- Left = 1
- Top = 1
- Width = 285
- Height = 13
- Align = alTop
- Caption = ' PHP code'
- end
- object Label2: TLabel
- Left = 1
- Top = 295
- Width = 285
- Height = 13
- Align = alBottom
- Caption = ' Result values'
- end
- object memPHPCode: TMemo
- Left = 1
- Top = 14
- Width = 285
- Height = 281
- Align = alClient
- Lines.Strings = (
- 'echo "Before function declaration... \n";'
- ''
- 'function print_something_multiple_times($something,$times)'
- '{'
-
- ' echo "---- \nIn function, printing the string \"$something\' +
- '" $times times \n";'
- ' for ($i=0; $i<$times; $i++) {'
- ' echo "$i) $something \n";'
- ' }'
- ' echo "Done with function... \n----- \n";'
- '}'
- ''
- 'function some_other_function()'
- '{'
-
- ' echo "This is some other function, to ensure more than just on' +
- 'e function works fine... \n";'
- '}'
- ''
- ''
- 'echo "After function declaration... \n";'
- ''
- 'echo "Calling function for the first time... \n";'
- 'print_something_multiple_times($test,10);'
- 'echo "Returned from function call... \n";'
- ''
- 'echo "Calling the function for the second time... \n";'
-
- 'print_something_multiple_times("This like, really works and stuf' +
- 'f...",3);'
- 'echo "Returned from function call... \n";'
- ''
- 'some_other_function();'
- ''
- '$test = "I don'#39't believe";'
- '$tool = "PHP";')
- ScrollBars = ssBoth
- TabOrder = 0
- WordWrap = False
- end
- object lbVariables: TListBox
- Left = 1
- Top = 308
- Width = 285
- Height = 156
- Align = alBottom
- ItemHeight = 13
- TabOrder = 1
- end
- end
- object psvPHP: TpsvPHP
- Constants = <>
- Variables = <
- item
- Name = 'test'
- Value = 'This works!'
- end
- item
- Name = 'tool'
- Value = 'Delphi'
- end>
- HTMLErrors = True
- HandleErrors = False
- OnLogMessage = psvPHPLogMessage
- Left = 116
- Top = 28
- end
- object OpenDialog1: TOpenDialog
- DefaultExt = '.php'
- Filter = 'PHP script (*.php)|*.php|Any File (*.*)|*.*'
- Left = 196
- Top = 132
- end
-end
+object frmPHPDemo: TfrmPHPDemo
+ Left = 299
+ Top = 239
+ Width = 783
+ Height = 540
+ Caption = 'psvPHP demo'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 484
+ Top = 0
+ Width = 4
+ Height = 465
+ Cursor = crHSplit
+ Align = alRight
+ end
+ object pnlButtons: TPanel
+ Left = 0
+ Top = 465
+ Width = 775
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 590
+ Top = 0
+ Width = 185
+ Height = 41
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btnExecuteCode: TButton
+ Left = 88
+ Top = 8
+ Width = 87
+ Height = 25
+ Caption = 'Execute Code'
+ TabOrder = 0
+ OnClick = btnExecuteCodeClick
+ end
+ object btnExecuteFile: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Execute File'
+ TabOrder = 1
+ OnClick = btnExecuteFileClick
+ end
+ end
+ end
+ object WebBrowser1: TWebBrowser
+ Left = 0
+ Top = 0
+ Width = 484
+ Height = 465
+ Align = alClient
+ TabOrder = 1
+ ControlData = {
+ 4C000000063200000F3000000000000000000000000000000000000000000000
+ 000000004C000000000000000000000001000000E0D057007335CF11AE690800
+ 2B2E126208000000000000004C0000000114020000000000C000000000000046
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000100000000000000000000000000000000000000}
+ end
+ object Panel3: TPanel
+ Left = 488
+ Top = 0
+ Width = 287
+ Height = 465
+ Align = alRight
+ Caption = 'Panel3'
+ TabOrder = 2
+ object Label1: TLabel
+ Left = 1
+ Top = 1
+ Width = 285
+ Height = 13
+ Align = alTop
+ Caption = ' PHP code'
+ end
+ object Label2: TLabel
+ Left = 1
+ Top = 295
+ Width = 285
+ Height = 13
+ Align = alBottom
+ Caption = ' Result values'
+ end
+ object memPHPCode: TMemo
+ Left = 1
+ Top = 14
+ Width = 285
+ Height = 281
+ Align = alClient
+ Lines.Strings = (
+ 'echo "Before function declaration... \n";'
+ ''
+ 'function print_something_multiple_times($something,$times)'
+ '{'
+
+ ' echo "---- \nIn function, printing the string \"$something\' +
+ '" $times times \n";'
+ ' for ($i=0; $i<$times; $i++) {'
+ ' echo "$i) $something \n";'
+ ' }'
+ ' echo "Done with function... \n----- \n";'
+ '}'
+ ''
+ 'function some_other_function()'
+ '{'
+
+ ' echo "This is some other function, to ensure more than just on' +
+ 'e function works fine... \n";'
+ '}'
+ ''
+ ''
+ 'echo "After function declaration... \n";'
+ ''
+ 'echo "Calling function for the first time... \n";'
+ 'print_something_multiple_times($test,10);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'echo "Calling the function for the second time... \n";'
+
+ 'print_something_multiple_times("This like, really works and stuf' +
+ 'f...",3);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'some_other_function();'
+ ''
+ '$test = "I don'#39't believe";'
+ '$tool = "PHP";')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ WordWrap = False
+ end
+ object lbVariables: TListBox
+ Left = 1
+ Top = 308
+ Width = 285
+ Height = 156
+ Align = alBottom
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ end
+ object psvPHP: TpsvPHP
+ Constants = <>
+ Variables = <
+ item
+ Name = 'test'
+ Value = 'This works!'
+ end
+ item
+ Name = 'tool'
+ Value = 'Delphi'
+ end>
+ HTMLErrors = True
+ HandleErrors = False
+ OnLogMessage = psvPHPLogMessage
+ Left = 116
+ Top = 28
+ end
+ object OpenDialog1: TOpenDialog
+ DefaultExt = '.php'
+ Filter = 'PHP script (*.php)|*.php|Any File (*.*)|*.*'
+ Left = 196
+ Top = 132
+ end
+end
diff --git a/Demos/psvPHP/sample1/Unit1.pas b/Source/Demos/psvPHP/sample1/Unit1.pas
similarity index 91%
rename from Demos/psvPHP/sample1/Unit1.pas
rename to Source/Demos/psvPHP/sample1/Unit1.pas
index dd8419f..7b7281e 100644
--- a/Demos/psvPHP/sample1/Unit1.pas
+++ b/Source/Demos/psvPHP/sample1/Unit1.pas
@@ -1,158 +1,153 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{$I PHP.INC}
-
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- OleCtrls, SHDocVw, StdCtrls, ExtCtrls, ActiveX, php4delphi, PHPCommon;
-
-type
- TfrmPHPDemo = class(TForm)
- pnlButtons: TPanel;
- Panel2: TPanel;
- btnExecuteCode: TButton;
- WebBrowser1: TWebBrowser;
- psvPHP: TpsvPHP;
- btnExecuteFile: TButton;
- OpenDialog1: TOpenDialog;
- Panel3: TPanel;
- memPHPCode: TMemo;
- lbVariables: TListBox;
- Splitter1: TSplitter;
- Label1: TLabel;
- Label2: TLabel;
- procedure FormCreate(Sender: TObject);
- procedure btnExecuteFileClick(Sender: TObject);
- procedure btnExecuteCodeClick(Sender: TObject);
- procedure psvPHPLogMessage(Sender: TObject; AText: String);
- private
- { Private declarations }
- public
- { Public declarations }
- procedure DisplayResultInBrowser(AStr : string);
- procedure DisplayVariables;
- end;
-
-var
- frmPHPDemo: TfrmPHPDemo;
-
-implementation
-
-
-
-{$R *.DFM}
-{$R internal.res}
-
-function StringToOleStream(const AString: string): IStream;
-var
- MemHandle: THandle;
-begin
- MemHandle := GlobalAlloc(GPTR, Length(AString) + 1);
- if MemHandle <> 0 then begin
- Move(AString[1], PChar(MemHandle)^, Length(AString) + 1);
- CreateStreamOnHGlobal(MemHandle, True, Result);
- end else
- Result := nil;
-end;
-
-procedure TfrmPHPDemo.FormCreate(Sender: TObject);
-var
- Url : OleVariant;
- Doc : string;
-begin
- Url := 'about:blank';
- Webbrowser1.Navigate2(Url);
- Doc := psvPHP.RunCode('phpinfo();');
- DisplayResultInBrowser(Doc);
- DisplayVariables;
-end;
-
-
-
-procedure TfrmPHPDemo.btnExecuteFileClick(Sender: TObject);
-var
- doc : string;
-begin
- if OpenDialog1.Execute then
- begin
- doc := '';
- MemPHPCode.Lines.Clear;
- MemPHPCode.Lines.LoadFromFile(OpenDialog1.FileName);
- doc := psvPHP.Execute(OpenDialog1.FileName);
- DisplayResultInBrowser(doc);
- DisplayVariables;
- end;
-end;
-
-procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: string);
-var
- Stream: IStream;
- StreamInit: IPersistStreamInit;
-begin
- if AStr = '' then
- begin
- WebBrowser1.Navigate('about:The script returns no result');
- Exit;
- end;
- AStr := StringReplace(AStr, 'src="?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
- 'src="res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
-
- {$IFDEF PHP4}
- AStr := StringReplace(AStr, 'src="?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
- 'src="res://'+ ParamStr(0) + '/zend1"', [rfReplaceAll, rfIgnoreCase]);
- {$ELSE}
- AStr := StringReplace(AStr, 'src="?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
- 'src="res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
- {$ENDIF}
-
- Stream := StringToOleStream(AStr);
- StreamInit := Webbrowser1.Document as IPersistStreamInit;
- StreamInit.InitNew;
- StreamInit.Load(Stream);
-end;
-
-procedure TfrmPHPDemo.DisplayVariables;
-var
- i : integer;
-begin
- lbVariables.Items.Clear;
- for i := 0 to psvPHP.Variables.Count - 1 do
- begin
- lbVariables.Items.Add(psvphp.Variables[i].Name + '=' + psvPHP.Variables[i].Value);
- end;
- lbVariables.Items.Add('');
- lbVariables.Items.Add('Headers:');
- lbVariables.Items.Add('');
- for i := 0 to psvPHP.Headers.Count - 1 do
- lbVariables.Items.Add(psvPHP.Headers[i].Header);
-end;
-
-procedure TfrmPHPDemo.btnExecuteCodeClick(Sender: TObject);
-var
- doc : string;
-begin
- doc := '';
- doc := psvPHP.RunCode(memPHPCode.Text);
- DisplayResultInBrowser(doc);
- DisplayVariables;
-end;
-
-procedure TfrmPHPDemo.psvPHPLogMessage(Sender: TObject; AText: String);
-begin
- ShowMessage('Trapped ' + AText);
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+unit Unit1;
+
+{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ OleCtrls, SHDocVw, StdCtrls, ExtCtrls, ActiveX, php4delphi, PHPCommon;
+
+type
+ TfrmPHPDemo = class(TForm)
+ pnlButtons: TPanel;
+ Panel2: TPanel;
+ btnExecuteCode: TButton;
+ WebBrowser1: TWebBrowser;
+ psvPHP: TpsvPHP;
+ btnExecuteFile: TButton;
+ OpenDialog1: TOpenDialog;
+ Panel3: TPanel;
+ memPHPCode: TMemo;
+ lbVariables: TListBox;
+ Splitter1: TSplitter;
+ Label1: TLabel;
+ Label2: TLabel;
+ procedure FormCreate(Sender: TObject);
+ procedure btnExecuteFileClick(Sender: TObject);
+ procedure btnExecuteCodeClick(Sender: TObject);
+ procedure psvPHPLogMessage(Sender: TObject; AText: String);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ procedure DisplayResultInBrowser(AStr : string);
+ procedure DisplayVariables;
+ end;
+
+var
+ frmPHPDemo: TfrmPHPDemo;
+
+implementation
+
+
+
+{$R *.DFM}
+{$R internal.res}
+
+function StringToOleStream(const AString: string): IStream;
+var
+ MemHandle: THandle;
+begin
+ MemHandle := GlobalAlloc(GPTR, Length(AString) + 1);
+ if MemHandle <> 0 then begin
+ Move(AString[1], PChar(MemHandle)^, Length(AString) + 1);
+ CreateStreamOnHGlobal(MemHandle, True, Result);
+ end else
+ Result := nil;
+end;
+
+procedure TfrmPHPDemo.FormCreate(Sender: TObject);
+var
+ Url : OleVariant;
+ Doc : string;
+begin
+ Url := 'about:blank';
+ Webbrowser1.Navigate2(Url);
+ Doc := psvPHP.RunCode('phpinfo();');
+ DisplayResultInBrowser(Doc);
+ DisplayVariables;
+end;
+
+
+
+procedure TfrmPHPDemo.btnExecuteFileClick(Sender: TObject);
+var
+ doc : string;
+begin
+ if OpenDialog1.Execute then
+ begin
+ doc := '';
+ MemPHPCode.Lines.Clear;
+ MemPHPCode.Lines.LoadFromFile(OpenDialog1.FileName);
+ doc := psvPHP.Execute(OpenDialog1.FileName);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+ end;
+end;
+
+procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: string);
+var
+ Stream: IStream;
+ StreamInit: IPersistStreamInit;
+begin
+ if AStr = '' then
+ begin
+ WebBrowser1.Navigate('about:The script returns no result');
+ Exit;
+ end;
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
+
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
+
+ Stream := StringToOleStream(AStr);
+ StreamInit := Webbrowser1.Document as IPersistStreamInit;
+ StreamInit.InitNew;
+ StreamInit.Load(Stream);
+end;
+
+procedure TfrmPHPDemo.DisplayVariables;
+var
+ i : integer;
+begin
+ lbVariables.Items.Clear;
+ for i := 0 to psvPHP.Variables.Count - 1 do
+ begin
+ lbVariables.Items.Add(psvphp.Variables[i].Name + '=' + psvPHP.Variables[i].Value);
+ end;
+ lbVariables.Items.Add('');
+ lbVariables.Items.Add('Headers:');
+ lbVariables.Items.Add('');
+ for i := 0 to psvPHP.Headers.Count - 1 do
+ lbVariables.Items.Add(psvPHP.Headers[i].Header);
+end;
+
+procedure TfrmPHPDemo.btnExecuteCodeClick(Sender: TObject);
+var
+ doc : string;
+begin
+ doc := '';
+ doc := psvPHP.RunCode(memPHPCode.Text);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+end;
+
+procedure TfrmPHPDemo.psvPHPLogMessage(Sender: TObject; AText: String);
+begin
+ ShowMessage('Trapped ' + AText);
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/sample1/WindowsXP.res b/Source/Demos/psvPHP/sample1/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/sample1/frm_phpDemo.ddp b/Source/Demos/psvPHP/sample1/frm_phpDemo.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/frm_phpDemo.ddp differ
diff --git a/Source/Demos/psvPHP/sample1/frm_phpDemo.dfm b/Source/Demos/psvPHP/sample1/frm_phpDemo.dfm
new file mode 100644
index 0000000..43ed881
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/frm_phpDemo.dfm
@@ -0,0 +1,194 @@
+object frmPHPDemo: TfrmPHPDemo
+ Left = 299
+ Top = 239
+ Caption = 'psvPHP demo'
+ ClientHeight = 506
+ ClientWidth = 775
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 484
+ Top = 0
+ Width = 4
+ Height = 465
+ Align = alRight
+ end
+ object pnlButtons: TPanel
+ Left = 0
+ Top = 465
+ Width = 775
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 590
+ Top = 0
+ Width = 185
+ Height = 41
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btnExecuteCode: TButton
+ Left = 88
+ Top = 8
+ Width = 87
+ Height = 25
+ Caption = 'Execute Code'
+ TabOrder = 0
+ OnClick = btnExecuteCodeClick
+ end
+ object btnExecuteFile: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Execute File'
+ TabOrder = 1
+ OnClick = btnExecuteFileClick
+ end
+ end
+ end
+ object WebBrowser1: TWebBrowser
+ Left = 0
+ Top = 0
+ Width = 484
+ Height = 465
+ Align = alClient
+ TabOrder = 1
+ ControlData = {
+ 4C000000063200000F3000000000000000000000000000000000000000000000
+ 000000004C000000000000000000000001000000E0D057007335CF11AE690800
+ 2B2E126208000000000000004C0000000114020000000000C000000000000046
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000100000000000000000000000000000000000000}
+ end
+ object Panel3: TPanel
+ Left = 488
+ Top = 0
+ Width = 287
+ Height = 465
+ Align = alRight
+ Caption = 'Panel3'
+ TabOrder = 2
+ object Label1: TLabel
+ Left = 1
+ Top = 1
+ Width = 285
+ Height = 13
+ Margins.Bottom = 0
+ Align = alTop
+ Caption = ' PHP code'
+ ExplicitWidth = 55
+ end
+ object Label2: TLabel
+ Left = 1
+ Top = 295
+ Width = 285
+ Height = 13
+ Margins.Bottom = 0
+ Align = alBottom
+ Caption = ' Result values'
+ ExplicitWidth = 70
+ end
+ object memPHPCode: TMemo
+ Left = 1
+ Top = 14
+ Width = 285
+ Height = 281
+ Align = alClient
+ Lines.Strings = (
+ 'echo "Before function declaration... \n";'
+ ''
+ 'function print_something_multiple_times($something,$times)'
+ '{'
+
+ ' echo "---- \nIn function, printing the string \"$something\' +
+ '" $times times \n";'
+ ' for ($i=0; $i<$times; $i++) {'
+ ' echo "$i) $something \n";'
+ ' }'
+ ' echo "Done with function... \n----- \n";'
+ '}'
+ ''
+ 'function some_other_function()'
+ '{'
+
+ ' echo "This is some other function, to ensure more than just on' +
+ 'e function works fine... \n";'
+ '}'
+ ''
+ ''
+ 'echo "After function declaration... \n";'
+ ''
+ 'echo "Calling function for the first time... \n";'
+ 'print_something_multiple_times($test,10);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'echo "Calling the function for the second time... \n";'
+
+ 'print_something_multiple_times("This like, really works and stuf' +
+ 'f...",3);'
+ 'echo "Returned from function call... \n";'
+ ''
+ 'some_other_function();'
+ ''
+ '$test = "I don'#39't believe";'
+ '$tool = "PHP";')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ WordWrap = False
+ end
+ object lbVariables: TListBox
+ Left = 1
+ Top = 308
+ Width = 285
+ Height = 156
+ Align = alBottom
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ end
+ object psvPHP: TpsvPHP
+ Variables = <
+ item
+ Name = 'test'
+ Value = 'This works!'
+ end
+ item
+ Name = 'tool'
+ Value = 'Delphi'
+ end>
+ OnReadPost = psvPHPReadPost
+ RequestType = prtPost
+ Left = 116
+ Top = 28
+ end
+ object OpenDialog1: TOpenDialog
+ DefaultExt = '.php'
+ Filter = 'PHP script (*.php)|*.php|Any File (*.*)|*.*'
+ Left = 196
+ Top = 132
+ end
+ object PHPEngine: TPHPEngine
+ OnLogMessage = psvPHPLogMessage
+ Constants = <>
+ ReportDLLError = False
+ Left = 72
+ Top = 124
+ end
+ object PHPSystemLibrary1: TPHPSystemLibrary
+ Left = 248
+ Top = 100
+ end
+end
diff --git a/Source/Demos/psvPHP/sample1/frm_phpDemo.pas b/Source/Demos/psvPHP/sample1/frm_phpDemo.pas
new file mode 100644
index 0000000..98e98f3
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/frm_phpDemo.pas
@@ -0,0 +1,173 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+unit frm_phpDemo;
+
+{ $Id: frm_phpDemo.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ OleCtrls, SHDocVw, StdCtrls, ExtCtrls, ActiveX, php4delphi, PHPCommon,
+ PHPCustomLibrary, phpLibrary;
+
+type
+ TfrmPHPDemo = class(TForm)
+ pnlButtons: TPanel;
+ Panel2: TPanel;
+ btnExecuteCode: TButton;
+ WebBrowser1: TWebBrowser;
+ psvPHP: TpsvPHP;
+ btnExecuteFile: TButton;
+ OpenDialog1: TOpenDialog;
+ Panel3: TPanel;
+ memPHPCode: TMemo;
+ lbVariables: TListBox;
+ Splitter1: TSplitter;
+ Label1: TLabel;
+ Label2: TLabel;
+ PHPEngine: TPHPEngine;
+ PHPSystemLibrary1: TPHPSystemLibrary;
+ procedure FormCreate(Sender: TObject);
+ procedure btnExecuteFileClick(Sender: TObject);
+ procedure btnExecuteCodeClick(Sender: TObject);
+ procedure psvPHPLogMessage(Sender: TObject; AText: String);
+ procedure psvPHPReadPost(Sender: TObject; Stream: TStream);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ procedure DisplayResultInBrowser(AStr : string);
+ procedure DisplayVariables;
+ end;
+
+var
+ frmPHPDemo: TfrmPHPDemo;
+
+implementation
+
+
+
+{$R *.DFM}
+{$R internal.res}
+{$R WindowsXP.res}
+
+function StringToOleStream(const AString: string): IStream;
+var
+ MemHandle: THandle;
+begin
+ MemHandle := GlobalAlloc(GPTR, Length(AString) + 1);
+ if MemHandle <> 0 then begin
+ Move(AString[1], PChar(MemHandle)^, Length(AString) + 1);
+ CreateStreamOnHGlobal(MemHandle, True, Result);
+ end else
+ Result := nil;
+end;
+
+procedure TfrmPHPDemo.FormCreate(Sender: TObject);
+var
+ Url : OleVariant;
+ Doc : string;
+begin
+ PHPEngine.StartupEngine;
+ Url := 'about:blank';
+ Webbrowser1.Navigate2(Url);
+ Doc := psvPHP.RunCode('phpinfo();');
+ DisplayResultInBrowser(Doc);
+ DisplayVariables;
+end;
+
+
+
+procedure TfrmPHPDemo.btnExecuteFileClick(Sender: TObject);
+var
+ doc : string;
+begin
+ if OpenDialog1.Execute then
+ begin
+ doc := '';
+ MemPHPCode.Lines.Clear;
+ MemPHPCode.Lines.LoadFromFile(OpenDialog1.FileName);
+ doc := psvPHP.Execute(OpenDialog1.FileName);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+ end;
+end;
+
+procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: string);
+var
+ Stream: IStream;
+ StreamInit: IPersistStreamInit;
+begin
+ if AStr = '' then
+ begin
+ WebBrowser1.Navigate('about:The script returns no result');
+ Exit;
+ end;
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
+
+ AStr := StringReplace(AStr, 'src="?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
+ 'src="res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
+
+ Stream := StringToOleStream(AStr);
+ StreamInit := Webbrowser1.Document as IPersistStreamInit;
+ StreamInit.InitNew;
+ StreamInit.Load(Stream);
+end;
+
+procedure TfrmPHPDemo.DisplayVariables;
+var
+ i : integer;
+begin
+ lbVariables.Items.Clear;
+ for i := 0 to psvPHP.Variables.Count - 1 do
+ begin
+ lbVariables.Items.Add(psvphp.Variables[i].Name + '=' + psvPHP.Variables[i].Value);
+ end;
+ lbVariables.Items.Add('');
+ lbVariables.Items.Add('Headers:');
+ lbVariables.Items.Add('');
+ for i := 0 to psvPHP.Headers.Count - 1 do
+ lbVariables.Items.Add(psvPHP.Headers[i].Header);
+end;
+
+procedure TfrmPHPDemo.btnExecuteCodeClick(Sender: TObject);
+var
+ doc : string;
+begin
+ doc := '';
+ doc := psvPHP.RunCode(memPHPCode.Text);
+ DisplayResultInBrowser(doc);
+ DisplayVariables;
+end;
+
+procedure TfrmPHPDemo.psvPHPLogMessage(Sender: TObject; AText: String);
+begin
+ ShowMessage('Trapped ' + AText);
+end;
+
+procedure TfrmPHPDemo.psvPHPReadPost(Sender: TObject; Stream: TStream);
+var
+ PostData : string;
+begin
+ PostData :='postname=postvalue'#0;
+ Stream.Write(PostData[1], length(PostData));
+end;
+
+procedure TfrmPHPDemo.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/sample1/internal.RES b/Source/Demos/psvPHP/sample1/internal.RES
new file mode 100644
index 0000000..3488df0
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/internal.RES differ
diff --git a/Source/Demos/psvPHP/sample1/internal.rc b/Source/Demos/psvPHP/sample1/internal.rc
new file mode 100644
index 0000000..7af5bd7
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/internal.rc
@@ -0,0 +1,3 @@
+php 23 DISCARDABLE php.gif
+zend2 23 DISCARDABLE zend2.gif
+zend1 23 DISCARDABLE zend1.gif
diff --git a/Source/Demos/psvPHP/sample1/php.gif b/Source/Demos/psvPHP/sample1/php.gif
new file mode 100644
index 0000000..7beda43
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/php.gif differ
diff --git a/Source/Demos/psvPHP/sample1/test.php b/Source/Demos/psvPHP/sample1/test.php
new file mode 100644
index 0000000..f4f3614
--- /dev/null
+++ b/Source/Demos/psvPHP/sample1/test.php
@@ -0,0 +1,4 @@
+
+
diff --git a/Source/Demos/psvPHP/sample1/zend1.gif b/Source/Demos/psvPHP/sample1/zend1.gif
new file mode 100644
index 0000000..a2b4379
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/zend1.gif differ
diff --git a/Source/Demos/psvPHP/sample1/zend2.gif b/Source/Demos/psvPHP/sample1/zend2.gif
new file mode 100644
index 0000000..62b8530
Binary files /dev/null and b/Source/Demos/psvPHP/sample1/zend2.gif differ
diff --git a/Demos/psvPHP/sample2/Project1.dpr b/Source/Demos/psvPHP/sample2/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/sample2/Project1.dpr
rename to Source/Demos/psvPHP/sample2/Project1.dpr
index 6a76f6f..ca1d8c4 100644
--- a/Demos/psvPHP/sample2/Project1.dpr
+++ b/Source/Demos/psvPHP/sample2/Project1.dpr
@@ -1,14 +1,14 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1},
- PHP4Delphi;
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1},
+ PHP4Delphi;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/sample2/Project1.res b/Source/Demos/psvPHP/sample2/Project1.res
new file mode 100644
index 0000000..08ba56e
Binary files /dev/null and b/Source/Demos/psvPHP/sample2/Project1.res differ
diff --git a/Source/Demos/psvPHP/sample2/Sample2.bdsproj b/Source/Demos/psvPHP/sample2/Sample2.bdsproj
new file mode 100644
index 0000000..3a68c11
--- /dev/null
+++ b/Source/Demos/psvPHP/sample2/Sample2.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1226597D-BF86-46A7-B07F-4ED39091968A}
+
+
+
+
+ Sample2.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/Source/Demos/psvPHP/sample2/Sample2.dpr b/Source/Demos/psvPHP/sample2/Sample2.dpr
new file mode 100644
index 0000000..c6f5c16
--- /dev/null
+++ b/Source/Demos/psvPHP/sample2/Sample2.dpr
@@ -0,0 +1,14 @@
+program Sample2;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1},
+ PHP4Delphi;
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/sample2/Sample2.res b/Source/Demos/psvPHP/sample2/Sample2.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/sample2/Sample2.res differ
diff --git a/Source/Demos/psvPHP/sample2/Unit1.ddp b/Source/Demos/psvPHP/sample2/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/sample2/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/sample2/Unit1.dfm b/Source/Demos/psvPHP/sample2/Unit1.dfm
new file mode 100644
index 0000000..2c36f02
--- /dev/null
+++ b/Source/Demos/psvPHP/sample2/Unit1.dfm
@@ -0,0 +1,87 @@
+object Form1: TForm1
+ Left = 414
+ Top = 391
+ BorderStyle = bsDialog
+ Caption = 'Calculator'
+ ClientHeight = 120
+ ClientWidth = 336
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 40
+ Top = 36
+ Width = 6
+ Height = 13
+ Margins.Bottom = 0
+ Caption = '+'
+ end
+ object Label2: TLabel
+ Left = 140
+ Top = 36
+ Width = 6
+ Height = 13
+ Margins.Bottom = 0
+ Caption = '='
+ end
+ object Label3: TLabel
+ Left = 156
+ Top = 36
+ Width = 3
+ Height = 13
+ Margins.Bottom = 0
+ end
+ object Edit1: TEdit
+ Left = 8
+ Top = 8
+ Width = 121
+ Height = 21
+ TabOrder = 0
+ Text = '2'
+ end
+ object Edit2: TEdit
+ Left = 8
+ Top = 52
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ Text = '2'
+ end
+ object Button1: TButton
+ Left = 244
+ Top = 88
+ Width = 75
+ Height = 25
+ Caption = 'Calculate'
+ TabOrder = 2
+ OnClick = Button1Click
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <
+ item
+ Name = 'x'
+ end
+ item
+ Name = 'y'
+ end
+ item
+ Name = 'z'
+ Value = '0'
+ end>
+ Left = 20
+ Top = 80
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 76
+ Top = 84
+ end
+end
diff --git a/Demos/psvPHP/sample2/Unit1.pas b/Source/Demos/psvPHP/sample2/Unit1.pas
similarity index 87%
rename from Demos/psvPHP/sample2/Unit1.pas
rename to Source/Demos/psvPHP/sample2/Unit1.pas
index 7adfdcd..09414e2 100644
--- a/Demos/psvPHP/sample2/Unit1.pas
+++ b/Source/Demos/psvPHP/sample2/Unit1.pas
@@ -1,50 +1,53 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-unit Unit1;
-
-{ $Id: Unit1.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, php4delphi;
-
-type
- TForm1 = class(TForm)
- psvPHP1: TpsvPHP;
- Edit1: TEdit;
- Edit2: TEdit;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.DFM}
-
-procedure TForm1.Button1Click(Sender: TObject);
-begin
- psvPHP1.Variables.Items[0].Value := Edit1.text;
- psvPHP1.Variables.Items[1].Value := Edit2.text;
- psvPHP1.RunCode('$z = $x + $y;');
- Label3.Caption := psvPHP1.VariableByName('z').Value;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+unit Unit1;
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, php4delphi, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ psvPHP1: TpsvPHP;
+ Edit1: TEdit;
+ Edit2: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Button1: TButton;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+ psvPHP1.Variables.Items[0].Value := Edit1.text;
+ psvPHP1.Variables.Items[1].Value := Edit2.text;
+ psvPHP1.RunCode('$z = $x + $y;');
+ Label3.Caption := psvPHP1.VariableByName('z').Value;
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Demos/psvPHP/sample3/Project1.dpr b/Source/Demos/psvPHP/sample3/Project1.dpr
similarity index 93%
rename from Demos/psvPHP/sample3/Project1.dpr
rename to Source/Demos/psvPHP/sample3/Project1.dpr
index 08b344c..513a1dd 100644
--- a/Demos/psvPHP/sample3/Project1.dpr
+++ b/Source/Demos/psvPHP/sample3/Project1.dpr
@@ -1,13 +1,13 @@
-program Project1;
-
-uses
- Forms,
- Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.res}
-
-begin
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
+program Project1;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Demos/psvPHP/sample3/Project1.res b/Source/Demos/psvPHP/sample3/Project1.res
similarity index 100%
rename from Demos/psvPHP/sample3/Project1.res
rename to Source/Demos/psvPHP/sample3/Project1.res
diff --git a/Source/Demos/psvPHP/sample3/Sample3.dpr b/Source/Demos/psvPHP/sample3/Sample3.dpr
new file mode 100644
index 0000000..b90060c
--- /dev/null
+++ b/Source/Demos/psvPHP/sample3/Sample3.dpr
@@ -0,0 +1,13 @@
+program Sample3;
+
+uses
+ Forms,
+ Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/sample3/Sample3.res b/Source/Demos/psvPHP/sample3/Sample3.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/sample3/Sample3.res differ
diff --git a/Source/Demos/psvPHP/sample3/Unit1.ddp b/Source/Demos/psvPHP/sample3/Unit1.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/sample3/Unit1.ddp differ
diff --git a/Source/Demos/psvPHP/sample3/Unit1.dfm b/Source/Demos/psvPHP/sample3/Unit1.dfm
new file mode 100644
index 0000000..e6deda2
--- /dev/null
+++ b/Source/Demos/psvPHP/sample3/Unit1.dfm
@@ -0,0 +1,91 @@
+object Form1: TForm1
+ Left = 309
+ Top = 184
+ BorderStyle = bsDialog
+ Caption = 'Built-in functions and class sample'
+ ClientHeight = 331
+ ClientWidth = 460
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 8
+ Top = 8
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ 'delphi_Show_Message("Hello, Delphi!");')
+ TabOrder = 0
+ end
+ object Memo2: TMemo
+ Left = 8
+ Top = 108
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ '$a = new php4delphi_author();'
+ '$a->send_email();')
+ TabOrder = 1
+ end
+ object Memo3: TMemo
+ Left = 8
+ Top = 212
+ Width = 329
+ Height = 89
+ Lines.Strings = (
+ 'echo delphi_get_system_directory();')
+ TabOrder = 2
+ end
+ object Button1: TButton
+ Left = 364
+ Top = 60
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 3
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 364
+ Top = 160
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 4
+ OnClick = Button2Click
+ end
+ object Button3: TButton
+ Left = 372
+ Top = 268
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 5
+ OnClick = Button3Click
+ end
+ object psvPHP1: TpsvPHP
+ Variables = <
+ item
+ Name = 'test'
+ Value = 'test'
+ end>
+ Left = 112
+ Top = 140
+ end
+ object PHPEngine: TPHPEngine
+ HandleErrors = False
+ Constants = <>
+ ReportDLLError = False
+ Left = 116
+ Top = 252
+ end
+end
diff --git a/Source/Demos/psvPHP/sample3/Unit1.pas b/Source/Demos/psvPHP/sample3/Unit1.pas
new file mode 100644
index 0000000..a71263f
--- /dev/null
+++ b/Source/Demos/psvPHP/sample3/Unit1.pas
@@ -0,0 +1,77 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+
+unit Unit1;
+
+{$I PHP.INC}
+
+{ $Id: Unit1.pas,v 7.0 04/2007 delphi32 Exp $ }
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$IFDEF VERSION6} Variants, {$ENDIF} Classes, Graphics, Controls, Forms,
+ Dialogs, php4delphi, StdCtrls, PHPCommon;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Memo3: TMemo;
+ Button1: TButton;
+ Button2: TButton;
+ Button3: TButton;
+ psvPHP1: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure Button3Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.dfm}
+{$R WindowsXP.res}
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ psvPHP1.RunCode(Memo1.Lines.text);
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ psvPHP1.RunCode(Memo2.Lines.text);
+end;
+
+procedure TForm1.Button3Click(Sender: TObject);
+begin
+ ShowMessage(psvPHP1.RunCode(Memo3.Lines.text));
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/sample3/WindowsXP.res b/Source/Demos/psvPHP/sample3/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/sample3/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/sample4/WindowsXP.res b/Source/Demos/psvPHP/sample4/WindowsXP.res
new file mode 100644
index 0000000..acb40f5
Binary files /dev/null and b/Source/Demos/psvPHP/sample4/WindowsXP.res differ
diff --git a/Source/Demos/psvPHP/sample4/frm_PHPTest.ddp b/Source/Demos/psvPHP/sample4/frm_PHPTest.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/Source/Demos/psvPHP/sample4/frm_PHPTest.ddp differ
diff --git a/Source/Demos/psvPHP/sample4/frm_PHPTest.dfm b/Source/Demos/psvPHP/sample4/frm_PHPTest.dfm
new file mode 100644
index 0000000..c7ba0a4
--- /dev/null
+++ b/Source/Demos/psvPHP/sample4/frm_PHPTest.dfm
@@ -0,0 +1,103 @@
+object frmPHPTest: TfrmPHPTest
+ Left = 422
+ Top = 286
+ Width = 590
+ Height = 435
+ Caption = 'psvPHP test'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 241
+ Top = 0
+ Width = 3
+ Height = 360
+ Cursor = crHSplit
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 360
+ Width = 582
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 397
+ Top = 0
+ Width = 185
+ Height = 41
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Button1: TButton
+ Left = 100
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 0
+ Width = 241
+ Height = 360
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ TabOrder = 1
+ object memoScript: TMemo
+ Left = 0
+ Top = 0
+ Width = 241
+ Height = 360
+ Align = alClient
+ Lines.Strings = (
+ 'phpinfo();')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ end
+ object Panel4: TPanel
+ Left = 244
+ Top = 0
+ Width = 338
+ Height = 360
+ Align = alClient
+ BevelOuter = bvNone
+ Caption = 'Panel4'
+ TabOrder = 2
+ object MemoResult: TMemo
+ Left = 0
+ Top = 0
+ Width = 338
+ Height = 360
+ Align = alClient
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ end
+ object psvPHP: TpsvPHP
+ Variables = <>
+ Left = 84
+ Top = 148
+ end
+ object PHPEngine: TPHPEngine
+ Constants = <>
+ ReportDLLError = False
+ Left = 80
+ Top = 248
+ end
+end
diff --git a/Source/Demos/psvPHP/sample4/frm_PHPTest.pas b/Source/Demos/psvPHP/sample4/frm_PHPTest.pas
new file mode 100644
index 0000000..6227652
--- /dev/null
+++ b/Source/Demos/psvPHP/sample4/frm_PHPTest.pas
@@ -0,0 +1,53 @@
+unit frm_PHPTest;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ php4delphi, StdCtrls, ExtCtrls, PHPCommon;
+
+type
+ TfrmPHPTest = class(TForm)
+ Panel1: TPanel;
+ Panel2: TPanel;
+ Button1: TButton;
+ Panel3: TPanel;
+ Splitter1: TSplitter;
+ Panel4: TPanel;
+ memoScript: TMemo;
+ MemoResult: TMemo;
+ psvPHP: TpsvPHP;
+ PHPEngine: TPHPEngine;
+ procedure Button1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmPHPTest: TfrmPHPTest;
+
+implementation
+
+{$R *.DFM}
+{$R WindowsXP.res}
+
+procedure TfrmPHPTest.Button1Click(Sender: TObject);
+begin
+ MemoResult.Text := psvPHP.RunCode(memoScript.Text);
+end;
+
+procedure TfrmPHPTest.FormCreate(Sender: TObject);
+begin
+ PHPEngine.StartupEngine;
+end;
+
+procedure TfrmPHPTest.FormDestroy(Sender: TObject);
+begin
+ PHPEngine.ShutdownAndWaitFor;
+end;
+
+end.
diff --git a/Source/Demos/psvPHP/sample4/psvPHP_test.dpr b/Source/Demos/psvPHP/sample4/psvPHP_test.dpr
new file mode 100644
index 0000000..b15444a
--- /dev/null
+++ b/Source/Demos/psvPHP/sample4/psvPHP_test.dpr
@@ -0,0 +1,13 @@
+program psvPHP_test;
+
+uses
+ Forms,
+ frm_PHPTest in 'frm_PHPTest.pas' {frmPHPTest};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmPHPTest, frmPHPTest);
+ Application.Run;
+end.
diff --git a/Source/Demos/psvPHP/sample4/psvPHP_test.res b/Source/Demos/psvPHP/sample4/psvPHP_test.res
new file mode 100644
index 0000000..c791b86
Binary files /dev/null and b/Source/Demos/psvPHP/sample4/psvPHP_test.res differ
diff --git a/ExtensionBuilder/Builder.Inc b/Source/ExtensionBuilder/Builder.Inc
similarity index 96%
rename from ExtensionBuilder/Builder.Inc
rename to Source/ExtensionBuilder/Builder.Inc
index e5a3e23..1b60723 100644
--- a/ExtensionBuilder/Builder.Inc
+++ b/Source/ExtensionBuilder/Builder.Inc
@@ -1,67 +1,67 @@
-{$IFNDEF VER80} {Delphi 1.0}
- {$DEFINE VERSION2} {Delphi 2.0 and BCB 1 or higher}
-{$ENDIF}
-
-{$IFDEF VERSION2}
- {$IFNDEF VER90} {Delphi 2.0}
- {$IFNDEF VER93} {BCB 1.0}
- {$DEFINE VERSION3} {Delphi 3.0 or BCB 3.0}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
- {$IFNDEF VER100} {Delphi 3}
- {$IFNDEF VER110} {BCB 3}
- {$DEFINE VERSION4} {Delphi 4.0 or higher}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION4}
- {$IFNDEF VER120} {Delphi 4}
- {$IFNDEF VER125} {BCB 4}
- {$DEFINE VERSION5} {Delphi 5.0 or higher}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION5}
- {$IFNDEF VER130} {Delphi 5}
- {$IFNDEF VER135} {BCB 5}
- {$DEFINE VERSION6} {Delphi 6.0 or higher}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION6}
- {$IFNDEF VER140} {Delphi 6}
- {$IFNDEF VER145} {BCB 6}
- {$DEFINE VERSION7} {Delphi 7.0 or higher}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION6}
- {$WARN SYMBOL_PLATFORM OFF}
- {$IFDEF VERSION7}
- {$WARN UNIT_PLATFORM OFF}
- {$WARN UNSAFE_CODE OFF}
- {$WARN UNSAFE_TYPE OFF}
- {$WARN UNSAFE_CAST OFF}
- {$WARN UNIT_DEPRECATED OFF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION5}
- {$IFNDEF VERSION6}
- {$DEFINE VERSION5ONLY}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION6}
-{$A8}
-{ELSE}
-{$A+}
-{$ENDIF}
-
+{$IFNDEF VER80} {Delphi 1.0}
+ {$DEFINE VERSION2} {Delphi 2.0 and BCB 1 or higher}
+{$ENDIF}
+
+{$IFDEF VERSION2}
+ {$IFNDEF VER90} {Delphi 2.0}
+ {$IFNDEF VER93} {BCB 1.0}
+ {$DEFINE VERSION3} {Delphi 3.0 or BCB 3.0}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION3}
+ {$IFNDEF VER100} {Delphi 3}
+ {$IFNDEF VER110} {BCB 3}
+ {$DEFINE VERSION4} {Delphi 4.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION4}
+ {$IFNDEF VER120} {Delphi 4}
+ {$IFNDEF VER125} {BCB 4}
+ {$DEFINE VERSION5} {Delphi 5.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION5}
+ {$IFNDEF VER130} {Delphi 5}
+ {$IFNDEF VER135} {BCB 5}
+ {$DEFINE VERSION6} {Delphi 6.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION6}
+ {$IFNDEF VER140} {Delphi 6}
+ {$IFNDEF VER145} {BCB 6}
+ {$DEFINE VERSION7} {Delphi 7.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION6}
+ {$WARN SYMBOL_PLATFORM OFF}
+ {$IFDEF VERSION7}
+ {$WARN UNIT_PLATFORM OFF}
+ {$WARN UNSAFE_CODE OFF}
+ {$WARN UNSAFE_TYPE OFF}
+ {$WARN UNSAFE_CAST OFF}
+ {$WARN UNIT_DEPRECATED OFF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION5}
+ {$IFNDEF VERSION6}
+ {$DEFINE VERSION5ONLY}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION6}
+{$A8}
+{ELSE}
+{$A+}
+{$ENDIF}
+
diff --git a/ExtensionBuilder/PHPEXT.RES b/Source/ExtensionBuilder/PHPEXT.RES
similarity index 100%
rename from ExtensionBuilder/PHPEXT.RES
rename to Source/ExtensionBuilder/PHPEXT.RES
diff --git a/ExtensionBuilder/frm_Functions.dfm b/Source/ExtensionBuilder/frm_Functions.dfm
similarity index 95%
rename from ExtensionBuilder/frm_Functions.dfm
rename to Source/ExtensionBuilder/frm_Functions.dfm
index c3459d6..cb38b1a 100644
--- a/ExtensionBuilder/frm_Functions.dfm
+++ b/Source/ExtensionBuilder/frm_Functions.dfm
@@ -1,54 +1,54 @@
-object frmFunctions: TfrmFunctions
- Left = 414
- Top = 217
- BorderStyle = bsDialog
- Caption = 'Functions'
- ClientHeight = 442
- ClientWidth = 370
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 20
- Top = 8
- Width = 259
- Height = 52
- Caption =
- 'This wizard will create PHP extension project for you'#13#10#13#10'Please ' +
- 'enter name of the functions you want to include'#13#10'in this project'
- end
- object Functions: TMemo
- Left = 16
- Top = 68
- Width = 337
- Height = 319
- TabOrder = 0
- end
- object btnOK: TButton
- Left = 208
- Top = 408
- Width = 75
- Height = 25
- Caption = 'OK'
- Default = True
- ModalResult = 1
- TabOrder = 1
- end
- object btnCancel: TButton
- Left = 284
- Top = 408
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'Cancel'
- ModalResult = 2
- TabOrder = 2
- end
-end
+object frmFunctions: TfrmFunctions
+ Left = 414
+ Top = 217
+ BorderStyle = bsDialog
+ Caption = 'Functions'
+ ClientHeight = 442
+ ClientWidth = 370
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 20
+ Top = 8
+ Width = 259
+ Height = 52
+ Caption =
+ 'This wizard will create PHP extension project for you'#13#10#13#10'Please ' +
+ 'enter name of the functions you want to include'#13#10'in this project'
+ end
+ object Functions: TMemo
+ Left = 16
+ Top = 68
+ Width = 337
+ Height = 319
+ TabOrder = 0
+ end
+ object btnOK: TButton
+ Left = 208
+ Top = 408
+ Width = 75
+ Height = 25
+ Caption = 'OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 1
+ end
+ object btnCancel: TButton
+ Left = 284
+ Top = 408
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 2
+ end
+end
diff --git a/ExtensionBuilder/frm_Functions.pas b/Source/ExtensionBuilder/frm_Functions.pas
similarity index 93%
rename from ExtensionBuilder/frm_Functions.pas
rename to Source/ExtensionBuilder/frm_Functions.pas
index 4148df9..7670ff8 100644
--- a/ExtensionBuilder/frm_Functions.pas
+++ b/Source/ExtensionBuilder/frm_Functions.pas
@@ -1,28 +1,28 @@
-unit frm_Functions;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
-
-type
- TfrmFunctions = class(TForm)
- Functions: TMemo;
- btnOK: TButton;
- btnCancel: TButton;
- Label1: TLabel;
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- frmFunctions: TfrmFunctions;
-
-implementation
-
-{$R *.DFM}
-
-end.
+unit frm_Functions;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TfrmFunctions = class(TForm)
+ Functions: TMemo;
+ btnOK: TButton;
+ btnCancel: TButton;
+ Label1: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmFunctions: TfrmFunctions;
+
+implementation
+
+{$R *.DFM}
+
+end.
diff --git a/ExtensionBuilder/phpExtBuilderD5.dpk b/Source/ExtensionBuilder/phpExtBuilderD5.dpk
similarity index 94%
rename from ExtensionBuilder/phpExtBuilderD5.dpk
rename to Source/ExtensionBuilder/phpExtBuilderD5.dpk
index cd504c9..892079e 100644
--- a/ExtensionBuilder/phpExtBuilderD5.dpk
+++ b/Source/ExtensionBuilder/phpExtBuilderD5.dpk
@@ -1,37 +1,37 @@
-package phpExtBuilderD5;
-
-{$R *.RES}
-{$ALIGN ON}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST ON}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'PHP Extension Builder'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- vcl50,
- dsnide50;
-
-contains
- phpExtensionBuilder in 'phpExtensionBuilder.pas',
- frm_Functions in 'frm_Functions.pas' {frmFunctions};
-
-end.
+package phpExtBuilderD5;
+
+{$R *.RES}
+{$ALIGN ON}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PHP Extension Builder'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl50,
+ dsnide50;
+
+contains
+ phpExtensionBuilder in 'phpExtensionBuilder.pas',
+ frm_Functions in 'frm_Functions.pas' {frmFunctions};
+
+end.
diff --git a/ExtensionBuilder/phpExtBuilderD5.res b/Source/ExtensionBuilder/phpExtBuilderD5.res
similarity index 100%
rename from ExtensionBuilder/phpExtBuilderD5.res
rename to Source/ExtensionBuilder/phpExtBuilderD5.res
diff --git a/ExtensionBuilder/phpExtBuilderD6.dpk b/Source/ExtensionBuilder/phpExtBuilderD6.dpk
similarity index 94%
rename from ExtensionBuilder/phpExtBuilderD6.dpk
rename to Source/ExtensionBuilder/phpExtBuilderD6.dpk
index 9036232..2042411 100644
--- a/ExtensionBuilder/phpExtBuilderD6.dpk
+++ b/Source/ExtensionBuilder/phpExtBuilderD6.dpk
@@ -1,37 +1,37 @@
-package phpExtBuilderD6;
-
-{$R *.res}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST ON}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'PHP Extension Builder'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- vcl,
- designide;
-
-contains
- phpExtensionBuilder in 'phpExtensionBuilder.pas',
- frm_Functions in 'frm_Functions.pas' {frmFunctions};
-
-end.
+package phpExtBuilderD6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PHP Extension Builder'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl,
+ designide;
+
+contains
+ phpExtensionBuilder in 'phpExtensionBuilder.pas',
+ frm_Functions in 'frm_Functions.pas' {frmFunctions};
+
+end.
diff --git a/ExtensionBuilder/phpExtBuilderD6.res b/Source/ExtensionBuilder/phpExtBuilderD6.res
similarity index 100%
rename from ExtensionBuilder/phpExtBuilderD6.res
rename to Source/ExtensionBuilder/phpExtBuilderD6.res
diff --git a/ExtensionBuilder/phpExtBuilderD7.dpk b/Source/ExtensionBuilder/phpExtBuilderD7.dpk
similarity index 94%
rename from ExtensionBuilder/phpExtBuilderD7.dpk
rename to Source/ExtensionBuilder/phpExtBuilderD7.dpk
index a7be0bd..22fc57d 100644
--- a/ExtensionBuilder/phpExtBuilderD7.dpk
+++ b/Source/ExtensionBuilder/phpExtBuilderD7.dpk
@@ -1,37 +1,37 @@
-package phpExtBuilderD7;
-
-{$R *.res}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST ON}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'PHP Extension Builder'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- vcl,
- designide;
-
-contains
- phpExtensionBuilder in 'phpExtensionBuilder.pas',
- frm_Functions in 'frm_Functions.pas' {frmFunctions};
-
-end.
+package phpExtBuilderD7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PHP Extension Builder'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl,
+ designide;
+
+contains
+ phpExtensionBuilder in 'phpExtensionBuilder.pas',
+ frm_Functions in 'frm_Functions.pas' {frmFunctions};
+
+end.
diff --git a/ExtensionBuilder/phpExtBuilderD7.res b/Source/ExtensionBuilder/phpExtBuilderD7.res
similarity index 100%
rename from ExtensionBuilder/phpExtBuilderD7.res
rename to Source/ExtensionBuilder/phpExtBuilderD7.res
diff --git a/ExtensionBuilder/phpExtensionBuilder.pas b/Source/ExtensionBuilder/phpExtensionBuilder.pas
similarity index 95%
rename from ExtensionBuilder/phpExtensionBuilder.pas
rename to Source/ExtensionBuilder/phpExtensionBuilder.pas
index ce4e9e6..8ebe001 100644
--- a/ExtensionBuilder/phpExtensionBuilder.pas
+++ b/Source/ExtensionBuilder/phpExtensionBuilder.pas
@@ -1,380 +1,380 @@
-{$I Builder.INC}
-unit phpExtensionBuilder;
-
-interface
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
- Dialogs,
- {$IFDEF VERSION6}
- DesignIntf,
- DesignEditors,
- DMForm,
- {$ELSE}
- dsgnintf,
- dmdesigner,
- {$ENDIF}
- ToolsAPI,
- frm_functions;
-
-type
-
- TExtensionExpert = class(TNotifierObject, IOTAWizard, IOTARepositoryWizard, IOTAFormWizard)
- public
- // IOTAWizard
- function GetIDString: string;
- function GetName: string;
- function GetState: TWizardState;
- procedure Execute;
- // IOTARepositoryWizard
- function GetAuthor: string;
- function GetComment: string;
- function GetPage: string;
- {$IFDEF VERSION6}
- function GetGlyph : cardinal;
- {$ELSE}
- function GetGlyph: HICON;
- {$ENDIF}
- end;
-
- TExtensionProjectCreator = class(TInterfacedObject, IOTACreator, IOTAProjectCreator)
- public
- // IOTACreator
- function GetCreatorType: string;
- function GetExisting: Boolean;
- function GetFileSystem: string;
- function GetOwner: IOTAModule;
- function GetUnnamed: Boolean;
- // IOTAProjectCreator
- function GetFileName: string;
- function GetOptionFileName: string;
- function GetShowSource: Boolean;
- procedure NewDefaultModule;
- function NewOptionSource(const ProjectName: string): IOTAFile;
- procedure NewProjectResource(const Project: IOTAProject);
- function NewProjectSource(const ProjectName: string): IOTAFile;
- end;
-
- TExtensionProjectSourceFile = class(TInterfacedObject, IOTAFile)
- private
- FSource: string;
- FProjectName : string;
- public
- function GetSource: string;
- function GetAge: TDateTime;
- constructor Create(const Source: string);
- constructor CreateNamedProject(AProjectName : string);
- end;
-
-const CRLF = #13#10;
-
-procedure Register;
-
-implementation
-
-{$R PHPEXT.RES}
-
-procedure Register;
-begin
- RegisterPackageWizard(TExtensionExpert.Create);
-end;
-
-function GetActiveProjectGroup: IOTAProjectGroup;
-var
- ModuleServices: IOTAModuleServices;
- i: Integer;
-
-begin
- Result := nil;
- ModuleServices := BorlandIDEServices as IOTAModuleServices;
- for i := 0 to ModuleServices.ModuleCount - 1 do
- if Succeeded(ModuleServices.Modules[i].QueryInterface(IOTAProjectGroup, Result)) then
- Break;
-end;
-
-{ TExtensionExpert }
-
-procedure TExtensionExpert.Execute;
-begin
- frmFunctions := TfrmFunctions.Create(Application);
- if frmFunctions.ShowModal = mrOK then
- begin
- (BorlandIDEServices as IOTAModuleServices).CreateModule(TExtensionProjectCreator.Create);
- end;
- frmFunctions.Free;
-end;
-
-function TExtensionExpert.GetAuthor: string;
-begin
- Result := 'Serhiy Perevoznyk';
-end;
-
-function TExtensionExpert.GetComment: string;
-begin
- Result := 'PHP Extensions builder';
-end;
-
-{$IFDEF VERSION6}
-function TExtensionExpert.GetGlyph: cardinal;
-{$ELSE}
-function TExtensionExpert.GetGlyph: HICON;
-{$ENDIF}
-begin
- Result := LoadIcon(hInstance, 'PHPEXTWIZ');
-end;
-
-function TExtensionExpert.GetIDString: string;
-begin
- Result := '7E497181-FBF6-4070-BFD8-D98522713DE3';
-end;
-
-function TExtensionExpert.GetName: string;
-begin
- Result := 'PHP Extensions Wizard';
-end;
-
-function TExtensionExpert.GetPage: string;
-begin
- Result := 'New';
-end;
-
-function TExtensionExpert.GetState: TWizardState;
-begin
- Result := [wsEnabled];
-end;
-
-{ TExtensionProjectSourceFile }
-
-constructor TExtensionProjectSourceFile.Create(const Source: string);
-begin
- FSource := Source;
-end;
-
-constructor TExtensionProjectSourceFile.CreateNamedProject(
- AProjectName: string);
-begin
- inherited Create;
- FProjectName := AProjectName;
-end;
-
-function TExtensionProjectSourceFile.GetAge: TDateTime;
-begin
- Result := -1;
-end;
-
-function TExtensionProjectSourceFile.GetSource: string;
-var
- S : string;
- I : integer;
-begin
- S := 'library ' + FProjectName + ';' + CRLF +
- '{$I PHP.INC}' + CRLF +
- 'uses' + CRLF +
- ' Windows,' + CRLF +
- ' SysUtils,' + CRLF +
- ' ZendAPI,' + CRLF +
- ' ZendTypes,' + CRLF +
- ' PHPAPI,' + CRLF +
- ' PHPTypes;' + CRLF + CRLF +
- '{$R *.RES}' + CRLF + CRLF +
-'function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
-'begin' + CRLF +
-' Result := SUCCESS;' + CRLF +
-'end;' + CRLF +
-'' + CRLF +
-'function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
-'begin' + CRLF +
-' Result := SUCCESS;' + CRLF +
-'end;' + CRLF +
-'' + CRLF +
-'procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;' + CRLF +
-'begin' + CRLF +
-' php_info_print_table_start();' + CRLF +
-' php_info_print_table_row(2, PChar(''module name''), PChar(''enabled''));' + CRLF +
-' php_info_print_table_end();' + CRLF +
-'end;' + CRLF +
-'' + CRLF +
-'function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
-'begin' + CRLF +
-' RESULT := SUCCESS;' + CRLF +
-'end;' + CRLF +
-'' + CRLF +
-'function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
-'begin' + CRLF +
-' RESULT := SUCCESS;' + CRLF +
-'end;' + CRLF +
-'' + CRLF + CRLF;
-
-for i := 0 to frmFunctions.Functions.Lines.Count - 1 do
-begin
- S := S +
-'{$IFDEF PHP510}' + CRLF +
-'procedure ' + LowerCase(frmFunctions.Functions.Lines[i])+' (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;' + CRLF +
-' return_value_used : integer; TSRMLS_DC : pointer); cdecl;' + CRLF +
-'{$ELSE}'+ CRLF +
-'procedure ' + LowerCase(frmFunctions.Functions.Lines[i])+' (ht : integer; return_value : pzval; this_ptr : pzval;' + CRLF +
-' return_value_used : integer; TSRMLS_DC : pointer); cdecl;' + CRLF +
-'{$ENDIF}'+ CRLF +
-'var'+ CRLF +
-' param : pzval_array;' + CRLF +
-'begin' + CRLF +
-' if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then' + CRLF +
-' begin' + CRLF +
-' zend_wrong_param_count(TSRMLS_DC);' + CRLF +
-' Exit;' + CRLF +
-' end;' + CRLF +
-'' + CRLF +
-' dispose_pzval_array(param);' + CRLF +
-'' + CRLF +
-'end;' + CRLF + CRLF;
-end;
-
-S := S +
-'var' + CRLF +
-' moduleEntry : Tzend_module_entry;' + CRLF +
-' module_entry_table : array[0..'+IntToStr(frmFunctions.functions.Lines.count)+'] of zend_function_entry;' + CRLF +
-'' + CRLF +
-'' + CRLF +
-'function get_module : Pzend_module_entry; cdecl;' + CRLF +
-'begin' + CRLF +
-' if not PHPLoaded then' + CRLF +
-' LoadPHP;' + CRLF +
-' ModuleEntry.size := sizeof(Tzend_module_entry);' + CRLF +
-' ModuleEntry.zend_api := ZEND_MODULE_API_NO;' + CRLF +
-' ModuleEntry.zts := USING_ZTS;' + CRLF +
-' ModuleEntry.Name := ''module name'';' + CRLF +
-' ModuleEntry.version := ''1.0'';' + CRLF +
-' ModuleEntry.module_startup_func := @minit;' + CRLF +
-' ModuleEntry.module_shutdown_func := @mshutdown;' + CRLF +
-' ModuleEntry.request_startup_func := @rinit;' + CRLF +
-' ModuleEntry.request_shutdown_func := @rshutdown;' + CRLF +
-' ModuleEntry.info_func := @php_info_module;' + CRLF +
-'' + CRLF;
-for i := 0 to frmFunctions.Functions.Lines.Count - 1 do
- begin
- S := S +
-' Module_entry_table['+IntToStr(i)+'].fname := '+ QuotedStr(LowerCase(frmFunctions.Functions.Lines[i]))+';' + CRLF +
-' Module_entry_table['+IntToStr(i)+'].handler := @'+frmFunctions.Functions.Lines[i]+';' + CRLF +
-'' + CRLF;
- end;
-S := S + ' ModuleEntry.functions := @module_entry_table[0];' + CRLF +
-' ModuleEntry._type := MODULE_PERSISTENT;' + CRLF +
-' Result := @ModuleEntry;' + CRLF +
-'end;' + CRLF +
-'' + CRLF +
-'' + CRLF +
-'exports' + CRLF +
-' get_module;' + CRLF +
-'' + CRLF +
-'end.';
-
- Result := S;
-end;
-
-{ TExtensionProjectCreator }
-
-function TExtensionProjectCreator.GetCreatorType: string;
-begin
- Result := sLibrary;
-end;
-
-function TExtensionProjectCreator.GetExisting: Boolean;
-begin
- Result := false;
-end;
-
-function TExtensionProjectCreator.GetFileName: string;
-var
- i: Integer;
- j: Integer;
- ProjGroup: IOTAProjectGroup;
- Found: Boolean;
- TempFileName: string;
- TempFileName2: string;
-begin
- Result := GetCurrentDir + '\' + 'Project%d' + '.dpr'; { do not localize }
-
- ProjGroup := GetActiveProjectGroup;
-
- if ProjGroup <> nil then
- begin
- for j := 0 to ProjGroup.ProjectCount-1 do
- begin
- Found := False;
- TempFileName2 := Format(Result, [j+1]);
-
- for i := 0 to ProjGroup.ProjectCount-1 do
- begin
- try
- TempFileName := ProjGroup.Projects[i].FileName;
- if AnsiCompareFileName(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
- begin
- Found := True;
- Break;
- end;
- except on E: Exception do
- if not (E is EIntfCastError) then
- raise;
- end;
- end;
-
- if not Found then
- begin
- Result := TempFileName2;
- Exit;
- end;
- end;
- Result := Format(Result, [ProjGroup.ProjectCount+1]);
- end
- else
- Result := Format(Result, [1]);
-end;
-
-function TExtensionProjectCreator.GetFileSystem: string;
-begin
- Result := '';
-end;
-
-function TExtensionProjectCreator.GetOptionFileName: string;
-begin
- Result := '';
-end;
-
-function TExtensionProjectCreator.GetOwner: IOTAModule;
-begin
- Result := GetActiveProjectGroup;
-end;
-
-function TExtensionProjectCreator.GetShowSource: Boolean;
-begin
- Result := true;
-end;
-
-function TExtensionProjectCreator.GetUnnamed: Boolean;
-begin
- Result := true;
-end;
-
-procedure TExtensionProjectCreator.NewDefaultModule;
-begin
-
-end;
-
-function TExtensionProjectCreator.NewOptionSource(
- const ProjectName: string): IOTAFile;
-begin
- Result := nil;
-end;
-
-procedure TExtensionProjectCreator.NewProjectResource(
- const Project: IOTAProject);
-begin
-
-end;
-
-function TExtensionProjectCreator.NewProjectSource(
- const ProjectName: string): IOTAFile;
-begin
- Result := TExtensionProjectSourceFile.CreateNamedProject(ProjectName) as IOTAFile;
-end;
-
-end.
+{$I Builder.INC}
+unit phpExtensionBuilder;
+
+interface
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs,
+ {$IFDEF VERSION6}
+ DesignIntf,
+ DesignEditors,
+ DMForm,
+ {$ELSE}
+ dsgnintf,
+ dmdesigner,
+ {$ENDIF}
+ ToolsAPI,
+ frm_functions;
+
+type
+
+ TExtensionExpert = class(TNotifierObject, IOTAWizard, IOTARepositoryWizard, IOTAFormWizard)
+ public
+ // IOTAWizard
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+ // IOTARepositoryWizard
+ function GetAuthor: string;
+ function GetComment: string;
+ function GetPage: string;
+ {$IFDEF VERSION6}
+ function GetGlyph : cardinal;
+ {$ELSE}
+ function GetGlyph: HICON;
+ {$ENDIF}
+ end;
+
+ TExtensionProjectCreator = class(TInterfacedObject, IOTACreator, IOTAProjectCreator)
+ public
+ // IOTACreator
+ function GetCreatorType: string;
+ function GetExisting: Boolean;
+ function GetFileSystem: string;
+ function GetOwner: IOTAModule;
+ function GetUnnamed: Boolean;
+ // IOTAProjectCreator
+ function GetFileName: string;
+ function GetOptionFileName: string;
+ function GetShowSource: Boolean;
+ procedure NewDefaultModule;
+ function NewOptionSource(const ProjectName: string): IOTAFile;
+ procedure NewProjectResource(const Project: IOTAProject);
+ function NewProjectSource(const ProjectName: string): IOTAFile;
+ end;
+
+ TExtensionProjectSourceFile = class(TInterfacedObject, IOTAFile)
+ private
+ FSource: string;
+ FProjectName : string;
+ public
+ function GetSource: string;
+ function GetAge: TDateTime;
+ constructor Create(const Source: string);
+ constructor CreateNamedProject(AProjectName : string);
+ end;
+
+const CRLF = #13#10;
+
+procedure Register;
+
+implementation
+
+{$R PHPEXT.RES}
+
+procedure Register;
+begin
+ RegisterPackageWizard(TExtensionExpert.Create);
+end;
+
+function GetActiveProjectGroup: IOTAProjectGroup;
+var
+ ModuleServices: IOTAModuleServices;
+ i: Integer;
+
+begin
+ Result := nil;
+ ModuleServices := BorlandIDEServices as IOTAModuleServices;
+ for i := 0 to ModuleServices.ModuleCount - 1 do
+ if Succeeded(ModuleServices.Modules[i].QueryInterface(IOTAProjectGroup, Result)) then
+ Break;
+end;
+
+{ TExtensionExpert }
+
+procedure TExtensionExpert.Execute;
+begin
+ frmFunctions := TfrmFunctions.Create(Application);
+ if frmFunctions.ShowModal = mrOK then
+ begin
+ (BorlandIDEServices as IOTAModuleServices).CreateModule(TExtensionProjectCreator.Create);
+ end;
+ frmFunctions.Free;
+end;
+
+function TExtensionExpert.GetAuthor: string;
+begin
+ Result := 'Serhiy Perevoznyk';
+end;
+
+function TExtensionExpert.GetComment: string;
+begin
+ Result := 'PHP Extensions builder';
+end;
+
+{$IFDEF VERSION6}
+function TExtensionExpert.GetGlyph: cardinal;
+{$ELSE}
+function TExtensionExpert.GetGlyph: HICON;
+{$ENDIF}
+begin
+ Result := LoadIcon(hInstance, 'PHPEXTWIZ');
+end;
+
+function TExtensionExpert.GetIDString: string;
+begin
+ Result := '7E497181-FBF6-4070-BFD8-D98522713DE3';
+end;
+
+function TExtensionExpert.GetName: string;
+begin
+ Result := 'PHP Extensions Wizard';
+end;
+
+function TExtensionExpert.GetPage: string;
+begin
+ Result := 'New';
+end;
+
+function TExtensionExpert.GetState: TWizardState;
+begin
+ Result := [wsEnabled];
+end;
+
+{ TExtensionProjectSourceFile }
+
+constructor TExtensionProjectSourceFile.Create(const Source: string);
+begin
+ FSource := Source;
+end;
+
+constructor TExtensionProjectSourceFile.CreateNamedProject(
+ AProjectName: string);
+begin
+ inherited Create;
+ FProjectName := AProjectName;
+end;
+
+function TExtensionProjectSourceFile.GetAge: TDateTime;
+begin
+ Result := -1;
+end;
+
+function TExtensionProjectSourceFile.GetSource: string;
+var
+ S : string;
+ I : integer;
+begin
+ S := 'library ' + FProjectName + ';' + CRLF +
+ '{$I PHP.INC}' + CRLF +
+ 'uses' + CRLF +
+ ' Windows,' + CRLF +
+ ' SysUtils,' + CRLF +
+ ' ZendAPI,' + CRLF +
+ ' ZendTypes,' + CRLF +
+ ' PHPAPI,' + CRLF +
+ ' PHPTypes;' + CRLF + CRLF +
+ '{$R *.RES}' + CRLF + CRLF +
+'function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
+'begin' + CRLF +
+' Result := SUCCESS;' + CRLF +
+'end;' + CRLF +
+'' + CRLF +
+'function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
+'begin' + CRLF +
+' Result := SUCCESS;' + CRLF +
+'end;' + CRLF +
+'' + CRLF +
+'procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;' + CRLF +
+'begin' + CRLF +
+' php_info_print_table_start();' + CRLF +
+' php_info_print_table_row(2, PChar(''module name''), PChar(''enabled''));' + CRLF +
+' php_info_print_table_end();' + CRLF +
+'end;' + CRLF +
+'' + CRLF +
+'function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
+'begin' + CRLF +
+' RESULT := SUCCESS;' + CRLF +
+'end;' + CRLF +
+'' + CRLF +
+'function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;' + CRLF +
+'begin' + CRLF +
+' RESULT := SUCCESS;' + CRLF +
+'end;' + CRLF +
+'' + CRLF + CRLF;
+
+for i := 0 to frmFunctions.Functions.Lines.Count - 1 do
+begin
+ S := S +
+'{$IFDEF PHP510}' + CRLF +
+'procedure ' + LowerCase(frmFunctions.Functions.Lines[i])+' (ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;' + CRLF +
+' return_value_used : integer; TSRMLS_DC : pointer); cdecl;' + CRLF +
+'{$ELSE}'+ CRLF +
+'procedure ' + LowerCase(frmFunctions.Functions.Lines[i])+' (ht : integer; return_value : pzval; this_ptr : pzval;' + CRLF +
+' return_value_used : integer; TSRMLS_DC : pointer); cdecl;' + CRLF +
+'{$ENDIF}'+ CRLF +
+'var'+ CRLF +
+' param : pzval_array;' + CRLF +
+'begin' + CRLF +
+' if ( not (zend_get_parameters_ex(ht, Param) = SUCCESS )) then' + CRLF +
+' begin' + CRLF +
+' zend_wrong_param_count(TSRMLS_DC);' + CRLF +
+' Exit;' + CRLF +
+' end;' + CRLF +
+'' + CRLF +
+' dispose_pzval_array(param);' + CRLF +
+'' + CRLF +
+'end;' + CRLF + CRLF;
+end;
+
+S := S +
+'var' + CRLF +
+' moduleEntry : Tzend_module_entry;' + CRLF +
+' module_entry_table : array[0..'+IntToStr(frmFunctions.functions.Lines.count)+'] of zend_function_entry;' + CRLF +
+'' + CRLF +
+'' + CRLF +
+'function get_module : Pzend_module_entry; cdecl;' + CRLF +
+'begin' + CRLF +
+' if not PHPLoaded then' + CRLF +
+' LoadPHP;' + CRLF +
+' ModuleEntry.size := sizeof(Tzend_module_entry);' + CRLF +
+' ModuleEntry.zend_api := ZEND_MODULE_API_NO;' + CRLF +
+' ModuleEntry.zts := USING_ZTS;' + CRLF +
+' ModuleEntry.Name := ''module name'';' + CRLF +
+' ModuleEntry.version := ''1.0'';' + CRLF +
+' ModuleEntry.module_startup_func := @minit;' + CRLF +
+' ModuleEntry.module_shutdown_func := @mshutdown;' + CRLF +
+' ModuleEntry.request_startup_func := @rinit;' + CRLF +
+' ModuleEntry.request_shutdown_func := @rshutdown;' + CRLF +
+' ModuleEntry.info_func := @php_info_module;' + CRLF +
+'' + CRLF;
+for i := 0 to frmFunctions.Functions.Lines.Count - 1 do
+ begin
+ S := S +
+' Module_entry_table['+IntToStr(i)+'].fname := '+ QuotedStr(LowerCase(frmFunctions.Functions.Lines[i]))+';' + CRLF +
+' Module_entry_table['+IntToStr(i)+'].handler := @'+frmFunctions.Functions.Lines[i]+';' + CRLF +
+'' + CRLF;
+ end;
+S := S + ' ModuleEntry.functions := @module_entry_table[0];' + CRLF +
+' ModuleEntry._type := MODULE_PERSISTENT;' + CRLF +
+' Result := @ModuleEntry;' + CRLF +
+'end;' + CRLF +
+'' + CRLF +
+'' + CRLF +
+'exports' + CRLF +
+' get_module;' + CRLF +
+'' + CRLF +
+'end.';
+
+ Result := S;
+end;
+
+{ TExtensionProjectCreator }
+
+function TExtensionProjectCreator.GetCreatorType: string;
+begin
+ Result := sLibrary;
+end;
+
+function TExtensionProjectCreator.GetExisting: Boolean;
+begin
+ Result := false;
+end;
+
+function TExtensionProjectCreator.GetFileName: string;
+var
+ i: Integer;
+ j: Integer;
+ ProjGroup: IOTAProjectGroup;
+ Found: Boolean;
+ TempFileName: string;
+ TempFileName2: string;
+begin
+ Result := GetCurrentDir + '\' + 'Project%d' + '.dpr'; { do not localize }
+
+ ProjGroup := GetActiveProjectGroup;
+
+ if ProjGroup <> nil then
+ begin
+ for j := 0 to ProjGroup.ProjectCount-1 do
+ begin
+ Found := False;
+ TempFileName2 := Format(Result, [j+1]);
+
+ for i := 0 to ProjGroup.ProjectCount-1 do
+ begin
+ try
+ TempFileName := ProjGroup.Projects[i].FileName;
+ if {$IFDEF PHP550}CompareFileName{$ELSE}AnsiCompareFileName{$ENDIF}(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
+ begin
+ Found := True;
+ Break;
+ end;
+ except on E: Exception do
+ if not (E is EIntfCastError) then
+ raise;
+ end;
+ end;
+
+ if not Found then
+ begin
+ Result := TempFileName2;
+ Exit;
+ end;
+ end;
+ Result := Format(Result, [ProjGroup.ProjectCount+1]);
+ end
+ else
+ Result := Format(Result, [1]);
+end;
+
+function TExtensionProjectCreator.GetFileSystem: string;
+begin
+ Result := '';
+end;
+
+function TExtensionProjectCreator.GetOptionFileName: string;
+begin
+ Result := '';
+end;
+
+function TExtensionProjectCreator.GetOwner: IOTAModule;
+begin
+ Result := GetActiveProjectGroup;
+end;
+
+function TExtensionProjectCreator.GetShowSource: Boolean;
+begin
+ Result := true;
+end;
+
+function TExtensionProjectCreator.GetUnnamed: Boolean;
+begin
+ Result := true;
+end;
+
+procedure TExtensionProjectCreator.NewDefaultModule;
+begin
+
+end;
+
+function TExtensionProjectCreator.NewOptionSource(
+ const ProjectName: string): IOTAFile;
+begin
+ Result := nil;
+end;
+
+procedure TExtensionProjectCreator.NewProjectResource(
+ const Project: IOTAProject);
+begin
+
+end;
+
+function TExtensionProjectCreator.NewProjectSource(
+ const ProjectName: string): IOTAFile;
+begin
+ Result := TExtensionProjectSourceFile.CreateNamedProject(ProjectName) as IOTAFile;
+end;
+
+end.
diff --git a/Source/PHP.INC b/Source/PHP.INC
new file mode 100644
index 0000000..6b8aca2
--- /dev/null
+++ b/Source/PHP.INC
@@ -0,0 +1,257 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ https://users.chello.be/ws36637 }
+{ https://delphi32.blogspot.com }
+{*******************************************************}
+
+{ $Id: PHP.INC,v 7.4 07/2020 delphi32 Exp $ }
+
+{IMPORTANT:
+Define suitable PHP version, the table is represented below:
+| Version | Directive |
+ 5.0 $DEFINE PHP5
+ 5.0.4 $DEFINE PHP504
+ 5.1.0 $DEFINE PHP510
+ 5.1.1 $DEFINE PHP511
+ 5.1.2 $DEFINE PHP512
+ 5.2 $DEFINE PHP520
+ 5.3 $DEFINE PHP530
+ 5.4 $DEFINE PHP540
+ 5.5 $DEFINE PHP550
+ 5.6 $DEFINE PHP560
+ 7.0 $DEFINE PHP7
+ 7.1 $DEFINE PHP710
+
+Define suitable visual library
+| Library | Directive |
+ VCL $DEFINE VCL
+ FMX $DEFINE FMX
+}
+
+//Version
+//{$DEFINE PHP520}
+{$DEFINE PHP560}
+ //PHP Version
+{$DEFINE COMPILER_VC6}
+ //Compiler Version
+{$DEFINE ZTS}
+ //Thread Safe mode (php7ts, e.g)
+{$DEFINE VCL}
+ //visual library - Kylix, VCL, FMX for Delphi and LCL, fpGUI for Lazarus
+
+//Features
+{$DEFINE PHP_UNICODE}
+ //PHP unicode support *Enables WideString and UnicodeString
+{.$DEFINE REGISTER_COLOURS}
+ //constants for Delphi colours
+{.$DEFINE php_side_handler}
+ //enable ability to define own error handler from php side ~NON_TC
+{.$DEFINE QUIET_LOAD}
+ //Do not show errors while loading php library
+{.$DEFINE PHP4DELPHI_AUTOLOAD}
+ //Load php library at initialization
+{.$DEFINE PHP4DELPHI_AUTOUNLOAD}
+ // Unload php library at finalization
+
+//Compiler switches
+{.$DEFINE COMPILER_php7pv}
+ // use macroses from PHP sources patch
+ // https://github.com/resistancelion/no-name-engine/tree/master/php-src
+{.$DEFINE PHP_DEBUG}
+ //use debug libraries (php7debug, f.e)
+
+
+
+
+
+
+
+
+
+
+
+
+
+//E N D
+{$WARN UNIT_DEPRECATED OFF}
+{$IFDEF PHP_UNICODE} {$DEFINE UNICODE} {$ENDIF}
+
+{$IFDEF PHP710} {$DEFINE PHP700} {$ENDIF}
+{$IFDEF PHP700} {$DEFINE PHP7} {$ENDIF}
+
+{$IFDEF PHP7} {$DEFINE PHP560} {$ENDIF}
+{$IFDEF PHP560} {$DEFINE PHP550} {$ENDIF}
+{$IFDEF PHP550} {$DEFINE PHP540} {$ENDIF}
+{$IFDEF PHP540} {$DEFINE PHP530} {$ENDIF}
+{$IFDEF PHP530}
+ {$DEFINE PHP520}
+ {$DEFINE ZEND_WIN32}
+ {$DEFINE PHP_COMPILER_ID}
+{$ENDIF}
+{$IFDEF PHP520} {$DEFINE PHP512} {$ENDIF}
+{$IFDEF PHP512} {$DEFINE PHP511} {$ENDIF}
+{$IFDEF PHP511} {$DEFINE PHP510} {$ENDIF}
+{$IFDEF PHP510} {$DEFINE PHP504} {$ENDIF}
+{$IFDEF PHP504} {$DEFINE PHP5} {$ENDIF}
+{$IFDEF PHP_COMPILER_ID}
+ {$IFNDEF PHP7}
+ {$IFDEF PHP550} {$DEFINE COMPILER_VC11} {$ENDIF}
+ {$ELSE}
+ {$DEFINE COMPILER_VC14}
+ {$ENDIF}
+{$ENDIF}
+
+
+{$ifdef FPC}
+ {$DEFINE VERSION1}
+ {$DEFINE VERSION2}
+ {$DEFINE VERSION3}
+ {$DEFINE VERSION4}
+ {$DEFINE VERSION5}
+ {$DEFINE VERSION6}
+ {$DEFINE VERSION7}
+ {$DEFINE VERSION8}
+ {$DEFINE VERSION9}
+ {$DEFINE VERSION10}
+ {$DEFINE VERSION11}
+ {$DEFINE VERSION12}
+ {$DEFINE VERSION13}
+ {$DEFINE VERSION14}
+{$else}
+ {$if CompilerVersion > 25}
+ {$LEGACYIFEND ON}
+ {$ifend}
+{$endif}
+
+{$IFNDEF VER80} {Delphi 1.0}
+ {$DEFINE VERSION2} {Delphi 2.0 and BCB 1 or higher}
+{$ENDIF}
+
+{$IFDEF VERSION2}
+ {$IFNDEF VER90} {Delphi 2.0}
+ {$IFNDEF VER93} {BCB 1.0}
+ {$DEFINE VERSION3} {Delphi 3.0 or BCB 3.0}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION3}
+ {$IFNDEF VER100} {Delphi 3}
+ {$IFNDEF VER110} {BCB 3}
+ {$DEFINE VERSION4} {Delphi 4.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION4}
+ {$IFNDEF VER120} {Delphi 4}
+ {$IFNDEF VER125} {BCB 4}
+ {$DEFINE VERSION5} {Delphi 5.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION5}
+ {$IFNDEF VER130} {Delphi 5}
+ {$IFNDEF VER135} {BCB 5}
+ {$DEFINE VERSION6} {Delphi 6.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION6}
+ {$IFNDEF VER140} {Delphi 6}
+ {$IFNDEF VER145} {BCB 6}
+ {$DEFINE VERSION7} {Delphi 7.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION7}
+ {$IFNDEF VER150} {Delphi 7}
+ {$DEFINE VERSION9} {Delphi 2005}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION9}
+ {$IFNDEF VER170} {Delphi 2005}
+ {$DEFINE VERSION10} {Delphi 2006}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION10}
+ {$IFNDEF VER180} {Delphi 2006}
+ {$DEFINE VERSION11} {Delphi 2007}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION11}
+ {$IFNDEF VER185} {Delphi 2007}
+ {$DEFINE VERSION12} {Delphi 2009}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION12}
+ {$IFNDEF VERSION20}
+ {$DEFINE VERSION13} {Delphi 2010}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFNDEF VER180}
+ {$DEFINE OLD_PATHS}
+{$ENDIF}
+
+{$IFDEF VERSION12}
+ {$DEFINE WSTR}
+{$ELSE}
+ {$IFDEF PHP_UNICODE} {$UNDEF PHP_UNICODE} {$ENDIF}
+{$ENDIF}
+
+
+{$IFDEF VERSION6}
+ {$WARN SYMBOL_PLATFORM OFF}
+ {$IFDEF VERSION7}
+ {$WARN UNIT_PLATFORM OFF}
+ {$WARN UNSAFE_CODE OFF}
+ {$WARN UNSAFE_TYPE OFF}
+ {$WARN UNSAFE_CAST OFF}
+ {$WARN UNIT_DEPRECATED OFF}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION5}
+ {$IFNDEF VERSION6}
+ {$DEFINE VERSION5ONLY}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VERSION6}
+{$A8}
+{$ELSE}
+{$A+}
+{$ENDIF}
+
+
+{$IFDEF VERSION7}
+{$J+}
+{$WARNINGS OFF}
+{$ENDIF}
+
+{$IFDEF MSWINDOWS} {$DEFINE WINDOWS} {$ENDIF}
+{$IFDEF FPC}
+ {$IFDEF FMX} {$UNDEF FMX} {$ENDIF}
+ {$IFDEF VCL} {$UNDEF VCL} {$ENDIF}
+ {$DEFINE LCL}
+{$ELSE}
+ {$UNDEF LCL}
+ {$IFDEF WINDOWS}
+ {$DEFINE VCL}
+ {$ELSE}
+ {$DEFINE KYLIX}
+ {$ENDIF}
+{$ENDIF}
diff --git a/Source/PHP4DelphiD2006.bdsproj b/Source/PHP4DelphiD2006.bdsproj
new file mode 100644
index 0000000..afccaea
--- /dev/null
+++ b/Source/PHP4DelphiD2006.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {C73D9AE1-F5DB-47DF-A699-3A1D775350AD}
+
+
+
+
+ PHP4DelphiD2006.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ php4Delphi (design-time)
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/PHP4DelphiD2006.dpk b/Source/PHP4DelphiD2006.dpk
similarity index 84%
rename from PHP4DelphiD2006.dpk
rename to Source/PHP4DelphiD2006.dpk
index b3e773f..2ff391a 100644
--- a/PHP4DelphiD2006.dpk
+++ b/Source/PHP4DelphiD2006.dpk
@@ -1,45 +1,48 @@
-package php4DelphiD2006;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (design-time)'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl,
- designide,
- vclactnband,
- vclx,
- php4DelphiR2006;
-
-contains
- PHPProjectWizard in 'PHPProjectWizard.pas',
- php4DelphiReg in 'php4DelphiReg.pas',
- php4DelphiWeb in 'php4DelphiWeb.pas',
- phpWeb in 'phpWeb.pas',
- phpAbout in 'phpAbout.pas' {dlgAbout};
-
-end.
+package php4DelphiD2006;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2006;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/PHP4DelphiD2006.dproj b/Source/PHP4DelphiD2006.dproj
new file mode 100644
index 0000000..ed2309b
--- /dev/null
+++ b/Source/PHP4DelphiD2006.dproj
@@ -0,0 +1,125 @@
+
+
+ {C73D9AE1-F5DB-47DF-A699-3A1D775350AD}
+ PHP4DelphiD2006.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ PHP4DelphiD2006
+ 1
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ false
+ php4Delphi (design-time)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ false
+ true
+ 2057
+ true
+ true
+ true
+
+
+ PHP4DelphiD2006_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ PHP4DelphiD2006_Icon.ico
+
+
+ false
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ PHP4DelphiD2006.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/PHP4DelphiD2006.res b/Source/PHP4DelphiD2006.res
similarity index 100%
rename from PHP4DelphiD2006.res
rename to Source/PHP4DelphiD2006.res
diff --git a/Source/PHP4DelphiD2006_Icon.ico b/Source/PHP4DelphiD2006_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/PHP4DelphiD2006_Icon.ico differ
diff --git a/Source/PHPAPI.pas b/Source/PHPAPI.pas
new file mode 100644
index 0000000..fefeccc
--- /dev/null
+++ b/Source/PHPAPI.pas
@@ -0,0 +1,767 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: PHPAPI.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpAPI;
+
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+
+interface
+
+uses
+ {Windows} SysUtils,
+ {$IFDEF FPC}
+ dynlibs
+ {$ELSE}
+ Windows
+ {$ENDIF},
+
+ ZendTypes,
+ PHPTypes, zendAPI,
+
+
+ {$IFDEF VERSION6}Variants{$ENDIF}{WinSock};
+
+
+{$IFNDEF VERSION11}
+const
+ varUString = $0102; { Unicode string 258 } {not OLE compatible}
+{$ENDIF}
+{$IFDEF PHP540}
+ procedure php_start_implicit_flush(TSRMLS_D : pointer);
+ procedure php_end_implicit_flush(TSRMLS_D : pointer);
+const
+ PHP_OUTPUT_HANDLER_CLEANABLE = 16;
+ PHP_OUTPUT_HANDLER_FLUSHABLE = 32;
+ PHP_OUTPUT_HANDLER_REMOVABLE = 64;
+
+ PHP_IMPLICIT_FLUSH_START = 1;
+ PHP_IMPLICIT_FLUSH_END = 0;
+{$ENDIF}
+var
+ php_request_startup: function(TSRMLS_D : pointer) : Integer; cdecl;
+ php_request_shutdown: procedure(dummy : Pointer); cdecl;
+ php_module_startup: function(sf : pointer; additional_modules : pointer; num_additional_modules : uint) : Integer; cdecl;
+ php_module_shutdown: procedure(TSRMLS_D : pointer); cdecl;
+ php_module_shutdown_wrapper: function (globals : pointer) : Integer; cdecl;
+
+ sapi_startup: procedure (module : pointer); cdecl;
+ sapi_shutdown: procedure; cdecl;
+
+ sapi_activate: procedure (p : pointer); cdecl;
+ sapi_deactivate: procedure (p : pointer); cdecl;
+
+ sapi_add_header_ex: function(header_line : zend_pchar; header_line_len : uint; duplicated : zend_bool; replace : zend_bool; TSRMLS_DC : pointer) : integer; cdecl;
+
+ php_execute_script : function (primary_file: PZendFileHandle; TSRMLS_D : pointer) : longint; cdecl;
+
+ php_handle_aborted_connection: procedure; cdecl;
+
+ php_register_variable: procedure(_var : zend_pchar; val: zend_pchar; track_vars_array: pointer; TSRMLS_DC : pointer); cdecl;
+
+ // binary-safe version
+ php_register_variable_safe: procedure(_var : zend_pchar; val : zend_pchar; val_len : integer; track_vars_array : pointer; TSRMLS_DC : pointer); cdecl;
+ php_register_variable_ex: procedure(_var : zend_pchar; val : pzval; track_vars_array : pointer; TSRMLS_DC : pointer); cdecl;
+
+//php_output.h
+ php_output_startup: procedure(); cdecl;
+ php_output_shutdown: procedure(); cdecl;
+ php_output_activate: procedure (TSRMLS_D : pointer); cdecl;
+ php_output_deactivate: procedure (TSRMLS_D : pointer); cdecl;
+ php_output_register_constants: procedure (TSRMLS_D : pointer); cdecl;
+ {$IFDEF PHP540}
+ php_output_set_status: procedure(status: integer; TSRMLS_DC : pointer); cdecl;
+ php_output_get_status: function(TSRMLS_DC : pointer) : integer; cdecl;
+ php_output_get_start_filename: function (TSRMLS_D : pointer) : zend_pchar; cdecl;
+ php_output_get_start_lineno: function (TSRMLS_D : pointer) : integer; cdecl;
+ php_output_start_default: function (TSRMLS_D : pointer) : integer; cdecl;
+
+ php_start_ob_buffer: function (output_handler : pzval; chunk_size : uint; flags:uint; TSRMLS_DC : pointer) : integer; cdecl;
+ php_start_ob_buffer_named: function (const output_handler_name : zend_pchar; chunk_size : uint; flags:uint; TSRMLS_DC : pointer) : integer; cdecl;
+
+ php_end_ob_buffer: function (TSRMLS_DC : pointer): integer; cdecl;
+ php_end_ob_buffers: procedure (TSRMLS_DC : pointer); cdecl;
+ php_ob_get_buffer: function (p : pzval; TSRMLS_DC : pointer) : integer; cdecl;
+ php_ob_get_length: function (p : pzval; TSRMLS_DC : pointer) : integer; cdecl;
+
+ php_output_set_implicit_flush: procedure(flush: uint; TSRMLS_DS: pointer); cdecl;
+ php_get_output_start_filename: function (TSRMLS_D : pointer) : zend_pchar; cdecl;
+ php_get_output_start_lineno: function (TSRMLS_D : pointer) : integer; cdecl;
+
+ php_output_handler_started: function (name: zend_pchar; name_len: uint): integer; cdecl;
+
+ php_ob_init_conflict: function (handler_new : zend_pchar; handler_new_len: uint;
+ handler_set : zend_pchar; handler_set_len: uint; TSRMLS_DC : pointer) : integer; cdecl;
+
+ {$ELSE}
+ php_output_set_status: procedure(status: boolean; TSRMLS_DC : pointer); cdecl;
+ php_output_get_status: function(TSRMLS_DC : pointer) : boolean; cdecl;
+ php_start_ob_buffer: function (output_handler : pzval; chunk_size : uint; erase : boolean; TSRMLS_DC : pointer) : integer; cdecl;
+ php_start_ob_buffer_named: function (const output_handler_name : zend_pchar; chunk_size : uint; erase : boolean; TSRMLS_DC : pointer) : integer; cdecl;
+ php_end_ob_buffer: procedure (send_buffer : boolean; just_flush : boolean; TSRMLS_DC : pointer); cdecl;
+ php_end_ob_buffers: procedure (send_buffer : boolean; TSRMLS_DC : pointer); cdecl;
+ php_ob_get_buffer: function (p : pzval; TSRMLS_DC : pointer) : integer; cdecl;
+ php_ob_get_length: function (p : pzval; TSRMLS_DC : pointer) : integer; cdecl;
+ php_start_implicit_flush: procedure (TSRMLS_D : pointer); cdecl;
+ php_end_implicit_flush: procedure (TSRMLS_D : pointer); cdecl;
+ php_get_output_start_filename: function (TSRMLS_D : pointer) : zend_pchar; cdecl;
+ php_get_output_start_lineno: function (TSRMLS_D : pointer) : integer; cdecl;
+ php_ob_handler_used: function (handler_name : zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
+ {$IF not defined(PHP520) and not Defined(PHP540) and not Defined(PHP550) and not Defined(PHP560)}
+ php_ob_init_conflict: function (handler_new : zend_pchar; handler_set : zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
+ {$ifend}
+ {$endif}
+
+//php_output.h
+
+
+
+function GetSymbolsTable : PHashTable;
+function GetTrackHash(Name : zend_ustr) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+function GetSAPIGlobals : Psapi_globals_struct; overload;
+function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct; overload;
+//procedure phperror(Error : zend_pchar);
+
+var
+
+php_default_post_reader : procedure;
+
+//php_string.h
+php_strtoupper: function (s : zend_pchar; len : size_t) : zend_pchar; cdecl;
+php_strtolower: function (s : zend_pchar; len : size_t) : zend_pchar; cdecl;
+
+php_strtr: function (str : zend_pchar; len : Integer; str_from : zend_pchar;
+ str_to : zend_pchar; trlen : Integer) : zend_pchar; cdecl;
+
+php_stripcslashes: procedure (str : zend_pchar; len : PInteger); cdecl;
+
+php_basename: function (str : zend_pchar; len : size_t; suffix : zend_pchar;
+ sufflen : size_t) : zend_pchar; cdecl;
+
+php_dirname: procedure (str : zend_pchar; len : Integer); cdecl;
+
+php_stristr: function (s : PByte; t : PByte; s_len : size_t; t_len : size_t) : zend_pchar; cdecl;
+
+php_str_to_str: function (haystack : zend_pchar; length : Integer; needle : zend_pchar;
+ needle_len : Integer; str : zend_pchar; str_len : Integer;
+ _new_length : PInteger) : zend_pchar; cdecl;
+
+php_strip_tags: procedure (rbuf : zend_pchar; len : Integer; state : PInteger;
+ allow : zend_pchar; allow_len : Integer); cdecl;
+
+php_implode: procedure (var delim : zval; var arr : zval;
+ var return_value : zval); cdecl;
+
+php_explode: procedure (var delim : zval; var str : zval;
+ var return_value : zval; limit : Integer); cdecl;
+
+
+var
+
+php_info_html_esc: function (str : zend_pchar; TSRMLS_DC : pointer) : zend_pchar; cdecl;
+
+php_print_info_htmlhead: procedure (TSRMLS_D : pointer); cdecl;
+
+
+
+{$IFNDEF COMPILER_php7pv}
+php_log_err: procedure (err_msg : zend_pchar; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+php_html_puts: procedure (str : zend_pchar; str_len : integer; TSRMLS_DC : pointer); cdecl;
+
+_php_error_log: function (opt_err : integer; msg : zend_pchar; opt: zend_pchar; headers: zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
+
+php_print_credits: procedure (flag : integer); cdecl;
+
+php_info_print_css: procedure(); cdecl;
+
+php_set_sock_blocking: function (socketd : integer; block : integer; TSRMLS_DC : pointer) : integer; cdecl;
+php_copy_file: function (src : zend_pchar; dest : zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
+
+var
+php_escape_html_entities: function (old : PByte; oldlen : integer; newlen : PINT; all : integer;
+ quote_style : integer; hint_charset: zend_pchar; TSRMLS_DC : pointer) : zend_pchar; cdecl;
+
+var
+php_ini_long: function (name : zend_pchar; name_length : uint; orig : Integer) : Longint; cdecl;
+
+php_ini_double: function(name : zend_pchar; name_length : uint; orig : Integer) : Double; cdecl;
+
+php_ini_string: function(name : zend_pchar; name_length : uint; orig : Integer) : zend_pchar; cdecl;
+var
+
+php_url_free: procedure (theurl : pphp_url); cdecl;
+php_url_parse: function (str : zend_pchar) : pphp_url; cdecl;
+php_url_decode: function (str : zend_pchar; len : Integer) : Integer; cdecl;
+ { return value: length of decoded string }
+
+php_raw_url_decode: function (str : zend_pchar; len : Integer) : Integer; cdecl;
+ { return value: length of decoded string }
+
+php_url_encode: function (s : zend_pchar; len : Integer; new_length : PInteger) : zend_pchar; cdecl;
+
+php_raw_url_encode: function (s : zend_pchar; len : Integer; new_length : PInteger) : zend_pchar; cdecl;
+
+php_register_extensions: function (ptr : PPzend_module_entry; count: integer; TSRMLS_DC: pointer) : integer; cdecl;
+php_error_docref0: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; _type : integer; const Msg : zend_pchar); cdecl;
+php_error_docref: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; _type : integer; const Msg : zend_pchar); cdecl;
+
+php_error_docref1: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; const param1 : zend_pchar; _type: integer; Msg : zend_pchar); cdecl;
+php_error_docref2: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; const param1 : zend_pchar; const param2 : zend_pchar; _type : integer; Msg : zend_pchar); cdecl;
+
+sapi_globals_id : pointer;
+core_globals_id : pointer;
+
+function GetPostVariables: pzval;
+function GetGetVariables : pzval;
+function GetServerVariables : pzval;
+function GetEnvVariables : pzval;
+function GetFilesVariables : pzval;
+
+function GetPHPGlobals(TSRMLS_DC : pointer) : Pphp_Core_Globals;
+//function PG(TSRMLS_DC : pointer) : Pphp_Core_Globals;
+
+
+procedure PHP_FUNCTION(var AFunction : zend_function_entry; AName : zend_pchar; AHandler : pointer);
+
+function LoadPHP(const LibraryPath: zend_ustr = PHPlp) : boolean;
+
+procedure UnloadPHP;
+
+function PHPLoaded : boolean;
+
+function FloatToValue(Value: Extended): zend_ustr;
+function ValueToFloat(Value : zend_ustr) : extended;
+
+
+var
+//Info.h
+php_print_info: procedure (flag : Integer; TSRMLS_DC : pointer); cdecl;
+
+
+php_info_print_table_colspan_header: procedure (num_cols : Integer;
+ header : zend_pchar); cdecl;
+
+php_info_print_box_start: procedure (bg : Integer); cdecl;
+
+php_info_print_box_end: procedure; cdecl;
+
+php_info_print_hr: procedure; cdecl;
+
+php_info_print_table_start: procedure; cdecl;
+php_info_print_table_row1: procedure(n1 : integer; c1: zend_pchar); cdecl;
+php_info_print_table_row2: procedure (n2 : integer; c1, c2 : zend_pchar); cdecl;
+php_info_print_table_row3: procedure (n3 : integer; c1, c2, c3 : zend_pchar); cdecl;
+php_info_print_table_row4: procedure (n4 : integer; c1, c2, c3, c4 : zend_pchar); cdecl;
+php_info_print_table_row : procedure (n2 : integer; c1, c2 : zend_pchar); cdecl;
+
+php_info_print_table_end: procedure (); cdecl;
+{$IF defined(PHP520) Defined(PHP540) or Defined(PHP550) or Defined(PHP560)}
+php_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
+{$ELSE}
+php_body_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
+php_header_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
+{$ifend}
+
+php_header: function(TSRMLS_D: pointer) : integer; cdecl;
+php_setcookie: function (name : zend_pchar; name_len : integer; value : zend_pchar; value_len: integer;
+ expires : longint; path : zend_pchar; path_len : integer; domain : zend_pchar; domain_len : integer;
+ secure : integer; TSRMLS_DC : pointer) : integer; cdecl;
+
+
+
+
+
+type
+ TPHPFileInfo = record
+ MajorVersion: Word;
+ MinorVersion: Word;
+ Release:Word;
+ Build:Word;
+ end;
+
+function GetPHPVersion: TPHPFileInfo;
+
+
+implementation
+
+function PHPLoaded : boolean;
+begin
+ Result := PHPLib <> 0;
+end;
+
+procedure UnloadPHP;
+var
+ H : THandle;
+ vt: Integer;
+begin
+ vt := integer(PHPLib);
+ H := InterlockedExchange(vt, 0);
+ if H > 0 then
+ begin
+ FreeLibrary(H);
+ end;
+end;
+
+function GetSymbolsTable : PHashTable;
+begin
+ Result := @GetExecutorGlobals.symbol_table;
+end;
+
+function GetTrackHash(Name : zend_ustr) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+var
+ data : ^ppzval;
+ arr : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ ret : integer;
+begin
+ Result := nil;
+ arr := GetSymbolsTable;
+ if Assigned(Arr) then
+ begin
+ new(data);
+ ret := zend_hash_find(arr, zend_pchar(Name), Length(Name)+1, Data);
+ if ret = SUCCESS then
+ begin
+ Result := {$IFDEF PHP7}data^^^.value.arr{$ELSE}data^^^.value.ht{$ENDIF};
+ end;
+ end;
+end;
+
+
+function GetSAPIGlobals : Psapi_globals_struct;
+begin
+ Result := nil;
+ if Assigned(sapi_globals_id) then
+ Result := __fgsapi(pointer(sapi_globals_id^), tsrmls_fetch);
+end;
+function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct;
+var
+ sapi_global_id : pointer;
+begin
+ Result := nil;
+ sapi_global_id := GetProcAddress(PHPLib, 'sapi_globals_id');
+ if Assigned(sapi_global_id) then
+ Result := __fgsapi(pointer(sapi_globals_id^), TSRMLS_DC);
+end;
+
+function GetStringOf(const V: TVarData): string;
+ begin
+ case V.VType of
+ varEmpty, varNull:
+ Result := '';
+ varSmallInt:
+ Result := IntToStr(V.VSmallInt);
+ varInteger:
+ Result := IntToStr(V.VInteger);
+ varSingle:
+ Result := FloatToStr(V.VSingle);
+ varDouble:
+ Result := FloatToStr(V.VDouble);
+ varCurrency:
+ Result := CurrToStr(V.VCurrency);
+ varDate:
+ Result := DateTimeToStr(V.VDate);
+ varOleStr:
+ Result := V.VOleStr;
+ varBoolean:
+ Result := BoolToStr(V.VBoolean, true);
+ varByte:
+ Result := IntToStr(V.VByte);
+ varWord:
+ Result := IntToStr(V.VWord);
+ varShortInt:
+ Result := IntToStr(V.VShortInt);
+ varLongWord:
+ Result := IntToStr(V.VLongWord);
+ varInt64:
+ Result := IntToStr(V.VInt64);
+ varString:
+ Result := string(V.VString);
+ {$IFDEF SUPPORTS_UNICODE_STRING}
+ varUString:
+ Result := string(V.VUString);
+ {$ENDIF SUPPORTS_UNICODE_STRING}
+ {varArray,
+ varDispatch,
+ varError,
+ varUnknown,
+ varAny,
+ varByRef:}
+ end;
+end;
+
+function GetPHPGlobals(TSRMLS_DC : pointer) : Pphp_Core_Globals;
+begin
+ Result := nil;
+ if Assigned(core_globals_id) then
+ Result := Pphp_Core_Globals(__fgsapi(pointer(core_globals_id^), TSRMLS_DC));
+end;
+
+
+procedure PHP_FUNCTION(var AFunction : zend_function_entry; AName : zend_pchar; AHandler : pointer);
+begin
+ AFunction.fname := AName;
+
+ AFunction.handler := AHandler;
+ AFunction.arg_info := nil;
+end;
+
+{$IFDEF PHP540}
+//HERE
+
+procedure php_start_implicit_flush(TSRMLS_D : pointer);
+begin
+ php_output_set_implicit_flush(PHP_IMPLICIT_FLUSH_START, TSRMLS_D);
+end;
+procedure php_end_implicit_flush(TSRMLS_D : pointer);
+begin
+ php_output_set_implicit_flush(PHP_IMPLICIT_FLUSH_END, TSRMLS_D);
+end;
+{$ENDIF}
+
+
+function LoadPHP(const LibraryPath: zend_ustr = PHPlp) : boolean;
+
+begin
+ Result := false;
+ if not PHPLoaded then
+ begin
+ if not LoadZend(LibraryPath) then
+ Exit;
+ end;
+
+ sapi_globals_id := GetProcAddress(PHPLib, 'sapi_globals_id');
+
+ core_globals_id := GetProcAddress(PHPLib, 'core_globals_id');
+
+ php_default_post_reader := GetProcAddress(PHPLib, 'php_default_post_reader');
+
+ LFunc(@sapi_add_header_ex, 'sapi_add_header_ex');
+
+ LFunc(@php_request_startup, 'php_request_startup');
+
+ LFunc(@php_request_shutdown, 'php_request_shutdown');
+
+ LFunc(@php_module_startup, 'php_module_startup');
+
+ LFunc(@php_module_shutdown, 'php_module_shutdown');
+
+ LFunc(@php_module_shutdown_wrapper, 'php_module_shutdown_wrapper');
+
+ LFunc(@sapi_startup, 'sapi_startup');
+
+ LFunc(@sapi_shutdown, 'sapi_shutdown');
+
+ LFunc(@sapi_activate, 'sapi_activate');
+
+ LFunc(@sapi_deactivate, 'sapi_deactivate');
+
+ LFunc(@php_execute_script, 'php_execute_script');
+
+ LFunc(@php_handle_aborted_connection, 'php_handle_aborted_connection');
+
+ LFunc(@php_register_variable, 'php_register_variable');
+
+ LFunc(@php_register_variable_safe, 'php_register_variable_safe');
+
+ LFunc(@php_register_variable_ex, 'php_register_variable_ex');
+
+ LFunc(@php_output_startup, 'php_output_startup');
+
+ LFunc(@php_output_activate, 'php_output_activate');
+
+ LFunc(@php_output_set_status, 'php_output_set_status');
+
+ LFunc(@php_output_register_constants, 'php_output_register_constants');
+ {$IFDEF PHP540}
+ LFunc(@php_start_ob_buffer, 'php_output_start_user');
+
+ LFunc(@php_start_ob_buffer_named, 'php_output_start_internal');
+
+ LFunc(@php_end_ob_buffer, 'php_output_end');
+
+ LFunc(@php_end_ob_buffers, 'php_output_end_all');
+
+ LFunc(@php_ob_get_buffer, 'php_output_get_contents');
+
+ LFunc(@php_ob_get_length, 'php_output_get_length');
+
+ LFunc(@php_output_set_implicit_flush, 'php_output_set_implicit_flush');
+
+ LFunc(@php_get_output_start_filename, 'php_output_get_start_filename');
+
+ LFunc(@php_get_output_start_lineno, 'php_output_get_start_lineno');
+
+ LFunc(@php_output_handler_started, 'php_output_handler_started');
+ {$ELSE}
+ LFunc(@php_start_ob_buffer, 'php_start_ob_buffer');
+
+ LFunc(@php_start_ob_buffer_named, 'php_start_ob_buffer_named');
+
+ LFunc(@php_end_ob_buffer, 'php_end_ob_buffer');
+
+ LFunc(@php_end_ob_buffers, 'php_end_ob_buffers');
+
+ LFunc(@php_ob_get_buffer, 'php_ob_get_buffer');
+
+ LFunc(@php_ob_get_length, 'php_ob_get_length');
+
+ LFunc(@php_start_implicit_flush, 'php_start_implicit_flush');
+
+ LFunc(@php_end_implicit_flush, 'php_end_implicit_flush');
+
+ LFunc(@php_get_output_start_filename, 'php_get_output_start_filename');
+
+ LFunc(@php_get_output_start_lineno, 'php_get_output_start_lineno');
+
+ LFunc(@php_ob_handler_used, 'php_ob_handler_used');
+{$ENDIF}
+ {$IF not defined(PHP520) and not Defined(PHP540) and not Defined(PHP550) and not Defined(PHP560)}
+ LFunc(@php_ob_init_conflict, 'php_ob_init_conflict');
+ {$ifend}
+ LFunc(@php_strtoupper, 'php_strtoupper');
+
+ LFunc(@php_strtolower,'php_strtolower');
+
+ LFunc(@php_strtr, 'php_strtr');
+
+ LFunc(@php_stripcslashes, 'php_stripcslashes');
+
+ LFunc(@php_basename, 'php_basename');
+
+ LFunc(@php_dirname, 'php_dirname');
+
+ LFunc(@php_stristr, 'php_stristr');
+
+ LFunc(@php_str_to_str, 'php_str_to_str');
+
+ LFunc(@php_strip_tags, 'php_strip_tags');
+
+ LFunc(@php_implode, 'php_implode');
+
+ LFunc(@php_explode, 'php_explode');
+
+ LFunc(@php_info_html_esc, 'php_info_html_esc');
+
+ LFunc(@php_print_info_htmlhead, 'php_print_info_htmlhead');
+
+ LFunc(@php_print_info, 'php_print_info');
+
+ LFunc(@php_info_print_table_colspan_header, 'php_info_print_table_colspan_header');
+
+ LFunc(@php_info_print_box_start, 'php_info_print_box_start');
+
+ LFunc(@php_info_print_box_end, 'php_info_print_box_end');
+
+ LFunc(@php_info_print_hr, 'php_info_print_hr');
+
+ LFunc(@php_info_print_table_start, 'php_info_print_table_start');
+
+ LFunc(@php_info_print_table_row1, 'php_info_print_table_row');
+
+ LFunc(@php_info_print_table_row2, 'php_info_print_table_row');
+
+ LFunc(@php_info_print_table_row3, 'php_info_print_table_row');
+
+ LFunc(@php_info_print_table_row4, 'php_info_print_table_row');
+
+ LFunc(@php_info_print_table_row, 'php_info_print_table_row');
+
+ LFunc(@php_info_print_table_end, 'php_info_print_table_end');
+ {$IF Defined(PHP520) or Defined(PHP540) or Defined(PHP550) or Defined(PHP560)}
+ LFunc(@php_write, 'php_write' );
+ {$ELSE}
+ LFunc(@php_body_write, 'php_body_write' );
+ LFunc(@php_header_write, 'php_header_write');
+ {$ifend}
+ {$IFNDEF COMPILER_php7pv}
+ LFunc(@php_log_err, 'php_log_err');
+ {$ENDIF}
+ LFunc(@php_html_puts, 'php_html_puts');
+
+ LFunc(@_php_error_log, '_php_error_log');
+
+ LFunc(@php_print_credits, 'php_print_credits');
+
+ LFunc(@php_info_print_css, 'php_info_print_css');
+
+ LFunc(@php_set_sock_blocking, 'php_set_sock_blocking');
+
+ LFunc(@php_copy_file, 'php_copy_file');
+
+ LFunc(@php_header, 'php_header');
+
+ LFunc(@php_setcookie, 'php_setcookie');
+
+ LFunc(@php_escape_html_entities, 'php_escape_html_entities');
+
+ LFunc(@php_ini_long, 'zend_ini_long');
+
+ LFunc(@php_ini_double, 'zend_ini_double');
+
+ LFunc(@php_ini_string, 'zend_ini_string');
+
+ LFunc(@php_url_free, 'php_url_free');
+
+ LFunc(@php_url_parse, 'php_url_parse');
+
+ LFunc(@php_url_decode, 'php_url_decode');
+
+ LFunc(@php_raw_url_decode, 'php_raw_url_decode');
+
+ LFunc(@php_url_encode, 'php_url_encode');
+
+ LFunc(@php_raw_url_encode, 'php_raw_url_encode');
+
+ {$IFDEF PHP5}
+ LFunc(@php_register_extensions, 'php_register_extensions');
+ {$ELSE}
+ LFunc(@php_startup_extensions, 'php_startup_extensions');
+ {$ENDIF}
+
+ LFunc(@php_error_docref0, 'php_error_docref0');
+
+ LFunc(@php_error_docref, 'php_error_docref0');
+
+ LFunc(@php_error_docref1, 'php_error_docref1');
+
+ LFunc(@php_error_docref2, 'php_error_docref2');
+
+ Result := true;
+end;
+
+function GetPostVariables: pzval;
+begin
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[0];
+end;
+
+function GetGetVariables : pzval;
+begin
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[1];
+end;
+
+function GetServerVariables : pzval;
+begin
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[3];
+end;
+
+function GetEnvVariables : pzval;
+begin
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[4];
+end;
+
+function GetFilesVariables : pzval;
+begin
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[5];
+end;
+
+
+function FloatToValue(Value: Extended): zend_ustr;
+var
+ c: CharPtr;
+begin
+ {$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ Result := SysUtils.FormatFloat('0.####', Value);
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+ {$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := SysUtils.FormatFloat('0.####', Value);
+ finally
+ DecimalSeparator := c;
+ end;
+ {$ifend}
+end;
+
+function ValueToFloat(Value : zend_ustr) : extended;
+var
+ c: CharPtr;
+begin
+ {$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ Result := SysUtils.StrToFloat( Value);
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+ {$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := SysUtils.StrToFloat( Value);
+ finally
+ DecimalSeparator := c;
+ end;
+ {$ifend}
+end;
+
+
+{$IFDEF Linux}
+function GetPHPVersion: TPHPFileInfo;
+begin
+
+end;
+{$ELSE}
+function GetPHPVersion: TPHPFileInfo;
+var
+ FileName: String;
+ InfoSize, Wnd: DWORD;
+ VerBuf: Pointer;
+ FI: PVSFixedFileInfo;
+ VerSize: DWORD;
+begin
+ Result.MajorVersion := 0;
+ Result.MinorVersion := 0;
+ Result.Release := 0;
+ Result.Build := 0;
+ FileName := PHPlp;
+ InfoSize := GetFileVersionInfoSize(PWideChar(Filename), Wnd);
+ if InfoSize <> 0 then
+ begin
+ GetMem(VerBuf, InfoSize);
+ try
+ if GetFileVersionInfo(PWideChar(FileName), Wnd, InfoSize, VerBuf) then
+ if VerQueryValue(VerBuf, '\', Pointer(FI), VerSize) then
+ begin
+ Result.MajorVersion := HIWORD(FI.dwFileVersionMS);
+ Result.MinorVersion := LOWORD(FI.dwFileVersionMS);
+ Result.Release := HIWORD(FI.dwFileVersionLS);
+ Result.Build := LOWORD(FI.dwFileVersionLS);
+ end;
+ finally
+ FreeMem(VerBuf);
+ end;
+ end;
+end;
+{$ENDIF}
+
+{$IFDEF PHP4DELPHI_AUTOLOAD}
+initialization
+ LoadPHP;
+{$ENDIF}
+
+{$IFDEF PHP4DELPHI_AUTOUNLOAD}
+finalization
+ UnloadPHP;
+{$ENDIF}
+
+end.
diff --git a/PHPCommon.pas b/Source/PHPCommon.pas
similarity index 77%
rename from PHPCommon.pas
rename to Source/PHPCommon.pas
index fc6f2d1..d0a3a41 100644
--- a/PHPCommon.pas
+++ b/Source/PHPCommon.pas
@@ -1,406 +1,454 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Developers: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ Michael Maroszek }
-{ maroszek@gmx.net }
-{ }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpcommon.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit PHPCommon;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ZendTypes, ZendAPI, PHPTypes, PHPAPI;
-
-type
- EDelphiErrorEx = class(Exception);
- EPHPErrorEx = class(Exception);
-
- TPHPErrorType = (
- etError, //0
- etWarning, //1
- etParse, //2
- etNotice,
- etCoreError,
- etCoreWarning,
- etCompileError,
- etCompileWarning,
- etUserError,
- etUserWarning,
- etUserNotice,
- etUnknown);
-
- TPHPExecuteMethod = (emServer, emGet);
-
- TPHPAboutInfo = (abPHP4Delphi);
-
- TPHPVariable = class(TCollectionItem)
- private
- FName : string;
- FValue : string;
- function GetAsBoolean: boolean;
- function GetAsFloat: double;
- function GetAsInteger: integer;
- procedure SetAsBoolean(const Value: boolean);
- procedure SetAsFloat(const Value: double);
- procedure SetAsInteger(const Value: integer);
- protected
- function GetDisplayName : string; override;
- public
- property AsInteger : integer read GetAsInteger write SetAsInteger;
- property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
- property AsString : string read FValue write FValue;
- property AsFloat : double read GetAsFloat write SetAsFloat;
- published
- property Name : string read FName write FName;
- property Value : string read FValue write FValue;
- end;
-
- TPHPVariables = class(TCollection)
- private
- FOwner : TComponent;
- procedure SetItem(Index: Integer; const Value: TPHPVariable);
- function GetItem(Index: Integer): TPHPVariable;
- protected
- function GetOwner : TPersistent; override;
- public
- function Add: TPHPVariable;
- constructor Create(AOwner: TComponent);
- function GetVariables : string;
- function IndexOf(AName : string) : integer;
- procedure AddRawString(AString : string);
- property Items[Index: Integer]: TPHPVariable read GetItem write SetItem; default;
- function ByName(AName : string) : TPHPVariable;
- end;
-
- TPHPConstant = class(TCollectionItem)
- private
- FName : string;
- FValue : string;
- protected
- function GetDisplayName : string; override;
- published
- property Name : string read FName write FName;
- property Value : string read FValue write FValue;
- end;
-
- TPHPConstants = class(TCollection)
- private
- FOwner : TComponent;
- procedure SetItem(Index: Integer; const Value: TPHPConstant);
- function GetItem(Index: Integer): TPHPConstant;
- protected
- function GetOwner : TPersistent; override;
- public
- function Add: TPHPConstant;
- constructor Create(AOwner: TComponent);
- function IndexOf(AName : string) : integer;
- property Items[Index: Integer]: TPHPConstant read GetItem write SetItem; default;
- end;
-
- TPHPHeader = class(TCollectionItem)
- private
- FHeader : String;
- published
- property Header : string read FHeader write FHeader;
- end;
-
- TPHPHeaders = class(TCollection)
- private
- FOwner : TComponent;
- procedure SetItem(Index: Integer; const Value: TPHPHeader);
- function GetItem(Index: Integer): TPHPHeader;
- protected
- function GetOwner : TPersistent; override;
- public
- function Add: TPHPHeader;
- constructor Create(AOwner: TComponent);
- function GetHeaders : string;
- property Items[Index: Integer]: TPHPHeader read GetItem write SetItem; default;
- end;
-
- TPHPComponent = class(TComponent)
- private
- FAbout : TPHPAboutInfo;
- protected
- public
- published
- property About : TPHPAboutInfo read FAbout write FAbout stored False;
- end;
-
-
-
-implementation
-
-
-{ TPHPVariables }
-
-function TPHPVariables.Add: TPHPVariable;
-begin
- result := TPHPVariable(inherited Add);
-end;
-
-constructor TPHPVariables.Create(AOwner: TComponent);
-begin
- inherited create(TPHPVariable);
- FOwner := AOwner;
-end;
-
-function TPHPVariables.GetItem(Index: Integer): TPHPVariable;
-begin
- Result := TPHPVariable(inherited GetItem(Index));
-end;
-
-procedure TPHPVariables.SetItem(Index: Integer; const Value: TPHPVariable);
-begin
- inherited SetItem(Index, Value)
-end;
-
-function TPHPVariables.GetOwner : TPersistent;
-begin
- Result := FOwner;
-end;
-
-function TPHPVariables.GetVariables: string;
-var i : integer;
-begin
- for i := 0 to Count - 1 do
- begin
- Result := Result + Items[i].FName + '=' + Items[i].FValue;
- if i < Count - 1 then
- Result := Result + '&';
- end;
-end;
-
-function TPHPVariables.IndexOf(AName: string): integer;
-var
- i : integer;
-begin
- Result := -1;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := i;
- break;
- end;
- end;
-end;
-
-procedure TPHPVariables.AddRawString(AString : string);
-var
- SL : TStringList;
- i : integer;
- j : integer;
- V : TPHPVariable;
-begin
- if AString[Length(AString)] = ';' then
- SetLength(AString, Length(AString)-1);
- SL := TStringList.Create;
- ExtractStrings([';'], [], PChar(AString), SL);
- for i := 0 to SL.Count - 1 do
- begin
- j := IndexOf(SL.Names[i]);
- if j= -1 then
- begin
- V := Add;
- V.Name := SL.Names[i];
- V.Value := Copy(SL[I], Length(SL.Names[i]) + 2, MaxInt);
- end
- else
- begin
- Items[j].Value := Copy(SL[I], Length(SL.Names[i]) + 2, MaxInt);
- end;
- end;
- SL.Free;
-end;
-
-function TPHPVariables.ByName(AName: string): TPHPVariable;
-var
- i : integer;
-begin
- Result := nil;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := Items[i];
- break;
- end;
- end;
-end;
-
-
-{ TPHPVariable }
-
-function TPHPVariable.GetAsBoolean: boolean;
-begin
- if FValue = '' then
- begin
- Result := false;
- Exit;
- end;
-
- if SameText(FValue, 'True') then
- Result := true
- else
- Result := false;
-end;
-
-function TPHPVariable.GetAsFloat: double;
-begin
- if FValue = '' then
- begin
- Result := 0;
- Exit;
- end;
-
- Result := ValueToFloat(FValue);
-end;
-
-function TPHPVariable.GetAsInteger: integer;
-var
- c : char;
-begin
- c := DecimalSeparator;
- DecimalSeparator := '.';
- Result := Round(ValueToFloat(FValue));
- DecimalSeparator := c;
-end;
-
-function TPHPVariable.GetDisplayName: string;
-begin
- if FName = '' then
- result := inherited GetDisplayName
- else
- Result := FName;
-end;
-
-procedure TPHPVariable.SetAsBoolean(const Value: boolean);
-begin
- if Value then
- FValue := 'True'
- else
- FValue := 'False';
-end;
-
-procedure TPHPVariable.SetAsFloat(const Value: double);
-begin
- FValue := FloatToValue(Value);
-end;
-
-procedure TPHPVariable.SetAsInteger(const Value: integer);
-var
- c : char;
-begin
- c := DecimalSeparator;
- DecimalSeparator := '.';
- FValue := IntToStr(Value);
- DecimalSeparator := c;
-end;
-
-{ TPHPConstant }
-
-function TPHPConstant.GetDisplayName: string;
-begin
- if FName = '' then
- result := inherited GetDisplayName
- else
- Result := FName;
-end;
-
-
-{ TPHPConstants }
-
-function TPHPConstants.Add: TPHPConstant;
-begin
- result := TPHPConstant(inherited Add);
-end;
-
-constructor TPHPConstants.Create(AOwner: TComponent);
-begin
- inherited create(TPHPConstant);
- FOwner := AOwner;
-end;
-
-function TPHPConstants.GetItem(Index: Integer): TPHPConstant;
-begin
- Result := TPHPConstant(inherited GetItem(Index));
-end;
-
-function TPHPConstants.GetOwner: TPersistent;
-begin
- Result := FOwner;
-end;
-
-function TPHPConstants.IndexOf(AName: string): integer;
-var
- i : integer;
-begin
- Result := -1;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := i;
- break;
- end;
- end;
-end;
-
-procedure TPHPConstants.SetItem(Index: Integer; const Value: TPHPConstant);
-begin
- inherited SetItem(Index, Value)
-end;
-
-
-{ TPHPHeaders }
-
-function TPHPHeaders.Add: TPHPHeader;
-begin
- result := TPHPHeader(inherited Add);
-end;
-
-constructor TPHPHeaders.Create(AOwner: TComponent);
-begin
- inherited create(TPHPHeader);
- FOwner := AOwner;
-end;
-
-function TPHPHeaders.GetItem(Index: Integer): TPHPHeader;
-begin
- Result := TPHPHeader(inherited GetItem(Index));
-end;
-
-procedure TPHPHeaders.SetItem(Index: Integer; const Value: TPHPHeader);
-begin
- inherited SetItem(Index, Value)
-end;
-
-function TPHPHeaders.GetOwner : TPersistent;
-begin
- Result := FOwner;
-end;
-
-function TPHPHeaders.GetHeaders: string;
-var i : integer;
-begin
- for i := 0 to Count - 1 do
- begin
- Result := Result + Items[i].FHeader;
- if i < Count - 1 then
- Result := Result + #13#10;
- end;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Developers: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ Michael Maroszek }
+{ maroszek@gmx.net }
+{ }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpcommon.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit PHPCommon;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes,
+ {$if CompilerVersion > 21}
+ VCL.Controls,
+ VCL.Dialogs,
+ VCL.Forms, VCL.Graphics,
+ {$elseif defined(FMX)}
+ FMX.Controls,
+ FMX.Dialogs,
+ FMX.Forms, FMX.Graphics,
+ {$else}
+ {$ifdef KYLIX}
+ QControls,
+ QDialogs,
+ QForms, QGraphics,
+ {$else}
+ Controls,
+ Dialogs,
+ Forms, Graphics,
+ {$endif}
+ {$ifend}
+
+ ZendTypes, ZendAPI, PHPTypes, PHPAPI;
+
+type
+ EDelphiErrorEx = class(Exception);
+ EPHPErrorEx = class(Exception);
+
+ TPHPErrorType = (
+ etError, //0
+ etWarning, //1
+ etParse, //2
+ etNotice,
+ etCoreError,
+ etCoreWarning,
+ etCompileError,
+ etCompileWarning,
+ etUserError,
+ etUserWarning,
+ etUserNotice,
+ etUnknown);
+
+ TPHPExecuteMethod = (emServer, emGet);
+
+ TPHPAboutInfo = (abPHP4Delphi);
+
+ TPHPVariable = class(TCollectionItem)
+ private
+ FName : zend_ustr;
+ FValue : zend_ustr;
+ function GetAsBoolean: boolean;
+ function GetAsFloat: double;
+ function GetAsInteger: integer;
+ procedure SetAsBoolean(const Value: boolean);
+ procedure SetAsFloat(const Value: double);
+ procedure SetAsInteger(const Value: integer);
+ protected
+ function GetDisplayName : string; override;
+ public
+ property AsInteger : integer read GetAsInteger write SetAsInteger;
+ property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
+ property AsString : zend_ustr read FValue write FValue;
+ property AsFloat : double read GetAsFloat write SetAsFloat;
+ published
+ property Name : zend_ustr read FName write FName;
+ property Value : zend_ustr read FValue write FValue;
+ end;
+
+ TPHPVariables = class(TCollection)
+ private
+ FOwner : TComponent;
+ procedure SetItem(Index: Integer; const Value: TPHPVariable);
+ function GetItem(Index: Integer): TPHPVariable;
+ protected
+ function GetOwner : TPersistent; override;
+ public
+ function Add: TPHPVariable;
+ constructor Create(AOwner: TComponent);
+ function GetVariables : zend_ustr;
+ function IndexOf(AName : zend_ustr) : integer;
+ procedure AddRawString(AString : zend_ustr);
+ property Items[Index: Integer]: TPHPVariable read GetItem write SetItem; default;
+ function ByName(AName : zend_ustr) : TPHPVariable;
+ end;
+
+ TPHPConstant = class(TCollectionItem)
+ private
+ FName : zend_ustr;
+ FValue : zend_ustr;
+ protected
+ function GetDisplayName : string; override;
+ published
+ property Name : zend_ustr read FName write FName;
+ property Value : zend_ustr read FValue write FValue;
+ end;
+
+ TPHPConstants = class(TCollection)
+ private
+ FOwner : TComponent;
+ procedure SetItem(Index: Integer; const Value: TPHPConstant);
+ function GetItem(Index: Integer): TPHPConstant;
+ protected
+ function GetOwner : TPersistent; override;
+ public
+ function Add: TPHPConstant;
+ constructor Create(AOwner: TComponent);
+ function IndexOf(AName : zend_ustr) : integer;
+ property Items[Index: Integer]: TPHPConstant read GetItem write SetItem; default;
+ end;
+
+ TPHPHeader = class(TCollectionItem)
+ private
+ FHeader : String;
+ published
+ property Header : string read FHeader write FHeader;
+ end;
+
+ TPHPHeaders = class(TCollection)
+ private
+ FOwner : TComponent;
+ procedure SetItem(Index: Integer; const Value: TPHPHeader);
+ function GetItem(Index: Integer): TPHPHeader;
+ protected
+ function GetOwner : TPersistent; override;
+ public
+ function Add: TPHPHeader;
+ constructor Create(AOwner: TComponent);
+ function GetHeaders : zend_ustr;
+ property Items[Index: Integer]: TPHPHeader read GetItem write SetItem; default;
+ end;
+
+ TPHPComponent = class(TComponent)
+ private
+ FAbout : TPHPAboutInfo;
+ protected
+ public
+ published
+ property About : TPHPAboutInfo read FAbout write FAbout stored False;
+ end;
+
+
+
+implementation
+
+
+{ TPHPVariables }
+
+function TPHPVariables.Add: TPHPVariable;
+begin
+ result := TPHPVariable(inherited Add);
+end;
+
+constructor TPHPVariables.Create(AOwner: TComponent);
+begin
+ inherited create(TPHPVariable);
+ FOwner := AOwner;
+end;
+
+function TPHPVariables.GetItem(Index: Integer): TPHPVariable;
+begin
+ Result := TPHPVariable(inherited GetItem(Index));
+end;
+
+procedure TPHPVariables.SetItem(Index: Integer; const Value: TPHPVariable);
+begin
+ inherited SetItem(Index, Value)
+end;
+
+function TPHPVariables.GetOwner : TPersistent;
+begin
+ Result := FOwner;
+end;
+
+function TPHPVariables.GetVariables: zend_ustr;
+var i : integer;
+begin
+ for i := 0 to Count - 1 do
+ begin
+ Result := Result + Items[i].FName + '=' + Items[i].FValue;
+ if i < Count - 1 then
+ Result := Result + '&';
+ end;
+end;
+
+function TPHPVariables.IndexOf(AName: zend_ustr): integer;
+var
+ i : integer;
+begin
+ Result := -1;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := i;
+ break;
+ end;
+ end;
+end;
+
+procedure TPHPVariables.AddRawString(AString : zend_ustr);
+var
+ SL : TStringList;
+ i : integer;
+ j : integer;
+ V : TPHPVariable;
+begin
+ if AString[Length(AString)] = ';' then
+ SetLength(AString, Length(AString)-1);
+ SL := TStringList.Create;
+
+ ExtractStrings([';'], [], PWideChar(WideString(AString)), SL);
+
+ for i := 0 to SL.Count - 1 do
+ begin
+ j := IndexOf(SL.Names[i]);
+ if j= -1 then
+ begin
+ V := Add;
+ V.Name := SL.Names[i];
+ V.Value := Copy(SL[I], Length(SL.Names[i]) + 2, MaxInt);
+ end
+ else
+ begin
+ Items[j].Value := Copy(SL[I], Length(SL.Names[i]) + 2, MaxInt);
+ end;
+ end;
+ SL.Free;
+end;
+
+function TPHPVariables.ByName(AName: zend_ustr): TPHPVariable;
+var
+ i : integer;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := Items[i];
+ break;
+ end;
+ end;
+end;
+
+
+{ TPHPVariable }
+
+function TPHPVariable.GetAsBoolean: boolean;
+begin
+ if FValue = '' then
+ begin
+ Result := false;
+ Exit;
+ end;
+
+ if SameText(FValue, 'True') then
+ Result := true
+ else
+ Result := false;
+end;
+
+function TPHPVariable.GetAsFloat: double;
+begin
+ if FValue = '' then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ Result := ValueToFloat(FValue);
+end;
+
+function TPHPVariable.GetAsInteger: integer;
+var
+ c: CharPtr;
+begin
+{$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
+end;
+
+function TPHPVariable.GetDisplayName: string;
+begin
+ if FName = '' then
+ result := inherited GetDisplayName
+ else
+ Result := FName;
+end;
+
+procedure TPHPVariable.SetAsBoolean(const Value: boolean);
+begin
+ if Value then
+ FValue := 'True'
+ else
+ FValue := 'False';
+end;
+
+procedure TPHPVariable.SetAsFloat(const Value: double);
+begin
+ FValue := FloatToValue(Value);
+end;
+
+procedure TPHPVariable.SetAsInteger(const Value: integer);
+var
+ c: CharPtr;
+begin
+{$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
+end;
+
+{ TPHPConstant }
+
+function TPHPConstant.GetDisplayName: string;
+begin
+ if FName = '' then
+ result := inherited GetDisplayName
+ else
+ Result := FName;
+end;
+
+
+{ TPHPConstants }
+
+function TPHPConstants.Add: TPHPConstant;
+begin
+ result := TPHPConstant(inherited Add);
+end;
+
+constructor TPHPConstants.Create(AOwner: TComponent);
+begin
+ inherited Create(TPHPConstant);
+ FOwner := AOwner;
+end;
+
+function TPHPConstants.GetItem(Index: Integer): TPHPConstant;
+begin
+ Result := TPHPConstant(inherited GetItem(Index));
+end;
+
+function TPHPConstants.GetOwner: TPersistent;
+begin
+ Result := FOwner;
+end;
+
+function TPHPConstants.IndexOf(AName: zend_ustr): integer;
+var
+ i : integer;
+begin
+ Result := -1;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := i;
+ break;
+ end;
+ end;
+end;
+
+procedure TPHPConstants.SetItem(Index: Integer; const Value: TPHPConstant);
+begin
+ inherited SetItem(Index, Value)
+end;
+
+
+{ TPHPHeaders }
+
+function TPHPHeaders.Add: TPHPHeader;
+begin
+ result := TPHPHeader(inherited Add);
+end;
+
+constructor TPHPHeaders.Create(AOwner: TComponent);
+begin
+ inherited create(TPHPHeader);
+ FOwner := AOwner;
+end;
+
+function TPHPHeaders.GetItem(Index: Integer): TPHPHeader;
+begin
+ Result := TPHPHeader(inherited GetItem(Index));
+end;
+
+procedure TPHPHeaders.SetItem(Index: Integer; const Value: TPHPHeader);
+begin
+ inherited SetItem(Index, Value)
+end;
+
+function TPHPHeaders.GetOwner : TPersistent;
+begin
+ Result := FOwner;
+end;
+
+function TPHPHeaders.GetHeaders: zend_ustr;
+var i : integer;
+begin
+ for i := 0 to Count - 1 do
+ begin
+ Result := Result + Items[i].FHeader;
+ if i < Count - 1 then
+ Result := Result + #13#10;
+ end;
+end;
+
+end.
diff --git a/PHPFunctions.pas b/Source/PHPFunctions.pas
similarity index 81%
rename from PHPFunctions.pas
rename to Source/PHPFunctions.pas
index 2e3002e..eef5c76 100644
--- a/PHPFunctions.pas
+++ b/Source/PHPFunctions.pas
@@ -1,783 +1,784 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: PHPFunctions.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit phpFunctions;
-
-interface
- uses
- Windows, SysUtils, Classes, {$IFDEF VERSION6} Variants,
- {$ENDIF} ZendTypes, PHPTypes, ZendAPI, PHPAPI ;
-
-type
- TParamType = (tpString, tpInteger, tpFloat, tpBoolean, tpArray, tpUnknown);
-
- TZendVariable = class
- private
- FValue : PZval;
- function GetAsBoolean: boolean;
- procedure SetAsBoolean(const Value: boolean);
- function GetAsFloat: double;
- function GetAsInteger: integer;
- function GetAsString: string;
- procedure SetAsFloat(const Value: double);
- procedure SetAsInteger(const Value: integer);
- procedure SetAsString(const Value: string);
- function GetAsDate: TDateTime;
- function GetAsDateTime: TDateTime;
- function GetAsTime: TDateTime;
- procedure SetAsDate(const Value: TDateTime);
- procedure SetAsDateTime(const Value: TDateTime);
- procedure SetAsTime(const Value: TDateTime);
- function GetAsVariant: variant;
- procedure SetAsVariant(const Value: variant);
- function GetDataType: integer;
- function GetIsNull: boolean;
- function GetTypeName: string;
- public
- constructor Create; virtual;
- procedure UnAssign;
- property IsNull : boolean read GetIsNull;
- property AsZendVariable : Pzval read FValue write FValue;
- property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
- property AsInteger : integer read GetAsInteger write SetAsInteger;
- property AsString : string read GetAsString write SetAsString;
- property AsFloat : double read GetAsFloat write SetAsFloat;
- property AsDate : TDateTime read GetAsDate write SetAsDate;
- property AsTime : TDateTime read GetAsTime write SetAsTime;
- property AsDateTime : TDateTime read GetAsDateTime write SetAsDateTime;
- property AsVariant : variant read GetAsVariant write SetAsVariant;
- property DataType : integer read GetDataType;
- property TypeName : string read GetTypeName;
- end;
-
-
- TFunctionParam = class(TCollectionItem)
- private
- FName : string;
- FParamType : TParamType;
- FZendVariable : TZendVariable;
- function GetZendValue: PZVal;
- procedure SetZendValue(const Value: PZVal);
- function GetValue: variant;
- procedure SetValue(const Value: variant);
- public
- constructor Create(Collection : TCollection); override;
- destructor Destroy; override;
- function GetDisplayName: string; override;
- procedure SetDisplayName(const Value: string); override;
- procedure AssignTo(Dest: TPersistent); override;
- property Value : variant read GetValue write SetValue;
- property ZendValue : PZVal read GetZendValue write SetZendValue;
- property ZendVariable : TZendVariable read FZendVariable write FZendVariable;
- published
- property Name : string read FName write SetDisplayName;
- property ParamType : TParamType read FParamType write FParamType;
- end;
-
- TFunctionParams = class(TCollection)
- private
- FOwner: TPersistent;
- function GetItem(Index: Integer): TFunctionParam;
- procedure SetItem(Index: Integer; Value: TFunctionParam);
- protected
- function GetOwner: TPersistent; override;
- procedure SetItemName(Item: TCollectionItem); override;
- public
- constructor Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
- function ParamByName(AName : string) : TFunctionParam;
- function Values(AName : string) : Variant;
- function Add : TFunctionParam;
- property Items[Index: Integer]: TFunctionParam read GetItem write SetItem; default;
- end;
-
-
- TPHPExecute = procedure(Sender : TObject; Parameters : TFunctionParams ; var ReturnValue : Variant;
- ThisPtr : pzval; TSRMLS_DC : pointer) of object;
-
- TPHPFunction = class(TCollectionItem)
- private
- FOnExecute : TPHPExecute;
- FFunctionName : string;
- FTag : integer;
- FFunctionParams: TFunctionParams;
- FZendVar : TZendVariable;
- procedure SetFunctionParams(const Value: TFunctionParams);
- public
- ReturnValue : variant;
- constructor Create(Collection : TCollection); override;
- destructor Destroy; override;
- function GetDisplayName: string; override;
- procedure SetDisplayName(const Value: string); override;
- procedure AssignTo(Dest: TPersistent); override;
- property ZendVar: TZendVariable read FZendVar;
- published
- property FunctionName : string read FFunctionName write SetDisplayName;
- property Tag : integer read FTag write FTag;
- property Parameters: TFunctionParams read FFunctionParams write SetFunctionParams;
- property OnExecute : TPHPExecute read FOnExecute write FOnExecute;
- end;
-
- TPHPFunctions = class(TCollection)
- private
- FOwner: TPersistent;
- function GetItem(Index: Integer): TPHPFunction;
- procedure SetItem(Index: Integer; Value: TPHPFunction);
- protected
- function GetOwner: TPersistent; override;
- procedure SetItemName(Item: TCollectionItem); override;
- public
- constructor Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
- function Add : TPHPFunction;
- function FunctionByName(const AName : string) : TPHPFunction;
- property Items[Index: Integer]: TPHPFunction read GetItem write SetItem; default;
- end;
-
-
-function IsParamTypeCorrect(AParamType : TParamType; z : Pzval) : boolean;
-
-function ZendTypeToString(_type : integer) : string;
-
-implementation
-
-function ZendTypeToString(_type : integer) : string;
-begin
- case _type of
- IS_NULL : Result := 'IS_NULL';
- IS_LONG : Result := 'IS_LONG';
- IS_DOUBLE : Result := 'IS_DOUBLE';
- IS_STRING : Result := 'IS_STRING';
- IS_ARRAY : Result := 'IS_ARRAY';
- IS_OBJECT : Result := 'IS_OBJECT';
- IS_BOOL : Result := 'IS_BOOL';
- IS_RESOURCE : Result := 'IS_RESOURCE';
- IS_CONSTANT : Result := 'IS_CONSTANT';
- IS_CONSTANT_ARRAY : Result := 'IS_CONSTANT_ARRAY';
- end;
-end;
-
-function IsParamTypeCorrect(AParamType : TParamType; z : Pzval) : boolean;
-var
- ZType : integer;
-begin
- ZType := Z^._type;
- case AParamType Of
- tpString : Result := (ztype in [IS_STRING, IS_NULL]);
- tpInteger : Result := (ztype in [IS_LONG, IS_BOOL, IS_NULL, IS_RESOURCE]);
- tpFloat : Result := (ztype in [IS_NULL, IS_DOUBLE, IS_LONG]);
- tpBoolean : Result := (ztype in [IS_NULL, IS_BOOL]);
- tpArray : Result := (ztype in [IS_NULL, IS_ARRAY]);
- tpUnknown : Result := True;
- else
- Result := False;
- end;
-end;
-
-{ TPHPFunctions }
-
-function TPHPFunctions.Add: TPHPFunction;
-begin
- Result := TPHPFunction(inherited Add);
-end;
-
-constructor TPHPFunctions.Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
-begin
- inherited Create(ItemClass);
- FOwner := Owner;
-end;
-
-function TPHPFunctions.FunctionByName(const AName: string): TPHPFunction;
-var
- cnt : integer;
-begin
- Result := nil;
- for cnt := 0 to Count -1 do
- begin
- if SameText(AName, Items[cnt].FunctionName) then
- begin
- Result := Items[cnt];
- break;
- end;
- end;
-end;
-
-function TPHPFunctions.GetItem(Index: Integer): TPHPFunction;
-begin
- Result := TPHPFunction(inherited GetItem(Index));
-end;
-
-function TPHPFunctions.GetOwner: TPersistent;
-begin
- Result := FOwner;
-end;
-
-procedure TPHPFunctions.SetItem(Index: Integer; Value: TPHPFunction);
-begin
- inherited SetItem(Index, TCollectionItem(Value));
-end;
-
-
-procedure TPHPFunctions.SetItemName(Item: TCollectionItem);
-var
- I, J: Integer;
- ItemName: string;
- CurItem: TPHPFunction;
-begin
- J := 1;
- while True do
- begin
- ItemName := Format('phpfunction%d', [J]);
- I := 0;
- while I < Count do
- begin
- CurItem := Items[I] as TPHPFunction;
- if (CurItem <> Item) and (CompareText(CurItem.FunctionName, ItemName) = 0) then
- begin
- Inc(J);
- Break;
- end;
- Inc(I);
- end;
- if I >= Count then
- begin
- (Item as TPHPFunction).FunctionName := ItemName;
- Break;
- end;
- end;
-end;
-
-{ TPHPFunction }
-
-procedure TPHPFunction.AssignTo(Dest: TPersistent);
-begin
- if Dest is TPHPFunction then
- begin
- if Assigned(Collection) then Collection.BeginUpdate;
- try
- with TPHPFunction(Dest) do
- begin
- Tag := Self.Tag;
- end;
- finally
- if Assigned(Collection) then Collection.EndUpdate;
- end;
- end else inherited AssignTo(Dest);
-end;
-
-constructor TPHPFunction.Create(Collection: TCollection);
-begin
- inherited;
- FFunctionParams := TFunctionParams.Create(TPHPFunctions(Self.Collection).GetOwner, TFunctionParam);
- FZendVar := TZendVariable.Create;
-end;
-
-destructor TPHPFunction.Destroy;
-begin
- FFunctionParams.Free;
- FZendVar.Free;
- inherited;
-end;
-
-function TPHPFunction.GetDisplayName: string;
-begin
- if FFunctionName = '' then
- result := inherited GetDisplayName else
- Result := FFunctionName;
-end;
-
-
-
-procedure TPHPFunction.SetDisplayName(const Value: string);
-var
- I: Integer;
- F: TPHPFunction;
-begin
- if AnsiCompareText(Value, FFunctionName) <> 0 then
- begin
- if Collection <> nil then
- for I := 0 to Collection.Count - 1 do
- begin
- F := TPHPFunctions(Collection).Items[I];
- if (F <> Self) and (F is TPHPFunction) and
- (AnsiCompareText(Value, F.FunctionName) = 0) then
- raise Exception.Create('Duplicate function name');
- end;
- FFunctionName := LowerCase(Value);
- Changed(False);
- end;
-end;
-
-
-procedure TPHPFunction.SetFunctionParams(const Value: TFunctionParams);
-begin
- FFunctionParams.Assign(Value);
-end;
-
-
-{ TFunctionParams }
-
-function TFunctionParams.Add: TFunctionParam;
-begin
- Result := TFunctionParam(inherited Add);
-end;
-
-constructor TFunctionParams.Create(Owner: TPersistent;
- ItemClass: TCollectionItemClass);
-begin
- inherited Create(ItemClass);
- FOwner := Owner;
-end;
-
-function TFunctionParams.GetItem(Index: Integer): TFunctionParam;
-begin
- Result := TFunctionParam(inherited GetItem(Index));
-end;
-
-function TFunctionParams.GetOwner: TPersistent;
-begin
- Result := FOwner;
-end;
-
-function TFunctionParams.ParamByName(AName: string): TFunctionParam;
-var
- i : integer;
-begin
- Result := nil;
- for i := 0 to Count - 1 do
- begin
- if SameText(AName, Items[i].Name) then
- begin
- Result := Items[i];
- Break;
- end;
- end;
-end;
-
-procedure TFunctionParams.SetItem(Index: Integer; Value: TFunctionParam);
-begin
- inherited SetItem(Index, TCollectionItem(Value));
-end;
-
-procedure TFunctionParams.SetItemName(Item: TCollectionItem);
-var
- I, J: Integer;
- ItemName: string;
- CurItem: TFunctionParam;
-begin
- J := 1;
- while True do
- begin
- ItemName := Format('Param%d', [J]);
- I := 0;
- while I < Count do
- begin
- CurItem := Items[I] as TFunctionParam;
- if (CurItem <> Item) and (CompareText(CurItem.Name, ItemName) = 0) then
- begin
- Inc(J);
- Break;
- end;
- Inc(I);
- end;
- if I >= Count then
- begin
- (Item as TFunctionParam).Name := ItemName;
- Break;
- end;
- end;
-end;
-
-function TFunctionParams.Values(AName: string): Variant;
-var
- P : TFunctionParam;
-begin
- Result := NULL;
- P := ParamByName(AName);
- if Assigned(P) then
- Result := P.Value;
-end;
-
-{ TFunctionParam }
-
-procedure TFunctionParam.AssignTo(Dest: TPersistent);
-begin
- if Dest is TFunctionParam then
- begin
- if Assigned(Collection) then Collection.BeginUpdate;
- try
- with TFunctionParam(Dest) do
- begin
- ParamType := Self.ParamType;
- end;
- finally
- if Assigned(Collection) then Collection.EndUpdate;
- end;
- end else inherited AssignTo(Dest);
-end;
-
-constructor TFunctionParam.Create(Collection: TCollection);
-begin
- inherited;
- FZendVariable := TZendVariable.Create;
-end;
-
-destructor TFunctionParam.Destroy;
-begin
- FZendVariable.Free;
- inherited;
-end;
-
-function TFunctionParam.GetDisplayName: string;
-begin
- if FName = '' then
- result := inherited GetDisplayName else
- Result := FName;
-end;
-
-function TFunctionParam.GetValue: variant;
-begin
- Result := FZendVariable.AsVariant;
-end;
-
-function TFunctionParam.GetZendValue: PZVal;
-begin
- Result := FZendVariable.FValue;
-end;
-
-procedure TFunctionParam.SetDisplayName(const Value: string);
-var
- I: Integer;
- F: TFunctionParam;
-begin
- if AnsiCompareText(Value, FName) <> 0 then
- begin
- if Collection <> nil then
- for I := 0 to Collection.Count - 1 do
- begin
- F := TFunctionParams(Collection).Items[I];
- if ((F <> Self) and (F is TFunctionParam) and
- (AnsiCompareText(Value, F.Name) = 0)) then
- raise Exception.Create('Duplicate parameter name');
- end;
- FName := Value;
- Changed(False);
- end;
-end;
-
-
-procedure TFunctionParam.SetValue(const Value: variant);
-begin
- FZendVariable.AsVariant := Value;
-end;
-
-procedure TFunctionParam.SetZendValue(const Value: PZVal);
-begin
- FZendVariable.AsZendVariable := Value;
-end;
-
-{ TZendVariable }
-
-constructor TZendVariable.Create;
-begin
- inherited Create;
- FValue := nil;
-end;
-
-
-
-function TZendVariable.GetAsBoolean: boolean;
-begin
- if not Assigned(FValue) then
- begin
- Result := false;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING :
- begin
- if SameText(GetAsString, 'True') then
- Result := true
- else
- Result := false;
- end;
- IS_BOOL : Result := (FValue^.value.lval = 1);
- IS_LONG, IS_RESOURCE : Result := (FValue^.value.lval = 1);
- else
- Result := false;
- end;
-end;
-
-function TZendVariable.GetAsDate: TDateTime;
-begin
- if not Assigned(FValue) then
- begin
- Result := 0;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : Result := StrToDate(GetAsString);
- IS_DOUBLE : Result := FValue^.value.dval;
- else
- Result := 0;
- end;
-end;
-
-function TZendVariable.GetAsDateTime: TDateTime;
-begin
- if not Assigned(FValue) then
- begin
- Result := 0;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : Result := StrToDateTime(GetAsString);
- IS_DOUBLE : Result := FValue^.value.dval;
- else
- Result := 0;
- end;
-end;
-
-{$IFDEF VERSION5}
-function StrToFloatDef(const S: string; const Default: Extended): Extended;
-begin
- if not TextToFloat(PChar(S), Result, fvExtended) then
- Result := Default;
-end;
-{$ENDIF}
-
-function TZendVariable.GetAsFloat: double;
-begin
- if not Assigned(FValue) then
- begin
- Result := 0;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : Result := StrToFloatDef(GetAsString,0.0);
- IS_DOUBLE : Result := FValue^.value.dval;
- else
- Result := 0;
- end;
-end;
-
-function TZendVariable.GetAsInteger: integer;
-begin
- if not Assigned(FValue) then
- begin
- Result := 0;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : result := StrToIntDef(GetAsString, 0);
- IS_DOUBLE : result := Round(FValue^.value.dval);
- IS_NULL : result := 0;
- IS_LONG : result := FValue^.value.lval;
- IS_BOOL : result := FValue^.value.lval;
- IS_RESOURCE : result := FValue^.value.lval;
- else
- Result := 0;
- end;
-end;
-
-function TZendVariable.GetAsString: string;
-begin
- if not Assigned(FValue) then
- begin
- Result := '';
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : begin
- try
- SetLength(Result, FValue^.value.str.len);
- Move(FValue^.value.str.val^, Result[1], FValue^.value.str.len);
- except
- Result := '';
- end;
- end;
- IS_DOUBLE : result := FloatToStr(FValue^.value.dval);
- IS_LONG : result := IntToStr(FValue^.value.lval);
- IS_NULL : result := '';
- IS_RESOURCE : result := IntToStr(FValue^.value.lval);
- IS_BOOL :
- begin
- if FValue^.value.lval = 1 then
- Result := 'True'
- else
- result := 'False';
- end;
- else
- Result := '';
- end;
-end;
-
-function TZendVariable.GetAsTime: TDateTime;
-begin
- if not Assigned(FValue) then
- begin
- Result := 0;
- Exit;
- end;
-
- case FValue^._type of
- IS_STRING : Result := StrToTime(GetAsString);
- IS_DOUBLE : Result := FValue^.value.dval;
- else
- Result := 0;
- end;
-end;
-
-function TZendVariable.GetAsVariant: variant;
-begin
- if not Assigned(FValue) then
- begin
- Result := NULL;
- Exit;
- end;
-
- result := zval2variant(FValue^);
-end;
-
-function TZendVariable.GetDataType: integer;
-begin
- if not Assigned(FValue) then
- begin
- Result := IS_NULL;
- Exit;
- end;
-
- Result := FValue^._type;
-end;
-
-function TZendVariable.GetIsNull: boolean;
-begin
- if not Assigned(FValue) then
- begin
- Result := true;
- Exit;
- end;
- Result := FValue^._type = IS_NULL;
-end;
-
-function TZendVariable.GetTypeName: string;
-begin
- if not Assigned(FValue) then
- begin
- Result := 'null';
- Exit;
- end;
-
- case FValue^._type of
- IS_NULL: result := 'null';
- IS_LONG: result := 'integer';
- IS_DOUBLE: result := 'double';
- IS_STRING: result := 'string';
- IS_ARRAY: result := 'array';
- IS_OBJECT: result := 'object';
- IS_BOOL: result := 'boolean';
- IS_RESOURCE: result := 'resource';
- else
- result := 'unknown';
- end;
-end;
-
-procedure TZendVariable.SetAsBoolean(const Value: boolean);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_BOOL(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsDate(const Value: TDateTime);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_DOUBLE(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsDateTime(const Value: TDateTime);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_DOUBLE(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsFloat(const Value: double);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_DOUBLE(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsInteger(const Value: integer);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_LONG(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsString(const Value: string);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_STRINGL(FValue, PChar(Value), Length(Value), true);
-end;
-
-procedure TZendVariable.SetAsTime(const Value: TDateTime);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_DOUBLE(FValue, Value);
-end;
-
-procedure TZendVariable.SetAsVariant(const Value: variant);
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- variant2zval(Value, FValue);
-end;
-
-
-procedure TZendVariable.UnAssign;
-begin
- if not Assigned(FValue) then
- begin
- Exit;
- end;
- ZVAL_NULL(FValue);
-end;
-
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: PHPFunctions.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpFunctions;
+
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+
+interface
+ uses
+ Windows, SysUtils, Classes,
+ {$IFDEF PHP_UNICODE}WideStrUtils, {$ENDIF}
+ {$IFDEF VERSION6} Variants,
+ {$ENDIF}
+ ZendTypes, PHPTypes, ZendAPI, PHPAPI ;
+
+type
+ TParamType = (tpString, tpInteger, tpFloat, tpBoolean, tpArray, tpUnknown);
+
+ TZendVariable = class
+ private
+ FValue : PZval;
+ function GetAsBoolean: boolean;
+ procedure SetAsBoolean(const Value: boolean);
+ function GetAsFloat: double;
+ function GetAsInteger: integer;
+ function GetAsString: zend_ustr;
+ procedure SetAsFloat(const Value: double);
+ procedure SetAsInteger(const Value: integer);
+ procedure SetAsString(const Value: zend_ustr);
+ function GetAsDate: TDateTime;
+ function GetAsDateTime: TDateTime;
+ function GetAsTime: TDateTime;
+ procedure SetAsDate(const Value: TDateTime);
+ procedure SetAsDateTime(const Value: TDateTime);
+ procedure SetAsTime(const Value: TDateTime);
+ function GetAsVariant: variant;
+ procedure SetAsVariant(const Value: variant);
+ function GetDataType: integer;
+ function GetIsNull: boolean;
+ function GetTypeName: string;
+ public
+ constructor Create; virtual;
+ procedure UnAssign;
+ property IsNull : boolean read GetIsNull;
+ property AsZendVariable : Pzval read FValue write FValue;
+ property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
+ property AsInteger : integer read GetAsInteger write SetAsInteger;
+ property AsString : zend_ustr read GetAsString write SetAsString;
+ property AsFloat : double read GetAsFloat write SetAsFloat;
+ property AsDate : TDateTime read GetAsDate write SetAsDate;
+ property AsTime : TDateTime read GetAsTime write SetAsTime;
+ property AsDateTime : TDateTime read GetAsDateTime write SetAsDateTime;
+ property AsVariant : variant read GetAsVariant write SetAsVariant;
+ property DataType : integer read GetDataType;
+ property TypeName : string read GetTypeName;
+ end;
+
+
+ TFunctionParam = class(TCollectionItem)
+ private
+ FName : string;
+ FParamType : TParamType;
+ FZendVariable : TZendVariable;
+ function GetZendValue: PZVal;
+ procedure SetZendValue(const Value: PZVal);
+ function GetValue: variant;
+ procedure SetValue(const Value: variant);
+ public
+ constructor Create(Collection : TCollection); override;
+ destructor Destroy; override;
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+ procedure AssignTo(Dest: TPersistent); override;
+ property Value : variant read GetValue write SetValue;
+ property ZendValue : PZVal read GetZendValue write SetZendValue;
+ property ZendVariable : TZendVariable read FZendVariable write FZendVariable;
+ published
+ property Name : string read FName write SetDisplayName;
+ property ParamType : TParamType read FParamType write FParamType;
+ end;
+
+ TFunctionParams = class(TCollection)
+ private
+ FOwner: TPersistent;
+ function GetItem(Index: Integer): TFunctionParam;
+ procedure SetItem(Index: Integer; Value: TFunctionParam);
+ protected
+ function GetOwner: TPersistent; override;
+ procedure SetItemName(Item: TCollectionItem); override;
+ public
+ constructor Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
+ function ParamByName(AName : string) : TFunctionParam;
+ function Values(AName : string) : Variant;
+ function Add : TFunctionParam;
+ property Items[Index: Integer]: TFunctionParam read GetItem write SetItem; default;
+ end;
+
+
+ TPHPExecute = procedure(Sender : TObject; Parameters : TFunctionParams ; var ReturnValue : Variant;
+ ZendVar : TZendVariable; TSRMLS_DC : pointer) of object;
+
+ TPHPFunction = class(TCollectionItem)
+ private
+ FOnExecute : TPHPExecute;
+ FFunctionName : zend_ustr;
+ FTag : integer;
+ FFunctionParams: TFunctionParams;
+ FDescription: zend_ustr;
+ procedure SetFunctionParams(const Value: TFunctionParams);
+ procedure _SetDisplayName(const value : zend_ustr);
+ public
+ constructor Create(Collection : TCollection); override;
+ destructor Destroy; override;
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+ procedure AssignTo(Dest: TPersistent); override;
+ published
+ property FunctionName : zend_ustr read FFunctionName write _SetDisplayName;
+ property Tag : integer read FTag write FTag;
+ property Parameters: TFunctionParams read FFunctionParams write SetFunctionParams;
+ property OnExecute : TPHPExecute read FOnExecute write FOnExecute;
+ property Description : zend_ustr read FDescription write FDescription;
+ end;
+
+ TPHPFunctions = class(TCollection)
+ private
+ FOwner: TPersistent;
+ protected
+ function GetItem(Index: Integer): TPHPFunction;
+ procedure SetItem(Index: Integer; Value: TPHPFunction);
+ function GetOwner: TPersistent; override;
+ procedure SetItemName(Item: TCollectionItem); override;
+ public
+ constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); virtual;
+ function Add : TPHPFunction;
+ function FunctionByName(const AName : zend_ustr) : TPHPFunction;
+ property Items[Index: Integer]: TPHPFunction read GetItem write SetItem; default;
+ end;
+
+
+function IsParamTypeCorrect(AParamType : TParamType; z : Pzval) : boolean;
+
+function ZendTypeToString(_type : integer) : string;
+
+implementation
+
+function ZendTypeToString(_type : integer) : string;
+begin
+ case _type of
+ IS_NULL : Result := 'IS_NULL';
+ IS_LONG : Result := 'IS_LONG';
+ IS_DOUBLE : Result := 'IS_DOUBLE';
+ IS_STRING : Result := 'IS_STRING';
+ IS_ARRAY : Result := 'IS_ARRAY';
+ IS_OBJECT : Result := 'IS_OBJECT';
+ IS_BOOL : Result := 'IS_BOOL';
+ IS_RESOURCE : Result := 'IS_RESOURCE';
+ IS_CONSTANT : Result := 'IS_CONSTANT';
+ {$IFNDEF PHP7}
+ IS_CONSTANT_ARRAY : Result := 'IS_CONSTANT_ARRAY';
+ {$ENDIF}
+ end;
+end;
+
+function IsParamTypeCorrect(AParamType : TParamType; z : Pzval) : boolean;
+var
+ ZType : integer;
+begin
+ ZType := {$IFDEF PHP7}Z^.u1.v._type{$ELSE} Z^._type{$ENDIF};
+ case AParamType Of
+ tpString : Result := (ztype in [IS_STRING, IS_NULL]);
+ tpInteger : Result := (ztype in [IS_LONG, IS_BOOL, IS_NULL, IS_RESOURCE]);
+ tpFloat : Result := (ztype in [IS_NULL, IS_DOUBLE, IS_LONG]);
+ tpBoolean : Result := (ztype in [IS_NULL, IS_BOOL]);
+ tpArray : Result := (ztype in [IS_NULL, IS_ARRAY]);
+ tpUnknown : Result := True;
+ else
+ Result := False;
+ end;
+end;
+
+{ TPHPFunctions }
+
+function TPHPFunctions.Add: TPHPFunction;
+begin
+ Result := TPHPFunction(inherited Add);
+end;
+
+constructor TPHPFunctions.Create(AOwner: TPersistent; ItemClass: TCollectionItemClass);
+begin
+ inherited Create(ItemClass);
+ FOwner := AOwner;
+end;
+
+function TPHPFunctions.FunctionByName(const AName: zend_ustr): TPHPFunction;
+var
+ cnt : integer;
+begin
+ Result := nil;
+ for cnt := 0 to Count -1 do
+ begin
+ if SameText(AName, Items[cnt].FunctionName) then
+ begin
+ Result := Items[cnt];
+ break;
+ end;
+ end;
+end;
+
+function TPHPFunctions.GetItem(Index: Integer): TPHPFunction;
+begin
+ Result := TPHPFunction(inherited GetItem(Index));
+end;
+
+function TPHPFunctions.GetOwner: TPersistent;
+begin
+ Result := FOwner;
+end;
+
+procedure TPHPFunctions.SetItem(Index: Integer; Value: TPHPFunction);
+begin
+ inherited SetItem(Index, TCollectionItem(Value));
+end;
+
+
+procedure TPHPFunctions.SetItemName(Item: TCollectionItem);
+var
+ I, J: Integer;
+ ItemName: string;
+ CurItem: TPHPFunction;
+begin
+ J := 1;
+ while True do
+ begin
+ ItemName := Format('phpfunction%d', [J]);
+ I := 0;
+ while I < Count do
+ begin
+ CurItem := Items[I] as TPHPFunction;
+ if (CurItem <> Item) and (CompareText(CurItem.FunctionName, ItemName) = 0) then
+ begin
+ Inc(J);
+ Break;
+ end;
+ Inc(I);
+ end;
+ if I >= Count then
+ begin
+ (Item as TPHPFunction).FunctionName := ItemName;
+ Break;
+ end;
+ end;
+end;
+
+{ TPHPFunction }
+
+
+procedure TPHPFunction.AssignTo(Dest: TPersistent);
+begin
+ if Dest is TPHPFunction then
+ begin
+ if Assigned(Collection) then Collection.BeginUpdate;
+ try
+ with TPHPFunction(Dest) do
+ begin
+ Tag := Self.Tag;
+ Parameters.Assign(Self.Parameters);
+ Description := Self.Description;
+ FunctionName := Self.FunctionName;
+ end;
+ finally
+ if Assigned(Collection) then Collection.EndUpdate;
+ end;
+ end else inherited AssignTo(Dest);
+end;
+
+
+constructor TPHPFunction.Create(Collection: TCollection);
+begin
+ inherited Create(Collection);
+ FFunctionParams := TFunctionParams.Create(TPHPFunctions(Self.Collection).GetOwner, TFunctionParam);
+end;
+
+destructor TPHPFunction.Destroy;
+begin
+ FOnExecute := nil;
+ FFunctionParams.Free;
+ inherited;
+end;
+
+function TPHPFunction.GetDisplayName: string;
+begin
+ if FFunctionName = '' then
+ result := inherited GetDisplayName else
+ Result := FFunctionName;
+end;
+
+
+
+procedure TPHPFunction.SetDisplayName(const Value: string);
+var
+ I: Integer;
+ F: TPHPFunction;
+ NameValue : zend_ustr;
+begin
+ NameValue := Value;
+ if {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, FFunctionName) <> 0 then
+ begin
+ if Collection <> nil then
+ for I := 0 to Collection.Count - 1 do
+ begin
+ F := TPHPFunctions(Collection).Items[I];
+ if (F <> Self) and (F is TPHPFunction) and
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, F.FunctionName) = 0) then
+ raise Exception.CreateFmt('Duplicate function name: %s', [Value]);
+ end;
+ FFunctionName := {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(Value);
+ Changed(False);
+ end;
+end;
+
+procedure TPHPFunction._SetDisplayName(const Value: zend_ustr);
+var
+ NewName : string;
+begin
+ NewName := value;
+ SetDisplayName(NewName);
+end;
+
+procedure TPHPFunction.SetFunctionParams(const Value: TFunctionParams);
+begin
+ FFunctionParams.Assign(Value);
+end;
+
+
+{ TFunctionParams }
+
+function TFunctionParams.Add: TFunctionParam;
+begin
+ Result := TFunctionParam(inherited Add);
+end;
+
+constructor TFunctionParams.Create(Owner: TPersistent;
+ ItemClass: TCollectionItemClass);
+begin
+ inherited Create(ItemClass);
+ FOwner := Owner;
+end;
+
+function TFunctionParams.GetItem(Index: Integer): TFunctionParam;
+begin
+ Result := TFunctionParam(inherited GetItem(Index));
+end;
+
+function TFunctionParams.GetOwner: TPersistent;
+begin
+ Result := FOwner;
+end;
+
+function TFunctionParams.ParamByName(AName: string): TFunctionParam;
+var
+ i : integer;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(AName, Items[i].Name) then
+ begin
+ Result := Items[i];
+ Break;
+ end;
+ end;
+end;
+
+procedure TFunctionParams.SetItem(Index: Integer; Value: TFunctionParam);
+begin
+ inherited SetItem(Index, TCollectionItem(Value));
+end;
+
+procedure TFunctionParams.SetItemName(Item: TCollectionItem);
+var
+ J: Integer;
+ CurItem: TFunctionParam;
+begin
+ J := 1;
+ CurItem := ParamByName('Param1');
+ while (CurItem <> nil) and (CurItem <> Item) do
+ begin
+ inc(J);
+ CurItem := ParamByName('Param' + inttostr(J));
+ end;
+ (Item as TFunctionParam).Name := 'Param' + inttostr(J);
+end;
+
+function TFunctionParams.Values(AName: string): Variant;
+var
+ P : TFunctionParam;
+begin
+ Result := NULL;
+ P := ParamByName(AName);
+ if Assigned(P) then
+ Result := P.Value;
+end;
+
+{ TFunctionParam }
+
+procedure TFunctionParam.AssignTo(Dest: TPersistent);
+begin
+ if Dest is TFunctionParam then
+ begin
+ if Assigned(Collection) then Collection.BeginUpdate;
+ try
+ with TFunctionParam(Dest) do
+ begin
+ ParamType := Self.ParamType;
+ Name := Self.Name;
+ end;
+ finally
+ if Assigned(Collection) then Collection.EndUpdate;
+ end;
+ end else inherited AssignTo(Dest);
+end;
+
+constructor TFunctionParam.Create(Collection: TCollection);
+begin
+ inherited;
+ FZendVariable := TZendVariable.Create;
+end;
+
+destructor TFunctionParam.Destroy;
+begin
+ FZendVariable.Free;
+ inherited;
+end;
+
+function TFunctionParam.GetDisplayName: string;
+begin
+ if FName = '' then
+ result := inherited GetDisplayName else
+ Result := FName;
+end;
+
+function TFunctionParam.GetValue: variant;
+begin
+ Result := FZendVariable.AsVariant;
+end;
+
+function TFunctionParam.GetZendValue: PZVal;
+begin
+ Result := FZendVariable.FValue;
+end;
+
+procedure TFunctionParam.SetDisplayName(const Value: string);
+var
+ I: Integer;
+ F: TFunctionParam;
+begin
+ if {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
+ begin
+ if Collection <> nil then
+ for I := 0 to Collection.Count - 1 do
+ begin
+ F := TFunctionParams(Collection).Items[I];
+ if ((F <> Self) and (F is TFunctionParam) and
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0)) then
+ raise Exception.Create('Duplicate parameter name');
+ end;
+ FName := Value;
+ Changed(False);
+ end;
+end;
+
+
+procedure TFunctionParam.SetValue(const Value: variant);
+begin
+ FZendVariable.AsVariant := Value;
+end;
+
+procedure TFunctionParam.SetZendValue(const Value: PZVal);
+begin
+ FZendVariable.AsZendVariable := Value;
+end;
+
+{ TZendVariable }
+
+constructor TZendVariable.Create;
+begin
+ inherited Create;
+ FValue := nil;
+end;
+
+
+
+function TZendVariable.GetAsBoolean: boolean;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := false;
+ Exit;
+ end;
+
+ case{$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING :
+ begin
+ if SameText(GetAsString, 'True') then
+ Result := true
+ else
+ Result := false;
+ end;
+ IS_BOOL : Result := (FValue^.value.lval = 1);
+ IS_LONG, IS_RESOURCE : Result := (FValue^.value.lval = 1);
+ else
+ Result := false;
+ end;
+end;
+
+function TZendVariable.GetAsDate: TDateTime;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ case{$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : Result := StrToDate(GetAsString);
+ IS_DOUBLE : Result := FValue^.value.dval;
+ else
+ Result := 0;
+ end;
+end;
+
+function TZendVariable.GetAsDateTime: TDateTime;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : Result := StrToDateTime(GetAsString);
+ IS_DOUBLE : Result := FValue^.value.dval;
+ else
+ Result := 0;
+ end;
+end;
+
+{$IFDEF VERSION5}
+function StrToFloatDef(const S: string; const Default: Extended): Extended;
+begin
+ if not TextToFloat(zend_pchar(S), Result, fvExtended) then
+ Result := Default;
+end;
+{$ENDIF}
+
+function TZendVariable.GetAsFloat: double;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : Result := StrToFloatDef(GetAsString,0.0);
+ IS_DOUBLE : Result := FValue^.value.dval;
+ else
+ Result := 0;
+ end;
+end;
+
+function TZendVariable.GetAsInteger: integer;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : result := StrToIntDef(GetAsString, 0);
+ IS_DOUBLE : result := Round(FValue^.value.dval);
+ IS_NULL : result := 0;
+ IS_LONG : result := FValue^.value.lval;
+ IS_BOOL : result := FValue^.value.lval;
+ IS_RESOURCE : result := FValue^.value.lval;
+ else
+ Result := 0;
+ end;
+end;
+
+function TZendVariable.GetAsString: zend_ustr;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := '';
+ Exit;
+ end;
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : begin
+ try
+ SetLength(Result, FValue^.value.str.len);
+ Move(FValue^.value.str.val^, Result[1], FValue^.value.str.len);
+ except
+ Result := '';
+ end;
+ end;
+ IS_DOUBLE : result := FloatToStr(FValue^.value.dval);
+ IS_LONG : result := IntToStr(FValue^.value.lval);
+ IS_NULL : result := '';
+ IS_RESOURCE : result := IntToStr(FValue^.value.lval);
+ IS_BOOL :
+ begin
+ if FValue^.value.lval = 1 then
+ Result := 'True'
+ else
+ result := 'False';
+ end;
+ else
+ Result := '';
+ end;
+end;
+
+function TZendVariable.GetAsTime: TDateTime;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_STRING : Result := StrToTime(GetAsString);
+ IS_DOUBLE : Result := FValue^.value.dval;
+ else
+ Result := 0;
+ end;
+end;
+
+function TZendVariable.GetAsVariant: variant;
+begin
+ if not Assigned(FValue) then
+ begin
+ Result := NULL;
+ Exit;
+ end;
+
+ result := ZendToVariant(FValue);
+end;
+
+function TZendVariable.GetDataType: integer;
+begin
+ if not Assigned(FValue) then
+ Exit(IS_NULL);
+
+ Result := {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF};
+end;
+
+function TZendVariable.GetIsNull: boolean;
+begin
+ if not Assigned(FValue) then
+ Exit(True);
+
+ Result := {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} = IS_NULL;
+end;
+
+function TZendVariable.GetTypeName: string;
+begin
+ if not Assigned(FValue) then
+ Exit('null');
+
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
+ IS_NULL: result := 'null';
+ IS_LONG: result := 'integer';
+ IS_DOUBLE: result := 'double';
+ IS_STRING: result := 'string';
+ IS_ARRAY: result := 'array';
+ IS_OBJECT: result := 'object';
+ IS_BOOL: result := 'boolean';
+ IS_RESOURCE: result := 'resource';
+ else
+ result := 'unknown';
+ end;
+end;
+
+procedure TZendVariable.SetAsBoolean(const Value: boolean);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsDate(const Value: TDateTime);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsDateTime(const Value: TDateTime);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsFloat(const Value: double);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsInteger(const Value: integer);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsString(const Value: zend_ustr);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, zend_pchar(Value), Length(Value));
+end;
+
+procedure TZendVariable.SetAsTime(const Value: TDateTime);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue, Value);
+end;
+
+procedure TZendVariable.SetAsVariant(const Value: variant);
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ VariantToZend(Value, FValue);
+end;
+
+
+procedure TZendVariable.UnAssign;
+begin
+ if not Assigned(FValue) then
+ begin
+ Exit;
+ end;
+ ZVALVAL(FValue);
+end;
+
+
+end.
+
diff --git a/PHPLibrary.pas b/Source/PHPLibrary.pas
similarity index 67%
rename from PHPLibrary.pas
rename to Source/PHPLibrary.pas
index 5103487..1ffad85 100644
--- a/PHPLibrary.pas
+++ b/Source/PHPLibrary.pas
@@ -1,492 +1,546 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: PHPLibrary.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit phpLibrary;
-
-interface
- uses
- Windows, SysUtils, Classes,
- {$IFDEF VERSION6}
- Variants,
- {$ENDIF}
- ZendTypes, ZendAPI, PHPTypes, PHPAPI, phpCustomLibrary, phpFunctions;
-
-type
- TPHPLibrary = class(TCustomPHPLibrary)
- published
- property Executor;
- property LibraryName;
- property Functions;
- end;
-
- TDispatchProc = procedure of object;
-
- TDispatchObject = class
- Proc : TDispatchProc;
- end;
-
- TPHPSimpleLibrary = class(TCustomPHPLibrary)
- private
- FRetValue : variant;
- FParams : TFunctionParams;
- FMethods : TStringList;
- protected
- procedure _Execute(Sender: TObject; Parameters: TFunctionParams; var ReturnValue: Variant;
- ThisPtr: Pzval; TSRMLS_DC: Pointer);
- procedure ReturnOutputArg(AValue:variant);
- function GetInputArg(AIndex:integer):variant;
- function GetInputArgAsString(AIndex:integer):string;
- function GetInputArgAsInteger(AIndex:integer):integer;
- function GetInputArgAsBoolean(AIndex:integer):boolean;
- function GetInputArgAsFloat(AIndex:integer):double;
- function GetInputArgAsDateTime(AIndex:integer):TDateTime;
- public
- procedure RegisterMethod(AName : string; AProc : TDispatchProc; AParams : array of TParamType); virtual;
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- end;
-
- TPHPSystemLibrary = class(TPHPSimpleLibrary)
- protected
- {System procedures}
- procedure RoundProc;
- procedure TruncProc;
- procedure CopyProc;
- procedure PosProc;
- procedure LengthProc;
- {SysUtils procedures}
- procedure UpperCaseProc;
- procedure LowerCaseProc;
- procedure CompareStrProc;
- procedure CompareTextProc;
- procedure AnsiUpperCaseProc;
- procedure AnsiLowerCaseProc;
- procedure AnsiCompareStrProc;
- procedure AnsiCompareTextProc;
- procedure IsValidIdentProc;
- procedure IntToStrProc;
- procedure IntToHexProc;
- procedure StrToIntProc;
- procedure StrToIntDefProc;
- procedure FloatToStrProc;
- procedure FormatFloatProc;
- procedure StrToFloatProc;
- procedure EncodeDateProc;
- procedure EncodeTimeProc;
- procedure DayOfWeekProc;
- procedure DateProc;
- procedure TimeProc;
- procedure NowProc;
- procedure IncMonthProc;
- procedure IsLeapYearProc;
- procedure DateToStrProc;
- procedure TimeToStrProc;
- procedure DateTimeToStrProc;
- procedure StrToDateProc;
- procedure StrToTimeProc;
- procedure StrToDateTimeProc;
- procedure BeepProc;
- procedure RandomProc;
- public
- procedure Refresh; override;
- published
- property Executor;
- end;
-
-implementation
-{ TPHPSimpleLibrary }
-
-function VarToInteger(v:variant):integer;
-begin
- case VarType(v) of
- varSmallint, varInteger, varByte, varError: result:=v;
- varSingle, varDouble, varCurrency, varDate: result:=round(v);
- varBoolean: if v=true then result:=1 else result:=0;
- varString, varOleStr: result:=round(StrToFloat (v));
- varUnknown, varDispatch : result := 0;
- else
- if VarIsNull(v) then
- result := 0
- else
- result := VarAsType(v,varInteger);
- end;
-end;
-
-function VarToFloat(v:variant):double;
-begin
- case VarType(v) of
- varSmallint,
- varInteger,
- varByte,
- varError,
- varSingle,
- varDouble,
- varCurrency,
- varDate: Result:=v;
- varBoolean: if v=true then result:=1 else result:=0;
- varString,varOleStr: result:= StrToFloat(v);
- varUnknown, varDispatch : result := 0;
- else
- if VarIsNull(v) then
- result := 0
- else
- result := VarAsType(v,varDouble);
- end;
-end;
-
-function VarToBoolean(v:variant):boolean;
-begin
- result:=(VarToInteger(v)<>0);
-end;
-
-procedure TPHPSimpleLibrary._Execute(Sender: TObject;
- Parameters: TFunctionParams; var ReturnValue: Variant; ThisPtr: Pzval;
- TSRMLS_DC: Pointer);
-begin
- if not VarIsEmpty(FRetValue) then
- VarClear(FRetValue);
- FParams := Parameters;
- TDispatchObject(FMethods.Objects[FMethods.IndexOf(ActiveFunctionName)]).Proc;
- if not VarIsEmpty(FRetValue) then
- ReturnValue := FRetValue;
-end;
-
-procedure TPHPSimpleLibrary.RegisterMethod(AName: string;
- AProc: TDispatchProc; AParams: array of TParamType);
-var
- Func : TPHPFunction;
- Param : TFunctionParam;
- cnt : integer;
- O : TDispatchObject;
-begin
- Func := TPHPFunction(Functions.Add);
- Func.FunctionName := LowerCase(AName);
-
- for cnt := 0 to Length(AParams) - 1 do
- begin
- Param := TFunctionparam(Func.Parameters.Add);
- Param.ParamType := AParams[cnt];
- end;
-
- Func.OnExecute := _Execute;
-
- O := TDispatchObject.Create;
- O.Proc := Aproc;
-
- FMethods.AddObject(AName, O);
-end;
-
-procedure TPHPSimpleLibrary.ReturnOutputArg(AValue: variant);
-begin
- FRetValue := AValue;
-end;
-
-function TPHPSimpleLibrary.GetInputArg(AIndex: integer): variant;
-begin
- Result := FParams[AIndex].Value;
-end;
-
-function TPHPSimpleLibrary.GetInputArgAsBoolean(AIndex: integer): boolean;
-begin
- Result := VarToBoolean(GetInputArg(AIndex));
-end;
-
-function TPHPSimpleLibrary.GetInputArgAsDateTime(
- AIndex: integer): TDateTime;
-begin
- Result := VarToDateTime(GetInputArg(AIndex));
-end;
-
-function TPHPSimpleLibrary.GetInputArgAsFloat(AIndex: integer): double;
-begin
- Result := VarToFloat(GetInputArg(AIndex));
-end;
-
-function TPHPSimpleLibrary.GetInputArgAsInteger(AIndex: integer): integer;
-begin
- Result := VarToInteger(GetInputArg(AIndex));
-end;
-
-function TPHPSimpleLibrary.GetInputArgAsString(AIndex: integer): string;
-begin
- Result := VarToStr(GetInputArg(AIndex));
-end;
-
-constructor TPHPSimpleLibrary.Create(AOwner: TComponent);
-begin
- inherited;
- FMethods := TStringList.Create;
- LibraryName := 'delphi_system';
-end;
-
-destructor TPHPSimpleLibrary.Destroy;
-var
- cnt : integer;
-begin
- for cnt := 0 to FMethods.Count - 1 do
- Fmethods.Objects[cnt].Free;
- FMethods.Free;
- inherited;
-end;
-
-procedure TPHPSystemLibrary.Refresh;
-begin
- Functions.Clear;
- RegisterMethod( 'sys_UpperCase', UpperCaseProc, [tpString] ) ;
- RegisterMethod( 'sys_LowerCase', LowerCaseProc, [tpString] );
- RegisterMethod( 'sys_CompareStr', CompareStrProc, [tpString, tpString] );
- RegisterMethod( 'sys_CompareText', CompareTextProc, [tpString, tpString] );
- RegisterMethod( 'sys_AnsiUpperCase', AnsiUpperCaseProc, [tpString] );
- RegisterMethod( 'sys_AnsiLowerCase', AnsiLowerCaseProc, [tpString] );
- RegisterMethod( 'sys_AnsiCompareStr', AnsiCompareStrProc, [tpString, tpString] );
- RegisterMethod( 'sys_AnsiCompareText', AnsiCompareTextProc, [tpString, tpString] );
- RegisterMethod( 'sys_IsValidIdent', IsValidIdentProc, [tpString] );
- RegisterMethod( 'sys_IntToStr', IntToStrProc, [tpInteger] );
- RegisterMethod( 'sys_IntToHex', IntToHexProc, [tpInteger, tpInteger] );
- RegisterMethod( 'sys_StrToInt', StrToIntProc, [tpString] );
- RegisterMethod( 'sys_StrToIntDef', StrToIntDefProc, [tpString, tpInteger] );
- RegisterMethod( 'sys_FloatToStr', FloatToStrProc, [tpFloat] );
- RegisterMethod( 'sys_FormatFloat', FormatFloatProc, [tpString, tpFloat] );
- RegisterMethod( 'sys_StrToFloat', StrToFloatProc, [tpString] );
- RegisterMethod( 'sys_EncodeDate', EncodeDateProc, [tpInteger, tpInteger, tpInteger] );
- RegisterMethod( 'sys_EncodeTime', EncodeTimeProc, [tpInteger, tpInteger, tpInteger, tpInteger] );
- RegisterMethod( 'sys_DayOfWeek', DayOfWeekProc, [tpFloat] );
- RegisterMethod( 'sys_Date', DateProc, [] );
- RegisterMethod( 'sys_Time', TimeProc, [] );
- RegisterMethod( 'sys_Now', NowProc, [] );
- RegisterMethod( 'sys_IncMonth', IncMonthProc, [tpFloat, tpInteger] );
- RegisterMethod( 'sys_IsLeapYear', IsLeapYearProc, [tpInteger] );
- RegisterMethod( 'sys_DateToStr', DateToStrProc, [tpFloat] );
- RegisterMethod( 'sys_TimeToStr', TimeToStrProc, [tpFloat] );
- RegisterMethod( 'sys_DateTimeToStr', DateTimeToStrProc, [tpFloat] );
- RegisterMethod( 'sys_StrToDate', StrToDateProc, [tpString] );
- RegisterMethod( 'sys_StrToTime', StrToTimeProc, [tpString] );
- RegisterMethod( 'sys_StrToDateTime', StrToDateTimeProc, [tpString] );
- RegisterMethod( 'sys_Beep', BeepProc, [] );
- RegisterMethod( 'sys_Round', RoundProc, [tpFloat] );
- RegisterMethod( 'sys_Trunc', TruncProc, [tpFloat] );
- RegisterMethod( 'sys_Copy', CopyProc, [tpString, tpInteger, tpInteger] );
- RegisterMethod( 'sys_Pos', PosProc, [tpString, tpString] );
- RegisterMethod( 'sys_Length', LengthProc, [tpString] );
- RegisterMethod( 'sys_Random', RandomProc, [] );
-
- inherited;
-
-end;
-
-{ TPHPSystemLibrary }
-
-procedure TPHPSystemLibrary.UpperCaseProc;
-begin
- ReturnOutputArg( UpperCase( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.LowerCaseProc;
-begin
- ReturnOutputArg( LowerCase( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.CompareStrProc;
-begin
- ReturnOutputArg( CompareStr( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.CompareTextProc;
-begin
- ReturnOutputArg( CompareText( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.AnsiUpperCaseProc;
-begin
- ReturnOutputArg( AnsiUpperCase( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.AnsiLowerCaseProc;
-begin
- ReturnOutputArg( AnsiLowerCase( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.AnsiCompareStrProc;
-begin
- ReturnOutputArg( AnsiCompareStr( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.AnsiCompareTextProc;
-begin
- ReturnOutputArg( AnsiCompareText( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
-end;
-
-
-procedure TPHPSystemLibrary.IsValidIdentProc;
-begin
- ReturnOutputArg( IsValidIdent( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.IntToStrProc;
-begin
- ReturnOutputArg( IntToStr( GetInputArgAsInteger( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.IntToHexProc;
-begin
- ReturnOutputArg( IntToHex( GetInputArgAsInteger( 0 ),GetInputArgAsInteger( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToIntProc;
-begin
- ReturnOutputArg( StrToInt( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToIntDefProc;
-begin
- ReturnOutputArg( StrToIntDef( GetInputArgAsString( 0 ),GetInputArgAsInteger( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.FloatToStrProc;
-begin
- ReturnOutputArg( FloatToStr( GetInputArgAsFloat( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.FormatFloatProc;
-begin
- ReturnOutputArg( FormatFloat( GetInputArgAsString( 0 ),GetInputArgAsFloat( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToFloatProc;
-begin
- ReturnOutputArg( StrToFloat( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.EncodeDateProc;
-begin
- ReturnOutputArg( EncodeDate(
- GetInputArgAsInteger( 0 ),
- GetInputArgAsInteger( 1 ),
- GetInputArgAsInteger( 2 ) ) );
-end;
-
-procedure TPHPSystemLibrary.EncodeTimeProc;
-begin
- ReturnOutputArg( EncodeTime(
- GetInputArgAsInteger( 0 ),
- GetInputArgAsInteger( 1 ),
- GetInputArgAsInteger( 2 ),
- GetInputArgAsInteger( 3 ) ) );
-end;
-
-
-
-procedure TPHPSystemLibrary.DayOfWeekProc;
-begin
- ReturnOutputArg( DayOfWeek( GetInputArgAsDateTime( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.DateProc;
-begin
- ReturnOutputArg( Date );
-end;
-
-procedure TPHPSystemLibrary.TimeProc;
-begin
- ReturnOutputArg( Time );
-end;
-
-procedure TPHPSystemLibrary.NowProc;
-begin
- ReturnOutputArg( Now );
-end;
-
-procedure TPHPSystemLibrary.IncMonthProc;
-begin
- ReturnOutputArg( IncMonth( GetInputArgAsDateTime( 0 ),GetInputArgAsInteger( 1 ) ) );
-end;
-
-procedure TPHPSystemLibrary.IsLeapYearProc;
-begin
- ReturnOutputArg( IsLeapYear( GetInputArgAsInteger( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.DateToStrProc;
-begin
- ReturnOutputArg( DateToStr( GetInputArgAsDateTime( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.TimeToStrProc;
-begin
- ReturnOutputArg( TimeToStr( GetInputArgAsDateTime( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.DateTimeToStrProc;
-begin
- ReturnOutputArg( DateTimeToStr( GetInputArgAsDateTime( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToDateProc;
-begin
- ReturnOutputArg( StrToDate( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToTimeProc;
-begin
- ReturnOutputArg( StrToTime( GetInputArgAsString( 0 ) ) );
-end;
-
-procedure TPHPSystemLibrary.StrToDateTimeProc;
-begin
- ReturnOutputArg( StrToDateTime( GetInputArgAsString( 0 ) ) );
-end;
-
-
-procedure TPHPSystemLibrary.BeepProc;
-begin
- Beep;
-end;
-
-
-procedure TPHPSystemLibrary.RoundProc;
-begin
- ReturnOutputArg( Integer(Round( GetInputArgAsFloat( 0 ) )) );
-end;
-
-procedure TPHPSystemLibrary.TruncProc;
-begin
- ReturnOutputArg( Integer(Trunc( GetInputArgAsFloat( 0 ) )) );
-end;
-
-procedure TPHPSystemLibrary.CopyProc;
-begin
- ReturnOutputArg( Copy(
- GetInputArgAsString( 0 ),
- GetInputArgAsInteger( 1 ),
- GetInputArgAsInteger( 2 ) ) );
-end;
-
-
-procedure TPHPSystemLibrary.PosProc;
-begin
- ReturnOutputArg( pos(GetInputArgAsString( 0 ),GetInputArgAsString( 1 )) );
-end;
-
-procedure TPHPSystemLibrary.LengthProc;
-begin
- ReturnOutputArg( Length( GetInputArgAsString( 0 ) ) );
-end;
-
-
-procedure TPHPSystemLibrary.RandomProc;
-begin
- ReturnOutputArg( Random );
-end;
-
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: PHPLibrary.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpLibrary;
+
+interface
+ uses
+ Windows, SysUtils, Classes,
+ {$IFDEF PHP_UNICODE}
+ WideStrUtils,
+ {$ENDIF}
+ {$IFDEF VERSION6}
+ Variants,
+ {$ENDIF}
+ ZendTypes, ZendAPI,
+ PHPTypes,
+ PHPAPI,
+ php4delphi,
+ phpFunctions;
+
+type
+ TPHPLibrary = class(TCustomPHPLibrary)
+ published
+ property Executor;
+ property LibraryName;
+ property Functions;
+ end;
+
+ TDispatchProc = procedure of object;
+
+ TDispatchObject = class
+ Proc : TDispatchProc;
+ end;
+
+ TPHPSimpleLibrary = class(TCustomPHPLibrary)
+ private
+ FRetValue : variant;
+ FParams : TFunctionParams;
+ FMethods : TStringList;
+ protected
+ procedure _Execute(Sender: TObject; Parameters: TFunctionParams; var ReturnValue: Variant;
+ ZendVar: TZendVariable; TSRMLS_DC: Pointer);
+ procedure ReturnOutputArg(AValue:variant);
+ function GetInputArg(AIndex:integer):variant;
+ function GetInputArgAsString(AIndex:integer):string;
+ function GetInputArgAsInteger(AIndex:integer):integer;
+ function GetInputArgAsBoolean(AIndex:integer):boolean;
+ function GetInputArgAsFloat(AIndex:integer):double;
+ function GetInputArgAsDateTime(AIndex:integer):TDateTime;
+ public
+ procedure RegisterMethod(AName : zend_ustr; ADescription : zend_ustr; AProc : TDispatchProc; AParams : array of TParamType); virtual;
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ end;
+
+ TPHPSystemLibrary = class(TPHPSimpleLibrary)
+ protected
+ {System procedures}
+ procedure RoundProc;
+ procedure TruncProc;
+ procedure CopyProc;
+ procedure PosProc;
+ procedure LengthProc;
+ {SysUtils procedures}
+ procedure UpperCaseProc;
+ procedure LowerCaseProc;
+ procedure CompareStrProc;
+ procedure CompareTextProc;
+ procedure AnsiUpperCaseProc;
+ procedure AnsiLowerCaseProc;
+ procedure AnsiCompareStrProc;
+ procedure AnsiCompareTextProc;
+ procedure IsValidIdentProc;
+ procedure IntToStrProc;
+ procedure IntToHexProc;
+ procedure StrToIntProc;
+ procedure StrToIntDefProc;
+ procedure FloatToStrProc;
+ procedure FormatFloatProc;
+ procedure StrToFloatProc;
+ procedure EncodeDateProc;
+ procedure EncodeTimeProc;
+ procedure DayOfWeekProc;
+ procedure DateProc;
+ procedure TimeProc;
+ procedure NowProc;
+ procedure IncMonthProc;
+ procedure IsLeapYearProc;
+ procedure DateToStrProc;
+ procedure TimeToStrProc;
+ procedure DateTimeToStrProc;
+ procedure StrToDateProc;
+ procedure StrToTimeProc;
+ procedure StrToDateTimeProc;
+ procedure BeepProc;
+ procedure RandomProc;
+ public
+ procedure Refresh; override;
+ published
+ property Executor;
+ end;
+implementation
+
+{ TPHPSimpleLibrary }
+
+function VarToInteger(v:variant):integer;
+begin
+ case VarType(v) of
+ varSmallint, varInteger, varByte, varError: result:=v;
+ varSingle, varDouble, varCurrency, varDate: result:=round(v);
+ varBoolean: if v=true then result:=1 else result:=0;
+ varString, varOleStr: result:=round(StrToFloat (v));
+ varUnknown, varDispatch : result := 0;
+ else
+ if VarIsNull(v) then
+ result := 0
+ else
+ result := VarAsType(v,varInteger);
+ end;
+end;
+
+function VarToFloat(v:variant):double;
+begin
+ case VarType(v) of
+ varSmallint,
+ varInteger,
+ varByte,
+ varError,
+ varSingle,
+ varDouble,
+ varCurrency,
+ varDate: Result:=v;
+ varBoolean: if v=true then result:=1 else result:=0;
+ varString,varOleStr: result:= StrToFloat(v);
+ varUnknown, varDispatch : result := 0;
+ else
+ if VarIsNull(v) then
+ result := 0
+ else
+ result := VarAsType(v,varDouble);
+ end;
+end;
+
+function VarToBoolean(v:variant):boolean;
+begin
+ result:=(VarToInteger(v)<>0);
+end;
+
+procedure TPHPSimpleLibrary._Execute(Sender: TObject;
+ Parameters: TFunctionParams; var ReturnValue: Variant; ZendVar : TZendVariable;
+ TSRMLS_DC: Pointer);
+var
+ ActiveFunctionName : string;
+begin
+ if not VarIsEmpty(FRetValue) then
+ VarClear(FRetValue);
+ FParams := Parameters;
+ ActiveFunctionName := get_active_function_name(TSRMLS_DC);
+ TDispatchObject(FMethods.Objects[FMethods.IndexOf(ActiveFunctionName)]).Proc;
+ if not VarIsEmpty(FRetValue) then
+ ReturnValue := FRetValue;
+end;
+
+procedure TPHPSimpleLibrary.RegisterMethod(AName: zend_ustr; ADescription : zend_ustr;
+ AProc: TDispatchProc; AParams: array of TParamType);
+var
+ Func : TPHPFunction;
+ Param : TFunctionParam;
+ cnt : integer;
+ O : TDispatchObject;
+begin
+ Func := TPHPFunction(Functions.Add);
+ Func.FunctionName :=
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(AName);
+ Func.Description := ADescription;
+
+ for cnt := 0 to Length(AParams) - 1 do
+ begin
+ Param := TFunctionparam(Func.Parameters.Add);
+ Param.ParamType := AParams[cnt];
+ end;
+
+ Func.OnExecute := _Execute;
+
+ O := TDispatchObject.Create;
+ O.Proc := Aproc;
+
+ FMethods.AddObject(AName, O);
+end;
+
+procedure TPHPSimpleLibrary.ReturnOutputArg(AValue: variant);
+begin
+ FRetValue := AValue;
+end;
+
+function TPHPSimpleLibrary.GetInputArg(AIndex: integer): variant;
+begin
+ Result := FParams[AIndex].Value;
+end;
+
+function TPHPSimpleLibrary.GetInputArgAsBoolean(AIndex: integer): boolean;
+begin
+ Result := VarToBoolean(GetInputArg(AIndex));
+end;
+
+function TPHPSimpleLibrary.GetInputArgAsDateTime(
+ AIndex: integer): TDateTime;
+begin
+ Result := VarToDateTime(GetInputArg(AIndex));
+end;
+
+function TPHPSimpleLibrary.GetInputArgAsFloat(AIndex: integer): double;
+begin
+ Result := VarToFloat(GetInputArg(AIndex));
+end;
+
+function TPHPSimpleLibrary.GetInputArgAsInteger(AIndex: integer): integer;
+begin
+ Result := VarToInteger(GetInputArg(AIndex));
+end;
+
+function TPHPSimpleLibrary.GetInputArgAsString(AIndex: integer): string;
+begin
+ Result := VarToStr(GetInputArg(AIndex));
+end;
+
+constructor TPHPSimpleLibrary.Create(AOwner: TComponent);
+begin
+ inherited;
+ FMethods := TStringList.Create;
+end;
+
+destructor TPHPSimpleLibrary.Destroy;
+var
+ cnt : integer;
+begin
+ for cnt := 0 to FMethods.Count - 1 do
+ Fmethods.Objects[cnt].Free;
+ FMethods.Free;
+ inherited;
+end;
+
+
+{ TPHPSystemLibrary }
+procedure TPHPSystemLibrary.Refresh;
+begin
+ Functions.Clear;
+ RegisterMethod( 'sys_UpperCase', 'System.UpperCase',
+ UpperCaseProc, [tpString] ) ;
+ RegisterMethod( 'sys_LowerCase', 'System.LowerCase',
+ LowerCaseProc, [tpString] );
+ RegisterMethod( 'sys_CompareStr', 'System.CompareStr',
+ CompareStrProc, [tpString, tpString] );
+ RegisterMethod( 'sys_CompareText', 'System.CompareText',
+ CompareTextProc, [tpString, tpString] );
+ RegisterMethod( 'sys_AnsiUpperCase', 'System.AnsiUpperCase',
+ AnsiUpperCaseProc, [tpString] );
+ RegisterMethod( 'sys_AnsiLowerCase', 'System.AnsiLowerCase',
+ AnsiLowerCaseProc, [tpString] );
+ RegisterMethod( 'sys_AnsiCompareStr', 'System.AnsiCompareStr',
+ AnsiCompareStrProc, [tpString, tpString] );
+ RegisterMethod( 'sys_AnsiCompareText', 'System.AnsiCompareText',
+ AnsiCompareTextProc, [tpString, tpString] );
+ RegisterMethod( 'sys_IsValidIdent', 'System.IsValidIndent',
+ IsValidIdentProc, [tpString] );
+ RegisterMethod( 'sys_IntToStr', 'System.IntToStr',
+ IntToStrProc, [tpInteger] );
+ RegisterMethod( 'sys_IntToHex', 'System.IntToHex',
+ IntToHexProc, [tpInteger, tpInteger] );
+ RegisterMethod( 'sys_StrToInt', 'System.StrToInt',
+ StrToIntProc, [tpString] );
+ RegisterMethod( 'sys_StrToIntDef','System.StrToIntDef',
+ StrToIntDefProc, [tpString, tpInteger] );
+ RegisterMethod( 'sys_FloatToStr', 'System.FloatToStr',
+ FloatToStrProc, [tpFloat] );
+ RegisterMethod( 'sys_FormatFloat','System.FormatFloat',
+ FormatFloatProc, [tpString, tpFloat] );
+ RegisterMethod( 'sys_StrToFloat', 'System.StrToFloat',
+ StrToFloatProc, [tpString] );
+ RegisterMethod( 'sys_EncodeDate', 'System.EncodeDate',
+ EncodeDateProc, [tpInteger, tpInteger, tpInteger] );
+ RegisterMethod( 'sys_EncodeTime', 'System.EncodeTime',
+ EncodeTimeProc, [tpInteger, tpInteger, tpInteger, tpInteger] );
+ RegisterMethod( 'sys_DayOfWeek', 'System.GetDayOfWeek',
+ DayOfWeekProc, [tpFloat] );
+ RegisterMethod( 'sys_Date', 'System.GetDate',
+ DateProc, [] );
+ RegisterMethod( 'sys_Time', 'System.GetTime',
+ TimeProc, [] );
+ RegisterMethod( 'sys_Now', 'System.GetDateNow',
+ NowProc, [] );
+ RegisterMethod( 'sys_IncMonth', 'System.IncMonth',
+ IncMonthProc, [tpFloat, tpInteger] );
+ RegisterMethod( 'sys_IsLeapYear', 'System.IsLeapYear',
+ IsLeapYearProc, [tpInteger] );
+ RegisterMethod( 'sys_DateToStr', 'System.DateToStr',
+ DateToStrProc, [tpFloat] );
+ RegisterMethod( 'sys_TimeToStr', 'System.TimeToStr',
+ TimeToStrProc, [tpFloat] );
+ RegisterMethod( 'sys_DateTimeToStr','System.DateTimeToStr',
+ DateTimeToStrProc, [tpFloat] );
+ RegisterMethod( 'sys_StrToDate', 'System.StrToDate',
+ StrToDateProc, [tpString] );
+ RegisterMethod( 'sys_StrToTime', 'System.StrToTime',
+ StrToTimeProc, [tpString] );
+ RegisterMethod( 'sys_StrToDateTime','System.StrToDateTime',
+ StrToDateTimeProc, [tpString] );
+ RegisterMethod( 'sys_Beep', 'System.MessageBeep',
+ BeepProc, [] );
+ RegisterMethod( 'sys_Round', 'System.Round',
+ RoundProc, [tpFloat] );
+ RegisterMethod( 'sys_Trunc', 'System.StrTruncate',
+ TruncProc, [tpFloat] );
+ RegisterMethod( 'sys_Copy', 'System.StrCopy',
+ CopyProc, [tpString, tpInteger, tpInteger] );
+ RegisterMethod( 'sys_Pos', 'System.StrPos',
+ PosProc, [tpString, tpString] );
+ RegisterMethod( 'sys_Length', 'System.Length',
+ LengthProc, [tpString] );
+ RegisterMethod( 'sys_Random', 'System.Random',
+ RandomProc, [] );
+
+ inherited;
+
+end;
+procedure TPHPSystemLibrary.UpperCaseProc;
+begin
+ ReturnOutputArg( UpperCase( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.LowerCaseProc;
+begin
+ ReturnOutputArg( LowerCase( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.CompareStrProc;
+begin
+ ReturnOutputArg( CompareStr( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.CompareTextProc;
+begin
+ ReturnOutputArg( CompareText( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.AnsiUpperCaseProc;
+begin
+ ReturnOutputArg(
+ {$IFDEF PHP_UNICODE}UTF8UpperCase{$ELSE}AnsiUpperCase{$ENDIF}( GetInputArgAsString( 0 ) )
+ );
+end;
+
+procedure TPHPSystemLibrary.AnsiLowerCaseProc;
+begin
+ ReturnOutputArg(
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}( GetInputArgAsString( 0 ) )
+ );
+end;
+
+procedure TPHPSystemLibrary.AnsiCompareStrProc;
+begin
+ ReturnOutputArg(
+ {$IFDEF PHP_UNICODE}CompareStr{$ELSE}AnsiCompareStr{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
+ );
+end;
+
+procedure TPHPSystemLibrary.AnsiCompareTextProc;
+begin
+ ReturnOutputArg(
+ {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
+ );
+end;
+
+
+procedure TPHPSystemLibrary.IsValidIdentProc;
+begin
+ ReturnOutputArg( IsValidIdent( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.IntToStrProc;
+begin
+ ReturnOutputArg( IntToStr( GetInputArgAsInteger( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.IntToHexProc;
+begin
+ ReturnOutputArg( IntToHex( GetInputArgAsInteger( 0 ),GetInputArgAsInteger( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToIntProc;
+begin
+ ReturnOutputArg( StrToInt( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToIntDefProc;
+begin
+ ReturnOutputArg( StrToIntDef( GetInputArgAsString( 0 ),GetInputArgAsInteger( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.FloatToStrProc;
+begin
+ ReturnOutputArg( FloatToStr( GetInputArgAsFloat( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.FormatFloatProc;
+begin
+ ReturnOutputArg( FormatFloat( GetInputArgAsString( 0 ),GetInputArgAsFloat( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToFloatProc;
+begin
+ ReturnOutputArg( StrToFloat( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.EncodeDateProc;
+begin
+ ReturnOutputArg( EncodeDate(
+ GetInputArgAsInteger( 0 ),
+ GetInputArgAsInteger( 1 ),
+ GetInputArgAsInteger( 2 ) ) );
+end;
+
+procedure TPHPSystemLibrary.EncodeTimeProc;
+begin
+ ReturnOutputArg( EncodeTime(
+ GetInputArgAsInteger( 0 ),
+ GetInputArgAsInteger( 1 ),
+ GetInputArgAsInteger( 2 ),
+ GetInputArgAsInteger( 3 ) ) );
+end;
+
+
+
+procedure TPHPSystemLibrary.DayOfWeekProc;
+begin
+ ReturnOutputArg( DayOfWeek( GetInputArgAsDateTime( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.DateProc;
+begin
+ ReturnOutputArg( Date );
+end;
+
+procedure TPHPSystemLibrary.TimeProc;
+begin
+ ReturnOutputArg( Time );
+end;
+
+procedure TPHPSystemLibrary.NowProc;
+begin
+ ReturnOutputArg( Now );
+end;
+
+procedure TPHPSystemLibrary.IncMonthProc;
+begin
+ ReturnOutputArg( IncMonth( GetInputArgAsDateTime( 0 ),GetInputArgAsInteger( 1 ) ) );
+end;
+
+procedure TPHPSystemLibrary.IsLeapYearProc;
+begin
+ ReturnOutputArg( IsLeapYear( GetInputArgAsInteger( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.DateToStrProc;
+begin
+ ReturnOutputArg( DateToStr( GetInputArgAsDateTime( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.TimeToStrProc;
+begin
+ ReturnOutputArg( TimeToStr( GetInputArgAsDateTime( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.DateTimeToStrProc;
+begin
+ ReturnOutputArg( DateTimeToStr( GetInputArgAsDateTime( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToDateProc;
+begin
+ ReturnOutputArg( StrToDate( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToTimeProc;
+begin
+ ReturnOutputArg( StrToTime( GetInputArgAsString( 0 ) ) );
+end;
+
+procedure TPHPSystemLibrary.StrToDateTimeProc;
+begin
+ ReturnOutputArg( StrToDateTime( GetInputArgAsString( 0 ) ) );
+end;
+
+
+procedure TPHPSystemLibrary.BeepProc;
+begin
+ Beep;
+end;
+
+
+procedure TPHPSystemLibrary.RoundProc;
+begin
+ ReturnOutputArg( Integer(Round( GetInputArgAsFloat( 0 ) )) );
+end;
+
+procedure TPHPSystemLibrary.TruncProc;
+begin
+ ReturnOutputArg( Integer(Trunc( GetInputArgAsFloat( 0 ) )) );
+end;
+
+procedure TPHPSystemLibrary.CopyProc;
+begin
+ ReturnOutputArg( Copy(
+ GetInputArgAsString( 0 ),
+ GetInputArgAsInteger( 1 ),
+ GetInputArgAsInteger( 2 ) ) );
+end;
+
+
+procedure TPHPSystemLibrary.PosProc;
+begin
+ ReturnOutputArg( pos(GetInputArgAsString( 0 ),GetInputArgAsString( 1 )) );
+end;
+
+procedure TPHPSystemLibrary.LengthProc;
+begin
+ ReturnOutputArg( Length( GetInputArgAsString( 0 ) ) );
+end;
+
+
+procedure TPHPSystemLibrary.RandomProc;
+begin
+ ReturnOutputArg( Random );
+end;
+
end.
\ No newline at end of file
diff --git a/PHPProjectWizard.pas b/Source/PHPProjectWizard.pas
similarity index 94%
rename from PHPProjectWizard.pas
rename to Source/PHPProjectWizard.pas
index 4580361..78c8a6e 100644
--- a/PHPProjectWizard.pas
+++ b/Source/PHPProjectWizard.pas
@@ -1,583 +1,583 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: PHPProjectWizard.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit PHPProjectWizard;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ToolsAPI,
- {$IFDEF VERSION6}
- DesignIntf,
- DesignEditors,
- DMForm,
- {$ELSE}
- dsgnintf,
- dmdesigner,
- {$ENDIF}
- PHPModules;
-
-type
- TPHPProjectWizard = class(TNotifierObject, IOTAWizard,
- {$IFDEF VERSION10}IOTAREpositoryWizard, IOTARepositoryWizard60,
- IOTARepositoryWizard80, {$ELSE}IOTARepositoryWizard, {$ENDIF} IOTAProjectWizard)
- public
- // IOTAWizard
- function GetIDString: string;
- function GetName: string;
- function GetState: TWizardState;
- procedure Execute;
- // IOTARepositoryWizard
- function GetAuthor: string;
- function GetComment: string;
- function GetPage: string;
- {$IFDEF VERSION10}
- function GetGalleryCategory: IOTAGalleryCategory;
- function GetPersonality: string;
- function GetDesigner: string;
- {$ENDIF}
- {$IFDEF VERSION6}
- function GetGlyph : cardinal;
- {$ELSE}
- function GetGlyph: HICON;
- {$ENDIF}
- end;
-
- TPHPProjectCreator = class(TInterfacedObject, IOTACreator, IOTAProjectCreator {$IFDEF VERSION9},IOTAProjectCreator80{$ENDIF})
- public
- // IOTACreator
- function GetCreatorType: string;
- function GetExisting: Boolean;
- function GetFileSystem: string;
- function GetOwner: IOTAModule;
- function GetUnnamed: Boolean;
- // IOTAProjectCreator
- function GetFileName: string;
- function GetOptionFileName: string;
- function GetShowSource: Boolean;
- procedure NewDefaultModule;
- function NewOptionSource(const ProjectName: string): IOTAFile;
- procedure NewProjectResource(const Project: IOTAProject);
- function NewProjectSource(const ProjectName: string): IOTAFile;
- {$IFDEF VERSION9}
- function GetProjectPersonality: string;
- procedure NewDefaultProjectModule(const Project: IOTAProject);
- {$ENDIF}
- end;
-
- TPHPProjectSourceFile = class(TInterfacedObject, IOTAFile)
- private
- FSource: string;
- FProjectName : string;
- public
- function GetSource: string;
- function GetAge: TDateTime;
- constructor Create(const Source: string);
- constructor CreateNamedProject(AProjectName : string);
- end;
-
-
- TPHPModuleCreator = class(TInterfacedObject, IOTACreator, IOTAModuleCreator)
- public
- // IOTACreator
- function GetCreatorType: string;
- function GetExisting: Boolean;
- function GetFileSystem: string;
- function GetOwner: IOTAModule;
- function GetUnnamed: Boolean;
- // IOTAModuleCreator
- function GetAncestorName: string;
- function GetImplFileName: string;
- function GetIntfFileName: string;
- function GetFormName: string;
- function GetMainForm: Boolean;
- function GetShowForm: Boolean;
- function GetShowSource: Boolean;
- function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
- function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
- function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
- procedure FormCreated(const FormEditor: IOTAFormEditor);
- end;
-
-
- TPHPExtensionSourceFile = class(TInterfacedObject, IOTAFile)
- private
- FSource: string;
- public
- function GetSource: string;
- function GetAge: TDateTime;
- constructor Create(const Source: string);
- end;
-
-procedure Register;
-
-implementation
-
-{$R PHPProjectwizard.RES}
-
-const
- CRLF = #13#10;
-
-procedure Register;
-begin
- RegisterPackageWizard(TPHPProjectWizard.Create);
-end;
-
-
-function GetActiveProjectGroup: IOTAProjectGroup;
-var
- ModuleServices: IOTAModuleServices;
- i: Integer;
-
-begin
- Result := nil;
- ModuleServices := BorlandIDEServices as IOTAModuleServices;
- for i := 0 to ModuleServices.ModuleCount - 1 do
- if Succeeded(ModuleServices.Modules[i].QueryInterface(IOTAProjectGroup, Result)) then
- Break;
-end;
-
-
-{ TPHPProjectWizard }
-
-{$IFDEF VERSION10}
-function TPHPProjectWizard.GetGalleryCategory: IOTAGalleryCategory;
-begin
- Result := (BorlandIDEServices as IOTAGalleryCategoryManager).FindCategory(sCategoryDelphiNew);
-end;
-
-function TPHPProjectWizard.GetPersonality: string;
-begin
- Result := sDelphiPersonality;
-end;
-
-function TPHPProjectWizard.GetDesigner : string;
-begin
- Result := dVCL;
-end;
-
-{$ENDIF}
-
-procedure TPHPProjectWizard.Execute;
-
-begin
- try
- (BorlandIDEServices as IOTAModuleServices).CreateModule(TPHPProjectCreator.Create as {$IFDEF VERSION9}IOTAProjectCreator80{$ELSE}IOTAProjectCreator{$ENDIF});
- (BorlandIDEServices as IOTAModuleServices).CreateModule(TPHPModuleCreator.Create as IOTAModuleCreator );
- except
- MessageDlg('PHP Project Wizard error while generate'+#13+#10+'project''s sources.', mtError, [mbOK], 0);
- end;
-end;
-
-function TPHPProjectWizard.GetAuthor: string;
-begin
- Result := 'Perevoznyk';
-end;
-
-function TPHPProjectWizard.GetComment: string;
-begin
- Result := 'PHP Project Creator';
-end;
-
-{$IFDEF VERSION6}
-function TPHPProjectWizard.GetGlyph: cardinal;
-{$ELSE}
-function TPHPProjectWizard.GetGlyph: HICON;
-{$ENDIF}
-begin
- Result := LoadIcon(hInstance, 'PHPWIZARDICO');
-end;
-
-function TPHPProjectWizard.GetIDString: string;
-begin
- Result := '{74D480FC-0608-4D34-AEA6-643728BD3CB9}';
-end;
-
-function TPHPProjectWizard.GetName: string;
-begin
- Result := 'PHP Extension';
-end;
-
-function TPHPProjectWizard.GetPage: string;
-begin
- {$IFDEF VERSION10}
- Result := 'Delphi Files';
- {$ELSE}
- Result := 'New';
- {$ENDIF}
-end;
-
-function TPHPProjectWizard.GetState: TWizardState;
-begin
- Result := [wsEnabled];
-end;
-
-
-
-{ TPHPProjectCreator }
-
-function TPHPProjectCreator.GetCreatorType: string;
-begin
- Result := sLibrary;
-end;
-
-function TPHPProjectCreator.GetExisting: Boolean;
-begin
- Result := False; // Create a new project
-end;
-
-function TPHPProjectCreator.GetFileName: string;
-{$IFNDEF VERSION9}
-var
- i: Integer;
- j: Integer;
- ProjGroup: IOTAProjectGroup;
- Found: Boolean;
- TempFileName: string;
- TempFileName2: string;
-{$ENDIF}
-begin
-{$IFDEF VERSION9}
- Result := '';
-{$ELSE}
-
-
- Result := GetCurrentDir + '\' + 'Project%d' + '.dpr'; { do not localize }
-
- ProjGroup := GetActiveProjectGroup;
-
- if ProjGroup <> nil then
- begin
- for j := 0 to ProjGroup.ProjectCount-1 do
- begin
- Found := False;
- TempFileName2 := Format(Result, [j+1]);
-
- for i := 0 to ProjGroup.ProjectCount-1 do
- begin
- try
- TempFileName := ProjGroup.Projects[i].FileName;
- if AnsiCompareFileName(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
- begin
- Found := True;
- Break;
- end;
- except on E: Exception do
- if not (E is EIntfCastError) then
- raise;
- end;
- end;
-
- if not Found then
- begin
- Result := TempFileName2;
- Exit;
- end;
- end;
- Result := Format(Result, [ProjGroup.ProjectCount+1]);
- end
- else
- Result := Format(Result, [1]);
-{$ENDIF}
-end;
-
-function TPHPProjectCreator.GetFileSystem: string;
-begin
- Result := ''; // Default
-end;
-
-function TPHPProjectCreator.GetOptionFileName: string;
-begin
- Result := ''; // Default
-end;
-
-
-function TPHPProjectCreator.GetOwner: IOTAModule;
-begin
- Result := GetActiveProjectGroup;
-end;
-
-
-{$IFDEF VERSION9}
-function TPHPProjectCreator.GetProjectPersonality: string;
-begin
- Result := sDelphiPersonality;
-end;
-{$ENDIF}
-
-function TPHPProjectCreator.GetShowSource: Boolean;
-begin
- Result := True; // Show the source in the editor
-end;
-
-function TPHPProjectCreator.GetUnnamed: Boolean;
-begin
- Result := True; // Project needs to be named/saved
-end;
-
-procedure TPHPProjectCreator.NewDefaultModule;
-begin
-end;
-
-
-{$IFDEF VERSION9}
-procedure TPHPProjectCreator.NewDefaultProjectModule(
- const Project: IOTAProject);
-begin
- NewDefaultModule;
-end;
-{$ENDIF}
-
-function TPHPProjectCreator.NewOptionSource(const ProjectName: string): IOTAFile;
-begin
- Result := nil; // For BCB only
-end;
-
-procedure TPHPProjectCreator.NewProjectResource(const Project: IOTAProject);
-begin
- // No resources needed
-end;
-
-function TPHPProjectCreator.NewProjectSource(const ProjectName: string): IOTAFile;
-begin
- Result := TPHPProjectSourceFile.CreateNamedProject(ProjectName) as IOTAFile;
-end;
-
-
-{ TPHPProjectSourceFile }
-
-constructor TPHPProjectSourceFile.Create(const Source: string);
-begin
- FSource := Source;
-end;
-
-constructor TPHPProjectSourceFile.CreateNamedProject(AProjectName: string);
-begin
- inherited Create;
- FProjectName := AProjectName;
-end;
-
-function TPHPProjectSourceFile.GetAge: TDateTime;
-begin
- Result := -1;
-end;
-
-function TPHPProjectSourceFile.GetSource: string;
-var
- ProjectSource : string;
-begin
- ProjectSource :=
- 'library '+FProjectName+';' + CRLF +
- CRLF +
- 'uses' + CRLF +
- ' Windows,'+ CRLF +
- ' SysUtils,'+ CRLF +
- ' phpApp,' + CRLF +
- ' phpModules;'+ CRLF;
-
- ProjectSource := ProjectSource +
- CRLF+
- '{$R *.RES}' + CRLF +
- CRLF +
- 'begin' + CRLF +
- ' Application.Initialize;' + CRLF +
- ' Application.Run;' + CRLF +
- 'end.';
- Result := ProjectSource;
-end;
-
-{ TPHPModuleCreator }
-
-procedure TPHPModuleCreator.FormCreated(const FormEditor: IOTAFormEditor);
-begin
- // Nothing
-end;
-
-function TPHPModuleCreator.GetAncestorName: string;
-begin
- Result := 'PHPExtension';
-end;
-
-function TPHPModuleCreator.GetCreatorType: string;
-begin
- // Return sUnit or sText as appropriate
- Result := sForm;
-end;
-
-function TPHPModuleCreator.GetExisting: Boolean;
-begin
- Result := False;
-end;
-
-function TPHPModuleCreator.GetFileSystem: string;
-begin
- Result := '';
-end;
-
-function TPHPModuleCreator.GetFormName: string;
-begin
- Result := '';
-end;
-
-function TPHPModuleCreator.GetImplFileName: string;
-begin
- Result := '';
-end;
-
-function TPHPModuleCreator.GetIntfFileName: string;
-begin
- Result := '';
-end;
-
-function TPHPModuleCreator.GetMainForm: Boolean;
-begin
- Result := False;
-end;
-
-function TPHPModuleCreator.GetOwner: IOTAModule;
-{$IFNDEF VERSION9}
-var
- ModuleServices: IOTAModuleServices;
- Module: IOTAModule;
- NewModule: IOTAModule;
-{$ENDIF}
-begin
-{$IFDEF VERSION9}
- Result := nil;
-{$ELSE}
-
-
- // You may prefer to return the project group's ActiveProject instead
- Result := nil;
- ModuleServices := (BorlandIDEServices as IOTAModuleServices);
- Module := ModuleServices.CurrentModule;
-
- if Module <> nil then
- begin
- if Module.QueryInterface(IOTAProject, NewModule) = S_OK then
- Result := NewModule
-
- {$IFDEF VERSION5ONLY} // Delphi 5
- else if Module.GetOwnerCount > 0 then
- begin
- NewModule := Module.GetOwner(0);
- {$ELSE} // Delphi 6+
- else if Module.OwnerModuleCount > 0 then
- begin
- NewModule := Module.OwnerModules[0];
- {$ENDIF}
- if NewModule <> nil then
- if NewModule.QueryInterface(IOTAProject, Result) <> S_OK then
- Result := nil;
- end;
- end;
-{$ENDIF}
-end;
-
-function TPHPModuleCreator.GetShowForm: Boolean;
-begin
- Result := True;
-end;
-
-function TPHPModuleCreator.GetShowSource: Boolean;
-begin
- Result := True;
-end;
-
-function TPHPModuleCreator.GetUnnamed: Boolean;
-begin
- Result := True;
-end;
-
-function TPHPModuleCreator.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
-begin
- Result := nil;
-end;
-
-function TPHPModuleCreator.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
-var
- Form,
- Ancestor : string;
- st : string;
-begin
- Form := FormIdent;
- Ancestor := AncestorIdent;
-
- St:= 'unit ' + ModuleIdent + ';' + CRLF + CRLF +
- 'interface' + CRLF + CRLF +
- 'uses' + CRLF +
- ' Windows,' + CRLF +
- ' Messages,' + CRLF +
- ' SysUtils,' + CRLF +
- ' Classes,' + CRLF +
- ' Forms,' + CRLF +
- ' zendTypes,'+ CRLF +
- ' zendAPI,' + CRLF +
- ' phpTypes,' + CRLF +
- ' phpAPI,' + CRLF +
- ' phpFunctions,' + CRLF +
- ' PHPModules;' + CRLF + CRLF +
- 'type' + CRLF + CRLF +
- ' T' + Form + ' = class(T' + Ancestor + ')' + CRLF +
- ' private' + CRLF +
- ' { Private declarations }' + CRLF +
- ' public' + CRLF +
- ' { Public declarations }' + CRLF +
- ' end;' + CRLF + CRLF +
- 'var' + CRLF +
- ' ' +Form + ': T' + Form + ';'+ CRLF + CRLF +
- 'implementation' + CRLF + CRLF +
- '{$R *.DFM}' + CRLF + CRLF +
- 'end.' ;
- Result := TPHPExtensionSourceFile.Create(St);
-end;
-
-function TPHPModuleCreator.NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
-begin
- Result := nil;
-end;
-
-
-constructor TPHPExtensionSourceFile.Create(const Source: string);
-begin
- FSource := Source;
-end;
-
-function TPHPExtensionSourceFile.GetAge: TDateTime;
-begin
- Result := -1;
-end;
-
-function TPHPExtensionSourceFile.GetSource: string;
-begin
- Result := FSource;
-end;
-
-
-{ RegisterContainerModule }
-procedure RegisterContainerModule;
-begin
- {$IFDEF VERSION5ONLY}
- RegisterCustomModule(TPHPExtension, TDataModuleDesignerCustomModule);
- {$ELSE}
- RegisterCustomModule(TPHPExtension, TDataModuleCustomModule);
- {$ENDIF}
-end;
-
-Initialization
- RegisterContainerModule();
-
-Finalization
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: PHPProjectWizard.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit PHPProjectWizard;
+
+interface
+
+uses
+ {$IFNDEF FPC} Windows, {$ELSE} LCLType,LCLIntf,dynlibs,libc,{$ENDIF} Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ToolsAPI,
+ {$IFDEF VERSION6}
+ DesignIntf,
+ DesignEditors,
+ DMForm,
+ {$ELSE}
+ dsgnintf,
+ dmdesigner,
+ {$ENDIF}
+ PHPModules;
+
+type
+ TPHPProjectWizard = class(TNotifierObject, IOTAWizard,
+ {$IFDEF VERSION10}IOTAREpositoryWizard, IOTARepositoryWizard60,
+ IOTARepositoryWizard80, {$ELSE}IOTARepositoryWizard, {$ENDIF} IOTAProjectWizard)
+ public
+ // IOTAWizard
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+ // IOTARepositoryWizard
+ function GetAuthor: string;
+ function GetComment: string;
+ function GetPage: string;
+ {$IFDEF VERSION10}
+ function GetGalleryCategory: IOTAGalleryCategory;
+ function GetPersonality: string;
+ function GetDesigner: string;
+ {$ENDIF}
+ {$IFDEF VERSION6}
+ function GetGlyph : cardinal;
+ {$ELSE}
+ function GetGlyph: HICON;
+ {$ENDIF}
+ end;
+
+ TPHPProjectCreator = class(TInterfacedObject, IOTACreator, IOTAProjectCreator {$IFDEF VERSION9},IOTAProjectCreator80{$ENDIF})
+ public
+ // IOTACreator
+ function GetCreatorType: string;
+ function GetExisting: Boolean;
+ function GetFileSystem: string;
+ function GetOwner: IOTAModule;
+ function GetUnnamed: Boolean;
+ // IOTAProjectCreator
+ function GetFileName: string;
+ function GetOptionFileName: string;
+ function GetShowSource: Boolean;
+ procedure NewDefaultModule;
+ function NewOptionSource(const ProjectName: string): IOTAFile;
+ procedure NewProjectResource(const Project: IOTAProject);
+ function NewProjectSource(const ProjectName: string): IOTAFile;
+ {$IFDEF VERSION9}
+ function GetProjectPersonality: string;
+ procedure NewDefaultProjectModule(const Project: IOTAProject);
+ {$ENDIF}
+ end;
+
+ TPHPProjectSourceFile = class(TInterfacedObject, IOTAFile)
+ private
+ FSource: string;
+ FProjectName : string;
+ public
+ function GetSource: string;
+ function GetAge: TDateTime;
+ constructor Create(const Source: string);
+ constructor CreateNamedProject(AProjectName : string);
+ end;
+
+
+ TPHPModuleCreator = class(TInterfacedObject, IOTACreator, IOTAModuleCreator)
+ public
+ // IOTACreator
+ function GetCreatorType: string;
+ function GetExisting: Boolean;
+ function GetFileSystem: string;
+ function GetOwner: IOTAModule;
+ function GetUnnamed: Boolean;
+ // IOTAModuleCreator
+ function GetAncestorName: string;
+ function GetImplFileName: string;
+ function GetIntfFileName: string;
+ function GetFormName: string;
+ function GetMainForm: Boolean;
+ function GetShowForm: Boolean;
+ function GetShowSource: Boolean;
+ function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
+ function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+ function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+ procedure FormCreated(const FormEditor: IOTAFormEditor);
+ end;
+
+
+ TPHPExtensionSourceFile = class(TInterfacedObject, IOTAFile)
+ private
+ FSource: string;
+ public
+ function GetSource: string;
+ function GetAge: TDateTime;
+ constructor Create(const Source: string);
+ end;
+
+procedure Register;
+
+implementation
+
+{$R PHPProjectwizard.RES}
+
+const
+ CRLF = #13#10;
+
+procedure Register;
+begin
+ RegisterPackageWizard(TPHPProjectWizard.Create);
+end;
+
+
+function GetActiveProjectGroup: IOTAProjectGroup;
+var
+ ModuleServices: IOTAModuleServices;
+ i: Integer;
+
+begin
+ Result := nil;
+ ModuleServices := BorlandIDEServices as IOTAModuleServices;
+ for i := 0 to ModuleServices.ModuleCount - 1 do
+ if Succeeded(ModuleServices.Modules[i].QueryInterface(IOTAProjectGroup, Result)) then
+ Break;
+end;
+
+
+{ TPHPProjectWizard }
+
+{$IFDEF VERSION10}
+function TPHPProjectWizard.GetGalleryCategory: IOTAGalleryCategory;
+begin
+ Result := (BorlandIDEServices as IOTAGalleryCategoryManager).FindCategory(sCategoryDelphiNew);
+end;
+
+function TPHPProjectWizard.GetPersonality: string;
+begin
+ Result := sDelphiPersonality;
+end;
+
+function TPHPProjectWizard.GetDesigner : string;
+begin
+ Result := dVCL;
+end;
+
+{$ENDIF}
+
+procedure TPHPProjectWizard.Execute;
+
+begin
+ try
+ (BorlandIDEServices as IOTAModuleServices).CreateModule(TPHPProjectCreator.Create as {$IFDEF VERSION9}IOTAProjectCreator80{$ELSE}IOTAProjectCreator{$ENDIF});
+ (BorlandIDEServices as IOTAModuleServices).CreateModule(TPHPModuleCreator.Create as IOTAModuleCreator );
+ except
+ MessageDlg('PHP Project Wizard error while generate'+#13+#10+'project''s sources.', mtError, [mbOK], 0);
+ end;
+end;
+
+function TPHPProjectWizard.GetAuthor: string;
+begin
+ Result := 'Perevoznyk';
+end;
+
+function TPHPProjectWizard.GetComment: string;
+begin
+ Result := 'PHP Project Creator';
+end;
+
+{$IFDEF VERSION6}
+function TPHPProjectWizard.GetGlyph: cardinal;
+{$ELSE}
+function TPHPProjectWizard.GetGlyph: HICON;
+{$ENDIF}
+begin
+ Result := LoadIcon(hInstance, 'PHPWIZARDICO');
+end;
+
+function TPHPProjectWizard.GetIDString: string;
+begin
+ Result := '{74D480FC-0608-4D34-AEA6-643728BD3CB9}';
+end;
+
+function TPHPProjectWizard.GetName: string;
+begin
+ Result := 'PHP Extension';
+end;
+
+function TPHPProjectWizard.GetPage: string;
+begin
+ {$IFDEF VERSION10}
+ Result := 'Delphi Files';
+ {$ELSE}
+ Result := 'New';
+ {$ENDIF}
+end;
+
+function TPHPProjectWizard.GetState: TWizardState;
+begin
+ Result := [wsEnabled];
+end;
+
+
+
+{ TPHPProjectCreator }
+
+function TPHPProjectCreator.GetCreatorType: string;
+begin
+ Result := sLibrary;
+end;
+
+function TPHPProjectCreator.GetExisting: Boolean;
+begin
+ Result := False; // Create a new project
+end;
+
+function TPHPProjectCreator.GetFileName: string;
+{$IFNDEF VERSION9}
+var
+ i: Integer;
+ j: Integer;
+ ProjGroup: IOTAProjectGroup;
+ Found: Boolean;
+ TempFileName: string;
+ TempFileName2: string;
+{$ENDIF}
+begin
+{$IFDEF VERSION9}
+ Result := '';
+{$ELSE}
+
+
+ Result := GetCurrentDir + '\' + 'Project%d' + '.dpr'; { do not localize }
+
+ ProjGroup := GetActiveProjectGroup;
+
+ if ProjGroup <> nil then
+ begin
+ for j := 0 to ProjGroup.ProjectCount-1 do
+ begin
+ Found := False;
+ TempFileName2 := Format(Result, [j+1]);
+
+ for i := 0 to ProjGroup.ProjectCount-1 do
+ begin
+ try
+ TempFileName := ProjGroup.Projects[i].FileName;
+ if CompareFileName(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
+ begin
+ Found := True;
+ Break;
+ end;
+ except on E: Exception do
+ if not (E is EIntfCastError) then
+ raise;
+ end;
+ end;
+
+ if not Found then
+ begin
+ Result := TempFileName2;
+ Exit;
+ end;
+ end;
+ Result := Format(Result, [ProjGroup.ProjectCount+1]);
+ end
+ else
+ Result := Format(Result, [1]);
+{$ENDIF}
+end;
+
+function TPHPProjectCreator.GetFileSystem: string;
+begin
+ Result := ''; // Default
+end;
+
+function TPHPProjectCreator.GetOptionFileName: string;
+begin
+ Result := ''; // Default
+end;
+
+
+function TPHPProjectCreator.GetOwner: IOTAModule;
+begin
+ Result := GetActiveProjectGroup;
+end;
+
+
+{$IFDEF VERSION9}
+function TPHPProjectCreator.GetProjectPersonality: string;
+begin
+ Result := sDelphiPersonality;
+end;
+{$ENDIF}
+
+function TPHPProjectCreator.GetShowSource: Boolean;
+begin
+ Result := True; // Show the source in the editor
+end;
+
+function TPHPProjectCreator.GetUnnamed: Boolean;
+begin
+ Result := True; // Project needs to be named/saved
+end;
+
+procedure TPHPProjectCreator.NewDefaultModule;
+begin
+end;
+
+
+{$IFDEF VERSION9}
+procedure TPHPProjectCreator.NewDefaultProjectModule(
+ const Project: IOTAProject);
+begin
+ NewDefaultModule;
+end;
+{$ENDIF}
+
+function TPHPProjectCreator.NewOptionSource(const ProjectName: string): IOTAFile;
+begin
+ Result := nil; // For BCB only
+end;
+
+procedure TPHPProjectCreator.NewProjectResource(const Project: IOTAProject);
+begin
+ // No resources needed
+end;
+
+function TPHPProjectCreator.NewProjectSource(const ProjectName: string): IOTAFile;
+begin
+ Result := TPHPProjectSourceFile.CreateNamedProject(ProjectName) as IOTAFile;
+end;
+
+
+{ TPHPProjectSourceFile }
+
+constructor TPHPProjectSourceFile.Create(const Source: string);
+begin
+ FSource := Source;
+end;
+
+constructor TPHPProjectSourceFile.CreateNamedProject(AProjectName: string);
+begin
+ inherited Create;
+ FProjectName := AProjectName;
+end;
+
+function TPHPProjectSourceFile.GetAge: TDateTime;
+begin
+ Result := -1;
+end;
+
+function TPHPProjectSourceFile.GetSource: string;
+var
+ ProjectSource : string;
+begin
+ ProjectSource :=
+ 'library '+FProjectName+';' + CRLF +
+ CRLF +
+ 'uses' + CRLF +
+ ' Windows,'+ CRLF +
+ ' SysUtils,'+ CRLF +
+ ' phpApp,' + CRLF +
+ ' phpModules;'+ CRLF;
+
+ ProjectSource := ProjectSource +
+ CRLF+
+ '{$R *.RES}' + CRLF +
+ CRLF +
+ 'begin' + CRLF +
+ ' Application.Initialize;' + CRLF +
+ ' Application.Run;' + CRLF +
+ 'end.';
+ Result := ProjectSource;
+end;
+
+{ TPHPModuleCreator }
+
+procedure TPHPModuleCreator.FormCreated(const FormEditor: IOTAFormEditor);
+begin
+ // Nothing
+end;
+
+function TPHPModuleCreator.GetAncestorName: string;
+begin
+ Result := 'PHPExtension';
+end;
+
+function TPHPModuleCreator.GetCreatorType: string;
+begin
+ // Return sUnit or sText as appropriate
+ Result := sForm;
+end;
+
+function TPHPModuleCreator.GetExisting: Boolean;
+begin
+ Result := False;
+end;
+
+function TPHPModuleCreator.GetFileSystem: string;
+begin
+ Result := '';
+end;
+
+function TPHPModuleCreator.GetFormName: string;
+begin
+ Result := '';
+end;
+
+function TPHPModuleCreator.GetImplFileName: string;
+begin
+ Result := '';
+end;
+
+function TPHPModuleCreator.GetIntfFileName: string;
+begin
+ Result := '';
+end;
+
+function TPHPModuleCreator.GetMainForm: Boolean;
+begin
+ Result := False;
+end;
+
+function TPHPModuleCreator.GetOwner: IOTAModule;
+{$IFNDEF VERSION9}
+var
+ ModuleServices: IOTAModuleServices;
+ Module: IOTAModule;
+ NewModule: IOTAModule;
+{$ENDIF}
+begin
+{$IFDEF VERSION9}
+ Result := nil;
+{$ELSE}
+
+
+ // You may prefer to return the project group's ActiveProject instead
+ Result := nil;
+ ModuleServices := (BorlandIDEServices as IOTAModuleServices);
+ Module := ModuleServices.CurrentModule;
+
+ if Module <> nil then
+ begin
+ if Module.QueryInterface(IOTAProject, NewModule) = S_OK then
+ Result := NewModule
+
+ {$IFDEF VERSION5ONLY} // Delphi 5
+ else if Module.GetOwnerCount > 0 then
+ begin
+ NewModule := Module.GetOwner(0);
+ {$ELSE} // Delphi 6+
+ else if Module.OwnerModuleCount > 0 then
+ begin
+ NewModule := Module.OwnerModules[0];
+ {$ENDIF}
+ if NewModule <> nil then
+ if NewModule.QueryInterface(IOTAProject, Result) <> S_OK then
+ Result := nil;
+ end;
+ end;
+{$ENDIF}
+end;
+
+function TPHPModuleCreator.GetShowForm: Boolean;
+begin
+ Result := True;
+end;
+
+function TPHPModuleCreator.GetShowSource: Boolean;
+begin
+ Result := True;
+end;
+
+function TPHPModuleCreator.GetUnnamed: Boolean;
+begin
+ Result := True;
+end;
+
+function TPHPModuleCreator.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
+begin
+ Result := nil;
+end;
+
+function TPHPModuleCreator.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+var
+ Form,
+ Ancestor : string;
+ st : string;
+begin
+ Form := FormIdent;
+ Ancestor := AncestorIdent;
+
+ St:= 'unit ' + ModuleIdent + ';' + CRLF + CRLF +
+ 'interface' + CRLF + CRLF +
+ 'uses' + CRLF +
+ ' Windows,' + CRLF +
+ ' Messages,' + CRLF +
+ ' SysUtils,' + CRLF +
+ ' Classes,' + CRLF +
+ ' Forms,' + CRLF +
+ ' zendTypes,'+ CRLF +
+ ' zendAPI,' + CRLF +
+ ' phpTypes,' + CRLF +
+ ' phpAPI,' + CRLF +
+ ' phpFunctions,' + CRLF +
+ ' PHPModules;' + CRLF + CRLF +
+ 'type' + CRLF + CRLF +
+ ' T' + Form + ' = class(T' + Ancestor + ')' + CRLF +
+ ' private' + CRLF +
+ ' { Private declarations }' + CRLF +
+ ' public' + CRLF +
+ ' { Public declarations }' + CRLF +
+ ' end;' + CRLF + CRLF +
+ 'var' + CRLF +
+ ' ' +Form + ': T' + Form + ';'+ CRLF + CRLF +
+ 'implementation' + CRLF + CRLF +
+ '{$R *.DFM}' + CRLF + CRLF +
+ 'end.' ;
+ Result := TPHPExtensionSourceFile.Create(St);
+end;
+
+function TPHPModuleCreator.NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+begin
+ Result := nil;
+end;
+
+
+constructor TPHPExtensionSourceFile.Create(const Source: string);
+begin
+ FSource := Source;
+end;
+
+function TPHPExtensionSourceFile.GetAge: TDateTime;
+begin
+ Result := -1;
+end;
+
+function TPHPExtensionSourceFile.GetSource: string;
+begin
+ Result := FSource;
+end;
+
+
+{ RegisterContainerModule }
+procedure RegisterContainerModule;
+begin
+ {$IFDEF VERSION5ONLY}
+ RegisterCustomModule(TPHPExtension, TDataModuleDesignerCustomModule);
+ {$ELSE}
+ RegisterCustomModule(TPHPExtension, TDataModuleCustomModule);
+ {$ENDIF}
+end;
+
+Initialization
+ RegisterContainerModule();
+
+Finalization
+
end.
\ No newline at end of file
diff --git a/PHPProjectWizard.res b/Source/PHPProjectWizard.res
similarity index 100%
rename from PHPProjectWizard.res
rename to Source/PHPProjectWizard.res
diff --git a/PHPTypes.pas b/Source/PHPTypes.pas
similarity index 71%
rename from PHPTypes.pas
rename to Source/PHPTypes.pas
index 6674f0f..bbca1da 100644
--- a/PHPTypes.pas
+++ b/Source/PHPTypes.pas
@@ -1,411 +1,438 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpTypes.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit PHPTypes;
-
-interface
-
-uses
- Windows, ZENDTypes;
-
-{$IFDEF PHP4}
-const
- phpVersion = 4;
-{$ELSE}
-const
- phpVersion = 5;
-{$ENDIF}
-
-const
- TRequestName : array [0..3] of string =
- ('GET',
- 'PUT',
- 'POST',
- 'HEAD');
-
-
-const
- // connection status states
- PHP_CONNECTION_NORMAL = 0;
- PHP_CONNECTION_ABORTED = 1;
- PHP_CONNECTION_TIMEOUT = 2;
-
- PARSE_POST = 0;
- PARSE_GET = 1;
- PARSE_COOKIE = 2;
- PARSE_STRING = 3;
-
-const
- SAPI_HEADER_ADD = (1 shl 0);
- SAPI_HEADER_DELETE_ALL = (1 shl 1);
- SAPI_HEADER_SEND_NOW = (1 shl 2);
- SAPI_HEADER_SENT_SUCCESSFULLY = 1;
- SAPI_HEADER_DO_SEND = 2;
- SAPI_HEADER_SEND_FAILED = 3;
- SAPI_DEFAULT_MIMETYPE = 'text/html';
- SAPI_DEFAULT_CHARSET = '';
- SAPI_PHP_VERSION_HEADER = 'X-Powered-By: PHP';
-
-
-const
- short_track_vars_names : array [0..5] of string =
- ('_POST',
- '_GET',
- '_COOKIE',
- '_SERVER',
- '_ENV',
- '_FILES' );
-
-
-const
- PHP_ENTRY_NAME_COLOR = '#ccccff';
- PHP_CONTENTS_COLOR = '#cccccc';
- PHP_HEADER_COLOR = '#9999cc';
- PHP_INFO_GENERAL = (1 shl 0);
- PHP_INFO_CREDITS = (1 shl 1);
- PHP_INFO_CONFIGURATION = (1 shl 2);
- PHP_INFO_MODULES = (1 shl 3);
- PHP_INFO_ENVIRONMENT = (1 shl 4);
- PHP_INFO_VARIABLES = (1 shl 5);
- PHP_INFO_LICENSE = (1 shl 6);
- PHP_INFO_ALL = $FFFFFFFF;
- PHP_CREDITS_GROUP = (1 shl 0);
- PHP_CREDITS_GENERAL = (1 shl 1);
- PHP_CREDITS_SAPI = (1 shl 2);
- PHP_CREDITS_MODULES = (1 shl 3);
- PHP_CREDITS_DOCS = (1 shl 4);
- PHP_CREDITS_FULLPAGE = (1 shl 5);
- PHP_CREDITS_QA = (1 shl 6);
- PHP_CREDITS_WEB = (1 shl 7);
- PHP_CREDITS_ALL = $FFFFFFFF;
- PHP_LOGO_GUID = 'PHPE9568F34-D428-11d2-A769-00AA001ACF42';
- PHP_EGG_LOGO_GUID = 'PHPE9568F36-D428-11d2-A769-00AA001ACF42';
- ZEND_LOGO_GUID = 'PHPE9568F35-D428-11d2-A769-00AA001ACF42';
- PHP_CREDITS_GUID = 'PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000';
-
-
-const
- ENT_HTML_QUOTE_NONE = 0;
- ENT_HTML_QUOTE_SINGLE = 1;
- ENT_HTML_QUOTE_DOUBLE = 2;
- ENT_COMPAT = ENT_HTML_QUOTE_DOUBLE;
- ENT_QUOTES = (ENT_HTML_QUOTE_DOUBLE or ENT_HTML_QUOTE_SINGLE);
- ENT_NOQUOTES = ENT_HTML_QUOTE_NONE;
-
-
-const
- PHP_INI_USER = ZEND_INI_USER;
- PHP_INI_PERDIR = ZEND_INI_PERDIR;
- PHP_INI_SYSTEM = ZEND_INI_SYSTEM;
- PHP_INI_ALL = ZEND_INI_ALL;
- PHP_INI_DISPLAY_ORIG = ZEND_INI_DISPLAY_ORIG;
- PHP_INI_DISPLAY_ACTIVE = ZEND_INI_DISPLAY_ACTIVE;
- PHP_INI_STAGE_STARTUP = ZEND_INI_STAGE_STARTUP;
- PHP_INI_STAGE_SHUTDOWN = ZEND_INI_STAGE_SHUTDOWN;
- PHP_INI_STAGE_ACTIVATE = ZEND_INI_STAGE_ACTIVATE;
- PHP_INI_STAGE_DEACTIVATE = ZEND_INI_STAGE_DEACTIVATE;
- PHP_INI_STAGE_RUNTIME = ZEND_INI_STAGE_RUNTIME;
-
-const
- TRACK_VARS_POST = 0;
- TRACK_VARS_GET = 1;
- TRACK_VARS_COOKIE = 2;
- TRACK_VARS_SERVER = 3;
- TRACK_VARS_ENV = 4;
- TRACK_VARS_FILES = 5;
-
-type
- error_handling_t = (EH_NORMAL, EH_SUPPRESS, EH_THROW);
-
-
-type
- TRequestType = (rtGet, rtPut, rtPost, rtHead);
-
-type
- Psapi_header_struct = ^Tsapi_header_struct;
- sapi_header_struct =
- record
- header : PChar;
- header_len : uint;
- replace : zend_bool;
- end;
- Tsapi_header_struct = sapi_header_struct;
-
- Psapi_headers_struct = ^Tsapi_headers_struct;
- sapi_headers_struct =
- record
- headers : zend_llist;
- http_response_code : Integer;
- send_default_content_type : Byte;
- mimetype : PChar;
- http_status_line : PChar;
- end;
- Tsapi_headers_struct = sapi_headers_struct;
-
-
- Psapi_post_entry = ^Tsapi_post_entry;
- sapi_post_entry =
- record
- content_type : PChar;
- content_type_len : uint;
- post_reader : pointer; //void (*post_reader)(TSRMLS_D);
- post_handler : pointer; //void (*post_handler)(char *content_type_dup, void *arg TSRMLS_DC);
- end;
- Tsapi_post_entry = sapi_post_entry;
-
-{* Some values in this structure needs to be filled in before
- * calling sapi_activate(). We WILL change the `char *' entries,
- * so make sure that you allocate a separate buffer for them
- * and that you free them after sapi_deactivate().
- *}
-
- Psapi_request_info = ^Tsapi_request_info;
- sapi_request_info =
- record
- request_method : PChar;
- query_string : PChar;
- post_data : PChar;
- raw_post_data : PChar;
- cookie_data : PChar;
- content_length : Longint;
- post_data_length : uint;
- raw_post_data_length : uint;
- path_translated : PChar;
- request_uri : PChar;
- content_type : PChar;
- headers_only : zend_bool;
- no_headers : zend_bool;
- {$IFDEF PHP5}
- headers_read : zend_bool;
- {$ENDIF}
- post_entry : PSapi_post_entry;
- content_type_dup : PChar;
- //for HTTP authentication
- auth_user : PChar;
- auth_password : PChar;
- {$IFDEF PHP510}
- auth_digest : PChar;
- {$ENDIF}
- //this is necessary for the CGI SAPI module
- argv0 : PChar;
- //this is necessary for Safe Mode
- current_user : PChar;
- current_user_length : Integer;
- //this is necessary for CLI module
- argc : Integer;
- argv : ^PChar;
- {$IFDEF PHP510}
- proto_num : integer;
- {$ENDIF}
- end;
- Tsapi_request_info = sapi_request_info;
-
- Psapi_header_line = ^Tsapi_header_line;
- sapi_header_line =
- record
- line : PChar;
- line_len : uint;
- response_code : Longint;
- end;
- Tsapi_header_line = sapi_header_line;
-
- Psapi_globals_struct = ^Tsapi_globals_struct;
- _sapi_globals_struct =
- record
- server_context : Pointer;
- request_info : sapi_request_info;
- sapi_headers : sapi_headers_struct;
- read_post_bytes : Integer;
- headers_sent : Byte;
- global_stat : stat;
- default_mimetype : PChar;
- default_charset : PChar;
- rfc1867_uploaded_files : PHashTable;
- post_max_size : Longint;
- options : Integer;
- {$IFDEF PHP5}
- sapi_started : zend_bool;
- {$IFDEF PHP510}
- global_request_time : longint;
- known_post_content_types : THashTable;
- {$ENDIF}
- {$ENDIF}
- end;
- Tsapi_globals_struct = _sapi_globals_struct;
-
-
- Psapi_module_struct = ^Tsapi_module_struct;
-
- TModuleShutdownFunc = function (globals : pointer) : Integer; cdecl;
- TModuleStartupFunc = function (sapi_module : psapi_module_struct) : integer; cdecl;
-
- sapi_module_struct =
- record
- name : PChar;
- pretty_name : PChar;
- startup : TModuleStartupFunc; //int (*startup)(struct _sapi_module_struct *sapi_module);
- shutdown : TModuleShutdownFunc; //int (*shutdown)(struct _sapi_module_struct *sapi_module);
- activate : pointer;
- deactivate : pointer;
- ub_write : pointer;
- flush : pointer;
- stat : pointer;
- getenv : pointer;
- sapi_error : pointer;
- header_handler : pointer;
- send_headers : pointer;
- send_header : pointer;
- read_post : pointer;
- read_cookies : pointer;
- register_server_variables : pointer;
- log_message : pointer;
- {$IFDEF PHP5}
- {$IFDEF PHP510}
- get_request_time : pointer;
- {$ENDIF}
- {$ENDIF}
- php_ini_path_override : PChar;
- block_interruptions : pointer;
- unblock_interruptions : pointer;
- default_post_reader : pointer;
- treat_data : pointer;
- executable_location : PChar;
- php_ini_ignore : Integer;
- {******************************}
- {IMPORTANT: }
- {Please check your php version }
- {******************************}
- {$IFDEF PHP4}
- {$IFDEF PHP433}
- get_fd : pointer;
- force_http_10 : pointer;
- get_target_uid : pointer;
- get_target_gid : pointer;
- ini_defaults : pointer;
- phpinfo_as_text : integer;
- {$ENDIF}
- {$ENDIF}
- {$IFDEF PHP5}
- get_fd : pointer;
- force_http_10 : pointer;
- get_target_uid : pointer;
- get_target_gid : pointer;
- input_filter : pointer;
- ini_defaults : pointer;
- phpinfo_as_text : integer;
- {$ENDIF}
- end;
- Tsapi_module_struct = sapi_module_struct;
-
-
-type
- PPHP_URL = ^TPHP_URL;
- Tphp_url =
- record
- scheme : PChar;
- user : PChar;
- pass : PChar;
- host : PChar;
- port : Smallint;
- path : PChar;
- query : PChar;
- fragment : PChar;
- end;
-
-
-type
- arg_separators =
- record
- output : PChar;
- input : PChar;
- end;
-
-type
- Pphp_Core_Globals = ^TPHP_core_globals;
- Tphp_core_globals =
- record
- magic_quotes_gpc : zend_bool;
- magic_quotes_runtime : zend_bool;
- magic_quotes_sybase : zend_bool;
- safe_mode : zend_bool;
- allow_call_time_pass_reference : boolean;
- implicit_flush : boolean;
- output_buffering : Integer;
- safe_mode_include_dir : PChar;
- safe_mode_gid : boolean;
- sql_safe_mode : boolean;
- enable_dl :boolean;
- output_handler : PChar;
- unserialize_callback_func : PChar;
- safe_mode_exec_dir : PChar;
- memory_limit : Longint;
- max_input_time : Longint;
- track_errors : boolean;
- display_errors : boolean;
- display_startup_errors : boolean;
- log_errors : boolean;
- log_errors_max_len : Longint;
- ignore_repeated_errors : boolean;
- ignore_repeated_source : boolean;
- report_memleaks : boolean;
- error_log : PChar;
- doc_root : PChar;
- user_dir : PChar;
- include_path : PChar;
- open_basedir : PChar;
- extension_dir : PChar;
- upload_tmp_dir : PChar;
- upload_max_filesize : Longint;
- error_append_string : PChar;
- error_prepend_string : PChar;
- auto_prepend_file : PChar;
- auto_append_file : PChar;
- arg_separator : arg_separators;
- gpc_order : PChar;
- variables_order : PChar;
- rfc1867_protected_variables : THashTable;
- connection_status : Smallint;
- ignore_user_abort : Smallint;
- header_is_being_sent : Byte;
- tick_functions : zend_llist;
- http_globals : array[0..5] of pzval;
- expose_php : boolean;
- register_globals : boolean;
- register_argc_argv : boolean;
- y2k_compliance : boolean;
- docref_root : PChar;
- docref_ext : PChar;
- html_errors : boolean;
- xmlrpc_errors : boolean;
- xmlrpc_error_number : Longint;
- modules_activated : boolean;
- file_uploads : boolean;
- during_request_startup : boolean;
- allow_url_fopen : boolean;
- always_populate_raw_post_data : boolean;
- {$IFDEF PHP510}
- report_zend_debug : boolean;
- last_error_message : PChar;
- last_error_file : pchar;
- last_error_lineno : integer;
- error_handling : error_handling_t;
- exception_class : Pointer;
- disable_functions : PChar;
- disable_classes : PChar;
- {$ENDIF}
- end;
-
-implementation
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpTypes.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit PHPTypes;
+
+interface
+
+uses
+ {$IFNDEF FPC} Windows{$ELSE} LCLType{$ENDIF}, ZendTypes;
+
+const
+ phpVersion = {$IFDEF PHP7}7{$ELSE}5{$ENDIF};
+
+const
+ TRequestName : array [0..3] of zend_ustr =
+ ('GET',
+ 'PUT',
+ 'POST',
+ 'HEAD');
+
+
+const
+ // connection status states
+ PHP_CONNECTION_NORMAL = 0;
+ PHP_CONNECTION_ABORTED = 1;
+ PHP_CONNECTION_TIMEOUT = 2;
+
+ PARSE_POST = 0;
+ PARSE_GET = 1;
+ PARSE_COOKIE = 2;
+ PARSE_STRING = 3;
+
+const
+ SAPI_HEADER_ADD = (1 shl 0);
+ SAPI_HEADER_DELETE_ALL = (1 shl 1);
+ SAPI_HEADER_SEND_NOW = (1 shl 2);
+ SAPI_HEADER_SENT_SUCCESSFULLY = 1;
+ SAPI_HEADER_DO_SEND = 2;
+ SAPI_HEADER_SEND_FAILED = 3;
+ SAPI_DEFAULT_MIMETYPE = 'text/html';
+ SAPI_DEFAULT_CHARSET = '';
+ SAPI_PHP_VERSION_HEADER = 'X-Powered-By: PHP';
+
+
+const
+ short_track_vars_names : array [0..5] of zend_ustr =
+ ('_POST',
+ '_GET',
+ '_COOKIE',
+ '_SERVER',
+ '_ENV',
+ '_FILES' );
+
+
+const
+ PHP_ENTRY_NAME_COLOR = '#ccccff';
+ PHP_CONTENTS_COLOR = '#cccccc';
+ PHP_HEADER_COLOR = '#9999cc';
+ PHP_INFO_GENERAL = (1 shl 0);
+ PHP_INFO_CREDITS = (1 shl 1);
+ PHP_INFO_CONFIGURATION = (1 shl 2);
+ PHP_INFO_MODULES = (1 shl 3);
+ PHP_INFO_ENVIRONMENT = (1 shl 4);
+ PHP_INFO_VARIABLES = (1 shl 5);
+ PHP_INFO_LICENSE = (1 shl 6);
+ PHP_INFO_ALL = $FFFFFFFF;
+ PHP_CREDITS_GROUP = (1 shl 0);
+ PHP_CREDITS_GENERAL = (1 shl 1);
+ PHP_CREDITS_SAPI = (1 shl 2);
+ PHP_CREDITS_MODULES = (1 shl 3);
+ PHP_CREDITS_DOCS = (1 shl 4);
+ PHP_CREDITS_FULLPAGE = (1 shl 5);
+ PHP_CREDITS_QA = (1 shl 6);
+ PHP_CREDITS_WEB = (1 shl 7);
+ PHP_CREDITS_ALL = $FFFFFFFF;
+ PHP_LOGO_GUID = 'PHPE9568F34-D428-11d2-A769-00AA001ACF42';
+ PHP_EGG_LOGO_GUID = 'PHPE9568F36-D428-11d2-A769-00AA001ACF42';
+ ZEND_LOGO_GUID = 'PHPE9568F35-D428-11d2-A769-00AA001ACF42';
+ PHP_CREDITS_GUID = 'PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000';
+
+
+const
+ ENT_HTML_QUOTE_NONE = 0;
+ ENT_HTML_QUOTE_SINGLE = 1;
+ ENT_HTML_QUOTE_DOUBLE = 2;
+ ENT_COMPAT = ENT_HTML_QUOTE_DOUBLE;
+ ENT_QUOTES = (ENT_HTML_QUOTE_DOUBLE or ENT_HTML_QUOTE_SINGLE);
+ ENT_NOQUOTES = ENT_HTML_QUOTE_NONE;
+
+
+const
+ PHP_INI_USER = ZEND_INI_USER;
+ PHP_INI_PERDIR = ZEND_INI_PERDIR;
+ PHP_INI_SYSTEM = ZEND_INI_SYSTEM;
+ PHP_INI_ALL = ZEND_INI_ALL;
+ PHP_INI_DISPLAY_ORIG = ZEND_INI_DISPLAY_ORIG;
+ PHP_INI_DISPLAY_ACTIVE = ZEND_INI_DISPLAY_ACTIVE;
+ PHP_INI_STAGE_STARTUP = ZEND_INI_STAGE_STARTUP;
+ PHP_INI_STAGE_SHUTDOWN = ZEND_INI_STAGE_SHUTDOWN;
+ PHP_INI_STAGE_ACTIVATE = ZEND_INI_STAGE_ACTIVATE;
+ PHP_INI_STAGE_DEACTIVATE = ZEND_INI_STAGE_DEACTIVATE;
+ PHP_INI_STAGE_RUNTIME = ZEND_INI_STAGE_RUNTIME;
+
+const
+ TRACK_VARS_POST = 0;
+ TRACK_VARS_GET = 1;
+ TRACK_VARS_COOKIE = 2;
+ TRACK_VARS_SERVER = 3;
+ TRACK_VARS_ENV = 4;
+ TRACK_VARS_FILES = 5;
+
+type
+ error_handling_t = (EH_NORMAL, EH_SUPPRESS, EH_THROW);
+
+
+type
+ TRequestType = (rtGet, rtPut, rtPost, rtHead);
+ TPHPRequestType = (prtGet, prtPost);
+
+type
+ Psapi_header_struct = ^Tsapi_header_struct;
+ sapi_header_struct =
+ record
+ header : zend_pchar;
+ header_len : uint;
+ {$IFNDEF PHP530}
+ replace : zend_bool;
+ {$ENDIF}
+ end;
+ Tsapi_header_struct = sapi_header_struct;
+
+ Psapi_headers_struct = ^Tsapi_headers_struct;
+ sapi_headers_struct =
+ record
+ headers : zend_llist;
+ http_response_code : Integer;
+ send_default_content_type : Byte;
+ mimetype : zend_pchar;
+ http_status_line : zend_pchar;
+ end;
+ Tsapi_headers_struct = sapi_headers_struct;
+
+
+ Psapi_post_entry = ^Tsapi_post_entry;
+ sapi_post_entry =
+ record
+ content_type : zend_pchar;
+ content_type_len : uint;
+ post_reader : pointer; //void (*post_reader)(TSRMLS_D);
+ post_handler : pointer; //void (*post_handler)(char *content_type_dup, void *arg TSRMLS_DC);
+ end;
+ Tsapi_post_entry = sapi_post_entry;
+
+{* Some values in this structure needs to be filled in before
+ * calling sapi_activate(). We WILL change the `char *' entries,
+ * so make sure that you allocate a separate buffer for them
+ * and that you free them after sapi_deactivate().
+ *}
+
+ Psapi_request_info = ^Tsapi_request_info;
+ sapi_request_info =
+ record
+ request_method : zend_pchar;
+ query_string : zend_pchar;
+ post_data : zend_pchar;
+ raw_post_data : zend_pchar;
+ cookie_data : zend_pchar;
+ content_length : Longint;
+ post_data_length : uint;
+ raw_post_data_length : uint;
+ path_translated : zend_pchar;
+ request_uri : zend_pchar;
+ content_type : zend_pchar;
+ headers_only : zend_bool;
+ no_headers : zend_bool;
+ {$IFDEF PHP5}
+ headers_read : zend_bool;
+ {$ENDIF}
+ post_entry : PSapi_post_entry;
+ content_type_dup : zend_pchar;
+ //for HTTP authentication
+ auth_user : zend_pchar;
+ auth_password : zend_pchar;
+ {$IFDEF PHP510}
+ auth_digest : zend_pchar;
+ {$ENDIF}
+ //this is necessary for the CGI SAPI module
+ argv0 : zend_pchar;
+ //this is necessary for Safe Mode
+ current_user : zend_pchar;
+ current_user_length : Integer;
+ //this is necessary for CLI module
+ argc : Integer;
+ argv : ^zend_pchar;
+ {$IFDEF PHP510}
+ proto_num : integer;
+ {$ENDIF}
+ end;
+ Tsapi_request_info = sapi_request_info;
+
+ Psapi_header_line = ^Tsapi_header_line;
+ sapi_header_line =
+ record
+ line : zend_pchar;
+ line_len : uint;
+ response_code : Longint;
+ end;
+ Tsapi_header_line = sapi_header_line;
+
+ Psapi_globals_struct = ^Tsapi_globals_struct;
+ _sapi_globals_struct =
+ record
+ server_context : Pointer;
+ request_info : sapi_request_info;
+ sapi_headers : sapi_headers_struct;
+ read_post_bytes : Integer;
+ headers_sent : Byte;
+ global_stat : stat;
+ default_mimetype : zend_pchar;
+ default_charset : zend_pchar;
+ rfc1867_uploaded_files : PHashTable;
+ post_max_size : Longint;
+ options : Integer;
+ {$IFDEF PHP5}
+ sapi_started : zend_bool;
+ {$IFDEF PHP510}
+ global_request_time : longint;
+ known_post_content_types : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ {$ENDIF}
+ {$ENDIF}
+ end;
+ Tsapi_globals_struct = _sapi_globals_struct;
+
+
+ Psapi_module_struct = ^Tsapi_module_struct;
+
+ TModuleShutdownFunc = function (globals : pointer) : Integer; cdecl;
+ TModuleStartupFunc = function (sapi_module : psapi_module_struct) : integer; cdecl;
+
+ sapi_module_struct =
+ record
+ name : zend_pchar;
+ pretty_name : zend_pchar;
+
+ startup : TModuleStartupFunc;
+ //int (*startup)(struct _sapi_module_struct *sapi_module);
+
+ shutdown : TModuleShutdownFunc;
+ //int (*shutdown)(struct _sapi_module_struct *sapi_module);
+
+ activate : Pointer;
+ // int (*activate)(TSRMLS_D);
+
+ deactivate : Pointer;
+ // int (*activate)(TSRMLS_D);
+
+ ub_write : pointer;
+ flush : pointer;
+ stat : pointer;
+ getenv : pointer;
+
+ sapi_error : pointer;
+
+ header_handler : pointer;
+ send_headers : pointer;
+ send_header : pointer;
+
+ read_post : pointer;
+ read_cookies : pointer;
+
+ register_server_variables : pointer;
+ log_message : pointer;
+ get_request_time : pointer;
+ terminate_process : pointer;
+
+ php_ini_path_override : zend_pchar;
+
+ block_interruptions : pointer;
+ unblock_interruptions : pointer;
+
+ default_post_reader : pointer;
+ treat_data : pointer;
+ executable_location : zend_pchar;
+
+ php_ini_ignore : Integer;
+
+ // PHP 5.4
+ php_ini_ignore_cwd : Integer;
+
+ get_fd : pointer;
+ force_http_10 : pointer;
+ get_target_uid : pointer;
+ get_target_gid : pointer;
+
+ input_filter : pointer;
+
+ ini_defaults : pointer;
+
+ phpinfo_as_text : integer;
+
+ {$IFDEF PHP520}
+ ini_entries : zend_pchar;
+ {$ENDIF}
+
+ additional_functions: Pointer;
+ input_filter_init : Pointer;
+ end;
+
+ Tsapi_module_struct = sapi_module_struct;
+
+
+type
+ PPHP_URL = ^TPHP_URL;
+ Tphp_url =
+ record
+ scheme : zend_pchar;
+ user : zend_pchar;
+ pass : zend_pchar;
+ host : zend_pchar;
+ port : Smallint;
+ path : zend_pchar;
+ query : zend_pchar;
+ fragment : zend_pchar;
+ end;
+
+
+type
+ arg_separators =
+ record
+ output : zend_pchar;
+ input : zend_pchar;
+ end;
+
+type
+ Pphp_Core_Globals = ^TPHP_core_globals;
+ Tphp_core_globals =
+ record
+ magic_quotes_gpc : zend_bool;
+ magic_quotes_runtime : zend_bool;
+ magic_quotes_sybase : zend_bool;
+ safe_mode : zend_bool;
+ allow_call_time_pass_reference : boolean;
+ implicit_flush : boolean;
+ output_buffering : Integer;
+ safe_mode_include_dir : zend_pchar;
+ safe_mode_gid : boolean;
+ sql_safe_mode : boolean;
+ enable_dl :boolean;
+ output_handler : zend_pchar;
+ unserialize_callback_func : zend_pchar;
+ safe_mode_exec_dir : zend_pchar;
+ memory_limit : Longint;
+ max_input_time : Longint;
+ track_errors : boolean;
+ display_errors : boolean;
+ display_startup_errors : boolean;
+ log_errors : boolean;
+ log_errors_max_len : Longint;
+ ignore_repeated_errors : boolean;
+ ignore_repeated_source : boolean;
+ report_memleaks : boolean;
+ error_log : zend_pchar;
+ doc_root : zend_pchar;
+ user_dir : zend_pchar;
+ include_path : zend_pchar;
+ open_basedir : zend_pchar;
+ extension_dir : zend_pchar;
+ upload_tmp_dir : zend_pchar;
+ upload_max_filesize : Longint;
+ error_append_string : zend_pchar;
+ error_prepend_string : zend_pchar;
+ auto_prepend_file : zend_pchar;
+ auto_append_file : zend_pchar;
+ arg_separator : arg_separators;
+ gpc_order : zend_pchar;
+ variables_order : zend_pchar;
+ rfc1867_protected_variables : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ connection_status : Smallint;
+ ignore_user_abort : Smallint;
+ header_is_being_sent : Byte;
+ tick_functions : zend_llist;
+ http_globals : array[0..5] of pzval;
+ expose_php : boolean;
+ register_globals : boolean;
+ register_argc_argv : boolean;
+ y2k_compliance : boolean;
+ docref_root : zend_pchar;
+ docref_ext : zend_pchar;
+ html_errors : boolean;
+ xmlrpc_errors : boolean;
+ xmlrpc_error_number : Longint;
+ modules_activated : boolean;
+ file_uploads : boolean;
+ during_request_startup : boolean;
+ allow_url_fopen : boolean;
+ always_populate_raw_post_data : boolean;
+ {$IFDEF PHP510}
+ report_zend_debug : boolean;
+ last_error_message : zend_pchar;
+ last_error_file : zend_pchar;
+ last_error_lineno : integer;
+ {$IFNDEF PHP530}
+ error_handling : error_handling_t;
+ exception_class : Pointer;
+ {$ENDIF}
+ disable_functions : zend_pchar;
+ disable_classes : zend_pchar;
+ {$ENDIF}
+ {$IFDEF PHP520}
+ allow_url_include : zend_bool;
+ com_initialized : zend_bool;
+ max_input_nesting_level : longint;
+ in_user_include : zend_bool;
+ {$ENDIF}
+
+ {$IFDEF PHP530}
+ user_ini_filename : zend_pchar;
+ user_ini_cache_ttl : longint;
+ request_order : zend_pchar;
+ mail_x_header : zend_bool;
+ mail_log : zend_pchar;
+ {$ENDIF}
+ end;
+
+implementation
+
+end.
+
diff --git a/Php4DelphiGroup5.bpg b/Source/Php4DelphiGroup5.bpg
similarity index 97%
rename from Php4DelphiGroup5.bpg
rename to Source/Php4DelphiGroup5.bpg
index afac98c..c769d53 100644
--- a/Php4DelphiGroup5.bpg
+++ b/Source/Php4DelphiGroup5.bpg
@@ -1,23 +1,23 @@
-#------------------------------------------------------------------------------
-VERSION = BWS.01
-#------------------------------------------------------------------------------
-!ifndef ROOT
-ROOT = $(MAKEDIR)\..
-!endif
-#------------------------------------------------------------------------------
-MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
-DCC = $(ROOT)\bin\dcc32.exe $**
-BRCC = $(ROOT)\bin\brcc32.exe $**
-#------------------------------------------------------------------------------
-PROJECTS = php4DelphiR5.bpl php4DelphiD5.bpl
-#------------------------------------------------------------------------------
-default: $(PROJECTS)
-#------------------------------------------------------------------------------
-
-php4DelphiR5.bpl: php4DelphiR5.dpk
- $(DCC)
-
-php4DelphiD5.bpl: php4DelphiD5.dpk
- $(DCC)
-
-
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR5.bpl php4DelphiD5.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR5.bpl: php4DelphiR5.dpk
+ $(DCC)
+
+php4DelphiD5.bpl: php4DelphiD5.dpk
+ $(DCC)
+
+
diff --git a/Php4DelphiGroup7.bpg b/Source/Php4DelphiGroup7.bpg
similarity index 97%
rename from Php4DelphiGroup7.bpg
rename to Source/Php4DelphiGroup7.bpg
index a913e38..061fc88 100644
--- a/Php4DelphiGroup7.bpg
+++ b/Source/Php4DelphiGroup7.bpg
@@ -1,23 +1,23 @@
-#------------------------------------------------------------------------------
-VERSION = BWS.01
-#------------------------------------------------------------------------------
-!ifndef ROOT
-ROOT = $(MAKEDIR)\..
-!endif
-#------------------------------------------------------------------------------
-MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
-DCC = $(ROOT)\bin\dcc32.exe $**
-BRCC = $(ROOT)\bin\brcc32.exe $**
-#------------------------------------------------------------------------------
-PROJECTS = php4DelphiR7.bpl php4DelphiD7.bpl
-#------------------------------------------------------------------------------
-default: $(PROJECTS)
-#------------------------------------------------------------------------------
-
-php4DelphiR7.bpl: php4DelphiR7.dpk
- $(DCC)
-
-php4DelphiD7.bpl: php4DelphiD7.dpk
- $(DCC)
-
-
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR7.bpl php4DelphiD7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR7.bpl: php4DelphiR7.dpk
+ $(DCC)
+
+php4DelphiD7.bpl: php4DelphiD7.dpk
+ $(DCC)
+
+
diff --git a/Source/ZENDAPI.pas b/Source/ZENDAPI.pas
new file mode 100644
index 0000000..fbed93f
--- /dev/null
+++ b/Source/ZENDAPI.pas
@@ -0,0 +1,3803 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ ZEND - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: ZENDAPI.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit zendAPI;
+
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+
+interface
+
+uses
+{$ifdef PHP_UNICODE}
+WideStrUtils,
+{$endif}
+ {$IFDEF FPC} LCLType,LCLIntf,dynlibs,libc{$ELSE}Windows{$ENDIF}, SysUtils,
+ ZendTypes, Variants,
+ PHPTypes
+ {$if defined(chameleon)}
+ ,zend_chameleon
+ {$ifend};
+type
+TArrayVariant = array of variant;
+ TWSDate = array of string;
+ PWSDate = ^TWSDate;
+ TASDate = array of AnsiString;
+ PASDate = ^TWSDate;
+{$if not defined(chameleon_load_firstmatch)}
+const
+PHPlp =
+{$IFDEF PHP7}
+ 'php7'
+{$ELSE}
+ {$IFDEF PHP5}
+ 'php5'
+ {$ELSE}
+ 'php'
+ {$ENDIF}
+{$ENDIF}
+{$IFDEF ZTS} + 'ts' {$ENDIF}
+{$IFDEF PHP_DEBUG} + '_debug' {$ENDIF}
+{$IFDEF WINDOWS}
+ + '.dll'
+{$ELSE}
+ + '.so'
+{$ENDIF};
+{$ifend}
+
+type
+ EPHP4DelphiException = class(Exception)
+ constructor Create(const Msg: zend_ustr);
+ end;
+ EPHP4DelphiHookException = class(Exception)
+ constructor Create(const Msg: zend_ustr);
+ end;
+
+ align_test = record
+ case Integer of
+ 1: (ptr: Pointer; );
+ 2: (dbl: Double; );
+ 3: (lng: Longint; );
+ end;
+const
+ PLATFORM_ALIGNMENT = (SizeOf(align_test));
+{$IFNDEF PHP_UNICODE}
+function AnsiFormat(const Format: AnsiString; const Args: array of const): AnsiString;
+{$ENDIF}
+{$ifdef VERSION12}
+function Lfunc(var Func: Pointer; addr: LPCWSTR): Bool;
+function HFunc(const Func: Pointer; addr: LPCWSTR): Bool;
+{$else}
+function Lfunc(var Func: Pointer; addr: PAnsiChar): BOOL;
+function HFunc(const Func: Pointer; addr: PAnsiChar): Bool;
+{$endif}
+function LoadZEND(const LibraryPath: zend_ustr = PHPlp) : boolean;
+function __fgsapi(sapi_globals_value:pointer; tsrmls_dc:pointer): Pointer;
+
+procedure UnloadZEND;
+function ZENDLoaded: boolean;
+
+{Memory management functions}
+var
+ {$IFNDEF PHP7}
+ zend_strndup : function(s: zend_pchar; length: Integer): zend_pchar; cdecl;
+ {$ELSE}
+ zend_strndup : function(s:zend_pchar; length:size_t):zend_pchar; cdecl;
+ {$ENDIF}
+ _emalloc : function(size: size_t; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
+ _efree : procedure(ptr: pointer; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint); cdecl;
+ _ecalloc : function(nmemb: size_t; size: size_t; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
+ _erealloc : function(ptr: pointer; size: size_t; allow_failure: integer; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
+ _estrdup : function(const s: zend_pchar; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
+ _estrndup : function(s: zend_pchar; Len: Cardinal; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): zend_pchar; cdecl;
+ {$ifdef PHP_UNICODE}
+ _estrndupu : function(s: PUTF8Char; Len: Cardinal; __zend_filename: PUTF8Char;
+ __zend_lineno: uint; __zend_orig_filename: PUTF8Char;
+ __zend_orig_line_no: uint): PUTF8Char; cdecl;
+ {$endif}
+function emalloc(size: size_t): pointer;
+procedure efree(ptr: pointer);
+function ecalloc(nmemb: size_t; size: size_t): pointer;
+function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
+function estrdup(const s: zend_pchar): zend_pchar;
+function estrndup(s: zend_pchar; len: Cardinal): zend_pchar;
+function STR_EMPTY_ALLOC : zend_pchar;
+
+var
+ zend_set_memory_limit : function(memory_limit: uint): integer; cdecl;
+ start_memory_manager : procedure(TSRMLS_D: pointer); cdecl;
+ shutdown_memory_manager : procedure(silent: integer; clean_cache: integer; TSRMLS_DC: pointer); cdecl;
+
+
+ { startup/shutdown }
+
+var
+
+ zend_register_resource : function (rsrc_result : pzval; rsrc_pointer : pointer; rsrc_type : integer) : integer; cdecl;
+ zend_fetch_resource : function (passed_id :{$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}; TSRMLS_DC : pointer; default_id : integer; resource_type_name : zend_pchar; found_resource_type : pointer; num_resource_types: integer; resource_type: integer) : pointer; cdecl;
+ zend_list_insert : function (ptr : pointer; _type: integer) : integer; cdecl;
+ {$IFNDEF PHP7}
+ _zend_list_addref : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
+ _zend_list_delete : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
+ _zend_list_find : function (id : integer; _type : pointer; TSRMLS_DC : pointer) : pointer; cdecl;
+ {$ENDIF}
+ zend_rsrc_list_get_rsrc_type : function (resource: integer; TSRMLS_DC : pointer) : zend_pchar; cdecl;
+ zend_fetch_list_dtor_id : function (type_name : zend_pchar) : integer; cdecl;
+ zend_register_list_destructors_ex : function (ld : pointer; pld : pointer; type_name : zend_pchar; module_number : integer) : integer; cdecl;
+
+
+
+{disable functions}
+
+var
+ zend_disable_function : function(function_name : zend_pchar; function_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
+ zend_disable_class : function(class_name : zend_pchar; class_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
+
+{$IFNDEF PHP7}
+ _zend_hash_add_or_update : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
+ nKeyLength : uint; pData : pointer; nDataSize : uint; pDes : pointer;
+ flag : integer; __zend_filename: zend_pchar; __zend_lineno: uint) : integer; cdecl;
+{$ENDIF}
+ function zend_hash_add_or_update(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
+ nKeyLength : uint; pData : {$IFDEF PHP7}pzval{$ELSE}pointer{$ENDIF}; nDataSize : uint; pDes : pointer;
+ flag : integer) : integer; cdecl;
+
+
+function zend_hash_add(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
+
+var
+ _zend_hash_init : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint;
+ pHashFunction : pointer; pDestructor : pointer; persistent: zend_bool;
+ __zend_filename: zend_pchar; __zend_lineno: uint) : integer; cdecl;
+ _zend_hash_init_ex : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint;
+ pHashFunction : pointer; pDestructor : pointer; persistent : zend_bool;
+ bApplyProtection : zend_bool; __zend_filename: zend_pchar; __zend_lineno: uint): integer; cdecl;
+
+ function zend_hash_init (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
+ pDestructor : pointer; persistent: zend_bool) : integer; cdecl;
+ function zend_hash_init_ex (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
+ pDestructor : pointer; persistent : zend_bool; bApplyProtection : zend_bool): integer; cdecl;
+
+ {$IFDEF PHP7}
+ function zend_hash_num_elements(ht: Pzend_array): integer;
+ function add_char_to_string (_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+ function add_string_to_string(_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+ {$ENDIF}
+var
+ zend_hash_destroy : procedure(ht: PHashTable); cdecl;
+ zend_hash_clean : procedure(ht: PHashTable); cdecl;
+
+ { additions/updates/changes }
+
+
+
+
+ zend_hash_add_empty_element : function(ht: PHashTable; arKey: zend_pchar;
+ nKeyLength: uint): Integer; cdecl;
+
+
+
+
+var
+ zend_hash_graceful_destroy : procedure(ht: PHashTable); cdecl;
+ {$IFNDEF PHP7}
+ zend_hash_graceful_reverse_destroy : zend_hash_graceful_reverse_destroy_t;
+ {$ENDIF}
+ zend_hash_apply : procedure(ht: PHashTable; apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_hash_apply_with_argument : procedure(ht: PHashTable;
+ apply_func: pointer; _noname1: Pointer; TSRMLS_DC: Pointer); cdecl;
+
+ { This function should be used with special care (in other words,
+ * it should usually not be used). When used with the ZEND_HASH_APPLY_STOP
+ * return value, it assumes things about the order of the elements in the hash.
+ * Also, it does not provide the same kind of reentrancy protection that
+ * the standard apply functions do.
+ }
+
+ zend_hash_reverse_apply : procedure(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
+ apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
+
+ { Deletes }
+
+ {$IFDEF PHP7}
+ zend_hash_del_key_or_index : function(ht: Pzend_array; key:Pzend_string):longint; cdecl;
+ {$ELSE}
+ zend_hash_del_key_or_index : function(ht: PHashTable; arKey: zend_pchar;
+ nKeyLength: uint; h: ulong; flag: Integer): Integer; cdecl;
+ {$ENDIF}
+ zend_get_hash_value : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar;
+ nKeyLength: uint): Longint; cdecl;
+
+ { Data retreival }
+
+ zend_hash_find : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint;
+ pData: Pointer): Integer; cdecl;
+
+ zend_hash_quick_find :
+ function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar;
+ nKeyLength: uint; h: ulong; out pData: ppzval): Integer; cdecl;
+
+ zend_hash_index_find : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; h: ulong; pData: Pointer): Integer; cdecl;
+
+ { Misc }
+
+ zend_hash_exists : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint): Integer; cdecl;
+
+ zend_hash_index_exists : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; h: ulong): Integer; cdecl;
+ {$IFNDEF PHP7}
+ zend_hash_next_free_element : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Longint; cdecl;
+ {$ENDIF}
+ { traversing }
+
+ zend_hash_move_forward_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
+
+ zend_hash_move_backwards_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
+
+ zend_hash_get_current_key_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ var str_index: zend_pchar; var str_length: uint; var num_index: ulong;
+ duplicate: boolean; pos: HashPosition): Integer; cdecl;
+
+ zend_hash_get_current_key_type_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
+
+ zend_hash_get_current_data_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pData: Pointer; pos: HashPosition): Integer; cdecl;
+
+ zend_hash_internal_pointer_reset_ex : procedure(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition); cdecl;
+
+ zend_hash_internal_pointer_end_ex : procedure(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition); cdecl;
+
+ { Copying, merging and sorting }
+
+ zend_hash_copy : procedure(target: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; source: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ pCopyConstructor: pointer; tmp: Pointer; size: uint); cdecl;
+
+
+ zend_hash_sort :
+ {$IFDEF PHP7}
+ function(ht:PZend_array; sort_func:sort_func_t; compare_func:compare_func_t; renumber:zend_bool):longint; cdecl;
+ {$ELSE}
+ function(ht: PHashTable; sort_func: pointer;
+ compare_func: pointer; renumber: Integer; TSRMLS_DC: Pointer): Integer; cdecl;
+ {$ENDIF}
+
+ zend_hash_compare : function(ht1: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; ht2: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ compar: pointer; ordered: boolean; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ zend_hash_minmax : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; compar: pointer;
+ flag: Integer; pData: Pointer; TSRMLS_DC: Pointer): Integer; cdecl;
+ {$IFNDEF PHP7}
+ zend_hash_num_elements : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Integer; cdecl;
+ {$ENDIF}
+ zend_hash_rehash : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Integer; cdecl;
+
+ zend_hash_func : function(arKey: zend_pchar; nKeyLength: uint): Longint; cdecl;
+
+
+function zend_hash_get_current_data(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; pData: Pointer): Integer; cdecl;
+procedure zend_hash_internal_pointer_reset(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}); cdecl;
+
+// zend_constants.h
+var
+ zend_get_constant : function(name: zend_pchar; name_len: uint; var result: zval;
+ TSRMLS_DC: Pointer): integer; cdecl;
+ {$if defined(PHP530)}
+ zend_register_null_constant : procedure(name: zend_pchar; name_len: uint;
+ flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_register_bool_constant : procedure(name: zend_pchar; name_len: uint;
+ bval: zend_bool; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_register_long_constant : procedure(name: zend_pchar; name_len: uint;
+ lval: Longint; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+ {$ifend}
+ zend_register_double_constant : procedure(name: zend_pchar; name_len: uint;
+ dval: Double; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_register_string_constant : procedure(name: zend_pchar; name_len: uint;
+ strval: zend_pchar; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_register_stringl_constant : procedure(name: zend_pchar; name_len: uint;
+ strval: zend_pchar; strlen: uint; flags: integer; module_number: integer;
+ TSRMLS_DC: Pointer); cdecl;
+
+ zend_register_constant : function(var c: zend_constant; TSRMLS_DC: Pointer): integer; cdecl;
+
+ zend_register_auto_global :
+ {$IFDEF PHP700}
+ function(name:Pzend_string; jit:boolean; instance_init_callback:Pointer): integer; cdecl;
+ {$ELSE}
+ {$IFDEF PHP5}
+ function(name: zend_pchar; name_len: uint; jit:boolean; instance_init_callback: Pointer; TSRMLS_DC: Pointer): integer; cdecl;
+ zend_activate_auto_globals: procedure(TSRMLS_C: Pointer); cdecl;
+ {$ELSE}
+ function(name: zend_pchar; name_len: uint; callback: Pointer; TSRMLS_DC: Pointer): integer; cdecl;
+ {$ENDIF}
+ {$ENDIF}
+procedure REGISTER_MAIN_LONG_CONSTANT(name: zend_pchar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
+procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: zend_pchar; dval: double; flags: integer; TSRMLS_DC: Pointer);
+procedure REGISTER_MAIN_STRING_CONSTANT(name: zend_pchar; str: zend_pchar; flags: integer; TSRMLS_DC: Pointer);
+procedure REGISTER_MAIN_STRINGL_CONSTANT(name: zend_pchar; str: zend_pchar; len: uint; flags: integer; TSRMLS_DC: Pointer);
+
+
+var
+ tsrm_startup : function(expected_threads: integer;
+ expected_resources: integer; debug_level: integer; debug_filename: zend_pchar): integer; cdecl;
+
+ ts_allocate_id : function(rsrc_id: pts_rsrc_id; size: size_t; ctor: pointer; dtor: pointer): ts_rsrc_id; cdecl;
+ // deallocates all occurrences of a given id
+ ts_free_id : procedure(id: ts_rsrc_id); cdecl;
+
+ tsrm_shutdown : procedure; cdecl;
+ ts_resource_ex : function(id: integer; p: pointer): pointer; cdecl;
+ ts_free_thread : procedure; cdecl;
+
+ zend_error : procedure(ErrType: integer; ErrText: zend_pchar); cdecl;
+ zend_error_cb : procedure; cdecl;
+
+ zend_eval_string : function(str: zend_pchar; ret_val: pointer; strname: zend_pchar; tsrm: pointer): integer; cdecl;
+ zend_eval_string_ex : function(str: zend_pchar; retval_ptr:pzval; string_name: zend_pchar; handle_exceptions:longint):longint; cdecl;
+ zend_make_compiled_string_description : function(a: zend_pchar; tsrm: pointer): zend_pchar; cdecl;
+ _zval_copy_ctor_func : procedure(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
+ _zval_dtor_func : procedure(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
+ _zval_ptr_dtor: procedure(val: ppzval; __zend_filename: zend_pchar); cdecl;
+ procedure _zval_copy_ctor (val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
+ procedure _zval_dtor(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
+
+var
+ zend_print_variable : function(val: pzval): integer; cdecl;
+
+
+ zend_get_compiled_filename : function(TSRMLS_DC: Pointer): zend_pchar; cdecl;
+ zend_get_compiled_lineno : function(TSRMLS_DC: Pointer): integer; cdecl;
+
+function ts_resource(id : integer) : pointer;
+function tsrmls_fetch : pointer;
+
+//procedure zenderror(Error : zend_pchar);
+
+var
+ zend_stack_init : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_push : function(stack: Pzend_stack; element: Pointer; size: Integer): Integer; cdecl;
+
+ zend_stack_top : function(stack: Pzend_stack; element: Pointer): Integer; cdecl;
+
+ zend_stack_del_top : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_int_top : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_is_empty : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_destroy : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_base : function(stack: Pzend_stack): Pointer; cdecl;
+
+ zend_stack_count : function(stack: Pzend_stack): Integer; cdecl;
+
+ zend_stack_apply : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer); cdecl;
+
+ zend_stack_apply_with_argument : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer; arg: Pointer); cdecl;
+
+
+ //zend_operators.h
+
+var
+ _convert_to_string : procedure(op: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
+
+procedure convert_to_string(op: pzval);
+
+var
+ add_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ sub_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ mul_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ div_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ mod_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ boolean_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ boolean_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
+
+ bitwise_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
+
+ bitwise_or_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ bitwise_and_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ bitwise_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ shift_left_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ shift_right_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ concat_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_not_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_not_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_smaller_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ is_smaller_or_equal_function : function(_result: Pzval; op1: Pzval; var op2: zval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ increment_function : function(op1: Pzval): Integer; cdecl;
+
+ decrement_function : function(op2: Pzval): Integer; cdecl;
+
+ convert_scalar_to_number : procedure(op: Pzval; TSRMLS_DC: Pointer); cdecl;
+
+ convert_to_long : procedure(op: Pzval); cdecl;
+
+ convert_to_double : procedure(op: Pzval); cdecl;
+
+ convert_to_long_base : procedure(op: Pzval; base: Integer); cdecl;
+
+ convert_to_null : procedure(op: Pzval); cdecl;
+
+ convert_to_boolean : procedure(op: Pzval); cdecl;
+
+ convert_to_array : procedure(op: Pzval); cdecl;
+
+ convert_to_object : procedure(op: Pzval); cdecl;
+ {$IFNDEF PHP7}
+ add_char_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
+
+ add_string_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
+ {$ENDIF}
+ zend_string_to_double : function(number: zend_pchar; length: zend_uint): Double; cdecl;
+
+ zval_is_true : function(op: Pzval): Integer; cdecl;
+
+ compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ numeric_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ string_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ zend_str_tolower : procedure(str: zend_pchar; length: Integer); cdecl;
+
+ zend_binary_zval_strcmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
+
+ zend_binary_zval_strncmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
+
+ zend_binary_zval_strcasecmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
+
+ zend_binary_zval_strncasecmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
+
+ zend_binary_strcmp : function(s1: zend_pchar; len1: uint; s2: zend_pchar; len2: uint): Integer; cdecl;
+
+ zend_binary_strncmp : function(s1: zend_pchar; len1: uint; s2: zend_pchar; len2: uint; length: uint): Integer; cdecl;
+
+ zend_binary_strcasecmp : function(s1: zend_pchar; len1: uint; s2: zend_pchar; len2: uint): Integer; cdecl;
+
+ zend_binary_strncasecmp : function(s1: zend_pchar; len1: uint; s2: zend_pchar; len2: uint; length: uint): Integer; cdecl;
+
+ zendi_smart_strcmp : procedure(_result: zval; s1: Pzval; s2: Pzval); cdecl;
+
+ zend_compare_symbol_tables : procedure(_result: Pzval; ht1: PHashTable; ht2: PHashTable; TSRMLS_DC: Pointer); cdecl;
+
+ zend_compare_arrays : procedure(_result: zval; a1: Pzval; a2: Pzval; TSRMLS_DC: Pointer); cdecl;
+
+ zend_compare_objects : procedure(_result: Pzval; o1: Pzval; o2: Pzval; TSRMLS_DC: Pointer); cdecl;
+
+ zend_atoi : function(str: zend_pchar; str_len: Integer): Integer; cdecl;
+
+ //zend_execute.h
+ get_active_function_name : function(TSRMLS_D: pointer): zend_pchar; cdecl;
+
+ zend_get_executed_filename : function(TSRMLS_D: pointer): zend_pchar; cdecl;
+
+ zend_get_executed_lineno : function(TSRMLS_DC: pointer): uint; cdecl;
+
+ zend_set_timeout : procedure(seconds: Longint); cdecl;
+
+ zend_unset_timeout : procedure(TSRMLS_D: pointer); cdecl;
+
+ zend_timeout : procedure(dummy: Integer); cdecl;
+
+
+var
+ zend_highlight : procedure(syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer); cdecl;
+
+ zend_strip : procedure(TSRMLS_D: pointer); cdecl;
+
+ highlight_file : function(filename: zend_pchar; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ highlight_string : function(str: Pzval; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; str_name: zend_pchar; TSRMLS_DC: Pointer): Integer; cdecl;
+
+ zend_html_putc : procedure(c: zend_uchar); cdecl;
+
+ zend_html_puts : procedure(s: zend_pchar; len: uint; TSRMLS_DC: Pointer); cdecl;
+
+ zend_parse_method_parameters:function(num_args:longint; TSRMLS_DC:Pointer; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+
+ zend_parse_method_parameters_ex:function(flags:longint; num_args:longint; TSRMLS_DC:Pointer; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+
+ {$IFDEF PHP7}
+ zend_parse_parameters_throw : function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ {$ELSE}
+ zend_indent : procedure; cdecl;
+ {$ENDIF}
+ Zend_Get_Parameters : function(ht:longint; param_count:longint):longint; cdecl varargs;
+ zend_get_params_ex :
+ {$IFDEF PHP7}
+ function(param_count:longint):longint; cdecl varargs;
+ {$ELSE}
+ function(param_count : Integer; Args : ppzval): integer; cdecl varargs;
+ {$ENDIF}
+ {$IFDEF PHP7}
+ ZvalGetArgs: function(Count: Integer; Args: ppzval): Integer;cdecl varargs;
+ _zend_get_parameters_array_ex:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ {$ELSE}
+ _zend_get_parameters_array: function(ht: integer; param_count:longint; argument_array: ppzval; TSRMLS_DC: pointer): integer; cdecl;
+ _zend_get_parameters_array_ex : function(param_count: integer; argument_array:
+ pppzval; TSRMLS_CC: pointer): integer; cdecl;
+ {$ENDIF}
+function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
+
+
+procedure dispose_pzval_array(Params: pzval_array);
+
+var
+ zend_ini_refresh_caches : procedure(stage: Integer; TSRMLS_DC: Pointer); cdecl;
+
+
+var
+ _zend_bailout : procedure (filename : zend_pchar; lineno : uint); cdecl;
+
+ zend_alter_ini_entry : function(name: zend_pchar; name_length: uint; new_value: zend_pchar; new_value_length: uint; modify_type: Integer; stage: Integer): Integer; cdecl;
+ zend_alter_ini_entry_ex : function(name: zend_pchar; name_length: uint; new_value: zend_pchar; new_value_length: uint; modify_type: Integer; stage: Integer; force_change: integer): Integer; cdecl;
+
+ zend_restore_ini_entry : function(name: zend_pchar; name_length: uint; stage: Integer): Integer; cdecl;
+
+ zend_ini_long : function(name: zend_pchar; name_length: uint; orig: Integer): Longint; cdecl;
+
+ zend_ini_double : function(name: zend_pchar; name_length: uint; orig: Integer): Double; cdecl;
+
+ zend_ini_string : function(name: zend_pchar; name_length: uint; orig: Integer): zend_pchar; cdecl;
+
+ compile_string : function(source_string: pzval; filename: zend_pchar; TSRMLS_DC: Pointer): pointer; cdecl;
+
+ execute : procedure(op_array: pointer; TSRMLS_DC: Pointer); cdecl;
+
+ zend_wrong_param_count : procedure(TSRMLS_D: pointer); cdecl;
+ _zend_hash_quick_add_or_update:function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint; h: uint; out pData: pzval; nDataSize: uint; pDest: PPointer; flag: Integer) : Integer; cdecl;
+ add_property_long_ex : function(arg: pzval; key: zend_pchar; key_len: uint; l: longint; TSRMLS_DC : pointer): integer; cdecl;
+
+ add_property_null_ex : function(arg: pzval; key: zend_pchar; key_len: uint; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_bool_ex : function(arg: pzval; key: zend_pchar; key_len: uint; b: integer; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_resource_ex : function(arg: pzval; key: zend_pchar; key_len: uint; r: integer; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_double_ex : function(arg: pzval; key: zend_pchar; key_len: uint; d: double; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_string_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_stringl_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; len: uint; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
+ add_property_zval_ex : function(arg: pzval; key: zend_pchar; key_len: uint; value: pzval; TSRMLS_DC: Pointer): integer; cdecl;
+
+ {$IFDEF COMPILER_php7pv}
+ call_user_function : procedure(func:pzval; argv:pzval; argc:integer);cdecl;
+ {$ELSE}
+ call_user_function : function(function_table: PHashTable; object_pp: pzval;
+ function_name: pzval; return_ptr: pzval; param_count: zend_uint; params: pzval_array_ex;
+ TSRMLS_DC: Pointer): integer; cdecl;
+
+ call_user_function_ex : function(function_table: PHashTable; object_pp: pzval;
+ function_name: pzval; return_ptr_ptr: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}; param_count: zend_uint;
+ params: pzval_array;
+ no_separation: zend_uint; symbol_table: PHashTable;
+ TSRMLS_DC: Pointer): integer; cdecl;
+ {$ENDIF}
+
+
+ add_assoc_long_ex : function(arg: pzval; key: zend_pchar; key_len: uint; n: longint): integer; cdecl;
+ add_assoc_null_ex : function(arg: pzval; key: zend_pchar; key_len: uint): integer; cdecl;
+ add_assoc_bool_ex : function(arg: pzval; key: zend_pchar; key_len: uint; b: integer): integer; cdecl;
+ add_assoc_resource_ex : function(arg: pzval; key: zend_pchar; key_len: uint; r: integer): integer; cdecl;
+ add_assoc_double_ex : function(arg: pzval; key: zend_pchar; key_len: uint; d: double): integer; cdecl;
+ add_assoc_string_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; duplicate: integer): integer; cdecl;
+ add_assoc_stringl_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; len: uint; duplicate: integer): integer; cdecl;
+ add_assoc_zval_ex : function(arg: pzval; key: zend_pchar; key_len: uint; value: pzval): integer; cdecl;
+
+ add_index_long : function(arg: pzval; idx: uint; n: longint): integer; cdecl;
+ add_index_null : function(arg: pzval; idx: uint): integer; cdecl;
+ add_index_bool : function(arg: pzval; idx: uint; b: integer): integer; cdecl;
+ add_index_resource : function(arg: pzval; idx: uint; r: integer): integer; cdecl;
+ add_index_double : function(arg: pzval; idx: uint; d: double): integer; cdecl;
+ add_index_string : function(arg: pzval; idx: uint; str: zend_pchar; duplicate: integer): integer; cdecl;
+ add_index_stringl : function(arg: pzval; idx: uint; str: zend_pchar; len: uint; duplicate: integer): integer; cdecl;
+ add_index_zval : function(arg: pzval; index: uint; value: pzval): integer; cdecl;
+
+ add_next_index_long : function(arg: pzval; n: longint): integer; cdecl;
+ add_next_index_null : function(arg: pzval): integer; cdecl;
+ add_next_index_bool : function(arg: pzval; b: integer): integer; cdecl;
+ add_next_index_resource : function(arg: pzval; r: integer): integer; cdecl;
+ add_next_index_double : function(arg: pzval; d: double): integer; cdecl;
+ add_next_index_string : function(arg: pzval; str: zend_pchar; duplicate: integer): integer; cdecl;
+ add_next_index_stringl : function(arg: pzval; str: zend_pchar; len: uint; duplicate: integer): integer; cdecl;
+ add_next_index_zval : function(arg: pzval; value: pzval): integer; cdecl;
+
+ add_get_assoc_string_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; dest: pointer; duplicate: integer): integer; cdecl;
+ add_get_assoc_stringl_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
+
+ add_get_index_long : function(arg: pzval; idx: uint; l: longint; dest: pointer): integer; cdecl;
+ add_get_index_double : function(arg: pzval; idx: uint; d: double; dest: pointer): integer; cdecl;
+ add_get_index_string : function(arg: pzval; idx: uint; str: zend_pchar; dest: pointer; duplicate: integer): integer; cdecl;
+ add_get_index_stringl : function(arg: pzval; idx: uint; str: zend_pchar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
+
+ _array_init : function(arg: pzval; __zend_filename: zend_pchar; __zend_lineno: uint): integer; cdecl;
+
+ _object_init : function(arg: pzval;TSRMLS_DC: pointer): integer; cdecl;
+
+ _object_init_ex : function (arg: pzval; ce: pzend_class_entry; __zend_lineno : integer; TSRMLS_DC : pointer) : integer; cdecl;
+
+ _object_and_properties_init : function(arg: pzval; ce: pointer; properties: phashtable; __zend_filename: zend_pchar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
+
+
+ {$IFDEF PHP5}
+ zend_destroy_file_handle : procedure(file_handle : PZendFileHandle; TSRMLS_DC : pointer); cdecl;
+ {$ENDIF}
+
+var
+ zend_write : zend_write_t;
+
+procedure ZEND_PUTS(str: zend_pchar);
+
+type
+ TObjectAConvertMethod = procedure(v:variant;z:pzval);
+ TObjectBConvertMethod = function(a: pzval):Variant;
+
+var
+ zend_register_internal_class : function(class_entry: pzend_class_entry; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
+ zend_register_internal_class_ex : function(class_entry: pzend_class_entry; parent_ce: pzend_class_entry; parent_name: zend_pchar; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
+ zend_startup_module : function(module_entry: Pzend_module_entry):integer; cdecl;
+ zend_startup_module_ex : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer):integer; cdecl;
+ zend_register_module_ex : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer): Pzend_module_entry;cdecl;
+ zend_register_internal_module : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer): Pzend_module_entry;cdecl;
+ zend_startup_modules : function(TSRMLS_DC:pointer):integer;
+ zend_collect_module_handlers : function(TSRMLS_DC:pointer):integer;
+
+ procedure ZvalVAL(z:pzval; v:Boolean); overload;
+ procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG); overload;
+ procedure ZvalVAL(z:pzval); overload;
+ procedure ZvalVAL(z:pzval; v:Double); overload;
+ procedure ZvalVAL(z:pzval; v:SmallInt); overload;
+ procedure ZvalVAL(z:pzval; v:Extended); overload;
+ procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0); overload;
+ procedure ZvalString(z:pzval); overload;
+ procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0); overload;
+ procedure ZvalString(z:pzval; s:PWideChar; len:Integer = 0); overload;
+ procedure ZvalString(z:pzval; s:string; len:Integer = 0); overload;
+
+function ZvalArrayAdd(z: pzval; Args: array of const): Integer; overload;
+function ZvalArrayAdd(z: pzval; idx: Integer; Args: array of const)
+ : Integer; overload;
+function ZvalArrayAdd(z: pzval; key: zend_ustr; Args: array of const)
+ : Integer; overload;
+
+function ZValArrayKeyExists(v: pzval; key: zend_ustr): Boolean; overload;
+function ZValArrayKeyExists(v: pzval; key: zend_ustr; out pData: pzval)
+ : Boolean; overload;
+function ZValArrayKeyExists(v: pzval; idx: Integer): Boolean; overload;
+function ZValArrayKeyExists(v: pzval; idx: Integer; out pData: pzval)
+ : Boolean; overload;
+function ZValArrayKeyDel(v: pzval; key: zend_ustr): Boolean; overload;
+function ZValArrayKeyDel(v: pzval; idx: Integer): Boolean; overload;
+
+function ZValArrayKeyFind(v: pzval; key: zend_ustr; out pData: ppzval)
+ : Boolean; overload;
+function ZValArrayKeyFind(v: pzval; idx: Integer; out pData: ppzval)
+ : Boolean; overload;
+
+ function GetArgPZval(Args: TVarRec; const _type: Integer = IS_LONG;
+ Make: Boolean = false): pzval;
+procedure ZVAL_RESOURCE(value: pzval; l: longint);
+procedure ZVAL_EMPTY_STRING(z: pzval);
+
+function add_next_index_variant(arg: pzval; value: variant): integer;
+function add_index_variant(arg: pzval; index:integer; value: variant): integer;
+function add_assoc_variant(arg: pzval; key: zend_pchar; key_len: uint; value: variant): integer;
+
+procedure ZVAL_ARRAY(z: pzval; arr: TWSDate); overload;
+procedure ZVAL_ARRAY(z: pzval; arr: TASDate); overload;
+procedure ZVAL_ARRAY(z: pzval; arr: array of string); overload;
+{$IFDEF WSTR}
+procedure ZVAL_ARRAY(z: pzval; arr: array of zend_ustr); overload;
+{$ENDIF}
+procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
+{$if CompilerVersion > 21}
+procedure ZVAL_ARRAY(z: pzval; arr: System.TArray); overload;
+{$else}
+procedure ZVAL_ARRAY(z: pzval; arr: array of integer); overload;
+{$ifend}
+procedure ZVAL_ARRAY(z: pzval; arr: Variant); overload;
+procedure ZVAL_ARRAYAC(z: pzval; keynames: Array of AnsiChar; keyvals: Array of AnsiChar);
+procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of PWideChar);
+procedure ZVAL_ARRAYAS(z: pzval; keynames: Array of AnsiString; keyvals: Array of AnsiString); overload;
+procedure ZVAL_ARRAYAS(z: pzval; keynames: TASDate; keyvals: TASDate); overload;
+procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overload;
+procedure ZVAL_ARRAYWS(z: pzval; keynames: array of string; keyvals: array of string); overload;
+procedure HashToArray(HT: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; var AR: TArrayVariant); overload;
+procedure ArrayToHash(AR: Array of Variant; var HT: pzval); overload;
+procedure ArrayToHash(Keys,AR: Array of Variant; var HT: pzval); overload;
+function ToStrA(V: Variant): AnsiString;
+function ToStrW(V: Variant): WideString;
+function ToStr(V: Variant): zend_ustr;
+function toWChar(s: zend_pchar): PWideChar;
+function ZendToVariant(const Value: pzval;cobj: TObjectBConvertMethod=nil): Variant;
+{$IFNDEF PHP7}
+overload;
+function ZendToVariant(const Value: ppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+function ZendToVariant(const Value: pppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+{$ENDIF}
+procedure VariantToZend(const Value: Variant; z: pzval;
+cobj: TObjectAConvertMethod=nil);
+{$IFDEF WSTR}
+procedure ZVAL_RawStr(z: pzval; s:RawByteString; duplicate: boolean);
+{$ENDIF}
+procedure ZVAL_STRING(z: pzval; s: WideString; duplicate: boolean);
+procedure ZVAL_STRINGU(z: pzval; s: UTF8String; duplicate: boolean);
+procedure ZVAL_STRINGW(z: pzval; StW: WideString; duplicate: boolean);
+procedure ZVAL_STRINGA(z: pzval; s: AnsiString; duplicate: boolean);
+procedure ZVAL_STRINGL(z: pzval; s: zend_pchar; l: integer; duplicate: boolean);
+procedure ZVAL_STRINGLW(z: pzval; s: PWideChar; l: integer; duplicate: boolean);
+
+procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions:
+{$IFDEF PHP7}HashTable{$ELSE}pointer{$ENDIF});
+procedure zend_copy_constant(c: zend_constant);
+{$IF defined(PHP520) or defined(PHP540) or defined(PHP550) or defined(PHP560)}
+procedure zend_copy_constants(target: PHashTable; source: PHashTable); cdecl;
+procedure zend_class_add_ref(aclass: Ppzend_class_entry); cdecl;
+{$IFEND}
+
+var
+ get_zend_version : function(): zend_pchar; cdecl;
+ zend_make_printable_zval : procedure(expr: pzval; expr_copy: pzval; use_copy: pint); cdecl;
+ zend_print_zval : function(expr: pzval; indent: integer): integer; cdecl;
+ zend_print_zval_r : procedure(expr: pzval; indent: integer); cdecl;
+ zend_output_debug_string : procedure(trigger_break: boolean; Msg: zend_pchar); cdecl;
+
+{$IFDEF PHP5}
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ zend_copy_constants: procedure(target: PHashTable; source: PHashTable); cdecl;
+ {$IFEND}
+ zend_objects_new : function (_object : pointer; class_type : pointer; TSRMLS_DC : pointer) : {$IFDEF PHP7}zend_object{$ELSE}_zend_object_value{$ENDIF}; cdecl;
+ zend_objects_clone_obj: function(_object: pzval; TSRMLS_DC : pointer): {$IFDEF PHP7}zend_object{$ELSE}_zend_object_value{$ENDIF}; cdecl;
+ zend_objects_store_add_ref: procedure (_object : pzval; TSRMLS_DC : pointer); cdecl;
+ zend_objects_store_del_ref: procedure (_object : pzval; TSRMLS_DC : pointer); cdecl;
+
+ function_add_ref: procedure (func: {$IFDEF PHP7}Pzend_function{$ELSE}PZendFunction{$ENDIF}); cdecl;
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ zend_class_add_ref: procedure(aclass: Ppzend_class_entry); cdecl;
+ {$IFEND}
+
+{$ENDIF}
+
+{$IFNDEF COMPILER_VC9}
+const
+ MSCRT = 'msvcrt.dll';
+
+//Microsoft C++ functions
+function strdup(strSource : zend_pchar) : zend_pchar; cdecl; external MSCRT name '_strdup';
+{$ELSE}
+function DupStr(strSource : zend_pchar) : zend_pchar; cdecl;
+{$ENDIF}
+{$IFNDEF PHP7}
+function ZEND_FAST_ALLOC: pzval;
+function ALLOC_ZVAL: pzval; overload;
+procedure ALLOC_ZVAL(out Result: pzval); overload;
+{$ENDIF}
+procedure INIT_PZVAL(p: pzval);
+function MAKE_STD_ZVAL: pzval; overload;
+procedure MAKE_STD_ZVAL(out Result: pzval); overload;
+
+var
+ PHPLib : THandle = 0;
+
+var
+ zend_ini_deactivate : function(TSRMLS_D : pointer) : integer; cdecl;
+
+function GetGlobalResource(resource_name: AnsiString) : pointer;
+function GetGlobalResourceDC(resource_name: AnsiString;TSRMLS_DC:pointer) : pointer;
+function GetCompilerGlobals : Pzend_compiler_globals;
+function GetExecutorGlobals : pzend_executor_globals;
+function GetAllocGlobals : pointer;
+
+function zend_register_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; _type: integer; TSRMLS_DC : pointer) : integer;
+function zend_unregister_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; count : integer; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; TSRMLS_DC : pointer) : integer;
+
+{$IFDEF PHP5}
+
+var
+ zend_get_std_object_handlers : function() : {$IFDEF PHP7}P_zend_object_handlers{$ELSE}pzend_object_handlers{$ENDIF};
+ zend_objects_get_address : function (_object : pzval; TSRMLS_DC : pointer) : pzend_object; cdecl;
+ zend_is_true : function(z : pzval) : integer; cdecl;
+
+function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
+function Z_LVAL(z : Pzval) : longint;
+function Z_BVAL(z : Pzval) : boolean;
+function Z_DVAL(z : Pzval) : double;
+{$ifdef WSTR}
+function Z_RAWSTR(z: PZval): RawByteString;
+{$else}
+function Z_RAWSTR(z: PZval): TBytes;
+{$endif}
+
+function Z_STRVAL(z : Pzval) : WideString;
+function Z_ASTRVAL(z : Pzval) : AnsiString;
+function Z_STRUVAL(z : PZval): UTF8String;
+function Z_SSTRVAL(z : pzval) : String;
+function Z_CHAR(z: PZval) : zend_uchar;
+function Z_WCHAR(z: PZval) : WideChar;
+function Z_ACHAR(z: PZVAL): AnsiChar;
+{$ifdef WSTR}
+function Z_UCHAR(z: PZVAL): UTF8Char;
+{$else}
+function Z_UCHAR(z: PZVAL): AnsiChar;
+{$endif}
+function Z_STRLEN(z : Pzval) : longint;
+function Z_ARRVAL(z : Pzval ) : PHashTable;
+function Z_OBJ_HANDLE(z :Pzval) : {$IFDEF PHP7} P_zend_object_handlers {$ELSE} zend_object_handle{$ENDIF};
+function Z_OBJ_HT(z : Pzval) : {$IFDEF PHP7}P_zend_object_handlers{$ELSE}pzend_object_handlers{$ENDIF};
+function Z_OBJPROP(z : Pzval;TSRMLS_DC:pointer=nil) : PHashTable;
+function Z_VARREC(z: pzval): TVarRec;
+
+ procedure zend_addref_p(z: pzval); cdecl;
+ procedure my_class_add_ref(aclass: Ppzend_class_entry); cdecl;
+ procedure copy_zend_constant(C: PZendConstant); cdecl;
+
+
+{$ENDIF}
+
+implementation
+
+
+function zend_hash_add(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
+begin
+ result := zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD);
+end;
+
+{$IFDEF PHP7}
+function zend_hash_num_elements(ht: Pzend_array): integer;
+ begin
+ Result := integer(ht.nNumOfElements);
+ end;
+function add_char_to_string (_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+Begin
+ Result := -1;
+ if op1.u1.v._type = IS_STRING then
+ begin
+ _result.value.str.len := op1.value.str.len + op2.value.str.len;
+ _result.value.str.val := op1.value.str.val + op2.value.str.val;
+ Result := SUCCESS;
+ end;
+End;
+function add_string_to_string(_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+begin
+ Result := add_char_to_string(_result, op1, op2);
+end;
+{$ENDIF}
+
+function STR_EMPTY_ALLOC : zend_pchar;
+begin
+ Result := estrndup('', 0);
+end;
+
+function estrndup(s: zend_pchar; len: Cardinal): zend_pchar;
+begin
+ if assigned(s) then
+ Result := _estrndup(s, len, nil, 0, nil, 0)
+ else
+ Result := nil;
+end;
+{$ifdef PHP_UNICODE}
+function estrndupu(s: PUtf8Char; len: Cardinal): PUTf8Char;
+begin
+ if assigned(s) then
+ Result := _estrndupu(s, len, nil, 0, nil, 0)
+ else
+ Result := nil;
+end;
+{$endif}
+function emalloc(size: size_t): pointer;
+begin
+ Result := _emalloc(size, nil, 0, nil, 0);
+end;
+
+procedure efree(ptr: pointer);
+begin
+ _efree(ptr, nil, 0, nil, 0);
+end;
+
+function ecalloc(nmemb: size_t; size: size_t): pointer;
+begin
+ Result := _ecalloc(nmemb, size, nil, 0, nil, 0);
+end;
+
+function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
+begin
+ Result := _erealloc(ptr, size, allow_failure, nil, 0, nil, 0);
+end;
+
+function estrdup(const s: zend_pchar): zend_pchar;
+begin
+ if assigned(s) then
+ begin
+ Result := _estrdup(s, nil, 0, nil, 0);
+ end
+ else
+ Result := nil;
+end;
+
+
+procedure REGISTER_MAIN_LONG_CONSTANT(name: zend_pchar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
+begin
+ zend_register_long_constant(name, length(name) + 1, lval, flags, 0, TSRMLS_DC);
+end;
+
+procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: zend_pchar; dval: double; flags: integer; TSRMLS_DC: Pointer);
+begin
+ zend_register_double_constant(name, length(name) + 1, dval, flags, 0, TSRMLS_DC);
+end;
+
+procedure REGISTER_MAIN_STRING_CONSTANT(name: zend_pchar; str: zend_pchar; flags: integer; TSRMLS_DC: Pointer);
+begin
+ zend_register_string_constant(name, length(name) + 1, str, flags, 0, TSRMLS_DC);
+end;
+
+procedure REGISTER_MAIN_STRINGL_CONSTANT(name: zend_pchar; str: zend_pchar; len: uint; flags: integer; TSRMLS_DC: Pointer);
+begin
+ zend_register_stringl_constant(name, length(name) + 1, str, len, flags, 0, TSRMLS_DC);
+end;
+
+procedure ZVAL_RESOURCE(value: pzval; l: longint);
+begin
+ {$IFDEF PHP7}
+ value^.u1.v._type
+ {$ELSE}
+ value^._type
+ {$ENDIF} := IS_RESOURCE;
+ value^.value.lval := l;
+end;
+
+procedure ZVAL_NULL(z: pzval);
+begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_NULL;
+end;
+
+procedure ZvalString(z:pzval);
+begin
+ z^.value.str.len := 0;
+ z^.value.str.val := '';
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
+end;
+
+procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0);
+var
+ lens:Integer;
+begin
+ if not assigned(s) then
+ ZvalString(z)
+ else begin
+ if len = 0 then
+ lens := Length(s)
+ else
+ lens := len;
+
+ z^.value.str.len := lens;
+ z^.value.str.val := estrndup(s, lens);
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
+ end;
+end;
+
+procedure ZvalString(z:pzval; s:PWideChar; len:Integer = 0);
+begin
+ if not assigned(s) then
+ ZvalString(z)
+ else
+ ZvalString(z, zend_pchar(zend_ustr(WideString(s))), len);
+end;
+
+procedure ZvalString(z:pzval; s:string; len:Integer = 0);
+var
+ _s:PWideChar;
+begin
+ _s := PWideChar(s);
+
+ if not assigned(_s) then
+ ZvalString(z)
+ else
+ ZvalString(z, _s, len);
+end;
+
+procedure ZvalVAL(z:pzval; v:Boolean); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_BOOL;
+ z.value.lval := integer(v);
+End;
+
+procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := _type;
+ z^.value.lval := v;
+End;
+
+procedure ZvalVAL(z:pzval); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_NULL;
+End;
+
+procedure ZvalVAL(z:pzval; v:Double); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_DOUBLE;
+ z.value.dval := v;
+End;
+
+procedure ZvalVAL(z:pzval; v:SmallInt); overload;
+begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_LONG;
+ z^.value.lval := v;
+end;
+
+procedure ZvalVAL(z:pzval; v:Extended); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_LONG;
+ z.value.dval := v;
+End;
+
+procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0); overload;
+var
+ lens: Integer;
+ AChar: zend_pchar;
+begin
+ AChar := zend_pchar(s);
+
+ if not assigned(AChar) then
+ ZVAL_NULL(z)
+ else
+ begin
+ if len = 0 then
+ lens := Length(AChar)
+ else
+ lens := len;
+
+ z^.value.str.len := lens;
+ z^.value.str.val := _estrndup(AChar, lens, nil, 0, nil, 0);
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
+ end;
+end;
+
+function AddElementZvalArray(z: pzval; Args: array of const; flag: Integer;
+ idx: uint = 0; len: uint = 0; const key: zend_ustr = ''): Integer;
+var
+ tmp: pzval;
+ arKey: zend_pchar;
+begin
+ Result := FAILURE;
+ if {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} <> IS_ARRAY then
+ exit;
+
+ if len <> 0 then
+ begin
+ inc(len);
+ arKey := zend_pchar(key);
+ idx := zend_hash_func(arKey, len);
+ end;
+
+ tmp := GetArgPZval(Args[0], 1, true);
+
+ Result := _zend_hash_quick_add_or_update(
+ {$IFDEF PHP7}z.value.arr{$ELSE}z.value.ht{$ENDIF}, arKey, len, idx, tmp,
+ sizeof(pzval), nil, flag);
+end;
+// Add Next
+function ZvalArrayAdd(z: pzval; Args: array of const): Integer; overload;
+begin
+ Result := FAILURE;
+ if {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} <> IS_ARRAY then
+ exit;
+ Result := AddElementZvalArray(z, Args, HASH_NEXT_INSERT,
+ {$IFDEF PHP7} z.value.arr.nNextFreeElement {$ELSE} z.value.ht.nNextFreeElement {$ENDIF});
+end;
+
+// Add Index
+function ZvalArrayAdd(z: pzval; idx: Integer; Args: array of const)
+ : Integer; overload;
+begin
+ Result := AddElementZvalArray(z, Args, HASH_UPDATE, idx);
+end;
+
+// Add Assoc
+function ZvalArrayAdd(z: pzval; key: zend_ustr; Args: array of const)
+ : Integer; overload;
+begin
+ Result := AddElementZvalArray(z, Args, HASH_UPDATE, 0, Length(key), key);
+end;
+
+function IsArrayRetVal(v: pzval): Boolean;
+begin
+ Result := {$IFDEF PHP7}
+ v^.u1.v._type
+ {$ELSE}
+ v^._type
+ {$ENDIF} = IS_ARRAY;
+end;
+
+function ZValArrayKeyExists(v: pzval; key: zend_ustr): Boolean; overload;
+begin
+ Result := false;
+ if {$IFDEF PHP7}
+ v^.u1.v._type
+ {$ELSE}
+ v^._type
+ {$ENDIF} <> IS_ARRAY then
+ exit;
+
+ if {$IFDEF PHP7} v.value.arr.nNumOfElements {$ELSE} v.value.ht.nNumOfElements {$ENDIF} = 0 then
+ exit;
+
+ Result := zend_hash_exists({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, zend_pchar(key), Length(key) + 1) = 1;
+end;
+
+function ZValArrayKeyExists(v: pzval; idx: Integer): Boolean; overload;
+begin
+ Result := false;
+ if ({$IFDEF PHP7} v.u1.v._type {$ELSE} v._type {$ENDIF} <> IS_ARRAY) then
+ exit;
+
+ if {$IFDEF PHP7} v.value.arr.nNumOfElements {$ELSE} v.value.ht.nNumOfElements {$ENDIF} = 0 then
+ exit;
+
+ Result := zend_hash_index_exists({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, idx) = 1;
+end;
+
+function ZValArrayKeyExists(v: pzval; key: zend_ustr; out pData: pzval)
+ : Boolean; overload;
+var
+ tmp: ppzval;
+begin
+ Result := ZValArrayKeyExists(v, key);
+ if Result then
+ begin
+ pData := nil;
+ if ZValArrayKeyFind(v, key, tmp) then
+ pData := tmp^;
+ end;
+end;
+
+function ZValArrayKeyExists(v: pzval; idx: Integer; out pData: pzval)
+ : Boolean; overload;
+var
+ tmp: ppzval;
+begin
+ Result := ZValArrayKeyExists(v, idx);
+ if Result then
+ begin
+ pData := nil;
+ if ZValArrayKeyFind(v, idx, tmp) then
+ pData := tmp^;
+ end;
+end;
+
+function ZValArrayKeyDel(v: pzval; key: zend_ustr): Boolean; overload;
+{$IFDEF PHP7}
+var
+ pzs: zend_pchar;
+{$ENDIF}
+begin
+ Result := false;
+ if ZValArrayKeyExists(v, key) then
+ {$IFDEF PHP7}
+ begin
+ pzs^.len := strlen(zend_pchar(key));
+ pzs^.val := estrdup(zend_pchar(key));
+ Result := zend_hash_del_key_or_index(v.value.arr, pzs) = SUCCESS
+ end;
+ {$ELSE}
+ Result := zend_hash_del_key_or_index(v.value.ht, zend_pchar(key),
+ Length(key) + 1, 0, HASH_DEL_KEY) = SUCCESS;
+ {$ENDIF}
+end;
+
+function ZValArrayKeyDel(v: pzval; idx: Integer): Boolean; overload;
+{$IFDEF PHP7}
+var
+ pzs: zend_pchar;
+{$ENDIF}
+begin
+ Result := false;
+ if ZValArrayKeyExists(v, idx) then
+ {$IFDEF PHP7}
+ begin
+ pzs^.len := strlen(zend_pchar(inttostr(idx)));
+ pzs^.val := estrdup(zend_pchar(inttostr(idx)));
+ Result := zend_hash_del_key_or_index(v.value.arr, pzs) = SUCCESS
+ end;
+ {$ELSE}
+ Result := zend_hash_del_key_or_index({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, nil, 0, idx,
+ HASH_DEL_INDEX) = SUCCESS;
+ {$ENDIF}
+end;
+
+function ZValArrayKeyFind(v: pzval; key: zend_ustr; out pData: ppzval)
+ : Boolean; overload;
+var
+ keyStr: zend_pchar;
+ KeyLength: uint;
+begin
+ keyStr := zend_pchar(key);
+ KeyLength := Length(key) + 1;
+
+ Result := zend_hash_quick_find({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, keyStr, KeyLength,
+ zend_hash_func(keyStr, KeyLength), pData) = SUCCESS;
+end;
+
+function ZValArrayKeyFind(v: pzval; idx: Integer; out pData: ppzval)
+ : Boolean; overload;
+begin
+ Result := zend_hash_quick_find({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, nil, 0, idx, pData) = SUCCESS;
+end;
+procedure MAKE_STD_ZVAL(out Result: pzval);
+begin
+ {$IFNDEF PHP7}
+ ALLOC_ZVAL(Result);
+ {$ENDIF}
+ INIT_PZVAL(Result);
+end;
+
+
+
+function GetArgPZval(Args: TVarRec; const _type: Integer = IS_LONG;
+ Make: Boolean = false): pzval;
+begin
+ {$if CompilerVersion > 21}
+ if Args._Reserved1 = 0 then // nil
+ {$else}
+ if Integer(Args.VPointer) = 0 then
+ {$ifend}
+ begin
+ if Make then
+ MAKE_STD_ZVAL(Result);
+ {$IFDEF PHP7} Result.u1.v._type {$ELSE} Result._type {$ENDIF} := IS_NULL;
+ end
+ else if Args.VType = vtPointer then
+ Result := Args.VPointer
+ else
+ begin
+ if Make then
+ MAKE_STD_ZVAL(Result);
+ case Args.VType of
+ vtInteger:
+ ZvalVAL(Result, Args.VInteger, _type);
+ vtInt64:
+ ZvalVAL(Result, NativeInt(Args.VInt64^), _type);
+ vtBoolean:
+ ZvalVAL(Result, Args.VBoolean);
+ vtExtended:
+ ZvalVAL(Result, Args.VExtended^);
+ {$if CompilerVersion > 21}
+ vtClass, vtObject:
+ ZvalVAL(Result, Args._Reserved1);
+ {$else}
+ vtClass:
+ ZvalVAL(Result, Integer(Args.VClass));
+ vtObject:
+ ZvalVAL(Result, Integer(Args.VObject));
+ {$ifend}
+ vtString:
+ ZvalVAL(Result, zend_ustr(Args.VString^));
+ vtAnsiString:
+ ZvalVAL(Result, zend_pchar(zend_ustr(Args.VAnsiString)));
+ {$ifdef WSTR}
+ vtUnicodeString:
+ {$if CompilerVersion > 21}
+ ZvalVAL(Result, UnicodeString(Args._Reserved1));
+ {$else}
+ ZvalVal(Result, UnicodeString(Args.VUnicodeString));
+ {$ifend}
+ {$endif}
+ vtWideChar:
+ ZvalVAL(Result, zend_pchar(Args.VWideChar));
+ vtChar:
+ ZvalVAL(Result, zend_pchar(Args.VChar));
+ vtPWideChar:
+ ZvalVAL(Result, Args.VPWideChar);
+ vtPChar:
+ ZvalVAL(Result, zend_pchar(Args.VPChar));
+ vtWideString:
+ ZvalVAL(Result, zend_pchar(Args.VWideString));
+ end;
+ end;
+end;
+
+{$ifdef WSTR}
+procedure ZVAL_STRINGU(z: pzval; s: UTF8String; duplicate: boolean);
+var
+ sc: PUTF8Char;
+begin
+ sc := PUtf8Char(s);
+ z^.value.str.len := Length(s);
+ if duplicate then
+ z^.value.str.val := estrndup(sc, z^.value.str.len)
+ else
+ z^.value.str.val := sc;
+
+ z^._type := IS_STRING;
+end;
+
+procedure ZVAL_RawStr(z: pzval; s: RawByteString; duplicate: boolean);
+var _s: RawByteString;
+begin
+ _s := s;
+ SetCodePage(_s, CP_UTF8, not IsUTF8String(_s));
+ ZVAL_STRINGU(z, UTF8String(_s), duplicate);
+end;
+{$endif}
+
+procedure ZVAL_STRING(z: pzval; s: WideString; duplicate: boolean);
+begin
+ ZVAL_STRINGU(z, UTF8String(s), duplicate);
+end;
+
+procedure ZVAL_STRINGW(z: pzval; StW: WideString; duplicate: boolean);
+var
+ St: UTF8String;
+ sc: PUTF8Char;
+begin
+ St := UTF8String(StW);
+ sc := PUtf8Char(St);
+
+ z^.value.str.len := Length(St);
+ if duplicate then
+ z^.value.str.val := estrndup(sc, z^.value.str.len)
+ else
+ z^.value.str.val := sc;
+
+ z^._type := IS_STRING;
+end;
+procedure ZVAL_STRINGA(z: pzval; s: AnsiString; duplicate: boolean);
+begin
+ ZVAL_STRINGU(z, UTF8String(s), duplicate);
+end;
+procedure ZVAL_STRINGL(z: pzval; s: zend_pchar; l: integer; duplicate: boolean);
+var
+ __s : zend_pchar;
+ __l : integer;
+begin
+ if not assigned(s) then
+ __s := ''
+ else
+ __s := s;
+ __l := l;
+ z^.value.str.len := __l;
+ if duplicate then
+ z^.value.str.val := estrndup(__s, __l)
+ else
+ z^.value.str.val := __s;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
+end;
+
+procedure ZVAL_STRINGLW(z: pzval; s: PWideChar; l: integer; duplicate: boolean);
+var
+ __s : zend_pchar;
+ __l : integer;
+ StA : zend_ustr;
+ StW : WideString;
+begin
+ if not assigned(s) then
+ __s := ''
+ else
+ begin
+ StW := WideString(s);
+ StA := zend_ustr(StW);
+ __s := zend_pchar(StA);
+ end;
+
+ __l := l;
+ z^.value.str.len := __l;
+ if duplicate then
+ z^.value.str.val := estrndup(__s, __l)
+ else
+ z^.value.str.val := __s;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
+end;
+
+procedure ZVAL_EMPTY_STRING(z: pzval);
+begin
+ z^.value.str.len := 0;
+ z^.value.str.val := STR_EMPTY_ALLOC;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
+end;
+
+function ToStrA(V: Variant): AnsiString;
+begin
+ Result := V;
+end;
+
+function ToStr(V: Variant): zend_ustr;
+begin
+ Result := V;
+end;
+
+function ToStrW(V: Variant): WideString;
+begin
+ Result := V;
+end;
+
+function ToPChar(V: Variant): zend_pchar;
+begin
+ Result := zend_pchar(zend_ustr(V));
+end;
+
+function toWChar(s: zend_pchar): PWideChar;
+ var
+ ss: WideString;
+ ss2: string;
+begin
+ ss2 := s;
+ ss := ss2;
+ Result := PWideChar(ss);
+end;
+function HashToVarArray(const Value:{$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Variant;
+ Var
+ Len,I: Integer;
+ {$IFDEF PHP7}tmp : pzval;{$ELSE}tmp : pppzval;{$ENDIF}
+begin
+ len := zend_hash_num_elements(Value);
+ Result := VarArrayCreate([0, len - 1], varVariant);
+ for i:=0 to len-1 do
+ begin
+ new(tmp);
+
+ zend_hash_index_find(Value,i,tmp);
+
+ VarArrayPut(Result, ZendToVariant(tmp), [i]);
+ freemem(tmp);
+ end;
+end;
+procedure VarArrayToHash(var HT: pzval;Value: Variant);
+ Var
+ I,Len: Integer;
+begin
+ _array_init(ht,nil,1);
+ len := TVarData(Value).VArray^.Bounds[0].ElementCount;
+ for i:= 0 to len - 1 do
+ begin
+ add_index_variant(HT, i, VarArrayGet(Value, [i]));
+ end;
+end;
+function ZendToVariant(const Value: pzval;
+cobj: TObjectBConvertMethod=nil): Variant; overload;
+begin
+ case {$IFDEF PHP7} Value^.u1.v._type {$ELSE}Value^._type{$ENDIF} of
+ 0: Result := Null; //Null
+ 1: Result := Value^.value.lval; //LongInt -> Integer
+ 2: Result := Value^.value.dval; //Double
+ 3: Result := boolean(Value^.value.lval); //Boolean
+ {$IFDEF PHP7}
+ 4: Result := HashToVarArray(Value^.value.arr);//Array
+ {$ELSE}
+ 4: Result := HashToVarArray(Value^.value.ht);//Array
+ {$ENDIF}
+ 5: //Object
+ if Assigned(cobj) then
+ Result := cobj(Value)
+ else
+ Result := Null;
+ 6: Result := Z_STRVAL(Value); //String
+ 7: Result := Value^.value.lval; //Resource
+ //Constant
+ 8: Result := Z_STRVAL(Value);
+ {$IFDEF PHP7}
+ 9: Result := HashToVarArray(Value^.value.arr) //Constant Array
+ {$ELSE}
+ 9: Result := HashToVarArray(Value^.value.ht) //Constant Array
+ {$ENDIF}
+ else Result := Null; //Unknown/undefined
+ end;
+end;
+
+procedure VariantToZend(const Value:Variant;z:pzval;
+cobj: TObjectAConvertMethod=nil);
+var
+ W : WideString;
+begin
+ if VarIsEmpty(value) or VarIsNull(Value) then
+ begin
+ ZVALVAL(z);
+ Exit;
+ end;
+ case TVarData(Value).VType of
+ varString :
+ begin
+ if Assigned ( TVarData(Value).VString ) then
+ begin
+ ZVAL_STRINGA(z, AnsiString(PAnsiChar(TVarData(Value).VString)), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+ {$ifdef VERSION12}
+ varUString :
+ ZVAL_RawStr(z, RawByteString(TVarData(Value).VUString), true);
+ {$endif}
+ varOleStr :
+ begin
+ if Assigned ( TVarData(Value).VOleStr ) then
+ begin
+ W := WideString(Pointer(TVarData(Value).VOleStr));
+ ZVAL_STRINGW(z, PWideChar(W), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+
+ varWord : ZVALVAL(z, TVarData(Value).VWord);
+ //HERE;
+ // varVariant :
+ // varUnknown :
+ //<=== ñëåäóåò èñêàòü ÷åðåç VarIs{TYPE}()
+
+ //varDispatch : integer(TVarData(Value).VDispatch
+ //<==óêàçàòåëü íà âûçûâàþùóþ ôóíêöèþ... õç òî÷íî íå ïîéìó
+ //âîîáùåì íà ìåòîä ñ òèïîì Dispatch (âûçîâ, âûáðîñ)... çàáûë ÿ
+ //íó ìåòîä â êëàññå êîðî.÷å
+ varDispatch :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+ //varAny : integer(TVarData(Value).VAny
+ //<==óêàçàòåëü íà ìåòîä*(ëþáîé)
+ //
+ varAny :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+ //varRecord : integer(TVarData(Value).VRecord)
+ //<==çàïèñü... ÿ äî ñèõ ïîð íå ðàçîáðàëñÿ êàê ñ íèìè ÷åðåç RTTI ðàáîòàòü
+ {$if CompilerVersion > 21}
+ varRecord :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+
+ //varObject : integer(TVarData(Value).VObject)
+ //<==îáúåêò...
+ varObject :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z, integer(TObject(TVarData(Value).VPointer^)));
+ end;
+ {$ifend}
+
+ varStrArg :
+ begin
+ if Assigned ( TVarData(Value).VString ) then
+ begin
+ ZVAL_STRINGA(z, AnsiString(PAnsiChar(TVarData(Value).VString)), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+ {$if CompilerVersion > 21}
+ varUStrArg : ZVAL_RawStr(z, RawByteString(TVarData(Value).VUString), true);
+ {$ifend}
+ varInt64 : ZVALVAL(z, TVarData(Value).VInt64);
+ {$ifdef VERSION14}
+ varUInt64 : ZVALVAL(z, TVarData(Value).VUInt64);
+ {$endif}
+ varShortInt : ZVALVAL(z, Integer(TVarData(Value).VShortInt));
+ varSmallInt : ZVALVAL(z, Integer(TVarData(Value).VSmallint));
+ varInteger : ZVALVAL(z, TVarData(Value).VInteger);
+ varBoolean : ZVALVAL(z, TVarData(Value).VBoolean);
+ varSingle : ZVALVAL(z, TVarData(Value).VSingle);
+ varDouble : ZVALVAL(z, TVarData(Value).VDouble);
+ varCurrency : ZVALVAL(z, TVarData(Value).VCurrency);
+ //!>
+ varError : ZVALVAL(z, Integer(TVarData(Value).VError));
+
+ varByte : ZVALVAL(z, Integer(TVarData(Value).VByte));
+ varDate : ZVALVAL(z, TVarData(Value).VDate);
+ varArray : VarArrayToHash(z, Value);
+ else
+ ZVALVAL(Z);
+ end;
+end;
+
+function ZendToVariant(const Value: ppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+begin
+Result := ZendToVariant(Value^);
+end;
+
+function ZendToVariant(const Value: pppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+begin
+Result := ZendToVariant(Value^^);
+end;
+
+procedure HashToArray(HT: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; var AR: TArrayVariant); overload;
+ Var
+ Len,I: Integer;
+ tmp : pppzval;
+begin
+ len := zend_hash_num_elements(HT);
+ SetLength(AR,len);
+ for i:=0 to len-1 do
+ begin
+ new(tmp);
+
+ zend_hash_index_find(ht,i,tmp);
+
+ AR[i] := ZendToVariant(tmp);
+ freemem(tmp);
+ end;
+end;
+
+
+procedure ArrayToHash(AR: Array of Variant; var HT: pzval); overload;
+ Var
+ I,Len: Integer;
+begin
+ _array_init(ht,nil,1);
+ len := Length(AR);
+ for i:=0 to len-1 do
+ begin
+ add_index_variant(ht,i,AR[i]);
+ end;
+end;
+
+procedure ArrayToHash(Keys,AR: Array of Variant; var HT: pzval); overload;
+ Var
+ I,Len: Integer;
+begin
+ _array_init(ht,nil,1);
+ len := Length(AR);
+ for i:=0 to len-1 do
+ begin
+ add_assoc_variant(ht, ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1,AR[i]);
+ end;
+end;
+
+function add_next_index_variant(arg: pzval; value: variant): integer;
+var iz: pzval;
+begin
+ iz := MAKE_STD_ZVAL;
+ if VarIsEmpty(value) then
+ begin
+ ZVAL_NULL(iz);
+ Result := add_next_index_zval(arg, iz);
+ Exit;
+ end;
+ VariantToZend(Value,iz);
+ Result := add_next_index_zval(arg, iz);
+end;
+
+function add_index_variant(arg: pzval; index:integer; value: variant): integer;
+var iz: pzval;
+begin
+ iz := MAKE_STD_ZVAL;
+ if VarIsEmpty(value) then
+ begin
+ ZVAL_NULL(iz);
+ Result := add_index_zval(arg, index, iz);
+ Exit;
+ end;
+ VariantToZend(Value,iz);
+ Result := add_index_zval(arg, index, iz);
+end;
+
+function add_assoc_variant(arg: pzval; key: zend_pchar; key_len: uint; value: variant): integer;
+var iz: pzval;
+begin
+ iz := MAKE_STD_ZVAL;
+ if VarIsEmpty(value) then
+ begin
+ ZVAL_NULL(iz);
+ Result := add_assoc_zval_ex(arg, key, key_len, iz);
+ Exit;
+ end;
+ VariantToZend(Value,iz);
+ Result := add_assoc_zval_ex(arg, key, key_len, iz);
+end;
+
+procedure ZVAL_ARRAY(z: pzval; arr: TWSDate); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_string(z, zend_pchar(zend_ustr(arr[i])), 1);
+ end;
+ Exit;
+end;
+
+procedure ZVAL_ARRAY(z: pzval; arr: TASDate); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_string(z, zend_pchar(zend_ustr(arr[i])), 1);
+ end;
+ Exit;
+end;
+
+procedure ZVAL_ARRAY(z: pzval; arr: array of string); overload;
+var
+ i: integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_string(z, zend_pchar(zend_ustr(arr[i])), 1);
+ end;
+ Exit;
+end;
+{$ifdef WSTR}
+procedure ZVAL_ARRAY(z: pzval; arr: array of zend_ustr); overload;
+var
+ i: integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_string(z, zend_pchar(arr[i]), 1);
+ end;
+ Exit;
+end;
+{$endif}
+
+procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
+var
+ i: integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_variant(z, arr[i]);
+ end;
+ Exit;
+end;
+
+{$if CompilerVersion > 21}
+procedure ZVAL_ARRAY(z: pzval; arr: System.TArray); overload;
+{$else}
+procedure ZVAL_ARRAY(z: pzval; arr: array of integer); overload;
+{$ifend}
+var
+ i: integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if Length(arr) = 0 then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ for i := 0 to Length(arr)-1 do
+ begin
+ add_next_index_long(z, arr[i]);
+ end;
+ Exit;
+end;
+
+procedure ZVAL_ARRAY(z: pzval; arr: Variant); overload;
+var
+ i: integer;
+ {V: TVarData;}
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if arr.PVarArray.DimCount = 0 then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ for i := 0 to arr.DimCount-1 do
+ begin
+ add_next_index_variant(z, arr[i]);
+ end;
+ Exit;
+end;
+
+procedure ZVAL_ARRAYAC(z: pzval; keynames: Array of ansichar; keyvals: Array of ansichar);
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ end;
+end;
+procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of PWideChar);
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ begin
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
+ end;
+ Exit;
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+end;
+procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then //Ñîçäà¸ì ìàññèâ ïåðâîãî óðîâíÿ
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+ //z^.refcount := Length(keynames); //Ïåðåäà¸ì êîëè÷åñòâî âîçâðàùàåìûõ ìàññèâîâ
+ if (Length(keynames) = 0) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ begin
+ //Ñîçäà¸ì ñòðîêó â ìàññèâå ïåðâîãî óðîâíÿ
+ //Ñîçäà¸ì àññîöèàöèþ ñòðîêè ñ êëþ÷¸ì ïåðâîãî óðîâíÿ
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1,
+ zend_pchar(zend_ustr(keyvals[i])), 1);
+
+ //Ïðîäîëæàåì öèêë
+ end;
+ Exit;
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+end;
+procedure ZVAL_ARRAYWS(z: pzval; keynames: array of string; keyvals: array of string); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ begin
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1,
+ zend_pchar(zend_ustr(keyvals[i])), 1);
+ end;
+ Exit;
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+end;
+procedure ZVAL_ARRAYAS(z: pzval; keynames: TASDate; keyvals: TASDate); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ begin
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
+ end;
+ Exit;
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+end;
+procedure ZVAL_ARRAYAS(z: pzval; keynames: Array of AnsiString; keyvals: Array of AnsiString); overload;
+var
+ i : integer;
+begin
+ if _array_init(z, nil, 0) = FAILURE then
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+ if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
+ begin
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
+ Exit;
+ end;
+
+ if Length(keynames) = Length(keyvals) then
+ begin
+ for i := 0 to Length(keynames)-1 do
+ begin
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
+ end;
+ Exit;
+ end
+ else
+ begin
+ ZVALVAL(z,False);
+ Exit;
+ end;
+
+end;
+function ZENDLoaded: boolean;
+begin
+ Result := PHPLib <> 0;
+end;
+
+procedure UnloadZEND;
+var
+ H : THandle;
+ t: Integer;
+begin
+ t := Integer(PHPLib);
+ H := InterlockedExchange(t, 0);
+ if H > 0 then
+ begin
+ FreeLibrary(H);
+ end;
+end;
+
+{$ifdef VERSION12}
+function Lfunc(var Func: Pointer; addr: LPCWSTR): BOOL;
+{$else}
+function Lfunc(var Func: Pointer; addr: PAnsiChar): BOOL;
+{$endif}
+begin
+ Result := True;
+ Func := GetProcAddress(PHPLib, addr);
+ if Func = nil then
+ begin
+ {$IFNDEF QUIET_LOAD}
+ raise EPHP4DelphiException.Create(addr);
+ {$ENDIF}
+ Result := False;
+ end;
+end;
+{$ifdef VERSION12}
+function HFunc(const Func: Pointer; addr: LPCWSTR): BOOL;
+{$else}
+function HFunc(const Func: Pointer; addr: PAnsiChar): Bool;
+{$endif}
+var fr: FARPROC;
+begin
+ Result := True;
+
+ fr := GetProcAddress(PHPLib, addr);
+ if (Func = nil) or (fr = nil) then
+ begin
+ {$IFNDEF QUIET_LOAD}
+ raise EPHP4DelphiHookException.Create(addr);
+ {$ENDIF}
+ Result := False;
+ end else
+ begin
+ if ppointer(fr)^ <> Func then
+ ppointer(fr)^ := Func;
+ end;
+end;
+procedure zend_copy_constant(c: zend_constant);
+begin
+ c.name := zend_strndup(c.name, c.name_len - 1);
+ if (c.flags and CONST_PERSISTENT) = 0 then
+ _zval_copy_ctor_func(@c.value, '', 0);
+end;
+{$if defined(PHP520) or defined(PHP540) or defined(PHP550) or defined(PHP560)}
+
+procedure zend_copy_constants(target: PHashTable;source: PHashTable);
+var tmp: zend_constant;
+begin
+ zend_hash_copy(target, source, @zend_copy_constant, @tmp, sizeof(zend_constant));
+end;
+
+procedure zend_class_add_ref(aclass: Ppzend_class_entry); cdecl;
+begin
+ Inc(aclass^.refcount,1);
+end;
+{$IFEND}
+function LoadZEND(const LibraryPath: zend_ustr = PHPlp) : boolean;
+var
+ WriteFuncPtr : pointer;
+begin
+ {$IFDEF QUIET_LOAD}
+ Result := false;
+ {$ENDIF}
+ {$if CompilerVersion >= 20}
+ PHPLib := LoadLibrary( PWideChar(WideString(LibraryPath)) );
+ {$else}
+ PHPLib := LoadLibrary( String( LibraryPath ) );
+ {$ifend}
+{$IFNDEF QUIET_LOAD}
+ if PHPLib = 0 then
+ begin
+ RaiseLastOSError;
+ // raise Exception.Create(RaiseLastOSError);
+ end;
+{$ELSE}
+ if PHPLib = 0 then Exit;
+{$ENDIF}
+
+ {$IFDEF PHP5}
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ LFunc(@zend_copy_constants, 'zend_copy_constants');
+ {$IFEND}
+ LFunc(@zend_objects_new, 'zend_objects_new');
+ LFunc(@zend_objects_clone_obj, 'zend_objects_clone_obj');
+ LFunc(@function_add_ref, 'function_add_ref');
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ LFunc(@zend_class_add_ref, 'zend_class_add_ref');
+ {$IFEND}
+
+ LFunc(@zend_objects_store_add_ref, 'zend_objects_store_add_ref');
+ LFunc(@zend_objects_store_del_ref, 'zend_objects_store_del_ref');
+
+ LFunc(@zend_get_std_object_handlers, 'zend_get_std_object_handlers');
+ LFunc(@zend_objects_get_address, 'zend_objects_get_address');
+ LFunc(@zend_is_true, 'zend_is_true');
+{$ENDIF}
+
+ LFunc(@_zend_bailout, '_zend_bailout');
+
+ LFunc(@zend_disable_function, 'zend_disable_function');
+ LFunc(@zend_disable_class, 'zend_disable_class');
+ LFunc(@zend_register_list_destructors_ex, 'zend_register_list_destructors_ex');
+ LFunc(@zend_register_resource, 'zend_register_resource');
+ LFunc(@zend_fetch_resource, 'zend_fetch_resource');
+ LFunc(@zend_list_insert, 'zend_list_insert');
+ {$IFNDEF PHP7}
+ LFunc(@_zend_list_addref, '_zend_list_addref');
+ LFunc(@_zend_list_delete, '_zend_list_delete');
+ LFunc(@_zend_list_find, '_zend_list_find');
+ {$ENDIF}
+ LFunc(@zend_rsrc_list_get_rsrc_type, 'zend_rsrc_list_get_rsrc_type');
+ LFunc(@zend_fetch_list_dtor_id, 'zend_fetch_list_dtor_id');
+
+ LFunc(@zend_get_compiled_filename, 'zend_get_compiled_filename');
+
+ LFunc(@zend_get_compiled_lineno, 'zend_get_compiled_lineno');
+
+ LFunc(@zend_ini_deactivate, 'zend_ini_deactivate');
+
+ // -- tsrm_startup
+ LFunc(@tsrm_startup, 'tsrm_startup');
+
+ // -- ts_allocate_id
+ LFunc(@ts_allocate_id, 'ts_allocate_id');
+
+ // -- ts_free_id
+ LFunc(@ts_free_id, 'ts_free_id');
+
+ // -- zend_strndup
+ LFunc(@zend_strndup,
+ {$IFNDEF PHP7}
+ 'zend_strndup'
+ {$ELSE}
+ 'zend_strndup@@8'
+ {$ENDIF});
+
+ // -- _emalloc
+ LFunc(@_emalloc,
+ {$IFNDEF PHP7}
+ '_emalloc'
+ {$ELSE}
+ '_emalloc@@4'
+ {$ENDIF});
+
+
+ // -- _efree
+ LFunc(@_efree,
+ {$IFNDEF PHP7}
+ '_efree'
+ {$ELSE}
+ '_efree@@4'
+ {$ENDIF});
+
+
+ // -- _ecalloc
+ LFunc(@_ecalloc,
+ {$IFNDEF PHP7}
+ '_ecalloc'
+ {$ELSE}
+ '_ecalloc@@8'
+ {$ENDIF});
+
+
+ // -- _erealloc
+ LFunc(@_erealloc,
+ {$IFNDEF PHP7}
+ '_erealloc'
+ {$else}
+ '_erealloc@@8'
+ {$ENDIF});
+
+
+ // -- _estrdup
+ LFunc(@_estrdup,
+ {$IFNDEF PHP7}
+ '_estrdup'
+ {$ELSE}
+ '_estrdup@@4'
+ {$ENDIF});
+
+ // -- _estrndup
+ LFunc(@_estrndup,
+ {$IFNDEF PHP7}
+ '_estrndup'
+ {$ELSE}
+ '_estrndup@@8'
+ {$ENDIF});
+
+ {$ifdef PHP_UNICODE}
+ // -- _estrndup Unicode
+ LFunc(@_estrndupu,
+ {$IFNDEF PHP7}
+ '_estrndup'
+ {$ELSE}
+ '_estrndup@@8'
+ {$ENDIF});
+ {$endif}
+
+ // -- zend_set_memory_limit
+ LFunc(@zend_set_memory_limit, 'zend_set_memory_limit');
+
+ // -- start_memory_manager
+ LFunc(@start_memory_manager, 'start_memory_manager');
+
+ // -- shutdown_memory_manager
+ LFunc(@shutdown_memory_manager, 'shutdown_memory_manager');
+
+ LFunc(@_zend_hash_init, '_zend_hash_init');
+ LFunc(@_zend_hash_init_ex, '_zend_hash_init_ex');
+
+ // -- zend_hash_add_or_update
+ LFunc(@_zend_hash_add_or_update,
+ {$IFDEF PHP7}'_zend_hash_add_or_update@@16'{$ELSE}'_zend_hash_add_or_update'{$ENDIF});
+
+ // -- zend_hash_destroy
+ LFunc(@zend_hash_destroy, {$IFDEF PHP7}'zend_hash_destroy@@4'{$ELSE}'zend_hash_destroy'{$ENDIF});
+
+ // -- zend_hash_clean
+ LFunc(@zend_hash_clean, {$IFDEF PHP7}'zend_hash_clean@@4'{$ELSE}'zend_hash_clean'{$ENDIF});
+
+ // -- zend_hash_add_empty_element
+ LFunc(@zend_hash_add_empty_element, {$IFDEF PHP7}'zend_hash_add_empty_element@@8'{$ELSE}'zend_hash_add_empty_element'{$ENDIF});
+
+ // -- zend_hash_graceful_destroy
+ LFunc(@zend_hash_graceful_destroy, {$IFDEF PHP7}'zend_hash_graceful_destroy@@4'{$ELSE}'zend_hash_graceful_destroy'{$ENDIF});
+
+ // -- zend_hash_graceful_reverse_destroy
+ LFunc(@zend_hash_graceful_reverse_destroy, {$IFDEF PHP7}'zend_hash_graceful_reverse_destroy@@4'{$ELSE}'zend_hash_graceful_reverse_destroy'{$ENDIF});
+
+ // -- zend_hash_apply
+ LFunc(@zend_hash_apply, {$IFDEF PHP7}'zend_hash_apply@@8'{$ELSE}'zend_hash_apply'{$ENDIF});
+
+ // -- zend_hash_apply_with_argument
+ LFunc(@zend_hash_apply_with_argument, {$IFDEF PHP7}'zend_hash_apply_with_argument@@12'{$ELSE}'zend_hash_apply_with_argument'{$ENDIF});
+
+ // -- zend_hash_reverse_apply
+ LFunc(@zend_hash_reverse_apply, {$IFDEF PHP7}'zend_hash_reverse_apply@@8'{$ELSE}'zend_hash_reverse_apply'{$ENDIF});
+
+ // -- zend_hash_del_key_or_index
+ LFunc(@zend_hash_del_key_or_index, {$IFDEF PHP7}'zend_hash_del@@8'{$ELSE}'zend_hash_del_key_or_index'{$ENDIF});
+
+ // -- zend_get_hash_value
+ LFunc(@zend_get_hash_value,
+ {$IFDEF PHP560}'zend_hash_func'{$ELSE}'zend_get_hash_value'{$ENDIF});
+
+ // -- zend_hash_find
+ LFunc(@zend_hash_find, {$IFDEF PHP7}'zend_hash_find@@8'{$ELSE}'zend_hash_find'{$ENDIF});
+
+ // -- zend_hash_quick_find
+ LFunc(@zend_hash_quick_find, {$IFDEF PHP7}'zend_hash_find@@8'{$ELSE}'zend_hash_quick_find'{$ENDIF});
+
+ // -- zend_hash_index_find
+ LFunc(@zend_hash_index_find, {$IFDEF PHP7}'zend_hash_index_find@@8'{$ELSE}'zend_hash_index_find'{$ENDIF});
+
+ // -- zend_hash_exists
+ LFunc(@zend_hash_exists, {$IFDEF PHP7}'zend_hash_exists@@8'{$ELSE}'zend_hash_exists'{$ENDIF});
+
+ // -- zend_hash_index_exists
+ LFunc(@zend_hash_index_exists, {$IFDEF PHP7}'zend_hash_index_exists@@8'{$ELSE}'zend_hash_index_exists'{$ENDIF});
+ {$IFDEF PHP7}
+ LFunc(@_zend_hash_add_or_update, '_zend_hash_add_or_update@@16');
+ LFunc(@_zend_hash_add, '_zend_hash_add@@12');
+ {$IFDEF COMPILER_php7pv}
+ LFunc(@zend_hash_index_findZval,'zend_hash_index_findZval');
+ LFunc(@zend_symtable_findTest,'zend_symtable_findTest');
+ LFunc(@zend_hash_index_existsZval,'zend_hash_index_existsZval');
+ {$ENDIF}
+ {$ELSE}
+ // -- zend_hash_next_free_element
+ LFunc(@zend_hash_next_free_element, 'zend_hash_next_free_element');
+ {$ENDIF}
+ // -- zend_hash_move_forward_ex
+ LFunc(@zend_hash_move_forward_ex, {$IFDEF PHP7}'zend_hash_move_forward_ex@@8'{$ELSE}'zend_hash_move_forward_ex'{$ENDIF});
+
+ // -- zend_hash_move_backwards_ex
+ LFunc(@zend_hash_move_backwards_ex, {$IFDEF PHP7}'zend_hash_move_backwards_ex@@8'{$ELSE}'zend_hash_move_backwards_ex'{$ENDIF});
+
+ // -- zend_hash_get_current_key_ex
+ LFunc(@zend_hash_get_current_key_ex, {$IFDEF PHP7}'zend_hash_get_current_key_ex@@16'{$ELSE}'zend_hash_get_current_key_ex'{$ENDIF});
+
+ // -- zend_hash_get_current_key_type_ex
+ LFunc(@zend_hash_get_current_key_type_ex, {$IFDEF PHP7}'zend_hash_get_current_key_type_ex@@8'{$ELSE}'zend_hash_get_current_key_type_ex'{$ENDIF});
+
+ // -- zend_hash_get_current_data_ex
+ LFunc(@zend_hash_get_current_data_ex, {$IFDEF PHP7}'zend_hash_get_current_data_ex@@8'{$ELSE}'zend_hash_get_current_data_ex'{$ENDIF});
+
+ // -- zend_hash_internal_pointer_reset_ex
+ LFunc(@zend_hash_internal_pointer_reset_ex, {$IFDEF PHP7}'zend_hash_internal_pointer_reset_ex@@8'{$ELSE}'zend_hash_internal_pointer_reset_ex'{$ENDIF});
+
+ // -- zend_hash_internal_pointer_end_ex
+ LFunc(@zend_hash_internal_pointer_end_ex, {$IFDEF PHP7}'zend_hash_internal_pointer_end_ex@@8'{$ELSE}'zend_hash_internal_pointer_end_ex'{$ENDIF});
+
+ // -- zend_hash_copy
+ LFunc(@zend_hash_copy, {$IFDEF PHP7}'zend_hash_copy@@12'{$ELSE}'zend_hash_copy'{$ENDIF});
+
+
+ // -- zend_hash_sort
+ LFunc(@zend_hash_sort, {$IFDEF PHP7}'zend_hash_sort_ex@@16'{$ELSE}'zend_hash_sort'{$ENDIF});
+
+ // -- zend_hash_compare
+ LFunc(@zend_hash_compare, 'zend_hash_compare');
+
+ // -- zend_hash_minmax
+ LFunc(@zend_hash_minmax, {$IFDEF PHP7}'zend_hash_minmax@@12'{$ELSE}'zend_hash_minmax'{$ENDIF});
+
+ // -- zend_hash_num_elements
+ {$IFNDEF PHP7}
+ LFunc(@zend_hash_num_elements, 'zend_hash_num_elements');
+ {$ENDIF}
+
+ // -- zend_hash_rehash
+ LFunc(@zend_hash_rehash, {$IFDEF PHP7}'zend_hash_rehash@@4'{$ELSE}'zend_hash_rehash'{$ENDIF});
+
+ // -- zend_hash_func
+ LFunc(@zend_hash_func, 'zend_hash_func');
+
+ // -- zend_get_constant
+ LFunc(@zend_get_constant, 'zend_get_constant');
+
+ // -- zend_register_null_constant
+ {$if defined(PHP530)}
+ LFunc(@zend_register_null_constant, 'zend_register_null_constant');
+
+ // -- zend_register_bool_constant
+ LFunc(@zend_register_bool_constant, 'zend_register_bool_constant');
+
+ // -- zend_register_long_constant
+ LFunc(@zend_register_long_constant, 'zend_register_long_constant');
+ {$ifend}
+ // -- zend_register_double_constant
+ LFunc(@zend_register_double_constant, 'zend_register_double_constant');
+
+ // -- zend_register_string_constant
+ LFunc(@zend_register_string_constant, 'zend_register_string_constant');
+
+ // -- zend_register_stringl_constant
+ LFunc(@zend_register_stringl_constant, 'zend_register_stringl_constant');
+
+ // -- zend_register_constant
+ LFunc(@zend_register_constant, 'zend_register_constant');
+
+ LFunc(@zend_register_auto_global, 'zend_register_auto_global');
+ {$IFDEF PHP5}
+ LFunc(@zend_activate_auto_globals, 'zend_activate_auto_globals');
+ {$ENDIF}
+
+ // -- tsrm_shutdown
+ LFunc(@tsrm_shutdown, 'tsrm_shutdown');
+
+ // -- ts_resource_ex
+ LFunc(@ts_resource_ex, 'ts_resource_ex');
+
+ // -- ts_free_thread
+ LFunc(@ts_free_thread, 'ts_free_thread');
+
+ // -- zend_error
+ LFunc(@zend_error, 'zend_error');
+
+ // -- zend_error_cb
+ LFunc(@zend_error_cb, 'zend_error_cb');
+
+ // -- zend_eval_string
+ LFunc(@zend_eval_string, 'zend_eval_string');
+
+ // -- zend_eval_string
+ LFunc(@zend_eval_string_ex, 'zend_eval_string_ex');
+
+ // -- zend_make_compiled_string_description
+ LFunc(@zend_make_compiled_string_description, 'zend_make_compiled_string_description');
+
+ LFunc(@_zval_copy_ctor_func, {$IFDEF PHP7}'_zval_copy_ctor_func@@4'{$ELSE}'_zval_copy_ctor_func'{$ENDIF});
+ LFunc(@_zval_dtor_func, {$IFDEF PHP7}'_zval_dtor_func@@4'{$ELSE}'_zval_dtor_func'{$ENDIF});
+ LFunc(@_zval_ptr_dtor, '_zval_ptr_dtor');
+
+ // -- zend_print_variable
+ LFunc(@zend_print_variable, 'zend_print_variable');
+
+ // -- zend_stack_init
+ LFunc(@zend_stack_init, 'zend_stack_init');
+
+ // -- zend_stack_push
+ LFunc(@zend_stack_push, 'zend_stack_push');
+
+ // -- zend_stack_top
+ LFunc(@zend_stack_top, 'zend_stack_top');
+
+ // -- zend_stack_del_top
+ LFunc(@zend_stack_del_top, 'zend_stack_del_top');
+
+ // -- zend_stack_int_top
+ LFunc(@zend_stack_int_top, 'zend_stack_int_top');
+
+ // -- zend_stack_is_empty
+ LFunc(@zend_stack_is_empty, 'zend_stack_is_empty');
+
+ // -- zend_stack_destroy
+ LFunc(@zend_stack_destroy, 'zend_stack_destroy');
+
+ // -- zend_stack_base
+ LFunc(@zend_stack_base, 'zend_stack_base');
+
+ // -- zend_stack_count
+ LFunc(@zend_stack_count, 'zend_stack_count');
+
+ // -- zend_stack_apply
+ LFunc(@zend_stack_apply, 'zend_stack_apply');
+
+ // -- zend_stack_apply_with_argument
+ LFunc(@zend_stack_apply_with_argument, 'zend_stack_apply_with_argument');
+
+ // -- _convert_to_string
+ LFunc(@_convert_to_string, {$IFDEF PHP7}'_convert_to_string@@4'{$ELSE}'_convert_to_string'{$ENDIF});
+
+ // -- add_function
+ LFunc(@add_function, {$IFDEF PHP7}'add_function@@12'{$ELSE}'add_function'{$ENDIF});
+
+ // -- sub_function
+ LFunc(@sub_function, {$IFDEF PHP7}'sub_function@@12'{$ELSE}'sub_function'{$ENDIF});
+
+ // -- mul_function
+ LFunc(@mul_function, {$IFDEF PHP7}'mul_function@@12'{$ELSE}'mul_function'{$ENDIF});
+
+ // -- div_function
+ LFunc(@div_function, {$IFDEF PHP7}'div_function@@12'{$ELSE}'div_function'{$ENDIF});
+
+ // -- mod_function
+ LFunc(@mod_function, {$IFDEF PHP7}'mod_function@@12'{$ELSE}'mod_function'{$ENDIF});
+
+ // -- boolean_xor_function
+ LFunc(@boolean_xor_function, {$IFDEF PHP7}'boolean_xor_function@@12'{$ELSE}'boolean_xor_function'{$ENDIF});
+
+ // -- boolean_not_function
+ LFunc(@boolean_not_function, {$IFDEF PHP7}'boolean_not_function@@8'{$ELSE}'boolean_not_function'{$ENDIF});
+
+ // -- bitwise_not_function
+ LFunc(@bitwise_not_function, {$IFDEF PHP7}'bitwise_not_function@@8'{$ELSE}'bitwise_not_function'{$ENDIF});
+
+ // -- bitwise_or_function
+ LFunc(@bitwise_or_function, {$IFDEF PHP7}'bitwise_or_function@@12'{$ELSE}'bitwise_or_function'{$ENDIF});
+
+ // -- bitwise_and_function
+ LFunc(@bitwise_and_function, {$IFDEF PHP7}'bitwise_and_function@@12'{$ELSE}'bitwise_and_function'{$ENDIF});
+
+ // -- bitwise_xor_function
+ LFunc(@bitwise_xor_function, {$IFDEF PHP7}'bitwise_xor_function@@12'{$ELSE}'bitwise_xor_function'{$ENDIF});
+
+ // -- shift_left_function
+ LFunc(@shift_left_function, {$IFDEF PHP7}'shift_left_function@@12'{$ELSE}'shift_left_function'{$ENDIF});
+
+ // -- shift_right_function
+ LFunc(@shift_right_function, {$IFDEF PHP7}'shift_right_function@@12'{$ELSE}'shift_right_function'{$ENDIF});
+
+ // -- concat_function
+ LFunc(@concat_function, {$IFDEF PHP7}'concat_function@@12'{$ELSE}'concat_function'{$ENDIF});
+
+ // -- is_equal_function
+ LFunc(@is_equal_function, {$IFDEF PHP7}'is_equal_function@@12'{$ELSE}'is_equal_function'{$ENDIF});
+
+ // -- is_identical_function
+ LFunc(@is_identical_function, {$IFDEF PHP7}'is_identical_function@@12'{$ELSE}'is_identical_function'{$ENDIF});
+
+ // -- is_not_identical_function
+ LFunc(@is_not_identical_function, {$IFDEF PHP7}'is_not_identical_function@@12'{$ELSE}'is_not_identical_function'{$ENDIF});
+
+ // -- is_not_equal_function
+ LFunc(@is_not_equal_function, {$IFDEF PHP7}'is_not_equal_function@@12'{$ELSE}'is_not_equal_function'{$ENDIF});
+
+ // -- is_smaller_function
+ LFunc(@is_smaller_function, {$IFDEF PHP7}'is_smaller_function@@12'{$ELSE}'is_smaller_function'{$ENDIF});
+
+ // -- is_smaller_or_equal_function
+ LFunc(@is_smaller_or_equal_function, {$IFDEF PHP7}'is_smaller_or_equal_function@@12'{$ELSE}'is_smaller_or_equal_function'{$ENDIF});
+
+ // -- increment_function
+ LFunc(@increment_function, {$IFDEF PHP7}'increment_function@@4'{$ELSE}'increment_function'{$ENDIF});
+
+ // -- decrement_function
+ LFunc(@decrement_function, {$IFDEF PHP7}'decrement_function@@4'{$ELSE}'decrement_function'{$ENDIF});
+
+ // -- convert_scalar_to_number
+ LFunc(@convert_scalar_to_number, {$IFDEF PHP7}'convert_scalar_to_number@@4'{$ELSE}'convert_scalar_to_number'{$ENDIF});
+
+ // -- convert_to_long
+ LFunc(@convert_to_long, {$IFDEF PHP7}'convert_to_long@@4'{$ELSE}'convert_to_long'{$ENDIF});
+
+ // -- convert_to_double
+ LFunc(@convert_to_double, {$IFDEF PHP7}'convert_to_double@@4'{$ELSE}'convert_to_double'{$ENDIF});
+
+ // -- convert_to_long_base
+ LFunc(@convert_to_long_base, {$IFDEF PHP7}'convert_to_long_base@@8'{$ELSE}'convert_to_long_base'{$ENDIF});
+
+ // -- convert_to_null
+ LFunc(@convert_to_null, {$IFDEF PHP7}'convert_to_null@@4'{$ELSE}'convert_to_null'{$ENDIF});
+
+ // -- convert_to_boolean
+ LFunc(@convert_to_boolean, {$IFDEF PHP7}'convert_to_boolean@@4'{$ELSE}'convert_to_boolean'{$ENDIF});
+
+ // -- convert_to_array
+ LFunc(@convert_to_array, {$IFDEF PHP7}'convert_to_array@@4'{$ELSE}'convert_to_array'{$ENDIF});
+
+ // -- convert_to_object
+ LFunc(@convert_to_object, {$IFDEF PHP7}'convert_to_object@@4'{$ELSE}'convert_to_object'{$ENDIF});
+ {$IFNDEF PHP7}
+ // -- add_char_to_string
+ LFunc(@add_char_to_string, 'add_char_to_string');
+
+ // -- add_string_to_string
+ LFunc(@add_string_to_string, 'add_string_to_string');
+ {$ENDIF}
+ // -- zend_string_to_double
+ LFunc(@zend_string_to_double, {$IFDEF PHP7}'zend_strtod'{$ELSE}'zend_string_to_double'{$ENDIF});
+
+ // -- zval_is_true
+ LFunc(@zval_is_true, {$IFDEF PHP7}'zend_is_true@@4'{$ELSE}'zval_is_true'{$ENDIF});
+
+ // -- compare_function
+ LFunc(@compare_function, {$IFDEF PHP7}'compare_function@@12'{$ELSE}'compare_function'{$ENDIF});
+
+ // -- numeric_compare_function
+ LFunc(@numeric_compare_function, {$IFDEF PHP7}'numeric_compare_function@@8'{$ELSE}'numeric_compare_function'{$ENDIF});
+
+ // -- string_compare_function
+ LFunc(@string_compare_function, {$IFDEF PHP7}'string_compare_function@@8'{$ELSE}'string_compare_function'{$ENDIF});
+
+ // -- zend_str_tolower
+ LFunc(@zend_str_tolower, {$IFDEF PHP7}'zend_str_tolower@@8'{$ELSE}'zend_str_tolower'{$ENDIF});
+
+ // -- zend_binary_zval_strcmp
+ LFunc(@zend_binary_zval_strcmp, {$IFDEF PHP7}'zend_binary_zval_strcmp@@8'{$ELSE}'zend_binary_zval_strcmp'{$ENDIF});
+
+ // -- zend_binary_zval_strncmp
+ LFunc(@zend_binary_zval_strncmp, {$IFDEF PHP7}'zend_binary_zval_strncmp@@12'{$ELSE}'zend_binary_zval_strncmp'{$ENDIF});
+
+ // -- zend_binary_zval_strcasecmp
+ LFunc(@zend_binary_zval_strcasecmp, {$IFDEF PHP7}'zend_binary_zval_strcasecmp@@8'{$ELSE}'zend_binary_zval_strcasecmp'{$ENDIF});
+
+ // -- zend_binary_zval_strncasecmp
+ LFunc(@zend_binary_zval_strncasecmp, {$IFDEF PHP7}'zend_binary_zval_strncasecmp@@12'{$ELSE}'zend_binary_zval_strncasecmp'{$ENDIF});
+
+ // -- zend_binary_strcmp
+ LFunc(@zend_binary_strcmp, {$IFDEF PHP7}'zend_binary_strcmp@@16'{$ELSE}'zend_binary_strcmp'{$ENDIF});
+
+ // -- zend_binary_strncmp
+ LFunc(@zend_binary_strncmp, {$IFDEF PHP7}'zend_binary_strncmp@@20'{$ELSE}'zend_binary_strncmp'{$ENDIF});
+
+ // -- zend_binary_strcasecmp
+ LFunc(@zend_binary_strcasecmp, {$IFDEF PHP7}'zend_binary_strcasecmp@@16'{$ELSE}'zend_binary_strcasecmp'{$ENDIF});
+
+ // -- zend_binary_strncasecmp
+ LFunc(@zend_binary_strncasecmp, {$IFDEF PHP7}'zend_binary_strncasecmp@@20'{$ELSE}'zend_binary_strncasecmp'{$ENDIF});
+
+ // -- zendi_smart_strcmp
+ LFunc(@zendi_smart_strcmp, {$IFDEF PHP7}'zendi_smart_strcmp@@8'{$ELSE}'zendi_smart_strcmp'{$ENDIF});
+
+ // -- zend_compare_symbol_tables
+ LFunc(@zend_compare_symbol_tables, {$IFDEF PHP7}'zend_compare_symbol_tables@@8'{$ELSE}'zend_compare_symbol_tables'{$ENDIF});
+
+ // -- zend_compare_arrays
+ LFunc(@zend_compare_arrays, {$IFDEF PHP7}'zend_compare_arrays@@8'{$ELSE}'zend_compare_arrays'{$ENDIF});
+
+ // -- zend_compare_objects
+ LFunc(@zend_compare_objects, {$IFDEF PHP7}'zend_compare_objects@@8'{$ELSE}'zend_compare_objects'{$ENDIF});
+
+ // -- zend_atoi
+ LFunc(@zend_atoi, {$IFDEF PHP7}'zend_atoi@@8'{$ELSE}'zend_atoi'{$ENDIF});
+
+ // -- get_active_function_name
+ LFunc(@get_active_function_name, 'get_active_function_name');
+
+ // -- zend_get_executed_filename
+ LFunc(@zend_get_executed_filename, 'zend_get_executed_filename');
+
+ // -- zend_get_executed_lineno
+ LFunc(@zend_get_executed_lineno, 'zend_get_executed_lineno');
+
+ // -- zend_set_timeout
+ LFunc(@zend_set_timeout, 'zend_set_timeout');
+
+ // -- zend_unset_timeout
+ LFunc(@zend_unset_timeout, 'zend_unset_timeout');
+
+ // -- zend_timeout
+ LFunc(@zend_timeout, 'zend_timeout');
+
+ // -- zend_highlight
+ LFunc(@zend_highlight, 'zend_highlight');
+
+ // -- zend_strip
+ LFunc(@zend_strip, 'zend_strip');
+
+ // -- highlight_file
+ LFunc(@highlight_file, 'highlight_file');
+
+ // -- highlight_string
+ LFunc(@highlight_string, 'highlight_string');
+
+ // -- zend_html_putc
+ LFunc(@zend_html_putc, 'zend_html_putc');
+
+ // -- zend_html_puts
+ LFunc(@zend_html_puts, 'zend_html_puts');
+
+ LFunc(@zend_parse_method_parameters, 'zend_parse_method_parameters');
+ LFunc(@zend_parse_method_parameters_ex, 'zend_parse_method_parameters_ex');
+
+ {$IFDEF PHP7}
+ // -- zend_parse_parameters_throw
+ LFunc(@zend_parse_parameters_throw, 'zend_parse_parameters_throw');
+ LFunc(@ZvalGetArgs, 'zend_get_parameters_ex');
+ {$ELSE}
+ // -- zend_indent
+ LFunc(@zend_indent, 'zend_indent');
+ {$ENDIF}
+ // -- _zend_get_parameters_array
+ LFunc(@_zend_get_parameters_array, '_zend_get_parameters_array');
+
+ // -- _zend_get_parameters_array_ex
+ LFunc(@_zend_get_parameters_array_ex, '_zend_get_parameters_array_ex');
+
+ // -- zend_ini_refresh_caches
+ LFunc(@zend_ini_refresh_caches, 'zend_ini_refresh_caches');
+
+ // -- zend_alter_ini_entry
+ LFunc(@zend_alter_ini_entry, 'zend_alter_ini_entry');
+ LFunc(@zend_alter_ini_entry_ex, 'zend_alter_ini_entry_ex');
+ // -- zend_restore_ini_entry
+ LFunc(@zend_restore_ini_entry, 'zend_restore_ini_entry');
+
+ // -- zend_ini_long
+ LFunc(@zend_ini_long, 'zend_ini_long');
+
+ // -- zend_ini_double
+ LFunc(@zend_ini_double, 'zend_ini_double');
+
+ // -- zend_ini_string
+ LFunc(@zend_ini_string, 'zend_ini_string');
+
+ // -- compile_string
+ LFunc(@compile_string, 'compile_string');
+
+ // -- execute
+ LFunc(@execute, {$IFDEF PHP550}'zend_execute'{$ELSE}'execute'{$ENDIF});
+
+ // -- zend_wrong_param_count
+ LFunc(@zend_wrong_param_count, 'zend_wrong_param_count');
+
+ // -- zend_hash_quick_add_or_update
+ LFunc(@_zend_hash_quick_add_or_update, '_zend_hash_quick_add_or_update');
+
+ // -- add_property_long_ex
+ LFunc(@add_property_long_ex, 'add_property_long_ex');
+
+ // -- add_property_null_ex
+ LFunc(@add_property_null_ex, 'add_property_null_ex');
+
+ // -- add_property_bool_ex
+ LFunc(@add_property_bool_ex, 'add_property_bool_ex');
+
+ // -- add_property_resource_ex
+ LFunc(@add_property_resource_ex, 'add_property_resource_ex');
+
+ // -- add_property_double_ex
+ LFunc(@add_property_double_ex, 'add_property_double_ex');
+
+ // -- add_property_string_ex
+ LFunc(@add_property_string_ex, 'add_property_string_ex');
+
+ // -- add_property_stringl_ex
+ LFunc(@add_property_stringl_ex, 'add_property_stringl_ex');
+
+ // -- add_property_zval_ex
+ LFunc(@add_property_zval_ex, 'add_property_zval_ex');
+
+ LFunc(@call_user_function, {$IFDEF COMPILER_php7pv}'__call_function'{$ELSE}'call_user_function'{$ENDIF});
+ {$IFNDEF COMPILER_php7pv}
+ LFunc(@call_user_function_ex, 'call_user_function_ex');
+ {$ENDIF}
+ // -- add_assoc_long_ex
+ LFunc(@add_assoc_long_ex, 'add_assoc_long_ex');
+
+ // -- add_assoc_null_ex
+ LFunc(@add_assoc_null_ex, 'add_assoc_null_ex');
+
+ // -- add_assoc_bool_ex
+ LFunc(@add_assoc_bool_ex, 'add_assoc_bool_ex');
+
+ // -- add_assoc_resource_ex
+ LFunc(@add_assoc_resource_ex, 'add_assoc_resource_ex');
+
+ // -- add_assoc_double_ex
+ LFunc(@add_assoc_double_ex, 'add_assoc_double_ex');
+
+ // -- add_assoc_string_ex
+ LFunc(@add_assoc_string_ex, 'add_assoc_string_ex');
+
+ // -- add_assoc_stringl_ex
+ LFunc(@add_assoc_stringl_ex, 'add_assoc_stringl_ex');
+
+ // -- add_assoc_zval_ex
+ LFunc(@add_assoc_zval_ex, 'add_assoc_zval_ex');
+
+ // -- add_index_long
+ LFunc(@add_index_long, 'add_index_long');
+
+ // -- add_index_null
+ LFunc(@add_index_null, 'add_index_null');
+
+ // -- add_index_bool
+ LFunc(@add_index_bool, 'add_index_bool');
+
+ // -- add_index_resource
+ LFunc(@add_index_resource, 'add_index_resource');
+
+ // -- add_index_double
+ LFunc(@add_index_double, 'add_index_double');
+
+ // -- add_index_string
+ LFunc(@add_index_string, 'add_index_string');
+
+ // -- add_index_stringl
+ LFunc(@add_index_stringl, 'add_index_stringl');
+
+ // -- add_index_zval
+ LFunc(@add_index_zval, 'add_index_zval');
+
+ // -- add_next_index_long
+ LFunc(@add_next_index_long, 'add_next_index_long');
+
+ // -- add_next_index_null
+ LFunc(@add_next_index_null, 'add_next_index_null');
+
+ // -- add_next_index_bool
+ LFunc(@add_next_index_bool, 'add_next_index_bool');
+
+ // -- add_next_index_resource
+ LFunc(@add_next_index_resource, 'add_next_index_resource');
+
+ // -- add_next_index_double
+ LFunc(@add_next_index_double, 'add_next_index_double');
+
+ // -- add_next_index_string
+ LFunc(@add_next_index_string, 'add_next_index_string');
+
+ // -- add_next_index_stringl
+ LFunc(@add_next_index_stringl, 'add_next_index_stringl');
+
+ // -- add_next_index_zval
+ LFunc(@add_next_index_zval, 'add_next_index_zval');
+
+ // -- add_get_assoc_string_ex
+ LFunc(@add_get_assoc_string_ex, 'add_get_assoc_string_ex');
+
+ // -- add_get_assoc_stringl_ex
+ LFunc(@add_get_assoc_stringl_ex, 'add_get_assoc_stringl_ex');
+
+ // -- add_get_index_long
+ LFunc(@add_get_index_long, 'add_get_index_long');
+
+ // -- add_get_index_double
+ LFunc(@add_get_index_double, 'add_get_index_double');
+
+ // -- add_get_index_string
+ LFunc(@add_get_index_string, 'add_get_index_string');
+
+ // -- add_get_index_stringl
+ LFunc(@add_get_index_stringl, 'add_get_index_stringl');
+
+ // -- _array_init
+ LFunc(@_array_init, '_array_init');
+
+ // -- _object_init
+ LFunc(@_object_init, '_object_init');
+
+ // -- _object_init_ex
+ LFunc(@_object_init_ex, '_object_init_ex');
+
+ // -- _object_and_properties_init
+ LFunc(@_object_and_properties_init, '_object_and_properties_init');
+
+ // -- zend_register_internal_class
+ LFunc(@zend_register_internal_class, 'zend_register_internal_class');
+
+ // -- zend_register_internal_class_ex
+ LFunc(@zend_register_internal_class_ex, 'zend_register_internal_class_ex');
+
+ // -- zend_startup_module
+ LFunc(@zend_startup_module, 'zend_startup_module');
+
+ // -- zend_startup_module_ex
+ LFunc(@zend_startup_module_ex, 'zend_startup_module_ex');
+
+ // -- zend_register_module_ex
+ LFunc(@zend_register_module_ex, 'zend_register_module_ex');
+
+ // -- zend_register_internal_module
+ LFunc(@zend_register_internal_module, 'zend_register_internal_module');
+
+ // -- zend_startup_modules
+ LFunc(@zend_startup_modules, 'zend_startup_modules');
+
+ // -- zend_collect_module_handlers
+ LFunc(@zend_collect_module_handlers, 'zend_collect_module_handlers');
+
+ // -- get_zend_version
+ LFunc(@get_zend_version, 'get_zend_version');
+
+ // -- zend_make_printable_zval
+ LFunc(@zend_make_printable_zval, 'zend_make_printable_zval');
+
+ // -- zend_print_zval
+ LFunc(@zend_print_zval, 'zend_print_zval');
+
+ // -- zend_print_zval_r
+ LFunc(@zend_print_zval_r, 'zend_print_zval_r');
+
+ // -- zend_output_debug_string
+ LFunc(@zend_output_debug_string, 'zend_output_debug_string');
+
+ // -- zend_get_parameters
+ LFunc(@Zend_Get_Parameters, 'zend_get_parameters');
+
+ // - zend_get_parameters_ex (native call)
+ LFunc(@zend_get_params_ex, 'zend_get_parameters_ex');
+ {$IFDEF PHP5}
+ LFunc(@zend_destroy_file_handle, 'zend_destroy_file_handle');
+ {$ENDIF}
+
+ LFunc(WriteFuncPtr, 'zend_write');
+ if Assigned(WriteFuncPtr) then
+ @zend_write := pointer(WriteFuncPtr^);
+
+ Result := true;
+end;
+
+procedure ZEND_PUTS(str: zend_pchar);
+begin
+ if assigned(str) then
+ zend_write(str, strlen(str));
+end;
+
+procedure convert_to_string(op: pzval);
+begin
+ _convert_to_string(op, nil, 0);
+end;
+
+procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions: {$IFDEF PHP7}HashTable{$ELSE}pointer{$ENDIF});
+begin
+
+ if class_name = nil then
+ Exit;
+
+ ZeroMemory(@class_container, sizeof(Tzend_class_entry));
+
+ {$IFNDEF COMPILER_VC9}
+ class_container.name := strdup(class_name);
+ {$ELSE}
+ {$IFDEF PHP7}
+ class_container.name.val := estrdup(class_name);
+ {$ELSE}
+ class_container.name := estrdup(class_name);
+ {$ENDIF}
+ {$ENDIF}
+ {$IFDEF PHP7}
+ class_container.name.len := strlen(class_name);
+ class_container.function_table := functions;
+ {$ELSE}
+ class_container.name_length := strlen(class_name);
+ class_container.builtin_functions := functions;
+ {$ENDIF}
+end;
+{$IFNDEF PHP7}
+function ZEND_FAST_ALLOC: pzval;
+begin
+ Result := emalloc(sizeof(zval));
+end;
+
+function ALLOC_ZVAL: pzval;
+begin
+ Result := emalloc(sizeof(zval));
+end;
+
+procedure ALLOC_ZVAL(out Result: pzval);
+begin
+ Result := emalloc(sizeof(zval));
+end;
+{$ENDIF}
+procedure INIT_PZVAL(p: pzval);
+begin
+ {$IFDEF PHP7}
+ p^.value.counted.gc.refcount := 1;
+ {$ELSE}
+ p^.refcount := 1;
+ p^.is_ref := 0;
+ {$ENDIF}
+end;
+
+procedure LOCK_ZVAL(p: pzval);
+begin
+ Inc({$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF});
+end;
+
+procedure UNLOCK_ZVAL(p: pzval);
+begin
+ if {$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF} > 0 then
+ Dec({$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF});
+end;
+
+function MAKE_STD_ZVAL: pzval;
+begin
+ {$IFNDEF PHP7}
+ Result := ALLOC_ZVAL;
+ {$ENDIF}
+ INIT_PZVAL(Result);
+end;
+
+function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
+var
+ i : integer;
+
+ p:
+ {$IFDEF PHP7}
+ pzval
+ {$ELSE}
+ pppzval
+ {$ENDIF};
+begin
+ if number = 0 then
+ begin
+ Result := SUCCESS;
+ Exit;
+ end;
+ {$IFDEF PHP7}
+ Params.value.arr.nNumOfElements := number;
+ for i := 0 to number - 1 do
+ zend_hash_index_add_empty_element(Params.value.arr, i);
+
+ p := emalloc(number * sizeOf(zval));
+ Result := _zend_get_parameters_array_ex(number, p);
+
+ for i := 0 to number - 1 do
+ begin
+ _zend_hash_update_ind(Params.value.arr, i, p, '', 0);
+ if i <> number then
+ inc(integer(p), sizeof(zval));
+ end;
+
+ efree(p);
+ _zend_get_parameters_array_ex(number, p);
+ {$ELSE}
+ SetLength(Params, number);
+ for i := 0 to number - 1 do
+ New(Params[i]);
+
+ p := emalloc(number * sizeOf(ppzval));
+ Result := _zend_get_parameters_array_ex(number, p, TSRMLS_DC);
+
+ for i := 0 to number - 1 do
+ begin
+ Params[i]^ := p^^;
+ if i <> number then
+ p^ := ppzval( integer(p^) + sizeof(ppzval) );
+ end;
+
+ efree(p);
+ {$ENDIF}
+end;
+
+procedure dispose_pzval_array(Params: pzval_array);
+var
+ i : integer;
+begin
+ {$IFDEF PHP7}
+ if Params.value.arr.nNumOfElements>0 then
+ for i := 0 to Params.value.arr.nNumOfElements-1 do
+ Freemem(zend_hash_index_findZval(Params,i));
+ {$ELSE}
+ if Length(Params)>0 then
+ for i := 0 to High(Params) do
+ FreeMem(Params[i]);
+ {$ENDIF}
+ Params := nil;
+end;
+
+{ EPHP4DelphiException }
+
+constructor EPHP4DelphiException.Create(const Msg: zend_ustr);
+begin
+ inherited Create('Unable to link '+ Msg+' function');
+end;
+constructor EPHP4DelphiHookException.Create(const Msg: zend_ustr);
+begin
+ inherited Create('Unable to hook '+ Msg+' function');
+end;
+
+{procedure zenderror(Error : zend_pchar);
+begin
+ zend_error(E_PARSE, Error);
+end;}
+
+function zend_hash_get_current_data(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; pData: Pointer): Integer; cdecl;
+begin
+ result := zend_hash_get_current_data_ex(ht, pData, cardinal(nil));
+end;
+
+procedure zend_hash_internal_pointer_reset(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}); cdecl;
+begin
+ zend_hash_internal_pointer_reset_ex(ht, cardinal(nil));
+end;
+
+function ts_resource(id : integer) : pointer;
+begin
+ result := ts_resource_ex(id, nil);
+end;
+
+function tsrmls_fetch : pointer;
+begin
+ result := ts_resource_ex(0, nil);
+end;
+
+function zend_unregister_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; count : integer; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; TSRMLS_DC : pointer) : integer;
+var
+ i : integer;
+ {$IFDEF PHP7}
+ pzs: zend_pchar;
+ {$ENDIF}
+ ptr : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF};
+begin
+ Result := SUCCESS;
+ i := 0;
+ ptr := functions;
+ if ptr = nil then
+ Exit;
+ while ptr.fname <> nil do
+ begin
+ if ( count <> -1 ) and (i >= count) then
+ break;
+ {$IFDEF PHP7}
+ pzs^.len := strlen(ptr.fname);
+ pzs^.val := estrdup(ptr.fname);
+ zend_hash_del_key_or_index(function_table, pzs);
+ {$ELSE}
+ zend_hash_del_key_or_index(function_table, ptr.fname, strlen(ptr.fname) +1, 0, HASH_DEL_KEY);
+ {$ENDIF}
+ inc(ptr);
+ inc(i);
+ end;
+end;
+
+// registers all functions in *library_functions in the function hash
+
+function zend_register_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; _type: integer; TSRMLS_DC : pointer) : integer;
+var
+ ptr : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF};
+ _function : {$IFDEF PHP7} _zend_function{$ELSE}zend_function{$ENDIF};
+ internal_function :{$IFDEF PHP7}P_zend_internal_function{$ELSE}PzendInternalFunction{$ENDIF};
+ count : integer;
+ unload : integer;
+ target_function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
+ error_type : integer;
+
+begin
+ Result := FAILURE;
+ if functions = nil then
+ Exit;
+ ptr := functions;
+ count := 0;
+ unload := 0;
+ if _type = MODULE_PERSISTENT then
+ error_type := E_CORE_WARNING
+ else
+ error_type := E_WARNING;
+
+ internal_function := @_function;
+ target_function_table := function_table;
+
+ if (target_function_table = nil) then
+ target_function_table := GetCompilerGlobals.function_table;
+
+
+ internal_function._type := ZEND_INTERNAL_FUNCTION;
+
+ while (ptr.fname <> nil) do
+ begin
+ internal_function.handler := ptr.handler;
+ {$IFDEF PHP7}
+ internal_function.function_name.val := ptr.fname;
+ {$ELSE}
+ internal_function.function_name := ptr.fname;
+ {$ENDIF}
+ if not Assigned(internal_function.handler) then begin
+ zend_error(error_type, 'Null function defined as active function');
+ zend_unregister_functions(functions, count, target_function_table, TSRMLS_DC);
+ Result := FAILURE;
+ Exit;
+ end;
+
+ if (zend_hash_add_or_update(target_function_table, ptr.fname, strlen(ptr.fname)+1, @_function, sizeof(zend_function), nil, HASH_ADD) = FAILURE) then
+ begin
+ unload:=1;
+ break;
+ end;
+ inc(ptr);
+ inc(count);
+ end;
+
+
+ if (unload = 1) then begin // before unloading, display all remaining bad function in the module */
+ while (ptr.fname<> nil) do begin
+ if (zend_hash_exists(target_function_table, ptr.fname, strlen(ptr.fname)+1)) = 1 then
+ begin
+ zend_error(error_type, zend_pchar(Format('Function registration failed - duplicate name - %s', [ptr.fname])));
+ end;
+ inc(ptr);
+ end;
+ zend_unregister_functions(functions, count, target_function_table, TSRMLS_DC);
+ result := FAILURE;
+ Exit;
+ end;
+ Result := SUCCESS;
+
+end;
+
+function __fgsapi(sapi_globals_value:pointer; tsrmls_dc:pointer): Pointer;
+type P = ^IntPtr;
+begin
+ Result := ppointer( P(tsrmls_dc)^ + IntPtr(sapi_globals_value)*Sizeof(Pointer) - Sizeof(Pointer) )^;
+end;
+
+function GetGlobalResource(resource_name: AnsiString) : pointer;
+var
+ global_id : pointer;
+begin
+ Result := nil;
+ try
+ global_id := GetProcAddress(PHPLib, zend_pchar(resource_name));
+ if Assigned(global_id) then
+ begin
+ Result := __fgsapi(pointer(global_id^), tsrmls_fetch);
+ end;
+ except
+ Result := nil;
+ end;
+end;
+
+function GetGlobalResourceDC(resource_name: AnsiString;TSRMLS_DC:pointer) : pointer;
+var
+ global_id : pointer;
+begin
+ Result := nil;
+ try
+ global_id := GetProcAddress(PHPLib, zend_pchar(resource_name));
+ if Assigned(global_id) then
+ begin
+ Result := Pointer( __fgsapi(pointer(global_id^), TSRMLS_DC) );
+ end;
+ except
+ Result := nil;
+ end;
+end;
+
+function GetCompilerGlobals : Pzend_compiler_globals;
+begin
+ result := GetGlobalResource('compiler_globals_id');
+end;
+
+function GetExecutorGlobals : pzend_executor_globals;
+begin
+ result := GetGlobalResource('executor_globals_id');
+end;
+
+function GetAllocGlobals : pointer;
+begin
+ result := GetGlobalResource('alloc_globals_id');
+end;
+
+{$IFDEF PHP5}
+
+procedure zend_addref_p;
+begin
+ Inc({$IFDEF PHP7}z.value.counted.gc.refcount{$ELSE}z.refcount{$ENDIF});
+end;
+
+procedure my_class_add_ref;
+begin
+ Inc(aclass^^.refcount,1);
+end;
+
+procedure copy_zend_constant(C: PZendConstant); cdecl;
+ var
+ I: Integer;
+begin
+ C^.name := zend_strndup(C^.name, C^.name_len - 1);
+ I := c^.flags and CONST_PERSISTENT;
+ if I > 0 then
+ _zval_copy_ctor(@c.value, nil, 0);
+end;
+
+function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
+{$IFDEF CPUX64}
+asm
+ mov rax, [rsp + 32]
+ mov rcx, [rsp + 24]
+ mov rdx, [rsp + 16]
+ pop rbp
+ push rax
+ push rcx
+ push rdx
+ call _object_init_ex
+ add rsp, $0c
+ ret
+end;
+{$ELSE}
+asm
+ mov eax, [esp + 16]
+ mov ecx, [esp + 12]
+ mov edx, [esp + 8]
+ pop ebp
+ push eax
+ push ecx
+ push edx
+ call _object_init_ex
+ add esp, $0c
+ ret
+end;
+{$ENDIF}
+
+
+function Z_LVAL(z : pzval) : longint;
+begin
+ if z = nil then
+ begin
+ Result := 0;
+ exit;
+ end;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_LONG then
+ Result := z.value.lval
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_DOUBLE: Result := Trunc(z.value.dval);
+ IS_BOOL : Result := z.value.lval;
+ IS_STRING: Result := StrToIntDef( Z_STRVAL(z), 0 );
+ else
+ Result := 0;
+ end;
+end;
+
+function Z_BVAL(z : pzval) : boolean;
+begin
+ if z = nil then
+ begin
+ Result := false;
+ exit;
+ end;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_BOOL then
+ Result := boolean(zend_bool(z.value.lval))
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_DOUBLE: if Trunc(z.value.dval) = 0 then Result := false else Result := true;
+ IS_LONG : if z.value.lval = 0 then Result := false else Result := true;
+ IS_STRING: if Z_STRVAL(z) = '' then Result := False else Result := True;
+ else
+ Result := False;
+ end;
+ //Result := zend_bool(z.value.lval);
+end;
+
+function Z_DVAL(z : pzval) : double;
+begin
+ if z = nil then
+ begin
+ Result := 0;
+ exit;
+ end;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_DOUBLE then
+ Result := z.value.dval
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG, IS_BOOL: Result := z.value.lval;
+ IS_STRING: Result := StrToFloatDef( Z_STRVAL(z), 0 );
+ else
+ Result := 0;
+ end;
+end;
+
+function Z_VARREC(z: pzval): TVarRec;
+var P: zend_ustr;
+begin
+ if z = nil then
+ begin
+ Result.VType := vtBoolean;
+ Result.VBoolean := false;
+ exit;
+ end;
+
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_BOOL: begin
+ Result.VType := vtBoolean;
+ Result.VBoolean := Boolean(z.value.lval);
+ end;
+ IS_LONG: begin
+ Result.VType := vtInteger;
+ Result.VInteger := z.value.lval;
+ end;
+ IS_DOUBLE: begin
+ Result.VType := vtExtended;
+ New(Result.VExtended);
+ Result.VExtended^ := z.value.dval;
+ end;
+ IS_STRING: begin
+ Result.VType := {$IFDEF PHP_UNICODE}vtString{$ELSE}vtAnsiString{$ENDIF};
+
+ SetLength(P, z.value.str.len);
+ Move(z.value.str.val^, P[1], z.value.str.len);
+
+ {$IFDEF PHP_UNICODE}
+ Result.VUnicodeString := Pointer(P);
+ {$ELSE}
+ Result.VAnsiString := Pointer(P);
+ {$ENDIF}
+ end;
+ else
+ begin
+ Result.VType := vtPointer;
+ Result.VPointer := nil;
+ end;
+ end;
+end;
+{$ifndef WSTR}
+function RawByteString(s: String): TBytes; overload;
+begin
+
+end;
+
+function RawByteString(s: PAnsiChar): TBytes; overload;
+begin
+
+end;
+
+function Z_RAWSTR(z: pzval): TBytes;
+{$else}
+function Z_RAWSTR(z: pzval): RawByteString;
+{$endif}
+{$ifdef fpc}
+var
+ s_len: SizeInt;
+{$endif}
+begin
+ Result := '';
+ case z^._type of
+ IS_BOOL:
+ begin
+ if z^.value.lval = 1 then
+ Result := RawByteString('True')
+ Else
+ Result := RawByteString('False');
+ end;
+ IS_LONG:
+ Result := RawByteString(IntToStr(z^.value.lval));
+ IS_DOUBLE:
+ Result := RawByteString(FloatToStr(z^.value.dval));
+ IS_STRING:
+ begin
+ SetString(Result, PAnsiChar(z^.value.str.val), z^.value.str.len);
+ SetCodePage(Result, CP_UTF8, not IsUTF8String(Result));
+ end;
+ IS_ARRAY:
+ Result := RawByteString('(array)');
+ IS_OBJECT:
+ Result := RawByteString('[object]');
+ IS_RESOURCE:
+ Result := RawByteString('#resource#id:' + IntToStr(z^.value.lval));
+ end;
+end;
+function Z_STRUVAL(z : pzval) : UTF8String;
+begin
+ Result := UTf8String(Z_RawStr(z));
+end;
+
+function Z_STRVAL(z : pzval) : WideString;
+begin
+ Result := WideString(Z_RawStr(z));
+end;
+
+function Z_ASTRVAL(z : pzval) : AnsiString;
+begin
+ Result := AnsiString(Z_RawStr(z));
+end;
+
+function Z_SSTRVAL(z : pzval) : String;
+begin
+ Result := String(Z_RawStr(z));
+end;
+
+function Z_CHAR(z: PZval) : zend_uchar;
+var S: zend_ustr;
+begin
+Result := #0;
+ if z = nil then
+ exit;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
+ end;
+ SetLength(S,1);
+ Result := zend_uchar(S[1]);
+end;
+function Z_ACHAR(z: PZVAL): AnsiChar;
+var S: AnsiString;
+begin
+Result := #0;
+ if z = nil then
+ exit;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
+ end;
+ SetLength(S,1);
+ Result := AnsiChar(S[1]);
+end;
+
+function Z_WCHAR(z: PZVAL): WideChar;
+var S: WideString;
+begin
+Result := #0;
+ if z = nil then
+ exit;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
+ end;
+ SetLength(S,1);
+ Result := WideChar(S[1]);
+end;
+{$ifdef WSTR}
+function Z_UCHAR(z: PZVAL): UTF8Char;
+var S: UTF8String;
+begin
+Result := #0;
+ if z = nil then
+ exit;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
+ end;
+ SetLength(S,1);
+ Result := Utf8Char(S[1]);
+end;
+{$else}
+function Z_UCHAR(z: PZVAL): AnsiChar;
+begin
+ Result := Z_ACHAR(z);
+end;
+{$endif}
+
+function Z_STRLEN(z : pzval) : longint;
+begin
+ Result := Length(Z_STRVAL(z));
+end;
+
+function Z_ARRVAL(z : pzval ) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+begin
+ Result := {$IFDEF PHP7} z.value.arr {$ELSE}z.value.ht{$ENDIF};
+end;
+
+function Z_OBJ_HANDLE(z :pzval) : {$IFDEF PHP7} P_zend_object_handlers {$ELSE} zend_object_handle{$ENDIF};
+begin
+ Result := {$IFDEF PHP7}z.value.obj.handlers{$ELSE}z.value.obj.handle{$ENDIF};
+end;
+
+function Z_OBJ_HT(z : pzval) : pzend_object_handlers;
+begin
+ Result := z.value.obj.handlers;
+end;
+
+function Z_OBJPROP(z : pzval;TSRMLS_DC:pointer=nil) : {$IFDEF PHP7} PZend_Array {$ELSE} PHashTable {$ENDIF};
+{$IFDEF PHP7}
+begin
+ Result := Z_OBJ_HT(z)^.get_properties(z);
+end;
+{$ELSE}
+begin
+ if TSRMLS_DC = nil then
+ TSRMLS_DC := ts_resource_ex(0, nil);
+ Result := Z_OBJ_HT(z)^.get_properties(@z, TSRMLS_DC);
+end;
+{$ENDIF}
+
+
+{$ENDIF}
+
+{$IFDEF PHP5}
+procedure _zval_copy_ctor (val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint);
+begin
+ if {$IFDEF PHP7}val^.u1.v._type{$ELSE}val^._type{$ENDIF} <= IS_BOOL then
+ Exit
+ else
+ _zval_copy_ctor_func(val, __zend_filename, __zend_lineno);
+end;
+
+procedure _zval_dtor(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint);
+begin
+ if {$IFDEF PHP7}val^.u1.v._type{$ELSE}val^._type{$ENDIF} <= IS_BOOL then
+ Exit
+ else
+ _zval_dtor_func(val, __zend_filename, __zend_lineno);
+end;
+
+function zend_hash_init (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer; pDestructor : pointer; persistent: zend_bool) : integer;
+begin
+ Result := _zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent, nil, 0);
+end;
+
+function zend_hash_add_or_update(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
+ nKeyLength : uint; pData : {$IFDEF PHP7}pzval{$ELSE}pointer{$ENDIF}; nDataSize : uint; pDes : pointer;
+ flag : integer) : integer;
+{$IFDEF PHP7}
+var pz: zend_pchar;
+{$ENDIF}
+begin
+ {$IFDEF PHP7}
+ pz^.len := strlen(arKey);
+ pz^.val := estrdup(arKey);
+ if Assigned(_zend_hash_add_or_update) then
+ Result := _zend_hash_add_or_update(ht, pz, pData, flag, '', 0).u2.fe_iter_idx
+ {$ELSE}
+ if Assigned(_zend_hash_add_or_update) then
+ Result := _zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDes, flag, nil, 0)
+ {$ENDIF}
+ else
+ Result := FAILURE;
+end;
+
+function zend_hash_init_ex (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
+ pDestructor : pointer; persistent : zend_bool; bApplyProtection : zend_bool): integer;
+begin
+ Result := _zend_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection, nil, 0);
+end;
+
+{$ENDIF}
+
+{$IFNDEF PHP_UNICODE}
+function AnsiFormat(const Format: AnsiString; const Args: array of const): AnsiString;
+begin
+ Result := Sysutils.Format(Format, Args);
+end;
+{$ENDIF}
+{$IFDEF COMPILER_VC9}
+function DupStr(strSource : zend_pchar) : zend_pchar; cdecl;
+var
+ P : zend_pchar;
+begin
+
+ if (strSource = nil) then
+ P := nil
+ else
+ begin
+ P := StrNew(strSource);
+ end;
+ Result := P;
+end;
+{$ENDIF}
+
+{$IFDEF PHP4DELPHI_AUTOLOAD}
+initialization
+ LoadZEND;
+{$ENDIF}
+
+{$IFDEF PHP4DELPHI_AUTOUNLOAD}
+finalization
+ UnloadZEND;
+{$ENDIF}
+
+end.
+
+
diff --git a/ZendTypes.pas b/Source/ZendTypes.pas
similarity index 73%
rename from ZendTypes.pas
rename to Source/ZendTypes.pas
index e43872c..d0d768b 100644
--- a/ZendTypes.pas
+++ b/Source/ZendTypes.pas
@@ -1,1373 +1,1588 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ ZEND - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: ZendTypes.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit ZENDTypes;
-
-interface
-
-uses
- Windows;
-
-const
- //zend.h
- ZEND_MAX_RESERVED_RESOURCES = 4;
-
- //zend_vm_opcodes.h
-const
- ZEND_NOP = 0;
- ZEND_ADD = 1;
- ZEND_SUB = 2;
- ZEND_MUL = 3;
- ZEND_DIV = 4;
- ZEND_MOD = 5;
- ZEND_SL = 6;
- ZEND_SR = 7;
- ZEND_CONCAT = 8;
- ZEND_BW_OR = 9;
- ZEND_BW_AND = 10;
- ZEND_BW_XOR = 11;
- ZEND_BW_NOT = 12;
- ZEND_BOOL_NOT = 13;
- ZEND_BOOL_XOR = 14;
- ZEND_IS_IDENTICAL = 15;
- ZEND_IS_NOT_IDENTICAL = 16;
- ZEND_IS_EQUAL = 17;
- ZEND_IS_NOT_EQUAL = 18;
- ZEND_IS_SMALLER = 19;
- ZEND_IS_SMALLER_OR_EQUAL = 20;
- ZEND_CAST = 21;
- ZEND_QM_ASSIGN = 22;
- ZEND_ASSIGN_ADD = 23;
- ZEND_ASSIGN_SUB = 24;
- ZEND_ASSIGN_MUL = 25;
- ZEND_ASSIGN_DIV = 26;
- ZEND_ASSIGN_MOD = 27;
- ZEND_ASSIGN_SL = 28;
- ZEND_ASSIGN_SR = 29;
- ZEND_ASSIGN_CONCAT = 30;
- ZEND_ASSIGN_BW_OR = 31;
- ZEND_ASSIGN_BW_AND = 32;
- ZEND_ASSIGN_BW_XOR = 33;
- ZEND_PRE_INC = 34;
- ZEND_PRE_DEC = 35;
- ZEND_POST_INC = 36;
- ZEND_POST_DEC = 37;
- ZEND_ASSIGN = 38;
- ZEND_ASSIGN_REF = 39;
- ZEND_ECHO = 40;
- ZEND_PRINT = 41;
- ZEND_JMP = 42;
- ZEND_JMPZ = 43;
- ZEND_JMPNZ = 44;
- ZEND_JMPZNZ = 45;
- ZEND_JMPZ_EX = 46;
- ZEND_JMPNZ_EX = 47;
- ZEND_CASE = 48;
- ZEND_SWITCH_FREE = 49;
- ZEND_BRK = 50;
- ZEND_CONT = 51;
- ZEND_BOOLEAN = 52; //original ZEND_BOOL
- ZEND_INIT_STRING = 53;
- ZEND_ADD_CHAR = 54;
- ZEND_ADD_STRING = 55;
- ZEND_ADD_VAR = 56;
- ZEND_BEGIN_SILENCE = 57;
- ZEND_END_SILENCE = 58;
- ZEND_INIT_FCALL_BY_NAME = 59;
- ZEND_DO_FCALL = 60;
- ZEND_DO_FCALL_BY_NAME = 61;
- ZEND_RETURN = 62;
- ZEND_RECV = 63;
- ZEND_RECV_INIT = 64;
- ZEND_SEND_VAL = 65;
- ZEND_SEND_VAR = 66;
- ZEND_SEND_REF = 67;
- ZEND_NEW = 68;
- ZEND_JMP_NO_CTOR = 69;
- ZEND_FREE = 70;
- ZEND_INIT_ARRAY = 71;
- ZEND_ADD_ARRAY_ELEMENT = 72;
- ZEND_INCLUDE_OR_EVAL = 73;
- ZEND_UNSET_VAR = 74;
- ZEND_UNSET_DIM_OBJ = 75;
- ZEND_ISSET_ISEMPTY = 76;
- ZEND_FE_RESET = 77;
- ZEND_FE_FETCH = 78;
- ZEND_EXIT = 79;
- ZEND_FETCH_R = 80;
- ZEND_FETCH_DIM_R = 81;
- ZEND_FETCH_OBJ_R = 82;
- ZEND_FETCH_W = 83;
- ZEND_FETCH_DIM_W = 84;
- ZEND_FETCH_OBJ_W = 85;
- ZEND_FETCH_RW = 86;
- ZEND_FETCH_DIM_RW = 87;
- ZEND_FETCH_OBJ_RW = 88;
- ZEND_FETCH_IS = 89;
- ZEND_FETCH_DIM_IS = 90;
- ZEND_FETCH_OBJ_IS = 91;
- ZEND_FETCH_FUNC_ARG = 92;
- ZEND_FETCH_DIM_FUNC_ARG = 93;
- ZEND_FETCH_OBJ_FUNC_ARG = 94;
- ZEND_FETCH_UNSET = 95;
- ZEND_FETCH_DIM_UNSET = 96;
- ZEND_FETCH_OBJ_UNSET = 97;
- ZEND_FETCH_DIM_TMP_VAR = 98;
- ZEND_FETCH_CONSTANT = 99;
- ZEND_DECLARE_FUNCTION_OR_CLASS = 100;
- ZEND_EXT_STMT = 101;
- ZEND_EXT_FCALL_BEGIN = 102;
- ZEND_EXT_FCALL_END = 103;
- ZEND_EXT_NOP = 104;
- ZEND_TICKS = 105;
- ZEND_SEND_VAR_NO_REF = 106;
-{$IFDEF PHP511}
- ZEND_CATCH = 107;
- ZEND_THROW = 108;
- ZEND_FETCH_CLASS = 109;
- ZEND_CLONE = 110;
- ZEND_INIT_METHOD_CALL = 112;
- ZEND_INIT_STATIC_METHOD_CALL = 113;
- ZEND_ISSET_ISEMPTY_VAR = 114;
- ZEND_ISSET_ISEMPTY_DIM_OBJ = 115;
- ZEND_PRE_INC_OBJ = 132;
- ZEND_PRE_DEC_OBJ = 133;
- ZEND_POST_INC_OBJ = 134;
- ZEND_POST_DEC_OBJ = 135;
- ZEND_ASSIGN_OBJ = 136;
- ZEND_INSTANCEOF = 138;
- ZEND_DECLARE_CLASS = 139;
- ZEND_DECLARE_INHERITED_CLASS = 140;
- ZEND_DECLARE_FUNCTION = 141;
- ZEND_RAISE_ABSTRACT_ERROR = 142;
- ZEND_ADD_INTERFACE = 144;
- ZEND_VERIFY_ABSTRACT_CLASS = 146;
- ZEND_ASSIGN_DIM = 147;
- ZEND_ISSET_ISEMPTY_PROP_OBJ = 148;
- ZEND_HANDLE_EXCEPTION = 149;
- ZEND_USER_OPCODE = 150;
-{$ENDIF}
-
- { end of block }
-
- { global/local fetches }
-
-const
- ZEND_FETCH_GLOBAL = 0;
- ZEND_FETCH_LOCAL = 1;
- ZEND_FETCH_STATIC = 2;
-{$IFDEF PHP511}
- ZEND_FETCH_STATIC_MEMBER = 3;
- ZEND_FETCH_GLOBAL_LOCK = 4;
-
- ZEND_FETCH_CLASS_DEFAULT = 0;
- ZEND_FETCH_CLASS_SELF = 1;
- ZEND_FETCH_CLASS_PARENT = 2;
- ZEND_FETCH_CLASS_MAIN = 3;
- ZEND_FETCH_CLASS_GLOBAL = 4;
- ZEND_FETCH_CLASS_AUTO = 5;
- ZEND_FETCH_CLASS_INTERFACE = 6;
- ZEND_FETCH_CLASS_NO_AUTOLOAD = $80;
-{$ENDIF}
-
- { var status for backpatching }
-
-const
- BP_VAR_R = 0;
- BP_VAR_W = 1;
- BP_VAR_RW = 2;
- BP_VAR_IS = 3;
- BP_VAR_NA = 4 { if not applicable }
- ;
- BP_VAR_FUNC_ARG = 5;
- BP_VAR_UNSET = 6;
- ZEND_INTERNAL_FUNCTION = 1;
- ZEND_USER_FUNCTION = 2;
- ZEND_OVERLOADED_FUNCTION = 3;
- ZEND_EVAL_CODE = 4;
- ZEND_INTERNAL_CLASS = 1;
- ZEND_USER_CLASS = 2;
- ZEND_EVAL = (1 shl 0);
- ZEND_INCLUDE = (1 shl 1);
- ZEND_INCLUDE_ONCE = (1 shl 2);
- ZEND_REQUIRE = (1 shl 3);
- ZEND_REQUIRE_ONCE = (1 shl 4);
- ZEND_ISSET = (1 shl 0);
- ZEND_ISEMPTY = (1 shl 1);
- ZEND_CT = (1 shl 0);
- ZEND_RT = (1 shl 1);
- ZEND_HANDLE_FILENAME = 0;
- ZEND_HANDLE_FD = 1;
- ZEND_HANDLE_FP = 2;
- ZEND_HANDLE_STDIOSTREAM = 3;
- ZEND_HANDLE_FSTREAM = 4;
- ZEND_FETCH_STANDARD = 0;
- ZEND_FETCH_ADD_LOCK = 1;
- ZEND_MEMBER_FUNC_CALL = 1 shl 0;
- ZEND_CTOR_CALL = 1 shl 1;
- ZEND_ARG_SEND_BY_REF = (1 shl 0);
- ZEND_ARG_COMPILE_TIME_BOUND = (1 shl 1);
- ZEND_RETURN_VAL = 0;
- ZEND_RETURN_REF = 1;
-
- //zend_errors.h
-const
- E_ERROR = (1 shl 0);
- E_WARNING = (1 shl 1);
- E_PARSE = (1 shl 2);
- E_NOTICE = (1 shl 3);
- E_CORE_ERROR = (1 shl 4);
- E_CORE_WARNING = (1 shl 5);
- E_COMPILE_ERROR = (1 shl 6);
- E_COMPILE_WARNING = (1 shl 7);
- E_USER_ERROR = (1 shl 8);
- E_USER_WARNING = (1 shl 9);
- E_USER_NOTICE = (1 shl 10);
- E_ALL = (E_ERROR or E_WARNING or E_PARSE or E_NOTICE or E_CORE_ERROR or E_CORE_WARNING or E_COMPILE_ERROR or E_COMPILE_WARNING or E_USER_ERROR or E_USER_WARNING or E_USER_NOTICE);
- E_CORE = (E_CORE_ERROR or E_CORE_WARNING);
-
- //zend.h
- //data types
-{$IFDEF PHP510}
-const
- IS_NULL = 0;
- IS_LONG = 1;
- IS_DOUBLE = 2;
- IS_BOOL = 3;
- IS_ARRAY = 4;
- IS_OBJECT = 5;
- IS_STRING= 6;
- IS_RESOURCE = 7;
- IS_CONSTANT = 8;
- IS_CONSTANT_ARRAY = 9;
-{$ELSE}
-const
- IS_NULL = 0;
- IS_LONG = 1;
- IS_DOUBLE = 2;
- IS_STRING = 3;
- IS_ARRAY = 4;
- IS_OBJECT = 5;
- IS_BOOL = 6;
- IS_RESOURCE = 7;
- IS_CONSTANT = 8;
- IS_CONSTANT_ARRAY = 9;
-{$ENDIF}
-
- ZEND_PATHS_SEPARATOR = ';';
- SUCCESS = 0;
- FAILURE = -1; { this MUST stay a negative number, or it may affect functions! }
-
- //zend_modules.h
-const
-{$IFDEF PHP4}
- ZEND_MODULE_API_NO = 20020429;
-{$ELSE}
- {$IFDEF PHP512}
- ZEND_MODULE_API_NO = 20050922;
- {$ELSE}
- {$IFDEF PHP511}
- ZEND_MODULE_API_NO = 20050922;
- {$ELSE}
- {$IFDEF PHP510}
- ZEND_MODULE_API_NO = 20050617;
- {$ELSE}
- {$IFDEF PHP504}
- ZEND_MODULE_API_NO = 20041030;
- {$ELSE}
- ZEND_MODULE_API_NO = 20040412;
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-{$ENDIF}
-
-{$IFDEF ZTS}
-const
- USING_ZTS = 1;
-{$ELSE}
-const
- USING_ZTS = 0;
-{$ENDIF}
-
-const
- NO_VERSION_YET = nil;
- MODULE_PERSISTENT = 1;
- MODULE_TEMPORARY = 2;
-
- //zend_alloc.h
-const
- MEM_BLOCK_START_MAGIC = $7312F8DC;
- MEM_BLOCK_END_MAGIC = $2A8FCC84;
- MEM_BLOCK_FREED_MAGIC = $99954317;
- MEM_BLOCK_CACHED_MAGIC = $FB8277DC;
-
-
-const
- MAX_CACHED_MEMORY = 11;
- MAX_CACHED_ENTRIES = 256;
- PRE_INIT_CACHE_ENTRIES = 32;
-
- //zend_hash.h
-const
- HASH_KEY_IS_STRING = 1;
- HASH_KEY_IS_LONG = 2;
- HASH_KEY_NON_EXISTANT = 3;
- HASH_UPDATE = (1 shl 0);
- HASH_ADD = (1 shl 1);
- HASH_NEXT_INSERT = (1 shl 2);
- HASH_DEL_KEY = 0;
- HASH_DEL_INDEX = 1;
-
-const
- ZEND_RESOURCE_LIST_TYPE_STD = 1;
- ZEND_RESOURCE_LIST_TYPE_EX = 2;
-
-const
- ZEND_HASH_APPLY_KEEP = 0;
- ZEND_HASH_APPLY_REMOVE = 1 shl 0;
- ZEND_HASH_APPLY_STOP = 1 shl 1;
-
- //zend_constants.h
-const
- CONST_CS = (1 shl 0) { Case Sensitive }
- ;
- CONST_PERSISTENT = (1 shl 1) { Persistent }
- ;
-
- // Debug support
-const
- TSRM_ERROR_LEVEL_ERROR = 1;
- TSRM_ERROR_LEVEL_CORE = 2;
- TSRM_ERROR_LEVEL_INFO = 3;
-
-const
- ZVAL_CACHE_LIST = 0;
-
-
-const
- STACK_BLOCK_SIZE = 64;
-
-
-const
- ZEND_STACK_APPLY_TOPDOWN = 1;
- ZEND_STACK_APPLY_BOTTOMUP = 2;
-
-
- //zend_highlight.h
-const
- HL_COMMENT_COLOR = '#FF8000' { orange }
- ;
- HL_DEFAULT_COLOR = '#0000BB' { blue }
- ;
- HL_HTML_COLOR = '#000000' { black }
- ;
- HL_STRING_COLOR = '#DD0000' { red }
- ;
- HL_BG_COLOR = '#FFFFFF' { white }
- ;
- HL_KEYWORD_COLOR = '#007700' { green }
- ;
-
-const
- ZEND_INI_USER = (1 shl 0);
- ZEND_INI_PERDIR = (1 shl 1);
- ZEND_INI_SYSTEM = (1 shl 2);
- ZEND_INI_ALL = (ZEND_INI_USER or ZEND_INI_PERDIR or ZEND_INI_SYSTEM);
-
- ZEND_INI_DISPLAY_ORIG = 1;
- ZEND_INI_DISPLAY_ACTIVE = 2;
- ZEND_INI_STAGE_STARTUP = (1 shl 0);
- ZEND_INI_STAGE_SHUTDOWN = (1 shl 1);
- ZEND_INI_STAGE_ACTIVATE = (1 shl 2);
- ZEND_INI_STAGE_DEACTIVATE = (1 shl 3);
- ZEND_INI_STAGE_RUNTIME = (1 shl 4);
-
-type
- zend_uint = uint;
- zend_bool = boolean;
- zend_uchar = char;
- zend_ulong = ulong;
- zend_ushort = word;
- unsigned_char = byte;
-
-
-type
- size_t = cardinal;
- ppointer = ^pointer;
- pppointer = ^ppointer;
-
- PStat = ^TStat;
- TStat = record
- st_dev: Word;
- st_ino: Word;
- st_mode: Word;
- st_nlink: SmallInt;
- st_uid: SmallInt;
- st_gid: SmallInt;
- st_rdev: Word;
- st_size: Longint;
- st_atime: Longint;
- st_mtime: Longint;
- st_ctime: Longint;
- end;
- Stat = TStat;
-
- Pzend_mem_header = ^Tzend_mem_header;
- _zend_mem_header = record
- pNext: Pzend_mem_header;
- pLast: Pzend_mem_header;
- size_cached: integer;
- end;
- Tzend_mem_header = _zend_mem_header;
-
-
-type
-
- hash_func_t = function(arKey: PChar; nKeyLength: uint): ulong;
-
- compare_func_t = function(_noname1: Pointer; _noname2: Pointer;
- TSRMLS_DC: Pointer): integer;
-
- dtor_func_t = procedure(pDest: Pointer);
-
- copy_ctor_func_t = procedure(pElement: Pointer);
-
- PBucket = ^TBucket;
- TBucket = record
- h: ulong;
- nKeyLength: uint;
- pData: Pointer;
- pDataPtr: Pointer;
- pListNext: PBucket;
- pListLast: PBucket;
- pNext: PBucket;
- pLast: PBucket;
- arKey: array[0..0] of char;
- end;
-
- PHashTable = ^THashTable;
- THashTable =
- record
- nTableSize: uint;
- nTableMask: uint;
- nNumOfElements: uint;
- nNextFreeElement: ulong;
- pInternalPointer: PBucket;
- pListHead: PBucket;
- pListTail: PBucket;
- arBuckets: ^PBucket;
- pDestructor: pointer;
- persistent: boolean;
- nApplyCount: Byte;
- bApplyProtection: boolean;
- end;
-
- HashPosition = PBucket;
-
-
- {$IFDEF PHP5}
-
- zend_op_array =
- record
- _type : zend_uchar;
- function_name : PChar;
- scope : pointer;
- fn_flags : zend_uint;
- prototype : pointer;
- num_args : zend_uint;
- required_num_args : zend_uint;
- arg_info : pointer;
- pass_rest_by_reference : zend_bool;
- return_reference : Byte;
- refcount : pointer;
- opcodes : pointer;
- last :zend_uint ;
- size : zend_uint;
- T : zend_uint;
- brk_cont_array : pointer;
- last_brk_cont : zend_uint;
- current_brk_cont : zend_uint;
- try_catch_array : pointer;
- last_try_catch : Integer;
- static_variables : PHashTable;
- start_op : pointer;
- backpatch_count : Integer;
- done_pass_two : zend_bool;
- uses_this : zend_bool;
- filename : PChar;
- line_start : zend_uint;
- line_end : zend_uint;
- doc_comment : PChar;
- doc_comment_len : zend_uint;
- reserved : array[0..ZEND_MAX_RESERVED_RESOURCES - 1] of Pointer;
- end;
-
- _zend_internal_function =
- record
- _type : byte;
- function_name : PChar;
- scope : pointer;
- fn_flags : zend_uint;
- prototype : pointer;
- num_args : zend_uint;
- required_num_args : zend_uint;
- arg_info : pointer;
- pass_rest_by_reference : zend_bool;
- return_reference : Byte;
- handler : pointer;
- end;
- TZendInternalFunction = _zend_internal_function;
- PZendInternalFunction = ^TZendInternalFunction;
-
- zend_function =
- record
- case Integer of
- 1 :
- (
- _type : zend_uchar;
- );
- 2 :
- (
- common :
- record
- _type : zend_uchar;
- function_name : PChar;
- scope : pointer;
- fn_flags : zend_uint;
- prototype : pointer;
- num_args : zend_uint;
- required_num_args : zend_uint;
- arg_info : pointer;
- pass_rest_by_reference : zend_bool;
- return_reference : Byte;
- end;
- );
- 3 :
- (
- op_array : zend_op_array;
- );
- 4 :
- (
- internal_function : _zend_internal_function;
- );
- end;
- TZendFunction = zend_function;
- PZendFunction = ^TZendFunction;
-
- PZendObjectIteratorFuncs = ^zend_object_iterator_funcs;
- zend_object_iterator_funcs = record
- dtor : pointer;
- valid : pointer;
- get_currect_data : pointer;
- get_current_key : pointer;
- move_forward : pointer;
- rewind : pointer;
- end;
-
- zend_object_iterator = record
- data : pointer;
- funcs : PZendObjectIteratorFuncs;
- index : ulong;
- end;
-
- zend_class_iterator_funcs = record
- funcs : pointer;
- new_iterator : pointer;
- zf_new_iterator : pointer;
- zf_valid : pointer;
- zf_current : pointer;
- zf_key : pointer;
- zf_next : pointer;
- zf_rewind : pointer;
- end;
- {$ELSE}
-
- type zend_op_array = record
- _type : zend_uchar;
- arg_types : PByte;
- function_name : PChar;
- refcount : pointer;
- opcodes : pointer;
- last : zend_uint;
- size : zend_uint;
- T : zend_uint;
- brk_cont_array : pointer;
- last_brk_cont : zend_uint;
- current_brk_cont : zend_uint;
- uses_globals : zend_bool;
- static_variables : PHashTable;
- start_op : pointer;
- backpatch_count : integer;
-
- return_reference : boolean;
- done_pass_two : boolean;
-
- filename : PChar;
- reserved : array[0..ZEND_MAX_RESERVED_RESOURCES - 1] of Pointer;
- end;
-
-
-type
- _zend_internal_function = record
- _type : byte;
- arg_types : PByte;
- function_name : pchar;
- handler : pointer;
- end;
- PZendInternalFunction = ^_zend_internal_function;
-
- _zend_overloaded_function = record
- _type : byte;
- arg_types : PByte;
- function_name : PChar;
- _var : zend_uint;
- end;
-
- zend_function = record
- case Integer of
- 1 : ( _type : zend_uchar; );
- 2 : (
- common :
- record
- _type : zend_uchar;
- arg_types : PByte;
- function_name : PChar;
- end;
- );
- 3 :
- (
- op_array : zend_op_array;
- );
- 4 :
- (
- internal_function : _zend_internal_function;
- );
- 5 :
- (
- overloaded_function : _zend_overloaded_function;
- );
- end;
-
- {$ENDIF}
-
- Pzend_class_entry = ^Tzend_class_entry;
- {$IFDEF PHP4}
- Tzend_class_entry =
- record
- _type: Char;
- name: PChar;
- name_length: uint;
- parent: pointer;
- refcount: pointer;
- constants_updated: boolean;
- function_table: THashTable;
- default_properties: THashTable;
- builtin_functions: pointer;
- handle_function_call: pointer;
- handle_property_get: pointer;
- handle_property_set: pointer;
- end;
- {$ELSE}
- Tzend_class_entry = record
- _type : char;
- name : pchar;
- name_length : uint;
- parent : PZend_class_entry;
- refcount : integer;
- constants_updated : zend_bool;
- ce_flags : zend_uint;
- function_table : THashTable;
- default_properties : THashTable;
- properties_info : THashTable;
- {$IFDEF PHP511}
- default_static_members : THashTable;
- {$ENDIF}
- static_members : PHashTable;
- constants_table : THashTable;
- builtin_functions : pointer;
- _constructor : PZendFunction;
- _destructor : PZendFunction;
- clone : PZendFunction;
- __get : PZendFunction;
- __set : PZendFunction;
- {$IFDEF PHP510}
- __unset : PZendFunction;
- __isset : PZendFunction;
- {$ENDIF}
- __call: PZendFunction;
- {$IFDEF PHP510}
- serialize_func : PZendFunction;
- unserialize_func : PZendFunction;
- {$ENDIF}
- iterator_funcs : zend_class_iterator_funcs;
-
- create_object : pointer;
- get_iterator : pointer;
- interface_gets_implemented : pointer;
-
- {$IFDEF PHP511}
- serialize : pointer;
- unserialize : pointer;
- {$ENDIF}
-
- interfaces : pointer;
- num_interfaces : zend_uint;
-
- filename : PChar;
- line_start : zend_uint;
- line_end : zend_uint;
- doc_comment : PChar;
- doc_comment_len : zend_uint;
- {$IFDEF PHP511}
- module : pointer;
- {$ENDIF}
- end;
- {$ENDIF}
-
- Pzend_Object = ^Tzend_object;
- PPzend_Object = ^PZend_Object;
- _zend_object = record
- ce: Pzend_class_entry;
- properties: PHashTable;
- {$IFDEF PHP5}
- in_get_set : cardinal;
- {$ENDIF}
- end;
- Tzend_Object = _zend_object;
-
- {$IFDEF PHP5}
-
-
- type
-
- Tzend_object_get_properties = function (_object : pointer; TSRMLS_DC : pointer) : PHashtable; cdecl;
- Pzend_object_get_propeeries = ^Tzend_object_get_properties;
-
- Tzend_object_get_classname = function(_object : pointer; class_name : pointer; class_name_len : pointer; p : integer; TSRMLS_DC : pointer) : integer; cdecl;
-
- zend_object_handlers = record
- // general object functions
- add_ref : pointer;
- del_ref : pointer;
- clone_obj : pointer;
- // individual object functions
- read_property : pointer;
- write_property : pointer;
- read_dimension : pointer;
- write_dimension : pointer;
- get_property_ptr_ptr : pointer;
- _get : pointer;
- _set : pointer;
- has_property : pointer;
- unset_property : pointer;
- has_dimension : pointer;
- unset_dimension : pointer;
- get_properties : Tzend_object_get_properties;
- get_method : pointer;
- call_method : pointer;
- get_constructor : pointer;
- get_class_entry : pointer;
- get_class_name : Tzend_object_get_classname;
- compare_objects : pointer;
- cast_object : pointer;
- count_elements : pointer;
- end;
- pzend_object_handlers = ^zend_object_handlers;
-
- zend_object_handle = cardinal;
- _zend_object_value = record
- handle : zend_object_handle;
- handlers : pzend_object_handlers;
- end;
- TZendObjectValue = _zend_object_value;
- PZendObjectValue = ^TZendObjectValue;
- {$ENDIF}
-
- Pzvalue_value = ^zvalue_value;
- zvalue_value = record
- case longint of
- 0: (lval: longint);
- 1: (dval: double);
- 2: (str: record
- val: PChar;
- len: longint;
- end);
- 3: (ht: PHashTable);
- {$IFDEF PHP4}
- 4: (obj: Tzend_Object);
- {$ELSE}
- 4 : (obj : _zend_object_value);
- {$ENDIF}
- end;
-
- pppzval = ^ppzval;
- ppzval = ^pzval;
-
-
- {$IFDEF PHP4}
- Pzval = ^zval;
- zval = record
- value: zvalue_value;
- _type: Byte;
- is_ref: Byte;
- refcount: Smallint;
- end;
- Tzval = zval;
- {$ELSE}
- pzval = ^zval;
- zval = record
- value : zvalue_value;
- refcount : zend_uint;
- _type : byte;
- is_ref : byte;
- end;
- {$ENDIF}
-
- ppzval_array = ^pzval_array;
- pzval_array = array of ppzval;
-
-
-type
- PZend_rsrc_list_entry = ^zend_rsrc_list_entry;
- zend_rsrc_list_entry = record
- ptr : pointer;
- _type : integer;
- refcount : integer;
- end;
- TZend_rsrc_list_entry = Zend_rsrc_list_entry;
-
-type
- PZendHashKey = ^TZendHashKey;
- zend_hash_key = record
- arKey: PChar;
- nKeyLength: uint;
- h: ulong;
- end;
- TZendHashKey = zend_hash_key;
-
- zend_hash_graceful_reverse_destroy_t = procedure(ht: PHashTable); cdecl;
-
-type
- PZendConstant = ^TZendConstant;
- zend_constant = record
- value: zval;
- flags: Integer;
- name: PChar;
- name_len: uint;
- module_number: Integer;
- end;
- TZendConstant = zend_constant;
-
-{$IFDEF PHP5}
-type
- zend_stream_reader_t = function(handle : pointer; buf : pChar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
- zend_strem_closer_t = procedure(handle : pointer; TSRMLS_DC : pointer); cdecl;
-
- _zend_stream = record
- handle : pointer;
- reader : pointer;
- closer : pointer;
- {$IFDEF PHP510}
- fteller : pointer;
- {$ENDIF}
- interactive : pointer;
- end;
- TZendStream = _zend_stream;
- PZendStream = ^TZendStream;
-{$ENDIF}
-
-type
- PZendFileHandle = ^TZendFileHandle;
- zend_file_handle =
- record
- _type: uchar;
- filename: PChar;
- opened_path: PChar;
- handle:
- record
- case Integer of
- 1:
- (
- fd: Integer;
- );
- 2:
- (
- fp: pointer;
- );
- {$IFDEF PHP5}
- 3 :
- (
- stream : TZendStream;
- );
- {$ENDIF}
- end;
- free_filename: shortint;
- end;
- TZendFileHandle = zend_file_handle;
-
- //TSRM.h
-
-
-type
- ts_rsrc_id = integer;
- pts_rsrc_id = ^ts_rsrc_id;
-
-
- //zend_stack.h
-type
- pzend_stack = ^Tzend_stack;
- zend_stack =
- record
- top: Integer;
- max: Integer;
- elements: PPointer;
- end;
- Tzend_stack = zend_stack;
-
-
-type
- Pzend_syntax_highlighter_ini = ^Tzend_syntax_highlighter_ini;
- zend_syntax_highlighter_ini =
- record
- highlight_html: PChar;
- highlight_comment: PChar;
- highlight_default: PChar;
- highlight_string: PChar;
- highlight_keyword: PChar;
- end;
- Tzend_syntax_highlighter_ini = zend_syntax_highlighter_ini;
-
-
-type
- zend_write_t = function(str: PChar; str_length: integer): integer; cdecl;
-
-
-type
-
- {$IFDEF PHP5}
- _zend_arg_info = record
- name : PChar;
- name_len : zend_uint;
- class_name : PChar;
- class_name_len : zend_uint;
- {$IFDEF PHP510}
- array_type_hint : zend_bool;
- {$ENDIF}
- allow_null : zend_bool;
- pass_by_reference : zend_bool;
- return_reference : zend_bool;
- required_num_args : integer;
- end;
-
- TZendArgInfo = _zend_arg_info;
- PZendArgInfo = ^TZendArgInfo;
- {$ENDIF}
-
- Pzend_function_entry = ^Tzend_function_entry;
- zend_function_entry = record
- fname: Pchar;
- handler: pointer;
- {$IFDEF PHP4}
- func_arg_types: Pbyte;
- {$ELSE}
- arg_info : PZendArgInfo;
- num_args : zend_uint;
- flags : zend_uint;
- {$ENDIF}
- end;
- Tzend_function_entry = zend_function_entry;
- TZendFunctionEntry = zend_function_entry;
-
- Pzend_module_entry = ^Tzend_module_entry;
- Tzend_module_entry = record
- size: word;
- zend_api: dword;
- zend_debug: byte;
- zts: byte;
- {$IFDEF PHP5}
- ini_entry : pointer;
- {$IFDEF PHP510}
- deps : pointer;
- {$ENDIF}
- {$ENDIF}
- name: pchar;
- functions: pointer;
- module_startup_func: pointer;
- module_shutdown_func: pointer;
- request_startup_func: pointer;
- request_shutdown_func: pointer;
- info_func: pointer;
- version: pchar;
- {$IFDEF PHP5}
- post_deactivate_func : pointer;
- {$ELSE}
- global_startup_func: pointer;
- global_shutdown_func: pointer;
- {$ENDIF}
- global_id: integer;
- module_started: integer;
- _type: byte;
- handle: pointer;
- module_number: longint;
- end;
-
-
-type
- pzend_list_element = ^zend_list_element;
- zend_list_element = record
- prev: pzend_list_element;
- next: pzend_list_element;
- data: char;
- end;
-
- pzend_llist = ^zend_llist;
- zend_llist = record
- head: pzend_list_element;
- tail: pzend_list_element;
- size: size_t;
- count: size_t;
- dtor: pointer;
- persistent: byte;
- traverse_ptr: pzend_list_element;
- end;
-
- pzend_overloaded_element = ^Zend_overloaded_element;
- zend_overloaded_element = record
- _type : integer;
- element : zval;
- end;
-
-
-type
- _zend_property_reference = record
- _type: integer;
- _object: pzval;
- elements_list: pzend_llist;
- end;
-
- Tzend_property_reference = _zend_property_reference;
- Pzend_property_reference = ^Tzend_property_reference;
-
-
-type
- //Zend internal function
- TInternalFunction = procedure(ht: integer; return_value: pzval; this_ptr: pzval;
- return_value_used: integer; TSRMLS_DC: pointer); cdecl;
-
- PInitFunction = ^TInitFunction;
- TInitFunction = function(_type: integer; module_number: integer; TSRMLS_DC: pointer): integer; cdecl;
-
- PShutdownFunction = ^TShutdownFunction;
- TShutdownFunction = function(_type: integer; module_number: integer; TSRMLS_DC: pointer): integer; cdecl;
-
- PZendModuleInfoFunction = ^TZendModuleInfoFunction;
- TZendModuleInfoFunction = procedure(zend_module: Pzend_module_entry; TSRMLS_DC: pointer); cdecl;
-
- //global startup and shutdown function
- TZendGlobalFunction = procedure(); cdecl;
-
- TZendModuleType = (mtPersistent, mtTemporary);
-
-type
-
- _znode = record
- op_type : Integer;
- u :
- record
- case Integer of
- 1 :
- (
- constant : zval;
- );
- 2 :
- (
- _var : zend_uint;
- );
- 3 :
- (
- opline_num : zend_uint;
- { Needs to be signed }
- );
- 4 :
- (
- op_array : ^zend_op_array;
- );
- 5 :
- (
- jmp_addr : pointer;
- );
- 6 :
- (
- EA :
- record
- _var : zend_uint;
- { dummy }
- _type : zend_uint;
- end;
- );
- end;
- end;
-
- _zend_declarables = record
- ticks : zval;
- end;
- zend_declarables = _zend_declarables;
-
- Pzend_compiler_globals = ^zend_compiler_globals;
- zend_compiler_globals = record
- bp_stack : zend_stack;
- switch_cond_stack : zend_stack;
- foreach_copy_stack : zend_stack;
- object_stack : zend_stack;
- declare_stack : zend_stack;
-
- {$IFNDEF PHP510}
- class_entry : Tzend_class_entry;
- {$ENDIF}
- active_class_entry : PZend_class_entry;
-
- {$IFNDEF PHP510}
- active_ce_parent_class_name : zval;
- {$ENDIF}
-
- //variables for list() compilation
- list_llist : zend_llist;
- dimension_llist : zend_llist;
- list_stack : zend_stack;
-
- function_call_stack : zend_stack;
-
- compiled_filename : PChar;
-
- zend_lineno : integer;
- comment_start_line : integer;
- heredoc : PChar;
- heredoc_len : integer;
-
- active_op_array : pointer;
-
- function_table : PHashTable; // function symbol table
- class_table : PHashTable; // class table
-
- filenames_table : THashTable;
-
- auto_globals : PHashTable;
-
- in_compilation : zend_bool;
- short_tags : zend_bool;
- asp_tags : zend_bool;
- allow_call_time_pass_reference : zend_bool;
-
- declarables : zend_declarables;
-
- // For extensions support
- extended_info : zend_bool; // generate extension information for debugger/profiler
- handle_op_arrays : zend_bool; // run op_arrays through op_array handlers
-
- unclean_shutdown : zend_bool;
-
- ini_parser_unbuffered_errors : zend_bool;
-
- open_files : zend_llist;
-
- {$IFDEF PHP510}
- catch_begin : longint;
- {$ENDIF}
-
- ini_parser_param : pointer;
-
- interactive : integer;
-
- {$IFDEF PHP5}
- start_lineno : zend_uint;
- {$ENDIF}
-
- increment_lineno : zend_bool;
-
- {$IFDEF PHP510}
- implementing_class : _znode;
- access_type : zend_uint;
- doc_comment : pchar;
- doc_comment_len : integer;
- {$ENDIF}
- end;
- Tzend_compiler_globals = zend_compiler_globals;
-
-
- zend_ptr_stack = record
- top, max : integer;
- elements : pointer;
- top_element : pointer;
- end;
-
- jump_buf = array[0..63] of byte;
-
-{$IFDEF PHP5}
-type _zend_objects_store = record
- object_buckets : pointer;
- top : zend_uint;
- size : zend_uint;
- free_list_head : integer;
- end;
-
-type _zend_property_info = record
- flags : zend_uint;
- name : PChar;
- name_length : integer;
- h : ulong;
- {$IFDEF PHP510}
- doc_comment : PChar;
- doc_comment_len : integer;
- {$ENDIF}
- end;
-
-{$ENDIF}
-
-type
-
- Pzend_executor_globals = ^zend_executor_globals;
- zend_executor_globals = record
- return_value_ptr_ptr : ppzval;
-
- uninitialized_zval : zval;
- uninitialized_zval_ptr : pzval;
-
- error_zval : zval;
- error_zval_ptr : pzval;
-
- function_state_ptr : pointer;
- arg_types_stack : zend_ptr_stack;
-
- // symbol table cache
- symtable_cache : array[0..31] of PHashTable;
- symtable_cache_limit : ^PHashTable;
- symtable_cache_ptr : ^PHashTable;
-
- opline_ptr : pointer;
-
- {$IFDEF PHP4}
- current_execute_data : pointer;
- {$ENDIF}
-
- active_symbol_table : PHashTable;
- symbol_table : THashTable; // main symbol table
-
- included_files : THashTable; // files already included */
-
- bailout : jump_buf;
-
- error_reporting : integer;
- orig_error_reporting : integer;
- exit_status : integer;
-
- active_op_array : pointer;
-
- function_table : PHashTable; // function symbol table */
- class_table : PHashTable; // class table
- zend_constants : PHashTable; // constants table */
-
- {$IFDEF PHP5}
- scope : pointer;
- _this : pzval;
- {$ENDIF}
-
- precision : longint;
-
- ticks_count : integer;
-
- in_execution : zend_bool;
- {$IFDEF PHP5}
- in_autoload : PHashTable;
- {$IFDEF PHP510}
- autoload_func : pointer;
- {$ENDIF}
- {$ENDIF}
-
- bailout_set : zend_bool;
- full_tables_cleanup : zend_bool;
- {$IFDEF PHP5}
- ze1_compatibility_mode : zend_bool;
- {$ENDIF}
-
- // for extended information support */
- no_extensions : zend_bool;
-
- timed_out : zend_bool;
-
- regular_list : THashTable;
- persistent_list : ThashTable;
-
- argument_stack : zend_ptr_stack;
-
- {$IFNDEF PHP510}
- free_op1, free_op2 : pzval;
- unary_op : pointer;
- binary_op : pointer;
-
- garbage : array[0..1] of pzval;
- garbage_ptr : integer;
- {$ENDIF}
-
- {$IFDEF PHP5}
- user_error_handler_error_reporting : integer;
- {$ENDIF}
- user_error_handler : pzval;
- {$IFDEF PHP5}
- user_exception_handler : pzval;
- user_error_handlers_error_reporting : zend_stack;
- {$ENDIF}
-
- user_error_handlers : zend_ptr_stack;
- {$IFDEF PHP5}
- user_exception_handlers : zend_ptr_stack;
- {$ENDIF}
-
- //* timeout support */
- timeout_seconds : integer;
- lambda_count : integer;
- ini_directives : PHashTable;
- {$IFDEF PHP5}
-
- objects_store : _zend_objects_store;
- exception : pzval;
- opline_before_exception : pointer;
- current_execute_data : pointer;
- {$IFDEF PHP5}
- current_module : pointer;
- {$ENDIF}
-
- std_property_info : _zend_property_info;
- {$ENDIF}
- //* locale stuff */
-
- {$IFNDEF PHP510}
- float_separator : char;
- {$ENDIF}
-
- reserved: array[0..3] of pointer;
- end;
-
-
-{$IFDEF PHP5}
- type
- TZendObjectReadProperty = function (_object : pzval; member : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
- TZendObjectReadDimension = function (_object : pzval; offset : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
- TZendObjectWriteProperty = procedure(_object : pzval; member : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
- TZendObjectWriteDimension = procedure(_object : pzval; offset : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
-
-{$ENDIF}
-
-implementation
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ ZEND - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: ZendTypes.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit ZENDTypes;
+
+interface
+
+uses
+ {$IFNDEF FPC} Windows {$ELSE} LCLType{$ENDIF}, SysUtils;
+
+const
+ //zend.h
+ ZEND_MAX_RESERVED_RESOURCES = 4;
+
+{$IFDEF PHP530}
+{$IFDEF ZTS}
+const ZEND_BUILD_TS = ',TS';
+{$ELSE}
+const ZEND_BUILD_TS = ',NTS';
+{$ENDIF}
+
+{$IFDEF ZEND_DEBUG}
+const ZEND_BUILD_DEBUG = ',debug';
+{$ELSE}
+const ZEND_BUILD_DEBUG = '';
+{$ENDIF}
+
+const ZEND_BUILD_SYSTEM =
+{$IFDEF PHP_COMPILER_ID}
+{$if defined(COMPILER_VC14)}',VC14'
+{$elseif COMPILER_VC13} ',VC13'
+{$elseif COMPILER_VC12} ',VC12'
+{$elseif COMPILER_VC11} ',VC11'
+{$elseif COMPILER_VC10} ',VC10'
+{$elseif COMPILER_VC9} ',VC9'
+{$elseif COMPILER_VC6} ',VC6'
+{$else}', $DEFINE COMPILER_VCx directive error. See PHP.INC for more details'
+{$ifend}
+{$else}
+', $DEFINE COMPILER_VCx directive error. See PHP.INC for more details'
+{$endif};
+{$ENDIF}
+
+
+ //zend_vm_opcodes.h
+const
+ ZEND_NOP = 0;
+ ZEND_ADD = 1;
+ ZEND_SUB = 2;
+ ZEND_MUL = 3;
+ ZEND_DIV = 4;
+ ZEND_MOD = 5;
+ ZEND_SL = 6;
+ ZEND_SR = 7;
+ ZEND_CONCAT = 8;
+ ZEND_BW_OR = 9;
+ ZEND_BW_AND = 10;
+ ZEND_BW_XOR = 11;
+ ZEND_BW_NOT = 12;
+ ZEND_BOOL_NOT = 13;
+ ZEND_BOOL_XOR = 14;
+ ZEND_IS_IDENTICAL = 15;
+ ZEND_IS_NOT_IDENTICAL = 16;
+ ZEND_IS_EQUAL = 17;
+ ZEND_IS_NOT_EQUAL = 18;
+ ZEND_IS_SMALLER = 19;
+ ZEND_IS_SMALLER_OR_EQUAL = 20;
+ ZEND_CAST = 21;
+ ZEND_QM_ASSIGN = 22;
+ ZEND_ASSIGN_ADD = 23;
+ ZEND_ASSIGN_SUB = 24;
+ ZEND_ASSIGN_MUL = 25;
+ ZEND_ASSIGN_DIV = 26;
+ ZEND_ASSIGN_MOD = 27;
+ ZEND_ASSIGN_SL = 28;
+ ZEND_ASSIGN_SR = 29;
+ ZEND_ASSIGN_CONCAT = 30;
+ ZEND_ASSIGN_BW_OR = 31;
+ ZEND_ASSIGN_BW_AND = 32;
+ ZEND_ASSIGN_BW_XOR = 33;
+ ZEND_PRE_INC = 34;
+ ZEND_PRE_DEC = 35;
+ ZEND_POST_INC = 36;
+ ZEND_POST_DEC = 37;
+ ZEND_ASSIGN = 38;
+ ZEND_ASSIGN_REF = 39;
+ ZEND_ECHO = 40;
+ ZEND_PRINT = 41;
+ ZEND_JMP = 42;
+ ZEND_JMPZ = 43;
+ ZEND_JMPNZ = 44;
+ ZEND_JMPZNZ = 45;
+ ZEND_JMPZ_EX = 46;
+ ZEND_JMPNZ_EX = 47;
+ ZEND_CASE = 48;
+ ZEND_SWITCH_FREE = 49;
+ ZEND_BRK = 50;
+ ZEND_CONT = 51;
+ ZEND_BOOLEAN = 52; //original ZEND_BOOL
+ ZEND_INIT_STRING = 53;
+ ZEND_ADD_CHAR = 54;
+ ZEND_ADD_STRING = 55;
+ ZEND_ADD_VAR = 56;
+ ZEND_BEGIN_SILENCE = 57;
+ ZEND_END_SILENCE = 58;
+ ZEND_INIT_FCALL_BY_NAME = 59;
+ ZEND_DO_FCALL = 60;
+ ZEND_DO_FCALL_BY_NAME = 61;
+ ZEND_RETURN = 62;
+ ZEND_RECV = 63;
+ ZEND_RECV_INIT = 64;
+ ZEND_SEND_VAL = 65;
+ ZEND_SEND_VAR = 66;
+ ZEND_SEND_REF = 67;
+ ZEND_NEW = 68;
+ ZEND_JMP_NO_CTOR = 69;
+ ZEND_FREE = 70;
+ ZEND_INIT_ARRAY = 71;
+ ZEND_ADD_ARRAY_ELEMENT = 72;
+ ZEND_INCLUDE_OR_EVAL = 73;
+ ZEND_UNSET_VAR = 74;
+ ZEND_UNSET_DIM_OBJ = 75;
+ ZEND_ISSET_ISEMPTY = 76;
+ ZEND_FE_RESET = 77;
+ ZEND_FE_FETCH = 78;
+ ZEND_EXIT = 79;
+ ZEND_FETCH_R = 80;
+ ZEND_FETCH_DIM_R = 81;
+ ZEND_FETCH_OBJ_R = 82;
+ ZEND_FETCH_W = 83;
+ ZEND_FETCH_DIM_W = 84;
+ ZEND_FETCH_OBJ_W = 85;
+ ZEND_FETCH_RW = 86;
+ ZEND_FETCH_DIM_RW = 87;
+ ZEND_FETCH_OBJ_RW = 88;
+ ZEND_FETCH_IS = 89;
+ ZEND_FETCH_DIM_IS = 90;
+ ZEND_FETCH_OBJ_IS = 91;
+ ZEND_FETCH_FUNC_ARG = 92;
+ ZEND_FETCH_DIM_FUNC_ARG = 93;
+ ZEND_FETCH_OBJ_FUNC_ARG = 94;
+ ZEND_FETCH_UNSET = 95;
+ ZEND_FETCH_DIM_UNSET = 96;
+ ZEND_FETCH_OBJ_UNSET = 97;
+ ZEND_FETCH_DIM_TMP_VAR = 98;
+ ZEND_FETCH_CONSTANT = 99;
+ ZEND_DECLARE_FUNCTION_OR_CLASS = 100;
+ ZEND_EXT_STMT = 101;
+ ZEND_EXT_FCALL_BEGIN = 102;
+ ZEND_EXT_FCALL_END = 103;
+ ZEND_EXT_NOP = 104;
+ ZEND_TICKS = 105;
+ ZEND_SEND_VAR_NO_REF = 106;
+{$IFDEF PHP511}
+ ZEND_CATCH = 107;
+ ZEND_THROW = 108;
+ ZEND_FETCH_CLASS = 109;
+ ZEND_CLONE = 110;
+ ZEND_INIT_METHOD_CALL = 112;
+ ZEND_INIT_STATIC_METHOD_CALL = 113;
+ ZEND_ISSET_ISEMPTY_VAR = 114;
+ ZEND_ISSET_ISEMPTY_DIM_OBJ = 115;
+ ZEND_PRE_INC_OBJ = 132;
+ ZEND_PRE_DEC_OBJ = 133;
+ ZEND_POST_INC_OBJ = 134;
+ ZEND_POST_DEC_OBJ = 135;
+ ZEND_ASSIGN_OBJ = 136;
+ ZEND_INSTANCEOF = 138;
+ ZEND_DECLARE_CLASS = 139;
+ ZEND_DECLARE_INHERITED_CLASS = 140;
+ ZEND_DECLARE_FUNCTION = 141;
+ ZEND_RAISE_ABSTRACT_ERROR = 142;
+ ZEND_ADD_INTERFACE = 144;
+ ZEND_VERIFY_ABSTRACT_CLASS = 146;
+ ZEND_ASSIGN_DIM = 147;
+ ZEND_ISSET_ISEMPTY_PROP_OBJ = 148;
+ ZEND_HANDLE_EXCEPTION = 149;
+ ZEND_USER_OPCODE = 150;
+{$ENDIF}
+
+ { end of block }
+
+ { global/local fetches }
+
+const
+ ZEND_FETCH_GLOBAL = 0;
+ ZEND_FETCH_LOCAL = 1;
+ ZEND_FETCH_STATIC = 2;
+{$IFDEF PHP511}
+ ZEND_FETCH_STATIC_MEMBER = 3;
+ ZEND_FETCH_GLOBAL_LOCK = 4;
+
+ ZEND_FETCH_CLASS_DEFAULT = 0;
+ ZEND_FETCH_CLASS_SELF = 1;
+ ZEND_FETCH_CLASS_PARENT = 2;
+ ZEND_FETCH_CLASS_MAIN = 3;
+ ZEND_FETCH_CLASS_GLOBAL = 4;
+ ZEND_FETCH_CLASS_AUTO = 5;
+ ZEND_FETCH_CLASS_INTERFACE = 6;
+ ZEND_FETCH_CLASS_NO_AUTOLOAD = $80;
+{$ENDIF}
+
+ { var status for backpatching }
+
+const
+ BP_VAR_R = 0;
+ BP_VAR_W = 1;
+ BP_VAR_RW = 2;
+ BP_VAR_IS = 3;
+ BP_VAR_NA = 4 { if not applicable }
+ ;
+ BP_VAR_FUNC_ARG = 5;
+ BP_VAR_UNSET = 6;
+ ZEND_INTERNAL_FUNCTION = 1;
+ ZEND_USER_FUNCTION = 2;
+ ZEND_OVERLOADED_FUNCTION = 3;
+ ZEND_EVAL_CODE = 4;
+ ZEND_INTERNAL_CLASS = 1;
+ ZEND_USER_CLASS = 2;
+ ZEND_EVAL = (1 shl 0);
+ ZEND_INCLUDE = (1 shl 1);
+ ZEND_INCLUDE_ONCE = (1 shl 2);
+ ZEND_REQUIRE = (1 shl 3);
+ ZEND_REQUIRE_ONCE = (1 shl 4);
+ ZEND_ISSET = (1 shl 0);
+ ZEND_ISEMPTY = (1 shl 1);
+ ZEND_CT = (1 shl 0);
+ ZEND_RT = (1 shl 1);
+
+{$IFDEF PHP530}
+type
+zend_stream_type = (
+ ZEND_HANDLE_FILENAME,
+ ZEND_HANDLE_FD,
+ ZEND_HANDLE_FP,
+ ZEND_HANDLE_STREAM,
+ ZEND_HANDLE_MAPPED);
+{$ELSE}
+const
+ ZEND_HANDLE_FILENAME = 0;
+ ZEND_HANDLE_FD = 1;
+ ZEND_HANDLE_FP = 2;
+ ZEND_HANDLE_STDIOSTREAM = 3;
+ ZEND_HANDLE_FSTREAM = 4;
+
+ {$IFDEF PHP5}
+ ZEND_HANDLE_STREAM = 5;
+ {$ENDIF}
+{$ENDIF}
+
+const
+ ZEND_FETCH_STANDARD = 0;
+ ZEND_FETCH_ADD_LOCK = 1;
+ ZEND_MEMBER_FUNC_CALL = 1 shl 0;
+ ZEND_CTOR_CALL = 1 shl 1;
+ ZEND_ARG_SEND_BY_REF = (1 shl 0);
+ ZEND_ARG_COMPILE_TIME_BOUND = (1 shl 1);
+ ZEND_RETURN_VAL = 0;
+ ZEND_RETURN_REF = 1;
+
+ //zend_errors.h
+const
+ E_ERROR = (1 shl 0);
+ E_WARNING = (1 shl 1);
+ E_PARSE = (1 shl 2);
+ E_NOTICE = (1 shl 3);
+ E_CORE_ERROR = (1 shl 4);
+ E_CORE_WARNING = (1 shl 5);
+ E_COMPILE_ERROR = (1 shl 6);
+ E_COMPILE_WARNING = (1 shl 7);
+ E_USER_ERROR = (1 shl 8);
+ E_USER_WARNING = (1 shl 9);
+ E_USER_NOTICE = (1 shl 10);
+ E_STRICT = (1 shl 11);
+ E_RECOVERABLE_ERROR = (1 shl 12);
+ E_ALL = (E_ERROR or E_WARNING or E_PARSE or E_NOTICE or E_CORE_ERROR or E_CORE_WARNING or E_COMPILE_ERROR or E_COMPILE_WARNING or E_USER_ERROR or E_USER_WARNING or E_USER_NOTICE or E_RECOVERABLE_ERROR);
+ E_CORE = (E_CORE_ERROR or E_CORE_WARNING);
+
+ //zend.h
+ //data types
+{$IFDEF PHP510}
+const
+ IS_NULL = 0;
+ IS_LONG = 1;
+ IS_DOUBLE = 2;
+ IS_BOOL = 3;
+ IS_ARRAY = 4;
+ IS_OBJECT = 5;
+ IS_STRING= 6;
+ IS_RESOURCE = 7;
+ IS_CONSTANT = 8;
+ IS_CONSTANT_ARRAY = 9;
+{$ELSE}
+const
+ IS_NULL = 0;
+ IS_LONG = 1;
+ IS_DOUBLE = 2;
+ IS_STRING = 3;
+ IS_ARRAY = 4;
+ IS_OBJECT = 5;
+ IS_BOOL = 6;
+ IS_RESOURCE = 7;
+ IS_CONSTANT = 8;
+ IS_CONSTANT_ARRAY = 9;
+{$ENDIF}
+
+ ZEND_PATHS_SEPARATOR = ';';
+ SUCCESS = 0;
+ FAILURE = -1; { this MUST stay a negative number, or it may affect functions! }
+
+ //zend_modules.h
+const
+ ZEND_MODULE_API_NO_700 = 20151012;
+ ZEND_MODULE_API_NO_560 = 20131226;
+ ZEND_MODULE_API_NO_550 = 20121212;
+ ZEND_MODULE_API_NO_540 = 20100525;
+ ZEND_MODULE_API_NO_530 = 20090626;
+ ZEND_MODULE_API_NO_520 = 20060613;
+ ZEND_MODULE_API_NO_511 = 20050922;
+ ZEND_MODULE_API_NO_510 = 20050617;
+ ZEND_MODULE_API_NO_504 = 20041030;
+ ZEND_MODULE_API_NO_500 = 20040412;
+
+ ZEND_MODULE_API_NO =
+ {$ifdef PHP700}20151012
+ {$elseif defined(PHP560)}20131226
+ {$elseif defined(PHP550)}20121212
+ {$elseif defined(PHP540)}20100525
+ {$elseif defined(PHP530)}20090626
+ {$elseif defined(PHP520)}20060613
+ {$elseif defined(PHP512)}20050922
+ {$elseif defined(PHP511)}20050922
+ {$elseif defined(PHP510)}20050617
+ {$elseif defined(PHP504)}20041030
+ {$else}20040412
+ {$ifend};
+
+const
+ USING_ZTS =
+ {$ifdef ZTS}1
+ {$else}0
+ {$endif};
+
+
+const
+ NO_VERSION_YET = nil;
+ MODULE_PERSISTENT = 1;
+ MODULE_TEMPORARY = 2;
+
+ //zend_alloc.h
+const
+ MEM_BLOCK_START_MAGIC = $7312F8DC;
+ MEM_BLOCK_END_MAGIC = $2A8FCC84;
+ MEM_BLOCK_FREED_MAGIC = $99954317;
+ MEM_BLOCK_CACHED_MAGIC = $FB8277DC;
+
+
+const
+ MAX_CACHED_MEMORY = 11;
+ MAX_CACHED_ENTRIES = 256;
+ PRE_INIT_CACHE_ENTRIES = 32;
+
+ //zend_hash.h
+const
+ HASH_KEY_IS_STRING = 1;
+ HASH_KEY_IS_LONG = 2;
+ HASH_KEY_NON_EXISTANT = 3;
+ HASH_UPDATE = (1 shl 0);
+ HASH_ADD = (1 shl 1);
+ HASH_NEXT_INSERT = (1 shl 2);
+ HASH_DEL_KEY = 0;
+ HASH_DEL_INDEX = 1;
+
+const
+ ZEND_RESOURCE_LIST_TYPE_STD = 1;
+ ZEND_RESOURCE_LIST_TYPE_EX = 2;
+
+const
+ ZEND_HASH_APPLY_KEEP = 0;
+ ZEND_HASH_APPLY_REMOVE = 1 shl 0;
+ ZEND_HASH_APPLY_STOP = 1 shl 1;
+
+ //zend_constants.h
+const
+ CONST_CS = (1 shl 0) { Case Sensitive }
+ ;
+ CONST_PERSISTENT = (1 shl 1) { Persistent }
+ ;
+
+ // Debug support
+const
+ TSRM_ERROR_LEVEL_ERROR = 1;
+ TSRM_ERROR_LEVEL_CORE = 2;
+ TSRM_ERROR_LEVEL_INFO = 3;
+
+const
+ ZVAL_CACHE_LIST = 0;
+
+
+const
+ STACK_BLOCK_SIZE = 64;
+
+
+const
+ ZEND_STACK_APPLY_TOPDOWN = 1;
+ ZEND_STACK_APPLY_BOTTOMUP = 2;
+
+
+ //zend_highlight.h
+const
+ HL_COMMENT_COLOR = '#FF8000' { orange }
+ ;
+ HL_DEFAULT_COLOR = '#0000BB' { blue }
+ ;
+ HL_HTML_COLOR = '#000000' { black }
+ ;
+ HL_STRING_COLOR = '#DD0000' { red }
+ ;
+ HL_BG_COLOR = '#FFFFFF' { white }
+ ;
+ HL_KEYWORD_COLOR = '#007700' { green }
+ ;
+
+const
+ ZEND_INI_USER = (1 shl 0);
+ ZEND_INI_PERDIR = (1 shl 1);
+ ZEND_INI_SYSTEM = (1 shl 2);
+ ZEND_INI_ALL = (ZEND_INI_USER or ZEND_INI_PERDIR or ZEND_INI_SYSTEM);
+
+ ZEND_INI_DISPLAY_ORIG = 1;
+ ZEND_INI_DISPLAY_ACTIVE = 2;
+ ZEND_INI_STAGE_STARTUP = (1 shl 0);
+ ZEND_INI_STAGE_SHUTDOWN = (1 shl 1);
+ ZEND_INI_STAGE_ACTIVATE = (1 shl 2);
+ ZEND_INI_STAGE_DEACTIVATE = (1 shl 3);
+ ZEND_INI_STAGE_RUNTIME = (1 shl 4);
+
+{ Common Types }
+type
+ CharPtr =
+ {$IFDEF VERSION12}
+ WideChar
+ {$ELSE}
+ AnsiChar
+ {$ENDIF};
+ {$IFDEF CPUX64}
+ IntPtr = Int64;
+ UIntPtr = UInt64;
+ ULongPtr = ULong64;
+ {$ELSE}
+ IntPtr = Longint;
+ UIntPtr = LongWord;
+ ULongPtr = ULong;
+ {$ENDIF}
+ {$if defined(WSTR) and (CompilerVersion < 22) }
+ UTF8Char = AnsiChar;
+ PUTF8Char = PAnsiChar;
+ {$ifend}
+ zend_uint = UIntPtr;
+ zend_bool = boolean;
+ zend_uchar = {$IFDEF PHP_UNICODE}UTF8Char{$ELSE}AnsiChar{$ENDIF};
+ zend_ustr = {$IFDEF PHP_UNICODE}UTF8String{$ELSE}AnsiString{$ENDIF};
+ zend_ulong = ULongPtr;
+ zend_long = IntPtr;
+ zend_pchar = {$IFDEF PHP_UNICODE}PUTF8Char{$ELSE}PAnsiChar{$ENDIF};
+ zend_pstr = {$IFDEF PHP_UNICODE}PUtf8String{$ELSE}PAnsiString{$ENDIF};
+ {$IFDEF PHP7}
+ _zend_refcounted_h = record
+ refcount : cardinal;
+ u : record
+ case longint of
+ 0 : ( v : record
+ _type : zend_uchar;
+ flags : zend_uchar;
+ gc_info : word;
+ end );
+ 1 : ( type_info : cardinal );
+ end;
+ end;
+ zend_refcounted_h = _zend_refcounted_h;
+ _zend_refcounted = record
+ gc : zend_refcounted_h;
+ end;
+ zend_refcounted = _zend_refcounted;
+ _zend_string = record
+ gc : zend_refcounted_h;
+ h : zend_ulong;
+ len : size_t;
+ val : zend_pchar;
+ end;
+
+ P_zend_refcounted = ^_zend_refcounted;
+ zend_string = _zend_string;
+ P_zend_string = ^_zend_string;
+ pzend_string = ^_zend_string;
+ {$ELSE}
+ pzend_string = zend_pchar;
+ {$ENDIF}
+ zend_ushort = word;
+ unsigned_char = byte;
+{ Common Types }
+type
+ uint = longword;
+ PINT = ^Integer;
+ size_t = cardinal;
+ {$IFNDEF PHP7}
+ ppointer = ^pointer;
+ pppointer = ^ppointer;
+ {$ENDIF}
+ PStat = ^TStat;
+ TStat = record
+ st_dev: Word;
+ st_ino: Word;
+ st_mode: Word;
+ st_nlink: SmallInt;
+ st_uid: SmallInt;
+ st_gid: SmallInt;
+ st_rdev: Word;
+ st_size: Longint;
+ st_atime: Longint;
+ st_mtime: Longint;
+ st_ctime: Longint;
+ end;
+ Stat = TStat;
+
+ Pzend_mem_header = ^Tzend_mem_header;
+ _zend_mem_header = record
+ pNext: Pzend_mem_header;
+ pLast: Pzend_mem_header;
+ size_cached: integer;
+ end;
+ Tzend_mem_header = _zend_mem_header;
+
+
+type
+
+ hash_func_t = function(arKey: zend_pchar; nKeyLength: uint): ulong;
+
+ compare_func_t = function(_noname1: Pointer; _noname2: Pointer;
+ TSRMLS_DC: Pointer): integer;
+
+ dtor_func_t = procedure(pDest: Pointer);
+
+ copy_ctor_func_t = procedure(pElement: Pointer);
+
+ PBucket = ^TBucket;
+ TBucket = record
+ h: ulong;
+ nKeyLength: uint;
+ pData: Pointer;
+ pDataPtr: Pointer;
+ pListNext: PBucket;
+ pListLast: PBucket;
+ pNext: PBucket;
+ pLast: PBucket;
+ arKey: array[0..0] of zend_uchar;
+ end;
+ {$IFNDEF PHP7}
+ PHashTable = ^THashTable;
+ THashTable =
+ record
+ nTableSize: uint;
+ nTableMask: uint;
+ nNumOfElements: uint;
+ nNextFreeElement: ulong;
+ pInternalPointer: PBucket;
+ pListHead: PBucket;
+ pListTail: PBucket;
+ arBuckets: ^PBucket;
+ pDestructor: pointer;
+ persistent: boolean;
+ nApplyCount: Byte;
+ bApplyProtection: boolean;
+ end;
+ {$ENDIF}
+ HashPosition = {$IFDEF PHP7} cardinal {$ELSE} PBucket {$ENDIF};
+
+ {$IFNDEF PHP7}
+ {$IFDEF PHP5}
+
+ zend_op_array =
+ record
+ _type : zend_uchar;
+ function_name : zend_pchar;
+ scope : pointer;
+ fn_flags : zend_uint;
+ prototype : pointer;
+ num_args : zend_uint;
+ required_num_args : zend_uint;
+ arg_info : pointer;
+ pass_rest_by_reference : zend_bool;
+ return_reference : Byte;
+
+ {$IFDEF PHP530}
+ done_pass_two : zend_bool;
+ {$ENDIF}
+
+ refcount : pointer;
+ opcodes : pointer;
+ last :zend_uint ;
+ size : zend_uint;
+ T : zend_uint;
+ brk_cont_array : pointer;
+ last_brk_cont : zend_uint;
+ current_brk_cont : zend_uint;
+ try_catch_array : pointer;
+ last_try_catch : Integer;
+ static_variables : PHashTable;
+ start_op : pointer;
+ backpatch_count : Integer;
+
+ {$IFDEF PHP530}
+ this_var : zend_uint;
+ {$ELSE}
+ done_pass_two : zend_bool;
+ uses_this : zend_bool;
+ {$ENDIF}
+
+ filename : zend_pchar;
+ line_start : zend_uint;
+ line_end : zend_uint;
+ doc_comment : zend_pchar;
+ doc_comment_len : zend_uint;
+ {$IFDEF PHP530}
+ early_binding : zend_uint;
+ {$ENDIF}
+ reserved : array[0..ZEND_MAX_RESERVED_RESOURCES - 1] of Pointer;
+ end;
+
+ _zend_internal_function =
+ record
+ _type : byte;
+ function_name : zend_pchar;
+ scope : pointer;
+ fn_flags : zend_uint;
+ prototype : pointer;
+ num_args : zend_uint;
+ required_num_args : zend_uint;
+ arg_info : pointer;
+ pass_rest_by_reference : zend_bool;
+ return_reference : Byte;
+ handler : pointer;
+ end;
+ TZendInternalFunction = _zend_internal_function;
+ PZendInternalFunction = ^TZendInternalFunction;
+
+ zend_function =
+ record
+ case Integer of
+ 1 :
+ (
+ _type : zend_uchar;
+ );
+ 2 :
+ (
+ common :
+ record
+ _type : zend_uchar;
+ function_name : zend_pchar;
+ scope : pointer;
+ fn_flags : zend_uint;
+ prototype : pointer;
+ num_args : zend_uint;
+ required_num_args : zend_uint;
+ arg_info : pointer;
+ pass_rest_by_reference : zend_bool;
+ return_reference : Byte;
+ end;
+ );
+ 3 :
+ (
+ op_array : zend_op_array;
+ );
+ 4 :
+ (
+ internal_function : _zend_internal_function;
+ );
+ end;
+ TZendFunction = zend_function;
+ PZendFunction = ^TZendFunction;
+
+ PZendObjectIteratorFuncs = ^zend_object_iterator_funcs;
+ zend_object_iterator_funcs = record
+ dtor : pointer;
+ valid : pointer;
+ get_currect_data : pointer;
+ get_current_key : pointer;
+ move_forward : pointer;
+ rewind : pointer;
+ end;
+ zend_object_iterator = record
+ data : pointer;
+ funcs : PZendObjectIteratorFuncs;
+ index : ulong;
+ end;
+ {$ENDIF}
+ zend_class_iterator_funcs = record
+ funcs : pointer;
+ new_iterator : pointer;
+ zf_new_iterator : pointer;
+ zf_valid : pointer;
+ zf_current : pointer;
+ zf_key : pointer;
+ zf_next : pointer;
+ zf_rewind : pointer;
+ end;
+ {$ELSE}
+
+ type zend_op_array = record
+ _type : zend_uchar;
+ arg_types : PByte;
+ function_name : zend_pchar;
+ refcount : pointer;
+ opcodes : pointer;
+ last : zend_uint;
+ size : zend_uint;
+ T : zend_uint;
+ brk_cont_array : pointer;
+ last_brk_cont : zend_uint;
+ current_brk_cont : zend_uint;
+ uses_globals : zend_bool;
+ static_variables : PHashTable;
+ start_op : pointer;
+ backpatch_count : integer;
+
+ return_reference : boolean;
+ done_pass_two : boolean;
+
+ filename : zend_pchar;
+ reserved : array[0..ZEND_MAX_RESERVED_RESOURCES - 1] of Pointer;
+ end;
+
+
+type
+ _zend_internal_function = record
+ _type : byte;
+ arg_types : PByte;
+ function_name : zend_pchar;
+ handler : pointer;
+ end;
+ PZendInternalFunction = ^_zend_internal_function;
+
+ _zend_overloaded_function = record
+ _type : byte;
+ arg_types : PByte;
+ function_name : zend_pchar;
+ _var : zend_uint;
+ end;
+
+ zend_function = record
+ case Integer of
+ 1 : ( _type : zend_uchar; );
+ 2 : (
+ common :
+ record
+ _type : zend_uchar;
+ arg_types : PByte;
+ function_name : zend_pchar;
+ end;
+ );
+ 3 :
+ (
+ op_array : zend_op_array;
+ );
+ 4 :
+ (
+ internal_function : _zend_internal_function;
+ );
+ 5 :
+ (
+ overloaded_function : _zend_overloaded_function;
+ );
+ end;
+
+ {$ENDIF}
+ {$IFNDEF PHP7}
+ Pzend_class_entry = ^Tzend_class_entry;
+ PPZend_class_entry = ^PZend_class_entry;
+ {$ENDIF}
+
+ {$IFNDEF PHP7}
+ Tzend_class_entry = record
+ _type : zend_uchar;
+ name : zend_pchar;
+ name_length : zend_uint;
+ parent : PZend_class_entry;
+ refcount : integer;
+ constants_updated : zend_bool;
+ ce_flags : zend_uint;
+
+ function_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ default_properties : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ properties_info : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ default_static_members : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+
+ static_members : PHashTable;
+ constants_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ builtin_functions : pointer;
+
+ _constructor : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ _destructor : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ clone : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __get : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __set : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$IFDEF PHP510}
+ __unset : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __isset : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ __call: {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$IFDEF PHP530}
+ __callstatic : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ {$IFDEF PHP520}
+ __tostring : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ {$IFDEF PHP510}
+ serialize_func : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ unserialize_func : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ iterator_funcs : zend_class_iterator_funcs;
+
+ create_object : pointer;
+ get_iterator : pointer;
+ interface_gets_implemented : pointer;
+
+ {$IFDEF PHP530}
+ get_static_method : pointer;
+ {$ENDIF}
+
+ {$IFDEF PHP511}
+ serialize : pointer;
+ unserialize : pointer;
+ {$ENDIF}
+
+ interfaces : pointer;
+ num_interfaces : zend_uint;
+
+ filename : zend_pchar;
+ line_start : zend_uint;
+ line_end : zend_uint;
+ doc_comment : zend_pchar;
+ doc_comment_len : zend_uint;
+
+ {$IFDEF PHP511}
+ module : pointer;
+ {$ENDIF}
+ end;
+ {$ENDIF}
+
+ {$IFNDEF PHP7}
+ //P_zend_object_handlers = ^_zend_object_handlers;
+ Pzend_Object = ^Tzend_object;
+ PPzend_Object = ^PZend_Object;
+ _zend_object = record
+ {$IFDEF PHP7}
+ gc : zend_refcounted_h;
+ handle : cardinal;
+ handlers : P_zend_object_handlers;
+ {$ENDIF}
+ ce: Pzend_class_entry;
+ properties: PHashTable;
+ {$IFDEF PHP7}
+ properties_table : array[0..0] of zval;
+ {$ENDIF}
+ {$IFDEF PHP5}
+ in_get_set : cardinal;
+ {$ENDIF}
+ end;
+ Tzend_Object = _zend_object;
+ {$IFDEF PHP5}
+ {$ENDIF}
+
+
+ type
+
+ Tzend_object_get_properties = function (_object : pointer; TSRMLS_DC : pointer) :{$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; cdecl;
+ Pzend_object_get_propeeries = ^Tzend_object_get_properties;
+
+ Tzend_object_get_classname = function(_object : pointer; class_name : pointer; class_name_len : pointer; p : integer; TSRMLS_DC : pointer) : integer; cdecl;
+
+ {$IFNDEF PHP7}
+ _zend_object_handlers = record
+ // general object functions
+ add_ref : pointer;
+ del_ref : pointer;
+ clone_obj : pointer;
+ // individual object functions
+ read_property : pointer;
+ write_property : pointer;
+ read_dimension : pointer;
+ write_dimension : pointer;
+ get_property_ptr_ptr : pointer;
+ _get : pointer;
+ _set : pointer;
+ has_property : pointer;
+ unset_property : pointer;
+ has_dimension : pointer;
+ unset_dimension : pointer;
+ get_properties : Tzend_object_get_properties;
+ get_method : pointer;
+ call_method : pointer;
+ get_constructor : pointer;
+ get_class_entry : pointer;
+ get_class_name : Tzend_object_get_classname;
+ compare_objects : pointer;
+ cast_object : pointer;
+ count_elements : pointer;
+ {$IFDEF PHP530}
+ get_debug_info : pointer;
+ get_closure : pointer;
+ {$ENDIF}
+ end;
+ {$ENDIF}
+ zend_object_handle = cardinal;
+ {$IFNDEF PHP7}
+ zend_object_handlers = _zend_object_handlers;
+ pzend_object_handlers = ^_zend_object_handlers;
+
+
+ _zend_object_value = record
+ handle : zend_object_handle;
+ handlers : pzend_object_handlers;
+ end;
+ TZendObjectValue = _zend_object_value;
+ PZendObjectValue = ^TZendObjectValue;
+ {$ENDIF}
+ {$ENDIF}
+
+{$IFNDEF PHP7}
+Pzvalue_value = ^zvalue_value;
+ zvalue_value = record
+ case longint of
+ 0: (lval: zend_long);
+ 1: (dval: double);
+ 2: (str: record
+ val: zend_pchar;
+ len: integer;
+ end);
+ 3: (ht: PHashTable);
+ 4 : (obj : _zend_object_value);
+ end;
+ pppzval = ^ppzval;
+ ppzval = ^pzval;
+
+ pzval = ^zval;
+ zval = record
+ value : zvalue_value;
+ refcount : zend_uint;
+ _type : byte;
+ is_ref : byte;
+ end;
+
+{$ENDIF}
+
+ ppzval_array = ^pzval_array;
+
+ pzval_array = array of ppzval;
+ pzval_array_ex = array of pzval;
+
+type
+ PZend_rsrc_list_entry = ^zend_rsrc_list_entry;
+ zend_rsrc_list_entry = record
+ ptr : pointer;
+ _type : integer;
+ refcount : integer;
+ end;
+ TZend_rsrc_list_entry = Zend_rsrc_list_entry;
+
+type
+ PZendHashKey = ^TZendHashKey;
+ zend_hash_key = record
+ arKey: zend_pchar;
+ nKeyLength: uint;
+ h: ulong;
+ end;
+ TZendHashKey = zend_hash_key;
+
+ zend_hash_graceful_reverse_destroy_t = procedure(ht: PHashTable); cdecl;
+
+type
+ PZendConstant = ^TZendConstant;
+ zend_constant = record
+ value: zval;
+ flags: Integer;
+ name: zend_pchar;
+ name_len: uint;
+ module_number: Integer;
+ end;
+ TZendConstant = zend_constant;
+
+{$IFDEF PHP5}
+type
+ zend_stream_reader_t = function(handle : pointer; buf : zend_pchar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
+ zend_stream_closer_t = procedure(handle : pointer; TSRMLS_DC : pointer); cdecl;
+ zend_stream_fteller_t = function(handle : pointer; TSRMLS_DC : pointer) : longint; cdecl;
+
+{$IFDEF PHP530}
+ zend_stream_fsizer_t = function (handle : pointer; TSRMLS_DC : pointer) : size_t; cdecl;
+{$ENDIF}
+
+{$IFDEF PHP530}
+zend_mmap = record
+ len : size_t;
+ pos : size_t;
+ map : pointer;
+ buf : zend_pchar;
+ old_handle : pointer;
+ old_closer : zend_stream_closer_t;
+end;
+{$ENDIF}
+
+{$IFDEF PHP530}
+ _zend_stream = record
+ handle : pointer;
+ isatty : integer;
+ mmap : zend_mmap;
+ reader : zend_stream_reader_t;
+ fsizer : zend_stream_fsizer_t;
+ closer : zend_stream_closer_t;
+ end;
+{$ELSE}
+ _zend_stream = record
+ handle : pointer;
+ reader : zend_stream_reader_t;
+ closer : zend_stream_closer_t;
+ {$IFDEF PHP510}
+ fteller : zend_stream_fteller_t;
+ {$ENDIF}
+ interactive : integer;
+ end;
+{$ENDIF}
+
+
+ TZendStream = _zend_stream;
+ PZendStream = ^TZendStream;
+
+
+{$ENDIF}
+
+
+type
+ PZendFileHandle = ^TZendFileHandle;
+ zend_file_handle =
+ record
+ {$IF Defined(PHP530) or Defined(PHP540) or Defined(PHP550) or Defined(PHP560) or Defined(PHP700)}
+ _type : zend_stream_type;
+ {$ELSE}
+ _type: uchar;
+ {$IFEND}
+ filename: zend_pchar;
+ opened_path: zend_pchar;
+ handle:
+ record
+ case Integer of
+ {$IFDEF PHP7}
+ 0:( fd: Integer; );
+ 1:( fp: pointer; );
+ 2 : ( stream : TZendStream; );
+ {$ELSE}
+ 1:( fd: Integer; );
+ 2:( fp: pointer; );
+ {$IFDEF PHP5}
+ 3 : ( stream : TZendStream; );
+ {$ENDIF}
+ {$ENDIF}
+ end;
+ free_filename: {$IFDEF PHP7}byte{$ELSE}shortint{$ENDIF};
+ end;
+ TZendFileHandle = zend_file_handle;
+
+ //TSRM.h
+
+
+type
+ ts_rsrc_id = integer;
+ pts_rsrc_id = ^ts_rsrc_id;
+
+
+ //zend_stack.h
+type
+ pzend_stack = ^Tzend_stack;
+ zend_stack =
+ record
+ top: Integer;
+ max: Integer;
+ elements: PPointer;
+ end;
+ Tzend_stack = zend_stack;
+
+
+type
+ Pzend_syntax_highlighter_ini = ^Tzend_syntax_highlighter_ini;
+ zend_syntax_highlighter_ini =
+ record
+ highlight_html : zend_pchar;
+ highlight_comment : zend_pchar;
+ highlight_default : zend_pchar;
+ highlight_string : zend_pchar;
+ highlight_keyword : zend_pchar;
+ end;
+ Tzend_syntax_highlighter_ini = zend_syntax_highlighter_ini;
+
+
+type
+ zend_write_t = function(str: zend_pchar; str_length: integer): integer; cdecl;
+
+
+type
+
+ {$IFDEF PHP5}
+ _zend_arg_info = record
+ name : zend_pchar;
+ name_len : zend_uint;
+ class_name : zend_pchar;
+ class_name_len : zend_uint;
+ {$IFDEF PHP510}
+ array_type_hint : zend_bool;
+ {$ENDIF}
+ allow_null : zend_bool;
+ pass_by_reference : zend_bool;
+ return_reference : zend_bool;
+ required_num_args : integer;
+ end;
+
+ TZendArgInfo = _zend_arg_info;
+ PZendArgInfo = ^TZendArgInfo;
+ {$ENDIF}
+
+ {$IFNDEF PHP7}
+ Pzend_function_entry = ^Tzend_function_entry;
+ zend_function_entry = record
+ fname: zend_pchar;
+ handler: pointer;
+ arg_info : PZendArgInfo;
+ num_args : zend_uint;
+ flags : zend_uint;
+ end;
+ Tzend_function_entry = zend_function_entry;
+ TZendFunctionEntry = zend_function_entry;
+ P_zend_arg_info = ^_zend_arg_info;
+ zend_object_value = record
+ handle:Integer;
+ handlers:Pointer;
+ end;
+ _zend_function_entry = record
+ fname : zend_pchar;
+ handler : pointer;
+ arg_info : P_zend_arg_info;
+ num_args : uint;
+ flags : uint;
+ end;
+ {$ENDIF}
+ Pzend_module_entry = ^Tzend_module_entry;
+ PPzend_module_entry = ^Pzend_module_entry;
+ p_zend_module_entry = ^_zend_module_entry;
+ _zend_module_entry = record
+ size : word;
+ zend_api : dword;
+ zend_debug : byte;
+ zts : byte;
+ ini_entry : pointer;
+ deps : pointer;
+ name : zend_pchar;
+ functions : Pointer;
+ module_startup_func : pointer;
+ module_shutdown_func : pointer;
+ request_startup_func : pointer;
+ request_shutdown_func : pointer;
+ info_func : pointer;
+ version : zend_pchar;
+
+ {$IFDEF PHP520}
+ globals_size : size_t;
+ globals_id_ptr : pointer;
+ globals_ctor : pointer;
+ globals_dtor : pointer;
+ {$ENDIF}
+
+ post_deactivate_func : pointer;
+ module_started : integer;
+ _type : byte;
+ handle : pointer;
+ module_number : Integer;
+ build_id : zend_pchar;
+ end;
+ Tzend_module_entry = record
+ size: word;
+ zend_api: dword;
+ zend_debug: byte;
+ zts: byte;
+ {$IFDEF PHP5}
+ ini_entry : pointer;
+ {$IFDEF PHP510}
+ deps : pointer;
+ {$ENDIF}
+ {$ENDIF}
+ name: zend_pchar;
+ functions: Pointer;
+ module_startup_func: pointer;
+ module_shutdown_func: pointer;
+ request_startup_func: pointer;
+ request_shutdown_func: pointer;
+ info_func: pointer;
+ version: zend_pchar;
+
+ {$IFDEF PHP5}
+ {$IFDEF PHP520}
+ globals_size : size_t;
+ {$IFDEF PHP540}
+ globals_ptr : pointer;
+ {$ELSE}
+ globals_id_ptr : pointer;
+ {$ENDIF}
+ globals_ctor : procedure (global:pointer);cdecl;
+ globals_dtor : procedure (global:pointer);cdecl;
+ {$ENDIF}
+ {$ENDIF}
+
+ {$IFDEF PHP5}
+ post_deactivate_func : pointer;
+ {$ELSE}
+ global_startup_func: pointer;
+ global_shutdown_func: pointer;
+ {$ENDIF}
+
+ {$IFNDEF PHP520}
+ global_id: integer;
+ {$ENDIF}
+
+ module_started: longint;
+ _type: byte;
+ handle: pointer;
+ module_number: longint;
+ {$IFDEF PHP530}
+ build_id : zend_pchar;
+ {$ENDIF}
+ end;
+
+
+type
+ pzend_list_element = ^zend_list_element;
+ zend_list_element = record
+ prev: pzend_list_element;
+ next: pzend_list_element;
+ data: zend_uchar;
+ end;
+
+ pzend_llist = ^zend_llist;
+ zend_llist = record
+ head: pzend_list_element;
+ tail: pzend_list_element;
+ size: size_t;
+ count: size_t;
+ dtor: pointer;
+ persistent: byte;
+ traverse_ptr: pzend_list_element;
+ end;
+
+ pzend_overloaded_element = ^Zend_overloaded_element;
+ zend_overloaded_element = record
+ _type : integer;
+ element : zval;
+ end;
+
+
+type
+ _zend_property_reference = record
+ _type: integer;
+ _object: pzval;
+ elements_list: pzend_llist;
+ end;
+
+ Tzend_property_reference = _zend_property_reference;
+ Pzend_property_reference = ^Tzend_property_reference;
+
+
+type
+ //Zend internal function
+ TInternalFunction = procedure(ht: integer; return_value: pzval; this_ptr: pzval;
+ return_value_used: integer; TSRMLS_DC: pointer); cdecl;
+
+ PInitFunction = ^TInitFunction;
+ TInitFunction = function(_type: integer; module_number: integer; TSRMLS_DC: pointer): integer; cdecl;
+
+ PShutdownFunction = ^TShutdownFunction;
+ TShutdownFunction = function(_type: integer; module_number: integer; TSRMLS_DC: pointer): integer; cdecl;
+
+ PZendModuleInfoFunction = ^TZendModuleInfoFunction;
+ TZendModuleInfoFunction = procedure(zend_module: Pzend_module_entry; TSRMLS_DC: pointer); cdecl;
+
+ //global startup and shutdown function
+ TZendGlobalFunction = procedure(); cdecl;
+
+ TZendModuleType = (mtPersistent, mtTemporary);
+
+type
+
+ _znode = record
+ op_type : Integer;
+ u :
+ record
+ case Integer of
+ 1 :
+ (
+ constant : zval;
+ );
+ 2 :
+ (
+ _var : zend_uint;
+ );
+ 3 :
+ (
+ opline_num : zend_uint;
+ { Needs to be signed }
+ );
+ 4 :
+ (
+ op_array : ^zend_op_array;
+ );
+ 5 :
+ (
+ jmp_addr : pointer;
+ );
+ 6 :
+ (
+ EA :
+ record
+ _var : zend_uint;
+ { dummy }
+ _type : zend_uint;
+ end;
+ );
+ end;
+ end;
+
+ _zend_declarables = record
+ ticks : zval;
+ end;
+ zend_declarables = _zend_declarables;
+
+ Pzend_compiler_globals = ^zend_compiler_globals;
+ zend_compiler_globals = record
+ bp_stack : zend_stack;
+ switch_cond_stack : zend_stack;
+ foreach_copy_stack : zend_stack;
+ object_stack : zend_stack;
+ declare_stack : zend_stack;
+
+
+ class_entry : PZend_class_entry;
+
+ //variables for list() compilation
+ list_llist : zend_llist;
+ dimension_llist : zend_llist;
+ list_stack : zend_stack;
+
+ function_call_stack : zend_stack;
+
+ compiled_filename : zend_pchar;
+
+ zend_lineno : integer;
+ //comment_start_line : integer;
+ heredoc : zend_pchar;
+ heredoc_len : integer;
+
+ active_op_array : pointer;
+
+ function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; // function symbol table
+ class_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; // class table
+
+ filenames_table : {$IFDEF PHP7} zend_array {$ELSE} THashTable{$ENDIF};
+
+ auto_globals : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
+
+ in_compilation : zend_bool;
+ short_tags : zend_bool;
+ asp_tags : zend_bool;
+ allow_call_time_pass_reference : zend_bool;
+
+ declarables : zend_declarables;
+
+ unclean_shutdown : zend_bool;
+ ini_parser_unbuffered_errors : zend_bool;
+ open_files : zend_llist;
+
+ // For extensions support
+ // extended_info : zend_bool; // generate extension information for debugger/profiler
+ // handle_op_arrays : zend_bool; // run op_arrays through op_array handlers
+
+
+ catch_begin : longint;
+
+ ini_parser_param : pointer;
+
+ interactive : integer;
+
+ start_lineno : zend_uint;
+ increment_lineno : zend_bool;
+
+
+ implementing_class : _znode;
+ access_type : zend_uint;
+ doc_comment : zend_pchar;
+ doc_comment_len : integer;
+ end;
+ Tzend_compiler_globals = zend_compiler_globals;
+
+
+ zend_ptr_stack = record
+ top, max : integer;
+ elements : pointer;
+ top_element : pointer;
+ end;
+
+ jump_buf = array[0..63] of byte;
+ p_jump_buf = ^jump_buf;
+
+{$IFDEF PHP5}
+type _zend_objects_store = record
+ object_buckets : pointer;
+ top : zend_uint;
+ size : zend_uint;
+ free_list_head : integer;
+ end;
+
+type _zend_property_info = record
+ flags : zend_uint;
+ name : zend_pchar;
+ name_length : integer;
+ h : ulong;
+ {$IFDEF PHP510}
+ doc_comment : zend_pchar;
+ doc_comment_len : integer;
+ {$ENDIF}
+ end;
+
+{$ENDIF}
+
+type
+
+ Pzend_executor_globals = ^zend_executor_globals;
+ zend_executor_globals = record
+ return_value_ptr_ptr : {$IFNDEF PHP7} ppzval{$ELSE} pzval{$ENDIF};
+
+ uninitialized_zval : zval;
+ uninitialized_zval_ptr : pzval;
+
+ error_zval : zval;
+ error_zval_ptr : pzval;
+
+ function_state_ptr : pointer;
+ arg_types_stack : zend_ptr_stack;
+
+ // symbol table cache
+ symtable_cache : array[0..31] of PHashTable;
+ symtable_cache_limit : ^PHashTable;
+ symtable_cache_ptr : ^PHashTable;
+
+ opline_ptr : pointer;
+ active_symbol_table : PHashTable;
+ symbol_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF}; // main symbol table
+ included_files : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF}; // files already included */
+ bailout : p_jump_buf;
+
+ error_reporting : integer;
+ orig_error_reporting : integer;
+ exit_status : integer;
+
+ active_op_array : pointer;
+
+ function_table : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // function symbol table */
+ class_table : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // class table
+ zend_constants : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // constants table */
+
+ {$IFDEF PHP5}
+ scope : pointer;
+ _this : pzval;
+ {$ENDIF}
+
+ precision : longint;
+
+ ticks_count : integer;
+
+ in_execution : zend_bool;
+ {$IFDEF PHP5}
+ in_autoload : PHashTable;
+ {$IFDEF PHP510}
+ autoload_func : pointer;
+ {$ENDIF}
+ {$ENDIF}
+
+ full_tables_cleanup : zend_bool;
+ {$IFDEF PHP5}
+ ze1_compatibility_mode : zend_bool;
+ {$ENDIF}
+
+ // for extended information support */
+ no_extensions : zend_bool;
+
+ timed_out : zend_bool;
+
+ regular_list : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ persistent_list : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+
+ argument_stack : zend_ptr_stack;
+
+ {$IFNDEF PHP510}
+ free_op1, free_op2 : pzval;
+ unary_op : pointer;
+ binary_op : pointer;
+
+ garbage : array[0..1] of pzval;
+ garbage_ptr : integer;
+ {$ENDIF}
+
+ {$IFDEF PHP5}
+ user_error_handler_error_reporting : integer;
+ {$ENDIF}
+ user_error_handler : pzval;
+ {$IFDEF PHP5}
+ user_exception_handler : pzval;
+ user_error_handlers_error_reporting : zend_stack;
+ {$ENDIF}
+
+ user_error_handlers : zend_ptr_stack;
+ {$IFDEF PHP5}
+ user_exception_handlers : zend_ptr_stack;
+ {$ENDIF}
+
+ //* timeout support */
+ timeout_seconds : integer;
+ lambda_count : integer;
+ ini_directives : PHashTable;
+ {$IFDEF PHP5}
+
+ objects_store : _zend_objects_store;
+ exception : pzval;
+ opline_before_exception : pointer;
+ current_execute_data : pointer;
+ {$IFDEF PHP5}
+ current_module : pointer;
+ {$ENDIF}
+
+ std_property_info : _zend_property_info;
+ {$ENDIF}
+ //* locale stuff */
+
+ {$IFNDEF PHP510}
+ float_separator : zend_uchar;
+ {$ENDIF}
+
+ reserved: array[0..3] of pointer;
+ end;
+
+
+{$IFDEF PHP5}
+ type
+ TZendObjectReadProperty = function (_object : pzval; member : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
+ TZendObjectReadDimension = function (_object : pzval; offset : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
+ TZendObjectWriteProperty = procedure(_object : pzval; member : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
+ TZendObjectWriteDimension = procedure(_object : pzval; offset : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
+
+{$ENDIF}
+
+{$IFDEF PHP530}
+function ZEND_MODULE_BUILD_ID : zend_ustr;
+{$ENDIF}
+
+implementation
+
+{$IFDEF PHP530}
+function ZEND_MODULE_BUILD_ID : zend_ustr;
+begin
+ Result := 'API' + IntToStr(ZEND_MODULE_API_NO) + ZEND_BUILD_TS + ZEND_BUILD_DEBUG + ZEND_BUILD_SYSTEM;
+end;
+{$ENDIF}
+
+end.
diff --git a/Source/hzend_types.pas b/Source/hzend_types.pas
new file mode 100644
index 0000000..325f3a6
--- /dev/null
+++ b/Source/hzend_types.pas
@@ -0,0 +1,3078 @@
+unit hzend_types;
+
+interface
+
+uses {$IFDEF FPC}Winapi.Windows{$ELSE}Windows{$ENDIF};
+
+var
+ _TestCreate:Pointer;
+
+const
+{#define IS_UNDEF 0
+#define IS_NULL 1
+#define IS_FALSE 2
+#define IS_TRUE 3
+#define IS_LONG 4
+#define IS_DOUBLE 5
+#define IS_STRING 6
+#define IS_ARRAY 7
+#define IS_OBJECT 8
+#define IS_RESOURCE 9
+#define IS_REFERENCE 10}
+
+ E_ERROR = 1 shl 0;
+ E_WARNING = 1 shl 1;
+ E_PARSE = 1 shl 2;
+ E_NOTICE = 1 shl 3;
+ E_CORE_ERROR = 1 shl 4;
+ E_CORE_WARNING = 1 shl 5;
+ E_COMPILE_ERROR = 1 shl 6;
+ E_COMPILE_WARNING = 1 shl 7;
+ E_USER_ERROR = 1 shl 8;
+ E_USER_WARNING = 1 shl 9;
+ E_USER_NOTICE = 1 shl 10;
+ E_STRICT = 1 shl 11;
+ E_RECOVERABLE_ERROR = 1 shl 12;
+ E_DEPRECATED = 1 shl 13;
+ E_USER_DEPRECATED = 1 shl 14;
+ E_ALL = (((((((((((((E_ERROR or E_WARNING) or E_PARSE) or E_NOTICE) or E_CORE_ERROR) or E_CORE_WARNING) or E_COMPILE_ERROR) or E_COMPILE_WARNING) or E_USER_ERROR) or E_USER_WARNING) or E_USER_NOTICE) or E_RECOVERABLE_ERROR) or E_DEPRECATED) or E_USER_DEPRECATED) or E_STRICT;
+ E_CORE = E_CORE_ERROR or E_CORE_WARNING;
+
+
+ ZEND_INI_USER = 1 shl 0;
+ ZEND_INI_PERDIR = 1 shl 1;
+ ZEND_INI_SYSTEM = 1 shl 2;
+ ZEND_INI_ALL = (ZEND_INI_USER or ZEND_INI_PERDIR or ZEND_INI_SYSTEM);
+
+
+ ZEND_INI_DISPLAY_ORIG = 1 ;
+ ZEND_INI_DISPLAY_ACTIVE= 2 ;
+
+ ZEND_INI_STAGE_STARTUP = 1 or 0;
+ ZEND_INI_STAGE_SHUTDOWN = 1 or 1;
+ZEND_INI_STAGE_ACTIVATE = 1 or 2;
+ ZEND_INI_STAGE_DEACTIVATE = 1 or 3;
+ZEND_INI_STAGE_RUNTIME = 1 or 4;
+ZEND_INI_STAGE_HTACCESS = 1 or 5;
+
+
+ IS_UNDEF = 0 ;
+ IS_NULL = 1 ;
+ IS_FALSE = 2 ;
+ IS_TRUE = 3 ;
+ IS_LONG = 4 ;
+ IS_DOUBLE = 5 ;
+ IS_STRING = 6 ;
+ IS_ARRAY = 7 ;
+ IS_OBJECT = 8 ;
+ IS_RESOURCE = 9 ;
+ IS_REFERENCE = 10 ;
+
+
+ IS_CONSTANT = 11 ;
+ IS_CONSTANT_AST = 12 ;
+
+
+ IS_BOOL = 13 ;
+ IS_CALLABLE = 14 ;
+
+ IS_INDIRECT = 15 ;
+ IS_PTR = 17 ;
+ // IS_BOOL = 4;
+
+ IS_TYPE_CONSTANT = (1 SHL 0);
+ IS_TYPE_IMMUTABLE = (1 SHL 1) ;
+ IS_TYPE_REFCOUNTED = (1 SHL 2) ;
+IS_TYPE_COLLECTABLE = (1 SHL 3);
+ IS_TYPE_COPYABLE = (1 SHL 4) ;
+ IS_TYPE_SYMBOLTABLE = (1 SHL 5) ;
+
+Z_TYPE_FLAGS_SHIFT = 8 ;
+Z_CONST_FLAGS_SHIFT = 16;
+
+
+
+
+
+ IS_STRING_EX = IS_STRING or ((IS_TYPE_REFCOUNTED or IS_TYPE_COPYABLE) shl Z_TYPE_FLAGS_SHIFT);
+
+
+
+ SUCCESS = 0;
+ FAILURE = -1;
+
+
+
+ HASH_UPDATE = 1 SHL 0;
+ HASH_ADD = 1 SHL 1;
+ HASH_NEXT_INSERT = 1 SHL 2;
+
+ HASH_DEL_KEY = 0;
+ HASH_DEL_INDEX = 1;
+ HASH_DEL_KEY_QUICK = 2;
+
+ ZEND_AST_SPECIAL_SHIFT = 6;
+ZEND_AST_IS_LIST_SHIFT = 7;
+ZEND_AST_NUM_CHILDREN_SHIFT = 8;
+
+ PHP_API_VERSION = 20151012 ;
+ YYDEBUG = 0 ;
+ PHP_DEFAULT_CHARSET = 'UTF-8';
+
+ MODULE_PERSISTENT = 1;
+ MODULE_TEMPORARY = 2;
+
+ SAPI_HEADER_ADD = 1 shr 0;
+
+ SAPI_HEADER_SENT_SUCCESSFULLY = 1 ;
+SAPI_HEADER_DO_SEND = 2 ;
+ SAPI_HEADER_SEND_FAILED = 3 ;
+
+ SAPI_DEFAULT_MIMETYPE = 'text/html';
+ SAPI_DEFAULT_CHARSET = PHP_DEFAULT_CHARSET;
+ SAPI_PHP_VERSION_HEADER = 'X-Powered-By: PHP/" PHP_VERSION';
+
+ //zend_constants.h
+const
+ CONST_CS = (1 shl 0) { Case Sensitive }
+ ;
+ CONST_PERSISTENT = (1 shl 1) { Persistent }
+ ;
+const
+ ZEND_INTERNAL_FUNCTION = 1;
+ ZEND_USER_FUNCTION = 2;
+ ZEND_OVERLOADED_FUNCTION = 3;
+ ZEND_EVAL_CODE = 4;
+ ZEND_INTERNAL_CLASS = 1;
+ ZEND_USER_CLASS = 2;
+ ZEND_EVAL = (1 shl 0);
+ ZEND_INCLUDE = (1 shl 1);
+ ZEND_INCLUDE_ONCE = (1 shl 2);
+ ZEND_REQUIRE = (1 shl 3);
+ ZEND_REQUIRE_ONCE = (1 shl 4);
+ ZEND_ISSET = (1 shl 0);
+ ZEND_ISEMPTY = (1 shl 1);
+ ZEND_CT = (1 shl 0);
+ ZEND_RT = (1 shl 1);
+type
+ pppointer = ^ppointer;
+
+
+
+
+
+ _zend_ast_kind = (ZEND_AST_ZVAL_ = 1 shl ZEND_AST_SPECIAL_SHIFT,ZEND_AST_ZNODE_,ZEND_AST_FUNC_DECL,
+ ZEND_AST_CLOSURE,ZEND_AST_METHOD,ZEND_AST_CLASS,
+ ZEND_AST_ARG_LIST = 1 shl ZEND_AST_IS_LIST_SHIFT,ZEND_AST_LIST_,ZEND_AST_ARRAY,
+ ZEND_AST_ENCAPS_LIST,ZEND_AST_EXPR_LIST,
+ ZEND_AST_STMT_LIST,ZEND_AST_IF,ZEND_AST_SWITCH_LIST,
+ ZEND_AST_CATCH_LIST,ZEND_AST_PARAM_LIST,
+ ZEND_AST_CLOSURE_USES,ZEND_AST_PROP_DECL,
+ ZEND_AST_CONST_DECL,ZEND_AST_CLASS_CONST_DECL,
+ ZEND_AST_NAME_LIST,ZEND_AST_TRAIT_ADAPTATIONS,
+ ZEND_AST_USE,ZEND_AST_MAGIC_CONST = 0 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_TYPE,ZEND_AST_VAR = 1 shl ZEND_AST_NUM_CHILDREN_SHIFT,ZEND_AST_CONST,
+ ZEND_AST_UNPACK,ZEND_AST_UNARY_PLUS,ZEND_AST_UNARY_MINUS,
+ ZEND_AST_CAST,ZEND_AST_EMPTY,ZEND_AST_ISSET,
+ ZEND_AST_SILENCE,ZEND_AST_SHELL_EXEC,ZEND_AST_CLONE,
+ ZEND_AST_EXIT,ZEND_AST_PRINT,ZEND_AST_INCLUDE_OR_EVAL,
+ ZEND_AST_UNARY_OP,ZEND_AST_PRE_INC,ZEND_AST_PRE_DEC,
+ ZEND_AST_POST_INC,ZEND_AST_POST_DEC,ZEND_AST_YIELD_FROM,
+ ZEND_AST_GLOBAL,ZEND_AST_UNSET,ZEND_AST_RETURN,
+ ZEND_AST_LABEL,ZEND_AST_REF_,ZEND_AST_HALT_COMPILER,
+ ZEND_AST_ECHO,ZEND_AST_THROW,ZEND_AST_GOTO,
+ ZEND_AST_BREAK,ZEND_AST_CONTINUE,ZEND_AST_DIM = 2 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_PROP,ZEND_AST_STATIC_PROP,ZEND_AST_CALL,
+ ZEND_AST_CLASS_CONST,ZEND_AST_ASSIGN,ZEND_AST_ASSIGN_REF,
+ ZEND_AST_ASSIGN_OP,ZEND_AST_BINARY_OP,ZEND_AST_GREATER,
+ ZEND_AST_GREATER_EQUAL,ZEND_AST_AND,ZEND_AST_OR,
+ ZEND_AST_ARRAY_ELEM,ZEND_AST_NEW,ZEND_AST_INSTANCEOF,
+ ZEND_AST_YIELD,ZEND_AST_COALESCE,ZEND_AST_STATIC,
+ ZEND_AST_WHILE,ZEND_AST_DO_WHILE,ZEND_AST_IF_ELEM,
+ ZEND_AST_SWITCH,ZEND_AST_SWITCH_CASE,ZEND_AST_DECLARE,
+ ZEND_AST_CONST_ELEM,ZEND_AST_USE_TRAIT,
+ ZEND_AST_TRAIT_PRECEDENCE,ZEND_AST_METHOD_REFERENCE,
+ ZEND_AST_NAMESPACE,ZEND_AST_USE_ELEM,ZEND_AST_TRAIT_ALIAS,
+ ZEND_AST_GROUP_USE,ZEND_AST_METHOD_CALL = 3 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_STATIC_CALL,ZEND_AST_CONDITIONAL,
+ ZEND_AST_TRY,ZEND_AST_CATCH,ZEND_AST_PARAM,
+ ZEND_AST_PROP_ELEM,ZEND_AST_FOR = 4 shl ZEND_AST_NUM_CHILDREN_SHIFT,ZEND_AST_FOREACH
+ );
+ plongint = ^longint;
+
+ P_zend_objects_store = ^_zend_objects_store;
+ Pzend_objects_store = ^zend_objects_store;
+ uint32_t = CARDINAL;
+
+
+ zend_pchar = {$IFDEF PHP_UNICODE}PUtf8Char{$ELSE}PAnsiChar{$ENDIF};
+ zend_pstr = {$IFDEF PHP_UNICODE}PUtf8String{$ELSE}PAnsiString{$ENDIF};
+
+ //zend_uchar = {$IFDEF PHP_UNICODE}Utf8Char{$ELSE}AnsiChar{$ENDIF};
+ zend_ustr = {$IFDEF PHP_UNICODE}Utf8String{$ELSE}AnsiString{$ENDIF};
+
+
+
+
+
+
+
+
+ P_zend_object = ^_zend_object;
+ PP_zend_object = ^P_zend_object;
+ PPP_zend_object = ^PP_zend_object;
+ Pzend_object = ^_zend_object;
+ PPzend_object = ^P_zend_object;
+ PPPzend_object = ^PP_zend_object;
+
+ P_zend_refcounted = ^_zend_refcounted;
+ P_zend_string = ^_zend_string;
+ PP_zend_string = ^P_zend_string;
+ PPP_zend_string = ^PP_zend_string;
+ Pzend_string = ^_zend_string;
+ PPzend_string = ^P_zend_string;
+ PPPzend_string = ^PP_zend_string;
+
+ Pzend_mm_chunk_alloc_t = ^zend_mm_chunk_alloc_t;
+ P_zend_resource = ^_zend_resource;
+ PP_zend_resource =^P_zend_resource;
+ PPP_zend_resource =^PP_zend_resource;
+ Pzend_resource = ^_zend_resource;
+ PPzend_resource =^P_zend_resource;
+ PPPzend_resource =^PP_zend_resource;
+ P_zend_ast_ref = ^_zend_ast_ref;
+ P_zend_reference = ^_zend_reference;
+ P_zend_array = ^_zend_array;
+ PP_zend_array = ^P_zend_array;
+ PPP_zend_array = ^PP_zend_array;
+ Pzend_array = ^_zend_array;
+ PPzend_array = ^P_zend_array;
+ PPPzend_array = ^PP_zend_array;
+
+ P_zval_struct = ^_zval_struct;
+ P_zend_function = ^_zend_function;
+ PP_zend_function = ^P_zend_function;
+ PPP_zend_function = ^PP_zend_function;
+ Pzend_function = ^_zend_function;
+ PPzend_function = ^P_zend_function;
+ PPPzend_function = ^PP_zend_function;
+ P_zend_value = ^_zend_value;
+ Pzend_ast_kind = ^zend_ast_kind;
+ zend_ast_kind = Word;
+ Pzend_ast_attr = ^zend_ast_attr;
+ zend_ast_attr = Word;
+ Pzend_bool = ^zend_bool;
+ zend_bool = byte;
+ Pzend_uchar = ^zend_uchar;
+ zend_uchar = byte;
+ zend_long = integer;
+ Pzend_long = ^zend_long;
+ PPzend_long = ^Pzend_long;
+ Pzend_stack = ^zend_stack;
+ P_zend_stack = ^_zend_stack;
+
+
+ zend_ulong = FixedUInt;
+ P_zend_ulong = ^zend_ulong;
+ zend_off_t = integer;
+ Pzend_off_t = ^zend_off_t;
+ PPzend_off_t = ^Pzend_off_t;
+ P_zend_mm_huge_list = ^_zend_mm_huge_list;
+
+ P_zend_mm_free_slot = ^_zend_mm_free_slot;
+ P_zend_mm_bin = ^_zend_mm_bin;
+ P_zend_mm_page = ^_zend_mm_page;
+ P_zend_mm_chunk = ^_zend_mm_chunk;
+ P_zend_mm_heap = ^_zend_mm_heap;
+ PP_zend_mm_heap = ^P_zend_mm_heap;
+ PPP_zend_mm_heap = ^PP_zend_mm_heap;
+ Pzend_mm_heap = ^_zend_mm_heap;
+ PPzend_mm_heap = ^P_zend_mm_heap;
+ PPPzend_mm_heap = ^PP_zend_mm_heap;
+ P_zend_mm_debug_info = ^_zend_mm_debug_info;
+
+ Pzend_ini_entry_def = ^zend_ini_entry_def;
+
+ P_zend_ini_entry = ^_zend_ini_entry;
+ P_zend_ini_entry_def = ^_zend_ini_entry_def;
+
+ zend_uint = uint;
+ zend_ushort = ushort;
+ Pzend_value = ^zend_value;
+ Pzend_file_handle = ^zend_file_handle;
+ P_zend_ast = ^_zend_ast;
+ P_zend_ast_list = ^_zend_ast_list;
+ Pzend_ast_list = ^zend_ast_list;
+ Pzend_ast_decl = ^zend_ast_decl;
+ P_zend_ast_zval = ^_zend_ast_zval;
+ Pzend_ast_zval = ^zend_ast_zval;
+ P_zend_ast_decl = ^_zend_ast_decl;
+ PHashTable = Pzend_array;
+ PPHashTable = ^PHashTable;
+ Pzend_intptr_t = ^zend_intptr_t;
+ Pzend_uintptr_t = ^zend_uintptr_t;
+ pzval = ^zval;
+ ppzval = ^pzval;
+ pppzval = ^ppzval;
+ Pzend_utility_values = ^zend_utility_values;
+ Pzend_utility_functions = ^zend_utility_functions;
+ Pzend_trait_alias = ^zend_trait_alias;
+ Pzend_trait_precedence = ^zend_trait_precedence;
+ Pzend_trait_method_reference = ^zend_trait_method_reference;
+ PZEND_RESULT_CODE = ^ZEND_RESULT_CODE;
+ P_zend_serialize_data = ^_zend_serialize_data;
+ P_zend_unserialize_data = ^_zend_unserialize_data;
+ P_zend_trait_method_reference = ^_zend_trait_method_reference;
+ P_zend_trait_precedence = ^_zend_trait_precedence;
+ P_zend_trait_alias = ^_zend_trait_alias;
+ P_zend_class_entry = ^_zend_class_entry;
+ PP_zend_class_entry = ^P_zend_class_entry;
+ PPP_zend_class_entry = ^PP_zend_class_entry;
+ Pzend_class_entry = ^_zend_class_entry;
+ PPzend_class_entry = ^P_zend_class_entry;
+ PPPzend_class_entry = ^PP_zend_class_entry;
+
+ P_zend_utility_functions = ^_zend_utility_functions;
+ P_zend_utility_values = ^_zend_utility_values;
+ Pzend_error_handling_t = ^zend_error_handling_t;
+ Pzend_error_handling = ^zend_error_handling;
+ Pzend_stream_type = ^zend_stream_type;
+
+ P_zend_op = ^_zend_op;
+ P_zend_execute_data = ^_zend_execute_data;
+ PP_zend_execute_data = ^P_zend_execute_data;
+ PPP_zend_execute_data = ^PP_zend_execute_data;
+ Pzend_execute_data = ^_zend_execute_data;
+ PPzend_execute_data = ^P_zend_execute_data;
+ PPPzend_execute_data = ^PP_zend_execute_data;
+ P_zend_function_entry = ^_zend_function_entry;
+ P_zend_fcall_info_cache = ^_zend_fcall_info_cache;
+ Pzend_function_entry = ^zend_function_entry;
+ Pzend_declarables = ^zend_declarables;
+ Pzend_ast_znode = ^zend_ast_znode;
+ Pznode = ^znode;
+ Pznode_op = ^znode_op;
+ Pzend_stream = ^zend_stream;
+ Pzend_mmap = ^zend_mmap;
+ Pzend_fcall_info_cache = ^zend_fcall_info_cache;
+ P_zend_mmap = ^_zend_mmap;
+ P_zend_stream = ^_zend_stream;
+ P_zend_file_handle = ^_zend_file_handle;
+ P_znode_op = ^_znode_op;
+ P_znode = ^_znode;
+ P_zend_ast_znode = ^_zend_ast_znode;
+ P_zend_declarables = ^_zend_declarables;
+ P_zend_oparray_context = ^_zend_oparray_context;
+ Pzend_internal_function_info = ^zend_internal_function_info;
+ Pzend_arg_info = ^zend_arg_info;
+ Pzend_internal_arg_info = ^zend_internal_arg_info;
+ Pzend_property_info = ^zend_property_info;
+ Pzend_try_catch_element = ^zend_try_catch_element;
+ Pzend_label = ^zend_label;
+ Pzend_closure = ^zend_closure;
+ P_zend_closure = ^_zend_closure;
+ P_zend_multibyte_functions = ^_zend_multibyte_functions;
+ Pzend_encoding_internal_encoding_getter = ^zend_encoding_internal_encoding_getter;
+ Pzend_encoding_detector = ^zend_encoding_detector;
+
+ Pzend_brk_cont_element = ^zend_brk_cont_element;
+ Pzend_parser_stack_elem = ^zend_parser_stack_elem;
+ Pzend_file_context = ^zend_file_context;
+ Pzend_oparray_context = ^zend_oparray_context;
+ P_zend_file_context = ^_zend_file_context;
+ P_zend_parser_stack_elem = ^_zend_parser_stack_elem;
+ P_zend_brk_cont_element = ^_zend_brk_cont_element;
+ P_zend_label = ^_zend_label;
+ P_zend_try_catch_element = ^_zend_try_catch_element;
+ P_zend_property_info = ^_zend_property_info;
+ P_zend_internal_arg_info = ^_zend_internal_arg_info;
+ P_zend_arg_info = ^_zend_arg_info;
+ P_zend_internal_function_info = ^_zend_internal_function_info;
+ P_zend_op_array = ^_zend_op_array;
+ PP_zend_op_array = ^P_zend_op_array;
+ PPP_zend_op_array = ^PP_zend_op_array;
+ Pzend_op_array = ^_zend_op_array;
+ PPzend_op_array = ^P_zend_op_array;
+ PPPzend_op_array = ^PP_zend_op_array;
+ PHashTableIterator = ^HashTableIterator;
+ P_zend_object_handlers = ^_zend_object_handlers;
+ PBucket = ^Bucket;
+ Pzend_refcounted_h = ^zend_refcounted_h;
+ Pzend_auto_global = ^zend_auto_global;
+ Pzend_internal_function = ^tzend_internal_function;
+ P_zend_internal_function = ^_zend_internal_function;
+ P_zend_call_kind = ^_zend_call_kind;
+ P_zend_auto_global = ^_zend_auto_global;
+ P_zend_refcounted_h = ^_zend_refcounted_h;
+ P_Bucket = ^_Bucket;
+ PHashPosition = ^HashPosition;
+ P_HashTableIterator = ^_HashTableIterator;
+ Pzend_object_read_property_t = ^zend_object_read_property_t;
+ Pzend_object_read_dimension_t = ^zend_object_read_dimension_t;
+ Pzend_object_get_property_ptr_ptr_t = ^zend_object_get_property_ptr_ptr_t;
+ Pzend_object_get_t = ^zend_object_get_t;
+ Pzend_object_get_properties_t = ^zend_object_get_properties_t;
+ Pzend_object_get_method_t = ^zend_object_get_method_t;
+ Pzend_object_get_constructor_t = ^zend_object_get_constructor_t;
+ Pzend_object_get_debug_info_t = ^zend_object_get_debug_info_t;
+ Pzend_call_kind = ^zend_call_kind;
+ Pzend_object_clone_obj_t = ^zend_object_clone_obj_t;
+ Pzend_object_get_class_name_t = ^zend_object_get_class_name_t;
+ Pzend_object_get_gc_t = ^zend_object_get_gc_t;
+ P_zend_class_iterator_funcs = ^_zend_class_iterator_funcs;
+ P_zend_object_iterator_funcs = ^_zend_object_iterator_funcs;
+ Pzend_object_iterator_funcs = ^zend_object_iterator_funcs;
+ P_zend_arena = ^_zend_arena;
+ Pzend_leak_info = ^zend_leak_info;
+ Pzend_mm_debug_info = ^zend_mm_debug_info;
+ Pzend_mm_handlers = ^zend_mm_handlers;
+ P_zend_mm_storage = ^_zend_mm_storage;
+ P_zend_mm_handlers = ^_zend_mm_handlers;
+ P_zend_leak_info = ^_zend_leak_info;
+ P_zend_object_iterator = ^_zend_object_iterator;
+ PP_zend_object_iterator = ^P_zend_object_iterator;
+ PPP_zend_object_iterator = ^PP_zend_object_iterator;
+ Pzend_object_iterator = ^_zend_object_iterator;
+ PPzend_object_iterator = ^P_zend_object_iterator;
+ PPPzend_object_iterator = ^PP_zend_object_iterator;
+ Pzend_class_iterator_funcs = ^zend_class_iterator_funcs;
+ P_zend_module_dep = ^_zend_module_dep;
+ P_zend_module_entry = ^_zend_module_entry;
+ PP_zend_module_entry = ^P_zend_module_entry;
+ PPP_zend_module_entry = ^PP_zend_module_entry;
+ Pzend_module_entry = ^_zend_module_entry;
+ PPzend_module_entry = ^P_zend_module_entry;
+ PPPzend_module_entry = ^PP_zend_module_entry;
+ psmart_str = ^Tsmart_str;
+
+ Psapi_globals_struct = ^sapi_globals_struct;
+ Psapi_header_struct = ^sapi_header_struct;
+ Psapi_headers_struct = ^sapi_headers_struct;
+ Pzend_mm_chunk_free_t = ^zend_mm_chunk_free_t;
+ Pzend_mm_chunk_truncate_t = ^zend_mm_chunk_truncate_t;
+ Pzend_mm_chunk_extend_tt = ^zend_mm_chunk_extend_t;
+ Psapi_request_info = ^sapi_request_info;
+ P_sapi_globals_struct = ^_sapi_globals_struct;
+ Psapi_header_line = ^sapi_header_line;
+ Psapi_header_op_enum = ^sapi_header_op_enum;
+ P_sapi_module_struct = ^_sapi_module_struct;
+ PP_sapi_module_struct = ^P_sapi_module_struct;
+ PPP_sapi_module_struct = ^PP_sapi_module_struct;
+ Psapi_module_struct = ^_sapi_module_struct;
+ PPsapi_module_struct = ^P_sapi_module_struct;
+ PPPsapi_module_struct = ^PP_sapi_module_struct;
+ P_sapi_post_entry = ^_sapi_post_entry;
+ PP_sapi_post_entry = ^P_sapi_post_entry;
+ PPP_sapi_post_entry = ^PP_sapi_post_entry;
+ Psapi_post_entry = ^_sapi_post_entry;
+ PPsapi_post_entry = ^P_sapi_post_entry;
+ PPPsapi_post_entry = ^PP_sapi_post_entry;
+ Pphp_stream_dirent = ^php_stream_dirent;
+ Pphp_stream_ops = ^php_stream_ops;
+ P_php_stream = ^_php_stream;
+ PP_php_stream = ^P_php_stream;
+ PPP_php_stream = ^PP_php_stream;
+ Pphp_stream = ^_php_stream;
+ PPphp_stream = ^P_php_stream;
+ PPPphp_stream = ^PP_php_stream;
+ P_php_stream_wrapper = ^_php_stream_wrapper;
+ PP_php_stream_wrapper = ^P_php_stream_wrapper;
+ PPP_php_stream_wrapper = ^PP_php_stream_wrapper;
+ Pphp_stream_wrapper = ^_php_stream_wrapper;
+ PPphp_stream_wrapper = ^P_php_stream_wrapper;
+ PPPphp_stream_wrapper = ^PP_php_stream_wrapper;
+ P_php_stream_wrapper_ops = ^_php_stream_wrapper_ops;
+ P_php_stream_ops = ^_php_stream_ops;
+ P_php_stream_statbuf = ^_php_stream_statbuf;
+ Pzend_llist = ^zend_llist;
+ Pzend_llist_element = ^zend_llist_element;
+ P_zend_llist_element = ^_zend_llist_element;
+ P_zend_llist = ^_zend_llist;
+ Pzend_llist_position = ^zend_llist_position;
+ Pphp_stream_filter_ops = ^php_stream_filter_ops;
+ Pphp_stream_filter_chain = ^php_stream_filter_chain;
+ Pphp_stream_filter_factory = ^php_stream_filter_factory;
+ P_php_stream_filter_factory = ^_php_stream_filter_factory;
+ P_php_stream_filter = ^_php_stream_filter;
+ PP_php_stream_filter = ^P_php_stream_filter;
+ PPP_php_stream_filter = ^PP_php_stream_filter;
+ Pphp_stream_filter = ^_php_stream_filter;
+ PPphp_stream_filter = ^P_php_stream_filter;
+ PPPphp_stream_filter = ^PP_php_stream_filter;
+ P_php_stream_filter_chain = ^_php_stream_filter_chain;
+ P_php_stream_filter_ops = ^_php_stream_filter_ops;
+ Pphp_stream_filter_status_t = ^php_stream_filter_status_t;
+ P_php_stream_bucket_brigade = ^_php_stream_bucket_brigade;
+ PP_php_stream_bucket_brigade = ^P_php_stream_bucket_brigade;
+ PPP_php_stream_bucket_brigade = ^PP_php_stream_bucket_brigade;
+ Pphp_stream_bucket_brigade = ^_php_stream_bucket_brigade;
+ PPphp_stream_bucket_brigade = ^P_php_stream_bucket_brigade;
+ PPPphp_stream_bucket_brigade = ^PP_php_stream_bucket_brigade;
+ P_php_stream_bucket = ^_php_stream_bucket;
+ PP_php_stream_bucket = ^P_php_stream_bucket;
+ PPP_php_stream_bucket = ^PP_php_stream_bucket;
+ Pphp_stream_bucket = ^_php_stream_bucket;
+ PPphp_stream_bucket = ^P_php_stream_bucket;
+ PPPphp_stream_bucket = ^PP_php_stream_bucket;
+ Puid_t = ^uid_t;
+ uid_t = longint;
+ Pphp_stream_wrapper_ops = ^php_stream_wrapper_ops; zend_encoding = pointer ;
+ Pzend_encoding= ^zend_encoding;
+ PPzend_encoding = ^Pzend_encoding;
+ PPPzend_encoding = ^PPzend_encoding;
+ Pgid_t = ^gid_t;
+ gid_t = longint;
+Pzend_ptr_stack = ^zend_ptr_stack;
+ P_zend_ptr_stack = ^_zend_ptr_stack;
+ Pzend_free_op = ^zend_free_op;
+ zend_free_op = Pzval;
+
+ Pzend_vm_stack = ^_zend_vm_stack;
+ Pzend_ini_parser_param = ^zend_ini_parser_param;
+ P_zend_ini_parser_param = ^_zend_ini_parser_param;
+
+ P_zend_php_scanner_globals = ^_zend_php_scanner_globals;
+ Pzend_php_scanner_event = ^zend_php_scanner_event;
+ zend_php_scanner_event = (ON_TOKEN,ON_FEEDBACK,ON_STOP);
+ P_zend_ini_scanner_globals = ^_zend_ini_scanner_globals;
+ P_zend_executor_globals = ^_zend_executor_globals;
+ P_zend_compiler_globals = ^_zend_compiler_globals;
+
+
+ Pcaddr_t = ^caddr_t;
+ caddr_t = zend_pchar;
+ _zend_fcall_info_cache = record
+ initialized : zend_bool;
+ function_handler : P_zend_function;
+ calling_scope : P_zend_class_entry;
+ called_scope : P_zend_class_entry;
+ _object : P_zend_object;
+ end;
+ zend_fcall_info_cache = _zend_fcall_info_cache;
+ Pphp_stream_statbuf = ^php_stream_statbuf;
+ P_php_stream_notifier = ^_php_stream_notifier;
+ P_php_stream_context = ^_php_stream_context;
+ PP_php_stream_context = ^P_php_stream_context;
+ PPP_php_stream_context = ^PP_php_stream_context;
+ Pphp_stream_context = ^_php_stream_context;
+ PPphp_stream_context = ^P_php_stream_context;
+ PPPphp_stream_context = ^PP_php_stream_context;
+
+ P_php_stream_dirent = ^_php_stream_dirent;
+
+ PP_zend_llist_element = ^P_zend_llist_element;
+ PPP_zend_llist_element = ^PP_zend_llist_element;
+
+ zend_stat_t = pointer;
+ P_zend_stat_t =^zend_stat_t;
+ PP_zend_stat_t = ^P_zend_stat_t;
+ PPP_zend_stat_t = ^PP_zend_stat_t;
+ _zend_value = Packed record
+ case longint of
+ 0 : ( lval : zend_long );
+ 1 : ( dval : double );
+ 2 : ( counted : P_zend_refcounted );
+ 3 : ( str : Pzend_string );
+ 4 : ( arr : Pzend_array );
+ 5 : ( obj : Pzend_object );
+ 6 : ( res : Pzend_resource );
+ 7 : ( ref : P_zend_reference );
+ 8 : ( ast : P_zend_ast_ref );
+ 9 : ( zv : Pzval );
+ 10 : ( ptr : pointer );
+ 11 : ( ce : P_zend_class_entry );
+ 12 : ( func : P_zend_function );
+ 13 : ( ww : Packed record
+ w1 : cardinal;
+ w2 : cardinal;
+ end );
+ end;
+ zend_value = _zend_value;
+
+ _zval_struct = Packed record
+ value : zend_value;
+ u1 : Packed record
+ case longint of
+ 0 : ( v : record
+ _type : zend_uchar;
+ type_flags : zend_uchar;
+ const_flags : zend_uchar;
+ reserved : zend_uchar;
+ end );
+ 1 : ( type_info : cardinal );
+ end;
+ u2 : Packed record
+ case longint of
+ 0 : ( var_flags : LongWord );
+ 1 : ( next : cardinal );
+ 2 : ( cache_slot : cardinal );
+ 3 : ( lineno : cardinal );
+ 4 : ( num_args : cardinal );
+ 5 : ( fe_pos : cardinal );
+ 6 : ( fe_iter_idx : cardinal );
+ end;
+ end;
+ zval = _zval_struct;
+ PZendConstant = ^TZendConstant;
+ zend_constant = record
+ value: zval;
+ flags: Integer;
+ name: zend_pchar;
+ name_len: uint;
+ module_number: Integer;
+ end;
+ TZendConstant = zend_constant;
+ Pzend_syntax_highlighter_ini = ^Tzend_syntax_highlighter_ini;
+ zend_syntax_highlighter_ini =
+ record
+ highlight_html : zend_pchar;
+ highlight_comment : zend_pchar;
+ highlight_default : zend_pchar;
+ highlight_string : zend_pchar;
+ highlight_keyword : zend_pchar;
+ end;
+ PStat = ^TStat;
+ TStat = record
+ st_dev: Word;
+ st_ino: Word;
+ st_mode: Word;
+ st_nlink: SmallInt;
+ st_uid: SmallInt;
+ st_gid: SmallInt;
+ st_rdev: Word;
+ st_size: Longint;
+ st_atime: Longint;
+ st_mtime: Longint;
+ st_ctime: Longint;
+ end;
+ Stat = TStat;
+ Tzend_syntax_highlighter_ini = zend_syntax_highlighter_ini;
+ compare_func_t = function (_para1:pointer; _para2:pointer):longint;cdecl;
+
+ swap_func_t = procedure (_para1:pointer; _para2:pointer);cdecl;
+
+ sort_func_t = procedure (_para1:pointer; _para2:size_t; _para3:size_t; _para4:compare_func_t; _para5:swap_func_t);cdecl;
+
+ dtor_func_t = procedure (pDest:pzval);cdecl;
+
+ copy_ctor_func_t = procedure (pElement:pzval);cdecl;
+
+
+ P_zend_vm_stack = ^_zend_vm_stack;
+
+ _zend_vm_stack = record
+ top : Pzval;
+ _end : Pzval;
+ prev : POINTER;
+ end;
+
+
+ _zend_refcounted_h = record
+ refcount : cardinal;
+ u : record
+ case longint of
+ 0 : ( v : record
+ _type : zend_uchar;
+ flags : zend_uchar;
+ gc_info : word;
+ end );
+ 1 : ( type_info : cardinal );
+ end;
+ end;
+
+
+ zend_refcounted_h = _zend_refcounted_h;
+
+ _zend_refcounted = record
+ gc : zend_refcounted_h;
+ end;
+ zend_refcounted = _zend_refcounted;
+
+
+
+ _zend_string = record
+ gc : zend_refcounted_h;
+ h : zend_ulong;
+ len : size_t;
+ val : zend_pchar;
+ end;
+ zend_string = _zend_string;
+
+ _Bucket = record
+ val : zval;
+ h : zend_ulong;
+ key : P_zend_string;
+ end;
+ Bucket = _Bucket;
+ _zend_ini_entry = record
+ name : P_zend_string;
+ on_modify : pointer;
+ mh_arg1 : pointer;
+ mh_arg2 : pointer;
+ mh_arg3 : pointer;
+ value : P_zend_string;
+ orig_value : P_zend_string;
+ displayer : procedure (ini_entry:p_zend_ini_entry; _type:longint);cdecl;
+ modifiable : longint;
+ orig_modifiable : longint;
+ modified : longint;
+ module_number : longint;
+ end;
+
+ _zend_ini_entry_def = record
+ name : zend_pchar;
+ on_modify : pointer;
+ mh_arg1 : pointer;
+ mh_arg2 : pointer;
+ mh_arg3 : pointer;
+ value : zend_pchar;
+ displayer : procedure (ini_entry:p_zend_ini_entry; _type:longint);cdecl;
+ modifiable : longint;
+ name_length : uint;
+ value_length : uint;
+ end;
+ zend_ini_entry_def = _zend_ini_entry_def;
+zend_ini_parser_cb_t = procedure (arg1:pzval; arg2:pzval; arg3:pzval; callback_type:longint; arg:pointer);cdecl;
+
+
+
+ _zend_array = record
+ gc : zend_refcounted_h;
+ u : record
+ case longint of
+ 0 : ( v : record
+ flags : zend_uchar;
+ nApplyCount : zend_uchar;
+ nIteratorsCount : zend_uchar;
+ reserve : zend_uchar;
+ end );
+ 1 : ( flags : cardinal );
+ end;
+ nTableMask : cardinal;
+ arData : PBucket;
+ nNumUsed : cardinal;
+ nNumOfElements : cardinal;
+ nTableSize : cardinal;
+ nInternalPointer : cardinal;
+ nNextFreeElement : zend_long;
+ pDestructor : dtor_func_t;
+ end;
+ HashTable = _zend_array ;
+ zend_array = _zend_array;
+ pzval_array = pzval;
+ _zend_ast = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ child : array[0..0] of P_zend_ast;
+ end;
+
+ zend_ast = _zend_ast;
+ pzend_ast = ^zend_ast;
+ ppzend_ast = ^pzend_ast;
+ pppzend_ast = ^ppzend_ast;
+
+ _zend_ast_list = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ children : Cardinal;
+ child : array[0..0] of P_zend_ast;
+ end;
+ zend_ast_list = _zend_ast_list;
+
+
+
+
+ P_zend_fcall_info = ^_zend_fcall_info;
+ _zend_fcall_info = record
+ size : size_t;
+ function_table : PHashTable;
+ function_name : zval;
+ symbol_table : P_zend_array;
+ retval : Pzval;
+ params : Pzval;
+ _object : P_zend_object;
+ no_separation : zend_bool;
+ param_count : cardinal;
+ end;
+ zend_fcall_info = _zend_fcall_info;
+ Pzend_fcall_info = ^zend_fcall_info;
+
+
+ _zend_ast_zval = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ val : zval;
+ end;
+ zend_ast_zval = _zend_ast_zval;
+
+ _zend_ast_decl = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ start_lineno : Cardinal;
+ end_lineno : Cardinal;
+ flags : Cardinal;
+ lex_pos : Pbyte;
+ doc_comment : P_zend_string;
+ name : P_zend_string;
+ child : array[0..3] of P_zend_ast;
+ end;
+ zend_ast_decl = _zend_ast_decl;
+
+ zend_ast_process_t = procedure (ast:pzend_ast);cdecl;
+
+
+ zend_ast_apply_func = procedure (ast_ptr:pPzend_ast);cdecl;
+
+
+
+
+
+ {$IFDEF _WIN64}
+ IntPtr = Int64;
+ UIntPtr = UInt64;
+ {$ELSE}
+ IntPtr = Longint;
+ UIntPtr = LongWord;
+ {$ENDIF}
+
+
+
+ uintptr_t = Cardinal;
+
+
+ ZEND_RESULT_CODE = (SUCCESS_ = 0,FAILURE_ = -(1));
+
+ zend_intptr_t = intptr;
+
+ zend_uintptr_t = uintptr_t;
+ //zend_object_handlers = _zend_object_handlers;
+
+
+ // Pzend_function = ^zend_function;
+
+
+ Pzend_mm_page_info = ^zend_mm_page_info;
+ zend_mm_page_info = uint32_t;
+
+
+ Pzend_mm_bitset = ^zend_mm_bitset;
+ zend_mm_bitset = zend_ulong;
+
+
+
+
+
+
+
+
+ _zend_serialize_data = record end;
+
+ _zend_unserialize_data = record end;
+
+ zend_serialize_data = _zend_serialize_data;
+ zend_unserialize_data = _zend_unserialize_data;
+
+ _zend_trait_method_reference = record
+ method_name : P_zend_string;
+ ce : P_zend_class_entry;
+ class_name : P_zend_string;
+ end;
+ zend_trait_method_reference = _zend_trait_method_reference;
+
+
+ hgerhrh343erg = record
+ case longint of
+ 0 : ( ce : P_zend_class_entry );
+ 1 : ( class_name : P_zend_string );
+ end;
+ _zend_trait_precedence = record
+ trait_method : Pzend_trait_method_reference;
+ exclude_from_classes : ^hgerhrh343erg;
+ end;
+ zend_trait_precedence = _zend_trait_precedence;
+
+ _zend_trait_alias = record
+ trait_method : Pzend_trait_method_reference;
+ alias : P_zend_string;
+ modifiers : Cardinal;
+ end;
+ zend_trait_alias = _zend_trait_alias;
+
+ _zend_class_iterator_funcs = record
+ funcs : Pzend_object_iterator_funcs;
+ zf_new_iterator : P_zend_function;
+ zf_valid : P_zend_function;
+ zf_current : P_zend_function;
+ zf_key : P_zend_function;
+ zf_next : P_zend_function;
+ zf_rewind : P_zend_function;
+ end;
+ zend_class_iterator_funcs = _zend_class_iterator_funcs;
+
+ _zend_class_entry = record
+ _type : char;
+ name : P_zend_string;
+ parent : P_zend_class_entry;
+ refcount : longint;
+ ce_flags : Cardinal;
+ default_properties_count : longint;
+ default_static_members_count : longint;
+ default_properties_table : Pzval;
+ default_static_members_table : Pzval;
+ static_members_table : Pzval;
+ function_table : HashTable;
+ properties_info : HashTable;
+ constants_table : HashTable;
+ _constructor : P_zend_function;
+ _destructor : P_zend_function;
+ clone : P_zend_function;
+ __get : P_zend_function;
+ __set : P_zend_function;
+ __unset : P_zend_function;
+ __isset : P_zend_function;
+ __call : P_zend_function;
+ __callstatic : P_zend_function;
+ __tostring : P_zend_function;
+ __debugInfo : P_zend_function;
+ serialize_func : P_zend_function;
+ unserialize_func : P_zend_function;
+ iterator_funcs : zend_class_iterator_funcs;
+ create_object : function (class_type:p_zend_class_entry):P_zend_object;cdecl;
+ get_iterator : function (ce:p_zend_class_entry; _object:pzval; by_ref:longint):P_zend_object_iterator;cdecl;
+ interface_gets_implemented : function (iface:p_zend_class_entry; class_type:p_zend_class_entry):longint;cdecl;
+ get_static_method : function (ce:p_zend_class_entry; method:p_zend_string):P_zend_function;cdecl;
+ serialize : function (_object:pzval; buffer:LPBYTE; buf_len:Psize_t; data:p_zend_serialize_data):longint;cdecl;
+ unserialize : function (_object:pzval; ce:p_zend_class_entry; buf:pbyte; buf_len:size_t; data:p_zend_unserialize_data):longint;cdecl;
+ num_interfaces : Cardinal;
+ num_traits : Cardinal;
+ interfaces : ^P_zend_class_entry;
+ traits : ^P_zend_class_entry;
+ trait_aliases : ^Pzend_trait_alias;
+ trait_precedences : ^Pzend_trait_precedence;
+ info : record
+ case longint of
+ 0 : ( user : record
+ filename : P_zend_string;
+ line_start : Cardinal;
+ line_end : Cardinal;
+ doc_comment : P_zend_string;
+ end );
+ 1 : ( internal : record
+ builtin_functions : P_zend_function_entry;
+ module : P_zend_module_entry;
+ end );
+ end;
+ end;
+ zend_class_entry = _zend_class_entry;
+ TZend_class_entry = _zend_class_entry;
+
+ zend_stream_fsizer_t = function ( handle:pointer):size_t;cdecl;
+
+ zend_stream_reader_t = function ( handle:pointer; buf:zend_pchar; len:size_t):size_t;cdecl;
+
+ zend_stream_closer_t = procedure ( handle:pointer);cdecl;
+
+
+
+ // __stat64 = zend_stat_t;
+ // stat = zend_stat_t;
+
+ zend_stream_type = (ZEND_HANDLE_FILENAME,ZEND_HANDLE_FD,ZEND_HANDLE_FP,
+ ZEND_HANDLE_STREAM,ZEND_HANDLE_MAPPED);
+
+_zend_mmap = record
+ len : size_t;
+ pos : size_t;
+ map : pointer;
+ buf : zend_pchar;
+ old_handle : pointer;
+ old_closer : zend_stream_closer_t;
+end;
+ zend_mmap = _zend_mmap;
+
+ _zend_stream = record
+ handle : pointer;
+ isatty : longint;
+ mmap : zend_mmap;
+ reader : zend_stream_reader_t;
+ fsizer : zend_stream_fsizer_t;
+ closer : zend_stream_closer_t;
+ end;
+ zend_stream = _zend_stream;
+
+ PZendFileHandle = ^_zend_file_handle;
+ _zend_file_handle = record
+ handle : record
+ case longint of
+ 0 : ( fd : longint );
+ 1 : ( fp : pointer );
+ 2 : ( stream : zend_stream );
+ end;
+ filename : zend_pchar;
+ opened_path : P_zend_string;
+ _type : zend_stream_type;
+ free_filename : zend_bool;
+ end;
+ zend_file_handle = _zend_file_handle;
+
+
+ _zend_utility_functions = record
+ error_function : procedure (_type:longint; error_filename:zend_pchar; error_lineno:uint; format:zend_pchar; args:va_list);cdecl;
+ printf_function : function (format:zend_pchar):size_t;cdecl varargs;
+ write_function : function (str:zend_pchar; str_length:size_t):size_t;cdecl;
+ fopen_function : function (filename:zend_pchar; opened_path:pP_zend_string):POINTER;cdecl;
+ message_handler : procedure (message:zend_long; data:pointer);cdecl;
+ block_interruptions : procedure ;cdecl;
+ unblock_interruptions : procedure ;cdecl;
+ get_configuration_directive : function (name:p_zend_string):Pzval;cdecl;
+ ticks_function : procedure (ticks:longint);cdecl;
+ on_timeout : procedure (seconds:longint);cdecl;
+ stream_open_function : function (filename:zend_pchar; handle:pzend_file_handle):longint;cdecl;
+ vspprintf_function : function (pbuf:PPchar; max_len:size_t; format:zend_pchar; ap:va_list):size_t;cdecl;
+ vstrpprintf_function : function (max_len:size_t; format:zend_pchar; ap:va_list):P_zend_string;cdecl;
+ getenv_function : function (name:zend_pchar; name_len:size_t):zend_pchar;cdecl;
+ resolve_path_function : function (filename:zend_pchar; filename_len:longint):P_zend_string;cdecl;
+ end;
+ zend_utility_functions = _zend_utility_functions;
+
+ _zend_utility_values = record
+ import_use_extension : zend_pchar;
+ import_use_extension_length : uint;
+ html_errors : zend_bool;
+ end;
+ zend_utility_values = _zend_utility_values;
+
+ zend_write_func_t = function (str:zend_pchar; str_length:size_t):longint;cdecl;
+ zend_write_t = zend_write_func_t;
+
+ zend_error_handling_t = (EH_NORMAL = 0,EH_SUPPRESS,EH_THROW);
+
+ zend_error_handling = record
+ handling : zend_error_handling_t;
+ exception : P_zend_class_entry;
+ user_handler : zval;
+ end;
+
+
+
+
+
+
+ _znode_op = record
+ case longint of
+ 0 : ( constant : cardinal );
+ 1 : ( _var : cardinal );
+ 2 : ( num : cardinal );
+ 3 : ( opline_num : cardinal );
+ 4 : ( jmp_offset : cardinal );
+ 5 : ( zv : Pzval );
+ end;
+ znode_op = _znode_op;
+
+ _znode = record
+ op_type : zend_uchar;
+ flag : zend_uchar;
+ u : record
+ case longint of
+ 0 : ( op : znode_op );
+ 1 : ( constant : zval );
+ end;
+ end;
+ znode = _znode;
+
+ _zend_ast_znode = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ node : znode;
+ end;
+ zend_ast_znode = _zend_ast_znode;
+
+ _zend_declarables = record
+ ticks : zend_long;
+ end;
+ zend_declarables = _zend_declarables;
+
+ _zend_oparray_context = record
+ opcodes_size : Cardinal;
+ vars_size : longint;
+ literals_size : longint;
+ current_brk_cont : longint;
+ backpatch_count : longint;
+ in_finally : longint;
+ fast_call_var : Cardinal;
+ labels : PHashTable;
+ end;
+ zend_oparray_context = _zend_oparray_context;
+
+ _zend_file_context = record
+ declarables : zend_declarables;
+ implementing_class : znode;
+ current_namespace : P_zend_string;
+ in_namespace : zend_bool;
+ has_bracketed_namespaces : zend_bool;
+ imports : PHashTable;
+ imports_function : PHashTable;
+ imports_const : PHashTable;
+ end;
+ zend_file_context = _zend_file_context;
+
+ _zend_parser_stack_elem = record
+ case longint of
+ 0 : ( ast : P_zend_ast );
+ 1 : ( str : P_zend_string );
+ 2 : ( num : zend_ulong );
+ end;
+ zend_parser_stack_elem = _zend_parser_stack_elem;
+
+
+ _zend_execute_data = record
+ opline : P_zend_op;
+ call :P_zend_execute_data;
+ return_value :Pzval;
+ func : P_zend_function;
+ This : zval;
+ called_scope : P_zend_class_entry;
+ prev_execute_data :P_zend_execute_data;
+ symbol_table :P_zend_array;
+ run_time_cache : ^pointer;
+ literals : Pzval;
+ end;
+ zend_execute_data = _zend_execute_data;
+
+ user_opcode_handler_t = function (execute_data:p_zend_execute_data):longint;cdecl;
+
+ _zend_op = record
+ handler : pointer;
+ op1 : znode_op;
+ op2 : znode_op;
+ result : znode_op;
+ extended_value : Cardinal;
+ lineno : Cardinal;
+ opcode : zend_uchar;
+ op1_type : zend_uchar;
+ op2_type : zend_uchar;
+ result_type : zend_uchar;
+ end;
+ zend_op = _zend_op ;
+
+
+ _zend_brk_cont_element = record
+ start : longint;
+ cont : longint;
+ brk : longint;
+ parent : longint;
+ end;
+ zend_brk_cont_element = _zend_brk_cont_element;
+
+ _zend_label = record
+ brk_cont : longint;
+ opline_num : Cardinal;
+ end;
+ zend_label = _zend_label;
+
+ _zend_try_catch_element = record
+ try_op : Cardinal;
+ catch_op : Cardinal;
+ finally_op : Cardinal;
+ finally_end : Cardinal;
+ end;
+ zend_try_catch_element = _zend_try_catch_element;
+
+ _zend_property_info = record
+ offset : Cardinal;
+ flags : Cardinal;
+ name : P_zend_string;
+ doc_comment : P_zend_string;
+ ce : P_zend_class_entry;
+ end;
+ zend_property_info = _zend_property_info;
+
+ _zend_internal_arg_info = record
+ name : zend_pchar;
+ class_name : zend_pchar;
+ type_hint : zend_uchar;
+ pass_by_reference : zend_uchar;
+ allow_null : zend_bool;
+ is_variadic : zend_bool;
+ end;
+ zend_internal_arg_info = _zend_internal_arg_info;
+
+ _zend_arg_info = record
+ name : P_zend_string;
+ class_name : P_zend_string;
+ type_hint : zend_uchar;
+ pass_by_reference : zend_uchar;
+ allow_null : zend_bool;
+ is_variadic : zend_bool;
+ end;
+ zend_arg_info = _zend_arg_info;
+
+ _zend_internal_function_info = record
+ required_num_args : zend_uintptr_t;
+ class_name : zend_pchar;
+ type_hint : zend_uchar;
+ return_reference : zend_bool;
+ allow_null : zend_bool;
+ _is_variadic : zend_bool;
+ end;
+ zend_internal_function_info = _zend_internal_function_info;
+
+ _zend_op_array = record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_arg_info;
+ refcount : ^Cardinal;
+ this_var : Cardinal;
+ last : Cardinal;
+ opcodes : P_zend_op;
+ last_var : longint;
+ T : Cardinal;
+ vars : ^P_zend_string;
+ last_brk_cont : longint;
+ last_try_catch : longint;
+ brk_cont_array : Pzend_brk_cont_element;
+ try_catch_array : Pzend_try_catch_element;
+ static_variables : PHashTable;
+ filename : P_zend_string;
+ line_start : Cardinal;
+ line_end : Cardinal;
+ doc_comment : P_zend_string;
+ early_binding : Cardinal;
+ last_literal : longint;
+ literals : Pzval;
+ cache_size : longint;
+ run_time_cache : ^pointer;
+ reserved : array[0..3] of pointer;
+ end;
+ zend_op_array = _zend_op_array;
+
+
+ _zend_internal_function = record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_internal_arg_info;
+ handler : procedure (execute_data:p_zend_execute_data; return_value:pzval);cdecl;
+ module : P_zend_module_entry;
+ reserved : array[0..3] of pointer;
+ end;
+ tzend_internal_function = _zend_internal_function;
+
+
+
+
+ _zend_function = record
+ case longint of
+ 0 : ( _type : zend_uchar );
+ 1 : ( common : record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_arg_info;
+ end );
+ 2 : ( op_array : zend_op_array );
+ 3 : ( internal_function : tzend_internal_function );
+ end;
+
+ zend_function = _zend_function;
+
+
+
+
+ _zend_call_kind = (ZEND_CALL_NESTED_FUNCTION,ZEND_CALL_NESTED_CODE,
+ ZEND_CALL_TOP_FUNCTION,ZEND_CALL_TOP_CODE
+ );
+ zend_call_kind = _zend_call_kind;
+
+
+
+
+
+
+
+ unary_op_type = function (a:pzval; b:pzval):longint;cdecl;
+
+ binary_op_type = function (a:pzval; b:pzval; c:pzval):longint;cdecl;
+ zend_auto_global_callback = function (name:p_zend_string):zend_bool;cdecl;
+
+
+ _zend_auto_global = record
+ name : P_zend_string;
+ auto_global_callback : zend_auto_global_callback;
+ jit : zend_bool;
+ armed : zend_bool;
+ end;
+ zend_auto_global = _zend_auto_global;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HashPosition = cardinal;
+
+ _HashTableIterator = record
+ ht : PHashTable;
+ pos : HashPosition;
+ end;
+ HashTableIterator = _HashTableIterator;
+
+ _zend_object = record
+ gc : zend_refcounted_h;
+ handle : cardinal;
+ ce : P_zend_class_entry;
+ handlers : P_zend_object_handlers;
+ properties : PHashTable;
+ properties_table : array[0..0] of zval;
+ end;
+ zend_object = _zend_object;
+
+ _zend_resource = record
+ gc : zend_refcounted_h;
+ handle : longint;
+ _type : longint;
+ ptr : pointer;
+ end;
+ zend_resource = _zend_resource;
+
+ _zend_reference = record
+ gc : zend_refcounted_h;
+ val : zval;
+ end;
+ zend_reference = _zend_reference;
+
+ _zend_ast_ref = record
+ gc : zend_refcounted_h;
+ ast : P_zend_ast;
+ end;
+ zend_ast_ref = _zend_ast_ref;
+
+
+ zend_object_read_property_t = function (_object:pzval; member:pzval; _type:longint; cache_slot:ppointer; rv:pzval):Pzval;cdecl;
+
+ zend_object_read_dimension_t = function (_object:pzval; offset:pzval; _type:longint; rv:pzval):Pzval;cdecl;
+
+ zend_object_write_property_t = procedure (_object:pzval; member:pzval; value:pzval; cache_slot:ppointer);cdecl;
+
+ zend_object_write_dimension_t = procedure (_object:Pzval; offset:Pzval; value:pzval);cdecl;
+
+ zend_object_get_property_ptr_ptr_t = function (_object:Pzval; member:Pzval; _type:longint; cache_slot:pointer):Pzval;cdecl;
+
+ zend_object_set_t = procedure (_object:Pzval; value:pzval);cdecl;
+
+ zend_object_get_t = function (_object:Pzval; rv:pzval):Pzval;cdecl;
+
+ zend_object_has_property_t = function (_object:Pzval; member:Pzval; has_set_exists:longint; cache_slot:pointer):longint;cdecl;
+
+
+ zend_object_has_dimension_t = function (_object:Pzval; member:Pzval; check_empty:longint):longint;cdecl;
+
+
+ zend_object_unset_property_t = procedure (_object:Pzval; member:Pzval; cache_slot:pointer);cdecl;
+
+
+ zend_object_unset_dimension_t = procedure (_object:Pzval; offset:pzval);cdecl;
+
+
+ zend_object_get_properties_t = function (_object:pzval):PHashTable;cdecl;
+
+
+ zend_object_get_debug_info_t = function (_object:Pzval; is_temp:plongint):PHashTable;cdecl;
+
+
+
+
+ zend_object_call_method_t = function (method:P_zend_string; _object:P_zend_object; execute_data:P_zend_execute_data; return_value:pzval):longint;cdecl;
+
+ zend_object_get_method_t = function (_object:PP_zend_object; method:P_zend_string; key:pzval):P_zend_function;cdecl;
+
+ zend_object_get_constructor_t = function (_object:pzend_object):P_zend_function;cdecl;
+
+
+ zend_object_dtor_obj_t = procedure (_object:pzend_object);cdecl;
+
+ zend_object_free_obj_t = procedure (_object:pzend_object);cdecl;
+
+ zend_object_clone_obj_t = function (_object:pzval):P_zend_object;cdecl;
+
+ zend_object_get_class_name_t = function (_object:pzend_object):P_zend_string;cdecl;
+
+ zend_object_compare_t = function (object1:Pzval; object2:pzval):longint;cdecl;
+
+ zend_object_compare_zvals_t = function (resul:Pzval; op1:Pzval; op2:pzval):longint;cdecl;
+
+
+ zend_object_cast_t = function (readobj:Pzval; retval:Pzval; _type:longint):longint;cdecl;
+
+
+ zend_object_count_elements_t = function (_object:Pzval; count:pzend_long):longint;cdecl;
+
+ zend_object_get_closure_t = function (obj:Pzval; ce_ptr:PP_zend_class_entry; fptr_ptr:PP_zend_function; obj_ptr:pP_zend_object):longint;cdecl;
+
+ zend_object_get_gc_t = function (_object:Pzval; table:PPzval; n:plongint):PHashTable;cdecl;
+
+ zend_object_do_operation_t = function (opcode:zend_uchar; result:Pzval; op1:Pzval; op2:pzval):longint;cdecl;
+
+
+ _zend_stack = record
+ size : longint;
+ top : longint;
+ max : longint;
+ elements : pointer;
+ end;
+ zend_stack = _zend_stack;
+
+
+ _zend_object_handlers = record
+ offset : longint;
+ free_obj : zend_object_free_obj_t;
+ dtor_obj : zend_object_dtor_obj_t;
+ clone_obj : zend_object_clone_obj_t;
+ read_property : zend_object_read_property_t;
+ write_property : zend_object_write_property_t;
+ read_dimension : zend_object_read_dimension_t;
+ write_dimension : zend_object_write_dimension_t;
+ get_property_ptr_ptr : zend_object_get_property_ptr_ptr_t;
+ get : zend_object_get_t;
+ _set : zend_object_set_t;
+ has_property : zend_object_has_property_t;
+ unset_property : zend_object_unset_property_t;
+ has_dimension : zend_object_has_dimension_t;
+ unset_dimension : zend_object_unset_dimension_t;
+ get_properties : zend_object_get_properties_t;
+ get_method : zend_object_get_method_t;
+ call_method : zend_object_call_method_t;
+ get_constructor : zend_object_get_constructor_t;
+ get_class_name : zend_object_get_class_name_t;
+ compare_objects : zend_object_compare_t;
+ cast_object : zend_object_cast_t;
+ count_elements : zend_object_count_elements_t;
+ get_debug_info : zend_object_get_debug_info_t;
+ get_closure : zend_object_get_closure_t;
+ get_gc : zend_object_get_gc_t;
+ do_operation : zend_object_do_operation_t;
+ compare : zend_object_compare_zvals_t;
+ end;
+
+
+
+
+
+
+ _zend_object_iterator = record
+ std : zend_object;
+ data : zval;
+ funcs : Pzend_object_iterator_funcs;
+ index : zend_ulong;
+ end;
+
+
+ zend_object_iterator = _zend_object_iterator;
+ _zend_object_iterator_funcs = record
+ dtor : procedure (iter:pzend_object_iterator);cdecl;
+ valid : function (iter:pzend_object_iterator):longint;cdecl;
+ get_current_data : function (iter:pzend_object_iterator):Pzval;cdecl;
+ get_current_key : procedure (iter:P_zend_object_iterator; key:pzval);cdecl;
+ move_forward : procedure (iter:pzend_object_iterator);cdecl;
+ rewind : procedure (iter:pzend_object_iterator);cdecl;
+ invalidate_current : procedure (iter:pzend_object_iterator);cdecl;
+ end;
+ zend_object_iterator_funcs = _zend_object_iterator_funcs;
+
+
+
+ _zend_ini_parser_param = record
+ ini_parser_cb : zend_ini_parser_cb_t;
+ arg : pointer;
+ end;
+ zend_ini_parser_param = _zend_ini_parser_param;
+
+
+ _zend_module_entry = record
+ size : word;
+ zend_api : dword;
+ zend_debug : byte;
+ zts : byte;
+ ini_entry : P_zend_ini_entry;
+ deps : P_zend_module_dep;
+ name : zend_pchar;
+ functions : P_zend_function_entry;
+ module_startup_func : function (_type:longint; module_number:longint):longint;cdecl;
+ module_shutdown_func : function (_type:longint; module_number:longint):longint;cdecl;
+ request_startup_func : function (_type:longint; module_number:longint):longint;cdecl;
+ request_shutdown_func : function (_type:longint; module_number:longint):longint;cdecl;
+ info_func : procedure (zend_module:p_zend_module_entry);cdecl;
+ version : zend_pchar;
+ globals_size : size_t;
+ globals_ptr : pointer;
+ globals_ctor : procedure (global:pointer);cdecl;
+ globals_dtor : procedure (global:pointer);cdecl;
+ post_deactivate_func : function :longint;cdecl;
+ module_started : longint;
+ _type : byte;
+ handle : pointer;
+ module_number : longint;
+ build_id : zend_pchar;
+ end;
+ zend_module_entry = _zend_module_entry;
+
+
+
+
+
+ _zend_module_dep = record
+ name : zend_pchar;
+ rel : zend_pchar;
+ version : zend_pchar;
+ _type : byte;
+ end;
+
+ zend_module_dep = _zend_module_dep;
+
+ _zend_function_entry = record
+ fname : zend_pchar;
+ handler : pointer;
+ //handler: procedure (execute_data:P_zend_execute_data; return_value:Pointer);cdecl;
+ arg_info : P_zend_internal_arg_info;
+ num_args : Cardinal;
+ flags : Cardinal;
+ end;
+ zend_function_entry = _zend_function_entry;
+
+ _php_stream_context = record
+ notifier : P_php_stream_notifier;
+ options : zval;
+ res : P_zend_resource;
+ end;
+ php_stream_context = _php_stream_context ;
+ php_stream_notification_func = procedure (context:P_php_stream_context; notifycode:longint; severity:longint; xmsg:zend_pchar; xcode:longint;
+ bytes_sofar:size_t; bytes_max:size_t; ptr:pointer);cdecl;
+
+
+ _php_stream_notifier = record
+ func : php_stream_notification_func;
+ dtor : procedure (notifier:p_php_stream_notifier);
+ ptr : zval;
+ mask : longint;
+ progress : size_t;
+ progress_max : size_t;
+ end;
+
+
+
+
+
+
+
+
+
+ _php_stream_bucket = record
+ next : P_php_stream_bucket;
+ prev : P_php_stream_bucket;
+ brigade : P_php_stream_bucket_brigade;
+ buf : zend_pchar;
+ buflen : size_t;
+ own_buf : longint;
+ is_persistent : longint;
+ refcount : longint;
+ end;
+
+ _php_stream_bucket_brigade = record
+ head : P_php_stream_bucket;
+ tail : P_php_stream_bucket;
+ end;
+
+ php_stream_bucket = _php_stream_bucket ;
+ php_stream_bucket_brigade = _php_stream_bucket_brigade ;
+
+ php_stream_filter_status_t = (PSFS_ERR_FATAL,PSFS_FEED_ME,PSFS_PASS_ON
+ );
+
+
+ _php_stream_filter_chain = record
+ head : P_php_stream_filter;
+ tail : P_php_stream_filter;
+ stream : P_php_stream;
+ end;
+ php_stream_filter_chain = _php_stream_filter_chain;
+ _php_stream = record
+ ops : Pphp_stream_ops;
+ _abstract : pointer;
+ readfilters : php_stream_filter_chain;
+ writefilters : php_stream_filter_chain;
+ wrapper : P_php_stream_wrapper;
+ wrapperthis : pointer;
+ wrapperdata : zval;
+ fgetss_state : longint;
+ is_persistent : longint;
+ mode : array[0..15] of char;
+ res : P_zend_resource;
+ in_free : longint;
+ fclose_stdiocast : longint;
+ stdiocast : POINTER;
+ __exposed : longint;
+ orig_path : zend_pchar;
+ ctx : P_zend_resource;
+ flags : longint;
+ eof : longint;
+ position : zend_off_t;
+ readbuf : Pbyte;
+ readbuflen : size_t;
+ readpos : zend_off_t;
+ writepos : zend_off_t;
+ chunk_size : size_t;
+ open_filename : zend_pchar;
+ open_lineno : uint;
+ enclosing_stream : P_php_stream;
+ end;
+
+ php_stream = _php_stream ;
+ _php_stream_filter = record
+ fops : Pphp_stream_filter_ops;
+ _abstract : zval;
+ next : P_php_stream_filter;
+ prev : P_php_stream_filter;
+ is_persistent : longint;
+ chain : Pphp_stream_filter_chain;
+ buffer : php_stream_bucket_brigade;
+ res : P_zend_resource;
+ end;
+ php_stream_filter = _php_stream_filter ;
+ _php_stream_filter_ops = record
+ filter : function (stream:P_php_stream; thisfilter:P_php_stream_filter; buckets_in:P_php_stream_bucket_brigade; buckets_out:P_php_stream_bucket_brigade; bytes_consumed:Psize_t;
+ flags:longint):php_stream_filter_status_t;cdecl;
+ dtor : procedure (thisfilter:p_php_stream_filter);cdecl;
+ _label : zend_pchar;
+ end;
+ php_stream_filter_ops = _php_stream_filter_ops;
+
+
+
+
+
+ _php_stream_filter_factory = record
+ create_filter : function (filtername:zend_pchar; filterparams:Pzval; persistent:longint):P_php_stream_filter;cdecl;
+ end;
+ php_stream_filter_factory = _php_stream_filter_factory;
+
+
+
+
+
+
+ _php_stream_statbuf = record
+ sb : zend_stat_t;
+ end;
+ php_stream_statbuf = _php_stream_statbuf;
+
+ _php_stream_dirent = record
+ d_name : array[0..(256)-1] of char;
+ end;
+ php_stream_dirent = _php_stream_dirent;
+
+
+
+ _php_stream_ops = record
+ write : function (stream:P_php_stream; buf:zend_pchar; count:size_t):size_t;cdecl;
+ read : function (stream:P_php_stream; buf:zend_pchar; count:size_t):size_t;cdecl;
+ close : function (stream:P_php_stream; close_handle:longint):longint;cdecl;
+ flush : function (stream:p_php_stream):longint;cdecl;
+ _label : zend_pchar;
+ seek : function (stream:P_php_stream; offset:zend_off_t; whence:longint; newoffset:pzend_off_t):longint;cdecl;
+ cast : function (stream:P_php_stream; castas:longint; ret:ppointer):longint;cdecl;
+ stat : function (stream:P_php_stream; ssb:pphp_stream_statbuf):longint;cdecl;
+ set_option : function (stream:P_php_stream; option:longint; value:longint; ptrparam:pointer):longint;cdecl;
+ end;
+ php_stream_ops = _php_stream_ops;
+
+ _php_stream_wrapper = record
+ wops : Pphp_stream_wrapper_ops;
+ _abstract : pointer;
+ is_url : longint;
+ end;
+ php_stream_wrapper = _php_stream_wrapper ;
+
+ _php_stream_wrapper_ops = record
+ stream_opener : function (wrapper:P_php_stream_wrapper; filename:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:P_php_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream;cdecl;
+ stream_closer : function (wrapper:P_php_stream_wrapper; stream:p_php_stream):longint;cdecl;
+ stream_stat : function (wrapper:P_php_stream_wrapper; stream:P_php_stream; ssb:pphp_stream_statbuf):longint;cdecl;
+ url_stat : function (wrapper:P_php_stream_wrapper; url:zend_pchar; flags:longint; ssb:Pphp_stream_statbuf; context:pphp_stream_context):longint;cdecl;
+ dir_opener : function (wrapper:P_php_stream_wrapper; filename:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:P_php_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream;cdecl;
+ _label : zend_pchar;
+ unlink : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; context:pphp_stream_context):longint;cdecl;
+ rename : function (wrapper:P_php_stream_wrapper; url_from:zend_pchar; url_to:zend_pchar; options:longint; context:pphp_stream_context):longint;cdecl;
+ stream_mkdir : function (wrapper:P_php_stream_wrapper; url:zend_pchar; mode:longint; options:longint; context:pphp_stream_context):longint;cdecl;
+ stream_rmdir : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; context:Pphp_stream_context):longint;cdecl;
+ stream_metadata : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; value:Ppointer; context:Pphp_stream_context):longint;cdecl;
+ end;
+ php_stream_wrapper_ops = _php_stream_wrapper_ops;
+
+
+
+
+
+
+
+ sapi_header_struct = record
+ header : zend_pchar;
+ header_len : size_t;
+ end;
+
+
+
+
+ _zend_llist_element = record
+ next : P_zend_llist_element;
+ prev : P_zend_llist_element;
+ data : array[0..0] of char;
+ end;
+ zend_llist_element = _zend_llist_element;
+
+
+ llist_dtor_func_t = procedure (_para1:pointer);cdecl;
+
+ llist_compare_func_t = function (_para1:PP_zend_llist_element; _para2:PP_zend_llist_element):longint;cdecl;
+
+ llist_apply_with_args_func_t = procedure (data:Ppointer; num_args:longint; args:va_list);cdecl;
+
+ llist_apply_with_arg_func_t = procedure (data:Ppointer; arg:Ppointer);cdecl;
+
+ llist_apply_func_t = procedure (_para1:pointer);cdecl;
+
+ _zend_llist = record
+ head : Pzend_llist_element;
+ tail : Pzend_llist_element;
+ count : size_t;
+ size : size_t;
+ dtor : llist_dtor_func_t;
+ persistent : byte;
+ traverse_ptr : Pzend_llist_element;
+ end;
+ zend_llist = _zend_llist;
+
+ zend_llist_position = Pzend_llist_element;
+
+
+ sapi_headers_struct = record
+ headers : zend_llist;
+ http_response_code : longint;
+ send_default_content_type : byte;
+ mimetype : zend_pchar;
+ http_status_line : zend_pchar;
+ end;
+
+ _sapi_post_entry = record
+ content_type : zend_pchar;
+ content_type_len : uint;
+ post_reader : procedure ;cdecl;
+ post_handler : procedure (content_type_dup:zend_pchar; arg:Ppointer);cdecl;
+ end;
+ sapi_post_entry = _sapi_post_entry;
+
+
+
+ sapi_request_info = record
+ request_method : zend_pchar;
+ query_string : zend_pchar;
+ cookie_data : zend_pchar;
+ content_length : zend_long;
+ path_translated : zend_pchar;
+ request_uri : zend_pchar;
+ request_body : P_php_stream;
+ content_type : zend_pchar;
+ headers_only : zend_bool;
+ no_headers : zend_bool;
+ headers_read : zend_bool;
+ post_entry : P_sapi_post_entry;
+ content_type_dup : zend_pchar;
+ auth_user : zend_pchar;
+ auth_password : zend_pchar;
+ auth_digest : zend_pchar;
+ argv0 : zend_pchar;
+ current_user : zend_pchar;
+ current_user_length : longint;
+ argc : longint;
+ argv : ^zend_pchar;
+ proto_num : longint;
+ end;
+
+
+ _sapi_globals_struct = record
+ server_context : pointer;
+ request_info : sapi_request_info;
+ sapi_headers : sapi_headers_struct;
+ read_post_bytes : FixedUInt ;
+ post_read : byte;
+ headers_sent : byte;
+ global_stat : zend_stat_t;
+ default_mimetype : zend_pchar;
+ default_charset : zend_pchar;
+ rfc1867_uploaded_files : PHashTable;
+ post_max_size : zend_long;
+ options : longint;
+ sapi_started : zend_bool;
+ global_request_time : double;
+ known_post_content_types : HashTable;
+ callback_func : zval;
+ fci_cache : zend_fcall_info_cache;
+ end;
+ sapi_globals_struct = _sapi_globals_struct;
+
+ sapi_header_line = record
+ line : zend_pchar;
+ line_len : size_t;
+ response_code : zend_long;
+ end;
+
+
+
+
+
+ sapi_header_op_enum = (SAPI_HEADER_REPLACE,SAPI_HEADER_ADD_,SAPI_HEADER_DELETE,
+ SAPI_HEADER_DELETE_ALL,SAPI_HEADER_SET_STATUS
+ );
+
+
+ _sapi_module_struct = record
+ name : zend_pchar;
+ pretty_name : zend_pchar;
+ startup : function (sapi_module:P_sapi_module_struct):longint;cdecl;
+ shutdown : function (sapi_module:P_sapi_module_struct):longint;cdecl;
+ activate : function :longint;cdecl;
+ deactivate : function :longint;cdecl;
+ ub_write : function (str:zend_pchar; str_length:size_t):size_t;cdecl;
+ flush : procedure (server_context:Ppointer);cdecl;
+ get_stat : function :P_zend_stat_t;cdecl;
+ getenv : function (name:zend_pchar; name_len:size_t):zend_pchar;cdecl;
+ sapi_error : procedure (_type:longint; error_msg:zend_pchar);cdecl varargs;
+ header_handler : function (sapi_header:Psapi_header_struct; op:sapi_header_op_enum; sapi_headers:Psapi_headers_struct):longint;cdecl;
+ send_headers : function (sapi_headers:Psapi_headers_struct):longint;cdecl;
+ send_header : procedure (sapi_header:Psapi_header_struct; server_context:Ppointer);cdecl;
+ read_post : function (buffer:zend_pchar; count_bytes:size_t):size_t;cdecl;
+ read_cookies : function :zend_pchar;cdecl;
+ register_server_variables : procedure (track_vars_array:Pzval);cdecl;
+ log_message : procedure (message:zend_pchar);cdecl;
+ get_request_time : function :double;cdecl;
+ terminate_process : procedure ;cdecl;
+ php_ini_path_override : zend_pchar;
+ block_interruptions : procedure ;cdecl;
+ unblock_interruptions : procedure ;cdecl;
+ default_post_reader : procedure ;cdecl;
+ treat_data : procedure (arg:longint; str:zend_pchar; destArray:Pzval);cdecl;
+ executable_location : zend_pchar;
+ php_ini_ignore : longint;
+ php_ini_ignore_cwd : longint;
+ get_fd : function (fd:Plongint):longint;cdecl;
+ force_http_10 : function :longint;cdecl;
+ get_target_uid : function (_para1:Puid_t):longint;cdecl;
+ get_target_gid : function (_para1:Pgid_t):longint;cdecl;
+ input_filter : function (arg:longint; _var:zend_pchar; val:PPchar; val_len:size_t; new_val_len:Psize_t):dword;cdecl;
+ ini_defaults : procedure (configuration_hash:PHashTable);cdecl;
+ phpinfo_as_text : longint;
+ ini_entries : zend_pchar;
+ additional_functions : Pzend_function_entry;
+ input_filter_init : function :dword;cdecl;
+ end;
+ sapi_module_struct = _sapi_module_struct;
+
+
+ Ptsrm_intptr_t = ^tsrm_intptr_t;
+ Ptsrm_uintptr_t = ^tsrm_uintptr_t;
+ Pts_rsrc_id = ^ts_rsrc_id;
+
+ tsrm_intptr_t = intptr;
+ tsrm_uintptr_t = uintptr_t;
+
+
+ ts_rsrc_id = longint;
+
+ Pbeos_ben = ^beos_ben;
+ beos_ben = record
+ sem : integer;
+ ben : longint;
+ end;
+
+ ts_allocate_ctor = procedure (_para1:pointer);cdecl;
+
+ ts_allocate_dtor = procedure (_para1:pointer);cdecl;
+
+ tsrm_thread_begin_func_t = procedure (thread_id:DWORD);cdecl;
+
+ tsrm_thread_end_func_t = procedure (thread_id:DWORD);cdecl;
+
+
+
+ zend_ini_entry = _zend_ini_entry ;
+
+
+
+ _zend_arena = record
+ ptr : zend_pchar;
+ _end : zend_pchar;
+ prev : P_zend_arena;
+ end;
+ zend_arena = _zend_arena;
+ Pzend_compiler_globals = ^_zend_compiler_globals;
+ _zend_compiler_globals = record
+ loop_var_stack : zend_stack;
+ active_class_entry : P_zend_class_entry;
+ compiled_filename : P_zend_string;
+ zend_lineno : longint;
+ active_op_array : P_zend_op_array;
+ function_table : PHashTable;
+ class_table : PHashTable;
+ filenames_table : HashTable;
+ auto_globals : PHashTable;
+ parse_error : zend_bool;
+ in_compilation : zend_bool;
+ short_tags : zend_bool;
+ unclean_shutdown : zend_bool;
+ ini_parser_unbuffered_errors : zend_bool;
+ open_files : zend_llist;
+ ini_parser_param : P_zend_ini_parser_param;
+ start_lineno : uint32_t;
+ increment_lineno : zend_bool;
+ doc_comment : P_zend_string;
+ compiler_options : uint32_t;
+ const_filenames : HashTable;
+ context : zend_oparray_context;
+ file_context : zend_file_context;
+ arena : P_zend_arena;
+ empty_string : P_zend_string;
+ one_char_string : array[0..255] of P_zend_string;
+ interned_strings : HashTable;
+ script_encoding_list : PPzend_encoding;
+ script_encoding_list_size : size_t;
+ multibyte : zend_bool;
+ detect_unicode : zend_bool;
+ encoding_declared : zend_bool;
+ ast : P_zend_ast;
+ ast_arena : P_zend_arena;
+ delayed_oplines_stack : pointer;
+ static_members_table : ^Pzval;
+ last_static_member : longint;
+ end;
+
+
+ _zend_objects_store = record
+ object_buckets : ^P_zend_object;
+ top : uint32_t;
+ size : uint32_t;
+ free_list_head : longint;
+ end;
+ zend_objects_store = _zend_objects_store;
+
+ Pzend_executor_globals = ^_zend_executor_globals;
+ _zend_executor_globals = record
+ uninitialized_zval : zval;
+ error_zval : zval;
+ symtable_cache : array[0..(32)-1] of P_zend_array;
+ symtable_cache_limit : ^P_zend_array;
+ symtable_cache_ptr : ^P_zend_array;
+ symbol_table : zend_array;
+ included_files : HashTable;
+ bailout : pointer;
+ error_reporting : longint;
+ exit_status : longint;
+ function_table : PHashTable;
+ class_table : PHashTable;
+ zend_constants : PHashTable;
+ vm_stack_top : Pzval;
+ vm_stack_end : Pzval;
+ vm_stack : _zend_vm_stack;
+ current_execute_data : P_zend_execute_data;
+ scope : P_zend_class_entry;
+ precision : zend_long;
+ ticks_count : longint;
+ in_autoload : PHashTable;
+ autoload_func : P_zend_function;
+ full_tables_cleanup : zend_bool;
+ no_extensions : zend_bool;
+ timed_out : zend_bool;
+ windows_version_info : OSVERSIONINFOEX;
+ regular_list : HashTable;
+ persistent_list : HashTable;
+ user_error_handler_error_reporting : longint;
+ user_error_handler : zval;
+ user_exception_handler : zval;
+ user_error_handlers_error_reporting : zend_stack;
+ user_error_handlers : zend_stack;
+ user_exception_handlers : zend_stack;
+ error_handling : zend_error_handling_t;
+ exception_class : P_zend_class_entry;
+ timeout_seconds : zend_long;
+ lambda_count : longint;
+ ini_directives : PHashTable;
+ modified_ini_directives : PHashTable;
+ error_reporting_ini_entry : P_zend_ini_entry;
+ objects_store : zend_objects_store;
+ exception : P_zend_object;
+ prev_exception : P_zend_object;
+ opline_before_exception : P_zend_op;
+ exception_op : array[0..2] of zend_op;
+ current_module : P_zend_module_entry;
+ active : zend_bool;
+ valid_symbol_table : zend_bool;
+ assertions : zend_long;
+ ht_iterators_count : uint32_t;
+ ht_iterators_used : uint32_t;
+ ht_iterators : PHashTableIterator;
+ ht_iterators_slots : array[0..15] of HashTableIterator;
+ // saved_fpu_cw_ptr : pointer;
+ saved_fpu_cw : LONGINT;
+ trampoline : zend_function;
+ call_trampoline_op : zend_op;
+ reserved : array[0..(4)-1] of pointer;
+ end;
+
+ _zend_ini_scanner_globals = record
+ yy_in : Pzend_file_handle;
+ yy_out : Pzend_file_handle;
+ yy_leng : dword;
+ yy_start : Pbyte;
+ yy_text : Pbyte;
+ yy_cursor : Pbyte;
+ yy_marker : Pbyte;
+ yy_limit : Pbyte;
+ yy_state : longint;
+ state_stack : zend_stack;
+ filename : zend_pchar;
+ lineno : longint;
+ scanner_mode : longint;
+ end;
+
+ _zend_ptr_stack = record
+ top : longint;
+ max : longint;
+ elements : ^pointer;
+ top_element : ^pointer;
+ persistent : zend_bool;
+ end;
+ zend_ptr_stack = _zend_ptr_stack;
+
+
+
+
+ zend_encoding_filter = function (str:LPBYTE; str_length:Psize_t; buf:Pbyte; length:size_t):size_t;cdecl;
+
+ Pzend_encoding_fetcher = ^zend_encoding_fetcher;
+ zend_encoding_fetcher = function (encoding_name:zend_pchar):Pzend_encoding;cdecl;
+
+ Pzend_encoding_name_getter = ^zend_encoding_name_getter;
+ zend_encoding_name_getter = function (encoding:Pzend_encoding):zend_pchar;cdecl;
+
+ zend_encoding_lexer_compatibility_checker = function (encoding:Pzend_encoding):longint;cdecl;
+
+ zend_encoding_detector = function (_string:Pbyte; length:size_t; list:PPzend_encoding; list_size:size_t):Pzend_encoding;cdecl;
+
+ zend_encoding_converter = function (_to:LPBYTE; to_length:Psize_t; from:Pbyte; from_length:size_t; encoding_to:Pzend_encoding;
+ encoding_from:Pzend_encoding):size_t;cdecl;
+
+ zend_encoding_list_parser = function (encoding_list:zend_pchar; encoding_list_len:size_t; return_list:PPPzend_encoding; return_size:Psize_t; persistent:longint):longint;cdecl;
+
+ zend_encoding_internal_encoding_getter = function :Pzend_encoding;cdecl;
+
+ zend_encoding_internal_encoding_setter = function (encoding:Pzend_encoding):longint;cdecl;
+
+
+ _zend_multibyte_functions = record
+ provider_name : zend_pchar;
+ encoding_fetcher : zend_encoding_fetcher;
+ encoding_name_getter : zend_encoding_name_getter;
+ lexer_compatibility_checker : zend_encoding_lexer_compatibility_checker;
+ encoding_detector : zend_encoding_detector;
+ encoding_converter : zend_encoding_converter;
+ encoding_list_parser : zend_encoding_list_parser;
+ internal_encoding_getter : zend_encoding_internal_encoding_getter;
+ internal_encoding_setter : zend_encoding_internal_encoding_setter;
+ end;
+ zend_multibyte_functions = _zend_multibyte_functions;
+
+ _zend_leak_info = record
+ addr : pointer;
+ size : size_t;
+ filename : zend_pchar;
+ orig_filename : zend_pchar;
+ lineno : uint;
+ orig_lineno : uint;
+ end;
+ zend_leak_info = _zend_leak_info;
+
+
+
+ _zend_mm_debug_info = record
+ size : size_t;
+ filename : zend_pchar;
+ orig_filename : zend_pchar;
+ lineno : uint;
+ orig_lineno : uint;
+ end;
+ zend_mm_debug_info = _zend_mm_debug_info;
+
+ _zend_mm_heap = record
+ use_custom_heap : longint;
+ storage : P_zend_mm_storage;
+ size : size_t;
+ peak : size_t;
+ free_slot : array[0..(30)-1] of P_zend_mm_free_slot;
+ real_size : size_t;
+ real_peak : size_t;
+ limit : size_t;
+ overflow : longint;
+ huge_list : P_zend_mm_huge_list;
+ main_chunk : P_zend_mm_chunk;
+ cached_chunks : P_zend_mm_chunk;
+ chunks_count : longint;
+ peak_chunks_count : longint;
+ cached_chunks_count : longint;
+ avg_chunks_count : double;
+ custom_heap : record
+ case longint of
+ 0 : ( std : record
+ _malloc : function (_para1:size_t):pointer;cdecl;
+ _free : procedure (_para1:pointer);cdecl;
+ _realloc : function (_para1:pointer; _para2:size_t):pointer;cdecl;
+ end );
+ 1 : ( debug : record
+ _malloc : function (g:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer;cdecl;
+ _free : procedure (g:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint);cdecl;
+ _realloc : function (g:Ppointer; gg:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar;
+ __zend_orig_lineno:uint):pointer;cdecl;
+ end );
+ end;
+ end;
+
+
+ _zend_mm_chunk = record
+ heap : P_zend_mm_heap;
+ next : P_zend_mm_chunk;
+ prev : P_zend_mm_chunk;
+ free_pages : longint;
+ free_tail : longint;
+ num : longint;
+ reserve : array[0..(64 - (sizeof(POINTER) * 3 + sizeof(integer) * 3))] of char;
+ heap_slot : _zend_mm_heap;
+ free_map : pointer;
+ map : Pointer;
+ end;
+
+ _zend_mm_page = record
+ bytes : array[0..(4 * 1024)-1] of char;
+ end;
+
+ _zend_mm_bin = record
+ bytes : array[0..(4 * 1024*8)-1] of char;
+ end;
+
+ _zend_mm_free_slot = record
+ next_free_slot : P_zend_mm_free_slot;
+ end;
+
+
+ _zend_mm_huge_list = record
+ ptr : pointer;
+ size : size_t;
+ next : P_zend_mm_huge_list;
+ dbg : zend_mm_debug_info;
+ end;
+
+
+
+ zend_mm_chunk_alloc_t = function (storage:PPointer; size:size_t; alignment:size_t):pointer;cdecl;
+
+ zend_mm_chunk_free_t = procedure (storage:PPointer; chunk:Ppointer; size:size_t);cdecl;
+
+ zend_mm_chunk_truncate_t = function (storage:PPointer; chunk:Ppointer; old_size:size_t; new_size:size_t):longint;cdecl;
+
+ zend_mm_chunk_extend_t = function (storage:PPointer; chunk:Ppointer; old_size:size_t; new_size:size_t):longint;cdecl;
+
+
+
+ zend_mm_heap =_zend_mm_heap ;
+ _zend_mm_handlers = record
+ chunk_alloc : zend_mm_chunk_alloc_t;
+ chunk_free : zend_mm_chunk_free_t;
+ chunk_truncate : zend_mm_chunk_truncate_t;
+ chunk_extend : zend_mm_chunk_extend_t;
+ end;
+ zend_mm_handlers = _zend_mm_handlers;
+ _zend_mm_storage = record
+ handlers : zend_mm_handlers;
+ data : pointer;
+ end;
+ zend_mm_storage = _zend_mm_storage ;
+
+
+ _zend_closure = record
+ std : zend_object;
+ func : zend_function;
+ this_ptr : zval;
+ called_scope : Pzend_class_entry;
+ orig_internal_handler : procedure (var execute_data:zend_execute_data; var return_value:zval);cdecl;
+ end;
+ zend_closure = _zend_closure;
+
+
+
+ _zend_php_scanner_globals = record
+ yy_in : Pzend_file_handle;
+ yy_out : Pzend_file_handle;
+ yy_leng : dword;
+ yy_start : Pbyte;
+ yy_text : Pbyte;
+ yy_cursor : Pbyte;
+ yy_marker : Pbyte;
+ yy_limit : Pbyte;
+ yy_state : longint;
+ state_stack : zend_stack;
+ heredoc_label_stack : zend_ptr_stack;
+ script_org : Pbyte;
+ script_org_size : size_t;
+ script_filtered : Pbyte;
+ script_filtered_size : size_t;
+ input_filter : zend_encoding_filter;
+ output_filter : zend_encoding_filter;
+ script_encoding : Pzend_encoding;
+ scanned_string_len : longint;
+ on_event : procedure (event:zend_php_scanner_event; token:longint; line:longint);cdecl;
+ end;
+
+ Pzend_hash_key = ^Tzend_hash_key;
+ Tzend_hash_key = record
+ h : zend_ulong;
+ key : Pzend_string;
+ end;
+
+ Tsmart_str = record
+ s:Pzend_string;
+ a:size_t;
+ end;
+
+
+
+
+
+ Tmerge_checker_func_t = function (target_ht:PHashTable; source_data:Pzval; hash_key:Pzend_hash_key; pParam:Ppointer):zend_bool;cdecl;
+ Tapply_func_t = function (pDest:Pzval):longint;cdecl;
+ Tapply_func_arg_t = function (pDest:Pzval; argument:Ppointer):longint;cdecl;
+ Tapply_func_args_t = function (pDest:Pzval; num_args:longint; args:va_list; hash_key:Pzend_hash_key):longint;cdecl;
+
+
+
+
+
+IEJORGJIERGE = procedure (ini_entry:P_zend_ini_entry; _type:longint);
+EWKGERGJ945YG45 = procedure (_para1:size_t);
+OERGJOERJGIERGHRE = procedure (_para1:size_t);
+
+ERG4JG09E84GJ8945H45H = procedure (_para1:pointer; _para2:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint);
+EWFG439EGRG45 = procedure (_para1:pointer);
+G5J90E4GK495Y4 = procedure (_para1:pointer);
+ f584hj4i5hth = procedure (_para1:pointer);
+ KD45T5H65HTHRTH = function (element:Ppointer; arg:Ppointer):longint;
+ IEJG9458U9845Y45 = function (element:Ppointer):longint;
+ ERGERG43T4T545YH546 = function (element1:Ppointer; element2:Ppointer):longint;
+ RGEKG34I9TI3434 = function (data:Ppointer):longint;
+var
+smart_str_erealloc:procedure(str:psmart_str; len:size_t);cdecl;
+smart_str_realloc:procedure(str:psmart_str; len:size_t); cdecl;
+tsrm_set_new_thread_begin_handler:function(new_thread_begin_handler:tsrm_thread_begin_func_t):pointer; cdecl;
+tsrm_set_new_thread_end_handler:function(new_thread_end_handler:tsrm_thread_end_func_t):pointer; cdecl;
+tsrm_new_interpreter_context:function:pointer; cdecl;
+tsrm_set_interpreter_context:function(new_ctx:Ppointer):pointer; cdecl;
+tsrm_free_interpreter_context:procedure(context:Ppointer); cdecl;
+tsrm_get_ls_cache:function:pointer; cdecl;
+tsrm_error_set:procedure(level:longint; debug_filename:zend_pchar); cdecl;
+tsrm_thread_id:function:DWORD; cdecl;
+tsrm_mutex_alloc:function:pointer; cdecl;
+tsrm_mutex_free:procedure(mutexp:Ppointer); cdecl;
+tsrm_mutex_lock:function(mutexp:Ppointer):longint; cdecl;
+tsrm_mutex_unlock:function(mutexp:Ppointer):longint; cdecl;
+tsrm_startup:function(expected_threads:longint; expected_resources:longint; debug_level:longint; debug_filename:zend_pchar):longint; cdecl;
+tsrm_shutdown:procedure; cdecl;
+ts_allocate_id:function(rsrc_id:Pts_rsrc_id; size:size_t; ctor:ts_allocate_ctor; dtor:ts_allocate_dtor):ts_rsrc_id; cdecl;
+ts_resource_ex:function(id:ts_rsrc_id; th_id:pointer):pointer; cdecl;
+ts_free_thread:procedure; cdecl;
+ts_free_id:procedure(id:ts_rsrc_id); cdecl;
+php_request_startup:function:longint; cdecl;
+php_request_shutdown:procedure( dummy:pointer); cdecl;
+php_request_shutdown_for_exec:procedure(dummy:Ppointer); cdecl;
+php_module_startup:function( sf:p_sapi_module_struct; additional_modules:p_zend_module_entry; num_additional_modules:uint):longint; cdecl;
+php_module_shutdown:procedure; cdecl;
+php_module_shutdown_for_exec:procedure; cdecl;
+php_module_shutdown_wrapper:function(sapi_globals:Psapi_module_struct):longint; cdecl;
+php_request_startup_for_hook:function:longint; cdecl;
+php_request_shutdown_for_hook:procedure(dummy:Ppointer); cdecl;
+php_register_extensions:function(ptr:PP_zend_module_entry; count:longint):longint; cdecl;
+php_execute_script:function( primary_file:p_zend_file_handle):longint; cdecl;
+php_execute_simple_script:function(primary_file:Pzend_file_handle; ret:Pzval):longint; cdecl;
+php_handle_special_queries:function:longint; cdecl;
+php_lint_script:function(_file:Pzend_file_handle):longint; cdecl;
+php_handle_aborted_connection:procedure; cdecl;
+php_handle_auth_data:function(auth:zend_pchar):longint; cdecl;
+php_html_puts:procedure(str:zend_pchar; siz:size_t); cdecl;
+php_stream_open_for_zend_ex:function(filename:zend_pchar; handle:Pzend_file_handle; mode:longint):longint; cdecl;
+
+
+zend_strndup:function(s:zend_pchar; length:size_t):zend_pchar; cdecl;
+_emalloc:function(size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_emalloc:function(nmemb:size_t; size:size_t; offset:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_malloc:function(nmemb:size_t; size:size_t; offset:size_t):pointer; cdecl;
+_efree:procedure(ptr:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); cdecl;
+_ecalloc:function(nmemb:size_t; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_erealloc:function(ptr:Ppointer; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_erealloc2:function(ptr:Ppointer; size:size_t; copy_size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_erealloc:function(ptr:Ppointer; nmemb:size_t; size:size_t; offset:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_realloc:function(ptr:Ppointer; nmemb:size_t; size:size_t; offset:size_t):pointer; cdecl;
+_estrdup:function(s:zend_pchar; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):zend_pchar; cdecl;
+_estrndup:function(s:zend_pchar; length:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):zend_pchar; cdecl;
+_zend_mem_block_size:function(ptr:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_emalloc_large:function(size:size_t):pointer; cdecl;
+_emalloc_huge:function(size:size_t):pointer; cdecl;
+_efree_large:procedure(_para1:pointer; size:size_t); cdecl;
+_efree_huge:procedure(_para1:pointer; size:size_t); cdecl;
+__zend_malloc:function(len:size_t):pointer; cdecl;
+__zend_calloc:function(nmemb:size_t; len:size_t):pointer; cdecl;
+__zend_realloc:function(p:Ppointer; len:size_t):pointer; cdecl;
+zend_set_memory_limit:function(memory_limit:size_t):longint; cdecl;
+start_memory_manager:procedure; cdecl;
+shutdown_memory_manager:procedure(silent:longint; full_shutdown:longint); cdecl;
+is_zend_mm:function:longint; cdecl;
+zend_memory_usage:function(real_usage:longint):size_t; cdecl;
+zend_memory_peak_usage:function(real_usage:longint):size_t; cdecl;
+zend_mm_startup:function:P_zend_mm_heap; cdecl;
+zend_mm_shutdown:procedure(heap:P_zend_mm_heap; full_shutdown:longint; silent:longint); cdecl;
+_zend_mm_alloc:function(heap:P_zend_mm_heap; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_free:procedure(heap:P_zend_mm_heap; p:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); cdecl;
+_zend_mm_realloc:function(heap:P_zend_mm_heap; p:Ppointer; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_realloc2:function(heap:P_zend_mm_heap; p:Ppointer; size:size_t; copy_size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_block_size:function(heap:P_zend_mm_heap; p:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+zend_mm_set_heap:function(new_heap:Pzend_mm_heap):P_zend_mm_heap; cdecl;
+zend_mm_get_heap:function:P_zend_mm_heap; cdecl;
+zend_mm_gc:function(heap:Pzend_mm_heap):size_t; cdecl;
+zend_mm_is_custom_heap:function(new_heap:Pzend_mm_heap):longint; cdecl;
+
+zend_mm_get_storage:function(heap:Pzend_mm_heap):P_zend_mm_storage; cdecl;
+zend_mm_startup_ex:function(handlers:Pzend_mm_handlers; data:Ppointer; data_size:size_t):P_zend_mm_heap; cdecl;
+
+
+ zend_stack_init:function(stack:Pzend_stack; size:longint):longint;
+ zend_stack_push:function(stack:Pzend_stack; element:Ppointer):longint;
+ zend_stack_top:function(stack:Pzend_stack):pointer;
+ zend_stack_del_top:function(stack:Pzend_stack):longint;
+ zend_stack_int_top:function(stack:Pzend_stack):longint;
+ zend_stack_is_empty:function(stack:Pzend_stack):longint;
+ zend_stack_destroy:function(stack:Pzend_stack):longint;
+ zend_stack_base:function(stack:Pzend_stack):pointer;
+ zend_stack_count:function(stack:Pzend_stack):longint;
+ zend_stack_apply:procedure(stack:Pzend_stack; _type:longint; apply_function:IEJG9458U9845Y45);
+ zend_stack_apply_with_argument:procedure(stack:Pzend_stack; _type:longint; apply_function:KD45T5H65HTHRTH; arg:Ppointer);
+ zend_stack_clean:procedure(stack:Pzend_stack; func:f584hj4i5hth; free_elements:zend_bool);
+
+ zend_std_get_static_method:function(ce:P_zend_class_entry; function_name_strval:P_zend_string; key:Pzval):P_zend_function; cdecl;
+ zend_std_get_static_property:function(ce:P_zend_class_entry; property_name:P_zend_string; silent:zend_bool):Pzval; cdecl;
+ zend_std_unset_static_property:function(ce:P_zend_class_entry; property_name:P_zend_string):zend_bool; cdecl;
+ zend_std_get_constructor:function(_object:Pzend_object):P_zend_function; cdecl;
+ zend_get_property_info:function(ce:P_zend_class_entry; member:P_zend_string; silent:longint):P_zend_property_info; cdecl;
+ zend_std_get_properties:function(_object:Pzval):PHashTable; cdecl;
+ zend_std_get_debug_info:function(_object:Pzval; is_temp:Plongint):PHashTable; cdecl;
+ zend_std_cast_object_tostring:function(readobj:Pzval; writeobj:Pzval; _type:longint):longint; cdecl;
+ zend_std_write_property:procedure(_object:Pzval; member:Pzval; value:Pzval; cache_slot:Ppointer); cdecl;
+ rebuild_object_properties:procedure(zobj:Pzend_object); cdecl;
+ zend_check_private:function(fbc:P_zend_function; ce:P_zend_class_entry; function_name:Pzend_string):longint; cdecl;
+ zend_check_protected:function(ce:P_zend_class_entry; scope:Pzend_class_entry):longint; cdecl;
+ zend_check_property_access:function(zobj:P_zend_object; prop_info_name:P_zend_string):longint; cdecl;
+ zend_get_call_trampoline_func:function(ce:P_zend_class_entry; method_name:P_zend_string; is_static:longint):P_zend_function; cdecl;
+ zend_ast_create_znode:function(node:Pznode):P_zend_ast; cdecl;
+ lex_scan:function(zendlval:Pzval):longint; cdecl;
+ zend_set_compiled_filename:function(new_compiled_filename:P_zend_string):P_zend_string; cdecl;
+ zend_restore_compiled_filename:procedure(original_compiled_filename:P_zend_string); cdecl;
+ zend_get_compiled_filename:function:P_zend_string; cdecl;
+ zend_get_compiled_lineno:function:longint; cdecl;
+ zend_get_scanned_file_offset:function:size_t; cdecl;
+ zend_get_compiled_variable_name:function(op_array:P_zend_op_array; _var:Cardinal):P_zend_string; cdecl;
+ get_unary_op:function(opcode:longint):unary_op_type; cdecl;
+ get_binary_op:function(opcode:longint):binary_op_type; cdecl;
+ do_bind_function:function(op_array:P_zend_op_array; opline:P_zend_op; function_table:PHashTable; compile_time:zend_bool):longint; cdecl;
+ do_bind_class:function(op_array:P_zend_op_array; opline:P_zend_op; class_table:PHashTable; compile_time:zend_bool):P_zend_class_entry; cdecl;
+ do_bind_inherited_class:function(op_array:P_zend_op_array; opline:P_zend_op; class_table:PHashTable; parent_ce:P_zend_class_entry; compile_time:zend_bool):P_zend_class_entry; cdecl;
+ zend_do_delayed_early_binding:procedure(op_array:Pzend_op_array); cdecl;
+ function_add_ref:procedure(_function:Pzend_function); cdecl;
+ compile_file:function(file_handle:Pzend_file_handle; _type:longint):P_zend_op_array; cdecl;
+ compile_string:function(source_string:Pzval; filename:zend_pchar):P_zend_op_array; cdecl;
+ compile_filename:function(_type:longint; filename:Pzval):P_zend_op_array; cdecl;
+ zend_try_exception_handler:procedure; cdecl;
+ zend_execute_scripts:function(_type:longint; retval:Pzval; file_count:longint):longint; cdecl varargs;
+ open_file_for_scanning:function(file_handle:Pzend_file_handle):longint; cdecl;
+ init_op_array:procedure(op_array:P_zend_op_array; _type:zend_uchar; initial_ops_size:longint); cdecl;
+ destroy_op_array:procedure(op_array:Pzend_op_array); cdecl;
+ zend_destroy_file_handle:procedure(file_handle:Pzend_file_handle); cdecl;
+ zend_cleanup_user_class_data:procedure(ce:Pzend_class_entry); cdecl;
+ zend_cleanup_internal_class_data:procedure(ce:Pzend_class_entry); cdecl;
+ zend_cleanup_internal_classes:procedure; cdecl;
+ zend_cleanup_op_array_data:procedure(op_array:Pzend_op_array); cdecl;
+ clean_non_persistent_function_full:function(zv:Pzval):longint; cdecl;
+ clean_non_persistent_class_full:function(zv:Pzval):longint; cdecl;
+ destroy_zend_function:procedure(_function:Pzend_function); cdecl;
+ zend_function_dtor:procedure(zv:Pzval); cdecl;
+ destroy_zend_class:procedure(zv:Pzval); cdecl;
+ zend_mangle_property_name:function(src1:zend_pchar; src1_length:size_t; src2:zend_pchar; src2_length:size_t; internal:longint):P_zend_string; cdecl;
+ zend_unmangle_property_name_ex:function(name:Pzend_string; class_name:PPchar; prop_name:PPchar; prop_len:Psize_t):longint; cdecl;
+ pass_two:function(op_array:Pzend_op_array):longint; cdecl;
+ zend_is_compiling:function:zend_bool; cdecl;
+ zend_make_compiled_string_description:function(name:zend_pchar):zend_pchar; cdecl;
+ zend_initialize_class_data:procedure(ce:Pzend_class_entry; nullify_handlers:zend_bool); cdecl;
+ zend_get_call_op:function(init_op:zend_uchar; fbc:Pzend_function):zend_uchar; cdecl;
+ zend_register_auto_global:function(name:Pzend_string; jit:zend_bool; auto_global_callback:zend_auto_global_callback):longint; cdecl;
+ zend_activate_auto_globals:procedure; cdecl;
+ zend_is_auto_global:function(name:Pzend_string):zend_bool; cdecl;
+ zend_is_auto_global_str:function(name:zend_pchar; len:size_t):zend_bool; cdecl;
+ zend_dirname:function(path:zend_pchar; len:size_t):size_t; cdecl;
+ zend_set_function_arg_flags:procedure(func:Pzend_function); cdecl;
+ zend_assert_valid_class_name:procedure(const_name:Pzend_string); cdecl;
+ zend_ast_create_zval_ex:function(zv:Pzval; attr:zend_ast_attr):P_zend_ast; cdecl;
+ zend_ast_create_ex:function(kind:zend_ast_kind; attr:zend_ast_attr):P_zend_ast; cdecl varargs;
+ zend_ast_create:function(kind:zend_ast_kind):P_zend_ast; cdecl varargs;
+ zend_ast_create_decl:function(kind:zend_ast_kind; flags:Cardinal; start_lineno:Cardinal; doc_comment:Pzend_string; name:Pzend_string; child0:Pzend_ast; child1:Pzend_ast; child2:Pzend_ast; child3:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_create_list:function(init_children:Cardinal; kind:zend_ast_kind):P_zend_ast; cdecl varargs;
+ zend_ast_list_add:function(list:Pzend_ast; op:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_evaluate:function(result:Pzval; ast:Pzend_ast; scope:Pzend_class_entry):longint; cdecl;
+ zend_ast_export:function(prefix:zend_pchar; ast:Pzend_ast; suffix:zend_pchar):P_zend_string; cdecl;
+ zend_ast_copy:function(ast:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_destroy:procedure(ast:Pzend_ast); cdecl;
+ zend_ast_destroy_and_free:procedure(ast:Pzend_ast); cdecl;
+ zend_ast_apply:procedure(ast:Pzend_ast; fn:zend_ast_apply_func); cdecl;
+ zend_stream_open:function(filename:zend_pchar; handle:Pzend_file_handle):longint; cdecl;
+ zend_stream_fixup:function(file_handle:Pzend_file_handle; buf:PPchar; len:Psize_t):longint; cdecl;
+ zend_file_handle_dtor:procedure(fh:Pzend_file_handle); cdecl;
+ zend_compare_file_handles:function(fh1:Pzend_file_handle; fh2:Pzend_file_handle):longint; cdecl;
+ zend_startup:function(utility_functions:Pzend_utility_functions; extensions:PPchar):longint; cdecl;
+ zend_shutdown:procedure; cdecl;
+ zend_register_standard_ini_entries:procedure; cdecl;
+ zend_post_startup:procedure; cdecl;
+ zend_set_utility_values:procedure(utility_values:Pzend_utility_values); cdecl;
+ _zend_bailout:procedure(filename:zend_pchar; lineno:uint); cdecl;
+ get_zend_version:function:zend_pchar; cdecl;
+ zend_make_printable_zval:function(expr:Pzval; expr_copy:Pzval):longint; cdecl;
+ zend_print_zval:function(expr:Pzval; indent:longint):size_t; cdecl;
+ zend_print_zval_ex:function(write_func:zend_write_func_t; expr:Pzval; indent:longint):size_t; cdecl;
+ zend_print_zval_r:procedure(expr:Pzval; indent:longint); cdecl;
+ zend_print_flat_zval_r:procedure(expr:Pzval); cdecl;
+ zend_print_zval_r_ex:procedure(write_func:zend_write_func_t; expr:Pzval; indent:longint); cdecl;
+ zend_output_debug_string:procedure(trigger_break:zend_bool; format:zend_pchar); cdecl varargs;
+ zend_activate:procedure; cdecl;
+ zend_deactivate:procedure; cdecl;
+ zend_call_destructors:procedure; cdecl;
+ zend_activate_modules:procedure; cdecl;
+ zend_deactivate_modules:procedure; cdecl;
+ zend_post_deactivate_modules:procedure; cdecl;
+ free_estring:procedure(str_p:PPchar); cdecl;
+ zend_error:procedure(_type:longint; format:zend_pchar); cdecl varargs;
+ zend_throw_error:procedure(exception_ce:Pzend_class_entry; format:zend_pchar); cdecl varargs;
+ zend_type_error:procedure(format:zend_pchar); cdecl varargs;
+ zend_internal_type_error:procedure(throw_exception:zend_bool; format:zend_pchar); cdecl varargs;
+ zenderror:procedure(error:zend_pchar); cdecl;
+ zend_message_dispatcher:procedure(message:zend_long; data:Ppointer); cdecl;
+ zend_get_configuration_directive:function(name:Pzend_string):Pzval; cdecl;
+ zend_next_free_module:function:longint cdecl;
+ zend_get_parameters:function(ht:longint; param_count:longint):longint; cdecl varargs;
+ zend_get_parameters_ex:function(param_count:longint):longint; cdecl varargs;
+ ZvalGetArgs: function(Count: Integer; Args: ppzval): Integer;cdecl varargs;
+ _zend_get_parameters_array_ex:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ zend_copy_parameters_array:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ zend_parse_parameters:function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameters_ex:function(flags:longint; num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameters_throw:function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_zval_type_name:function(arg:Pzval):zend_pchar; cdecl;
+ zend_parse_method_parameters:function(num_args:longint; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_method_parameters_ex:function(flags:longint; num_args:longint; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameter:function(flags:longint; arg_num:longint; arg:Pzval; spec:zend_pchar):longint; cdecl varargs;
+ zend_register_functions:function(scope:Pzend_class_entry; functions:Pzend_function_entry; function_table:PHashTable; _type:longint):longint; cdecl;
+ zend_unregister_functions:procedure(functions:Pzend_function_entry; count:longint; function_table:PHashTable); cdecl;
+ zend_startup_module:function(module_entry:Pzend_module_entry):longint; cdecl;
+ zend_register_internal_module:function(module_entry:Pzend_module_entry):P_zend_module_entry; cdecl;
+ zend_register_module_ex:function(module:Pzend_module_entry):P_zend_module_entry; cdecl;
+ zend_startup_module_ex:function(module:Pzend_module_entry):longint; cdecl;
+ zend_startup_modules:function:longint cdecl;
+ zend_check_magic_method_implementation:procedure(ce:Pzend_class_entry; fptr:Pzend_function; error_type:longint); cdecl;
+ zend_register_internal_class:function(class_entry:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_register_internal_class_ex:function(class_entry:Pzend_class_entry; parent_ce:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_register_internal_interface:function(orig_class_entry:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_class_implements:procedure(class_entry:Pzend_class_entry; num_interfaces:longint); cdecl varargs;
+ zend_register_class_alias_ex:function(name:zend_pchar; name_len:size_t; ce:Pzend_class_entry):longint; cdecl;
+ zend_disable_function:function(function_name:zend_pchar; function_name_length:size_t):longint; cdecl;
+ zend_disable_class:function(class_name:zend_pchar; class_name_length:size_t):longint; cdecl;
+ zend_is_callable_ex:function(callable:Pzval; _object:Pzend_object; check_flags:uint; callable_name:PP_zend_string; fcc:Pzend_fcall_info_cache; error:PPchar):zend_bool; cdecl;
+ zend_is_callable:function(callable:Pzval; check_flags:uint; callable_name:PP_zend_string):zend_bool; cdecl;
+ zend_make_callable:function(callable:Pzval; callable_name:PP_zend_string):zend_bool; cdecl;
+ zend_get_module_version:function(module_name:zend_pchar):zend_pchar; cdecl;
+ zend_get_module_started:function(module_name:zend_pchar):longint; cdecl;
+ zend_declare_property_ex:function(ce:Pzend_class_entry; name:Pzend_string; _property:Pzval; access_type:longint; doc_comment:Pzend_string):longint; cdecl;
+ zend_declare_property:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; _property:Pzval; access_type:longint):longint; cdecl;
+ zend_declare_property_null:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; access_type:longint):longint; cdecl;
+ zend_declare_property_bool:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long; access_type:longint):longint; cdecl;
+ zend_declare_property_long:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long; access_type:longint):longint; cdecl;
+ zend_declare_property_double:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double; access_type:longint):longint; cdecl;
+ zend_declare_property_string:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; access_type:longint):longint; cdecl;
+ zend_declare_property_stringl:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_len:size_t; access_type:longint):longint; cdecl;
+ zend_declare_class_constant:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:Pzval):longint; cdecl;
+ zend_declare_class_constant_null:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t):longint; cdecl;
+ zend_declare_class_constant_long:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_declare_class_constant_bool:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_bool):longint; cdecl;
+ zend_declare_class_constant_double:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double):longint; cdecl;
+ zend_declare_class_constant_stringl:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t):longint; cdecl;
+ zend_declare_class_constant_string:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar):longint; cdecl;
+ zend_update_class_constants:function(class_type:Pzend_class_entry):longint; cdecl;
+ zend_update_property_ex:procedure(scope:Pzend_class_entry; _object:Pzval; name:Pzend_string; value:Pzval); cdecl;
+ zend_update_property:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:Pzval); cdecl;
+ zend_update_property_null:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t); cdecl;
+ zend_update_property_bool:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_long); cdecl;
+ zend_update_property_long:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_long); cdecl;
+ zend_update_property_double:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:double); cdecl;
+ zend_update_property_str:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:Pzend_string); cdecl;
+ zend_update_property_string:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_pchar); cdecl;
+ zend_update_property_stringl:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t); cdecl;
+ zend_update_static_property:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:Pzval):longint; cdecl;
+ zend_update_static_property_null:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t):longint; cdecl;
+ zend_update_static_property_bool:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_update_static_property_long:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_update_static_property_double:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double):longint; cdecl;
+ zend_update_static_property_string:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar):longint; cdecl;
+ zend_update_static_property_stringl:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t):longint; cdecl;
+ zend_read_property:function(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; silent:zend_bool; rv:Pzval):Pzval; cdecl;
+ zend_read_static_property:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; silent:zend_bool):Pzval; cdecl;
+ zend_get_type_by_const:function(_type:longint):zend_pchar; cdecl;
+ _array_init:function(arg:Pzval; size:Cardinal):longint; cdecl;
+ _object_init:function(arg:Pzval; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ _object_init_ex:function(arg:Pzval; ce:Pzend_class_entry; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ _object_and_properties_init:function(arg:Pzval; ce:Pzend_class_entry; properties:PHashTable; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ object_properties_init:procedure(_object:Pzend_object; class_type:Pzend_class_entry); cdecl;
+ object_properties_init_ex:procedure(_object:Pzend_object; properties:PHashTable); cdecl;
+ object_properties_load:procedure(_object:Pzend_object; properties:PHashTable); cdecl;
+ zend_merge_properties:procedure(obj:Pzval; properties:PHashTable); cdecl;
+ add_assoc_long_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; n:zend_long):longint; cdecl;
+ add_assoc_null_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t):longint; cdecl;
+ add_assoc_bool_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; b:longint):longint; cdecl;
+ add_assoc_resource_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; r:Pzend_resource):longint; cdecl;
+ add_assoc_double_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; d:double):longint; cdecl;
+ add_assoc_str_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:Pzend_string):longint; cdecl;
+ add_assoc_string_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar):longint; cdecl;
+ add_assoc_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar; length:size_t):longint; cdecl;
+ add_assoc_zval_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; value:Pzval):longint; cdecl;
+ add_index_long:function(arg:Pzval; idx:zend_ulong; n:zend_long):longint; cdecl;
+ add_index_null:function(arg:Pzval; idx:zend_ulong):longint; cdecl;
+ add_index_bool:function(arg:Pzval; idx:zend_ulong; b:longint):longint; cdecl;
+ add_index_resource:function(arg:Pzval; idx:zend_ulong; r:Pzend_resource):longint; cdecl;
+ add_index_double:function(arg:Pzval; idx:zend_ulong; d:double):longint; cdecl;
+ add_index_str:function(arg:Pzval; idx:zend_ulong; str:Pzend_string):longint; cdecl;
+ add_index_string:function(arg:Pzval; idx:zend_ulong; str:zend_pchar):longint; cdecl;
+ add_index_stringl:function(arg:Pzval; idx:zend_ulong; str:zend_pchar; length:size_t):longint; cdecl;
+ add_index_zval:function(arg:Pzval; index:zend_ulong; value:Pzval):longint; cdecl;
+ add_next_index_long:function(arg:Pzval; n:zend_long):longint; cdecl;
+ add_next_index_null:function(arg:Pzval):longint; cdecl;
+ add_next_index_bool:function(arg:Pzval; b:longint):longint; cdecl;
+ add_next_index_resource:function(arg:Pzval; r:Pzend_resource):longint; cdecl;
+ add_next_index_double:function(arg:Pzval; d:double):longint; cdecl;
+ add_next_index_str:function(arg:Pzval; str:Pzend_string):longint; cdecl;
+ add_next_index_string:function(arg:Pzval; str:zend_pchar):longint; cdecl;
+ add_next_index_stringl:function(arg:Pzval; str:zend_pchar; length:size_t):longint; cdecl;
+ add_next_index_zval:function(arg:Pzval; value:Pzval):longint; cdecl;
+ add_get_assoc_string_ex:function(arg:Pzval; key:zend_pchar; key_len:uint; str:zend_pchar):Pzval; cdecl;
+ add_get_assoc_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:uint; str:zend_pchar; length:size_t):Pzval; cdecl;
+ add_get_index_long:function(arg:Pzval; idx:zend_ulong; l:zend_long):Pzval; cdecl;
+ add_get_index_double:function(arg:Pzval; idx:zend_ulong; d:double):Pzval; cdecl;
+ add_get_index_str:function(arg:Pzval; index:zend_ulong; str:Pzend_string):Pzval; cdecl;
+ add_get_index_string:function(arg:Pzval; idx:zend_ulong; str:zend_pchar):Pzval; cdecl;
+ add_get_index_stringl:function(arg:Pzval; idx:zend_ulong; str:zend_pchar; length:size_t):Pzval; cdecl;
+ array_set_zval_key:function(ht:PHashTable; key:Pzval; value:Pzval):longint; cdecl;
+ add_property_long_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; l:zend_long):longint; cdecl;
+ add_property_null_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t):longint; cdecl;
+ add_property_bool_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; b:zend_long):longint; cdecl;
+ add_property_resource_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; r:Pzend_resource):longint; cdecl;
+ add_property_double_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; d:double):longint; cdecl;
+ add_property_str_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:Pzend_string):longint; cdecl;
+ add_property_string_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar):longint; cdecl;
+ add_property_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar; length:size_t):longint; cdecl;
+ add_property_zval_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; value:Pzval):longint; cdecl;
+ call_user_function:function(function_table:PHashTable; _object:Pzval; function_name:Pzval; retval_ptr:Pzval; param_count:Cardinal; params:Pzval):longint; cdecl;
+ call_user_function_ex:function(function_table:PHashTable; _object:Pzval; function_name:Pzval; retval_ptr:Pzval; param_count:Cardinal; params:Pzval; no_separation:longint; symbol_table:Pzend_array):longint; cdecl;
+ zend_fcall_info_init:function(callable:Pzval; check_flags:uint; fci:Pzend_fcall_info; fcc:Pzend_fcall_info_cache; callable_name:PP_zend_string; error:PPchar):longint; cdecl;
+ zend_fcall_info_args_clear:procedure(fci:Pzend_fcall_info; free_mem:longint); cdecl;
+ zend_fcall_info_args_save:procedure(fci:Pzend_fcall_info; param_count:Plongint; params:PPzval); cdecl;
+ zend_fcall_info_args_restore:procedure(fci:Pzend_fcall_info; param_count:longint; params:Pzval); cdecl;
+ zend_fcall_info_args:function(fci:Pzend_fcall_info; args:Pzval):longint; cdecl;
+ zend_fcall_info_args_ex:function(fci:Pzend_fcall_info; func:Pzend_function; args:Pzval):longint; cdecl;
+ zend_fcall_info_argp:function(fci:Pzend_fcall_info; argc:longint; argv:Pzval):longint; cdecl;
+ zend_fcall_info_argv:function(fci:Pzend_fcall_info; argc:longint; argv:pPChar):longint; cdecl;
+ zend_fcall_info_argn:function(fci:Pzend_fcall_info; argc:longint):longint; cdecl varargs;
+ zend_fcall_info_call:function(fci:Pzend_fcall_info; fcc:Pzend_fcall_info_cache; retval:Pzval; args:Pzval):longint; cdecl;
+ zend_call_function:function(fci:Pzend_fcall_info; fci_cache:Pzend_fcall_info_cache):longint; cdecl;
+ zend_set_hash_symbol:function(symbol:Pzval; name:zend_pchar; name_length:longint; is_ref:zend_bool; num_symbol_tables:longint; args:array of const):longint; cdecl;
+ zend_delete_global_variable:function(name:Pzend_string):longint; cdecl;
+ zend_rebuild_symbol_table:function:P_zend_array cdecl;
+ zend_attach_symbol_table:procedure(execute_data:P_zend_execute_data); cdecl;
+ zend_detach_symbol_table:procedure(execute_data:P_zend_execute_data); cdecl;
+ zend_set_local_var:function(name:Pzend_string; value:Pzval; force:longint):longint; cdecl;
+ zend_set_local_var_str:function(name:zend_pchar; len:size_t; value:Pzval; force:longint):longint; cdecl;
+ zend_find_alias_name:function(ce:Pzend_class_entry; name:Pzend_string):P_zend_string; cdecl;
+ zend_resolve_method_name:function(ce:Pzend_class_entry; f:Pzend_function):P_zend_string; cdecl;
+ zend_get_object_type:function(ce:Pzend_class_entry):zend_pchar; cdecl;
+ zend_wrong_paramers_count_error:procedure(num_args:longint; min_num_args:longint; max_num_args:longint); cdecl;
+ zend_wrong_paramer_type_error:procedure(num:longint; expected_type:Ppointer; arg:Pzval); cdecl;
+ zend_wrong_paramer_class_error:procedure(num:longint; name:zend_pchar; arg:Pzval); cdecl;
+ zend_wrong_callback_error:procedure(severity:longint; num:longint; error:zend_pchar); cdecl;
+ zend_parse_arg_class:function(arg:Pzval; pce:PP_zend_class_entry; num:longint; check_null:longint):longint; cdecl;
+ zend_parse_arg_bool_slow:function(arg:Pzval; dest:Pzend_bool):longint; cdecl;
+ zend_parse_arg_bool_weak:function(arg:Pzval; dest:Pzend_bool):longint; cdecl;
+ zend_parse_arg_long_slow:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_weak:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_cap_slow:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_cap_weak:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_double_slow:function(arg:Pzval; dest:Pdouble):longint; cdecl;
+ zend_parse_arg_double_weak:function(arg:Pzval; dest:Pdouble):longint; cdecl;
+ zend_parse_arg_str_slow:function(arg:Pzval; dest:PP_zend_string):longint; cdecl;
+ zend_parse_arg_str_weak:function(arg:Pzval; dest:PP_zend_string):longint; cdecl;
+ module_destructor:procedure(module:Pzend_module_entry); cdecl;
+ module_registry_request_startup:function(module:Pzend_module_entry):longint; cdecl;
+ module_registry_unload_temp:function(module:Pzend_module_entry):longint; cdecl;
+
+
+ sapi_startup:procedure( sf:p_sapi_module_struct); cdecl;
+ sapi_shutdown:procedure; cdecl;
+ sapi_activate:procedure; cdecl;
+ sapi_deactivate:procedure; cdecl;
+ sapi_initialize_empty_request:procedure; cdecl;
+ sapi_header_op:function(op:sapi_header_op_enum; arg:Ppointer):longint; cdecl;
+ sapi_add_header_ex:function(header_line:zend_pchar; header_line_len:size_t; duplicate:zend_bool; replace:zend_bool):longint; cdecl;
+ sapi_send_headers:function:longint; cdecl;
+ sapi_free_header:procedure(sapi_header:Psapi_header_struct); cdecl;
+ sapi_handle_post:procedure(arg:Ppointer); cdecl;
+ sapi_read_post_block:function(buffer:zend_pchar; buflen:size_t):size_t; cdecl;
+ sapi_register_post_entries:function(post_entry:Psapi_post_entry):longint; cdecl;
+ sapi_register_post_entry:function(post_entry:Psapi_post_entry):longint; cdecl;
+ sapi_unregister_post_entry:procedure(post_entry:Psapi_post_entry); cdecl;
+ sapi_register_default_post_reader:pointer;
+ sapi_register_treat_data:function(treat_data:pointer):longint;
+ sapi_register_input_filter:function(input_filter:pointer; input_filter_init:pointer):longint;
+ sapi_flush:function:longint; cdecl;
+ sapi_get_stat:function:P_zend_stat_t; cdecl;
+ sapi_getenv:function(name:zend_pchar; name_len:size_t):zend_pchar; cdecl;
+ sapi_get_default_content_type:function:zend_pchar; cdecl;
+ sapi_get_default_content_type_header:procedure(default_header:Psapi_header_struct); cdecl;
+ sapi_apply_default_charset:function(mimetype:PPchar; len:size_t):size_t; cdecl;
+ sapi_activate_headers_only:procedure; cdecl;
+ sapi_get_fd:function(fd:Plongint):longint; cdecl;
+ sapi_force_http_10:function:longint; cdecl;
+ sapi_get_target_uid:function(_para1:Puid_t):longint; cdecl;
+ sapi_get_target_gid:function(_para1:Pgid_t):longint; cdecl;
+ sapi_get_request_time:function:double; cdecl;
+ sapi_terminate_process:procedure; cdecl;
+_php_stream_alloc:function(ops:Pphp_stream_ops; _abstract:Ppointer; persistent_id:zend_pchar; mode:zend_pchar; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+_php_stream_tell:function(stream:Pphp_stream):zend_off_t; cdecl;
+_php_stream_read:function(stream:Pphp_stream; buf:zend_pchar; count:size_t):size_t; cdecl;
+_php_stream_write:function(stream:Pphp_stream; buf:zend_pchar; count:size_t):size_t; cdecl;
+_php_stream_fill_read_buffer:procedure(stream:Pphp_stream; size:size_t); cdecl;
+_php_stream_printf:function(stream:Pphp_stream; fmt:zend_pchar):size_t; cdecl varargs;
+_php_stream_eof:function(stream:Pphp_stream):longint; cdecl;
+_php_stream_seek:function(stream:Pphp_stream; offset:zend_off_t; whence:longint):longint; cdecl;
+_php_stream_free:function(stream:Pphp_stream; close_options:longint):longint; cdecl;
+php_stream_encloses:function(enclosing:Pphp_stream; enclosed:Pphp_stream):P_php_stream; cdecl;
+_php_stream_free_enclosed:function(stream_enclosed:Pphp_stream; close_options:longint):longint; cdecl;
+php_stream_from_persistent_id:function(persistent_id:zend_pchar; stream:PP_php_stream):longint; cdecl;
+php_file_le_stream:function:longint; cdecl;
+php_file_le_pstream:function:longint; cdecl;
+php_file_le_stream_filter:function:longint; cdecl;
+_php_stream_getc:function(stream:Pphp_stream):longint; cdecl;
+_php_stream_putc:function(stream:Pphp_stream; c:longint):longint; cdecl;
+_php_stream_flush:function(stream:Pphp_stream; closing:longint):longint; cdecl;
+_php_stream_get_line:function(stream:Pphp_stream; buf:zend_pchar; maxlen:size_t; returned_len:Psize_t):zend_pchar; cdecl;
+_php_stream_get_url_stream_wrappers_hash:function:PHashTable; cdecl;
+php_stream_get_url_stream_wrappers_hash_global:function:PHashTable; cdecl;
+_php_get_stream_filters_hash:function:PHashTable; cdecl;
+php_get_stream_filters_hash_global:function:PHashTable; cdecl;
+_php_stream_truncate_set_size:function(stream:Pphp_stream; newsize:size_t):longint; cdecl;
+_php_stream_make_seekable:function(origstream:Pphp_stream; newstream:PP_php_stream; flags:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):longint; cdecl;
+_php_stream_copy_to_stream:function(src:Pphp_stream; dest:Pphp_stream; maxlen:size_t; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_php_stream_copy_to_mem:function(src:Pphp_stream; maxlen:size_t; persistent:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_zend_string; cdecl;
+_php_stream_copy_to_stream_ex:function(src:Pphp_stream; dest:Pphp_stream; maxlen:size_t; len:Psize_t; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):longint; cdecl;
+_php_stream_passthru:function(src:Pphp_stream; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_php_stream_cast:function(stream:Pphp_stream; castas:longint; ret:Ppointer; show_err:longint):longint; cdecl;
+php_register_url_stream_wrapper:function(protocol:zend_pchar; wrapper:Pphp_stream_wrapper):longint; cdecl;
+php_unregister_url_stream_wrapper:function(protocol:zend_pchar):longint; cdecl;
+php_register_url_stream_wrapper_volatile:function(protocol:zend_pchar; wrapper:Pphp_stream_wrapper):longint; cdecl;
+php_unregister_url_stream_wrapper_volatile:function(protocol:zend_pchar):longint; cdecl;
+_php_stream_open_wrapper_ex:function(path:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:Pphp_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+php_stream_locate_url_wrapper:function(path:zend_pchar; path_for_open:PPchar; options:longint):P_php_stream_wrapper; cdecl;
+php_stream_locate_eol:function(stream:Pphp_stream; buf:Pzend_string):zend_pchar; cdecl;
+php_stream_get_record:function(stream:Pphp_stream; maxlen:size_t; delim:zend_pchar; delim_len:size_t):P_zend_string; cdecl;
+php_stream_wrapper_log_error:procedure(wrapper:Pphp_stream_wrapper; options:longint; fmt:zend_pchar); cdecl varargs;
+_php_stream_puts:function(stream:Pphp_stream; buf:zend_pchar):longint; cdecl;
+_php_stream_stat:function(stream:Pphp_stream; ssb:Pphp_stream_statbuf):longint; cdecl;
+_php_stream_stat_path:function(path:zend_pchar; flags:longint; ssb:Pphp_stream_statbuf; context:Pphp_stream_context):longint; cdecl;
+_php_stream_mkdir:function(path:zend_pchar; mode:longint; options:longint; context:Pphp_stream_context):longint; cdecl;
+_php_stream_rmdir:function(path:zend_pchar; options:longint; context:Pphp_stream_context):longint; cdecl;
+_php_stream_opendir:function(path:zend_pchar; options:longint; context:Pphp_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+_php_stream_readdir:function(dirstream:Pphp_stream; ent:Pphp_stream_dirent):Pphp_stream_dirent; cdecl;
+php_stream_dirent_alphasort:function(a:PP_zend_string; b:PP_zend_string):longint; cdecl;
+php_stream_dirent_alphasortr:function(a:PP_zend_string; b:PP_zend_string):longint; cdecl;
+ _php_stream_scandir:function(dirname:zend_pchar; namelist:PPP_zend_string; flags:longint; context:Pphp_stream_context; compare:pointer):longint;
+_php_stream_set_option:function(stream:Pphp_stream; option:longint; value:longint; ptrparam:Ppointer):longint; cdecl;
+php_stream_context_free:procedure(context:Pphp_stream_context); cdecl;
+php_stream_context_alloc:function:P_php_stream_context; cdecl;
+php_stream_context_get_option:function(context:Pphp_stream_context; wrappername:zend_pchar; optionname:zend_pchar):Pzval; cdecl;
+php_stream_context_set_option:function(context:Pphp_stream_context; wrappername:zend_pchar; optionname:zend_pchar; optionvalue:Pzval):longint; cdecl;
+php_stream_notification_alloc:function:P_php_stream_notifier; cdecl;
+php_stream_notification_free:procedure(notifier:P_php_stream_notifier); cdecl;
+php_stream_notification_notify:procedure(context:Pphp_stream_context; notifycode:longint; severity:longint; xmsg:zend_pchar; xcode:longint;
+bytes_sofar:size_t; bytes_max:size_t; ptr:Ppointer);
+php_stream_context_set:function(stream:Pphp_stream; context:Pphp_stream_context):P_php_stream_context; cdecl;
+zend_llist_init:procedure(l:Pzend_llist; size:size_t; dtor:llist_dtor_func_t; persistent:byte); cdecl;
+zend_llist_add_element:procedure(l:Pzend_llist; element:Ppointer); cdecl;
+zend_llist_prepend_element:procedure(l:Pzend_llist; element:Ppointer); cdecl;
+zend_llist_del_element:procedure(l:Pzend_llist; element:Ppointer; compare:ERGERG43T4T545YH546);
+zend_llist_destroy:procedure(l:Pzend_llist); cdecl;
+zend_llist_clean:procedure(l:Pzend_llist); cdecl;
+zend_llist_remove_tail:procedure(l:Pzend_llist); cdecl;
+zend_llist_copy:procedure(dst:Pzend_llist; src:Pzend_llist); cdecl;
+zend_llist_apply:procedure(l:Pzend_llist; func:llist_apply_func_t); cdecl;
+zend_llist_apply_with_del:procedure(l:Pzend_llist; func:RGEKG34I9TI3434); cdecl;
+zend_llist_apply_with_argument:procedure(l:Pzend_llist; func:llist_apply_with_arg_func_t; arg:Ppointer); cdecl;
+zend_llist_apply_with_arguments:procedure(l:Pzend_llist; func:llist_apply_with_args_func_t; num_args:longint); cdecl varargs;
+zend_llist_count:function(l:Pzend_llist):size_t; cdecl;
+zend_llist_sort:procedure(l:Pzend_llist; comp_func:llist_compare_func_t); cdecl;
+zend_llist_get_first_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_last_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_next_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_prev_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+php_stream_filter_register_factory:function(filterpattern:zend_pchar; factory:Pphp_stream_filter_factory):longint; cdecl;
+php_stream_filter_unregister_factory:function(filterpattern:zend_pchar):longint; cdecl;
+php_stream_filter_register_factory_volatile:function(filterpattern:zend_pchar; factory:Pphp_stream_filter_factory):longint; cdecl;
+php_stream_filter_create:function(filtername:zend_pchar; filterparams:Pzval; persistent:longint):P_php_stream_filter; cdecl;
+_php_stream_filter_prepend:procedure(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter); cdecl;
+php_stream_filter_prepend_ex:function(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter):longint; cdecl;
+_php_stream_filter_append:procedure(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter); cdecl;
+php_stream_filter_append_ex:function(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter):longint; cdecl;
+_php_stream_filter_flush:function(filter:Pphp_stream_filter; finish:longint):longint; cdecl;
+php_stream_filter_remove:function(filter:Pphp_stream_filter; call_dtor:longint):P_php_stream_filter; cdecl;
+php_stream_filter_free:procedure(filter:Pphp_stream_filter); cdecl;
+_php_stream_filter_alloc:function(fops:Pphp_stream_filter_ops; _abstract:Ppointer; persistent:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream_filter; cdecl;
+php_stream_bucket_new:function(stream:Pphp_stream; buf:zend_pchar; buflen:size_t; own_buf:longint; buf_persistent:longint):P_php_stream_bucket; cdecl;
+php_stream_bucket_split:function(_in:Pphp_stream_bucket; left:PP_php_stream_bucket; right:PP_php_stream_bucket; length:size_t):longint; cdecl;
+php_stream_bucket_delref:procedure(bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_prepend:procedure(brigade:Pphp_stream_bucket_brigade; bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_append:procedure(brigade:Pphp_stream_bucket_brigade; bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_unlink:procedure(bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_make_writeable:function(bucket:Pphp_stream_bucket):P_php_stream_bucket; cdecl;
+zend_init_execute_data:procedure(execute_data:Pzend_execute_data; op_array:Pzend_op_array; return_value:Pzval); cdecl;
+zend_create_generator_execute_data:function(call:Pzend_execute_data; op_array:Pzend_op_array; return_value:Pzval):P_zend_execute_data; cdecl;
+zend_execute:procedure(op_array:Pzend_op_array; return_value:Pzval); cdecl;
+execute_ex:procedure(execute_data:Pzend_execute_data); cdecl;
+execute_internal:procedure(execute_data:Pzend_execute_data; return_value:Pzval); cdecl;
+zend_lookup_class:function(name:Pzend_string):P_zend_class_entry; cdecl;
+zend_lookup_class_ex:function(name:Pzend_string; key:Pzval; use_autoload:longint):P_zend_class_entry; cdecl;
+zend_get_called_scope:function(ex:Pzend_execute_data):P_zend_class_entry; cdecl;
+zend_get_this_object:function(ex:Pzend_execute_data):P_zend_object; cdecl;
+zend_eval_string:function(str:zend_pchar; retval_ptr:Pzval; string_name:zend_pchar):longint; cdecl;
+zend_eval_stringl:function(str:zend_pchar; str_len:size_t; retval_ptr:Pzval; string_name:zend_pchar):longint; cdecl;
+zend_eval_string_ex:function(str:zend_pchar; retval_ptr:pzval; string_name:zend_pchar; handle_exceptions:longint):longint; cdecl;
+zend_eval_stringl_ex:function(str:zend_pchar; str_len:size_t; retval_ptr:Pzval; string_name:zend_pchar; handle_exceptions:longint):longint; cdecl;
+zval_update_constant:function(pp:Pzval; inline_change:zend_bool):longint; cdecl;
+zval_update_constant_ex:function(pp:Pzval; inline_change:zend_bool; scope:Pzend_class_entry):longint; cdecl;
+zend_vm_stack_init:procedure; cdecl;
+zend_vm_stack_destroy:procedure; cdecl;
+zend_vm_stack_extend:function(size:size_t):pointer; cdecl;
+get_active_class_name:function(space:PPchar):zend_pchar; cdecl;
+get_active_function_name:function:zend_pchar; cdecl;
+zend_get_executed_filename:function:zend_pchar; cdecl;
+zend_get_executed_filename_ex:function:P_zend_string; cdecl;
+zend_get_executed_lineno:function:uint; cdecl;
+zend_is_executing:function:zend_bool; cdecl;
+zend_set_timeout:procedure(seconds:zend_long; reset_signals:longint); cdecl;
+zend_unset_timeout:procedure; cdecl;
+zend_timeout:procedure(dummy:longint); cdecl;
+zend_fetch_class:function(class_name:Pzend_string; fetch_type:longint):P_zend_class_entry; cdecl;
+zend_fetch_class_by_name:function(class_name:Pzend_string; key:Pzval; fetch_type:longint):P_zend_class_entry; cdecl;
+zend_fetch_dimension_by_zval:procedure(result:Pzval; container:Pzval; dim:Pzval); cdecl;
+zend_fetch_dimension_by_zval_is:procedure(result:Pzval; container:Pzval; dim:Pzval; dim_type:longint); cdecl;
+EX_VAR:function(execute_data_ptr:Pzend_execute_data; _var:uint32_t):Pzval; cdecl;
+zend_set_user_opcode_handler:function(opcode:zend_uchar; handler:user_opcode_handler_t):longint; cdecl;
+zend_get_user_opcode_handler:function(opcode:zend_uchar):user_opcode_handler_t; cdecl;
+zend_get_zval_ptr:function(op_type:longint; node:Pznode_op; execute_data:Pzend_execute_data; should_free:Pzend_free_op; _type:longint):Pzval; cdecl;
+zend_clean_and_cache_symbol_table:procedure(symbol_table:Pzend_array); cdecl;
+zend_objects_store_init:procedure(objects:Pzend_objects_store; init_size:uint32_t); cdecl;
+zend_objects_store_call_destructors:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_mark_destructed:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_destroy:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_put:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_del:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_free:procedure(_object:Pzend_object); cdecl;
+zend_object_store_set_object:procedure(zobject:Pzval; _object:Pzend_object); cdecl;
+zend_object_store_ctor_failed:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_free_object_storage:procedure(objects:Pzend_objects_store); cdecl;
+zend_get_std_object_handlers:function:P_zend_object_handlers; cdecl;
+
+zend_ptr_stack_init:procedure(stack:Pzend_ptr_stack); cdecl;
+zend_ptr_stack_init_ex:procedure(stack:Pzend_ptr_stack; persistent:zend_bool); cdecl;
+zend_ptr_stack_n_push:procedure(stack:Pzend_ptr_stack; count:longint; args:array of const); cdecl;
+zend_ptr_stack_n_pop:procedure(stack:Pzend_ptr_stack; count:longint; args:array of const); cdecl;
+zend_ptr_stack_destroy:procedure(stack:Pzend_ptr_stack); cdecl;
+zend_ptr_stack_apply:procedure(stack:Pzend_ptr_stack; func:EWFG439EGRG45); cdecl;
+zend_ptr_stack_clean:procedure(stack:Pzend_ptr_stack; func:G5J90E4GK495Y4; free_elements:zend_bool); cdecl;
+zend_ptr_stack_num_elements:function(stack:Pzend_ptr_stack):longint; cdecl;
+zend_ini_startup:function:longint; cdecl;
+zend_ini_shutdown:function:longint; cdecl;
+zend_ini_global_shutdown:function:longint; cdecl;
+zend_ini_deactivate:function:longint; cdecl;
+zend_ini_dtor:procedure(ini_directives:PHashTable); cdecl;
+zend_copy_ini_directives:function:longint; cdecl;
+zend_ini_sort_entries:procedure; cdecl;
+zend_register_ini_entries:function(ini_entry:Pzend_ini_entry_def; module_number:longint):longint; cdecl;
+zend_unregister_ini_entries:procedure(module_number:longint); cdecl;
+zend_ini_refresh_caches:procedure(stage:longint); cdecl;
+zend_alter_ini_entry:function( name:zend_string; new_value:Pzend_string; modify_type:longint; stage:longint):longint; cdecl;
+zend_alter_ini_entry_ex:function(name:Pzend_string; new_value:Pzend_string; modify_type:longint; stage:longint; force_change:longint):longint; cdecl;
+zend_alter_ini_entry_chars:function(name:Pzend_string; value:Pchar; value_length:size_t; modify_type:longint; stage:longint):longint; cdecl;
+zend_alter_ini_entry_chars_ex:function(name:Pzend_string; value:Pchar; value_length:size_t; modify_type:longint; stage:longint; force_change:longint):longint; cdecl;
+zend_restore_ini_entry:function(name:Pzend_string; stage:longint):longint; cdecl;
+display_ini_entries:procedure(module:Pzend_module_entry); cdecl;
+zend_ini_long:function(name:Pchar; name_length:uint; orig:longint):zend_long; cdecl;
+zend_ini_double:function(name:Pchar; name_length:uint; orig:longint):double; cdecl;
+zend_ini_string:function(name:Pchar; name_length:uint; orig:longint):Pchar; cdecl;
+zend_ini_string_ex:function(name:Pchar; name_length:uint; orig:longint; exists:Pzend_bool):Pchar; cdecl;
+zend_ini_register_displayer:function(name:Pchar; name_length:uint; displayer:IEJORGJIERGE):longint; cdecl;
+zend_parse_ini_file:function(fh:Pzend_file_handle; unbuffered_errors:zend_bool; scanner_mode:longint; ini_parser_cb:zend_ini_parser_cb_t; arg:Ppointer):longint; cdecl;
+zend_parse_ini_string:function(str:Pchar; unbuffered_errors:zend_bool; scanner_mode:longint; ini_parser_cb:zend_ini_parser_cb_t; arg:Ppointer):longint; cdecl;
+
+
+
+_zend_hash_init:procedure(ht:PHashTable; nSize:uint32_t; pDestructor:dtor_func_t; persistent:zend_bool; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+_zend_hash_init_ex:procedure(ht:PHashTable; nSize:uint32_t; pDestructor:dtor_func_t; persistent:zend_bool; bApplyProtection:zend_bool; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+zend_hash_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_clean:procedure(ht:PHashTable); cdecl;
+zend_hash_real_init:procedure(ht:PHashTable; _packed:zend_bool); cdecl;
+zend_hash_packed_to_hash:procedure(ht:PHashTable); cdecl;
+zend_hash_to_packed:procedure(ht:PHashTable); cdecl;
+zend_hash_extend:procedure(ht:PHashTable; nSize:uint32_t; _packed:zend_bool); cdecl;
+_zend_hash_add_or_update:function(ht:PHashTable; key:Pzend_string; pData:Pzval; flag:uint32_t; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_update:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_update_ind:function(ht:PHashTable; key:Cardinal; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_add:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_add_new:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add_or_update:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; flag:uint32_t; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_update:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_update_ind:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add_new:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_index_add_or_update:function(ht:PHashTable; h:zend_ulong; pData:Pzval; flag:uint32_t):Pzval; cdecl;
+_zend_hash_index_add:function(ht:PHashTable; h:zend_ulong; pData:Pzval):Pzval; cdecl;
+_zend_hash_index_add_new:function(ht:PHashTable; h:zend_ulong; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_index_update:function(ht:PHashTable; h:zend_ulong; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_next_index_insert:function(ht:PHashTable; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_next_index_insert_new:function(ht:PHashTable; pData:zval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+zend_hash_index_add_empty_element:function(ht:PHashTable; h:zend_ulong):Pzval; cdecl;
+zend_hash_add_empty_element:function(ht:PHashTable; key:Pzend_string):Pzval; cdecl;
+zend_hash_str_add_empty_element:function(ht:PHashTable; key:Pchar; len:size_t):Pzval; cdecl;
+zend_hash_graceful_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_graceful_reverse_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_apply:procedure(ht:PHashTable; apply_func:Tapply_func_t); cdecl;
+zend_hash_apply_with_argument:procedure(ht:PHashTable; apply_func:Tapply_func_arg_t; para3:pointer); cdecl;
+zend_hash_apply_with_arguments:procedure(ht:PHashTable; apply_func:Tapply_func_args_t; para3:longint; args:array of const); cdecl;
+zend_hash_reverse_apply:procedure(ht:PHashTable; apply_func:Tapply_func_t); cdecl;
+zend_hash_del:function(ht:PHashTable; key:Pzend_string):longint; cdecl;
+zend_hash_del_ind:function(ht:PHashTable; key:Pzend_string):longint; cdecl;
+zend_hash_str_del:function(ht:PHashTable; key:Pchar; len:size_t):longint; cdecl;
+zend_hash_str_del_ind:function(ht:PHashTable; key:Pchar; len:size_t):longint; cdecl;
+zend_hash_index_del:function(ht:PHashTable; h:zend_ulong):longint; cdecl;
+zend_hash_del_bucket:procedure(ht:PHashTable; p:PBucket); cdecl;
+zend_hash_find:function(ht:PHashTable; key:Pzend_string):Pzval; cdecl;
+zend_hash_str_find:function(ht:PHashTable; key:Pchar; len:size_t):Pzval; cdecl;
+
+zend_hash_index_findZval:function( ht:pzval; h:zend_ulong):Pzval; cdecl;
+zend_symtable_findTest:function( ht:pzval; key:pzend_string):Pzval; cdecl;
+zend_hash_index_existsZval:function( ht:pzval; h:zend_ulong):zend_bool; cdecl;
+
+
+zend_hash_index_find:function(ht:PHashTable; h:zend_ulong):Pzval; cdecl;
+
+zend_hash_exists:function(ht:PHashTable; key:Pzend_string):zend_bool; cdecl;
+zend_hash_str_exists:function(ht:PHashTable; str:Pchar; len:size_t):zend_bool; cdecl;
+zend_hash_index_exists:function(ht:PHashTable; h:zend_ulong):zend_bool; cdecl;
+zend_hash_has_more_elements_ex:function(ht,pos : longint) : longint; cdecl;
+zend_hash_move_forward_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_move_backwards_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_key_ex:function(ht:PHashTable; str_index:PPzend_string; num_index:P_zend_ulong; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_key_zval_ex:procedure(ht:PHashTable; key:Pzval; pos:PHashPosition); cdecl;
+zend_hash_get_current_key_type_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_data_ex:function(ht:PHashTable; pos:PHashPosition):Pzval; cdecl;
+zend_hash_internal_pointer_reset_ex:procedure(ht:PHashTable; pos:PHashPosition); cdecl;
+zend_hash_internal_pointer_end_ex:procedure(ht:PHashTable; pos:PHashPosition); cdecl;
+zend_hash_copy:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; tmp: pointer; size: uint); cdecl;
+_zend_hash_merge:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; size:uint; overwrite:zend_bool); cdecl;
+zend_hash_merge_ex:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; pMergeSource:Tmerge_checker_func_t; pParam:Ppointer); cdecl;
+zend_hash_bucket_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_bucket_renum_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_bucket_packed_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_compare:function(ht1:PHashTable; ht2:PHashTable; compar:compare_func_t; ordered:zend_bool):longint; cdecl;
+zend_hash_sort_ex:function(ht:PHashTable; sort_func:sort_func_t; compare_func:compare_func_t; renumber:zend_bool; TSRMLS_DC: pointer):longint; cdecl;
+zend_hash_minmax:function(ht:PHashTable; compar:compare_func_t; flag:uint32_t):Pzval; cdecl;
+zend_hash_rehash:function(ht:PHashTable):longint; cdecl;
+zend_array_count:function(ht:PHashTable):uint32_t; cdecl;
+zend_array_dup:function(source:PHashTable):PHashTable; cdecl;
+zend_array_destroy:procedure(ht:PHashTable); cdecl;
+zend_symtable_clean:procedure(ht:PHashTable); cdecl;
+_zend_handle_numeric_str_ex:function(key:Pchar; length:size_t; idx:P_zend_ulong):longint; cdecl;
+zend_hash_iterator_add:function(ht:PHashTable; pos:HashPosition):uint32_t; cdecl;
+zend_hash_iterator_pos:function(idx:uint32_t; ht:PHashTable):HashPosition; cdecl;
+zend_hash_iterator_pos_ex:function(idx:uint32_t; _array:Pzval):HashPosition; cdecl;
+zend_hash_iterator_del:procedure(idx:uint32_t); cdecl;
+zend_hash_iterators_lower_pos:function(ht:PHashTable; start:HashPosition):HashPosition; cdecl;
+_zend_hash_iterators_update:procedure(ht:PHashTable; from:HashPosition; _to:HashPosition); cdecl;
+
+//tsrm_error:function(level:longint; format:zend_pchar; args:array of const):longint; cdecl;
+//zend_mm_set_custom_handlers(heap:Pzend_mm_heap; _malloc:PEWKGERGJ945YG45; _free:procedure (_para1:pointer); var _realloc:procedure :procedure(_para1:pointer; _para2:size_t)); cdecl;
+//zend_mm_get_custom_handlers(heap:Pzend_mm_heap; _malloc:PPOERGJOERJGIERGHRE; _free:Pprocedure (_para1:pointer); var _realloc:Pprocedure :procedure(_para1:pointer; _para2:size_t)); cdecl;
+//zend_mm_set_custom_debug_handlers(heap:Pzend_mm_heap; var _malloc:procedure (_para1:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); _free:procedure :procedure(_para1:pointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); _realloc:PERG4JG09E84GJ8945H45H); cdecl;
+//zend_object_create_proxy:function(_object:Pzval; member:Pzval):P_zend_object; cdecl;
+zend_check_internal_arg_type:procedure(zf:P_zend_function; arg_num:uint32_t; arg:Pzval); cdecl;
+//zend_check_arg_type:function(zf:Pzend_function; arg_num:uint32_t; arg:Pzval; default_value:Pzval; cache_slot:Ppointer):longint; cdecl;
+//zend_check_missing_arg:procedure(execute_data:Pzend_execute_data; arg_num:uint32_t; cache_slot:Ppointer); cdecl;
+
+
+add_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+sub_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+mul_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+pow_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+div_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+mod_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+boolean_xor_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+boolean_not_function:function(result:Pzval; op1:Pzval):longint; cdecl;
+bitwise_not_function:function(result:Pzval; op1:Pzval):longint; cdecl;
+bitwise_or_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+bitwise_and_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+bitwise_xor_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+shift_left_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+shift_right_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+concat_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+zend_is_identical:function(op1:Pzval; op2:Pzval):longint; cdecl;
+is_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_identical_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_not_identical_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_not_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_smaller_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_smaller_or_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+instanceof_function_ex:function(instance_ce:Pzend_class_entry; ce:Pzend_class_entry; interfaces_only:zend_bool):zend_bool; cdecl;
+instanceof_function:function(instance_ce:Pzend_class_entry; ce:Pzend_class_entry):zend_bool; cdecl;
+_is_numeric_string_ex:function(str:Pchar; length:size_t; lval:Pzend_long; dval:Pdouble; allow_errors:longint; oflow_info:Plongint):zend_uchar; cdecl;
+zend_memnstr_ex:function(haystack:Pchar; needle:Pchar; needle_len:size_t; _end:Pchar):Pchar; cdecl;
+zend_memnrstr_ex:function(haystack:Pchar; needle:Pchar; needle_len:size_t; _end:Pchar):Pchar; cdecl;
+zend_dval_to_lval_slow:function(d:double):zend_long; cdecl;
+is_numeric_str_function:function(str:Pzend_string; lval:Pzend_long; dval:Pdouble):zend_uchar; cdecl;
+increment_function:function(op1:Pzval):longint; cdecl;
+decrement_function:function(op2:Pzval):longint; cdecl;
+convert_scalar_to_number:procedure(op:Pzval); cdecl;
+_convert_to_cstring:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+_convert_to_string:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+convert_to_long:procedure(op:Pzval); cdecl;
+convert_to_double:procedure(op:Pzval); cdecl;
+convert_to_long_base:procedure(op:Pzval; base:longint); cdecl;
+convert_to_null:procedure(op:Pzval); cdecl;
+convert_to_boolean:procedure(op:Pzval); cdecl;
+convert_to_array:procedure(op:Pzval); cdecl;
+convert_to_object:procedure(op:Pzval); cdecl;
+multi_convert_to_long_ex:procedure(argc:longint; args:array of const); cdecl;
+multi_convert_to_double_ex:procedure(argc:longint; args:array of const); cdecl;
+multi_convert_to_string_ex:procedure(argc:longint; args:array of const); cdecl;
+_zval_get_long_func:function(op:Pzval):zend_long; cdecl;
+_zval_get_double_func:function(op:Pzval):double; cdecl;
+_zval_get_string_func:function(op:Pzval):Pzend_string; cdecl;
+zend_is_true:function(op:Pzval):longint; cdecl;
+zend_object_is_true:function(op:Pzval):longint; cdecl;
+compare_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+numeric_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_compare_function_ex:function(op1:Pzval; op2:Pzval; case_insensitive:zend_bool):longint; cdecl;
+string_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_case_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_locale_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+zend_str_tolower:procedure(str:Pchar; length:size_t); cdecl;
+zend_str_tolower_copy:function(dest:Pchar; source:Pchar; length:size_t):Pchar; cdecl;
+zend_str_tolower_dup:function(source:Pchar; length:size_t):Pchar; cdecl;
+zend_str_tolower_dup_ex:function(source:Pchar; length:size_t):Pchar; cdecl;
+zend_string_tolower:function(str:Pzend_string):Pzend_string; cdecl;
+zend_binary_zval_strcmp:function(s1:Pzval; s2:Pzval):longint; cdecl;
+zend_binary_zval_strncmp:function(s1:Pzval; s2:Pzval; s3:Pzval):longint; cdecl;
+zend_binary_zval_strcasecmp:function(s1:Pzval; s2:Pzval):longint; cdecl;
+zend_binary_zval_strncasecmp:function(s1:Pzval; s2:Pzval; s3:Pzval):longint; cdecl;
+zend_binary_strcmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zend_binary_strcasecmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncasecmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zend_binary_strcasecmp_l:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncasecmp_l:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zendi_smart_strcmp:function(s1:Pzend_string; s2:Pzend_string):zend_long; cdecl;
+zend_compare_symbol_tables:function(ht1:PHashTable; ht2:PHashTable):longint; cdecl;
+zend_compare_arrays:function(a1:Pzval; a2:Pzval):longint; cdecl;
+zend_compare_objects:function(o1:Pzval; o2:Pzval):longint; cdecl;
+zend_atoi:function(str:Pchar; str_len:longint):longint; cdecl;
+zend_atol:function(str:Pchar; str_len:longint):zend_long; cdecl;
+zend_locale_sprintf_double:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+zend_update_current_locale:procedure; cdecl;
+zend_long_to_str:function(num:zend_long):Pzend_string; cdecl;
+
+ZvalGetPChar:function(z:pzval):zend_pchar; cdecl;
+
+read_property22:function(elem:pzval; name:zend_pchar; flags:Integer):pzval; cdecl;
+isset_property:function(_object:pzval; property_name:zend_pchar):Integer; cdecl;
+
+
+
+lookup_class_ce:function(ce:pzend_class_entry; property_name:zend_pchar; property_length:SIZE_T):pzend_class_entry; cdecl;
+class_exists:function(class_name:zend_pchar):Integer; cdecl;
+class_exists2:function(class_name:zend_pchar):Integer; cdecl;
+update_property_zval:function(_object:pzval; property_name:zend_pchar; value:pzval):integer; cdecl;
+__create_php_object:function(classname:pzend_string; return_value:pzval; __params:pzval; argc:Integer):pzend_class_entry; cdecl;
+
+
+
+__call_function:procedure(func:pzval; argv:pzval; argc:integer);cdecl;
+safe_emalloc2:function(nmemb:size_t; size:size_t; offset:size_t):Pointer;cdecl;
+
+ZvalEmalloc:function(nmemb:size_t):pzval;cdecl;
+
+pZVAL_NEW_REF:procedure(arg1, arg2:pointer);cdecl;
+
+NewPzval:function(z:pzval):pzval;cdecl;
+
+CreateCll:function(result:pzval; class_name:zend_pchar; Self:integer):pzval;cdecl;
+
+PHPInitSetValue:procedure(name, new_value:zend_pchar; modify_type, stage:integer);cdecl;
+
+implementation
+
+
+end.
diff --git a/logos.pas b/Source/logos.pas
similarity index 97%
rename from logos.pas
rename to Source/logos.pas
index 4556e15..0732317 100644
--- a/logos.pas
+++ b/Source/logos.pas
@@ -1,1526 +1,1526 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: logos.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit logos;
-
-interface
-
-const
- CONTEXT_TYPE_IMAGE_GIF = 'Content-Type: image/gif';
-
- zend_logo: array [0..4439] of byte = (
- 71, 73, 70, 56, 57, 97, 100, 0, 58, 0,
- 247, 255, 0, 255, 255, 255, 8, 8, 8, 24,
- 24, 24, 57, 57, 57, 74, 74, 74, 90, 90,
- 90, 99, 99, 99, 123, 123, 123, 132, 132, 132,
- 140, 140, 140, 148, 148, 148, 189, 189, 189, 214,
- 214, 214, 231, 231, 231, 239, 239, 239, 90, 99,
- 99, 222, 231, 239, 57, 66, 74, 165, 173, 181,
- 0, 8, 16, 214, 222, 231, 57, 66, 82, 16,
- 33, 66, 0, 8, 24, 24, 41, 82, 222, 231,
- 255, 57, 66, 90, 198, 206, 231, 181, 189, 214,
- 99, 107, 132, 0, 8, 33, 189, 198, 231, 123,
- 132, 165, 148, 165, 231, 123, 140, 206, 123, 148,
- 239, 49, 66, 132, 24, 33, 66, 49, 74, 165,
- 214, 222, 255, 206, 214, 247, 181, 189, 222, 148,
- 156, 189, 123, 132, 173, 156, 173, 247, 132, 148,
- 214, 99, 115, 181, 49, 57, 90, 41, 49, 82,
- 90, 107, 181, 82, 99, 173, 24, 33, 74, 57,
- 82, 189, 49, 74, 173, 16, 24, 57, 8, 16,
- 49, 198, 206, 247, 181, 189, 231, 165, 173, 214,
- 99, 107, 148, 74, 82, 123, 140, 156, 239, 66,
- 74, 115, 115, 132, 222, 41, 49, 90, 57, 74,
- 165, 49, 66, 148, 49, 66, 156, 41, 57, 140,
- 57, 82, 206, 33, 49, 123, 57, 82, 214, 16,
- 24, 66, 198, 206, 255, 181, 189, 239, 189, 198,
- 255, 156, 165, 214, 140, 148, 198, 132, 140, 189,
- 115, 123, 173, 90, 99, 148, 132, 148, 247, 123,
- 140, 239, 107, 123, 214, 115, 132, 231, 57, 66,
- 115, 107, 123, 222, 115, 132, 239, 57, 66, 123,
- 99, 115, 214, 90, 107, 214, 74, 90, 181, 74,
- 90, 189, 66, 82, 173, 57, 74, 173, 49, 66,
- 165, 66, 90, 231, 49, 66, 173, 24, 33, 90,
- 41, 57, 156, 33, 49, 140, 8, 16, 66, 181,
- 189, 247, 165, 173, 231, 148, 156, 214, 132, 140,
- 198, 115, 123, 181, 82, 90, 148, 49, 57, 115,
- 99, 115, 231, 90, 107, 231, 82, 99, 214, 82,
- 99, 222, 74, 90, 206, 82, 99, 231, 66, 82,
- 189, 33, 41, 99, 57, 74, 189, 57, 74, 198,
- 57, 74, 206, 49, 66, 181, 41, 57, 165, 24,
- 33, 99, 16, 24, 82, 8, 16, 74, 173, 181,
- 247, 173, 181, 255, 165, 173, 247, 140, 148, 214,
- 156, 165, 239, 165, 173, 255, 156, 165, 247, 132,
- 140, 214, 140, 148, 231, 99, 107, 173, 107, 115,
- 189, 115, 123, 206, 123, 132, 222, 99, 107, 189,
- 82, 90, 165, 90, 99, 181, 74, 82, 156, 82,
- 90, 173, 90, 99, 189, 66, 74, 140, 57, 66,
- 140, 57, 66, 148, 41, 49, 115, 74, 90, 222,
- 74, 90, 231, 41, 49, 132, 66, 82, 222, 33,
- 41, 115, 33, 41, 123, 24, 33, 107, 24, 33,
- 123, 16, 24, 90, 148, 156, 247, 140, 148, 239,
- 132, 140, 231, 140, 148, 247, 132, 140, 239, 123,
- 132, 231, 107, 115, 206, 123, 132, 239, 123, 132,
- 247, 99, 107, 206, 99, 107, 214, 82, 90, 181,
- 90, 99, 206, 49, 57, 148, 41, 49, 148, 33,
- 41, 140, 239, 239, 247, 247, 247, 255, 198, 198,
- 206, 214, 214, 222, 173, 173, 181, 189, 189, 198,
- 148, 148, 156, 156, 156, 165, 231, 231, 247, 239,
- 239, 255, 173, 173, 189, 90, 90, 99, 231, 231,
- 255, 222, 222, 247, 140, 140, 156, 66, 66, 74,
- 132, 132, 148, 198, 198, 222, 123, 123, 140, 173,
- 173, 198, 107, 107, 123, 222, 222, 255, 57, 57,
- 66, 49, 49, 57, 156, 156, 181, 198, 198, 231,
- 140, 140, 165, 181, 181, 214, 90, 90, 107, 214,
- 214, 255, 165, 165, 198, 82, 82, 99, 123, 123,
- 148, 74, 74, 90, 115, 115, 140, 33, 33, 41,
- 99, 99, 123, 156, 156, 198, 90, 90, 115, 132,
- 132, 173, 173, 173, 231, 165, 165, 222, 24, 24,
- 33, 82, 82, 115, 156, 156, 222, 115, 115, 165,
- 57, 57, 82, 107, 107, 156, 123, 123, 181, 33,
- 33, 49, 156, 156, 231, 82, 82, 123, 49, 49,
- 74, 107, 107, 165, 74, 74, 115, 148, 148, 231,
- 57, 57, 90, 41, 41, 66, 82, 82, 132, 66,
- 66, 107, 132, 132, 214, 140, 140, 231, 99, 99,
- 165, 123, 123, 206, 66, 66, 115, 82, 82, 148,
- 123, 123, 222, 66, 66, 123, 8, 8, 16, 41,
- 41, 82, 49, 49, 99, 24, 24, 49, 41, 41,
- 90, 24, 24, 66, 8, 8, 24, 16, 16, 57,
- 8, 8, 41, 8, 8, 49, 8, 8, 57, 0,
- 0, 8, 0, 0, 16, 0, 0, 24, 0, 0,
- 0, 44, 0, 0, 0, 0, 100, 0, 58, 0,
- 0, 8, 255, 0, 255, 9, 28, 72, 176, 160,
- 193, 131, 8, 19, 42, 92, 200, 176, 161, 195,
- 135, 188, 146, 37, 131, 246, 176, 226, 193, 94,
- 188, 10, 6, 203, 104, 177, 99, 67, 99, 31,
- 140, 25, 75, 230, 177, 227, 200, 130, 39, 75,
- 170, 60, 104, 12, 87, 128, 103, 198, 40, 174,
- 108, 248, 1, 87, 193, 154, 51, 115, 10, 52,
- 198, 236, 31, 175, 15, 196, 124, 246, 58, 150,
- 17, 227, 203, 0, 2, 122, 9, 240, 121, 140,
- 232, 191, 94, 201, 130, 57, 229, 213, 148, 227,
- 63, 103, 199, 96, 218, 36, 104, 172, 89, 47,
- 140, 2, 159, 57, 19, 232, 236, 153, 206, 143,
- 199, 130, 33, 43, 118, 213, 216, 50, 96, 31,
- 4, 24, 139, 230, 204, 152, 179, 100, 198, 4,
- 240, 50, 166, 2, 88, 76, 144, 200, 144, 17,
- 53, 86, 12, 46, 69, 188, 133, 113, 114, 229,
- 11, 55, 104, 49, 14, 1, 226, 113, 56, 118,
- 150, 33, 72, 99, 207, 2, 252, 3, 70, 249,
- 222, 200, 98, 199, 122, 141, 236, 165, 226, 159,
- 138, 98, 206, 150, 113, 240, 92, 44, 192, 215,
- 211, 169, 145, 45, 93, 214, 235, 95, 128, 148,
- 3, 63, 4, 179, 13, 172, 54, 177, 145, 184,
- 140, 5, 173, 172, 176, 37, 87, 146, 255, 70,
- 23, 251, 0, 90, 119, 114, 99, 28, 158, 45,
- 197, 45, 50, 250, 210, 228, 200, 21, 15, 52,
- 254, 175, 169, 192, 99, 129, 41, 19, 255, 231,
- 103, 142, 31, 203, 158, 3, 139, 45, 227, 5,
- 19, 26, 94, 96, 204, 66, 82, 124, 187, 173,
- 236, 94, 244, 255, 150, 173, 103, 159, 177, 24,
- 178, 8, 120, 225, 183, 211, 49, 196, 224, 149,
- 76, 63, 252, 252, 6, 212, 66, 252, 152, 87,
- 145, 57, 30, 176, 132, 156, 64, 208, 112, 0,
- 82, 52, 255, 64, 163, 155, 0, 31, 44, 67,
- 33, 50, 74, 228, 128, 12, 52, 184, 85, 8,
- 24, 69, 208, 32, 35, 18, 78, 14, 254, 19,
- 82, 72, 102, 245, 211, 207, 63, 130, 49, 56,
- 163, 69, 48, 208, 115, 16, 52, 154, 17, 20,
- 0, 49, 215, 253, 131, 75, 60, 255, 108, 227,
- 141, 64, 252, 208, 163, 193, 112, 60, 22, 68,
- 204, 112, 3, 17, 3, 141, 0, 68, 182, 56,
- 37, 49, 247, 8, 116, 207, 5, 117, 89, 117,
- 80, 63, 19, 180, 248, 144, 61, 230, 204, 196,
- 15, 130, 252, 120, 83, 130, 152, 30, 177, 57,
- 80, 63, 30, 168, 224, 97, 66, 112, 186, 217,
- 208, 61, 224, 220, 168, 210, 4, 253, 204, 80,
- 142, 78, 13, 30, 196, 143, 7, 214, 96, 67,
- 103, 62, 122, 90, 196, 79, 59, 24, 204, 212,
- 79, 60, 232, 228, 3, 168, 157, 255, 240, 147,
- 143, 62, 148, 122, 224, 1, 165, 13, 149, 160,
- 205, 13, 156, 50, 228, 79, 62, 80, 72, 170,
- 83, 162, 5, 121, 80, 70, 62, 108, 242, 51,
- 65, 62, 155, 170, 255, 212, 15, 15, 226, 220,
- 224, 15, 159, 97, 226, 10, 230, 174, 97, 54,
- 24, 232, 160, 85, 156, 147, 37, 160, 168, 34,
- 233, 1, 31, 248, 120, 208, 107, 131, 23, 232,
- 147, 44, 167, 215, 228, 115, 77, 177, 72, 222,
- 144, 134, 19, 24, 224, 3, 171, 7, 247, 116,
- 219, 45, 183, 223, 198, 19, 79, 0, 174, 246,
- 67, 135, 33, 166, 2, 122, 129, 160, 249, 240,
- 177, 71, 62, 247, 140, 27, 192, 61, 250, 240,
- 161, 15, 181, 3, 221, 67, 79, 56, 229, 192,
- 96, 14, 168, 3, 241, 19, 128, 7, 108, 4,
- 98, 141, 59, 24, 216, 99, 195, 194, 12, 51,
- 76, 15, 61, 210, 114, 235, 129, 61, 46, 208,
- 17, 79, 168, 22, 249, 211, 42, 63, 55, 136,
- 161, 7, 18, 55, 72, 124, 195, 30, 72, 196,
- 202, 96, 60, 54, 148, 179, 195, 57, 155, 186,
- 26, 207, 61, 54, 72, 130, 130, 25, 138, 68,
- 194, 198, 36, 56, 231, 140, 51, 29, 98, 204,
- 96, 129, 13, 244, 76, 130, 134, 17, 218, 226,
- 235, 209, 5, 254, 20, 196, 207, 61, 248, 232,
- 145, 137, 30, 51, 148, 64, 143, 13, 30, 235,
- 67, 228, 67, 150, 142, 115, 142, 61, 19, 220,
- 35, 173, 13, 108, 120, 146, 203, 18, 158, 88,
- 49, 69, 22, 103, 79, 113, 202, 217, 169, 116,
- 65, 2, 29, 116, 44, 242, 13, 36, 249, 228,
- 179, 79, 62, 73, 43, 250, 101, 132, 72, 242,
- 255, 19, 143, 7, 72, 104, 194, 10, 17, 152,
- 96, 48, 131, 38, 152, 204, 224, 193, 197, 21,
- 45, 61, 79, 19, 240, 212, 51, 3, 6, 24,
- 24, 241, 67, 18, 174, 228, 146, 196, 18, 156,
- 115, 190, 249, 18, 130, 128, 194, 69, 23, 228,
- 152, 33, 9, 61, 209, 210, 83, 198, 13, 23,
- 152, 23, 232, 5, 30, 92, 19, 175, 140, 247,
- 132, 121, 177, 157, 253, 232, 179, 110, 131, 127,
- 95, 51, 3, 38, 171, 124, 177, 138, 17, 70,
- 168, 66, 7, 62, 215, 244, 26, 112, 131, 50,
- 226, 126, 13, 36, 213, 144, 19, 131, 36, 108,
- 64, 50, 133, 31, 185, 0, 0, 128, 43, 220,
- 111, 207, 125, 230, 126, 72, 177, 4, 14, 93,
- 248, 140, 4, 29, 152, 32, 206, 70, 21, 243,
- 200, 83, 78, 57, 219, 208, 115, 65, 60, 176,
- 75, 235, 79, 188, 189, 146, 75, 16, 63, 251,
- 232, 115, 143, 223, 250, 154, 129, 24, 44, 49,
- 4, 46, 60, 162, 17, 142, 24, 67, 61, 44,
- 128, 4, 120, 45, 235, 76, 19, 208, 212, 176,
- 12, 210, 143, 124, 96, 33, 16, 56, 240, 132,
- 41, 136, 113, 13, 1, 64, 163, 131, 83, 10,
- 161, 7, 71, 8, 141, 10, 173, 65, 18, 139,
- 64, 68, 54, 190, 145, 142, 67, 24, 129, 14,
- 51, 136, 161, 13, 22, 39, 174, 111, 105, 10,
- 92, 241, 242, 155, 175, 252, 182, 15, 36, 220,
- 205, 3, 55, 176, 128, 24, 255, 38, 65, 132,
- 24, 112, 224, 131, 196, 88, 132, 17, 48, 161,
- 135, 61, 36, 235, 30, 254, 64, 218, 61, 36,
- 72, 169, 165, 221, 192, 29, 223, 80, 70, 18,
- 130, 212, 144, 3, 228, 226, 15, 102, 248, 195,
- 33, 26, 177, 10, 34, 104, 98, 6, 72, 128,
- 88, 180, 174, 113, 13, 77, 229, 227, 6, 55,
- 88, 216, 195, 110, 208, 70, 111, 141, 235, 101,
- 251, 224, 4, 39, 98, 136, 129, 122, 16, 81,
- 8, 136, 128, 133, 102, 4, 16, 131, 49, 172,
- 34, 19, 154, 216, 195, 221, 46, 85, 55, 88,
- 5, 74, 80, 241, 200, 135, 5, 136, 48, 133,
- 36, 200, 164, 33, 3, 112, 133, 45, 146, 48,
- 10, 35, 120, 12, 19, 155, 96, 162, 24, 12,
- 103, 1, 123, 32, 97, 97, 37, 40, 193, 228,
- 48, 48, 202, 61, 76, 78, 106, 106, 236, 86,
- 62, 108, 160, 7, 77, 100, 2, 19, 153, 176,
- 4, 17, 134, 16, 132, 64, 106, 230, 26, 169,
- 192, 195, 42, 44, 161, 9, 78, 32, 161, 12,
- 251, 184, 193, 182, 254, 87, 197, 8, 218, 0,
- 3, 68, 24, 197, 53, 4, 114, 0, 90, 40,
- 64, 1, 214, 196, 102, 2, 122, 244, 143, 5,
- 0, 224, 15, 93, 152, 68, 61, 244, 64, 7,
- 75, 144, 161, 140, 150, 120, 33, 220, 198, 57,
- 78, 244, 101, 194, 8, 233, 92, 34, 220, 48,
- 144, 74, 160, 77, 13, 3, 182, 36, 3, 17,
- 86, 49, 255, 134, 47, 212, 160, 14, 63, 16,
- 228, 63, 4, 144, 5, 47, 172, 130, 137, 122,
- 68, 22, 188, 186, 165, 49, 133, 136, 139, 30,
- 208, 252, 196, 117, 24, 160, 73, 87, 120, 15,
- 0, 10, 24, 72, 1, 0, 224, 135, 57, 168,
- 179, 156, 252, 12, 131, 72, 195, 96, 130, 49,
- 8, 65, 8, 68, 72, 233, 42, 134, 240, 133,
- 48, 124, 1, 15, 97, 168, 193, 23, 136, 96,
- 137, 121, 174, 18, 19, 68, 24, 67, 30, 90,
- 234, 133, 158, 210, 32, 160, 154, 129, 70, 22,
- 194, 64, 4, 158, 113, 130, 100, 250, 192, 155,
- 140, 16, 148, 16, 129, 121, 109, 18, 159, 176,
- 69, 1, 8, 64, 0, 6, 36, 193, 15, 75,
- 224, 158, 50, 100, 209, 35, 1, 52, 64, 25,
- 169, 136, 196, 11, 49, 161, 203, 49, 132, 1,
- 15, 115, 136, 195, 35, 82, 193, 5, 60, 224,
- 161, 167, 117, 240, 66, 29, 236, 96, 135, 59,
- 164, 53, 21, 143, 216, 66, 35, 134, 64, 4,
- 156, 97, 2, 158, 121, 16, 41, 30, 234, 192,
- 133, 84, 164, 226, 13, 63, 104, 192, 32, 181,
- 16, 6, 98, 138, 225, 168, 253, 83, 214, 163,
- 152, 218, 212, 123, 148, 128, 17, 202, 88, 2,
- 10, 114, 193, 89, 63, 68, 97, 9, 0, 56,
- 65, 18, 134, 49, 16, 90, 184, 226, 10, 38,
- 176, 4, 206, 140, 144, 83, 19, 112, 225, 16,
- 211, 136, 192, 147, 152, 241, 4, 45, 255, 20,
- 225, 8, 69, 200, 130, 26, 180, 112, 132, 31,
- 104, 195, 25, 79, 170, 64, 52, 92, 224, 5,
- 33, 68, 66, 8, 47, 29, 108, 29, 70, 225,
- 4, 102, 12, 131, 24, 195, 152, 70, 44, 130,
- 154, 133, 47, 212, 84, 12, 123, 80, 100, 200,
- 226, 209, 60, 78, 249, 45, 31, 116, 168, 6,
- 14, 78, 225, 136, 69, 40, 34, 11, 109, 16,
- 196, 38, 205, 48, 139, 129, 16, 0, 0, 102,
- 224, 66, 95, 233, 48, 9, 18, 32, 247, 17,
- 29, 224, 162, 64, 152, 33, 2, 74, 180, 161,
- 25, 241, 56, 70, 19, 6, 96, 16, 1, 116,
- 96, 11, 255, 164, 171, 29, 226, 192, 4, 3,
- 112, 83, 32, 93, 29, 170, 37, 244, 128, 93,
- 146, 193, 138, 187, 143, 106, 230, 196, 214, 144,
- 132, 63, 160, 226, 164, 65, 208, 130, 25, 132,
- 225, 7, 65, 80, 96, 154, 3, 109, 64, 46,
- 74, 225, 5, 44, 76, 130, 172, 95, 152, 67,
- 58, 182, 114, 16, 98, 84, 163, 52, 182, 185,
- 218, 65, 162, 17, 135, 34, 220, 246, 13, 41,
- 240, 146, 65, 160, 97, 138, 26, 212, 116, 15,
- 144, 213, 135, 7, 118, 69, 89, 131, 44, 45,
- 31, 51, 88, 135, 25, 112, 80, 8, 68, 168,
- 227, 15, 73, 232, 195, 21, 212, 107, 128, 129,
- 40, 0, 0, 75, 40, 69, 28, 186, 16, 132,
- 71, 152, 226, 19, 228, 216, 141, 64, 226, 97,
- 128, 4, 32, 32, 255, 40, 1, 136, 5, 10,
- 40, 64, 128, 130, 16, 32, 1, 9, 192, 15,
- 63, 156, 112, 132, 75, 196, 161, 15, 248, 129,
- 70, 48, 20, 16, 140, 32, 9, 64, 11, 214,
- 213, 68, 133, 241, 161, 100, 127, 112, 247, 145,
- 78, 134, 147, 13, 230, 97, 8, 52, 152, 193,
- 12, 125, 72, 135, 35, 226, 224, 7, 87, 112,
- 85, 32, 196, 216, 222, 85, 253, 208, 135, 68,
- 252, 128, 173, 77, 232, 17, 47, 24, 144, 1,
- 205, 66, 160, 154, 56, 176, 130, 39, 40, 64,
- 96, 219, 208, 98, 108, 56, 104, 197, 116, 5,
- 130, 11, 55, 92, 34, 20, 18, 24, 136, 1,
- 40, 176, 1, 28, 216, 162, 1, 5, 160, 144,
- 41, 172, 107, 84, 69, 42, 25, 195, 77, 118,
- 114, 0, 250, 225, 53, 123, 204, 67, 156, 154,
- 216, 130, 25, 92, 161, 139, 225, 4, 224, 21,
- 218, 115, 69, 6, 250, 112, 138, 26, 212, 128,
- 6, 90, 232, 242, 63, 136, 225, 128, 64, 248,
- 186, 18, 159, 64, 1, 14, 220, 0, 6, 48,
- 4, 130, 22, 2, 33, 192, 18, 172, 64, 137,
- 74, 80, 1, 5, 25, 29, 168, 40, 42, 145,
- 3, 153, 48, 99, 3, 87, 168, 4, 37, 172,
- 128, 3, 197, 14, 84, 194, 154, 192, 64, 118,
- 35, 203, 221, 71, 51, 200, 101, 23, 160, 135,
- 17, 216, 161, 12, 205, 97, 72, 32, 193, 8,
- 119, 18, 72, 81, 4, 185, 114, 193, 20, 104,
- 255, 144, 137, 2, 62, 144, 182, 44, 200, 65,
- 14, 112, 0, 195, 37, 46, 209, 134, 93, 228,
- 91, 20, 245, 190, 4, 37, 164, 0, 129, 171,
- 165, 193, 10, 183, 128, 48, 7, 124, 61, 243,
- 75, 80, 129, 2, 65, 77, 69, 99, 233, 128,
- 100, 39, 42, 121, 169, 209, 174, 108, 61, 92,
- 96, 134, 19, 152, 161, 19, 77, 24, 136, 0,
- 28, 224, 10, 18, 183, 129, 176, 113, 240, 47,
- 1, 184, 25, 128, 178, 151, 29, 26, 33, 184,
- 132, 204, 213, 238, 6, 155, 255, 131, 0, 35,
- 152, 121, 191, 229, 128, 130, 90, 175, 96, 4,
- 1, 231, 69, 40, 212, 206, 247, 43, 8, 84,
- 0, 203, 46, 234, 99, 157, 173, 172, 71, 99,
- 140, 31, 54, 192, 130, 33, 206, 144, 229, 40,
- 148, 34, 10, 164, 21, 72, 44, 92, 177, 132,
- 78, 148, 66, 10, 140, 95, 66, 20, 164, 32,
- 100, 130, 8, 160, 26, 107, 151, 121, 27, 18,
- 144, 111, 82, 168, 93, 230, 149, 88, 66, 157,
- 255, 177, 130, 30, 32, 64, 32, 5, 104, 131,
- 204, 103, 47, 10, 129, 10, 245, 11, 47, 60,
- 234, 30, 86, 181, 56, 4, 69, 189, 32, 253,
- 192, 64, 19, 86, 152, 142, 31, 156, 162, 13,
- 109, 216, 129, 123, 1, 96, 11, 206, 157, 64,
- 24, 202, 16, 134, 43, 146, 16, 138, 206, 107,
- 253, 12, 106, 127, 185, 27, 174, 224, 118, 2,
- 72, 129, 18, 148, 224, 187, 255, 18, 86, 223,
- 122, 210, 251, 196, 215, 179, 55, 250, 223, 171,
- 251, 194, 236, 42, 116, 201, 221, 69, 72, 60,
- 110, 0, 133, 38, 184, 163, 10, 144, 112, 196,
- 90, 219, 160, 142, 235, 4, 128, 1, 218, 195,
- 124, 87, 245, 7, 125, 80, 11, 40, 16, 10,
- 178, 16, 11, 215, 129, 0, 177, 208, 128, 177,
- 176, 0, 125, 32, 7, 200, 87, 9, 96, 208,
- 118, 55, 151, 126, 151, 96, 6, 228, 23, 10,
- 177, 32, 16, 2, 240, 3, 51, 71, 123, 72,
- 55, 80, 169, 48, 4, 158, 52, 3, 72, 197,
- 45, 59, 36, 40, 212, 118, 14, 58, 208, 14,
- 51, 80, 5, 141, 176, 127, 165, 128, 31, 8,
- 176, 61, 2, 120, 2, 182, 80, 104, 2, 32,
- 1, 161, 48, 2, 102, 160, 110, 5, 96, 117,
- 75, 96, 6, 75, 48, 8, 161, 112, 5, 107,
- 87, 115, 249, 38, 5, 124, 167, 118, 26, 40,
- 16, 43, 112, 116, 87, 19, 13, 49, 199, 119,
- 84, 0, 1, 65, 245, 8, 145, 64, 7, 24,
- 128, 4, 72, 160, 100, 247, 64, 89, 110, 194,
- 60, 215, 112, 14, 213, 176, 14, 238, 112, 8,
- 234, 224, 9, 81, 48, 8, 108, 145, 111, 1,
- 200, 124, 39, 160, 61, 201, 246, 15, 180, 48,
- 8, 143, 183, 0, 3, 17, 12, 74, 112, 5,
- 110, 208, 6, 82, 64, 13, 221, 32, 7, 106,
- 55, 122, 55, 87, 116, 50, 55, 126, 2, 65,
- 13, 116, 255, 103, 126, 252, 176, 3, 68, 39,
- 7, 103, 96, 126, 132, 100, 4, 245, 128, 4,
- 140, 54, 134, 190, 98, 35, 55, 240, 4, 214,
- 128, 3, 40, 160, 12, 186, 32, 12, 181, 112,
- 73, 4, 16, 12, 6, 160, 138, 170, 184, 138,
- 50, 113, 107, 202, 208, 113, 119, 248, 15, 222,
- 16, 12, 218, 192, 13, 117, 22, 15, 210, 0,
- 7, 151, 96, 129, 111, 39, 10, 69, 167, 118,
- 125, 176, 122, 212, 112, 9, 61, 208, 10, 80,
- 18, 1, 59, 0, 2, 191, 16, 121, 235, 22,
- 3, 147, 48, 3, 16, 83, 59, 24, 179, 63,
- 150, 50, 3, 88, 224, 8, 136, 64, 8, 133,
- 208, 1, 21, 65, 11, 39, 240, 7, 161, 240,
- 9, 27, 0, 37, 67, 150, 13, 148, 160, 5,
- 110, 199, 11, 137, 64, 87, 113, 112, 4, 71,
- 16, 133, 255, 0, 2, 151, 0, 7, 31, 240,
- 10, 250, 69, 16, 241, 80, 12, 93, 128, 9,
- 22, 32, 59, 58, 134, 53, 93, 51, 75, 208,
- 164, 6, 22, 65, 11, 61, 64, 3, 65, 16,
- 4, 34, 192, 0, 2, 18, 37, 177, 240, 1,
- 71, 160, 5, 181, 241, 15, 3, 128, 8, 38,
- 240, 79, 62, 86, 13, 28, 1, 2, 240, 152,
- 5, 186, 240, 10, 181, 86, 16, 188, 32, 11,
- 136, 144, 7, 116, 80, 2, 139, 83, 141, 144,
- 228, 1, 244, 64, 2, 128, 48, 11, 5, 96,
- 0, 52, 89, 147, 54, 121, 147, 6, 255, 240,
- 10, 202, 176, 5, 186, 20, 4, 236, 0, 1,
- 177, 96, 0, 3, 80, 66, 5, 64, 11, 13,
- 144, 3, 169, 96, 7, 169, 112, 11, 52, 169,
- 0, 79, 112, 92, 95, 48, 87, 57, 160, 0,
- 52, 169, 2, 115, 32, 87, 89, 176, 1, 174,
- 64, 11, 5, 80, 66, 196, 96, 0, 177, 224,
- 11, 46, 96, 72, 116, 64, 15, 226, 194, 146,
- 210, 70, 15, 144, 208, 7, 228, 160, 3, 27,
- 176, 89, 22, 53, 135, 114, 201, 124, 40, 96,
- 12, 56, 96, 6, 142, 64, 7, 36, 176, 10,
- 143, 144, 13, 40, 160, 11, 181, 80, 11, 20,
- 128, 12, 135, 16, 4, 66, 96, 2, 142, 160,
- 3, 190, 224, 11, 28, 176, 6, 116, 0, 79,
- 253, 36, 2, 34, 97, 12, 78, 32, 4, 67,
- 160, 10, 95, 208, 5, 45, 240, 1, 186, 208,
- 10, 181, 0, 1, 41, 224, 4, 144, 128, 9,
- 100, 165, 7, 55, 240, 63, 109, 130, 50, 139,
- 96, 6, 139, 128, 1, 147, 224, 8, 160, 160,
- 12, 182, 240, 61, 180, 201, 61, 182, 144, 1,
- 127, 224, 8, 70, 32, 4, 132, 240, 7, 144,
- 128, 62, 171, 144, 7, 93, 32, 3, 50, 208,
- 8, 238, 96, 4, 171, 69, 60, 150, 224, 98,
- 243, 64, 7, 64, 0, 55, 172, 69, 4, 40,
- 133, 5, 99, 5, 79, 252, 20, 4, 142, 32,
- 3, 139, 224, 14, 108, 0, 55, 64, 32, 6,
- 233, 211, 64, 97, 255, 98, 17, 55, 48, 15,
- 238, 128, 6, 235, 80, 15, 11, 83, 15, 143,
- 96, 6, 185, 96, 11, 39, 16, 139, 242, 41,
- 159, 89, 150, 8, 150, 16, 53, 24, 192, 8,
- 103, 208, 8, 191, 179, 10, 100, 80, 83, 60,
- 83, 15, 125, 36, 6, 236, 100, 56, 62, 19,
- 67, 98, 0, 55, 152, 96, 83, 148, 163, 160,
- 240, 4, 160, 134, 83, 2, 63, 3, 134, 217,
- 85, 50, 104, 249, 15, 254, 160, 50, 220, 32,
- 14, 24, 112, 49, 94, 35, 6, 138, 176, 4,
- 154, 131, 105, 127, 80, 162, 38, 90, 162, 234,
- 208, 8, 245, 0, 49, 249, 80, 2, 144, 32,
- 2, 104, 132, 75, 122, 64, 74, 11, 99, 1,
- 22, 16, 67, 104, 36, 71, 83, 131, 4, 172,
- 68, 97, 72, 160, 48, 54, 96, 74, 24, 64,
- 78, 154, 64, 97, 51, 0, 52, 209, 178, 45,
- 30, 160, 15, 145, 197, 146, 23, 80, 14, 47,
- 176, 80, 174, 243, 55, 245, 128, 8, 162, 24,
- 8, 228, 64, 8, 234, 176, 165, 92, 170, 14,
- 233, 192, 8, 147, 176, 15, 220, 34, 46, 30,
- 0, 15, 80, 128, 15, 72, 160, 7, 31, 3,
- 71, 215, 160, 76, 55, 128, 15, 101, 112, 74,
- 110, 250, 166, 72, 224, 46, 21, 10, 71, 116,
- 138, 100, 106, 42, 6, 167,
- 4, 43, 221, 34, 47, 211, 6, 68, 254, 131,
- 49, 247, 16, 14, 124, 179, 63, 3, 83, 15,
- 104, 128, 2, 214, 255, 192, 14, 134, 96, 8,
- 235, 16, 169, 146, 186, 14, 80, 128, 14, 42,
- 121, 150, 126, 131, 15, 162, 89, 167, 198, 164,
- 76, 117, 3, 71, 61, 84, 6, 248, 0, 71,
- 111, 116, 3, 117, 154, 93, 36, 163, 45, 111,
- 234, 46, 122, 164, 71, 32, 67, 67, 191, 34,
- 16, 21, 148, 44, 191, 151, 47, 244, 80, 69,
- 247, 0, 5, 74, 144, 6, 231, 208, 14, 47,
- 80, 15, 47, 48, 15, 47, 16, 172, 243, 32,
- 172, 51, 112, 154, 14, 226, 58, 248, 0, 5,
- 108, 80, 161, 154, 114, 1, 223, 114, 41, 73,
- 245, 172, 83, 84, 55, 76, 250, 67, 83, 228,
- 1, 118, 83, 167, 238, 210, 64, 204, 116, 16,
- 23, 208, 72, 173, 243, 37, 183, 218, 84, 51,
- 224, 4, 91, 211, 72, 55, 36, 65, 235, 106,
- 113, 4, 209, 15, 123, 224, 14, 98, 128, 55,
- 227, 178, 67, 13, 18, 38, 228, 66, 46, 190,
- 18, 15, 19, 96, 120, 2, 243, 40, 110, 196,
- 45, 70, 83, 41, 174, 114, 63, 13, 165, 143,
- 215, 16, 42, 30, 176, 3, 232, 176, 146, 249,
- 154, 175, 13, 82, 118, 2, 3, 105, 111, 178,
- 15, 108, 208, 14, 172, 210, 56, 149, 34, 40,
- 145, 193, 93, 88, 179, 52, 209, 54, 176, 2,
- 33, 15, 207, 224, 1, 250, 170, 52, 27, 203,
- 32, 118, 99, 3, 225, 144, 46, 57, 225, 58,
- 23, 138, 36, 227, 137, 53, 227, 240, 2, 140,
- 61, 163, 18, 131, 146, 15, 220, 229, 13, 19,
- 100, 38, 20, 139, 53, 34, 171, 52, 224, 80,
- 14, 181, 90, 17, 21, 212, 58, 253, 48, 45,
- 47, 187, 130, 29, 241, 179, 10, 193, 15, 225,
- 16, 14, 183, 131, 36, 109, 2, 173, 14, 114,
- 179, 12, 225, 58, 78, 102, 175, 109, 226, 32,
- 1, 1, 0, 59 );
-
- php_logo : array [0..2961] of byte = (
- 71, 73, 70, 56, 57, 97, 130, 0, 67, 0,
- 213, 255, 0, 0, 0, 0, 48, 47, 49, 2,
- 2, 3, 7, 7, 10, 152, 152, 203, 153, 153,
- 204, 150, 150, 200, 147, 147, 195, 3, 3, 4,
- 91, 91, 105, 164, 164, 178, 69, 69, 73, 196,
- 196, 206, 141, 142, 189, 136, 137, 180, 152, 153,
- 187, 101, 103, 134, 126, 129, 172, 176, 178, 205,
- 25, 26, 36, 49, 52, 73, 33, 35, 49, 69,
- 73, 100, 82, 88, 127, 111, 119, 168, 201, 204,
- 221, 81, 95, 159, 85, 99, 163, 97, 105, 147,
- 13, 14, 19, 162, 169, 205, 183, 189, 220, 88,
- 103, 165, 92, 106, 169, 90, 104, 165, 91, 105,
- 166, 95, 110, 172, 102, 115, 174, 93, 105, 158,
- 139, 150, 197, 148, 158, 202, 219, 221, 229, 192,
- 192, 192, 2, 2, 1, 3, 3, 2, 7, 7,
- 6, 15, 15, 14, 133, 133, 131, 152, 152, 151,
- 114, 113, 110, 5, 4, 3, 20, 19, 18, 31,
- 30, 29, 39, 38, 37, 10, 9, 9, 25, 24,
- 24, 61, 60, 60, 183, 183, 183, 81, 81, 81,
- 12, 12, 12, 5, 5, 5, 1, 1, 1, 255,
- 255, 255, 0, 0, 0, 33, 249, 4, 1, 0,
- 0, 42, 0, 44, 0, 0, 0, 0, 130, 0,
- 67, 0, 64, 6, 255, 64, 149, 112, 72, 44,
- 26, 143, 200, 100, 146, 192, 108, 58, 159, 80,
- 130, 114, 74, 173, 90, 175, 70, 130, 225, 112,
- 48, 72, 24, 169, 112, 42, 227, 105, 96, 66,
- 155, 52, 72, 36, 26, 185, 223, 240, 184, 124,
- 78, 15, 185, 69, 38, 14, 100, 15, 73, 236,
- 49, 14, 13, 92, 6, 88, 133, 72, 91, 13,
- 15, 138, 24, 32, 32, 116, 143, 144, 112, 26,
- 30, 48, 0, 150, 150, 59, 25, 140, 145, 156,
- 157, 111, 33, 33, 23, 11, 1, 1, 11, 128,
- 13, 132, 134, 66, 4, 7, 17, 24, 24, 158,
- 35, 27, 31, 9, 151, 150, 51, 9, 49, 186,
- 49, 58, 56, 46, 182, 151, 60, 57, 40, 25,
- 51, 192, 52, 58, 201, 201, 56, 52, 192, 150,
- 45, 12, 17, 62, 49, 192, 59, 185, 187, 9,
- 190, 206, 0, 44, 48, 37, 142, 115, 33, 32,
- 19, 0, 19, 16, 17, 168, 84, 91, 28, 28,
- 38, 177, 27, 39, 57, 43, 192, 48, 30, 27,
- 114, 26, 31, 212, 244, 149, 182, 52, 41, 223,
- 36, 125, 120, 1, 204, 6, 131, 15, 12, 16,
- 0, 123, 241, 65, 3, 190, 15, 253, 108, 197,
- 136, 0, 238, 17, 137, 11, 2, 120, 248, 137,
- 112, 128, 74, 43, 118, 109, 34, 129, 200, 176,
- 96, 155, 73, 75, 60, 22, 228, 72, 129, 65,
- 67, 132, 12, 60, 22, 54, 132, 3, 2, 67,
- 134, 22, 192, 98, 100, 240, 81, 235, 228, 54,
- 255, 22, 56, 20, 124, 32, 113, 175, 19, 9,
- 13, 3, 0, 4, 216, 216, 17, 139, 1, 3,
- 13, 34, 236, 105, 247, 102, 3, 10, 5, 206,
- 114, 156, 40, 26, 171, 235, 195, 28, 206, 94,
- 4, 244, 10, 39, 196, 197, 14, 0, 6, 80,
- 240, 3, 168, 169, 42, 117, 7, 26, 56, 136,
- 160, 135, 15, 132, 118, 33, 201, 234, 245, 100,
- 54, 132, 137, 11, 22, 2, 212, 160, 65, 163,
- 194, 218, 11, 16, 48, 68, 112, 208, 229, 173,
- 227, 199, 66, 158, 110, 225, 210, 64, 174, 131,
- 203, 17, 50, 107, 222, 204, 153, 243, 229, 203,
- 149, 185, 116, 73, 5, 185, 180, 233, 44, 90,
- 38, 115, 41, 224, 65, 130, 107, 6, 176, 25,
- 184, 158, 173, 64, 129, 34, 69, 152, 51, 191,
- 194, 192, 174, 119, 111, 197, 139, 67, 143, 38,
- 125, 186, 184, 138, 201, 15, 90, 203, 110, 80,
- 34, 77, 222, 189, 179, 98, 184, 152, 62, 29,
- 71, 10, 18, 21, 247, 134, 243, 203, 33, 129,
- 178, 4, 167, 26, 27, 223, 162, 121, 44, 29,
- 16, 36, 82, 4, 160, 206, 190, 189, 139, 25,
- 53, 116, 188, 200, 144, 161, 185, 172, 6, 57,
- 88, 0, 107, 177, 195, 253, 141, 0, 242, 101,
- 48, 84, 35, 210, 248, 226, 158, 123, 240, 201,
- 39, 155, 56, 116, 92, 116, 131, 12, 230, 160,
- 67, 156, 58, 116, 113, 208, 149, 6, 18, 68,
- 100, 137, 65, 155, 208, 68, 255, 66, 6, 53,
- 0, 115, 131, 15, 37, 217, 178, 64, 6, 35,
- 228, 37, 194, 72, 58, 0, 19, 64, 6, 41,
- 96, 101, 11, 11, 57, 56, 144, 93, 138, 34,
- 100, 128, 3, 48, 51, 120, 16, 194, 115, 113,
- 160, 129, 86, 0, 231, 52, 48, 5, 43, 188,
- 185, 211, 9, 8, 37, 164, 240, 139, 68, 62,
- 124, 32, 229, 7, 244, 229, 208, 98, 88, 62,
- 200, 120, 201, 10, 57, 52, 192, 149, 44, 241,
- 244, 64, 15, 140, 205, 216, 162, 67, 148, 83,
- 86, 217, 83, 78, 246, 24, 69, 1, 0, 55,
- 248, 193, 152, 21, 80, 233, 97, 33, 29, 249,
- 16, 100, 203, 12, 0, 109, 208, 200, 159, 107,
- 0, 249, 6, 160, 128, 158, 71, 104, 35, 41,
- 104, 8, 128, 11, 10, 136, 115, 40, 27, 100,
- 97, 71, 206, 14, 22, 92, 192, 193, 156, 144,
- 33, 66, 215, 84, 28, 60, 170, 157, 118, 43,
- 122, 218, 149, 89, 26, 88, 128, 86, 57, 149,
- 38, 22, 200, 132, 198, 169, 131, 136, 92, 174,
- 212, 101, 215, 172, 119, 245, 102, 194, 173, 184,
- 178, 161, 43, 174, 183, 246, 182, 199, 5, 9,
- 4, 171, 140, 14, 11, 20, 187, 128, 5, 9,
- 32, 118, 151, 98, 129, 140, 214, 234, 179, 88,
- 164, 38, 153, 106, 148, 85, 102, 237, 181, 215,
- 138, 54, 200, 180, 79, 65, 235, 173, 21, 169,
- 13, 242, 5, 140, 98, 132, 193, 128, 7, 7,
- 204, 133, 255, 65, 9, 118, 172, 168, 198, 161,
- 128, 66, 250, 6, 30, 184, 178, 67, 235, 93,
- 193, 9, 210, 237, 183, 111, 105, 193, 133, 114,
- 244, 73, 96, 134, 8, 126, 222, 216, 137, 8,
- 37, 36, 172, 48, 187, 130, 238, 101, 71, 30,
- 125, 4, 203, 86, 179, 172, 126, 139, 156, 2,
- 30, 120, 224, 0, 81, 13, 239, 85, 83, 6,
- 59, 200, 228, 208, 167, 157, 252, 120, 65, 47,
- 56, 232, 192, 1, 58, 226, 157, 182, 197, 103,
- 17, 164, 72, 71, 27, 11, 215, 108, 51, 118,
- 26, 100, 215, 134, 142, 192, 232, 80, 223, 205,
- 32, 228, 12, 135, 8, 33, 216, 108, 116, 194,
- 216, 249, 89, 71, 8, 22, 212, 112, 67, 5,
- 69, 186, 85, 8, 43, 14, 40, 214, 33, 36,
- 86, 129, 229, 211, 73, 58, 176, 148, 207, 62,
- 91, 111, 163, 128, 4, 249, 48, 32, 64, 216,
- 219, 44, 48, 96, 131, 22, 136, 73, 193, 202,
- 82, 31, 121, 64, 146, 177, 124, 108, 67, 78,
- 13, 105, 160, 247, 61, 37, 100, 160, 40, 0,
- 56, 100, 185, 95, 52, 5, 175, 145, 222, 154,
- 150, 208, 248, 129, 147, 120, 235, 189, 247, 8,
- 125, 43, 48, 143, 45, 1, 180, 249, 72, 8,
- 21, 148, 83, 100, 197, 68, 176, 146, 135, 146,
- 7, 135, 144, 65, 0, 61, 103, 176, 70, 28,
- 118, 3, 179, 0, 3, 56, 217, 82, 207, 200,
- 110, 128, 16, 1, 235, 57, 165, 64, 255, 34,
- 48, 56, 100, 240, 35, 234, 77, 26, 67, 185,
- 229, 22, 89, 0, 64, 7, 150, 58, 192, 121,
- 100, 7, 176, 3, 58, 39, 95, 31, 115, 157,
- 35, 108, 4, 29, 66, 10, 122, 154, 233, 67,
- 153, 151, 36, 144, 193, 151, 34, 124, 24, 162,
- 137, 59, 85, 111, 137, 11, 245, 129, 179, 98,
- 206, 126, 59, 179, 0, 240, 22, 93, 208, 131,
- 70, 231, 196, 109, 132, 1, 14, 40, 223, 201,
- 6, 30, 104, 137, 118, 207, 41, 68, 64, 11,
- 238, 186, 123, 78, 116, 142, 81, 165, 253, 165,
- 141, 1, 230, 129, 196, 69, 4, 208, 3, 10,
- 92, 0, 16, 199, 35, 66, 43, 238, 98, 2,
- 59, 156, 199, 1, 12, 144, 65, 237, 232, 195,
- 193, 48, 208, 231, 3, 13, 64, 67, 27, 54,
- 16, 129, 49, 112, 144, 131, 36, 16, 96, 9,
- 79, 200, 193, 197, 181, 46, 123, 44, 36, 151,
- 128, 36, 64, 145, 47, 113, 130, 4, 109, 3,
- 192, 90, 226, 87, 8, 242, 76, 69, 14, 76,
- 74, 193, 13, 128, 161, 61, 27, 146, 44, 18,
- 27, 112, 128, 15, 190, 119, 137, 5, 160, 192,
- 136, 122, 33, 74, 230, 16, 176, 67, 9, 61,
- 230, 41, 233, 170, 75, 59, 172, 82, 46, 49,
- 124, 64, 94, 71, 228, 196, 138, 22, 215, 197,
- 20, 176, 175, 43, 36, 184, 8, 57, 80, 133,
- 152, 197, 200, 207, 101, 113, 217, 20, 31, 168,
- 98, 193, 48, 218, 255, 17, 18, 125, 1, 204,
- 4, 118, 192, 131, 14, 44, 5, 49, 225, 225,
- 151, 18, 16, 161, 46, 89, 217, 165, 29, 38,
- 104, 67, 29, 239, 248, 9, 80, 60, 140, 3,
- 23, 16, 197, 2, 112, 128, 3, 82, 224, 96,
- 1, 201, 194, 23, 197, 4, 233, 178, 201, 88,
- 70, 55, 134, 188, 23, 31, 36, 70, 202, 82,
- 154, 50, 147, 83, 121, 69, 102, 2, 161, 175,
- 8, 114, 242, 149, 157, 139, 130, 44, 103, 217,
- 4, 88, 218, 242, 52, 210, 226, 150, 46, 119,
- 185, 175, 91, 250, 242, 72, 210, 210, 22, 23,
- 110, 67, 204, 98, 230, 70, 55, 187, 1, 14,
- 43, 5, 177, 173, 94, 254, 18, 90, 225, 90,
- 141, 4, 168, 68, 46, 19, 198, 70, 2, 30,
- 120, 192, 39, 145, 153, 204, 110, 246, 202, 55,
- 190, 90, 214, 98, 154, 229, 172, 103, 190, 5,
- 139, 7, 40, 128, 4, 170, 233, 65, 116, 69,
- 128, 93, 32, 72, 67, 193, 116, 117, 199, 111,
- 222, 139, 89, 173, 52, 231, 18, 38, 163, 78,
- 250, 132, 225, 3, 173, 64, 131, 159, 58, 38,
- 135, 80, 17, 138, 160, 94, 129, 88, 196, 130,
- 117, 142, 77, 234, 19, 57, 95, 128, 205, 3,
- 98, 54, 80, 232, 156, 192, 132, 29, 68, 145,
- 193, 62, 245, 176, 136, 233, 32, 88, 225, 113,
- 229, 120, 134, 233, 26, 141, 17, 101, 163, 100,
- 33, 218, 232, 74, 135, 82, 59, 254, 168, 59,
- 255, 198, 186, 128, 27, 69, 234, 24, 68, 60,
- 160, 54, 14, 104, 14, 66, 245, 2, 15, 121,
- 0, 67, 1, 79, 100, 36, 30, 255, 66, 73,
- 28, 36, 96, 166, 35, 189, 204, 3, 54, 134,
- 82, 131, 194, 75, 84, 113, 104, 158, 45, 106,
- 144, 2, 71, 29, 116, 14, 79, 125, 42, 24,
- 229, 32, 142, 166, 213, 224, 109, 86, 204, 84,
- 186, 46, 195, 8, 130, 110, 64, 2, 24, 141,
- 225, 9, 61, 248, 1, 12, 40, 109, 4, 76,
- 202, 192, 147, 178, 151, 86, 127, 126, 208, 173,
- 208, 75, 79, 93, 213, 218, 66, 15, 52, 7,
- 165, 23, 161, 129, 11, 34, 36, 136, 115, 166,
- 43, 51, 9, 196, 234, 236, 98, 98, 64, 56,
- 189, 32, 5, 14, 72, 3, 37, 26, 107, 9,
- 26, 192, 32, 5, 35, 208, 0, 10, 82, 112,
- 183, 198, 206, 32, 6, 31, 72, 236, 27, 46,
- 114, 55, 168, 133, 245, 10, 80, 217, 205, 78,
- 221, 128, 161, 191, 25, 48, 6, 41, 24, 201,
- 142, 40, 107, 137, 0, 96, 54, 70, 180, 189,
- 132, 14, 206, 8, 7, 18, 188, 105, 0, 224,
- 193, 84, 21, 234, 132, 129, 20, 30, 204, 123,
- 61, 67, 83, 154, 252, 22, 178, 218, 229, 64,
- 33, 174, 75, 1, 53, 253, 169, 128, 230, 94,
- 162, 7, 57, 240, 128, 15, 102, 123, 9, 235,
- 76, 73, 74, 244, 129, 129, 239, 204, 180, 149,
- 224, 1, 160, 7, 22, 184, 255, 212, 27, 231,
- 215, 0, 251, 121, 162, 167, 98, 114, 93, 80,
- 231, 181, 129, 38, 205, 181, 178, 62, 16, 31,
- 0, 254, 129, 29, 93, 137, 64, 170, 151, 32,
- 31, 66, 160, 123, 137, 23, 144, 109, 104, 27,
- 72, 15, 246, 44, 113, 3, 9, 32, 20, 135,
- 0, 224, 65, 122, 133, 139, 4, 36, 81, 229,
- 29, 250, 0, 6, 85, 141, 235, 161, 12, 12,
- 113, 170, 66, 108, 28, 77, 154, 180, 96, 0,
- 248, 44, 191, 34, 2, 200, 141, 84, 74, 58,
- 91, 52, 184, 165, 110, 240, 109, 57, 30, 152,
- 142, 36, 172, 227, 194, 75, 178, 137, 117, 45,
- 1, 90, 216, 85, 5, 5, 57, 136, 239, 37,
- 98, 160, 191, 8, 71, 35, 59, 86, 41, 50,
- 0, 96, 0, 163, 241, 90, 162, 136, 114, 216,
- 64, 3, 24, 160, 31, 19, 149, 87, 129, 23,
- 72, 139, 156, 214, 139, 60, 247, 118, 98, 18,
- 138, 226, 193, 145, 227, 176, 1, 12, 164, 160,
- 196, 46, 72, 193, 149, 186, 27, 64, 56, 204,
- 2, 113, 0, 168, 65, 1, 109, 209, 3, 5,
- 92, 185, 42, 77, 106, 241, 37, 108, 160, 128,
- 18, 236, 116, 129, 240, 227, 136, 18, 88, 161,
- 188, 69, 62, 98, 103, 220, 181, 196, 137, 228,
- 185, 129, 162, 109, 22, 6, 147, 219, 51, 140,
- 24, 91, 224, 3, 15, 202, 38, 157, 29, 242,
- 78, 214, 92, 91, 211, 105, 32, 13, 69, 187,
- 168, 2, 255, 50, 253, 140, 62, 195, 56, 198,
- 194, 179, 6, 15, 149, 240, 145, 59, 113, 66,
- 202, 25, 212, 240, 71, 133, 181, 30, 147, 116,
- 109, 32, 60, 82, 177, 36, 50, 4, 12, 97,
- 80, 233, 133, 150, 136, 143, 196, 122, 225, 100,
- 19, 125, 96, 119, 157, 32, 71, 5, 18, 112,
- 41, 87, 222, 216, 213, 144, 200, 83, 110, 89,
- 0, 91, 27, 129, 136, 136, 219, 27, 154, 232,
- 244, 172, 104, 24, 185, 22, 109, 9, 64, 224,
- 169, 71, 251, 166, 14, 88, 96, 115, 234, 104,
- 47, 59, 68, 210, 59, 96, 32, 0, 65, 52,
- 0, 208, 11, 86, 130, 130, 120, 246, 212, 61,
- 90, 249, 210, 189, 219, 195, 228, 20, 48, 209,
- 18, 50, 128, 55, 128, 98, 144, 131, 12, 108,
- 101, 220, 228, 6, 0, 165, 30, 104, 60, 58,
- 205, 237, 46, 102, 189, 10, 48, 4, 160, 21,
- 163, 137, 227, 211, 207, 233, 158, 205, 144, 237,
- 33, 155, 129, 224, 3, 90, 187, 238, 11, 114,
- 90, 51, 18, 160, 33, 103, 171, 237, 173, 6,
- 208, 50, 1, 182, 212, 216, 225, 245, 187, 203,
- 121, 50, 192, 105, 192, 181, 89, 168, 231, 41,
- 1, 79, 52, 44, 1, 40, 70, 81, 4, 153,
- 75, 73, 27, 95, 238, 148, 9, 66, 156, 38,
- 139, 21, 25, 206, 31, 161, 89, 206, 18, 209,
- 70, 71, 60, 10, 57, 120, 176, 195, 182, 92,
- 145, 60, 90, 100, 45, 68, 102, 192, 219, 117,
- 174, 83, 85, 180, 75, 79, 17, 8, 98, 212,
- 117, 174, 211, 64, 1, 28, 254, 57, 5, 206,
- 214, 129, 5, 0, 146, 194, 98, 173, 218, 28,
- 17, 102, 51, 153, 133, 125, 14, 52, 171, 187,
- 94, 72, 181, 246, 180, 44, 5, 95, 133, 125,
- 214, 83, 228, 130, 129, 57, 114, 128, 104, 119,
- 79, 188, 27, 72, 101, 129, 9, 136, 169, 3,
- 59, 92, 25, 99, 104, 90, 154, 151, 201, 113,
- 42, 137, 28, 129, 161, 21, 239, 149, 190, 108,
- 224, 2, 20, 168, 1, 215, 255, 147, 42, 197,
- 232, 235, 153, 132, 188, 252, 28, 111, 197, 249,
- 203, 57, 242, 191, 128, 169, 164, 96, 2, 64,
- 129, 84, 113, 128, 89, 45, 211, 231, 16, 176,
- 8, 171, 194, 139, 82, 121, 172, 255, 132, 230,
- 55, 207, 85, 71, 26, 63, 69, 16, 3, 86,
- 50, 138, 85, 212, 99, 101, 242, 246, 193, 201,
- 189, 238, 7, 249, 170, 185, 196, 74, 148, 216,
- 191, 215, 41, 73, 57, 44, 29, 32, 11, 149,
- 208, 143, 190, 244, 167, 175, 10, 201, 84, 235,
- 152, 175, 176, 87, 246, 215, 207, 14, 85, 174,
- 146, 149, 229, 36, 63, 44, 167, 37, 204, 250,
- 219, 255, 254, 206, 52, 103, 16, 0, 0, 59,
- 10, 124, 165, 92, 136, 65, 105, 236, 247, 73,
- 168, 224, 1, 35, 240, 0, 23, 226, 0, 154,
- 225, 54, 178, 247, 74, 94, 17, 75, 229, 34,
- 22, 137, 33, 128, 174, 3, 88, 10, 143, 65,
- 21, 34, 48, 1, 51, 160, 3, 207, 151, 127,
- 104, 37, 126, 248, 196, 4, 196, 18, 46, 202,
- 52, 75, 2, 50, 129, 21, 88, 7, 209, 100,
- 114, 95, 97, 12, 172, 96, 92, 36, 176, 128,
- 104, 213, 128, 10, 117, 76, 254, 71, 8, 175,
- 80, 130, 203, 164, 46, 186, 176, 130, 20, 24,
- 7, 62, 24, 77, 199, 52, 47, 247, 177, 54,
- 19, 128, 90, 60, 240, 43, 229, 132, 86, 180,
- 161, 121, 58, 85, 11, 46, 115, 8, 175, 49,
- 25, 155, 17, 8, 58, 184, 76, 9, 80, 46,
- 3, 0, 85, 80, 165, 78, 235, 52, 13, 247,
- 178, 47, 241, 164, 26, 177, 65, 27, 221, 241,
- 132, 183, 193, 86, 189, 49, 78, 228, 84, 78,
- 110, 248, 134, 112, 24, 135, 242, 68, 134, 28,
- 37, 42, 103, 136, 134, 33, 104, 48, 39, 35,
- 27, 109, 160, 48, 220, 242, 135, 21, 224, 25,
- 220, 2, 49, 7, 53, 49, 32, 21, 4, 0,
- 59, 0 );
-
- php_egg_logo : array [0..7537] of byte = (
- 71, 73, 70, 56, 57, 97, 130, 0, 67, 0,
- 247, 255, 0, 152, 134, 136, 108, 76, 84, 73,
- 70, 71, 166, 138, 148, 136, 108, 119, 192, 192,
- 192, 122, 106, 117, 139, 123, 134, 75, 59, 71,
- 167, 162, 166, 91, 85, 90, 41, 28, 39, 104,
- 91, 102, 152, 138, 150, 87, 75, 86, 105, 100,
- 105, 41, 39, 41, 152, 150, 152, 55, 43, 57,
- 160, 149, 166, 156, 140, 167, 56, 55, 57, 84,
- 76, 100, 92, 84, 116, 92, 84, 124, 116, 108,
- 148, 116, 114, 138, 85, 84, 107, 132, 131, 150,
- 84, 84, 116, 108, 108, 148, 132, 132, 180, 92,
- 92, 124, 140, 140, 188, 124, 124, 165, 105, 105,
- 140, 76, 76, 101, 100, 100, 132, 116, 116, 153,
- 156, 156, 204, 148, 148, 194, 132, 132, 172, 69,
- 69, 90, 140, 140, 180, 169, 169, 214, 92, 92,
- 116, 184, 184, 227, 203, 203, 246, 164, 165, 204,
- 232, 233, 249, 40, 41, 56, 52, 54, 72, 27,
- 31, 47, 106, 108, 116, 123, 125, 132, 106, 121,
- 166, 25, 27, 33, 17, 18, 21, 140, 156, 196,
- 108, 116, 136, 56, 65, 86, 80, 100, 136, 88,
- 94, 104, 76, 87, 101, 41, 52, 52, 71, 91,
- 88, 138, 167, 161, 183, 197, 194, 172, 183, 177,
- 100, 136, 115, 118, 177, 139, 156, 200, 172, 148,
- 223, 173, 131, 195, 153, 94, 126, 105, 105, 165,
- 123, 85, 114, 94, 88, 149, 105, 137, 165, 145,
- 73, 131, 88, 76, 153, 92, 106, 184, 123, 90,
- 167, 105, 141, 212, 152, 157, 180, 159, 120, 187,
- 123, 131, 198, 135, 106, 152, 108, 122, 168, 124,
- 77, 111, 78, 87, 151, 88, 137, 213, 138, 148,
- 225, 148, 104, 169, 103, 74, 154, 70, 70, 132,
- 67, 106, 183, 102, 140, 182, 138, 91, 135, 88,
- 154, 198, 151, 176, 228, 169, 91, 169, 78, 122,
- 199, 108, 163, 218, 153, 86, 156, 70, 105, 183,
- 88, 103, 169, 88, 138, 215, 120, 151, 216, 137,
- 49, 121, 31, 120, 185, 104, 136, 200, 120, 66,
- 122, 49, 134, 184, 120, 151, 228, 124, 121, 170,
- 104, 68, 96, 59, 180, 205, 171, 44, 93, 25,
- 79, 147, 52, 87, 135, 68, 105, 183, 72, 121,
- 201, 86, 138, 214, 105, 103, 150, 83, 154, 200,
- 135, 87, 162, 51, 104, 168, 74, 119, 185, 89,
- 134, 195, 104, 69, 132, 36, 154, 215, 120, 70,
- 148, 25, 102, 176, 57, 119, 167, 90, 176, 233,
- 143, 98, 161, 57, 164, 230, 122, 151, 199, 119,
- 92, 166, 37, 122, 192, 74, 135, 204, 86, 150,
- 216, 103, 145, 202, 104, 116, 190, 57, 45, 69,
- 26, 92, 172, 20, 118, 176, 69, 132, 186, 87,
- 168, 218, 124, 35, 50, 20, 152, 177, 112, 142,
- 162, 98, 70, 71, 38, 88, 87, 57, 166, 165,
- 109, 202, 200, 143, 173, 166, 91, 180, 177, 143,
- 134, 127, 89, 92, 84, 44, 88, 85, 71, 73,
- 69, 55, 57, 53, 40, 185, 168, 118, 114, 100,
- 63, 123, 118, 106, 156, 149, 134, 105, 84, 41,
- 230, 177, 85, 87, 71, 43, 239, 199, 124, 235,
- 205, 148, 170, 152, 119, 167, 121, 48, 51, 42,
- 27, 206, 173, 121, 167, 109, 22, 190, 132, 42,
- 202, 145, 60, 181, 143, 86, 228, 179, 109, 145,
- 116, 72, 201, 163, 107, 105, 86, 58, 37, 31,
- 22, 206, 151, 80, 216, 164, 91, 184, 151, 105,
- 166, 137, 99, 231, 207, 176, 111, 101, 87, 127,
- 78, 15, 150, 105, 52, 122, 87, 42, 152, 135,
- 114, 104, 58, 6, 72, 57, 41, 225, 185, 141,
- 179, 126, 70, 161, 115, 69, 138, 102, 64, 155,
- 122, 87, 183, 151, 118, 77, 49, 24, 114, 75,
- 39, 121, 88, 57, 168, 152, 137, 95, 57, 26,
- 103, 69, 40, 188, 138, 96, 88, 71, 56, 65,
- 35, 11, 143, 107, 79, 217, 171, 136, 88, 59,
- 39, 105, 86, 73, 225, 189, 163, 129, 94, 71,
- 199, 160, 135, 129, 103, 88, 148, 121, 105, 207,
- 172, 153, 137, 117, 105, 103, 73, 57, 188, 143,
- 121, 198, 182, 174, 204, 198, 195, 101, 60, 42,
- 116, 76, 57, 119, 88, 74, 166, 127, 109, 69,
- 43, 34, 55, 43, 39, 165, 133, 123, 182, 149,
- 139, 185, 162, 156, 135, 107, 101, 167, 154, 151,
- 84, 50, 44, 87, 59, 54, 139, 133, 132, 102,
- 76, 72, 119, 90, 86, 71, 58, 56, 150, 124,
- 120, 87, 73, 71, 136, 121, 119, 167, 139, 136,
- 182, 138, 134, 120, 104, 103, 116, 76, 76, 103,
- 87, 87, 122, 120, 120, 255, 255, 255, 0, 0,
- 0, 33, 249, 4, 1, 0, 0, 5, 0, 44,
- 0, 0, 0, 0, 130, 0, 67, 0, 64, 8,
- 255, 0, 11, 8, 28, 72, 176, 160, 193, 131,
- 8, 13, 162, 88, 24, 34, 196, 138, 15, 41,
- 82, 136, 16, 97, 194, 132, 135, 18, 37, 64,
- 180, 184, 192, 177, 99, 199, 22, 32, 64, 148,
- 24, 225, 193, 196, 68, 17, 41, 62, 124, 104,
- 24, 98, 33, 138, 132, 48, 99, 202, 156, 121,
- 144, 97, 10, 19, 32, 54, 144, 32, 161, 162,
- 39, 147, 34, 81, 214, 0, 50, 99, 166, 74,
- 20, 35, 73, 162, 36, 65, 194, 101, 138, 83,
- 51, 110, 246, 108, 177, 178, 134, 205, 158, 70,
- 101, 188, 164, 49, 147, 38, 205, 155, 41, 70,
- 164, 72, 137, 178, 100, 73, 19, 179, 79, 180,
- 148, 69, 43, 230, 75, 19, 43, 85, 2, 169,
- 209, 130, 6, 208, 220, 43, 74, 152, 248, 232,
- 112, 33, 164, 200, 12, 34, 86, 44, 164, 73,
- 184, 0, 138, 15, 30, 116, 170, 224, 193, 132,
- 143, 23, 41, 110, 182, 156, 177, 50, 167, 207,
- 27, 48, 108, 186, 148, 241, 83, 40, 16, 32,
- 70, 143, 2, 173, 113, 3, 168, 210, 35, 74,
- 140, 246, 116, 113, 66, 100, 8, 145, 8, 17,
- 226, 217, 168, 241, 160, 223, 0, 118, 184, 217,
- 121, 243, 102, 173, 247, 182, 109, 187, 189, 101,
- 243, 69, 156, 120, 182, 109, 221, 192, 201, 155,
- 55, 204, 147, 243, 56, 115, 164, 116, 153, 94,
- 133, 52, 164, 73, 106, 202, 100, 93, 228, 231,
- 77, 152, 58, 97, 240, 48, 255, 193, 56, 82,
- 196, 135, 151, 52, 67, 136, 80, 172, 224, 30,
- 0, 0, 13, 26, 0, 168, 7, 224, 25, 62,
- 0, 248, 220, 185, 3, 16, 175, 193, 1, 27,
- 54, 112, 64, 1, 5, 19, 36, 64, 196, 129,
- 84, 28, 113, 68, 28, 125, 80, 113, 74, 55,
- 191, 252, 98, 138, 2, 51, 204, 64, 3, 14,
- 56, 84, 96, 10, 0, 6, 164, 179, 0, 2,
- 218, 32, 115, 204, 44, 210, 132, 179, 77, 62,
- 4, 224, 179, 77, 56, 199, 244, 82, 15, 3,
- 7, 74, 96, 78, 55, 240, 72, 176, 0, 4,
- 252, 152, 50, 140, 53, 156, 244, 193, 198, 27,
- 80, 85, 177, 5, 87, 129, 196, 129, 197, 24,
- 88, 24, 161, 198, 29, 101, 104, 225, 214, 21,
- 78, 226, 161, 198, 21, 21, 153, 112, 30, 76,
- 57, 145, 0, 142, 57, 230, 204, 179, 28, 55,
- 221, 168, 179, 78, 3, 28, 28, 80, 15, 62,
- 234, 212, 211, 205, 55, 237, 180, 217, 230, 61,
- 112, 126, 99, 128, 1, 250, 212, 105, 74, 43,
- 189, 216, 34, 204, 53, 242, 32, 32, 0, 4,
- 57, 224, 112, 33, 14, 57, 228, 96, 207, 47,
- 154, 100, 2, 202, 47, 247, 204, 121, 192, 123,
- 7, 16, 112, 64, 3, 3, 172, 227, 141, 49,
- 198, 172, 82, 203, 46, 208, 192, 35, 202, 52,
- 175, 136, 162, 137, 51, 189, 220, 2, 11, 44,
- 180, 240, 226, 201, 24, 75, 222, 129, 8, 24,
- 94, 160, 255, 97, 70, 25, 105, 168, 145, 198,
- 26, 104, 8, 130, 198, 146, 105, 176, 17, 136,
- 33, 113, 136, 225, 208, 7, 48, 133, 128, 83,
- 11, 14, 168, 2, 142, 51, 201, 40, 227, 172,
- 50, 220, 152, 131, 141, 114, 243, 204, 195, 165,
- 57, 252, 32, 80, 225, 12, 60, 144, 160, 0,
- 63, 252, 40, 160, 0, 3, 42, 252, 96, 138,
- 3, 14, 240, 243, 13, 55, 21, 208, 32, 3,
- 4, 25, 166, 3, 47, 14, 185, 212, 43, 202,
- 47, 161, 152, 2, 231, 3, 60, 240, 16, 132,
- 2, 53, 24, 16, 79, 13, 10, 180, 194, 74,
- 43, 154, 136, 82, 1, 16, 16, 52, 76, 207,
- 40, 244, 124, 211, 202, 50, 188, 180, 114, 197,
- 28, 138, 196, 145, 70, 30, 107, 128, 129, 134,
- 31, 121, 96, 167, 134, 31, 110, 92, 33, 200,
- 29, 133, 44, 66, 200, 36, 113, 16, 241, 130,
- 11, 39, 160, 39, 211, 97, 38, 140, 48, 66,
- 9, 27, 20, 195, 204, 206, 215, 144, 67, 78,
- 52, 209, 144, 3, 13, 51, 233, 224, 32, 3,
- 2, 242, 152, 163, 13, 55, 213, 50, 192, 143,
- 3, 22, 218, 51, 205, 52, 206, 128, 67, 15,
- 14, 64, 228, 242, 202, 40, 92, 143, 130, 206,
- 52, 212, 52, 227, 202, 44, 178, 148, 29, 75,
- 44, 193, 8, 147, 76, 170, 164, 144, 194, 203,
- 219, 157, 108, 178, 9, 38, 110, 116, 33, 70,
- 162, 162, 20, 3, 113, 215, 153, 216, 255, 178,
- 201, 28, 134, 204, 113, 73, 32, 140, 64, 82,
- 8, 35, 140, 80, 210, 200, 36, 136, 20, 242,
- 135, 26, 227, 248, 19, 195, 11, 48, 12, 86,
- 24, 76, 54, 81, 84, 101, 6, 27, 72, 128,
- 3, 4, 244, 76, 35, 15, 46, 206, 104, 147,
- 76, 50, 34, 142, 56, 139, 43, 157, 22, 19,
- 141, 54, 216, 60, 60, 141, 61, 246, 96, 243,
- 77, 56, 181, 240, 226, 246, 219, 164, 44, 221,
- 205, 51, 226, 180, 226, 11, 39, 115, 136, 113,
- 135, 31, 119, 220, 161, 71, 30, 121, 44, 255,
- 135, 32, 109, 216, 33, 189, 29, 112, 220, 65,
- 8, 33, 214, 223, 113, 5, 17, 49, 76, 254,
- 114, 229, 150, 95, 46, 254, 248, 46, 177, 244,
- 16, 68, 18, 69, 164, 254, 10, 236, 179, 228,
- 254, 251, 13, 185, 180, 208, 9, 244, 199, 44,
- 255, 253, 46, 141, 175, 255, 254, 5, 49, 4,
- 81, 205, 32, 232, 192, 6, 116, 178, 19, 158,
- 244, 36, 8, 65, 96, 194, 19, 206, 178, 4,
- 41, 84, 193, 10, 112, 129, 32, 4, 151, 0,
- 7, 59, 124, 65, 13, 96, 104, 194, 89, 132,
- 96, 4, 37, 60, 225, 11, 95, 120, 194, 21,
- 138, 144, 151, 32, 252, 96, 128, 27, 232, 128,
- 10, 251, 18, 146, 18, 152, 36, 5, 43, 104,
- 137, 204, 248, 119, 57, 20, 132, 32, 5, 137,
- 217, 201, 1, 181, 240, 135, 59, 180, 161, 12,
- 102, 216, 131, 30, 255, 26, 193, 8, 61, 172,
- 97, 16, 135, 56, 132, 35, 20, 65, 134, 42,
- 216, 74, 15, 111, 232, 195, 25, 206, 80, 135,
- 58, 16, 225, 8, 68, 160, 66, 18, 166, 128,
- 5, 44, 132, 225, 64, 173, 25, 135, 24, 199,
- 72, 70, 50, 14, 97, 8, 99, 28, 66, 21,
- 195, 240, 134, 55, 168, 161, 11, 128, 112, 131,
- 21, 216, 208, 7, 55, 168, 97, 74, 95, 96,
- 146, 26, 248, 160, 4, 191, 96, 196, 74, 45,
- 217, 159, 122, 64, 192, 19, 30, 48, 160, 30,
- 103, 114, 7, 110, 18, 64, 5, 39, 96, 97,
- 9, 70, 24, 195, 25, 222, 144, 6, 52, 96,
- 102, 50, 96, 216, 66, 20, 204, 16, 136, 57,
- 128, 225, 17, 125, 56, 66, 21, 197, 113, 138,
- 120, 68, 128, 3, 27, 152, 1, 134, 32, 16,
- 10, 129, 225, 71, 29, 42, 242, 205, 111, 194,
- 145, 143, 117, 228, 35, 28, 183, 216, 197, 46,
- 120, 97, 13, 95, 28, 199, 28, 244, 144, 129,
- 12, 20, 240, 141, 101, 176, 162, 71, 93, 184,
- 130, 24, 194, 16, 135, 49, 144, 161, 14, 94,
- 196, 194, 23, 4, 1, 136, 71, 168, 225, 11,
- 109, 240, 3, 35, 208, 208, 5, 56, 100, 193,
- 102, 37, 185, 82, 76, 56, 199, 19, 126, 232,
- 163, 29, 221, 24, 198, 55, 234, 129, 27, 10,
- 112, 32, 30, 195, 128, 37, 154, 234, 113, 15,
- 2, 220, 227, 0, 241, 136, 7, 0, 78, 33,
- 255, 159, 3, 224, 51, 2, 167, 120, 6, 59,
- 134, 193, 13, 112, 160, 131, 30, 127, 162, 129,
- 66, 9, 37, 129, 7, 48, 64, 1, 246, 16,
- 128, 10, 72, 96, 1, 167, 205, 131, 0, 0,
- 24, 192, 4, 38, 192, 14, 113, 120, 3, 22,
- 214, 192, 148, 166, 106, 81, 141, 119, 24, 52,
- 29, 244, 224, 70, 47, 96, 129, 41, 76, 252,
- 65, 14, 105, 64, 89, 32, 2, 241, 7, 55,
- 60, 98, 13, 85, 88, 66, 21, 226, 240, 6,
- 55, 248, 244, 13, 108, 0, 195, 31, 30, 49,
- 7, 56, 40, 97, 34, 196, 74, 136, 7, 46,
- 176, 1, 4, 76, 3, 27, 92, 194, 6, 55,
- 218, 33, 143, 164, 113, 105, 30, 110, 106, 71,
- 181, 230, 129, 141, 170, 202, 67, 0, 51, 152,
- 168, 5, 4, 32, 0, 218, 69, 72, 25, 216,
- 138, 150, 4, 222, 181, 0, 12, 21, 234, 173,
- 185, 0, 69, 41, 64, 49, 13, 125, 0, 32,
- 2, 144, 106, 135, 1, 28, 106, 131, 1, 8,
- 135, 21, 183, 64, 69, 49, 52, 49, 10, 8,
- 228, 98, 20, 175, 80, 69, 43, 120, 161, 12,
- 88, 156, 34, 8, 89, 152, 27, 37, 244, 160,
- 135, 61, 152, 161, 112, 168, 129, 4, 35, 182,
- 208, 83, 196, 65, 162, 17, 160, 101, 196, 28,
- 156, 192, 130, 152, 197, 132, 102, 25, 1, 65,
- 49, 122, 230, 51, 114, 128, 163, 28, 92, 2,
- 7, 60, 192, 65, 91, 112, 255, 188, 67, 94,
- 160, 179, 7, 184, 194, 197, 128, 7, 40, 160,
- 39, 36, 120, 192, 57, 185, 17, 204, 119, 65,
- 32, 29, 163, 16, 5, 58, 138, 161, 51, 98,
- 16, 3, 24, 209, 152, 198, 61, 250, 241, 11,
- 165, 125, 66, 21, 175, 200, 46, 51, 108, 193,
- 10, 86, 192, 2, 19, 224, 205, 66, 97, 37,
- 48, 3, 178, 134, 130, 31, 18, 106, 5, 41,
- 48, 129, 8, 63, 252, 225, 13, 128, 248, 76,
- 104, 11, 1, 134, 46, 168, 193, 51, 51, 37,
- 4, 28, 248, 208, 61, 202, 133, 175, 48, 40,
- 88, 129, 8, 60, 64, 224, 139, 32, 0, 29,
- 59, 219, 217, 43, 110, 36, 1, 164, 65, 85,
- 27, 16, 214, 70, 53, 170, 161, 13, 85, 228,
- 226, 26, 224, 160, 70, 52, 202, 81, 12, 132,
- 142, 194, 30, 161, 80, 197, 52, 126, 129, 11,
- 92, 40, 227, 22, 181, 168, 197, 42, 86, 204,
- 226, 21, 179, 66, 83, 183, 232, 68, 220, 46,
- 17, 7, 64, 228, 1, 16, 124, 176, 131, 37,
- 34, 145, 137, 72, 88, 194, 18, 116, 240, 49,
- 30, 148, 240, 11, 60, 224, 65, 11, 88, 136,
- 130, 29, 4, 225, 7, 236, 197, 161, 123, 147,
- 131, 217, 127, 105, 56, 179, 134, 124, 224, 36,
- 88, 158, 136, 9, 12, 208, 14, 101, 28, 131,
- 22, 186, 208, 229, 46, 116, 65, 230, 89, 28,
- 195, 21, 174, 56, 134, 52, 104, 145, 170, 93,
- 164, 184, 255, 22, 186, 72, 70, 55, 72, 209,
- 221, 99, 94, 226, 15, 128, 40, 131, 26, 128,
- 148, 6, 63, 44, 162, 16, 126, 190, 195, 28,
- 176, 32, 4, 22, 184, 224, 208, 136, 102, 1,
- 12, 236, 55, 101, 42, 59, 90, 33, 54, 12,
- 1, 68, 40, 114, 179, 11, 8, 16, 133, 5,
- 204, 180, 166, 55, 173, 105, 20, 162, 80, 133,
- 124, 1, 9, 8, 70, 144, 1, 147, 124, 32,
- 134, 249, 123, 180, 170, 9, 98, 19, 19, 224,
- 172, 128, 61, 57, 96, 90, 180, 240, 132, 177,
- 72, 193, 11, 95, 240, 66, 25, 34, 195, 5,
- 77, 10, 201, 10, 81, 136, 66, 26, 170, 144,
- 20, 41, 36, 161, 11, 80, 128, 130, 20, 52,
- 120, 133, 38, 92, 1, 146, 143, 44, 203, 19,
- 52, 131, 6, 45, 104, 161, 10, 197, 203, 66,
- 16, 124, 144, 66, 190, 248, 101, 4, 38, 128,
- 97, 32, 87, 93, 229, 155, 100, 41, 214, 89,
- 184, 66, 23, 192, 112, 21, 51, 128, 1, 12,
- 107, 144, 195, 27, 206, 224, 20, 46, 176, 225,
- 12, 100, 56, 3, 18, 200, 48, 5, 43, 76,
- 1, 9, 253, 54, 195, 22, 146, 144, 132, 8,
- 214, 183, 139, 72, 33, 248, 17, 134, 160, 160,
- 36, 8, 33, 9, 71, 176, 130, 17, 176, 160,
- 160, 58, 80, 33, 12, 97, 240, 98, 21, 202,
- 192, 60, 55, 212, 202, 129, 106, 248, 195, 31,
- 240, 144, 5, 81, 139, 100, 4, 230, 255, 25,
- 183, 170, 105, 118, 1, 3, 170, 128, 9, 125,
- 176, 204, 26, 222, 64, 134, 62, 128, 193, 12,
- 133, 128, 4, 36, 160, 232, 8, 74, 84, 66,
- 52, 138, 8, 68, 37, 200, 96, 133, 46, 36,
- 97, 42, 75, 240, 226, 129, 18, 144, 0, 216,
- 68, 64, 145, 186, 17, 7, 110, 130, 35, 117,
- 113, 88, 221, 56, 197, 17, 7, 62, 234, 17,
- 208, 117, 120, 162, 138, 88, 152, 195, 27, 212,
- 82, 5, 47, 50, 40, 17, 108, 48, 66, 176,
- 193, 224, 83, 43, 44, 161, 143, 34, 193, 72,
- 96, 102, 8, 224, 15, 152, 64, 49, 47, 199,
- 130, 34, 180, 64, 240, 55, 228, 186, 223, 51,
- 13, 4, 27, 226, 8, 6, 43, 152, 65, 13,
- 148, 96, 158, 25, 244, 64, 137, 71, 84, 98,
- 232, 85, 92, 122, 211, 125, 80, 1, 8, 72,
- 192, 1, 253, 216, 231, 51, 158, 177, 140, 101,
- 244, 198, 55, 38, 242, 134, 110, 132, 147, 141,
- 221, 24, 99, 27, 231, 192, 134, 135, 14, 181,
- 142, 108, 112, 130, 15, 124, 0, 195, 28, 170,
- 128, 7, 67, 188, 161, 11, 145, 140, 3, 30,
- 192, 112, 235, 66, 128, 114, 14, 62, 85, 67,
- 22, 70, 98, 51, 17, 168, 60, 38, 234, 81,
- 140, 3, 218, 65, 159, 1, 12, 0, 31, 206,
- 31, 64, 124, 164, 191, 209, 2, 49, 50, 12,
- 129, 195, 62, 37, 28, 145, 136, 61, 188, 27,
- 16, 138, 8, 131, 255, 39, 158, 81, 15, 125,
- 29, 128, 4, 60, 144, 129, 160, 32, 240, 139,
- 83, 120, 212, 26, 186, 152, 197, 44, 220, 108,
- 141, 223, 164, 105, 29, 225, 144, 134, 138, 87,
- 1, 11, 224, 16, 103, 25, 240, 176, 0, 50,
- 32, 1, 250, 240, 13, 116, 198, 9, 138, 160,
- 8, 82, 212, 7, 142, 208, 8, 240, 5, 8,
- 91, 16, 77, 31, 147, 7, 123, 48, 8, 63,
- 114, 71, 82, 160, 5, 53, 224, 1, 165, 38,
- 78, 9, 145, 2, 132, 164, 2, 14, 160, 15,
- 247, 80, 15, 234, 0, 0, 254, 244, 30, 239,
- 129, 15, 235, 112, 31, 40, 232, 79, 255, 145,
- 130, 239, 209, 0, 250, 209, 116, 79, 247, 12,
- 173, 0, 45, 216, 112, 94, 21, 32, 76, 52,
- 80, 40, 11, 32, 0, 232, 183, 86, 60, 192,
- 1, 51, 80, 1, 230, 112, 14, 245, 80, 75,
- 7, 80, 41, 188, 113, 14, 117, 98, 87, 236,
- 96, 12, 231, 240, 14, 183, 37, 3, 14, 240,
- 13, 195, 0, 11, 156, 80, 7, 65, 119, 7,
- 107, 16, 134, 80, 81, 43, 90, 48, 29, 86,
- 208, 4, 79, 176, 4, 73, 128, 5, 12, 18,
- 7, 93, 128, 103, 128, 64, 37, 19, 17, 2,
- 48, 241, 106, 246, 48, 15, 220, 48, 85, 221,
- 80, 75, 47, 104, 0, 246, 100, 130, 234, 16,
- 136, 245, 240, 13, 4, 128, 72, 136, 4, 39,
- 249, 244, 30, 167, 16, 80, 173, 160, 39, 204,
- 255, 208, 97, 244, 48, 47, 110, 149, 3, 161,
- 160, 15, 12, 16, 10, 184, 0, 14, 57, 178,
- 87, 6, 240, 40, 240, 209, 0, 9, 160, 27,
- 217, 96, 12, 47, 150, 98, 183, 32, 91, 6,
- 69, 15, 161, 160, 13, 43, 101, 13, 166, 194,
- 9, 127, 80, 6, 185, 242, 7, 209, 81, 95,
- 99, 224, 6, 96, 80, 71, 144, 0, 8, 156,
- 225, 7, 136, 192, 8, 133, 80, 8, 147, 128,
- 7, 98, 160, 62, 88, 210, 1, 36, 32, 15,
- 93, 101, 14, 76, 131, 46, 1, 128, 85, 76,
- 195, 13, 223, 208, 13, 89, 69, 97, 75, 147,
- 135, 243, 16, 46, 223, 130, 94, 250, 212, 14,
- 182, 144, 12, 224, 192, 13, 246, 176, 48, 185,
- 144, 3, 10, 5, 87, 138, 130, 11, 165, 208,
- 14, 216, 192, 15, 158, 8, 131, 254, 228, 135,
- 219, 48, 138, 154, 18, 12, 203, 149, 93, 185,
- 160, 10, 197, 80, 10, 188, 32, 13, 183, 64,
- 10, 159, 240, 9, 155, 112, 9, 88, 96, 95,
- 127, 128, 8, 128, 64, 9, 110, 224, 73, 119,
- 116, 65, 128, 16, 8, 111, 48, 83, 107, 160,
- 6, 110, 16, 7, 87, 176, 16, 43, 0, 19,
- 34, 0, 2, 23, 96, 1, 175, 85, 14, 18,
- 150, 135, 220, 208, 85, 246, 240, 37, 250, 176,
- 85, 252, 208, 85, 14, 176, 24, 60, 160, 2,
- 22, 224, 3, 223, 130, 46, 34, 104, 10, 237,
- 160, 91, 121, 72, 15, 52, 255, 208, 48, 24,
- 66, 40, 111, 149, 3, 137, 165, 44, 166, 32,
- 31, 100, 146, 2, 55, 80, 148, 69, 41, 2,
- 28, 224, 13, 172, 48, 12, 161, 144, 14, 2,
- 80, 121, 199, 149, 14, 197, 80, 76, 202, 192,
- 11, 219, 16, 15, 98, 112, 9, 52, 246, 7,
- 123, 144, 6, 128, 118, 144, 214, 67, 8, 146,
- 240, 103, 41, 227, 7, 147, 0, 90, 110, 96,
- 8, 48, 224, 2, 149, 131, 57, 136, 17, 18,
- 22, 112, 13, 61, 19, 13, 206, 128, 12, 180,
- 208, 11, 218, 160, 52, 218, 224, 12, 229, 80,
- 14, 180, 85, 35, 228, 53, 3, 14, 176, 141,
- 227, 226, 80, 60, 176, 1, 15, 240, 0, 6,
- 96, 10, 221, 32, 15, 238, 98, 33, 199, 53,
- 10, 122, 163, 10, 215, 64, 13, 150, 41, 0,
- 181, 17, 133, 9, 229, 147, 163, 32, 0, 8,
- 48, 12, 152, 2, 144, 116, 0, 1, 57, 73,
- 154, 195, 228, 0, 2, 160, 15, 19, 67, 10,
- 131, 67, 9, 87, 177, 7, 123, 80, 77, 111,
- 224, 8, 144, 144, 7, 53, 101, 8, 124, 48,
- 9, 219, 20, 56, 112, 48, 4, 147, 3, 62,
- 85, 38, 2, 228, 177, 1, 232, 112, 13, 239,
- 48, 151, 64, 227, 51, 209, 208, 12, 209, 0,
- 13, 183, 5, 58, 216, 96, 45, 237, 200, 15,
- 12, 240, 80, 51, 32, 3, 62, 192, 15, 214,
- 34, 15, 13, 83, 121, 90, 83, 12, 202, 53,
- 13, 163, 255, 64, 13, 192, 112, 54, 177, 0,
- 12, 194, 80, 10, 216, 160, 13, 182, 160, 12,
- 189, 208, 13, 221, 192, 13, 202, 176, 12, 176,
- 64, 10, 189, 128, 9, 131, 131, 7, 116, 80,
- 1, 8, 37, 10, 252, 80, 86, 252, 16, 10,
- 159, 192, 11, 46, 197, 49, 114, 0, 8, 135,
- 3, 9, 139, 48, 9, 133, 224, 21, 149, 224,
- 8, 241, 181, 43, 145, 19, 3, 82, 70, 62,
- 118, 103, 51, 55, 115, 96, 59, 3, 13, 203,
- 73, 14, 204, 64, 13, 185, 0, 1, 21, 80,
- 146, 15, 6, 97, 210, 34, 15, 246, 0, 1,
- 175, 48, 13, 215, 144, 12, 168, 0, 14, 185,
- 80, 1, 135, 53, 59, 162, 240, 41, 37, 230,
- 10, 186, 144, 10, 241, 39, 127, 242, 151, 10,
- 62, 186, 10, 165, 184, 11, 255, 120, 9, 128,
- 3, 7, 94, 128, 7, 63, 102, 9, 91, 147,
- 11, 74, 90, 47, 154, 16, 144, 151, 192, 76,
- 110, 224, 5, 199, 115, 61, 132, 80, 8, 136,
- 32, 8, 152, 16, 3, 146, 227, 95, 116, 183,
- 63, 54, 116, 101, 25, 48, 166, 22, 97, 1,
- 239, 0, 13, 208, 64, 13, 2, 88, 1, 211,
- 0, 14, 184, 16, 97, 220, 80, 13, 200, 128,
- 12, 105, 179, 51, 197, 128, 14, 37, 54, 13,
- 197, 128, 13, 216, 80, 12, 211, 96, 14, 206,
- 82, 13, 243, 208, 11, 111, 86, 168, 100, 70,
- 11, 164, 176, 13, 235, 149, 155, 127, 255, 22,
- 8, 123, 144, 7, 32, 115, 7, 58, 86, 65,
- 59, 38, 6, 150, 96, 7, 133, 144, 7, 180,
- 134, 7, 112, 80, 65, 112, 112, 5, 84, 208,
- 95, 47, 99, 63, 228, 150, 16, 54, 180, 2,
- 18, 81, 37, 85, 2, 2, 168, 9, 15, 84,
- 83, 151, 199, 112, 12, 97, 166, 75, 179, 128,
- 12, 182, 80, 53, 180, 101, 15, 163, 144, 14,
- 175, 0, 13, 164, 35, 97, 182, 80, 13, 201,
- 160, 54, 170, 96, 15, 158, 48, 60, 156, 192,
- 154, 142, 17, 43, 84, 10, 50, 138, 195, 8,
- 136, 112, 7, 15, 249, 7, 142, 35, 6, 69,
- 144, 0, 47, 144, 173, 47, 195, 150, 242, 83,
- 170, 252, 83, 62, 15, 33, 17, 89, 166, 62,
- 234, 83, 38, 240, 233, 44, 115, 202, 102, 119,
- 169, 12, 233, 52, 12, 164, 112, 42, 156, 144,
- 172, 115, 195, 7, 196, 120, 5, 35, 196, 1,
- 43, 112, 2, 48, 192, 2, 252, 218, 175, 138,
- 70, 63, 248, 227, 173, 2, 59, 176, 4, 91,
- 176, 4, 203, 16, 146, 118, 101, 20, 113, 17,
- 33, 1, 106, 158, 246, 176, 16, 59, 64, 160,
- 22, 106, 162, 54, 18, 165, 134, 18, 167, 38,
- 67, 95, 106, 176, 43, 23, 166, 169, 58, 2,
- 1, 52, 64, 156, 182, 19, 63, 240, 3, 144,
- 197, 4, 40, 91, 4, 205, 214, 4, 70, 134,
- 7, 213, 70, 7, 89, 16, 179, 8, 52, 179,
- 5, 244, 105, 43, 255, 84, 177, 37, 145, 114,
- 50, 196, 177, 250, 147, 57, 32, 43, 178, 176,
- 166, 2, 8, 196, 4, 103, 17, 5, 98, 225,
- 111, 70, 224, 111, 78, 49, 21, 68, 177, 5,
- 253, 6, 66, 77, 240, 110, 98, 1, 73, 144,
- 116, 22, 70, 112, 22, 88, 80, 4, 105, 241,
- 5, 90, 32, 6, 40, 123, 66, 221, 214, 1,
- 21, 107, 106, 59, 203, 179, 166, 106, 67, 230,
- 70, 64, 177, 22, 4, 74, 80, 4, 75, 48,
- 29, 106, 0, 5, 74, 97, 180, 98, 33, 5,
- 239, 102, 6, 142, 80, 20, 85, 128, 4, 91,
- 176, 5, 96, 144, 7, 2, 39, 36, 154, 4,
- 5, 93, 240, 64, 80, 96, 109, 118, 115, 5,
- 73, 178, 22, 5, 169, 5, 77, 224, 64, 108,
- 224, 6, 95, 192, 77, 77, 192, 4, 63, 176,
- 66, 126, 68, 182, 27, 123, 176, 55, 132, 19,
- 120, 39, 180, 98, 224, 83, 81, 112, 115, 141,
- 32, 21, 72, 128, 4, 73, 161, 180, 78, 27,
- 112, 108, 208, 107, 92, 224, 110, 68, 17, 108,
- 107, 231, 6, 15, 148, 4, 85, 96, 4, 70,
- 112, 4, 99, 128, 187, 75, 112, 5, 85, 208,
- 5, 144, 148, 4, 73, 7, 73, 85, 80, 188,
- 93, 32, 5, 106, 48, 20, 122, 166, 110, 180,
- 198, 4, 98, 155, 185, 41, 112, 124, 222, 122,
- 24, 194, 249, 185, 89, 128, 7, 119, 192, 118,
- 111, 112, 21, 148, 101, 6, 114, 128, 111, 135,
- 255, 192, 6, 83, 176, 113, 107, 80, 9, 248,
- 198, 111, 99, 48, 6, 10, 114, 4, 91, 20,
- 108, 17, 148, 113, 78, 64, 5, 173, 113, 70,
- 103, 52, 14, 244, 171, 70, 9, 114, 32, 174,
- 161, 187, 72, 210, 7, 113, 128, 6, 104, 64,
- 43, 96, 48, 73, 238, 246, 7, 104, 208, 169,
- 67, 102, 114, 37, 224, 1, 115, 183, 185, 61,
- 171, 30, 37, 160, 67, 229, 2, 20, 86, 16,
- 124, 94, 144, 7, 144, 192, 189, 107, 144, 8,
- 149, 112, 8, 149, 192, 8, 131, 144, 111, 108,
- 96, 6, 128, 203, 73, 129, 48, 6, 117, 224,
- 26, 96, 68, 5, 44, 76, 4, 86, 247, 194,
- 48, 252, 194, 99, 148, 117, 49, 44, 14, 117,
- 144, 111, 61, 5, 6, 119, 176, 103, 115, 16,
- 7, 113, 96, 5, 70, 98, 109, 122, 6, 6,
- 85, 112, 5, 62, 208, 66, 11, 108, 124, 14,
- 76, 24, 135, 65, 78, 7, 36, 6, 192, 71,
- 192, 115, 16, 6, 99, 192, 83, 101, 112, 61,
- 140, 176, 189, 141, 240, 115, 69, 81, 77, 131,
- 208, 70, 91, 64, 108, 235, 187, 116, 17, 96,
- 3, 253, 96, 74, 185, 49, 117, 193, 33, 122,
- 187, 49, 28, 190, 84, 28, 217, 176, 14, 90,
- 53, 15, 221, 224, 117, 23, 7, 23, 103, 145,
- 83, 108, 24, 8, 141, 16, 8, 112, 145, 29,
- 121, 224, 21, 4, 231, 4, 71, 140, 17, 40,
- 231, 129, 53, 132, 24, 138, 255, 193, 24, 129,
- 128, 6, 74, 49, 145, 78, 97, 5, 129, 144,
- 6, 101, 240, 35, 108, 48, 145, 27, 51, 9,
- 147, 16, 8, 114, 192, 120, 73, 116, 8, 17,
- 57, 6, 96, 212, 116, 54, 160, 0, 168, 137,
- 121, 155, 39, 80, 191, 241, 121, 167, 247, 27,
- 193, 225, 198, 190, 116, 28, 231, 32, 15, 163,
- 128, 0, 252, 48, 12, 174, 71, 164, 111, 52,
- 29, 93, 224, 6, 129, 128, 8, 104, 144, 129,
- 106, 224, 5, 177, 82, 6, 52, 23, 7, 101,
- 0, 6, 69, 96, 200, 40, 39, 189, 167, 101,
- 44, 120, 247, 0, 0, 224, 14, 158, 224, 4,
- 78, 16, 113, 90, 0, 7, 101, 208, 5, 81,
- 160, 8, 131, 176, 6, 94, 225, 20, 112, 116,
- 160, 187, 6, 6, 15, 105, 129, 207, 100, 69,
- 238, 16, 1, 19, 160, 1, 60, 112, 33, 11,
- 96, 15, 103, 76, 31, 129, 184, 14, 190, 81,
- 127, 225, 176, 14, 250, 188, 14, 219, 96, 13,
- 253, 39, 28, 222, 16, 14, 230, 144, 14, 52,
- 80, 1, 234, 194, 9, 172, 224, 9, 134, 176,
- 71, 124, 16, 56, 16, 84, 7, 99, 48, 7,
- 121, 148, 21, 140, 80, 9, 134, 16, 43, 122,
- 160, 6, 222, 68, 124, 30, 16, 189, 52, 113,
- 24, 30, 96, 64, 10, 80, 15, 206, 135, 31,
- 80, 151, 0, 226, 64, 4, 6, 66, 4, 117,
- 16, 7, 197, 107, 206, 243, 118, 6, 108, 192,
- 6, 135, 255, 144, 8, 246, 21, 8, 125, 128,
- 194, 164, 116, 15, 253, 81, 3, 233, 183, 74,
- 242, 12, 117, 234, 224, 143, 32, 85, 127, 43,
- 34, 38, 249, 231, 102, 181, 16, 82, 110, 252,
- 13, 145, 40, 3, 2, 192, 152, 164, 136, 128,
- 61, 124, 36, 103, 16, 8, 124, 208, 5, 125,
- 112, 181, 104, 240, 8, 179, 34, 204, 118, 209,
- 5, 214, 166, 4, 5, 166, 196, 167, 245, 1,
- 35, 96, 64, 191, 64, 136, 239, 65, 31, 25,
- 181, 130, 3, 128, 130, 241, 209, 0, 27, 197,
- 116, 141, 132, 5, 115, 68, 111, 83, 16, 5,
- 110, 160, 8, 84, 224, 14, 195, 96, 10, 140,
- 226, 211, 63, 141, 53, 250, 160, 31, 245, 160,
- 12, 96, 70, 102, 66, 250, 27, 40, 162, 34,
- 210, 160, 11, 181, 16, 14, 74, 72, 0, 237,
- 16, 208, 1, 184, 0, 21, 240, 0, 119, 98,
- 12, 61, 226, 35, 145, 27, 95, 224, 252, 7,
- 101, 23, 6, 87, 32, 5, 101, 112, 56, 56,
- 214, 5, 115, 144, 21, 95, 192, 7, 59, 112,
- 177, 206, 76, 16, 136, 97, 64, 5, 184, 78,
- 51, 232, 14, 234, 224, 30, 238, 208, 130, 248,
- 48, 215, 28, 96, 3, 24, 161, 1, 28, 16,
- 31, 5, 98, 125, 140, 52, 126, 4, 245, 11,
- 230, 4, 86, 50, 48, 40, 56, 242, 0, 8,
- 240, 10, 50, 128, 1, 19, 64, 15, 184, 144,
- 12, 210, 112, 14, 180, 148, 34, 252, 255, 28,
- 14, 223, 64, 48, 54, 160, 1, 253, 176, 14,
- 234, 112, 167, 16, 48, 76, 247, 112, 10, 92,
- 88, 7, 190, 2, 68, 198, 187, 21, 61, 213,
- 70, 86, 0, 5, 112, 80, 134, 77, 144, 113,
- 87, 240, 4, 115, 176, 36, 59, 80, 17, 30,
- 157, 16, 235, 81, 78, 231, 180, 38, 236, 180,
- 31, 48, 104, 130, 248, 224, 130, 240, 8, 31,
- 42, 152, 136, 52, 152, 0, 250, 161, 14, 220,
- 160, 13, 211, 64, 15, 41, 250, 220, 63, 152,
- 3, 16, 192, 0, 62, 48, 81, 221, 194, 3,
- 97, 165, 15, 220, 224, 221, 148, 50, 122, 219,
- 160, 14, 189, 176, 13, 221, 85, 11, 202, 112,
- 156, 232, 0, 58, 140, 201, 82, 156, 112, 9,
- 118, 241, 7, 107, 96, 6, 97, 152, 7, 122,
- 38, 214, 88, 155, 4, 70, 176, 4, 113, 16,
- 116, 110, 144, 7, 142, 240, 6, 124, 96, 18,
- 230, 1, 19, 35, 160, 19, 14, 128, 135, 232,
- 4, 75, 244, 180, 206, 145, 162, 224, 243, 68,
- 0, 250, 96, 79, 138, 24, 15, 253, 112, 79,
- 137, 248, 12, 238, 240, 12, 202, 160, 13, 215,
- 240, 10, 244, 16, 137, 24, 114, 33, 57, 176,
- 0, 137, 169, 0, 161, 192, 167, 252, 32, 92,
- 113, 110, 38, 0, 64, 32, 184, 145, 13, 189,
- 225, 11, 172, 240, 102, 206, 96, 82, 232, 208,
- 153, 42, 117, 11, 198, 192, 133, 138, 160, 7,
- 96, 0, 7, 132, 255, 16, 8, 87, 16, 204,
- 93, 192, 6, 112, 49, 73, 135, 115, 99, 129,
- 224, 113, 136, 99, 8, 196, 104, 140, 9, 145,
- 37, 224, 176, 15, 251, 16, 0, 1, 160, 15,
- 245, 176, 14, 236, 224, 14, 54, 48, 39, 133,
- 24, 136, 231, 160, 14, 212, 216, 14, 220, 80,
- 39, 223, 192, 211, 60, 125, 0, 112, 114, 15,
- 235, 208, 11, 201, 208, 12, 204, 48, 13, 79,
- 9, 40, 59, 73, 40, 163, 240, 0, 248, 50,
- 13, 184, 32, 33, 142, 162, 130, 254, 212, 0,
- 162, 72, 138, 171, 224, 102, 201, 80, 12, 174,
- 106, 230, 154, 192, 138, 166, 2, 11, 255, 216,
- 7, 253, 237, 5, 251, 149, 29, 123, 22, 114,
- 253, 29, 71, 215, 211, 6, 212, 100, 71, 118,
- 113, 5, 225, 138, 37, 58, 241, 90, 93, 98,
- 14, 242, 224, 0, 1, 32, 141, 141, 82, 128,
- 136, 52, 141, 108, 34, 146, 237, 240, 13, 235,
- 242, 11, 14, 69, 157, 140, 242, 12, 231, 128,
- 12, 201, 160, 10, 230, 16, 81, 134, 21, 40,
- 147, 152, 14, 33, 6, 10, 184, 240, 13, 150,
- 152, 121, 254, 225, 79, 28, 80, 38, 234, 208,
- 207, 153, 178, 10, 199, 240, 136, 206, 158, 11,
- 211, 160, 10, 184, 240, 54, 245, 217, 11, 189,
- 192, 154, 253, 157, 60, 1, 156, 204, 122, 6,
- 192, 101, 32, 114, 68, 124, 95, 131, 48, 233,
- 86, 112, 145, 14, 81, 135, 2, 52, 91, 80,
- 255, 197, 140, 217, 168, 157, 158, 142, 85, 245,
- 62, 239, 209, 114, 45, 213, 194, 15, 98, 53,
- 152, 12, 208, 15, 166, 128, 13, 99, 206, 140,
- 216, 176, 86, 243, 178, 225, 133, 146, 11, 153,
- 80, 10, 165, 144, 137, 191, 48, 41, 40, 104,
- 3, 146, 98, 0, 12, 64, 0, 173, 151, 13,
- 154, 34, 12, 224, 249, 10, 245, 146, 9, 163,
- 176, 241, 189, 32, 13, 176, 96, 10, 116, 32,
- 144, 152, 48, 7, 124, 220, 8, 67, 196, 120,
- 120, 230, 6, 70, 80, 5, 105, 240, 89, 140,
- 208, 199, 128, 96, 8, 201, 68, 63, 116, 152,
- 16, 56, 209, 1, 14, 48, 91, 233, 110, 14,
- 90, 85, 85, 209, 89, 45, 109, 194, 52, 61,
- 143, 46, 14, 208, 47, 20, 101, 202, 246, 128,
- 0, 8, 160, 0, 191, 208, 13, 237, 88, 225,
- 193, 164, 147, 147, 184, 244, 197, 128, 11, 47,
- 26, 148, 192, 205, 1, 26, 96, 51, 38, 192,
- 1, 238, 48, 138, 173, 144, 55, 161, 16, 137,
- 135, 21, 42, 195, 176, 12, 243, 233, 9, 253,
- 144, 5, 224, 165, 49, 129, 64, 89, 193, 168,
- 155, 41, 163, 155, 136, 19, 140, 143, 224, 8,
- 122, 32, 90, 66, 192, 173, 48, 145, 2, 25,
- 209, 1, 246, 208, 151, 206, 80, 13, 207, 18,
- 45, 242, 0, 15, 242, 224, 233, 242, 176, 15,
- 210, 226, 37, 218, 34, 3, 97, 181, 1, 219,
- 56, 152, 59, 113, 15, 255, 255, 201, 15, 121,
- 216, 46, 239, 194, 225, 146, 8, 132, 161, 160,
- 9, 197, 176, 33, 47, 210, 3, 69, 217, 3,
- 30, 112, 3, 31, 160, 3, 28, 224, 9, 7,
- 243, 11, 162, 240, 148, 12, 3, 1, 136, 133,
- 13, 234, 48, 49, 203, 0, 16, 167, 174, 24,
- 122, 20, 167, 140, 25, 51, 82, 180, 228, 249,
- 51, 73, 16, 33, 66, 139, 238, 220, 241, 131,
- 72, 210, 34, 69, 113, 176, 188, 112, 1, 3,
- 69, 1, 144, 33, 69, 134, 16, 1, 2, 196,
- 5, 122, 240, 162, 149, 171, 166, 140, 22, 173,
- 106, 230, 180, 105, 195, 5, 206, 38, 184, 105,
- 244, 36, 200, 152, 49, 67, 133, 143, 7, 12,
- 248, 41, 80, 208, 66, 197, 15, 125, 10, 30,
- 252, 234, 246, 75, 6, 79, 8, 16, 70, 165,
- 27, 5, 33, 29, 58, 106, 89, 237, 153, 234,
- 103, 128, 43, 132, 92, 185, 94, 137, 18, 245,
- 42, 199, 43, 94, 198, 54, 137, 17, 5, 65,
- 6, 14, 184, 244, 66, 1, 177, 119, 239, 25,
- 47, 82, 151, 2, 41, 234, 99, 6, 208, 27,
- 64, 128, 204, 232, 41, 148, 199, 144, 33, 76,
- 98, 4, 49, 98, 244, 231, 15, 31, 44, 49,
- 56, 162, 248, 40, 210, 114, 1, 146, 37, 76,
- 34, 184, 70, 14, 92, 180, 104, 206, 170, 85,
- 227, 86, 206, 28, 54, 112, 229, 202, 129, 131,
- 71, 79, 167, 0, 7, 10, 134, 18, 13, 170,
- 162, 133, 255, 133, 26, 250, 190, 181, 179, 199,
- 83, 2, 13, 169, 162, 138, 161, 83, 5, 45,
- 43, 180, 98, 14, 226, 245, 211, 247, 75, 159,
- 61, 171, 163, 94, 77, 211, 183, 141, 21, 172,
- 86, 152, 240, 136, 2, 238, 91, 128, 130, 80,
- 252, 134, 145, 34, 133, 105, 18, 163, 70, 122,
- 242, 228, 41, 212, 200, 81, 35, 70, 128, 212,
- 252, 9, 164, 87, 207, 29, 52, 127, 34, 79,
- 174, 124, 217, 114, 136, 20, 70, 40, 161, 132,
- 11, 138, 185, 230, 64, 112, 200, 33, 231, 154,
- 104, 22, 76, 173, 65, 116, 22, 88, 32, 29,
- 123, 230, 249, 133, 31, 126, 24, 8, 74, 129,
- 25, 100, 216, 128, 1, 125, 184, 153, 39, 29,
- 28, 128, 136, 110, 20, 81, 208, 41, 230, 21,
- 106, 128, 113, 17, 152, 102, 126, 233, 231, 23,
- 109, 146, 233, 101, 25, 110, 166, 81, 165, 154,
- 101, 140, 97, 165, 60, 76, 2, 193, 131, 14,
- 8, 42, 128, 205, 30, 123, 176, 249, 229, 151,
- 94, 202, 35, 228, 14, 51, 222, 152, 195, 141,
- 71, 26, 129, 164, 145, 66, 222, 176, 34, 14,
- 55, 12, 9, 4, 144, 59, 180, 24, 199, 31,
- 254, 252, 51, 19, 133, 21, 76, 16, 176, 132,
- 13, 138, 97, 230, 192, 206, 82, 43, 39, 26,
- 104, 160, 185, 38, 194, 5, 16, 144, 103, 31,
- 115, 230, 153, 39, 67, 6, 20, 224, 65, 6,
- 5, 146, 44, 71, 158, 81, 74, 132, 255, 224,
- 149, 87, 138, 41, 38, 157, 105, 224, 161, 134,
- 24, 89, 100, 137, 229, 210, 96, 154, 81, 165,
- 20, 91, 122, 233, 165, 27, 79, 151, 225, 165,
- 151, 77, 54, 185, 196, 13, 53, 178, 8, 165,
- 152, 80, 70, 9, 197, 30, 81, 94, 45, 133,
- 150, 77, 222, 72, 227, 15, 64, 16, 41, 4,
- 146, 66, 38, 161, 228, 145, 52, 252, 184, 146,
- 145, 60, 248, 24, 83, 50, 143, 250, 51, 211,
- 63, 20, 62, 80, 115, 132, 17, 64, 160, 7,
- 29, 102, 222, 164, 19, 26, 5, 175, 121, 101,
- 129, 10, 16, 72, 82, 38, 63, 255, 180, 167,
- 2, 28, 70, 153, 230, 154, 100, 80, 17, 5,
- 135, 10, 114, 72, 167, 24, 215, 28, 197, 230,
- 154, 96, 102, 209, 101, 150, 89, 42, 149, 5,
- 95, 87, 92, 161, 229, 22, 128, 97, 129, 133,
- 20, 83, 13, 81, 163, 11, 49, 50, 25, 101,
- 97, 233, 194, 178, 196, 146, 82, 62, 193, 164,
- 143, 51, 250, 8, 228, 143, 66, 22, 209, 24,
- 145, 73, 38, 89, 68, 144, 57, 98, 240, 71,
- 50, 22, 40, 91, 246, 228, 144, 154, 21, 193,
- 3, 104, 61, 176, 96, 148, 106, 235, 132, 134,
- 153, 8, 139, 180, 71, 30, 108, 100, 154, 137,
- 27, 115, 204, 1, 103, 148, 92, 222, 97, 176,
- 25, 112, 210, 161, 39, 157, 116, 66, 17, 69,
- 149, 80, 176, 193, 5, 23, 100, 118, 169, 165,
- 150, 84, 170, 174, 255, 186, 150, 85, 86, 97,
- 133, 149, 85, 106, 185, 165, 19, 83, 231, 48,
- 36, 141, 52, 196, 136, 228, 236, 72, 70, 121,
- 248, 225, 92, 52, 249, 228, 19, 67, 230, 184,
- 34, 9, 40, 218, 184, 99, 17, 136, 238, 48,
- 164, 142, 145, 145, 53, 25, 101, 192, 65, 66,
- 1, 64, 19, 60, 48, 220, 131, 22, 232, 169,
- 150, 230, 5, 220, 170, 96, 26, 112, 156, 113,
- 70, 27, 153, 170, 65, 38, 152, 114, 138, 161,
- 230, 154, 81, 174, 41, 7, 23, 10, 229, 145,
- 171, 20, 92, 156, 225, 166, 20, 109, 110, 169,
- 101, 151, 172, 91, 159, 218, 107, 88, 190, 238,
- 4, 19, 74, 2, 9, 36, 141, 245, 242, 128,
- 227, 236, 221, 31, 54, 219, 146, 63, 212, 16,
- 131, 9, 60, 224, 128, 195, 11, 65, 38, 185,
- 3, 143, 33, 98, 144, 236, 133, 146, 255, 14,
- 124, 122, 193, 1, 20, 193, 4, 236, 77, 200,
- 64, 1, 205, 115, 129, 64, 2, 4, 166, 145,
- 71, 103, 203, 145, 57, 230, 24, 87, 130, 137,
- 230, 209, 98, 74, 49, 71, 20, 20, 53, 153,
- 6, 27, 110, 90, 89, 230, 156, 94, 98, 191,
- 197, 26, 99, 72, 225, 69, 25, 82, 136, 195,
- 19, 156, 240, 196, 28, 212, 112, 7, 66, 180,
- 193, 15, 234, 201, 131, 31, 10, 193, 7, 59,
- 192, 193, 14, 118, 160, 195, 217, 4, 129, 183,
- 50, 116, 161, 12, 248, 249, 2, 21, 156, 247,
- 255, 2, 142, 36, 75, 89, 212, 35, 97, 245,
- 86, 144, 130, 235, 101, 207, 4, 37, 80, 193,
- 12, 232, 49, 13, 92, 168, 166, 70, 193, 56,
- 134, 189, 116, 161, 11, 87, 52, 163, 38, 224,
- 192, 134, 210, 80, 100, 52, 92, 104, 3, 25,
- 203, 216, 134, 167, 180, 17, 141, 106, 21, 195,
- 20, 167, 128, 5, 43, 124, 17, 6, 60, 104,
- 1, 12, 106, 64, 67, 33, 172, 248, 136, 65,
- 252, 161, 13, 118, 104, 3, 28, 240, 224, 24,
- 47, 108, 209, 14, 87, 24, 2, 8, 65, 216,
- 145, 19, 80, 102, 132, 37, 100, 163, 72, 6,
- 119, 194, 20, 154, 64, 4, 115, 92, 33, 3,
- 176, 225, 140, 100, 152, 79, 23, 187, 216, 133,
- 213, 110, 152, 62, 97, 36, 35, 25, 194, 24,
- 90, 75, 104, 129, 175, 89, 184, 2, 28, 161,
- 248, 133, 47, 124, 193, 138, 75, 240, 97, 14,
- 95, 248, 2, 26, 208, 224, 5, 4, 34, 34,
- 15, 140, 128, 196, 36, 16, 241, 135, 57, 204,
- 1, 11, 68, 112, 129, 25, 93, 224, 2, 22,
- 164, 81, 141, 109, 100, 101, 224, 40, 19, 130,
- 21, 124, 0, 133, 115, 164, 101, 45, 15, 80,
- 15, 252, 29, 50, 95, 250, 146, 197, 49, 164,
- 113, 195, 170, 173, 2, 59, 195, 88, 135, 19,
- 183, 198, 9, 78, 24, 226, 15, 183, 242, 131,
- 32, 208, 128, 8, 63, 252, 225, 10, 88, 16,
- 2, 11, 78, 121, 77, 22, 79, 176, 0, 6,
- 170, 84, 227, 26, 91, 249, 77, 192, 169, 49,
- 4, 176, 148, 229, 44, 231, 152, 2, 116, 166,
- 51, 5, 31, 88, 193, 10, 198, 25, 130, 110,
- 198, 83, 158, 40, 56, 1, 12, 236, 121, 79,
- 124, 158, 128, 155, 241, 4, 103, 63, 253, 153,
- 50, 113, 190, 51, 150, 229, 68, 39, 59, 219,
- 121, 80, 132, 38, 244, 160, 239, 100, 232, 56,
- 249, 249, 207, 233, 5, 4, 0, 59 );
-
-implementation
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: logos.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit logos;
+
+interface
+
+const
+ CONTEXT_TYPE_IMAGE_GIF = 'Content-Type: image/gif';
+
+ zend_logo: array [0..4439] of byte = (
+ 71, 73, 70, 56, 57, 97, 100, 0, 58, 0,
+ 247, 255, 0, 255, 255, 255, 8, 8, 8, 24,
+ 24, 24, 57, 57, 57, 74, 74, 74, 90, 90,
+ 90, 99, 99, 99, 123, 123, 123, 132, 132, 132,
+ 140, 140, 140, 148, 148, 148, 189, 189, 189, 214,
+ 214, 214, 231, 231, 231, 239, 239, 239, 90, 99,
+ 99, 222, 231, 239, 57, 66, 74, 165, 173, 181,
+ 0, 8, 16, 214, 222, 231, 57, 66, 82, 16,
+ 33, 66, 0, 8, 24, 24, 41, 82, 222, 231,
+ 255, 57, 66, 90, 198, 206, 231, 181, 189, 214,
+ 99, 107, 132, 0, 8, 33, 189, 198, 231, 123,
+ 132, 165, 148, 165, 231, 123, 140, 206, 123, 148,
+ 239, 49, 66, 132, 24, 33, 66, 49, 74, 165,
+ 214, 222, 255, 206, 214, 247, 181, 189, 222, 148,
+ 156, 189, 123, 132, 173, 156, 173, 247, 132, 148,
+ 214, 99, 115, 181, 49, 57, 90, 41, 49, 82,
+ 90, 107, 181, 82, 99, 173, 24, 33, 74, 57,
+ 82, 189, 49, 74, 173, 16, 24, 57, 8, 16,
+ 49, 198, 206, 247, 181, 189, 231, 165, 173, 214,
+ 99, 107, 148, 74, 82, 123, 140, 156, 239, 66,
+ 74, 115, 115, 132, 222, 41, 49, 90, 57, 74,
+ 165, 49, 66, 148, 49, 66, 156, 41, 57, 140,
+ 57, 82, 206, 33, 49, 123, 57, 82, 214, 16,
+ 24, 66, 198, 206, 255, 181, 189, 239, 189, 198,
+ 255, 156, 165, 214, 140, 148, 198, 132, 140, 189,
+ 115, 123, 173, 90, 99, 148, 132, 148, 247, 123,
+ 140, 239, 107, 123, 214, 115, 132, 231, 57, 66,
+ 115, 107, 123, 222, 115, 132, 239, 57, 66, 123,
+ 99, 115, 214, 90, 107, 214, 74, 90, 181, 74,
+ 90, 189, 66, 82, 173, 57, 74, 173, 49, 66,
+ 165, 66, 90, 231, 49, 66, 173, 24, 33, 90,
+ 41, 57, 156, 33, 49, 140, 8, 16, 66, 181,
+ 189, 247, 165, 173, 231, 148, 156, 214, 132, 140,
+ 198, 115, 123, 181, 82, 90, 148, 49, 57, 115,
+ 99, 115, 231, 90, 107, 231, 82, 99, 214, 82,
+ 99, 222, 74, 90, 206, 82, 99, 231, 66, 82,
+ 189, 33, 41, 99, 57, 74, 189, 57, 74, 198,
+ 57, 74, 206, 49, 66, 181, 41, 57, 165, 24,
+ 33, 99, 16, 24, 82, 8, 16, 74, 173, 181,
+ 247, 173, 181, 255, 165, 173, 247, 140, 148, 214,
+ 156, 165, 239, 165, 173, 255, 156, 165, 247, 132,
+ 140, 214, 140, 148, 231, 99, 107, 173, 107, 115,
+ 189, 115, 123, 206, 123, 132, 222, 99, 107, 189,
+ 82, 90, 165, 90, 99, 181, 74, 82, 156, 82,
+ 90, 173, 90, 99, 189, 66, 74, 140, 57, 66,
+ 140, 57, 66, 148, 41, 49, 115, 74, 90, 222,
+ 74, 90, 231, 41, 49, 132, 66, 82, 222, 33,
+ 41, 115, 33, 41, 123, 24, 33, 107, 24, 33,
+ 123, 16, 24, 90, 148, 156, 247, 140, 148, 239,
+ 132, 140, 231, 140, 148, 247, 132, 140, 239, 123,
+ 132, 231, 107, 115, 206, 123, 132, 239, 123, 132,
+ 247, 99, 107, 206, 99, 107, 214, 82, 90, 181,
+ 90, 99, 206, 49, 57, 148, 41, 49, 148, 33,
+ 41, 140, 239, 239, 247, 247, 247, 255, 198, 198,
+ 206, 214, 214, 222, 173, 173, 181, 189, 189, 198,
+ 148, 148, 156, 156, 156, 165, 231, 231, 247, 239,
+ 239, 255, 173, 173, 189, 90, 90, 99, 231, 231,
+ 255, 222, 222, 247, 140, 140, 156, 66, 66, 74,
+ 132, 132, 148, 198, 198, 222, 123, 123, 140, 173,
+ 173, 198, 107, 107, 123, 222, 222, 255, 57, 57,
+ 66, 49, 49, 57, 156, 156, 181, 198, 198, 231,
+ 140, 140, 165, 181, 181, 214, 90, 90, 107, 214,
+ 214, 255, 165, 165, 198, 82, 82, 99, 123, 123,
+ 148, 74, 74, 90, 115, 115, 140, 33, 33, 41,
+ 99, 99, 123, 156, 156, 198, 90, 90, 115, 132,
+ 132, 173, 173, 173, 231, 165, 165, 222, 24, 24,
+ 33, 82, 82, 115, 156, 156, 222, 115, 115, 165,
+ 57, 57, 82, 107, 107, 156, 123, 123, 181, 33,
+ 33, 49, 156, 156, 231, 82, 82, 123, 49, 49,
+ 74, 107, 107, 165, 74, 74, 115, 148, 148, 231,
+ 57, 57, 90, 41, 41, 66, 82, 82, 132, 66,
+ 66, 107, 132, 132, 214, 140, 140, 231, 99, 99,
+ 165, 123, 123, 206, 66, 66, 115, 82, 82, 148,
+ 123, 123, 222, 66, 66, 123, 8, 8, 16, 41,
+ 41, 82, 49, 49, 99, 24, 24, 49, 41, 41,
+ 90, 24, 24, 66, 8, 8, 24, 16, 16, 57,
+ 8, 8, 41, 8, 8, 49, 8, 8, 57, 0,
+ 0, 8, 0, 0, 16, 0, 0, 24, 0, 0,
+ 0, 44, 0, 0, 0, 0, 100, 0, 58, 0,
+ 0, 8, 255, 0, 255, 9, 28, 72, 176, 160,
+ 193, 131, 8, 19, 42, 92, 200, 176, 161, 195,
+ 135, 188, 146, 37, 131, 246, 176, 226, 193, 94,
+ 188, 10, 6, 203, 104, 177, 99, 67, 99, 31,
+ 140, 25, 75, 230, 177, 227, 200, 130, 39, 75,
+ 170, 60, 104, 12, 87, 128, 103, 198, 40, 174,
+ 108, 248, 1, 87, 193, 154, 51, 115, 10, 52,
+ 198, 236, 31, 175, 15, 196, 124, 246, 58, 150,
+ 17, 227, 203, 0, 2, 122, 9, 240, 121, 140,
+ 232, 191, 94, 201, 130, 57, 229, 213, 148, 227,
+ 63, 103, 199, 96, 218, 36, 104, 172, 89, 47,
+ 140, 2, 159, 57, 19, 232, 236, 153, 206, 143,
+ 199, 130, 33, 43, 118, 213, 216, 50, 96, 31,
+ 4, 24, 139, 230, 204, 152, 179, 100, 198, 4,
+ 240, 50, 166, 2, 88, 76, 144, 200, 144, 17,
+ 53, 86, 12, 46, 69, 188, 133, 113, 114, 229,
+ 11, 55, 104, 49, 14, 1, 226, 113, 56, 118,
+ 150, 33, 72, 99, 207, 2, 252, 3, 70, 249,
+ 222, 200, 98, 199, 122, 141, 236, 165, 226, 159,
+ 138, 98, 206, 150, 113, 240, 92, 44, 192, 215,
+ 211, 169, 145, 45, 93, 214, 235, 95, 128, 148,
+ 3, 63, 4, 179, 13, 172, 54, 177, 145, 184,
+ 140, 5, 173, 172, 176, 37, 87, 146, 255, 70,
+ 23, 251, 0, 90, 119, 114, 99, 28, 158, 45,
+ 197, 45, 50, 250, 210, 228, 200, 21, 15, 52,
+ 254, 175, 169, 192, 99, 129, 41, 19, 255, 231,
+ 103, 142, 31, 203, 158, 3, 139, 45, 227, 5,
+ 19, 26, 94, 96, 204, 66, 82, 124, 187, 173,
+ 236, 94, 244, 255, 150, 173, 103, 159, 177, 24,
+ 178, 8, 120, 225, 183, 211, 49, 196, 224, 149,
+ 76, 63, 252, 252, 6, 212, 66, 252, 152, 87,
+ 145, 57, 30, 176, 132, 156, 64, 208, 112, 0,
+ 82, 52, 255, 64, 163, 155, 0, 31, 44, 67,
+ 33, 50, 74, 228, 128, 12, 52, 184, 85, 8,
+ 24, 69, 208, 32, 35, 18, 78, 14, 254, 19,
+ 82, 72, 102, 245, 211, 207, 63, 130, 49, 56,
+ 163, 69, 48, 208, 115, 16, 52, 154, 17, 20,
+ 0, 49, 215, 253, 131, 75, 60, 255, 108, 227,
+ 141, 64, 252, 208, 163, 193, 112, 60, 22, 68,
+ 204, 112, 3, 17, 3, 141, 0, 68, 182, 56,
+ 37, 49, 247, 8, 116, 207, 5, 117, 89, 117,
+ 80, 63, 19, 180, 248, 144, 61, 230, 204, 196,
+ 15, 130, 252, 120, 83, 130, 152, 30, 177, 57,
+ 80, 63, 30, 168, 224, 97, 66, 112, 186, 217,
+ 208, 61, 224, 220, 168, 210, 4, 253, 204, 80,
+ 142, 78, 13, 30, 196, 143, 7, 214, 96, 67,
+ 103, 62, 122, 90, 196, 79, 59, 24, 204, 212,
+ 79, 60, 232, 228, 3, 168, 157, 255, 240, 147,
+ 143, 62, 148, 122, 224, 1, 165, 13, 149, 160,
+ 205, 13, 156, 50, 228, 79, 62, 80, 72, 170,
+ 83, 162, 5, 121, 80, 70, 62, 108, 242, 51,
+ 65, 62, 155, 170, 255, 212, 15, 15, 226, 220,
+ 224, 15, 159, 97, 226, 10, 230, 174, 97, 54,
+ 24, 232, 160, 85, 156, 147, 37, 160, 168, 34,
+ 233, 1, 31, 248, 120, 208, 107, 131, 23, 232,
+ 147, 44, 167, 215, 228, 115, 77, 177, 72, 222,
+ 144, 134, 19, 24, 224, 3, 171, 7, 247, 116,
+ 219, 45, 183, 223, 198, 19, 79, 0, 174, 246,
+ 67, 135, 33, 166, 2, 122, 129, 160, 249, 240,
+ 177, 71, 62, 247, 140, 27, 192, 61, 250, 240,
+ 161, 15, 181, 3, 221, 67, 79, 56, 229, 192,
+ 96, 14, 168, 3, 241, 19, 128, 7, 108, 4,
+ 98, 141, 59, 24, 216, 99, 195, 194, 12, 51,
+ 76, 15, 61, 210, 114, 235, 129, 61, 46, 208,
+ 17, 79, 168, 22, 249, 211, 42, 63, 55, 136,
+ 161, 7, 18, 55, 72, 124, 195, 30, 72, 196,
+ 202, 96, 60, 54, 148, 179, 195, 57, 155, 186,
+ 26, 207, 61, 54, 72, 130, 130, 25, 138, 68,
+ 194, 198, 36, 56, 231, 140, 51, 29, 98, 204,
+ 96, 129, 13, 244, 76, 130, 134, 17, 218, 226,
+ 235, 209, 5, 254, 20, 196, 207, 61, 248, 232,
+ 145, 137, 30, 51, 148, 64, 143, 13, 30, 235,
+ 67, 228, 67, 150, 142, 115, 142, 61, 19, 220,
+ 35, 173, 13, 108, 120, 146, 203, 18, 158, 88,
+ 49, 69, 22, 103, 79, 113, 202, 217, 169, 116,
+ 65, 2, 29, 116, 44, 242, 13, 36, 249, 228,
+ 179, 79, 62, 73, 43, 250, 101, 132, 72, 242,
+ 255, 19, 143, 7, 72, 104, 194, 10, 17, 152,
+ 96, 48, 131, 38, 152, 204, 224, 193, 197, 21,
+ 45, 61, 79, 19, 240, 212, 51, 3, 6, 24,
+ 24, 241, 67, 18, 174, 228, 146, 196, 18, 156,
+ 115, 190, 249, 18, 130, 128, 194, 69, 23, 228,
+ 152, 33, 9, 61, 209, 210, 83, 198, 13, 23,
+ 152, 23, 232, 5, 30, 92, 19, 175, 140, 247,
+ 132, 121, 177, 157, 253, 232, 179, 110, 131, 127,
+ 95, 51, 3, 38, 171, 124, 177, 138, 17, 70,
+ 168, 66, 7, 62, 215, 244, 26, 112, 131, 50,
+ 226, 126, 13, 36, 213, 144, 19, 131, 36, 108,
+ 64, 50, 133, 31, 185, 0, 0, 128, 43, 220,
+ 111, 207, 125, 230, 126, 72, 177, 4, 14, 93,
+ 248, 140, 4, 29, 152, 32, 206, 70, 21, 243,
+ 200, 83, 78, 57, 219, 208, 115, 65, 60, 176,
+ 75, 235, 79, 188, 189, 146, 75, 16, 63, 251,
+ 232, 115, 143, 223, 250, 154, 129, 24, 44, 49,
+ 4, 46, 60, 162, 17, 142, 24, 67, 61, 44,
+ 128, 4, 120, 45, 235, 76, 19, 208, 212, 176,
+ 12, 210, 143, 124, 96, 33, 16, 56, 240, 132,
+ 41, 136, 113, 13, 1, 64, 163, 131, 83, 10,
+ 161, 7, 71, 8, 141, 10, 173, 65, 18, 139,
+ 64, 68, 54, 190, 145, 142, 67, 24, 129, 14,
+ 51, 136, 161, 13, 22, 39, 174, 111, 105, 10,
+ 92, 241, 242, 155, 175, 252, 182, 15, 36, 220,
+ 205, 3, 55, 176, 128, 24, 255, 38, 65, 132,
+ 24, 112, 224, 131, 196, 88, 132, 17, 48, 161,
+ 135, 61, 36, 235, 30, 254, 64, 218, 61, 36,
+ 72, 169, 165, 221, 192, 29, 223, 80, 70, 18,
+ 130, 212, 144, 3, 228, 226, 15, 102, 248, 195,
+ 33, 26, 177, 10, 34, 104, 98, 6, 72, 128,
+ 88, 180, 174, 113, 13, 77, 229, 227, 6, 55,
+ 88, 216, 195, 110, 208, 70, 111, 141, 235, 101,
+ 251, 224, 4, 39, 98, 136, 129, 122, 16, 81,
+ 8, 136, 128, 133, 102, 4, 16, 131, 49, 172,
+ 34, 19, 154, 216, 195, 221, 46, 85, 55, 88,
+ 5, 74, 80, 241, 200, 135, 5, 136, 48, 133,
+ 36, 200, 164, 33, 3, 112, 133, 45, 146, 48,
+ 10, 35, 120, 12, 19, 155, 96, 162, 24, 12,
+ 103, 1, 123, 32, 97, 97, 37, 40, 193, 228,
+ 48, 48, 202, 61, 76, 78, 106, 106, 236, 86,
+ 62, 108, 160, 7, 77, 100, 2, 19, 153, 176,
+ 4, 17, 134, 16, 132, 64, 106, 230, 26, 169,
+ 192, 195, 42, 44, 161, 9, 78, 32, 161, 12,
+ 251, 184, 193, 182, 254, 87, 197, 8, 218, 0,
+ 3, 68, 24, 197, 53, 4, 114, 0, 90, 40,
+ 64, 1, 214, 196, 102, 2, 122, 244, 143, 5,
+ 0, 224, 15, 93, 152, 68, 61, 244, 64, 7,
+ 75, 144, 161, 140, 150, 120, 33, 220, 198, 57,
+ 78, 244, 101, 194, 8, 233, 92, 34, 220, 48,
+ 144, 74, 160, 77, 13, 3, 182, 36, 3, 17,
+ 86, 49, 255, 134, 47, 212, 160, 14, 63, 16,
+ 228, 63, 4, 144, 5, 47, 172, 130, 137, 122,
+ 68, 22, 188, 186, 165, 49, 133, 136, 139, 30,
+ 208, 252, 196, 117, 24, 160, 73, 87, 120, 15,
+ 0, 10, 24, 72, 1, 0, 224, 135, 57, 168,
+ 179, 156, 252, 12, 131, 72, 195, 96, 130, 49,
+ 8, 65, 8, 68, 72, 233, 42, 134, 240, 133,
+ 48, 124, 1, 15, 97, 168, 193, 23, 136, 96,
+ 137, 121, 174, 18, 19, 68, 24, 67, 30, 90,
+ 234, 133, 158, 210, 32, 160, 154, 129, 70, 22,
+ 194, 64, 4, 158, 113, 130, 100, 250, 192, 155,
+ 140, 16, 148, 16, 129, 121, 109, 18, 159, 176,
+ 69, 1, 8, 64, 0, 6, 36, 193, 15, 75,
+ 224, 158, 50, 100, 209, 35, 1, 52, 64, 25,
+ 169, 136, 196, 11, 49, 161, 203, 49, 132, 1,
+ 15, 115, 136, 195, 35, 82, 193, 5, 60, 224,
+ 161, 167, 117, 240, 66, 29, 236, 96, 135, 59,
+ 164, 53, 21, 143, 216, 66, 35, 134, 64, 4,
+ 156, 97, 2, 158, 121, 16, 41, 30, 234, 192,
+ 133, 84, 164, 226, 13, 63, 104, 192, 32, 181,
+ 16, 6, 98, 138, 225, 168, 253, 83, 214, 163,
+ 152, 218, 212, 123, 148, 128, 17, 202, 88, 2,
+ 10, 114, 193, 89, 63, 68, 97, 9, 0, 56,
+ 65, 18, 134, 49, 16, 90, 184, 226, 10, 38,
+ 176, 4, 206, 140, 144, 83, 19, 112, 225, 16,
+ 211, 136, 192, 147, 152, 241, 4, 45, 255, 20,
+ 225, 8, 69, 200, 130, 26, 180, 112, 132, 31,
+ 104, 195, 25, 79, 170, 64, 52, 92, 224, 5,
+ 33, 68, 66, 8, 47, 29, 108, 29, 70, 225,
+ 4, 102, 12, 131, 24, 195, 152, 70, 44, 130,
+ 154, 133, 47, 212, 84, 12, 123, 80, 100, 200,
+ 226, 209, 60, 78, 249, 45, 31, 116, 168, 6,
+ 14, 78, 225, 136, 69, 40, 34, 11, 109, 16,
+ 196, 38, 205, 48, 139, 129, 16, 0, 0, 102,
+ 224, 66, 95, 233, 48, 9, 18, 32, 247, 17,
+ 29, 224, 162, 64, 152, 33, 2, 74, 180, 161,
+ 25, 241, 56, 70, 19, 6, 96, 16, 1, 116,
+ 96, 11, 255, 164, 171, 29, 226, 192, 4, 3,
+ 112, 83, 32, 93, 29, 170, 37, 244, 128, 93,
+ 146, 193, 138, 187, 143, 106, 230, 196, 214, 144,
+ 132, 63, 160, 226, 164, 65, 208, 130, 25, 132,
+ 225, 7, 65, 80, 96, 154, 3, 109, 64, 46,
+ 74, 225, 5, 44, 76, 130, 172, 95, 152, 67,
+ 58, 182, 114, 16, 98, 84, 163, 52, 182, 185,
+ 218, 65, 162, 17, 135, 34, 220, 246, 13, 41,
+ 240, 146, 65, 160, 97, 138, 26, 212, 116, 15,
+ 144, 213, 135, 7, 118, 69, 89, 131, 44, 45,
+ 31, 51, 88, 135, 25, 112, 80, 8, 68, 168,
+ 227, 15, 73, 232, 195, 21, 212, 107, 128, 129,
+ 40, 0, 0, 75, 40, 69, 28, 186, 16, 132,
+ 71, 152, 226, 19, 228, 216, 141, 64, 226, 97,
+ 128, 4, 32, 32, 255, 40, 1, 136, 5, 10,
+ 40, 64, 128, 130, 16, 32, 1, 9, 192, 15,
+ 63, 156, 112, 132, 75, 196, 161, 15, 248, 129,
+ 70, 48, 20, 16, 140, 32, 9, 64, 11, 214,
+ 213, 68, 133, 241, 161, 100, 127, 112, 247, 145,
+ 78, 134, 147, 13, 230, 97, 8, 52, 152, 193,
+ 12, 125, 72, 135, 35, 226, 224, 7, 87, 112,
+ 85, 32, 196, 216, 222, 85, 253, 208, 135, 68,
+ 252, 128, 173, 77, 232, 17, 47, 24, 144, 1,
+ 205, 66, 160, 154, 56, 176, 130, 39, 40, 64,
+ 96, 219, 208, 98, 108, 56, 104, 197, 116, 5,
+ 130, 11, 55, 92, 34, 20, 18, 24, 136, 1,
+ 40, 176, 1, 28, 216, 162, 1, 5, 160, 144,
+ 41, 172, 107, 84, 69, 42, 25, 195, 77, 118,
+ 114, 0, 250, 225, 53, 123, 204, 67, 156, 154,
+ 216, 130, 25, 92, 161, 139, 225, 4, 224, 21,
+ 218, 115, 69, 6, 250, 112, 138, 26, 212, 128,
+ 6, 90, 232, 242, 63, 136, 225, 128, 64, 248,
+ 186, 18, 159, 64, 1, 14, 220, 0, 6, 48,
+ 4, 130, 22, 2, 33, 192, 18, 172, 64, 137,
+ 74, 80, 1, 5, 25, 29, 168, 40, 42, 145,
+ 3, 153, 48, 99, 3, 87, 168, 4, 37, 172,
+ 128, 3, 197, 14, 84, 194, 154, 192, 64, 118,
+ 35, 203, 221, 71, 51, 200, 101, 23, 160, 135,
+ 17, 216, 161, 12, 205, 97, 72, 32, 193, 8,
+ 119, 18, 72, 81, 4, 185, 114, 193, 20, 104,
+ 255, 144, 137, 2, 62, 144, 182, 44, 200, 65,
+ 14, 112, 0, 195, 37, 46, 209, 134, 93, 228,
+ 91, 20, 245, 190, 4, 37, 164, 0, 129, 171,
+ 165, 193, 10, 183, 128, 48, 7, 124, 61, 243,
+ 75, 80, 129, 2, 65, 77, 69, 99, 233, 128,
+ 100, 39, 42, 121, 169, 209, 174, 108, 61, 92,
+ 96, 134, 19, 152, 161, 19, 77, 24, 136, 0,
+ 28, 224, 10, 18, 183, 129, 176, 113, 240, 47,
+ 1, 184, 25, 128, 178, 151, 29, 26, 33, 184,
+ 132, 204, 213, 238, 6, 155, 255, 131, 0, 35,
+ 152, 121, 191, 229, 128, 130, 90, 175, 96, 4,
+ 1, 231, 69, 40, 212, 206, 247, 43, 8, 84,
+ 0, 203, 46, 234, 99, 157, 173, 172, 71, 99,
+ 140, 31, 54, 192, 130, 33, 206, 144, 229, 40,
+ 148, 34, 10, 164, 21, 72, 44, 92, 177, 132,
+ 78, 148, 66, 10, 140, 95, 66, 20, 164, 32,
+ 100, 130, 8, 160, 26, 107, 151, 121, 27, 18,
+ 144, 111, 82, 168, 93, 230, 149, 88, 66, 157,
+ 255, 177, 130, 30, 32, 64, 32, 5, 104, 131,
+ 204, 103, 47, 10, 129, 10, 245, 11, 47, 60,
+ 234, 30, 86, 181, 56, 4, 69, 189, 32, 253,
+ 192, 64, 19, 86, 152, 142, 31, 156, 162, 13,
+ 109, 216, 129, 123, 1, 96, 11, 206, 157, 64,
+ 24, 202, 16, 134, 43, 146, 16, 138, 206, 107,
+ 253, 12, 106, 127, 185, 27, 174, 224, 118, 2,
+ 72, 129, 18, 148, 224, 187, 255, 18, 86, 223,
+ 122, 210, 251, 196, 215, 179, 55, 250, 223, 171,
+ 251, 194, 236, 42, 116, 201, 221, 69, 72, 60,
+ 110, 0, 133, 38, 184, 163, 10, 144, 112, 196,
+ 90, 219, 160, 142, 235, 4, 128, 1, 218, 195,
+ 124, 87, 245, 7, 125, 80, 11, 40, 16, 10,
+ 178, 16, 11, 215, 129, 0, 177, 208, 128, 177,
+ 176, 0, 125, 32, 7, 200, 87, 9, 96, 208,
+ 118, 55, 151, 126, 151, 96, 6, 228, 23, 10,
+ 177, 32, 16, 2, 240, 3, 51, 71, 123, 72,
+ 55, 80, 169, 48, 4, 158, 52, 3, 72, 197,
+ 45, 59, 36, 40, 212, 118, 14, 58, 208, 14,
+ 51, 80, 5, 141, 176, 127, 165, 128, 31, 8,
+ 176, 61, 2, 120, 2, 182, 80, 104, 2, 32,
+ 1, 161, 48, 2, 102, 160, 110, 5, 96, 117,
+ 75, 96, 6, 75, 48, 8, 161, 112, 5, 107,
+ 87, 115, 249, 38, 5, 124, 167, 118, 26, 40,
+ 16, 43, 112, 116, 87, 19, 13, 49, 199, 119,
+ 84, 0, 1, 65, 245, 8, 145, 64, 7, 24,
+ 128, 4, 72, 160, 100, 247, 64, 89, 110, 194,
+ 60, 215, 112, 14, 213, 176, 14, 238, 112, 8,
+ 234, 224, 9, 81, 48, 8, 108, 145, 111, 1,
+ 200, 124, 39, 160, 61, 201, 246, 15, 180, 48,
+ 8, 143, 183, 0, 3, 17, 12, 74, 112, 5,
+ 110, 208, 6, 82, 64, 13, 221, 32, 7, 106,
+ 55, 122, 55, 87, 116, 50, 55, 126, 2, 65,
+ 13, 116, 255, 103, 126, 252, 176, 3, 68, 39,
+ 7, 103, 96, 126, 132, 100, 4, 245, 128, 4,
+ 140, 54, 134, 190, 98, 35, 55, 240, 4, 214,
+ 128, 3, 40, 160, 12, 186, 32, 12, 181, 112,
+ 73, 4, 16, 12, 6, 160, 138, 170, 184, 138,
+ 50, 113, 107, 202, 208, 113, 119, 248, 15, 222,
+ 16, 12, 218, 192, 13, 117, 22, 15, 210, 0,
+ 7, 151, 96, 129, 111, 39, 10, 69, 167, 118,
+ 125, 176, 122, 212, 112, 9, 61, 208, 10, 80,
+ 18, 1, 59, 0, 2, 191, 16, 121, 235, 22,
+ 3, 147, 48, 3, 16, 83, 59, 24, 179, 63,
+ 150, 50, 3, 88, 224, 8, 136, 64, 8, 133,
+ 208, 1, 21, 65, 11, 39, 240, 7, 161, 240,
+ 9, 27, 0, 37, 67, 150, 13, 148, 160, 5,
+ 110, 199, 11, 137, 64, 87, 113, 112, 4, 71,
+ 16, 133, 255, 0, 2, 151, 0, 7, 31, 240,
+ 10, 250, 69, 16, 241, 80, 12, 93, 128, 9,
+ 22, 32, 59, 58, 134, 53, 93, 51, 75, 208,
+ 164, 6, 22, 65, 11, 61, 64, 3, 65, 16,
+ 4, 34, 192, 0, 2, 18, 37, 177, 240, 1,
+ 71, 160, 5, 181, 241, 15, 3, 128, 8, 38,
+ 240, 79, 62, 86, 13, 28, 1, 2, 240, 152,
+ 5, 186, 240, 10, 181, 86, 16, 188, 32, 11,
+ 136, 144, 7, 116, 80, 2, 139, 83, 141, 144,
+ 228, 1, 244, 64, 2, 128, 48, 11, 5, 96,
+ 0, 52, 89, 147, 54, 121, 147, 6, 255, 240,
+ 10, 202, 176, 5, 186, 20, 4, 236, 0, 1,
+ 177, 96, 0, 3, 80, 66, 5, 64, 11, 13,
+ 144, 3, 169, 96, 7, 169, 112, 11, 52, 169,
+ 0, 79, 112, 92, 95, 48, 87, 57, 160, 0,
+ 52, 169, 2, 115, 32, 87, 89, 176, 1, 174,
+ 64, 11, 5, 80, 66, 196, 96, 0, 177, 224,
+ 11, 46, 96, 72, 116, 64, 15, 226, 194, 146,
+ 210, 70, 15, 144, 208, 7, 228, 160, 3, 27,
+ 176, 89, 22, 53, 135, 114, 201, 124, 40, 96,
+ 12, 56, 96, 6, 142, 64, 7, 36, 176, 10,
+ 143, 144, 13, 40, 160, 11, 181, 80, 11, 20,
+ 128, 12, 135, 16, 4, 66, 96, 2, 142, 160,
+ 3, 190, 224, 11, 28, 176, 6, 116, 0, 79,
+ 253, 36, 2, 34, 97, 12, 78, 32, 4, 67,
+ 160, 10, 95, 208, 5, 45, 240, 1, 186, 208,
+ 10, 181, 0, 1, 41, 224, 4, 144, 128, 9,
+ 100, 165, 7, 55, 240, 63, 109, 130, 50, 139,
+ 96, 6, 139, 128, 1, 147, 224, 8, 160, 160,
+ 12, 182, 240, 61, 180, 201, 61, 182, 144, 1,
+ 127, 224, 8, 70, 32, 4, 132, 240, 7, 144,
+ 128, 62, 171, 144, 7, 93, 32, 3, 50, 208,
+ 8, 238, 96, 4, 171, 69, 60, 150, 224, 98,
+ 243, 64, 7, 64, 0, 55, 172, 69, 4, 40,
+ 133, 5, 99, 5, 79, 252, 20, 4, 142, 32,
+ 3, 139, 224, 14, 108, 0, 55, 64, 32, 6,
+ 233, 211, 64, 97, 255, 98, 17, 55, 48, 15,
+ 238, 128, 6, 235, 80, 15, 11, 83, 15, 143,
+ 96, 6, 185, 96, 11, 39, 16, 139, 242, 41,
+ 159, 89, 150, 8, 150, 16, 53, 24, 192, 8,
+ 103, 208, 8, 191, 179, 10, 100, 80, 83, 60,
+ 83, 15, 125, 36, 6, 236, 100, 56, 62, 19,
+ 67, 98, 0, 55, 152, 96, 83, 148, 163, 160,
+ 240, 4, 160, 134, 83, 2, 63, 3, 134, 217,
+ 85, 50, 104, 249, 15, 254, 160, 50, 220, 32,
+ 14, 24, 112, 49, 94, 35, 6, 138, 176, 4,
+ 154, 131, 105, 127, 80, 162, 38, 90, 162, 234,
+ 208, 8, 245, 0, 49, 249, 80, 2, 144, 32,
+ 2, 104, 132, 75, 122, 64, 74, 11, 99, 1,
+ 22, 16, 67, 104, 36, 71, 83, 131, 4, 172,
+ 68, 97, 72, 160, 48, 54, 96, 74, 24, 64,
+ 78, 154, 64, 97, 51, 0, 52, 209, 178, 45,
+ 30, 160, 15, 145, 197, 146, 23, 80, 14, 47,
+ 176, 80, 174, 243, 55, 245, 128, 8, 162, 24,
+ 8, 228, 64, 8, 234, 176, 165, 92, 170, 14,
+ 233, 192, 8, 147, 176, 15, 220, 34, 46, 30,
+ 0, 15, 80, 128, 15, 72, 160, 7, 31, 3,
+ 71, 215, 160, 76, 55, 128, 15, 101, 112, 74,
+ 110, 250, 166, 72, 224, 46, 21, 10, 71, 116,
+ 138, 100, 106, 42, 6, 167,
+ 4, 43, 221, 34, 47, 211, 6, 68, 254, 131,
+ 49, 247, 16, 14, 124, 179, 63, 3, 83, 15,
+ 104, 128, 2, 214, 255, 192, 14, 134, 96, 8,
+ 235, 16, 169, 146, 186, 14, 80, 128, 14, 42,
+ 121, 150, 126, 131, 15, 162, 89, 167, 198, 164,
+ 76, 117, 3, 71, 61, 84, 6, 248, 0, 71,
+ 111, 116, 3, 117, 154, 93, 36, 163, 45, 111,
+ 234, 46, 122, 164, 71, 32, 67, 67, 191, 34,
+ 16, 21, 148, 44, 191, 151, 47, 244, 80, 69,
+ 247, 0, 5, 74, 144, 6, 231, 208, 14, 47,
+ 80, 15, 47, 48, 15, 47, 16, 172, 243, 32,
+ 172, 51, 112, 154, 14, 226, 58, 248, 0, 5,
+ 108, 80, 161, 154, 114, 1, 223, 114, 41, 73,
+ 245, 172, 83, 84, 55, 76, 250, 67, 83, 228,
+ 1, 118, 83, 167, 238, 210, 64, 204, 116, 16,
+ 23, 208, 72, 173, 243, 37, 183, 218, 84, 51,
+ 224, 4, 91, 211, 72, 55, 36, 65, 235, 106,
+ 113, 4, 209, 15, 123, 224, 14, 98, 128, 55,
+ 227, 178, 67, 13, 18, 38, 228, 66, 46, 190,
+ 18, 15, 19, 96, 120, 2, 243, 40, 110, 196,
+ 45, 70, 83, 41, 174, 114, 63, 13, 165, 143,
+ 215, 16, 42, 30, 176, 3, 232, 176, 146, 249,
+ 154, 175, 13, 82, 118, 2, 3, 105, 111, 178,
+ 15, 108, 208, 14, 172, 210, 56, 149, 34, 40,
+ 145, 193, 93, 88, 179, 52, 209, 54, 176, 2,
+ 33, 15, 207, 224, 1, 250, 170, 52, 27, 203,
+ 32, 118, 99, 3, 225, 144, 46, 57, 225, 58,
+ 23, 138, 36, 227, 137, 53, 227, 240, 2, 140,
+ 61, 163, 18, 131, 146, 15, 220, 229, 13, 19,
+ 100, 38, 20, 139, 53, 34, 171, 52, 224, 80,
+ 14, 181, 90, 17, 21, 212, 58, 253, 48, 45,
+ 47, 187, 130, 29, 241, 179, 10, 193, 15, 225,
+ 16, 14, 183, 131, 36, 109, 2, 173, 14, 114,
+ 179, 12, 225, 58, 78, 102, 175, 109, 226, 32,
+ 1, 1, 0, 59 );
+
+ php_logo : array [0..2961] of byte = (
+ 71, 73, 70, 56, 57, 97, 130, 0, 67, 0,
+ 213, 255, 0, 0, 0, 0, 48, 47, 49, 2,
+ 2, 3, 7, 7, 10, 152, 152, 203, 153, 153,
+ 204, 150, 150, 200, 147, 147, 195, 3, 3, 4,
+ 91, 91, 105, 164, 164, 178, 69, 69, 73, 196,
+ 196, 206, 141, 142, 189, 136, 137, 180, 152, 153,
+ 187, 101, 103, 134, 126, 129, 172, 176, 178, 205,
+ 25, 26, 36, 49, 52, 73, 33, 35, 49, 69,
+ 73, 100, 82, 88, 127, 111, 119, 168, 201, 204,
+ 221, 81, 95, 159, 85, 99, 163, 97, 105, 147,
+ 13, 14, 19, 162, 169, 205, 183, 189, 220, 88,
+ 103, 165, 92, 106, 169, 90, 104, 165, 91, 105,
+ 166, 95, 110, 172, 102, 115, 174, 93, 105, 158,
+ 139, 150, 197, 148, 158, 202, 219, 221, 229, 192,
+ 192, 192, 2, 2, 1, 3, 3, 2, 7, 7,
+ 6, 15, 15, 14, 133, 133, 131, 152, 152, 151,
+ 114, 113, 110, 5, 4, 3, 20, 19, 18, 31,
+ 30, 29, 39, 38, 37, 10, 9, 9, 25, 24,
+ 24, 61, 60, 60, 183, 183, 183, 81, 81, 81,
+ 12, 12, 12, 5, 5, 5, 1, 1, 1, 255,
+ 255, 255, 0, 0, 0, 33, 249, 4, 1, 0,
+ 0, 42, 0, 44, 0, 0, 0, 0, 130, 0,
+ 67, 0, 64, 6, 255, 64, 149, 112, 72, 44,
+ 26, 143, 200, 100, 146, 192, 108, 58, 159, 80,
+ 130, 114, 74, 173, 90, 175, 70, 130, 225, 112,
+ 48, 72, 24, 169, 112, 42, 227, 105, 96, 66,
+ 155, 52, 72, 36, 26, 185, 223, 240, 184, 124,
+ 78, 15, 185, 69, 38, 14, 100, 15, 73, 236,
+ 49, 14, 13, 92, 6, 88, 133, 72, 91, 13,
+ 15, 138, 24, 32, 32, 116, 143, 144, 112, 26,
+ 30, 48, 0, 150, 150, 59, 25, 140, 145, 156,
+ 157, 111, 33, 33, 23, 11, 1, 1, 11, 128,
+ 13, 132, 134, 66, 4, 7, 17, 24, 24, 158,
+ 35, 27, 31, 9, 151, 150, 51, 9, 49, 186,
+ 49, 58, 56, 46, 182, 151, 60, 57, 40, 25,
+ 51, 192, 52, 58, 201, 201, 56, 52, 192, 150,
+ 45, 12, 17, 62, 49, 192, 59, 185, 187, 9,
+ 190, 206, 0, 44, 48, 37, 142, 115, 33, 32,
+ 19, 0, 19, 16, 17, 168, 84, 91, 28, 28,
+ 38, 177, 27, 39, 57, 43, 192, 48, 30, 27,
+ 114, 26, 31, 212, 244, 149, 182, 52, 41, 223,
+ 36, 125, 120, 1, 204, 6, 131, 15, 12, 16,
+ 0, 123, 241, 65, 3, 190, 15, 253, 108, 197,
+ 136, 0, 238, 17, 137, 11, 2, 120, 248, 137,
+ 112, 128, 74, 43, 118, 109, 34, 129, 200, 176,
+ 96, 155, 73, 75, 60, 22, 228, 72, 129, 65,
+ 67, 132, 12, 60, 22, 54, 132, 3, 2, 67,
+ 134, 22, 192, 98, 100, 240, 81, 235, 228, 54,
+ 255, 22, 56, 20, 124, 32, 113, 175, 19, 9,
+ 13, 3, 0, 4, 216, 216, 17, 139, 1, 3,
+ 13, 34, 236, 105, 247, 102, 3, 10, 5, 206,
+ 114, 156, 40, 26, 171, 235, 195, 28, 206, 94,
+ 4, 244, 10, 39, 196, 197, 14, 0, 6, 80,
+ 240, 3, 168, 169, 42, 117, 7, 26, 56, 136,
+ 160, 135, 15, 132, 118, 33, 201, 234, 245, 100,
+ 54, 132, 137, 11, 22, 2, 212, 160, 65, 163,
+ 194, 218, 11, 16, 48, 68, 112, 208, 229, 173,
+ 227, 199, 66, 158, 110, 225, 210, 64, 174, 131,
+ 203, 17, 50, 107, 222, 204, 153, 243, 229, 203,
+ 149, 185, 116, 73, 5, 185, 180, 233, 44, 90,
+ 38, 115, 41, 224, 65, 130, 107, 6, 176, 25,
+ 184, 158, 173, 64, 129, 34, 69, 152, 51, 191,
+ 194, 192, 174, 119, 111, 197, 139, 67, 143, 38,
+ 125, 186, 184, 138, 201, 15, 90, 203, 110, 80,
+ 34, 77, 222, 189, 179, 98, 184, 152, 62, 29,
+ 71, 10, 18, 21, 247, 134, 243, 203, 33, 129,
+ 178, 4, 167, 26, 27, 223, 162, 121, 44, 29,
+ 16, 36, 82, 4, 160, 206, 190, 189, 139, 25,
+ 53, 116, 188, 200, 144, 161, 185, 172, 6, 57,
+ 88, 0, 107, 177, 195, 253, 141, 0, 242, 101,
+ 48, 84, 35, 210, 248, 226, 158, 123, 240, 201,
+ 39, 155, 56, 116, 92, 116, 131, 12, 230, 160,
+ 67, 156, 58, 116, 113, 208, 149, 6, 18, 68,
+ 100, 137, 65, 155, 208, 68, 255, 66, 6, 53,
+ 0, 115, 131, 15, 37, 217, 178, 64, 6, 35,
+ 228, 37, 194, 72, 58, 0, 19, 64, 6, 41,
+ 96, 101, 11, 11, 57, 56, 144, 93, 138, 34,
+ 100, 128, 3, 48, 51, 120, 16, 194, 115, 113,
+ 160, 129, 86, 0, 231, 52, 48, 5, 43, 188,
+ 185, 211, 9, 8, 37, 164, 240, 139, 68, 62,
+ 124, 32, 229, 7, 244, 229, 208, 98, 88, 62,
+ 200, 120, 201, 10, 57, 52, 192, 149, 44, 241,
+ 244, 64, 15, 140, 205, 216, 162, 67, 148, 83,
+ 86, 217, 83, 78, 246, 24, 69, 1, 0, 55,
+ 248, 193, 152, 21, 80, 233, 97, 33, 29, 249,
+ 16, 100, 203, 12, 0, 109, 208, 200, 159, 107,
+ 0, 249, 6, 160, 128, 158, 71, 104, 35, 41,
+ 104, 8, 128, 11, 10, 136, 115, 40, 27, 100,
+ 97, 71, 206, 14, 22, 92, 192, 193, 156, 144,
+ 33, 66, 215, 84, 28, 60, 170, 157, 118, 43,
+ 122, 218, 149, 89, 26, 88, 128, 86, 57, 149,
+ 38, 22, 200, 132, 198, 169, 131, 136, 92, 174,
+ 212, 101, 215, 172, 119, 245, 102, 194, 173, 184,
+ 178, 161, 43, 174, 183, 246, 182, 199, 5, 9,
+ 4, 171, 140, 14, 11, 20, 187, 128, 5, 9,
+ 32, 118, 151, 98, 129, 140, 214, 234, 179, 88,
+ 164, 38, 153, 106, 148, 85, 102, 237, 181, 215,
+ 138, 54, 200, 180, 79, 65, 235, 173, 21, 169,
+ 13, 242, 5, 140, 98, 132, 193, 128, 7, 7,
+ 204, 133, 255, 65, 9, 118, 172, 168, 198, 161,
+ 128, 66, 250, 6, 30, 184, 178, 67, 235, 93,
+ 193, 9, 210, 237, 183, 111, 105, 193, 133, 114,
+ 244, 73, 96, 134, 8, 126, 222, 216, 137, 8,
+ 37, 36, 172, 48, 187, 130, 238, 101, 71, 30,
+ 125, 4, 203, 86, 179, 172, 126, 139, 156, 2,
+ 30, 120, 224, 0, 81, 13, 239, 85, 83, 6,
+ 59, 200, 228, 208, 167, 157, 252, 120, 65, 47,
+ 56, 232, 192, 1, 58, 226, 157, 182, 197, 103,
+ 17, 164, 72, 71, 27, 11, 215, 108, 51, 118,
+ 26, 100, 215, 134, 142, 192, 232, 80, 223, 205,
+ 32, 228, 12, 135, 8, 33, 216, 108, 116, 194,
+ 216, 249, 89, 71, 8, 22, 212, 112, 67, 5,
+ 69, 186, 85, 8, 43, 14, 40, 214, 33, 36,
+ 86, 129, 229, 211, 73, 58, 176, 148, 207, 62,
+ 91, 111, 163, 128, 4, 249, 48, 32, 64, 216,
+ 219, 44, 48, 96, 131, 22, 136, 73, 193, 202,
+ 82, 31, 121, 64, 146, 177, 124, 108, 67, 78,
+ 13, 105, 160, 247, 61, 37, 100, 160, 40, 0,
+ 56, 100, 185, 95, 52, 5, 175, 145, 222, 154,
+ 150, 208, 248, 129, 147, 120, 235, 189, 247, 8,
+ 125, 43, 48, 143, 45, 1, 180, 249, 72, 8,
+ 21, 148, 83, 100, 197, 68, 176, 146, 135, 146,
+ 7, 135, 144, 65, 0, 61, 103, 176, 70, 28,
+ 118, 3, 179, 0, 3, 56, 217, 82, 207, 200,
+ 110, 128, 16, 1, 235, 57, 165, 64, 255, 34,
+ 48, 56, 100, 240, 35, 234, 77, 26, 67, 185,
+ 229, 22, 89, 0, 64, 7, 150, 58, 192, 121,
+ 100, 7, 176, 3, 58, 39, 95, 31, 115, 157,
+ 35, 108, 4, 29, 66, 10, 122, 154, 233, 67,
+ 153, 151, 36, 144, 193, 151, 34, 124, 24, 162,
+ 137, 59, 85, 111, 137, 11, 245, 129, 179, 98,
+ 206, 126, 59, 179, 0, 240, 22, 93, 208, 131,
+ 70, 231, 196, 109, 132, 1, 14, 40, 223, 201,
+ 6, 30, 104, 137, 118, 207, 41, 68, 64, 11,
+ 238, 186, 123, 78, 116, 142, 81, 165, 253, 165,
+ 141, 1, 230, 129, 196, 69, 4, 208, 3, 10,
+ 92, 0, 16, 199, 35, 66, 43, 238, 98, 2,
+ 59, 156, 199, 1, 12, 144, 65, 237, 232, 195,
+ 193, 48, 208, 231, 3, 13, 64, 67, 27, 54,
+ 16, 129, 49, 112, 144, 131, 36, 16, 96, 9,
+ 79, 200, 193, 197, 181, 46, 123, 44, 36, 151,
+ 128, 36, 64, 145, 47, 113, 130, 4, 109, 3,
+ 192, 90, 226, 87, 8, 242, 76, 69, 14, 76,
+ 74, 193, 13, 128, 161, 61, 27, 146, 44, 18,
+ 27, 112, 128, 15, 190, 119, 137, 5, 160, 192,
+ 136, 122, 33, 74, 230, 16, 176, 67, 9, 61,
+ 230, 41, 233, 170, 75, 59, 172, 82, 46, 49,
+ 124, 64, 94, 71, 228, 196, 138, 22, 215, 197,
+ 20, 176, 175, 43, 36, 184, 8, 57, 80, 133,
+ 152, 197, 200, 207, 101, 113, 217, 20, 31, 168,
+ 98, 193, 48, 218, 255, 17, 18, 125, 1, 204,
+ 4, 118, 192, 131, 14, 44, 5, 49, 225, 225,
+ 151, 18, 16, 161, 46, 89, 217, 165, 29, 38,
+ 104, 67, 29, 239, 248, 9, 80, 60, 140, 3,
+ 23, 16, 197, 2, 112, 128, 3, 82, 224, 96,
+ 1, 201, 194, 23, 197, 4, 233, 178, 201, 88,
+ 70, 55, 134, 188, 23, 31, 36, 70, 202, 82,
+ 154, 50, 147, 83, 121, 69, 102, 2, 161, 175,
+ 8, 114, 242, 149, 157, 139, 130, 44, 103, 217,
+ 4, 88, 218, 242, 52, 210, 226, 150, 46, 119,
+ 185, 175, 91, 250, 242, 72, 210, 210, 22, 23,
+ 110, 67, 204, 98, 230, 70, 55, 187, 1, 14,
+ 43, 5, 177, 173, 94, 254, 18, 90, 225, 90,
+ 141, 4, 168, 68, 46, 19, 198, 70, 2, 30,
+ 120, 192, 39, 145, 153, 204, 110, 246, 202, 55,
+ 190, 90, 214, 98, 154, 229, 172, 103, 190, 5,
+ 139, 7, 40, 128, 4, 170, 233, 65, 116, 69,
+ 128, 93, 32, 72, 67, 193, 116, 117, 199, 111,
+ 222, 139, 89, 173, 52, 231, 18, 38, 163, 78,
+ 250, 132, 225, 3, 173, 64, 131, 159, 58, 38,
+ 135, 80, 17, 138, 160, 94, 129, 88, 196, 130,
+ 117, 142, 77, 234, 19, 57, 95, 128, 205, 3,
+ 98, 54, 80, 232, 156, 192, 132, 29, 68, 145,
+ 193, 62, 245, 176, 136, 233, 32, 88, 225, 113,
+ 229, 120, 134, 233, 26, 141, 17, 101, 163, 100,
+ 33, 218, 232, 74, 135, 82, 59, 254, 168, 59,
+ 255, 198, 186, 128, 27, 69, 234, 24, 68, 60,
+ 160, 54, 14, 104, 14, 66, 245, 2, 15, 121,
+ 0, 67, 1, 79, 100, 36, 30, 255, 66, 73,
+ 28, 36, 96, 166, 35, 189, 204, 3, 54, 134,
+ 82, 131, 194, 75, 84, 113, 104, 158, 45, 106,
+ 144, 2, 71, 29, 116, 14, 79, 125, 42, 24,
+ 229, 32, 142, 166, 213, 224, 109, 86, 204, 84,
+ 186, 46, 195, 8, 130, 110, 64, 2, 24, 141,
+ 225, 9, 61, 248, 1, 12, 40, 109, 4, 76,
+ 202, 192, 147, 178, 151, 86, 127, 126, 208, 173,
+ 208, 75, 79, 93, 213, 218, 66, 15, 52, 7,
+ 165, 23, 161, 129, 11, 34, 36, 136, 115, 166,
+ 43, 51, 9, 196, 234, 236, 98, 98, 64, 56,
+ 189, 32, 5, 14, 72, 3, 37, 26, 107, 9,
+ 26, 192, 32, 5, 35, 208, 0, 10, 82, 112,
+ 183, 198, 206, 32, 6, 31, 72, 236, 27, 46,
+ 114, 55, 168, 133, 245, 10, 80, 217, 205, 78,
+ 221, 128, 161, 191, 25, 48, 6, 41, 24, 201,
+ 142, 40, 107, 137, 0, 96, 54, 70, 180, 189,
+ 132, 14, 206, 8, 7, 18, 188, 105, 0, 224,
+ 193, 84, 21, 234, 132, 129, 20, 30, 204, 123,
+ 61, 67, 83, 154, 252, 22, 178, 218, 229, 64,
+ 33, 174, 75, 1, 53, 253, 169, 128, 230, 94,
+ 162, 7, 57, 240, 128, 15, 102, 123, 9, 235,
+ 76, 73, 74, 244, 129, 129, 239, 204, 180, 149,
+ 224, 1, 160, 7, 22, 184, 255, 212, 27, 231,
+ 215, 0, 251, 121, 162, 167, 98, 114, 93, 80,
+ 231, 181, 129, 38, 205, 181, 178, 62, 16, 31,
+ 0, 254, 129, 29, 93, 137, 64, 170, 151, 32,
+ 31, 66, 160, 123, 137, 23, 144, 109, 104, 27,
+ 72, 15, 246, 44, 113, 3, 9, 32, 20, 135,
+ 0, 224, 65, 122, 133, 139, 4, 36, 81, 229,
+ 29, 250, 0, 6, 85, 141, 235, 161, 12, 12,
+ 113, 170, 66, 108, 28, 77, 154, 180, 96, 0,
+ 248, 44, 191, 34, 2, 200, 141, 84, 74, 58,
+ 91, 52, 184, 165, 110, 240, 109, 57, 30, 152,
+ 142, 36, 172, 227, 194, 75, 178, 137, 117, 45,
+ 1, 90, 216, 85, 5, 5, 57, 136, 239, 37,
+ 98, 160, 191, 8, 71, 35, 59, 86, 41, 50,
+ 0, 96, 0, 163, 241, 90, 162, 136, 114, 216,
+ 64, 3, 24, 160, 31, 19, 149, 87, 129, 23,
+ 72, 139, 156, 214, 139, 60, 247, 118, 98, 18,
+ 138, 226, 193, 145, 227, 176, 1, 12, 164, 160,
+ 196, 46, 72, 193, 149, 186, 27, 64, 56, 204,
+ 2, 113, 0, 168, 65, 1, 109, 209, 3, 5,
+ 92, 185, 42, 77, 106, 241, 37, 108, 160, 128,
+ 18, 236, 116, 129, 240, 227, 136, 18, 88, 161,
+ 188, 69, 62, 98, 103, 220, 181, 196, 137, 228,
+ 185, 129, 162, 109, 22, 6, 147, 219, 51, 140,
+ 24, 91, 224, 3, 15, 202, 38, 157, 29, 242,
+ 78, 214, 92, 91, 211, 105, 32, 13, 69, 187,
+ 168, 2, 255, 50, 253, 140, 62, 195, 56, 198,
+ 194, 179, 6, 15, 149, 240, 145, 59, 113, 66,
+ 202, 25, 212, 240, 71, 133, 181, 30, 147, 116,
+ 109, 32, 60, 82, 177, 36, 50, 4, 12, 97,
+ 80, 233, 133, 150, 136, 143, 196, 122, 225, 100,
+ 19, 125, 96, 119, 157, 32, 71, 5, 18, 112,
+ 41, 87, 222, 216, 213, 144, 200, 83, 110, 89,
+ 0, 91, 27, 129, 136, 136, 219, 27, 154, 232,
+ 244, 172, 104, 24, 185, 22, 109, 9, 64, 224,
+ 169, 71, 251, 166, 14, 88, 96, 115, 234, 104,
+ 47, 59, 68, 210, 59, 96, 32, 0, 65, 52,
+ 0, 208, 11, 86, 130, 130, 120, 246, 212, 61,
+ 90, 249, 210, 189, 219, 195, 228, 20, 48, 209,
+ 18, 50, 128, 55, 128, 98, 144, 131, 12, 108,
+ 101, 220, 228, 6, 0, 165, 30, 104, 60, 58,
+ 205, 237, 46, 102, 189, 10, 48, 4, 160, 21,
+ 163, 137, 227, 211, 207, 233, 158, 205, 144, 237,
+ 33, 155, 129, 224, 3, 90, 187, 238, 11, 114,
+ 90, 51, 18, 160, 33, 103, 171, 237, 173, 6,
+ 208, 50, 1, 182, 212, 216, 225, 245, 187, 203,
+ 121, 50, 192, 105, 192, 181, 89, 168, 231, 41,
+ 1, 79, 52, 44, 1, 40, 70, 81, 4, 153,
+ 75, 73, 27, 95, 238, 148, 9, 66, 156, 38,
+ 139, 21, 25, 206, 31, 161, 89, 206, 18, 209,
+ 70, 71, 60, 10, 57, 120, 176, 195, 182, 92,
+ 145, 60, 90, 100, 45, 68, 102, 192, 219, 117,
+ 174, 83, 85, 180, 75, 79, 17, 8, 98, 212,
+ 117, 174, 211, 64, 1, 28, 254, 57, 5, 206,
+ 214, 129, 5, 0, 146, 194, 98, 173, 218, 28,
+ 17, 102, 51, 153, 133, 125, 14, 52, 171, 187,
+ 94, 72, 181, 246, 180, 44, 5, 95, 133, 125,
+ 214, 83, 228, 130, 129, 57, 114, 128, 104, 119,
+ 79, 188, 27, 72, 101, 129, 9, 136, 169, 3,
+ 59, 92, 25, 99, 104, 90, 154, 151, 201, 113,
+ 42, 137, 28, 129, 161, 21, 239, 149, 190, 108,
+ 224, 2, 20, 168, 1, 215, 255, 147, 42, 197,
+ 232, 235, 153, 132, 188, 252, 28, 111, 197, 249,
+ 203, 57, 242, 191, 128, 169, 164, 96, 2, 64,
+ 129, 84, 113, 128, 89, 45, 211, 231, 16, 176,
+ 8, 171, 194, 139, 82, 121, 172, 255, 132, 230,
+ 55, 207, 85, 71, 26, 63, 69, 16, 3, 86,
+ 50, 138, 85, 212, 99, 101, 242, 246, 193, 201,
+ 189, 238, 7, 249, 170, 185, 196, 74, 148, 216,
+ 191, 215, 41, 73, 57, 44, 29, 32, 11, 149,
+ 208, 143, 190, 244, 167, 175, 10, 201, 84, 235,
+ 152, 175, 176, 87, 246, 215, 207, 14, 85, 174,
+ 146, 149, 229, 36, 63, 44, 167, 37, 204, 250,
+ 219, 255, 254, 206, 52, 103, 16, 0, 0, 59,
+ 10, 124, 165, 92, 136, 65, 105, 236, 247, 73,
+ 168, 224, 1, 35, 240, 0, 23, 226, 0, 154,
+ 225, 54, 178, 247, 74, 94, 17, 75, 229, 34,
+ 22, 137, 33, 128, 174, 3, 88, 10, 143, 65,
+ 21, 34, 48, 1, 51, 160, 3, 207, 151, 127,
+ 104, 37, 126, 248, 196, 4, 196, 18, 46, 202,
+ 52, 75, 2, 50, 129, 21, 88, 7, 209, 100,
+ 114, 95, 97, 12, 172, 96, 92, 36, 176, 128,
+ 104, 213, 128, 10, 117, 76, 254, 71, 8, 175,
+ 80, 130, 203, 164, 46, 186, 176, 130, 20, 24,
+ 7, 62, 24, 77, 199, 52, 47, 247, 177, 54,
+ 19, 128, 90, 60, 240, 43, 229, 132, 86, 180,
+ 161, 121, 58, 85, 11, 46, 115, 8, 175, 49,
+ 25, 155, 17, 8, 58, 184, 76, 9, 80, 46,
+ 3, 0, 85, 80, 165, 78, 235, 52, 13, 247,
+ 178, 47, 241, 164, 26, 177, 65, 27, 221, 241,
+ 132, 183, 193, 86, 189, 49, 78, 228, 84, 78,
+ 110, 248, 134, 112, 24, 135, 242, 68, 134, 28,
+ 37, 42, 103, 136, 134, 33, 104, 48, 39, 35,
+ 27, 109, 160, 48, 220, 242, 135, 21, 224, 25,
+ 220, 2, 49, 7, 53, 49, 32, 21, 4, 0,
+ 59, 0 );
+
+ php_egg_logo : array [0..7537] of byte = (
+ 71, 73, 70, 56, 57, 97, 130, 0, 67, 0,
+ 247, 255, 0, 152, 134, 136, 108, 76, 84, 73,
+ 70, 71, 166, 138, 148, 136, 108, 119, 192, 192,
+ 192, 122, 106, 117, 139, 123, 134, 75, 59, 71,
+ 167, 162, 166, 91, 85, 90, 41, 28, 39, 104,
+ 91, 102, 152, 138, 150, 87, 75, 86, 105, 100,
+ 105, 41, 39, 41, 152, 150, 152, 55, 43, 57,
+ 160, 149, 166, 156, 140, 167, 56, 55, 57, 84,
+ 76, 100, 92, 84, 116, 92, 84, 124, 116, 108,
+ 148, 116, 114, 138, 85, 84, 107, 132, 131, 150,
+ 84, 84, 116, 108, 108, 148, 132, 132, 180, 92,
+ 92, 124, 140, 140, 188, 124, 124, 165, 105, 105,
+ 140, 76, 76, 101, 100, 100, 132, 116, 116, 153,
+ 156, 156, 204, 148, 148, 194, 132, 132, 172, 69,
+ 69, 90, 140, 140, 180, 169, 169, 214, 92, 92,
+ 116, 184, 184, 227, 203, 203, 246, 164, 165, 204,
+ 232, 233, 249, 40, 41, 56, 52, 54, 72, 27,
+ 31, 47, 106, 108, 116, 123, 125, 132, 106, 121,
+ 166, 25, 27, 33, 17, 18, 21, 140, 156, 196,
+ 108, 116, 136, 56, 65, 86, 80, 100, 136, 88,
+ 94, 104, 76, 87, 101, 41, 52, 52, 71, 91,
+ 88, 138, 167, 161, 183, 197, 194, 172, 183, 177,
+ 100, 136, 115, 118, 177, 139, 156, 200, 172, 148,
+ 223, 173, 131, 195, 153, 94, 126, 105, 105, 165,
+ 123, 85, 114, 94, 88, 149, 105, 137, 165, 145,
+ 73, 131, 88, 76, 153, 92, 106, 184, 123, 90,
+ 167, 105, 141, 212, 152, 157, 180, 159, 120, 187,
+ 123, 131, 198, 135, 106, 152, 108, 122, 168, 124,
+ 77, 111, 78, 87, 151, 88, 137, 213, 138, 148,
+ 225, 148, 104, 169, 103, 74, 154, 70, 70, 132,
+ 67, 106, 183, 102, 140, 182, 138, 91, 135, 88,
+ 154, 198, 151, 176, 228, 169, 91, 169, 78, 122,
+ 199, 108, 163, 218, 153, 86, 156, 70, 105, 183,
+ 88, 103, 169, 88, 138, 215, 120, 151, 216, 137,
+ 49, 121, 31, 120, 185, 104, 136, 200, 120, 66,
+ 122, 49, 134, 184, 120, 151, 228, 124, 121, 170,
+ 104, 68, 96, 59, 180, 205, 171, 44, 93, 25,
+ 79, 147, 52, 87, 135, 68, 105, 183, 72, 121,
+ 201, 86, 138, 214, 105, 103, 150, 83, 154, 200,
+ 135, 87, 162, 51, 104, 168, 74, 119, 185, 89,
+ 134, 195, 104, 69, 132, 36, 154, 215, 120, 70,
+ 148, 25, 102, 176, 57, 119, 167, 90, 176, 233,
+ 143, 98, 161, 57, 164, 230, 122, 151, 199, 119,
+ 92, 166, 37, 122, 192, 74, 135, 204, 86, 150,
+ 216, 103, 145, 202, 104, 116, 190, 57, 45, 69,
+ 26, 92, 172, 20, 118, 176, 69, 132, 186, 87,
+ 168, 218, 124, 35, 50, 20, 152, 177, 112, 142,
+ 162, 98, 70, 71, 38, 88, 87, 57, 166, 165,
+ 109, 202, 200, 143, 173, 166, 91, 180, 177, 143,
+ 134, 127, 89, 92, 84, 44, 88, 85, 71, 73,
+ 69, 55, 57, 53, 40, 185, 168, 118, 114, 100,
+ 63, 123, 118, 106, 156, 149, 134, 105, 84, 41,
+ 230, 177, 85, 87, 71, 43, 239, 199, 124, 235,
+ 205, 148, 170, 152, 119, 167, 121, 48, 51, 42,
+ 27, 206, 173, 121, 167, 109, 22, 190, 132, 42,
+ 202, 145, 60, 181, 143, 86, 228, 179, 109, 145,
+ 116, 72, 201, 163, 107, 105, 86, 58, 37, 31,
+ 22, 206, 151, 80, 216, 164, 91, 184, 151, 105,
+ 166, 137, 99, 231, 207, 176, 111, 101, 87, 127,
+ 78, 15, 150, 105, 52, 122, 87, 42, 152, 135,
+ 114, 104, 58, 6, 72, 57, 41, 225, 185, 141,
+ 179, 126, 70, 161, 115, 69, 138, 102, 64, 155,
+ 122, 87, 183, 151, 118, 77, 49, 24, 114, 75,
+ 39, 121, 88, 57, 168, 152, 137, 95, 57, 26,
+ 103, 69, 40, 188, 138, 96, 88, 71, 56, 65,
+ 35, 11, 143, 107, 79, 217, 171, 136, 88, 59,
+ 39, 105, 86, 73, 225, 189, 163, 129, 94, 71,
+ 199, 160, 135, 129, 103, 88, 148, 121, 105, 207,
+ 172, 153, 137, 117, 105, 103, 73, 57, 188, 143,
+ 121, 198, 182, 174, 204, 198, 195, 101, 60, 42,
+ 116, 76, 57, 119, 88, 74, 166, 127, 109, 69,
+ 43, 34, 55, 43, 39, 165, 133, 123, 182, 149,
+ 139, 185, 162, 156, 135, 107, 101, 167, 154, 151,
+ 84, 50, 44, 87, 59, 54, 139, 133, 132, 102,
+ 76, 72, 119, 90, 86, 71, 58, 56, 150, 124,
+ 120, 87, 73, 71, 136, 121, 119, 167, 139, 136,
+ 182, 138, 134, 120, 104, 103, 116, 76, 76, 103,
+ 87, 87, 122, 120, 120, 255, 255, 255, 0, 0,
+ 0, 33, 249, 4, 1, 0, 0, 5, 0, 44,
+ 0, 0, 0, 0, 130, 0, 67, 0, 64, 8,
+ 255, 0, 11, 8, 28, 72, 176, 160, 193, 131,
+ 8, 13, 162, 88, 24, 34, 196, 138, 15, 41,
+ 82, 136, 16, 97, 194, 132, 135, 18, 37, 64,
+ 180, 184, 192, 177, 99, 199, 22, 32, 64, 148,
+ 24, 225, 193, 196, 68, 17, 41, 62, 124, 104,
+ 24, 98, 33, 138, 132, 48, 99, 202, 156, 121,
+ 144, 97, 10, 19, 32, 54, 144, 32, 161, 162,
+ 39, 147, 34, 81, 214, 0, 50, 99, 166, 74,
+ 20, 35, 73, 162, 36, 65, 194, 101, 138, 83,
+ 51, 110, 246, 108, 177, 178, 134, 205, 158, 70,
+ 101, 188, 164, 49, 147, 38, 205, 155, 41, 70,
+ 164, 72, 137, 178, 100, 73, 19, 179, 79, 180,
+ 148, 69, 43, 230, 75, 19, 43, 85, 2, 169,
+ 209, 130, 6, 208, 220, 43, 74, 152, 248, 232,
+ 112, 33, 164, 200, 12, 34, 86, 44, 164, 73,
+ 184, 0, 138, 15, 30, 116, 170, 224, 193, 132,
+ 143, 23, 41, 110, 182, 156, 177, 50, 167, 207,
+ 27, 48, 108, 186, 148, 241, 83, 40, 16, 32,
+ 70, 143, 2, 173, 113, 3, 168, 210, 35, 74,
+ 140, 246, 116, 113, 66, 100, 8, 145, 8, 17,
+ 226, 217, 168, 241, 160, 223, 0, 118, 184, 217,
+ 121, 243, 102, 173, 247, 182, 109, 187, 189, 101,
+ 243, 69, 156, 120, 182, 109, 221, 192, 201, 155,
+ 55, 204, 147, 243, 56, 115, 164, 116, 153, 94,
+ 133, 52, 164, 73, 106, 202, 100, 93, 228, 231,
+ 77, 152, 58, 97, 240, 48, 255, 193, 56, 82,
+ 196, 135, 151, 52, 67, 136, 80, 172, 224, 30,
+ 0, 0, 13, 26, 0, 168, 7, 224, 25, 62,
+ 0, 248, 220, 185, 3, 16, 175, 193, 1, 27,
+ 54, 112, 64, 1, 5, 19, 36, 64, 196, 129,
+ 84, 28, 113, 68, 28, 125, 80, 113, 74, 55,
+ 191, 252, 98, 138, 2, 51, 204, 64, 3, 14,
+ 56, 84, 96, 10, 0, 6, 164, 179, 0, 2,
+ 218, 32, 115, 204, 44, 210, 132, 179, 77, 62,
+ 4, 224, 179, 77, 56, 199, 244, 82, 15, 3,
+ 7, 74, 96, 78, 55, 240, 72, 176, 0, 4,
+ 252, 152, 50, 140, 53, 156, 244, 193, 198, 27,
+ 80, 85, 177, 5, 87, 129, 196, 129, 197, 24,
+ 88, 24, 161, 198, 29, 101, 104, 225, 214, 21,
+ 78, 226, 161, 198, 21, 21, 153, 112, 30, 76,
+ 57, 145, 0, 142, 57, 230, 204, 179, 28, 55,
+ 221, 168, 179, 78, 3, 28, 28, 80, 15, 62,
+ 234, 212, 211, 205, 55, 237, 180, 217, 230, 61,
+ 112, 126, 99, 128, 1, 250, 212, 105, 74, 43,
+ 189, 216, 34, 204, 53, 242, 32, 32, 0, 4,
+ 57, 224, 112, 33, 14, 57, 228, 96, 207, 47,
+ 154, 100, 2, 202, 47, 247, 204, 121, 192, 123,
+ 7, 16, 112, 64, 3, 3, 172, 227, 141, 49,
+ 198, 172, 82, 203, 46, 208, 192, 35, 202, 52,
+ 175, 136, 162, 137, 51, 189, 220, 2, 11, 44,
+ 180, 240, 226, 201, 24, 75, 222, 129, 8, 24,
+ 94, 160, 255, 97, 70, 25, 105, 168, 145, 198,
+ 26, 104, 8, 130, 198, 146, 105, 176, 17, 136,
+ 33, 113, 136, 225, 208, 7, 48, 133, 128, 83,
+ 11, 14, 168, 2, 142, 51, 201, 40, 227, 172,
+ 50, 220, 152, 131, 141, 114, 243, 204, 195, 165,
+ 57, 252, 32, 80, 225, 12, 60, 144, 160, 0,
+ 63, 252, 40, 160, 0, 3, 42, 252, 96, 138,
+ 3, 14, 240, 243, 13, 55, 21, 208, 32, 3,
+ 4, 25, 166, 3, 47, 14, 185, 212, 43, 202,
+ 47, 161, 152, 2, 231, 3, 60, 240, 16, 132,
+ 2, 53, 24, 16, 79, 13, 10, 180, 194, 74,
+ 43, 154, 136, 82, 1, 16, 16, 52, 76, 207,
+ 40, 244, 124, 211, 202, 50, 188, 180, 114, 197,
+ 28, 138, 196, 145, 70, 30, 107, 128, 129, 134,
+ 31, 121, 96, 167, 134, 31, 110, 92, 33, 200,
+ 29, 133, 44, 66, 200, 36, 113, 16, 241, 130,
+ 11, 39, 160, 39, 211, 97, 38, 140, 48, 66,
+ 9, 27, 20, 195, 204, 206, 215, 144, 67, 78,
+ 52, 209, 144, 3, 13, 51, 233, 224, 32, 3,
+ 2, 242, 152, 163, 13, 55, 213, 50, 192, 143,
+ 3, 22, 218, 51, 205, 52, 206, 128, 67, 15,
+ 14, 64, 228, 242, 202, 40, 92, 143, 130, 206,
+ 52, 212, 52, 227, 202, 44, 178, 148, 29, 75,
+ 44, 193, 8, 147, 76, 170, 164, 144, 194, 203,
+ 219, 157, 108, 178, 9, 38, 110, 116, 33, 70,
+ 162, 162, 20, 3, 113, 215, 153, 216, 255, 178,
+ 201, 28, 134, 204, 113, 73, 32, 140, 64, 82,
+ 8, 35, 140, 80, 210, 200, 36, 136, 20, 242,
+ 135, 26, 227, 248, 19, 195, 11, 48, 12, 86,
+ 24, 76, 54, 81, 84, 101, 6, 27, 72, 128,
+ 3, 4, 244, 76, 35, 15, 46, 206, 104, 147,
+ 76, 50, 34, 142, 56, 139, 43, 157, 22, 19,
+ 141, 54, 216, 60, 60, 141, 61, 246, 96, 243,
+ 77, 56, 181, 240, 226, 246, 219, 164, 44, 221,
+ 205, 51, 226, 180, 226, 11, 39, 115, 136, 113,
+ 135, 31, 119, 220, 161, 71, 30, 121, 44, 255,
+ 135, 32, 109, 216, 33, 189, 29, 112, 220, 65,
+ 8, 33, 214, 223, 113, 5, 17, 49, 76, 254,
+ 114, 229, 150, 95, 46, 254, 248, 46, 177, 244,
+ 16, 68, 18, 69, 164, 254, 10, 236, 179, 228,
+ 254, 251, 13, 185, 180, 208, 9, 244, 199, 44,
+ 255, 253, 46, 141, 175, 255, 254, 5, 49, 4,
+ 81, 205, 32, 232, 192, 6, 116, 178, 19, 158,
+ 244, 36, 8, 65, 96, 194, 19, 206, 178, 4,
+ 41, 84, 193, 10, 112, 129, 32, 4, 151, 0,
+ 7, 59, 124, 65, 13, 96, 104, 194, 89, 132,
+ 96, 4, 37, 60, 225, 11, 95, 120, 194, 21,
+ 138, 144, 151, 32, 252, 96, 128, 27, 232, 128,
+ 10, 251, 18, 146, 18, 152, 36, 5, 43, 104,
+ 137, 204, 248, 119, 57, 20, 132, 32, 5, 137,
+ 217, 201, 1, 181, 240, 135, 59, 180, 161, 12,
+ 102, 216, 131, 30, 255, 26, 193, 8, 61, 172,
+ 97, 16, 135, 56, 132, 35, 20, 65, 134, 42,
+ 216, 74, 15, 111, 232, 195, 25, 206, 80, 135,
+ 58, 16, 225, 8, 68, 160, 66, 18, 166, 128,
+ 5, 44, 132, 225, 64, 173, 25, 135, 24, 199,
+ 72, 70, 50, 14, 97, 8, 99, 28, 66, 21,
+ 195, 240, 134, 55, 168, 161, 11, 128, 112, 131,
+ 21, 216, 208, 7, 55, 168, 97, 74, 95, 96,
+ 146, 26, 248, 160, 4, 191, 96, 196, 74, 45,
+ 217, 159, 122, 64, 192, 19, 30, 48, 160, 30,
+ 103, 114, 7, 110, 18, 64, 5, 39, 96, 97,
+ 9, 70, 24, 195, 25, 222, 144, 6, 52, 96,
+ 102, 50, 96, 216, 66, 20, 204, 16, 136, 57,
+ 128, 225, 17, 125, 56, 66, 21, 197, 113, 138,
+ 120, 68, 128, 3, 27, 152, 1, 134, 32, 16,
+ 10, 129, 225, 71, 29, 42, 242, 205, 111, 194,
+ 145, 143, 117, 228, 35, 28, 183, 216, 197, 46,
+ 120, 97, 13, 95, 28, 199, 28, 244, 144, 129,
+ 12, 20, 240, 141, 101, 176, 162, 71, 93, 184,
+ 130, 24, 194, 16, 135, 49, 144, 161, 14, 94,
+ 196, 194, 23, 4, 1, 136, 71, 168, 225, 11,
+ 109, 240, 3, 35, 208, 208, 5, 56, 100, 193,
+ 102, 37, 185, 82, 76, 56, 199, 19, 126, 232,
+ 163, 29, 221, 24, 198, 55, 234, 129, 27, 10,
+ 112, 32, 30, 195, 128, 37, 154, 234, 113, 15,
+ 2, 220, 227, 0, 241, 136, 7, 0, 78, 33,
+ 255, 159, 3, 224, 51, 2, 167, 120, 6, 59,
+ 134, 193, 13, 112, 160, 131, 30, 127, 162, 129,
+ 66, 9, 37, 129, 7, 48, 64, 1, 246, 16,
+ 128, 10, 72, 96, 1, 167, 205, 131, 0, 0,
+ 24, 192, 4, 38, 192, 14, 113, 120, 3, 22,
+ 214, 192, 148, 166, 106, 81, 141, 119, 24, 52,
+ 29, 244, 224, 70, 47, 96, 129, 41, 76, 252,
+ 65, 14, 105, 64, 89, 32, 2, 241, 7, 55,
+ 60, 98, 13, 85, 88, 66, 21, 226, 240, 6,
+ 55, 248, 244, 13, 108, 0, 195, 31, 30, 49,
+ 7, 56, 40, 97, 34, 196, 74, 136, 7, 46,
+ 176, 1, 4, 76, 3, 27, 92, 194, 6, 55,
+ 218, 33, 143, 164, 113, 105, 30, 110, 106, 71,
+ 181, 230, 129, 141, 170, 202, 67, 0, 51, 152,
+ 168, 5, 4, 32, 0, 218, 69, 72, 25, 216,
+ 138, 150, 4, 222, 181, 0, 12, 21, 234, 173,
+ 185, 0, 69, 41, 64, 49, 13, 125, 0, 32,
+ 2, 144, 106, 135, 1, 28, 106, 131, 1, 8,
+ 135, 21, 183, 64, 69, 49, 52, 49, 10, 8,
+ 228, 98, 20, 175, 80, 69, 43, 120, 161, 12,
+ 88, 156, 34, 8, 89, 152, 27, 37, 244, 160,
+ 135, 61, 152, 161, 112, 168, 129, 4, 35, 182,
+ 208, 83, 196, 65, 162, 17, 160, 101, 196, 28,
+ 156, 192, 130, 152, 197, 132, 102, 25, 1, 65,
+ 49, 122, 230, 51, 114, 128, 163, 28, 92, 2,
+ 7, 60, 192, 65, 91, 112, 255, 188, 67, 94,
+ 160, 179, 7, 184, 194, 197, 128, 7, 40, 160,
+ 39, 36, 120, 192, 57, 185, 17, 204, 119, 65,
+ 32, 29, 163, 16, 5, 58, 138, 161, 51, 98,
+ 16, 3, 24, 209, 152, 198, 61, 250, 241, 11,
+ 165, 125, 66, 21, 175, 200, 46, 51, 108, 193,
+ 10, 86, 192, 2, 19, 224, 205, 66, 97, 37,
+ 48, 3, 178, 134, 130, 31, 18, 106, 5, 41,
+ 48, 129, 8, 63, 252, 225, 13, 128, 248, 76,
+ 104, 11, 1, 134, 46, 168, 193, 51, 51, 37,
+ 4, 28, 248, 208, 61, 202, 133, 175, 48, 40,
+ 88, 129, 8, 60, 64, 224, 139, 32, 0, 29,
+ 59, 219, 217, 43, 110, 36, 1, 164, 65, 85,
+ 27, 16, 214, 70, 53, 170, 161, 13, 85, 228,
+ 226, 26, 224, 160, 70, 52, 202, 81, 12, 132,
+ 142, 194, 30, 161, 80, 197, 52, 126, 129, 11,
+ 92, 40, 227, 22, 181, 168, 197, 42, 86, 204,
+ 226, 21, 179, 66, 83, 183, 232, 68, 220, 46,
+ 17, 7, 64, 228, 1, 16, 124, 176, 131, 37,
+ 34, 145, 137, 72, 88, 194, 18, 116, 240, 49,
+ 30, 148, 240, 11, 60, 224, 65, 11, 88, 136,
+ 130, 29, 4, 225, 7, 236, 197, 161, 123, 147,
+ 131, 217, 127, 105, 56, 179, 134, 124, 224, 36,
+ 88, 158, 136, 9, 12, 208, 14, 101, 28, 131,
+ 22, 186, 208, 229, 46, 116, 65, 230, 89, 28,
+ 195, 21, 174, 56, 134, 52, 104, 145, 170, 93,
+ 164, 184, 255, 22, 186, 72, 70, 55, 72, 209,
+ 221, 99, 94, 226, 15, 128, 40, 131, 26, 128,
+ 148, 6, 63, 44, 162, 16, 126, 190, 195, 28,
+ 176, 32, 4, 22, 184, 224, 208, 136, 102, 1,
+ 12, 236, 55, 101, 42, 59, 90, 33, 54, 12,
+ 1, 68, 40, 114, 179, 11, 8, 16, 133, 5,
+ 204, 180, 166, 55, 173, 105, 20, 162, 80, 133,
+ 124, 1, 9, 8, 70, 144, 1, 147, 124, 32,
+ 134, 249, 123, 180, 170, 9, 98, 19, 19, 224,
+ 172, 128, 61, 57, 96, 90, 180, 240, 132, 177,
+ 72, 193, 11, 95, 240, 66, 25, 34, 195, 5,
+ 77, 10, 201, 10, 81, 136, 66, 26, 170, 144,
+ 20, 41, 36, 161, 11, 80, 128, 130, 20, 52,
+ 120, 133, 38, 92, 1, 146, 143, 44, 203, 19,
+ 52, 131, 6, 45, 104, 161, 10, 197, 203, 66,
+ 16, 124, 144, 66, 190, 248, 101, 4, 38, 128,
+ 97, 32, 87, 93, 229, 155, 100, 41, 214, 89,
+ 184, 66, 23, 192, 112, 21, 51, 128, 1, 12,
+ 107, 144, 195, 27, 206, 224, 20, 46, 176, 225,
+ 12, 100, 56, 3, 18, 200, 48, 5, 43, 76,
+ 1, 9, 253, 54, 195, 22, 146, 144, 132, 8,
+ 214, 183, 139, 72, 33, 248, 17, 134, 160, 160,
+ 36, 8, 33, 9, 71, 176, 130, 17, 176, 160,
+ 160, 58, 80, 33, 12, 97, 240, 98, 21, 202,
+ 192, 60, 55, 212, 202, 129, 106, 248, 195, 31,
+ 240, 144, 5, 81, 139, 100, 4, 230, 255, 25,
+ 183, 170, 105, 118, 1, 3, 170, 128, 9, 125,
+ 176, 204, 26, 222, 64, 134, 62, 128, 193, 12,
+ 133, 128, 4, 36, 160, 232, 8, 74, 84, 66,
+ 52, 138, 8, 68, 37, 200, 96, 133, 46, 36,
+ 97, 42, 75, 240, 226, 129, 18, 144, 0, 216,
+ 68, 64, 145, 186, 17, 7, 110, 130, 35, 117,
+ 113, 88, 221, 56, 197, 17, 7, 62, 234, 17,
+ 208, 117, 120, 162, 138, 88, 152, 195, 27, 212,
+ 82, 5, 47, 50, 40, 17, 108, 48, 66, 176,
+ 193, 224, 83, 43, 44, 161, 143, 34, 193, 72,
+ 96, 102, 8, 224, 15, 152, 64, 49, 47, 199,
+ 130, 34, 180, 64, 240, 55, 228, 186, 223, 51,
+ 13, 4, 27, 226, 8, 6, 43, 152, 65, 13,
+ 148, 96, 158, 25, 244, 64, 137, 71, 84, 98,
+ 232, 85, 92, 122, 211, 125, 80, 1, 8, 72,
+ 192, 1, 253, 216, 231, 51, 158, 177, 140, 101,
+ 244, 198, 55, 38, 242, 134, 110, 132, 147, 141,
+ 221, 24, 99, 27, 231, 192, 134, 135, 14, 181,
+ 142, 108, 112, 130, 15, 124, 0, 195, 28, 170,
+ 128, 7, 67, 188, 161, 11, 145, 140, 3, 30,
+ 192, 112, 235, 66, 128, 114, 14, 62, 85, 67,
+ 22, 70, 98, 51, 17, 168, 60, 38, 234, 81,
+ 140, 3, 218, 65, 159, 1, 12, 0, 31, 206,
+ 31, 64, 124, 164, 191, 209, 2, 49, 50, 12,
+ 129, 195, 62, 37, 28, 145, 136, 61, 188, 27,
+ 16, 138, 8, 131, 255, 39, 158, 81, 15, 125,
+ 29, 128, 4, 60, 144, 129, 160, 32, 240, 139,
+ 83, 120, 212, 26, 186, 152, 197, 44, 220, 108,
+ 141, 223, 164, 105, 29, 225, 144, 134, 138, 87,
+ 1, 11, 224, 16, 103, 25, 240, 176, 0, 50,
+ 32, 1, 250, 240, 13, 116, 198, 9, 138, 160,
+ 8, 82, 212, 7, 142, 208, 8, 240, 5, 8,
+ 91, 16, 77, 31, 147, 7, 123, 48, 8, 63,
+ 114, 71, 82, 160, 5, 53, 224, 1, 165, 38,
+ 78, 9, 145, 2, 132, 164, 2, 14, 160, 15,
+ 247, 80, 15, 234, 0, 0, 254, 244, 30, 239,
+ 129, 15, 235, 112, 31, 40, 232, 79, 255, 145,
+ 130, 239, 209, 0, 250, 209, 116, 79, 247, 12,
+ 173, 0, 45, 216, 112, 94, 21, 32, 76, 52,
+ 80, 40, 11, 32, 0, 232, 183, 86, 60, 192,
+ 1, 51, 80, 1, 230, 112, 14, 245, 80, 75,
+ 7, 80, 41, 188, 113, 14, 117, 98, 87, 236,
+ 96, 12, 231, 240, 14, 183, 37, 3, 14, 240,
+ 13, 195, 0, 11, 156, 80, 7, 65, 119, 7,
+ 107, 16, 134, 80, 81, 43, 90, 48, 29, 86,
+ 208, 4, 79, 176, 4, 73, 128, 5, 12, 18,
+ 7, 93, 128, 103, 128, 64, 37, 19, 17, 2,
+ 48, 241, 106, 246, 48, 15, 220, 48, 85, 221,
+ 80, 75, 47, 104, 0, 246, 100, 130, 234, 16,
+ 136, 245, 240, 13, 4, 128, 72, 136, 4, 39,
+ 249, 244, 30, 167, 16, 80, 173, 160, 39, 204,
+ 255, 208, 97, 244, 48, 47, 110, 149, 3, 161,
+ 160, 15, 12, 16, 10, 184, 0, 14, 57, 178,
+ 87, 6, 240, 40, 240, 209, 0, 9, 160, 27,
+ 217, 96, 12, 47, 150, 98, 183, 32, 91, 6,
+ 69, 15, 161, 160, 13, 43, 101, 13, 166, 194,
+ 9, 127, 80, 6, 185, 242, 7, 209, 81, 95,
+ 99, 224, 6, 96, 80, 71, 144, 0, 8, 156,
+ 225, 7, 136, 192, 8, 133, 80, 8, 147, 128,
+ 7, 98, 160, 62, 88, 210, 1, 36, 32, 15,
+ 93, 101, 14, 76, 131, 46, 1, 128, 85, 76,
+ 195, 13, 223, 208, 13, 89, 69, 97, 75, 147,
+ 135, 243, 16, 46, 223, 130, 94, 250, 212, 14,
+ 182, 144, 12, 224, 192, 13, 246, 176, 48, 185,
+ 144, 3, 10, 5, 87, 138, 130, 11, 165, 208,
+ 14, 216, 192, 15, 158, 8, 131, 254, 228, 135,
+ 219, 48, 138, 154, 18, 12, 203, 149, 93, 185,
+ 160, 10, 197, 80, 10, 188, 32, 13, 183, 64,
+ 10, 159, 240, 9, 155, 112, 9, 88, 96, 95,
+ 127, 128, 8, 128, 64, 9, 110, 224, 73, 119,
+ 116, 65, 128, 16, 8, 111, 48, 83, 107, 160,
+ 6, 110, 16, 7, 87, 176, 16, 43, 0, 19,
+ 34, 0, 2, 23, 96, 1, 175, 85, 14, 18,
+ 150, 135, 220, 208, 85, 246, 240, 37, 250, 176,
+ 85, 252, 208, 85, 14, 176, 24, 60, 160, 2,
+ 22, 224, 3, 223, 130, 46, 34, 104, 10, 237,
+ 160, 91, 121, 72, 15, 52, 255, 208, 48, 24,
+ 66, 40, 111, 149, 3, 137, 165, 44, 166, 32,
+ 31, 100, 146, 2, 55, 80, 148, 69, 41, 2,
+ 28, 224, 13, 172, 48, 12, 161, 144, 14, 2,
+ 80, 121, 199, 149, 14, 197, 80, 76, 202, 192,
+ 11, 219, 16, 15, 98, 112, 9, 52, 246, 7,
+ 123, 144, 6, 128, 118, 144, 214, 67, 8, 146,
+ 240, 103, 41, 227, 7, 147, 0, 90, 110, 96,
+ 8, 48, 224, 2, 149, 131, 57, 136, 17, 18,
+ 22, 112, 13, 61, 19, 13, 206, 128, 12, 180,
+ 208, 11, 218, 160, 52, 218, 224, 12, 229, 80,
+ 14, 180, 85, 35, 228, 53, 3, 14, 176, 141,
+ 227, 226, 80, 60, 176, 1, 15, 240, 0, 6,
+ 96, 10, 221, 32, 15, 238, 98, 33, 199, 53,
+ 10, 122, 163, 10, 215, 64, 13, 150, 41, 0,
+ 181, 17, 133, 9, 229, 147, 163, 32, 0, 8,
+ 48, 12, 152, 2, 144, 116, 0, 1, 57, 73,
+ 154, 195, 228, 0, 2, 160, 15, 19, 67, 10,
+ 131, 67, 9, 87, 177, 7, 123, 80, 77, 111,
+ 224, 8, 144, 144, 7, 53, 101, 8, 124, 48,
+ 9, 219, 20, 56, 112, 48, 4, 147, 3, 62,
+ 85, 38, 2, 228, 177, 1, 232, 112, 13, 239,
+ 48, 151, 64, 227, 51, 209, 208, 12, 209, 0,
+ 13, 183, 5, 58, 216, 96, 45, 237, 200, 15,
+ 12, 240, 80, 51, 32, 3, 62, 192, 15, 214,
+ 34, 15, 13, 83, 121, 90, 83, 12, 202, 53,
+ 13, 163, 255, 64, 13, 192, 112, 54, 177, 0,
+ 12, 194, 80, 10, 216, 160, 13, 182, 160, 12,
+ 189, 208, 13, 221, 192, 13, 202, 176, 12, 176,
+ 64, 10, 189, 128, 9, 131, 131, 7, 116, 80,
+ 1, 8, 37, 10, 252, 80, 86, 252, 16, 10,
+ 159, 192, 11, 46, 197, 49, 114, 0, 8, 135,
+ 3, 9, 139, 48, 9, 133, 224, 21, 149, 224,
+ 8, 241, 181, 43, 145, 19, 3, 82, 70, 62,
+ 118, 103, 51, 55, 115, 96, 59, 3, 13, 203,
+ 73, 14, 204, 64, 13, 185, 0, 1, 21, 80,
+ 146, 15, 6, 97, 210, 34, 15, 246, 0, 1,
+ 175, 48, 13, 215, 144, 12, 168, 0, 14, 185,
+ 80, 1, 135, 53, 59, 162, 240, 41, 37, 230,
+ 10, 186, 144, 10, 241, 39, 127, 242, 151, 10,
+ 62, 186, 10, 165, 184, 11, 255, 120, 9, 128,
+ 3, 7, 94, 128, 7, 63, 102, 9, 91, 147,
+ 11, 74, 90, 47, 154, 16, 144, 151, 192, 76,
+ 110, 224, 5, 199, 115, 61, 132, 80, 8, 136,
+ 32, 8, 152, 16, 3, 146, 227, 95, 116, 183,
+ 63, 54, 116, 101, 25, 48, 166, 22, 97, 1,
+ 239, 0, 13, 208, 64, 13, 2, 88, 1, 211,
+ 0, 14, 184, 16, 97, 220, 80, 13, 200, 128,
+ 12, 105, 179, 51, 197, 128, 14, 37, 54, 13,
+ 197, 128, 13, 216, 80, 12, 211, 96, 14, 206,
+ 82, 13, 243, 208, 11, 111, 86, 168, 100, 70,
+ 11, 164, 176, 13, 235, 149, 155, 127, 255, 22,
+ 8, 123, 144, 7, 32, 115, 7, 58, 86, 65,
+ 59, 38, 6, 150, 96, 7, 133, 144, 7, 180,
+ 134, 7, 112, 80, 65, 112, 112, 5, 84, 208,
+ 95, 47, 99, 63, 228, 150, 16, 54, 180, 2,
+ 18, 81, 37, 85, 2, 2, 168, 9, 15, 84,
+ 83, 151, 199, 112, 12, 97, 166, 75, 179, 128,
+ 12, 182, 80, 53, 180, 101, 15, 163, 144, 14,
+ 175, 0, 13, 164, 35, 97, 182, 80, 13, 201,
+ 160, 54, 170, 96, 15, 158, 48, 60, 156, 192,
+ 154, 142, 17, 43, 84, 10, 50, 138, 195, 8,
+ 136, 112, 7, 15, 249, 7, 142, 35, 6, 69,
+ 144, 0, 47, 144, 173, 47, 195, 150, 242, 83,
+ 170, 252, 83, 62, 15, 33, 17, 89, 166, 62,
+ 234, 83, 38, 240, 233, 44, 115, 202, 102, 119,
+ 169, 12, 233, 52, 12, 164, 112, 42, 156, 144,
+ 172, 115, 195, 7, 196, 120, 5, 35, 196, 1,
+ 43, 112, 2, 48, 192, 2, 252, 218, 175, 138,
+ 70, 63, 248, 227, 173, 2, 59, 176, 4, 91,
+ 176, 4, 203, 16, 146, 118, 101, 20, 113, 17,
+ 33, 1, 106, 158, 246, 176, 16, 59, 64, 160,
+ 22, 106, 162, 54, 18, 165, 134, 18, 167, 38,
+ 67, 95, 106, 176, 43, 23, 166, 169, 58, 2,
+ 1, 52, 64, 156, 182, 19, 63, 240, 3, 144,
+ 197, 4, 40, 91, 4, 205, 214, 4, 70, 134,
+ 7, 213, 70, 7, 89, 16, 179, 8, 52, 179,
+ 5, 244, 105, 43, 255, 84, 177, 37, 145, 114,
+ 50, 196, 177, 250, 147, 57, 32, 43, 178, 176,
+ 166, 2, 8, 196, 4, 103, 17, 5, 98, 225,
+ 111, 70, 224, 111, 78, 49, 21, 68, 177, 5,
+ 253, 6, 66, 77, 240, 110, 98, 1, 73, 144,
+ 116, 22, 70, 112, 22, 88, 80, 4, 105, 241,
+ 5, 90, 32, 6, 40, 123, 66, 221, 214, 1,
+ 21, 107, 106, 59, 203, 179, 166, 106, 67, 230,
+ 70, 64, 177, 22, 4, 74, 80, 4, 75, 48,
+ 29, 106, 0, 5, 74, 97, 180, 98, 33, 5,
+ 239, 102, 6, 142, 80, 20, 85, 128, 4, 91,
+ 176, 5, 96, 144, 7, 2, 39, 36, 154, 4,
+ 5, 93, 240, 64, 80, 96, 109, 118, 115, 5,
+ 73, 178, 22, 5, 169, 5, 77, 224, 64, 108,
+ 224, 6, 95, 192, 77, 77, 192, 4, 63, 176,
+ 66, 126, 68, 182, 27, 123, 176, 55, 132, 19,
+ 120, 39, 180, 98, 224, 83, 81, 112, 115, 141,
+ 32, 21, 72, 128, 4, 73, 161, 180, 78, 27,
+ 112, 108, 208, 107, 92, 224, 110, 68, 17, 108,
+ 107, 231, 6, 15, 148, 4, 85, 96, 4, 70,
+ 112, 4, 99, 128, 187, 75, 112, 5, 85, 208,
+ 5, 144, 148, 4, 73, 7, 73, 85, 80, 188,
+ 93, 32, 5, 106, 48, 20, 122, 166, 110, 180,
+ 198, 4, 98, 155, 185, 41, 112, 124, 222, 122,
+ 24, 194, 249, 185, 89, 128, 7, 119, 192, 118,
+ 111, 112, 21, 148, 101, 6, 114, 128, 111, 135,
+ 255, 192, 6, 83, 176, 113, 107, 80, 9, 248,
+ 198, 111, 99, 48, 6, 10, 114, 4, 91, 20,
+ 108, 17, 148, 113, 78, 64, 5, 173, 113, 70,
+ 103, 52, 14, 244, 171, 70, 9, 114, 32, 174,
+ 161, 187, 72, 210, 7, 113, 128, 6, 104, 64,
+ 43, 96, 48, 73, 238, 246, 7, 104, 208, 169,
+ 67, 102, 114, 37, 224, 1, 115, 183, 185, 61,
+ 171, 30, 37, 160, 67, 229, 2, 20, 86, 16,
+ 124, 94, 144, 7, 144, 192, 189, 107, 144, 8,
+ 149, 112, 8, 149, 192, 8, 131, 144, 111, 108,
+ 96, 6, 128, 203, 73, 129, 48, 6, 117, 224,
+ 26, 96, 68, 5, 44, 76, 4, 86, 247, 194,
+ 48, 252, 194, 99, 148, 117, 49, 44, 14, 117,
+ 144, 111, 61, 5, 6, 119, 176, 103, 115, 16,
+ 7, 113, 96, 5, 70, 98, 109, 122, 6, 6,
+ 85, 112, 5, 62, 208, 66, 11, 108, 124, 14,
+ 76, 24, 135, 65, 78, 7, 36, 6, 192, 71,
+ 192, 115, 16, 6, 99, 192, 83, 101, 112, 61,
+ 140, 176, 189, 141, 240, 115, 69, 81, 77, 131,
+ 208, 70, 91, 64, 108, 235, 187, 116, 17, 96,
+ 3, 253, 96, 74, 185, 49, 117, 193, 33, 122,
+ 187, 49, 28, 190, 84, 28, 217, 176, 14, 90,
+ 53, 15, 221, 224, 117, 23, 7, 23, 103, 145,
+ 83, 108, 24, 8, 141, 16, 8, 112, 145, 29,
+ 121, 224, 21, 4, 231, 4, 71, 140, 17, 40,
+ 231, 129, 53, 132, 24, 138, 255, 193, 24, 129,
+ 128, 6, 74, 49, 145, 78, 97, 5, 129, 144,
+ 6, 101, 240, 35, 108, 48, 145, 27, 51, 9,
+ 147, 16, 8, 114, 192, 120, 73, 116, 8, 17,
+ 57, 6, 96, 212, 116, 54, 160, 0, 168, 137,
+ 121, 155, 39, 80, 191, 241, 121, 167, 247, 27,
+ 193, 225, 198, 190, 116, 28, 231, 32, 15, 163,
+ 128, 0, 252, 48, 12, 174, 71, 164, 111, 52,
+ 29, 93, 224, 6, 129, 128, 8, 104, 144, 129,
+ 106, 224, 5, 177, 82, 6, 52, 23, 7, 101,
+ 0, 6, 69, 96, 200, 40, 39, 189, 167, 101,
+ 44, 120, 247, 0, 0, 224, 14, 158, 224, 4,
+ 78, 16, 113, 90, 0, 7, 101, 208, 5, 81,
+ 160, 8, 131, 176, 6, 94, 225, 20, 112, 116,
+ 160, 187, 6, 6, 15, 105, 129, 207, 100, 69,
+ 238, 16, 1, 19, 160, 1, 60, 112, 33, 11,
+ 96, 15, 103, 76, 31, 129, 184, 14, 190, 81,
+ 127, 225, 176, 14, 250, 188, 14, 219, 96, 13,
+ 253, 39, 28, 222, 16, 14, 230, 144, 14, 52,
+ 80, 1, 234, 194, 9, 172, 224, 9, 134, 176,
+ 71, 124, 16, 56, 16, 84, 7, 99, 48, 7,
+ 121, 148, 21, 140, 80, 9, 134, 16, 43, 122,
+ 160, 6, 222, 68, 124, 30, 16, 189, 52, 113,
+ 24, 30, 96, 64, 10, 80, 15, 206, 135, 31,
+ 80, 151, 0, 226, 64, 4, 6, 66, 4, 117,
+ 16, 7, 197, 107, 206, 243, 118, 6, 108, 192,
+ 6, 135, 255, 144, 8, 246, 21, 8, 125, 128,
+ 194, 164, 116, 15, 253, 81, 3, 233, 183, 74,
+ 242, 12, 117, 234, 224, 143, 32, 85, 127, 43,
+ 34, 38, 249, 231, 102, 181, 16, 82, 110, 252,
+ 13, 145, 40, 3, 2, 192, 152, 164, 136, 128,
+ 61, 124, 36, 103, 16, 8, 124, 208, 5, 125,
+ 112, 181, 104, 240, 8, 179, 34, 204, 118, 209,
+ 5, 214, 166, 4, 5, 166, 196, 167, 245, 1,
+ 35, 96, 64, 191, 64, 136, 239, 65, 31, 25,
+ 181, 130, 3, 128, 130, 241, 209, 0, 27, 197,
+ 116, 141, 132, 5, 115, 68, 111, 83, 16, 5,
+ 110, 160, 8, 84, 224, 14, 195, 96, 10, 140,
+ 226, 211, 63, 141, 53, 250, 160, 31, 245, 160,
+ 12, 96, 70, 102, 66, 250, 27, 40, 162, 34,
+ 210, 160, 11, 181, 16, 14, 74, 72, 0, 237,
+ 16, 208, 1, 184, 0, 21, 240, 0, 119, 98,
+ 12, 61, 226, 35, 145, 27, 95, 224, 252, 7,
+ 101, 23, 6, 87, 32, 5, 101, 112, 56, 56,
+ 214, 5, 115, 144, 21, 95, 192, 7, 59, 112,
+ 177, 206, 76, 16, 136, 97, 64, 5, 184, 78,
+ 51, 232, 14, 234, 224, 30, 238, 208, 130, 248,
+ 48, 215, 28, 96, 3, 24, 161, 1, 28, 16,
+ 31, 5, 98, 125, 140, 52, 126, 4, 245, 11,
+ 230, 4, 86, 50, 48, 40, 56, 242, 0, 8,
+ 240, 10, 50, 128, 1, 19, 64, 15, 184, 144,
+ 12, 210, 112, 14, 180, 148, 34, 252, 255, 28,
+ 14, 223, 64, 48, 54, 160, 1, 253, 176, 14,
+ 234, 112, 167, 16, 48, 76, 247, 112, 10, 92,
+ 88, 7, 190, 2, 68, 198, 187, 21, 61, 213,
+ 70, 86, 0, 5, 112, 80, 134, 77, 144, 113,
+ 87, 240, 4, 115, 176, 36, 59, 80, 17, 30,
+ 157, 16, 235, 81, 78, 231, 180, 38, 236, 180,
+ 31, 48, 104, 130, 248, 224, 130, 240, 8, 31,
+ 42, 152, 136, 52, 152, 0, 250, 161, 14, 220,
+ 160, 13, 211, 64, 15, 41, 250, 220, 63, 152,
+ 3, 16, 192, 0, 62, 48, 81, 221, 194, 3,
+ 97, 165, 15, 220, 224, 221, 148, 50, 122, 219,
+ 160, 14, 189, 176, 13, 221, 85, 11, 202, 112,
+ 156, 232, 0, 58, 140, 201, 82, 156, 112, 9,
+ 118, 241, 7, 107, 96, 6, 97, 152, 7, 122,
+ 38, 214, 88, 155, 4, 70, 176, 4, 113, 16,
+ 116, 110, 144, 7, 142, 240, 6, 124, 96, 18,
+ 230, 1, 19, 35, 160, 19, 14, 128, 135, 232,
+ 4, 75, 244, 180, 206, 145, 162, 224, 243, 68,
+ 0, 250, 96, 79, 138, 24, 15, 253, 112, 79,
+ 137, 248, 12, 238, 240, 12, 202, 160, 13, 215,
+ 240, 10, 244, 16, 137, 24, 114, 33, 57, 176,
+ 0, 137, 169, 0, 161, 192, 167, 252, 32, 92,
+ 113, 110, 38, 0, 64, 32, 184, 145, 13, 189,
+ 225, 11, 172, 240, 102, 206, 96, 82, 232, 208,
+ 153, 42, 117, 11, 198, 192, 133, 138, 160, 7,
+ 96, 0, 7, 132, 255, 16, 8, 87, 16, 204,
+ 93, 192, 6, 112, 49, 73, 135, 115, 99, 129,
+ 224, 113, 136, 99, 8, 196, 104, 140, 9, 145,
+ 37, 224, 176, 15, 251, 16, 0, 1, 160, 15,
+ 245, 176, 14, 236, 224, 14, 54, 48, 39, 133,
+ 24, 136, 231, 160, 14, 212, 216, 14, 220, 80,
+ 39, 223, 192, 211, 60, 125, 0, 112, 114, 15,
+ 235, 208, 11, 201, 208, 12, 204, 48, 13, 79,
+ 9, 40, 59, 73, 40, 163, 240, 0, 248, 50,
+ 13, 184, 32, 33, 142, 162, 130, 254, 212, 0,
+ 162, 72, 138, 171, 224, 102, 201, 80, 12, 174,
+ 106, 230, 154, 192, 138, 166, 2, 11, 255, 216,
+ 7, 253, 237, 5, 251, 149, 29, 123, 22, 114,
+ 253, 29, 71, 215, 211, 6, 212, 100, 71, 118,
+ 113, 5, 225, 138, 37, 58, 241, 90, 93, 98,
+ 14, 242, 224, 0, 1, 32, 141, 141, 82, 128,
+ 136, 52, 141, 108, 34, 146, 237, 240, 13, 235,
+ 242, 11, 14, 69, 157, 140, 242, 12, 231, 128,
+ 12, 201, 160, 10, 230, 16, 81, 134, 21, 40,
+ 147, 152, 14, 33, 6, 10, 184, 240, 13, 150,
+ 152, 121, 254, 225, 79, 28, 80, 38, 234, 208,
+ 207, 153, 178, 10, 199, 240, 136, 206, 158, 11,
+ 211, 160, 10, 184, 240, 54, 245, 217, 11, 189,
+ 192, 154, 253, 157, 60, 1, 156, 204, 122, 6,
+ 192, 101, 32, 114, 68, 124, 95, 131, 48, 233,
+ 86, 112, 145, 14, 81, 135, 2, 52, 91, 80,
+ 255, 197, 140, 217, 168, 157, 158, 142, 85, 245,
+ 62, 239, 209, 114, 45, 213, 194, 15, 98, 53,
+ 152, 12, 208, 15, 166, 128, 13, 99, 206, 140,
+ 216, 176, 86, 243, 178, 225, 133, 146, 11, 153,
+ 80, 10, 165, 144, 137, 191, 48, 41, 40, 104,
+ 3, 146, 98, 0, 12, 64, 0, 173, 151, 13,
+ 154, 34, 12, 224, 249, 10, 245, 146, 9, 163,
+ 176, 241, 189, 32, 13, 176, 96, 10, 116, 32,
+ 144, 152, 48, 7, 124, 220, 8, 67, 196, 120,
+ 120, 230, 6, 70, 80, 5, 105, 240, 89, 140,
+ 208, 199, 128, 96, 8, 201, 68, 63, 116, 152,
+ 16, 56, 209, 1, 14, 48, 91, 233, 110, 14,
+ 90, 85, 85, 209, 89, 45, 109, 194, 52, 61,
+ 143, 46, 14, 208, 47, 20, 101, 202, 246, 128,
+ 0, 8, 160, 0, 191, 208, 13, 237, 88, 225,
+ 193, 164, 147, 147, 184, 244, 197, 128, 11, 47,
+ 26, 148, 192, 205, 1, 26, 96, 51, 38, 192,
+ 1, 238, 48, 138, 173, 144, 55, 161, 16, 137,
+ 135, 21, 42, 195, 176, 12, 243, 233, 9, 253,
+ 144, 5, 224, 165, 49, 129, 64, 89, 193, 168,
+ 155, 41, 163, 155, 136, 19, 140, 143, 224, 8,
+ 122, 32, 90, 66, 192, 173, 48, 145, 2, 25,
+ 209, 1, 246, 208, 151, 206, 80, 13, 207, 18,
+ 45, 242, 0, 15, 242, 224, 233, 242, 176, 15,
+ 210, 226, 37, 218, 34, 3, 97, 181, 1, 219,
+ 56, 152, 59, 113, 15, 255, 255, 201, 15, 121,
+ 216, 46, 239, 194, 225, 146, 8, 132, 161, 160,
+ 9, 197, 176, 33, 47, 210, 3, 69, 217, 3,
+ 30, 112, 3, 31, 160, 3, 28, 224, 9, 7,
+ 243, 11, 162, 240, 148, 12, 3, 1, 136, 133,
+ 13, 234, 48, 49, 203, 0, 16, 167, 174, 24,
+ 122, 20, 167, 140, 25, 51, 82, 180, 228, 249,
+ 51, 73, 16, 33, 66, 139, 238, 220, 241, 131,
+ 72, 210, 34, 69, 113, 176, 188, 112, 1, 3,
+ 69, 1, 144, 33, 69, 134, 16, 1, 2, 196,
+ 5, 122, 240, 162, 149, 171, 166, 140, 22, 173,
+ 106, 230, 180, 105, 195, 5, 206, 38, 184, 105,
+ 244, 36, 200, 152, 49, 67, 133, 143, 7, 12,
+ 248, 41, 80, 208, 66, 197, 15, 125, 10, 30,
+ 252, 234, 246, 75, 6, 79, 8, 16, 70, 165,
+ 27, 5, 33, 29, 58, 106, 89, 237, 153, 234,
+ 103, 128, 43, 132, 92, 185, 94, 137, 18, 245,
+ 42, 199, 43, 94, 198, 54, 137, 17, 5, 65,
+ 6, 14, 184, 244, 66, 1, 177, 119, 239, 25,
+ 47, 82, 151, 2, 41, 234, 99, 6, 208, 27,
+ 64, 128, 204, 232, 41, 148, 199, 144, 33, 76,
+ 98, 4, 49, 98, 244, 231, 15, 31, 44, 49,
+ 56, 162, 248, 40, 210, 114, 1, 146, 37, 76,
+ 34, 184, 70, 14, 92, 180, 104, 206, 170, 85,
+ 227, 86, 206, 28, 54, 112, 229, 202, 129, 131,
+ 71, 79, 167, 0, 7, 10, 134, 18, 13, 170,
+ 162, 133, 255, 133, 26, 250, 190, 181, 179, 199,
+ 83, 2, 13, 169, 162, 138, 161, 83, 5, 45,
+ 43, 180, 98, 14, 226, 245, 211, 247, 75, 159,
+ 61, 171, 163, 94, 77, 211, 183, 141, 21, 172,
+ 86, 152, 240, 136, 2, 238, 91, 128, 130, 80,
+ 252, 134, 145, 34, 133, 105, 18, 163, 70, 122,
+ 242, 228, 41, 212, 200, 81, 35, 70, 128, 212,
+ 252, 9, 164, 87, 207, 29, 52, 127, 34, 79,
+ 174, 124, 217, 114, 136, 20, 70, 40, 161, 132,
+ 11, 138, 185, 230, 64, 112, 200, 33, 231, 154,
+ 104, 22, 76, 173, 65, 116, 22, 88, 32, 29,
+ 123, 230, 249, 133, 31, 126, 24, 8, 74, 129,
+ 25, 100, 216, 128, 1, 125, 184, 153, 39, 29,
+ 28, 128, 136, 110, 20, 81, 208, 41, 230, 21,
+ 106, 128, 113, 17, 152, 102, 126, 233, 231, 23,
+ 109, 146, 233, 101, 25, 110, 166, 81, 165, 154,
+ 101, 140, 97, 165, 60, 76, 2, 193, 131, 14,
+ 8, 42, 128, 205, 30, 123, 176, 249, 229, 151,
+ 94, 202, 35, 228, 14, 51, 222, 152, 195, 141,
+ 71, 26, 129, 164, 145, 66, 222, 176, 34, 14,
+ 55, 12, 9, 4, 144, 59, 180, 24, 199, 31,
+ 254, 252, 51, 19, 133, 21, 76, 16, 176, 132,
+ 13, 138, 97, 230, 192, 206, 82, 43, 39, 26,
+ 104, 160, 185, 38, 194, 5, 16, 144, 103, 31,
+ 115, 230, 153, 39, 67, 6, 20, 224, 65, 6,
+ 5, 146, 44, 71, 158, 81, 74, 132, 255, 224,
+ 149, 87, 138, 41, 38, 157, 105, 224, 161, 134,
+ 24, 89, 100, 137, 229, 210, 96, 154, 81, 165,
+ 20, 91, 122, 233, 165, 27, 79, 151, 225, 165,
+ 151, 77, 54, 185, 196, 13, 53, 178, 8, 165,
+ 152, 80, 70, 9, 197, 30, 81, 94, 45, 133,
+ 150, 77, 222, 72, 227, 15, 64, 16, 41, 4,
+ 146, 66, 38, 161, 228, 145, 52, 252, 184, 146,
+ 145, 60, 248, 24, 83, 50, 143, 250, 51, 211,
+ 63, 20, 62, 80, 115, 132, 17, 64, 160, 7,
+ 29, 102, 222, 164, 19, 26, 5, 175, 121, 101,
+ 129, 10, 16, 72, 82, 38, 63, 255, 180, 167,
+ 2, 28, 70, 153, 230, 154, 100, 80, 17, 5,
+ 135, 10, 114, 72, 167, 24, 215, 28, 197, 230,
+ 154, 96, 102, 209, 101, 150, 89, 42, 149, 5,
+ 95, 87, 92, 161, 229, 22, 128, 97, 129, 133,
+ 20, 83, 13, 81, 163, 11, 49, 50, 25, 101,
+ 97, 233, 194, 178, 196, 146, 82, 62, 193, 164,
+ 143, 51, 250, 8, 228, 143, 66, 22, 209, 24,
+ 145, 73, 38, 89, 68, 144, 57, 98, 240, 71,
+ 50, 22, 40, 91, 246, 228, 144, 154, 21, 193,
+ 3, 104, 61, 176, 96, 148, 106, 235, 132, 134,
+ 153, 8, 139, 180, 71, 30, 108, 100, 154, 137,
+ 27, 115, 204, 1, 103, 148, 92, 222, 97, 176,
+ 25, 112, 210, 161, 39, 157, 116, 66, 17, 69,
+ 149, 80, 176, 193, 5, 23, 100, 118, 169, 165,
+ 150, 84, 170, 174, 255, 186, 150, 85, 86, 97,
+ 133, 149, 85, 106, 185, 165, 19, 83, 231, 48,
+ 36, 141, 52, 196, 136, 228, 236, 72, 70, 121,
+ 248, 225, 92, 52, 249, 228, 19, 67, 230, 184,
+ 34, 9, 40, 218, 184, 99, 17, 136, 238, 48,
+ 164, 142, 145, 145, 53, 25, 101, 192, 65, 66,
+ 1, 64, 19, 60, 48, 220, 131, 22, 232, 169,
+ 150, 230, 5, 220, 170, 96, 26, 112, 156, 113,
+ 70, 27, 153, 170, 65, 38, 152, 114, 138, 161,
+ 230, 154, 81, 174, 41, 7, 23, 10, 229, 145,
+ 171, 20, 92, 156, 225, 166, 20, 109, 110, 169,
+ 101, 151, 172, 91, 159, 218, 107, 88, 190, 238,
+ 4, 19, 74, 2, 9, 36, 141, 245, 242, 128,
+ 227, 236, 221, 31, 54, 219, 146, 63, 212, 16,
+ 131, 9, 60, 224, 128, 195, 11, 65, 38, 185,
+ 3, 143, 33, 98, 144, 236, 133, 146, 255, 14,
+ 124, 122, 193, 1, 20, 193, 4, 236, 77, 200,
+ 64, 1, 205, 115, 129, 64, 2, 4, 166, 145,
+ 71, 103, 203, 145, 57, 230, 24, 87, 130, 137,
+ 230, 209, 98, 74, 49, 71, 20, 20, 53, 153,
+ 6, 27, 110, 90, 89, 230, 156, 94, 98, 191,
+ 197, 26, 99, 72, 225, 69, 25, 82, 136, 195,
+ 19, 156, 240, 196, 28, 212, 112, 7, 66, 180,
+ 193, 15, 234, 201, 131, 31, 10, 193, 7, 59,
+ 192, 193, 14, 118, 160, 195, 217, 4, 129, 183,
+ 50, 116, 161, 12, 248, 249, 2, 21, 156, 247,
+ 255, 2, 142, 36, 75, 89, 212, 35, 97, 245,
+ 86, 144, 130, 235, 101, 207, 4, 37, 80, 193,
+ 12, 232, 49, 13, 92, 168, 166, 70, 193, 56,
+ 134, 189, 116, 161, 11, 87, 52, 163, 38, 224,
+ 192, 134, 210, 80, 100, 52, 92, 104, 3, 25,
+ 203, 216, 134, 167, 180, 17, 141, 106, 21, 195,
+ 20, 167, 128, 5, 43, 124, 17, 6, 60, 104,
+ 1, 12, 106, 64, 67, 33, 172, 248, 136, 65,
+ 252, 161, 13, 118, 104, 3, 28, 240, 224, 24,
+ 47, 108, 209, 14, 87, 24, 2, 8, 65, 216,
+ 145, 19, 80, 102, 132, 37, 100, 163, 72, 6,
+ 119, 194, 20, 154, 64, 4, 115, 92, 33, 3,
+ 176, 225, 140, 100, 152, 79, 23, 187, 216, 133,
+ 213, 110, 152, 62, 97, 36, 35, 25, 194, 24,
+ 90, 75, 104, 129, 175, 89, 184, 2, 28, 161,
+ 248, 133, 47, 124, 193, 138, 75, 240, 97, 14,
+ 95, 248, 2, 26, 208, 224, 5, 4, 34, 34,
+ 15, 140, 128, 196, 36, 16, 241, 135, 57, 204,
+ 1, 11, 68, 112, 129, 25, 93, 224, 2, 22,
+ 164, 81, 141, 109, 100, 101, 224, 40, 19, 130,
+ 21, 124, 0, 133, 115, 164, 101, 45, 15, 80,
+ 15, 252, 29, 50, 95, 250, 146, 197, 49, 164,
+ 113, 195, 170, 173, 2, 59, 195, 88, 135, 19,
+ 183, 198, 9, 78, 24, 226, 15, 183, 242, 131,
+ 32, 208, 128, 8, 63, 252, 225, 10, 88, 16,
+ 2, 11, 78, 121, 77, 22, 79, 176, 0, 6,
+ 170, 84, 227, 26, 91, 249, 77, 192, 169, 49,
+ 4, 176, 148, 229, 44, 231, 152, 2, 116, 166,
+ 51, 5, 31, 88, 193, 10, 198, 25, 130, 110,
+ 198, 83, 158, 40, 56, 1, 12, 236, 121, 79,
+ 124, 158, 128, 155, 241, 4, 103, 63, 253, 153,
+ 50, 113, 190, 51, 150, 229, 68, 39, 59, 219,
+ 121, 80, 132, 38, 244, 160, 239, 100, 232, 56,
+ 249, 249, 207, 233, 5, 4, 0, 59 );
+
+implementation
+
+end.
+
diff --git a/Source/packages/php4delphi Delphi 10 Seattle.groupproj b/Source/packages/php4delphi Delphi 10 Seattle.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10 Seattle.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 10 Seattle_prjgroup.tvsconfig b/Source/packages/php4delphi Delphi 10 Seattle_prjgroup.tvsconfig
new file mode 100644
index 0000000..d430780
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10 Seattle_prjgroup.tvsconfig
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj b/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj b/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 10.3 Rio.groupproj b/Source/packages/php4delphi Delphi 10.3 Rio.groupproj
new file mode 100644
index 0000000..ba7a357
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.3 Rio.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 10.tvsconfig b/Source/packages/php4delphi Delphi 10.tvsconfig
new file mode 100644
index 0000000..d430780
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.tvsconfig
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Source/packages/php4delphi Delphi 2010.groupproj b/Source/packages/php4delphi Delphi 2010.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 2010.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 2011.groupproj b/Source/packages/php4delphi Delphi 2011.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 2011.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 5.bpg b/Source/packages/php4delphi Delphi 5.bpg
new file mode 100644
index 0000000..aa42dc7
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 5.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR5.bpl php4DelphiD5.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR5.bpl: ..\php4DelphiR5.dpk
+ $(DCC)
+
+php4DelphiD5.bpl: ..\php4DelphiD5.dpk
+ $(DCC)
+
+
diff --git a/Source/packages/php4delphi Delphi 7.bpg b/Source/packages/php4delphi Delphi 7.bpg
new file mode 100644
index 0000000..dce47b4
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 7.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR7.bpl php4DelphiD7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR7.bpl: ..\php4DelphiR7.dpk
+ $(DCC)
+
+php4DelphiD7.bpl: ..\php4DelphiD7.dpk
+ $(DCC)
+
+
diff --git a/Source/packages/php4delphi Delphi XE1.groupproj b/Source/packages/php4delphi Delphi XE1.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE1.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE2.groupproj b/Source/packages/php4delphi Delphi XE2.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE2.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE3.groupproj b/Source/packages/php4delphi Delphi XE3.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE3.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE4.groupproj b/Source/packages/php4delphi Delphi XE4.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE4.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE5.groupproj b/Source/packages/php4delphi Delphi XE5.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE5.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE6.groupproj b/Source/packages/php4delphi Delphi XE6.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE6.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE7.groupproj b/Source/packages/php4delphi Delphi XE7.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE7.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE8.groupproj b/Source/packages/php4delphi Delphi XE8.groupproj
new file mode 100644
index 0000000..b7db0c5
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE8.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi XE8_prjgroup.tvsconfig b/Source/packages/php4delphi Delphi XE8_prjgroup.tvsconfig
new file mode 100644
index 0000000..d430780
--- /dev/null
+++ b/Source/packages/php4delphi Delphi XE8_prjgroup.tvsconfig
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/php4App.dpr b/Source/php4App.dpr
similarity index 75%
rename from php4App.dpr
rename to Source/php4App.dpr
index 09067ec..da9e9aa 100644
--- a/php4App.dpr
+++ b/Source/php4App.dpr
@@ -1,43 +1,43 @@
- {*******************************************************}
-{ PHP4Applications }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{ $Id: php4App.dpr,v 6.2 02/2006 delphi32 Exp $ }
-
-{$I PHP.INC}
-
-library php4App;
-uses
- Windows,
- Classes,
- SysUtils,
- ZendTypes,
- PHPTypes,
- ZendAPI,
- PHPAPI,
- php4AppUnit;
-
-{$R *.RES}
-
-
-
-exports
- InitRequest,
- DoneRequest,
- ExecutePHP,
- ExecuteCode,
- RegisterVariable,
- GetResultText,
- GetVariable,
- SaveToFile,
- GetVariableSize,
- GetResultBufferSize;
-
-begin
- InitEngine;
-end.
+{*******************************************************}
+{ PHP4Applications }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+
+{ $Id: php4App.dpr,v 7.4 10/2009 delphi32 Exp $ }
+
+{$I PHP.INC}
+
+library php4App;
+uses
+ Windows,
+ SysUtils,
+ ZendTypes,
+ PHPTypes,
+ ZendAPI,
+ PHPAPI,
+ php4AppUnit;
+
+{$R *.RES}
+
+
+
+exports
+ InitRequest,
+ DoneRequest,
+ ExecutePHP,
+ ExecuteCode,
+ RegisterVariable,
+ GetResultText,
+ GetVariable,
+ SaveToFile,
+ GetVariableSize,
+ GetResultBufferSize;
+
+begin
+ InitEngine;
+end.
diff --git a/Source/php4App.dproj b/Source/php4App.dproj
new file mode 100644
index 0000000..54afd88
--- /dev/null
+++ b/Source/php4App.dproj
@@ -0,0 +1,106 @@
+
+
+ {DB6E6909-645D-4E14-8034-4ABFA8EB52AC}
+ php4App.dpr
+ True
+ Debug
+ 1
+ Library
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ false
+ 00400000
+ php4App
+ 1058
+ false
+ System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ false
+ true
+ false
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+
+
+ true
+ php4App_Icon.ico
+ 1033
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ php4App_Icon.ico
+
+
+ RELEASE;$(DCC_Define)
+ false
+ 0
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+
+
+
+ MainSource
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ php4App.dpr
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4App.res b/Source/php4App.res
new file mode 100644
index 0000000..1602187
Binary files /dev/null and b/Source/php4App.res differ
diff --git a/Source/php4AppIntf.pas b/Source/php4AppIntf.pas
new file mode 100644
index 0000000..ea6d31f
Binary files /dev/null and b/Source/php4AppIntf.pas differ
diff --git a/php4AppUnit.pas b/Source/php4AppUnit.pas
similarity index 64%
rename from php4AppUnit.pas
rename to Source/php4AppUnit.pas
index dac6276..5e6feee 100644
--- a/php4AppUnit.pas
+++ b/Source/php4AppUnit.pas
@@ -1,558 +1,719 @@
-{*******************************************************}
-{ PHP4Applications }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-{$I PHP.INC}
-
-{ $Id: php4AppUnit.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit php4AppUnit;
-
-interface
-uses
- Windows,
- SysUtils,
- Classes,
- ZendTypes,
- phpTypes,
- PHPAPI,
- ZENDAPI;
-
-const
- REQUEST_ID_NOT_FOUND = -1;
- VARIABLE_NOT_FOUND = -2;
- ERROR_CREATE_PIPE = -3;
- SCRIPT_IS_EMPTY = -4;
-
-type
-
- TPHPInfoBlock = class
- private
- FBuffer : string;
- FVarList : TStringList;
- procedure SetVarList(AValue : TStringList);
- public
- constructor Create; virtual;
- destructor Destroy; override;
- property Buffer : string read FBuffer write FBuffer;
- property VarList : TStringList read FVarList write SetVarList;
- end;
-
-function InitRequest : integer; stdcall;
-procedure DoneRequest(RequestID : integer); stdcall;
-
-procedure RegisterVariable(RequestID : integer; AName : PChar; AValue : PChar); stdcall;
-function ExecutePHP(RequestID : integer; FileName : PChar) : integer; stdcall;
-function ExecuteCode(RequestID : integer; ACode : PChar) : integer; stdcall;
-function GetResultText(RequestID : integer; Buffer : PChar; BufLen : integer) : integer; stdcall;
-function GetVariable(RequestID : integer; AName : PChar; Buffer : PChar; BufLen : integer) : integer; stdcall;
-procedure SaveToFile(RequestID : integer; AFileName : PChar); stdcall;
-function GetVariableSize(RequestID : integer; AName : PChar) : integer; stdcall;
-function GetResultBufferSize(RequestID : integer) : integer; stdcall;
-
-procedure PrepareStartup;
-
-procedure InitEngine;
-
-procedure StopEngine;
-
-implementation
-
-var
- delphi_sapi_module : sapi_module_struct;
- php_delphi_module : Tzend_module_entry;
-
-procedure php_info_delphi(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('SAPI module version'), PChar('PHP4Delphi 6.2 Feb 2006'));
- php_info_print_table_row(2, PChar('Home page'), PChar('http://users.chello.be/ws36637'));
- php_info_print_table_end();
-end;
-
-function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
-begin
- result := php_module_startup(sapi_module, nil, 0);
-end;
-
-function php_delphi_deactivate(p : pointer) : integer; cdecl;
-begin
- result := 0;
-end;
-
-
-function php_delphi_ub_write(str : pchar; len : uint; p : pointer) : integer; cdecl;
-var
- s : string;
- php : TPHPInfoBlock;
- gl : psapi_globals_struct;
-begin
- Result := 0;
- gl := GetSAPIGlobals(p);
- if Assigned(gl) then
- begin
- php := TPHPInfoBlock(gl^.server_context);
- if Assigned(php) then
- begin
- SetLength(s, len);
- s := Copy(str,1,len);
- try
- php.FBuffer := php.FBuffer + s;
- except
- s := '';
- end;
- result := len;
- end;
- end;
- s := '';
-end;
-
-procedure php_delphi_flush(p : pointer); cdecl;
-begin
-end;
-
-procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
-var
- cnt : integer;
- InfoBlock : TPHPInfoBlock;
- gl : psapi_globals_struct;
- ts : pointer;
-begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
- InfoBlock := TPHPInfoBlock(gl^.server_context);
- php_register_variable('SERVER_NAME','DELPHI', val, p);
- php_register_variable('SERVER_SOFTWARE', 'Delphi', val, p);
- if Assigned(InfoBlock) then
- try
- for cnt := 0 to InfoBlock.VarList.Count - 1 do
- begin
- php_register_variable(PChar(InfoBlock.VarList.Names[cnt]),
- PChar(InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]]), val, p);
- end;
- except
- end;
-end;
-
-
-procedure php_delphi_send_header(p1, p2, p3 : pointer); cdecl;
-begin
- //
-end;
-
-function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
-begin
- result := nil;
-end;
-
-
-procedure PrepareStartup;
-begin
- delphi_sapi_module.name := 'embed'; (* name *)
- delphi_sapi_module.pretty_name := 'PHP for Delphi'; (* pretty name *)
- delphi_sapi_module.startup := php_delphi_startup; (* startup *)
- delphi_sapi_module.shutdown := php_module_shutdown_wrapper; (* shutdown *)
- delphi_sapi_module.activate:= nil; (* activate *)
- delphi_sapi_module.deactivate := @php_delphi_deactivate; (* deactivate *)
- delphi_sapi_module.ub_write := @php_delphi_ub_write; (* unbuffered write *)
- delphi_sapi_module.flush := @php_delphi_flush;
- delphi_sapi_module.stat:= nil;
- delphi_sapi_module.getenv:= nil;
- delphi_sapi_module.sapi_error := @zend_error; (* error handler *)
- delphi_sapi_module.header_handler := nil;
- delphi_sapi_module.send_headers := nil;
- delphi_sapi_module.send_header := @php_delphi_send_header;
- delphi_sapi_module.read_post := nil;
- delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
- delphi_sapi_module.register_server_variables := @php_delphi_register_variables; (* register server variables *)
- delphi_sapi_module.log_message := nil; (* Log message *)
- delphi_sapi_module.php_ini_path_override := nil;
- delphi_sapi_module.block_interruptions := nil;
- delphi_sapi_module.unblock_interruptions := nil;
- delphi_sapi_module.default_post_reader := nil;
- delphi_sapi_module.treat_data := nil;
- delphi_sapi_module.executable_location := nil;
- delphi_sapi_module.php_ini_ignore := 0;
-
- php_delphi_module.size := sizeOf(Tzend_module_entry);
- php_delphi_module.zend_api := ZEND_MODULE_API_NO;
- php_delphi_module.zend_debug := 0;
- php_delphi_module.zts := USING_ZTS;
- php_delphi_module.name := 'php4delphi_support';
- php_delphi_module.functions := nil;
- php_delphi_module.module_startup_func := nil;
- php_delphi_module.module_shutdown_func := nil;
- php_delphi_module.info_func := @php_info_delphi;
- php_delphi_module.version := '6.2';
- {$IFDEF PHP4}
- php_delphi_module.global_startup_func := nil;
- {$ENDIF}
- php_delphi_module.request_shutdown_func := nil;
- php_delphi_module.global_id := 0;
- php_delphi_module.module_started := 0;
- php_delphi_module._type := 0;
- php_delphi_module.handle := nil;
- php_delphi_module.module_number := 0;
-end;
-
-
-
-procedure PrepareResult(RequestID : integer; TSRMLS_D : pointer);
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
- InfoBlock : TPHPInfoBlock;
-begin
- InfoBlock := TPHPInfoBlock(RequestID);
- ht := GetSymbolsTable(TSRMLS_D);
- if Assigned(ht) then
- begin
- for cnt := 0 to InfoBlock.VarList.Count - 1 do
- begin
- new(data);
- try
- if zend_hash_find(ht, PChar(InfoBlock.VarList.Names[cnt]),
- strlen(PChar(InfoBlock.VarList.Names[cnt])) + 1, data) = SUCCESS then
- case data^^^._type of
- IS_STRING : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := data^^^.value.str.val;
- IS_LONG,
- IS_RESOURCE,
- IS_BOOL : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := IntToStr(data^^^.value.lval);
- IS_DOUBLE : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := FloatToStr(data^^^.value.dval);
- end;
- finally
- freemem(data);
- end;
- end;
- end;
-end;
-
-function ExecutePHP(RequestID : integer; FileName : PChar) : integer; stdcall;
-var
- file_handle : zend_file_handle;
- TSRMLS_D : pointer;
- gl : psapi_globals_struct;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- try
- TSRMLS_D := ts_resource_ex(0, nil);
- file_handle._type := ZEND_HANDLE_FILENAME;
- file_handle.filename := FileName;
- file_handle.opened_path := nil;
- file_handle.free_filename := 0;
- file_handle.opened_path := nil;
-
- PG(TSRMLS_D)^.register_globals := true;
- gl := GetSAPIGlobals(TSRMLS_D);
- TPHPInfoBlock(RequestID).FBuffer := '';
- gl^.server_context := pointer(RequestID);
- gl^.sapi_headers.http_response_code := 200;
- gl^.request_info.request_method := 'GET';
-
- php_request_startup(TSRMLS_D);
- result := php_execute_script(@file_handle, TSRMLS_D);
- zend_destroy_file_handle(@file_handle, TSRMLS_D);
- PrepareResult(RequestID, TSRMLS_D);
- php_request_shutdown(nil);
- except
- result := FAILURE;
- end;
-end;
-
-
-function ExecuteCode(RequestID : integer; ACode : PChar) : integer; stdcall;
-var
- file_handle : zend_file_handle;
- TSRMLS_D : pointer;
- _handles : array[0..1] of THandle;
- _code : string;
- gl : psapi_globals_struct;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- if ACode = nil then
- begin
- Result := SCRIPT_IS_EMPTY;
- Exit;
- end;
-
- if pipe(@_handles, Length(ACode) + 512, 0) = -1 then
- begin
- Result := ERROR_CREATE_PIPE;
- Exit;
- end;
-
- _code := ACode;
- if Pos('', _Code) = 0 then
- _Code := ' ' + _Code;
- if Pos('?>', _Code) = 0 then
- _Code := _Code + ' ?>';
-
- _write(_handles[1], @_Code[1], Length(_Code));
- close(_handles[1]);
-
-
- TSRMLS_D := ts_resource_ex(0, nil);
- file_handle._type := ZEND_HANDLE_FD;
-
- PG(TSRMLS_D)^.register_globals := true;
- gl := GetSAPIGlobals(TSRMLS_D);
- TPHPInfoBlock(RequestID).FBuffer := '';
- gl^.server_context := pointer(RequestID);
- gl^.sapi_headers.http_response_code := 200;
- gl^.request_info.request_method := 'GET';
-
- file_handle.filename := '-';
- file_handle.opened_path := nil;
- file_handle.free_filename := 0;
- file_handle.handle.fd := _handles[0];
- php_request_startup(TSRMLS_D);
-
- result := php_execute_script(@file_handle, TSRMLS_D);
- close(_handles[0]);
- PrepareResult(RequestID, TSRMLS_D);
- php_request_shutdown(nil);
-end;
-
-
-procedure RegisterVariable(RequestID : integer; AName : PChar; AValue : PChar); stdcall;
-begin
- try
- TPHPInfoBlock(RequestID).VarList.Add(AName + '=' + AValue);
- except
- end;
-end;
-
-
-function GetResultText(RequestID : integer; Buffer : PChar; BufLen : integer) : integer; stdcall;
-var
- L : integer;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- try
- L := Length(TPHPInfoBlock(RequestID).FBuffer)+1;
- if L > BufLen then
- begin
- Result := L;
- Exit;
- end;
-
- StrLCopy(Buffer, PChar(TPHPInfoBlock(RequestID).FBuffer), BufLen -1);
- Result := 0;
- except
- Result := REQUEST_ID_NOT_FOUND;
- end;
-end;
-
-function GetResultBufferSize(RequestID : integer) : integer;
-var
- L : integer;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- try
- L := Length(TPHPInfoBlock(RequestID).FBuffer)+1;
- Result := L;
- except
- Result := REQUEST_ID_NOT_FOUND;
- end;
-end;
-
-procedure SaveToFile(RequestID : integer; AFileName : PChar);
-var
- L : integer;
- FS : TFileStream;
-begin
- if RequestID <= 0 then
- begin
- Exit;
- end;
-
- try
- FS := TFileStream.Create(AFileName, fmCreate);
- try
- L := Length(TPHPInfoBlock(RequestID).FBuffer);
- FS.WriteBuffer(TPHPInfoBlock(RequestID).FBuffer[1], L);
- finally
- FS.Free;
- end;
- except
- end;
-end;
-
-function GetVariable(RequestID : integer; AName : PChar; Buffer : PChar; BufLen : integer) : integer; stdcall;
-var
- L : integer;
- St : string;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- try
- St := TPHPInfoBlock(RequestID).VarList.Values[AName];
- if St = '' then
- begin
- Result := VARIABLE_NOT_FOUND;
- Exit;
- end;
- L := Length(St) +1 ;
- if L > BufLen then
- begin
- Result := L;
- Exit;
- end;
-
- StrLCopy(Buffer, PChar(St), BufLen -1);
- Result := 0;
- except
- Result := REQUEST_ID_NOT_FOUND;
- end;
-end;
-
-function GetVariableSize(RequestID : integer; AName : PChar) : integer;
-var
- L : integer;
- St : string;
-begin
- if RequestID <= 0 then
- begin
- Result := REQUEST_ID_NOT_FOUND;
- Exit;
- end;
-
- try
- St := TPHPInfoBlock(RequestID).VarList.Values[AName];
- if St = '' then
- begin
- Result := VARIABLE_NOT_FOUND;
- Exit;
- end;
- L := Length(St) +1 ;
- Result := L;
- except
- Result := REQUEST_ID_NOT_FOUND;
- end;
-end;
-
-{ TPHPInfoBlock }
-
-constructor TPHPInfoBlock.Create;
-begin
- inherited Create;
- FBuffer := '';
- FVarList := TStringList.Create;
-end;
-
-destructor TPHPInfoBlock.Destroy;
-begin
- FBuffer := '';
- FVarList.Free;
- inherited;
-end;
-
-procedure TPHPInfoBlock.SetVarList(AValue: TStringList);
-begin
- FVarList.Assign(AValue);
-end;
-
-
-function InitRequest : integer;
-var
- InfoBlock : TPHPInfoBlock;
-begin
- InfoBlock := TPHPInfoBlock.Create;
- Result := integer(InfoBlock);
-end;
-
-procedure DoneRequest(RequestID : integer);
-begin
- if RequestID <= 0 then Exit;
-
- try
- TPHPInfoBlock(RequestID).Free;
- TPHPInfoBlock(RequestID) := nil;
- except
- end;
-end;
-
-
-procedure DLLExitProc(Reason: Integer); register;
-begin
- case Reason of
- DLL_PROCESS_DETACH: StopEngine;
- DLL_THREAD_DETACH : ts_free_thread();
- end;
-end;
-
-procedure InitEngine;
-var
- p : pointer;
-begin
-
- if not PHPLoaded then
- LoadPHP;
-
- if PHPLoaded then
- begin
- try
- PrepareStartup;
- tsrm_startup(128, 1, TSRM_ERROR_LEVEL_CORE, 'TSRM.log');
- sapi_startup(@delphi_sapi_module);
- p := @php_delphi_module;
- php_module_startup(@delphi_sapi_module, p, 1);
- zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
- zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
- zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
- zend_alter_ini_entry('max_input_time', 15, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
- zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
- except
- end;
- end;
-
- IsMultiThread := true;
- DLLProc := @DLLExitProc;
-
-end;
-
-procedure StopEngine;
-begin
- if PHPLoaded then
- begin
- try
- delphi_sapi_module.shutdown(@delphi_sapi_module);
- sapi_shutdown;
- tsrm_shutdown();
- except
- end;
- end;
-end;
-
-
-end.
+{*******************************************************}
+{ PHP4Applications }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+
+{$I PHP.INC}
+
+{ $Id: php4AppUnit.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit php4AppUnit;
+
+interface
+uses
+ Windows,
+ SysUtils,
+ Classes,
+ ZendTypes,
+ phpTypes,
+ PHPAPI,
+ ZENDAPI;
+
+const
+ REQUEST_ID_NOT_FOUND = -1;
+ VARIABLE_NOT_FOUND = -2;
+ ERROR_CREATE_PIPE = -3;
+ SCRIPT_IS_EMPTY = -4;
+
+type
+
+ TPHPInfoBlock = class
+ private
+ FBuffer : zend_ustr;
+ FVarList : TStringList;
+ FVirtualStream : TMemoryStream;
+ procedure SetVarList(AValue : TStringList);
+ public
+ constructor Create; virtual;
+ destructor Destroy; override;
+ property Buffer : zend_ustr read FBuffer write FBuffer;
+ property VarList : TStringList read FVarList write SetVarList;
+ end;
+
+function InitRequest : integer; stdcall;
+procedure DoneRequest(RequestID : integer); stdcall;
+
+procedure RegisterVariable(RequestID : integer; AName : zend_pchar; AValue : zend_pchar); stdcall;
+function ExecutePHP(RequestID : integer; FileName : zend_pchar) : integer; stdcall;
+function ExecuteCode(RequestID : integer; ACode : zend_pchar) : integer; stdcall;
+function GetResultText(RequestID : integer; Buffer : zend_pchar; BufLen : integer) : integer; stdcall;
+function GetVariable(RequestID : integer; AName : zend_pchar; Buffer : zend_pchar; BufLen : integer) : integer; stdcall;
+procedure SaveToFile(RequestID : integer; AFileName : zend_pchar); stdcall;
+function GetVariableSize(RequestID : integer; AName : zend_pchar) : integer; stdcall;
+function GetResultBufferSize(RequestID : integer) : integer; stdcall;
+
+procedure PrepareStartup;
+
+procedure InitEngine;
+
+procedure StopEngine;
+
+implementation
+
+var
+ delphi_sapi_module : sapi_module_struct;
+ php_delphi_module : Tzend_module_entry;
+
+procedure php_info_delphi(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
+begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, zend_pchar('SAPI module version'), zend_pchar('PHP4Delphi 7.4 Oct 2009'));
+ php_info_print_table_row(2, zend_pchar('Home page'), zend_pchar('http://users.telenet.be/ws36637'));
+ php_info_print_table_end();
+end;
+
+function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
+begin
+ result := php_module_startup(sapi_module, nil, 0);
+end;
+
+function php_delphi_deactivate(p : pointer) : integer; cdecl;
+begin
+ result := 0;
+end;
+
+
+function php_delphi_ub_write(str : zend_pchar; len : uint; p : pointer) : integer; cdecl;
+var
+ s : zend_ustr;
+ php : TPHPInfoBlock;
+ gl : psapi_globals_struct;
+begin
+ Result := 0;
+ gl := GetSAPIGlobals;
+ if Assigned(gl) then
+ begin
+ php := TPHPInfoBlock(gl^.server_context);
+ if Assigned(php) then
+ begin
+ SetLength(s, len);
+ Move(str^, s[1], len);
+ try
+ php.FBuffer := php.FBuffer + s;
+ except
+ s := '';
+ end;
+ result := len;
+ end;
+ end;
+ s := '';
+end;
+
+procedure php_delphi_flush(p : pointer); cdecl;
+begin
+end;
+
+procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
+var
+ cnt : integer;
+ InfoBlock : TPHPInfoBlock;
+ gl : psapi_globals_struct;
+begin
+ gl := GetSAPIGlobals;
+ InfoBlock := TPHPInfoBlock(gl^.server_context);
+ php_register_variable('SERVER_NAME','DELPHI', val, p);
+ php_register_variable('SERVER_SOFTWARE', 'Delphi', val, p);
+ if Assigned(InfoBlock) then
+ try
+ for cnt := 0 to InfoBlock.VarList.Count - 1 do
+ begin
+ php_register_variable(zend_pchar(InfoBlock.VarList.Names[cnt]),
+ zend_pchar(InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]]), val, p);
+ end;
+ except
+ end;
+end;
+
+
+procedure php_delphi_send_header(p1, p2, p3 : pointer); cdecl;
+begin
+ //
+end;
+
+function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
+begin
+ result := nil;
+end;
+
+
+procedure PrepareStartup;
+begin
+ delphi_sapi_module.name := 'embed'; (* name *)
+ delphi_sapi_module.pretty_name := 'PHP for Delphi'; (* pretty name *)
+ delphi_sapi_module.startup := php_delphi_startup; (* startup *)
+ delphi_sapi_module.shutdown := php_module_shutdown_wrapper; (* shutdown *)
+ delphi_sapi_module.activate:= nil; (* activate *)
+ delphi_sapi_module.deactivate := @php_delphi_deactivate; (* deactivate *)
+ delphi_sapi_module.ub_write := @php_delphi_ub_write; (* unbuffered write *)
+ delphi_sapi_module.flush := @php_delphi_flush;
+ delphi_sapi_module.stat:= nil;
+ delphi_sapi_module.getenv:= nil;
+ delphi_sapi_module.sapi_error := @zend_error; (* error handler *)
+ delphi_sapi_module.header_handler := nil;
+ delphi_sapi_module.send_headers := nil;
+ delphi_sapi_module.send_header := @php_delphi_send_header;
+ delphi_sapi_module.read_post := nil;
+ delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
+ delphi_sapi_module.register_server_variables := @php_delphi_register_variables; (* register server variables *)
+ delphi_sapi_module.log_message := nil; (* Log message *)
+ delphi_sapi_module.php_ini_path_override := nil;
+ delphi_sapi_module.block_interruptions := nil;
+ delphi_sapi_module.unblock_interruptions := nil;
+ delphi_sapi_module.default_post_reader := nil;
+ delphi_sapi_module.treat_data := nil;
+ delphi_sapi_module.executable_location := nil;
+ delphi_sapi_module.php_ini_ignore := 0;
+
+ php_delphi_module.size := sizeOf(Tzend_module_entry);
+ php_delphi_module.zend_api := ZEND_MODULE_API_NO;
+ php_delphi_module.zend_debug := 0;
+ php_delphi_module.zts := USING_ZTS;
+ php_delphi_module.name := 'php4delphi_support';
+ php_delphi_module.functions := nil;
+ php_delphi_module.module_startup_func := nil;
+ php_delphi_module.module_shutdown_func := nil;
+ php_delphi_module.info_func := @php_info_delphi;
+ php_delphi_module.version := '7.4';
+ php_delphi_module.request_shutdown_func := nil;
+
+ {$IFNDEF PHP520}
+ php_delphi_module.global_id := 0;
+ {$ENDIF}
+
+ php_delphi_module.module_started := 0;
+ php_delphi_module._type := 0;
+ php_delphi_module.handle := nil;
+ php_delphi_module.module_number := 0;
+
+ {$IFDEF PHP530}
+ {$IFNDEF COMPILER_VC9}
+ php_delphi_module.build_id := strdup(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ php_delphi_module.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+ {$ENDIF}
+
+end;
+
+
+
+procedure PrepareResult(RequestID : integer; TSRMLS_D : pointer);
+var
+ ht : PHashTable;
+ data: ^ppzval;
+ cnt : integer;
+ InfoBlock : TPHPInfoBlock;
+begin
+ InfoBlock := TPHPInfoBlock(RequestID);
+ ht := GetSymbolsTable;
+
+ if Assigned(ht) then
+ begin
+ for cnt := 0 to InfoBlock.VarList.Count - 1 do
+ begin
+ new(data);
+ try
+ if zend_hash_find(ht, zend_pchar(InfoBlock.VarList.Names[cnt]),
+ strlen(zend_pchar(InfoBlock.VarList.Names[cnt])) + 1, data) = SUCCESS then
+ case data^^^._type of
+ IS_STRING : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := Z_STRVAL(data^^);
+ IS_LONG,
+ IS_RESOURCE,
+ IS_BOOL : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := IntToStr(data^^^.value.lval);
+ IS_DOUBLE : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := FloatToStr(data^^^.value.dval);
+ end;
+ finally
+ freemem(data);
+ end;
+ end;
+ end;
+end;
+
+function ExecutePHP(RequestID : integer; FileName : zend_pchar) : integer; stdcall;
+var
+ file_handle : zend_file_handle;
+ TSRMLS_D : pointer;
+ gl : psapi_globals_struct;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ try
+ TSRMLS_D := ts_resource_ex(0, nil);
+
+ ZeroMemory(@file_handle, sizeof(zend_file_handle));
+
+ file_handle._type := ZEND_HANDLE_FILENAME;
+ file_handle.filename := FileName;
+ file_handle.opened_path := nil;
+ file_handle.free_filename := 0;
+ file_handle.handle.fp := nil;
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
+ gl := GetSAPIGlobals;
+ TPHPInfoBlock(RequestID).FBuffer := '';
+ gl^.server_context := pointer(RequestID);
+ gl^.sapi_headers.http_response_code := 200;
+ gl^.request_info.request_method := 'GET';
+
+ php_request_startup(TSRMLS_D);
+ result := php_execute_script(@file_handle, TSRMLS_D);
+ zend_destroy_file_handle(@file_handle, TSRMLS_D);
+
+ PrepareResult(RequestID, TSRMLS_D);
+ php_request_shutdown(nil);
+ except
+ result := FAILURE;
+ end;
+end;
+
+{$IFDEF PHP5}
+
+{PHP 5 only}
+function delphi_stream_reader (handle : pointer; buf : zend_pchar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS = nil then
+ result := 0
+ else
+ try
+ result := MS.Read(buf^, len);
+ except
+ result := 0;
+ end;
+end;
+
+{PHP 5 only}
+procedure delphi_stream_closer(handle : pointer; TSRMLS_DC : pointer); cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ MS.Clear;
+ except
+ end;
+end;
+
+{$IFDEF PHP530}
+function delphi_stream_fsizer(handle : pointer; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ELSE}
+{$IFDEF PHP510}
+
+{ PHP 5.10 and higher }
+function delphi_stream_teller(handle : pointer; TSRMLS_DC : pointer) : longint; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ENDIF}
+{$ENDIF}
+{$ENDIF}
+
+
+{$IFDEF PHP4}
+function ExecuteCode(RequestID : integer; ACode : zend_pchar) : integer; stdcall;
+var
+ file_handle : zend_file_handle;
+ TSRMLS_D : pointer;
+ _handles : array[0..1] of THandle;
+ _code : zend_ustr;
+ gl : psapi_globals_struct;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ if ACode = nil then
+ begin
+ Result := SCRIPT_IS_EMPTY;
+ Exit;
+ end;
+
+ if pipe(@_handles, Length(ACode) + 512, 0) = -1 then
+ begin
+ Result := ERROR_CREATE_PIPE;
+ Exit;
+ end;
+
+ _code := ACode;
+ if Pos('', _Code) = 0 then
+ _Code := ' ' + _Code;
+ if Pos('?>', _Code) = 0 then
+ _Code := _Code + ' ?>';
+
+ _write(_handles[1], @_Code[1], Length(_Code));
+ close(_handles[1]);
+
+
+ TSRMLS_D := ts_resource_ex(0, nil);
+ file_handle._type := ZEND_HANDLE_FD;
+
+ PG(TSRMLS_D)^.register_globals := true;
+ gl := GetSAPIGlobals;
+ TPHPInfoBlock(RequestID).FBuffer := '';
+ gl^.server_context := pointer(RequestID);
+ gl^.sapi_headers.http_response_code := 200;
+ gl^.request_info.request_method := 'GET';
+
+ file_handle.filename := '-';
+ file_handle.opened_path := nil;
+ file_handle.free_filename := 0;
+ file_handle.handle.fd := _handles[0];
+ php_request_startup(TSRMLS_D);
+
+ result := php_execute_script(@file_handle, TSRMLS_D);
+ close(_handles[0]);
+ PrepareResult(RequestID, TSRMLS_D);
+ php_request_shutdown(nil);
+end;
+{$ELSE}
+function ExecuteCode(RequestID : integer; ACode : zend_pchar) : integer; stdcall;
+var
+ file_handle : zend_file_handle;
+ TSRMLS_D : pointer;
+ _code : zend_ustr;
+ gl : psapi_globals_struct;
+ ZendStream : TZendStream;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ if ACode = nil then
+ begin
+ Result := SCRIPT_IS_EMPTY;
+ Exit;
+ end;
+
+ _code := ACode;
+ if Pos('', _Code) = 0 then
+ _Code := ' ' + _Code;
+ if Pos('?>', _Code) = 0 then
+ _Code := _Code + ' ?>';
+
+
+ ZeroMemory(@file_handle, sizeof(zend_file_handle));
+
+ ZeroMemory(@ZendStream, sizeof(ZendStream));
+ ZendStream.reader := delphi_stream_reader;
+ ZendStream.closer := delphi_stream_closer;
+ {$IFDEF PHP530}
+ ZendStream.fsizer := delphi_stream_fsizer;
+ {$ELSE}
+ {$IFDEF PHP510}
+ ZendStream.fteller := delphi_stream_teller;
+ {$ENDIF}
+ ZendStream.interactive := 0;
+ {$ENDIF}
+
+
+ TSRMLS_D := ts_resource_ex(0, nil);
+
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
+ gl := GetSAPIGlobals;
+ TPHPInfoBlock(RequestID).FBuffer := '';
+ gl^.server_context := pointer(RequestID);
+ gl^.sapi_headers.http_response_code := 200;
+ gl^.request_info.request_method := 'GET';
+
+ ZendStream.handle := TPHPInfoBlock(RequestID).FVirtualStream;
+
+ file_handle._type := ZEND_HANDLE_STREAM;
+ file_handle.opened_path := nil;
+ file_handle.filename := '-';
+ file_handle.free_filename := 0;
+ file_handle.handle.stream := ZendStream;
+
+ TPHPInfoBlock(RequestID).FVirtualStream.Clear;
+ TPHPInfoBlock(RequestID).FVirtualStream.Write(_code[1], Length(_code));
+ TPHPInfoBlock(RequestID).FVirtualStream.Position := 0;
+
+ php_request_startup(TSRMLS_D);
+
+ result := php_execute_script(@file_handle, TSRMLS_D);
+
+ PrepareResult(RequestID, TSRMLS_D);
+ php_request_shutdown(nil);
+end;
+{$ENDIF}
+
+
+procedure RegisterVariable(RequestID : integer; AName : zend_pchar; AValue : zend_pchar); stdcall;
+begin
+ try
+ TPHPInfoBlock(RequestID).VarList.Add(AName + '=' + AValue);
+ except
+ end;
+end;
+
+
+function GetResultText(RequestID : integer; Buffer : zend_pchar; BufLen : integer) : integer; stdcall;
+var
+ L : integer;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ try
+ L := Length(TPHPInfoBlock(RequestID).FBuffer)+1;
+ if L > BufLen then
+ begin
+ Result := L;
+ Exit;
+ end;
+
+ StrLCopy(Buffer, zend_pchar(TPHPInfoBlock(RequestID).FBuffer), BufLen -1);
+ TPHPInfoBlock(RequestID).FBuffer := '';
+ Result := 0;
+ except
+ Result := REQUEST_ID_NOT_FOUND;
+ end;
+end;
+
+function GetResultBufferSize(RequestID : integer) : integer;
+var
+ L : integer;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ try
+ L := Length(TPHPInfoBlock(RequestID).FBuffer)+1;
+ Result := L;
+ except
+ Result := REQUEST_ID_NOT_FOUND;
+ end;
+end;
+
+procedure SaveToFile(RequestID : integer; AFileName : zend_pchar);
+var
+ L : integer;
+ FS : TFileStream;
+begin
+ if RequestID <= 0 then
+ begin
+ Exit;
+ end;
+
+ try
+ FS := TFileStream.Create(AFileName, fmCreate);
+ try
+ L := Length(TPHPInfoBlock(RequestID).FBuffer);
+ FS.WriteBuffer(TPHPInfoBlock(RequestID).FBuffer[1], L);
+ finally
+ FS.Free;
+ end;
+ except
+ end;
+end;
+
+function GetVariable(RequestID : integer; AName : zend_pchar; Buffer : zend_pchar; BufLen : integer) : integer; stdcall;
+var
+ L : integer;
+ St : zend_ustr;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ try
+ St := TPHPInfoBlock(RequestID).VarList.Values[AName];
+ if St = '' then
+ begin
+ Result := VARIABLE_NOT_FOUND;
+ Exit;
+ end;
+ L := Length(St) +1 ;
+ if L > BufLen then
+ begin
+ Result := L;
+ Exit;
+ end;
+
+ StrLCopy(Buffer, zend_pchar(St), BufLen -1);
+ Result := 0;
+ except
+ Result := REQUEST_ID_NOT_FOUND;
+ end;
+end;
+
+function GetVariableSize(RequestID : integer; AName : zend_pchar) : integer;
+var
+ L : integer;
+ St : zend_ustr;
+begin
+ if RequestID <= 0 then
+ begin
+ Result := REQUEST_ID_NOT_FOUND;
+ Exit;
+ end;
+
+ try
+ St := TPHPInfoBlock(RequestID).VarList.Values[AName];
+ if St = '' then
+ begin
+ Result := VARIABLE_NOT_FOUND;
+ Exit;
+ end;
+ L := Length(St) +1 ;
+ Result := L;
+ except
+ Result := REQUEST_ID_NOT_FOUND;
+ end;
+end;
+
+{ TPHPInfoBlock }
+
+constructor TPHPInfoBlock.Create;
+begin
+ inherited Create;
+ FBuffer := '';
+ FVarList := TStringList.Create;
+ FVirtualStream := TMemoryStream.Create;
+end;
+
+destructor TPHPInfoBlock.Destroy;
+begin
+ FBuffer := '';
+ FVarList.Free;
+ if FVirtualStream <> nil then
+ FreeAndNil(FVirtualStream);
+ inherited;
+end;
+
+procedure TPHPInfoBlock.SetVarList(AValue: TStringList);
+begin
+ FVarList.Assign(AValue);
+end;
+
+
+function InitRequest : integer;
+var
+ InfoBlock : TPHPInfoBlock;
+begin
+ InfoBlock := TPHPInfoBlock.Create;
+ Result := integer(InfoBlock);
+end;
+
+procedure DoneRequest(RequestID : integer);
+begin
+ if RequestID <= 0 then Exit;
+
+ try
+ TPHPInfoBlock(RequestID).FBuffer := '';
+ TPHPInfoBlock(RequestID).Free;
+ TPHPInfoBlock(RequestID) := nil;
+ except
+ end;
+end;
+
+
+procedure DLLExitProc(Reason: Integer); register;
+begin
+ case Reason of
+ DLL_PROCESS_DETACH: StopEngine;
+ DLL_THREAD_DETACH : ts_free_thread();
+ end;
+end;
+
+procedure InitEngine;
+var
+ p : pointer;
+begin
+
+ if not PHPLoaded then
+ LoadPHP;
+
+ if PHPLoaded then
+ begin
+ try
+ PrepareStartup;
+ tsrm_startup(128, 1, TSRM_ERROR_LEVEL_CORE, 'TSRM.log');
+ sapi_startup(@delphi_sapi_module);
+ p := @php_delphi_module;
+ php_module_startup(@delphi_sapi_module, p, 1);
+ zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry('max_input_time', 15, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ except
+ end;
+ end;
+
+ IsMultiThread := true;
+ DLLProc := @DLLExitProc;
+
+end;
+
+procedure StopEngine;
+begin
+ if PHPLoaded then
+ begin
+ try
+ delphi_sapi_module.shutdown(@delphi_sapi_module);
+ sapi_shutdown;
+ {$IF not Defined(PHP550) and not Defined(PHP560)}
+ tsrm_shutdown();
+ {$ifend}
+ except
+ end;
+ end;
+end;
+
+
+end.
diff --git a/Source/php4App_Icon.ico b/Source/php4App_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/php4App_Icon.ico differ
diff --git a/php4Delphi2005.bdsgroup b/Source/php4Delphi2005.bdsgroup
similarity index 97%
rename from php4Delphi2005.bdsgroup
rename to Source/php4Delphi2005.bdsgroup
index 0b60915..5026922 100644
--- a/php4Delphi2005.bdsgroup
+++ b/Source/php4Delphi2005.bdsgroup
@@ -1,20 +1,20 @@
-
-
-
-
- Default.Personality
-
- 1.0
- {6991143E-F46E-46D3-9B7A-CB1FDD4688F7}
-
-
-
-
-
- php4DelphiR2005.bdsproj
- php4DelphiD2005.bdsproj
- php4DelphiR2005.bpl php4DelphiD2005.bpl
-
-
-
-
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {6991143E-F46E-46D3-9B7A-CB1FDD4688F7}
+
+
+
+
+
+ php4DelphiR2005.bdsproj
+ php4DelphiD2005.bdsproj
+ php4DelphiR2005.bpl php4DelphiD2005.bpl
+
+
+
+
diff --git a/php4Delphi2006.bdsgroup b/Source/php4Delphi2006.bdsgroup
similarity index 97%
rename from php4Delphi2006.bdsgroup
rename to Source/php4Delphi2006.bdsgroup
index 2ddd51d..2e4aad3 100644
--- a/php4Delphi2006.bdsgroup
+++ b/Source/php4Delphi2006.bdsgroup
@@ -1,20 +1,20 @@
-
-
-
-
- Default.Personality
-
- 1.0
- {20CA46AC-3BA0-4A3C-906E-3C4E5189F055}
-
-
-
-
-
- php4DelphiR2006.bdsproj
- PHP4DelphiD2006.bdsproj
- php4DelphiR2006.bpl PHP4DelphiD2006.bpl
-
-
-
-
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {20CA46AC-3BA0-4A3C-906E-3C4E5189F055}
+
+
+
+
+
+ php4DelphiR2006.bdsproj
+ PHP4DelphiD2006.bdsproj
+ php4DelphiR2006.bpl PHP4DelphiD2006.bpl
+
+
+
+
diff --git a/php4DelphiD2005.bdsproj b/Source/php4DelphiD2005.bdsproj
similarity index 97%
rename from php4DelphiD2005.bdsproj
rename to Source/php4DelphiD2005.bdsproj
index b9f3f2b..031f57f 100644
--- a/php4DelphiD2005.bdsproj
+++ b/Source/php4DelphiD2005.bdsproj
@@ -1,165 +1,165 @@
-
-
-
-
- Delphi.Personality
-
- 1.0
- {37E94202-1748-4684-A213-6C6A8F356EE0}
-
-
-
-
- php4DelphiD2005.dpk
-
-
- 7.0
-
-
- 8
- 0
- 1
- 1
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- True
- True
- WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
- False
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- False
- False
- False
- True
- True
- True
-
-
- 0
- 0
- 1
- False
- False
- False
- 16384
- 1048576
- 4194304
- php4Delphi (design-time)
-
-
-
-
-
-
-
- rtl;vcl;dbrtl;vcldb;vclx;adortl;dbxcds;dbexpress;vclib;ibxpress;IntrawebDB_72_90;Intraweb_72_90;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;indy;dclOfficeXP;VclSmp;dsnap;soaprtl;inetdb;bdertl;vcldbx;webdsnap;websnap;vclactnband;vclshlctrls;dsnapcon;teeui;teedb;tee;Rave60VCL;php4DelphiR2005
-
-
- False
-
-
-
-
-
- False
-
-
-
-
-
- False
-
-
-
- $00000000
-
-
-
- True
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 1049
- 1251
-
-
- 1.0.0.0
- 1.0.0.0
-
-
-
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {37E94202-1748-4684-A213-6C6A8F356EE0}
+
+
+
+
+ php4DelphiD2005.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ php4Delphi (design-time)
+
+
+
+
+
+
+
+ rtl;vcl;dbrtl;vcldb;vclx;adortl;dbxcds;dbexpress;vclib;ibxpress;IntrawebDB_72_90;Intraweb_72_90;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;indy;dclOfficeXP;VclSmp;dsnap;soaprtl;inetdb;bdertl;vcldbx;webdsnap;websnap;vclactnband;vclshlctrls;dsnapcon;teeui;teedb;tee;Rave60VCL;php4DelphiR2005
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+ 1.0.0.0
+ 1.0.0.0
+
+
+
diff --git a/php4DelphiD2005.dpk b/Source/php4DelphiD2005.dpk
similarity index 84%
rename from php4DelphiD2005.dpk
rename to Source/php4DelphiD2005.dpk
index abea12c..9df15fd 100644
--- a/php4DelphiD2005.dpk
+++ b/Source/php4DelphiD2005.dpk
@@ -1,45 +1,48 @@
-package php4DelphiD2005;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (design-time)'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl,
- designide,
- vclactnband,
- vclx,
- php4DelphiR2005;
-
-contains
- PHPProjectWizard in 'PHPProjectWizard.pas',
- php4DelphiReg in 'php4DelphiReg.pas',
- php4DelphiWeb in 'php4DelphiWeb.pas',
- phpWeb in 'phpWeb.pas',
- phpAbout in 'phpAbout.pas' {dlgAbout};
-
-end.
+package php4DelphiD2005;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2005;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/php4DelphiD2005.dproj b/Source/php4DelphiD2005.dproj
new file mode 100644
index 0000000..45b39a5
--- /dev/null
+++ b/Source/php4DelphiD2005.dproj
@@ -0,0 +1,123 @@
+
+
+ {3581921A-45EA-4D27-A37C-57984B9B07D4}
+ php4DelphiD2005.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiD2005
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (design-time)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ true
+ false
+ true
+ 1058
+
+
+ php4DelphiD2005_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiD2005_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD2005.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/php4DelphiD2005.res b/Source/php4DelphiD2005.res
similarity index 100%
rename from php4DelphiD2005.res
rename to Source/php4DelphiD2005.res
diff --git a/Source/php4DelphiD2005_Icon.ico b/Source/php4DelphiD2005_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/php4DelphiD2005_Icon.ico differ
diff --git a/Source/php4DelphiD2007.dpk b/Source/php4DelphiD2007.dpk
new file mode 100644
index 0000000..c112701
--- /dev/null
+++ b/Source/php4DelphiD2007.dpk
@@ -0,0 +1,48 @@
+package php4DelphiD2007;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS OFF}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$DEFINE RELEASE}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2007;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/php4DelphiD2007.dproj b/Source/php4DelphiD2007.dproj
new file mode 100644
index 0000000..50f89ec
--- /dev/null
+++ b/Source/php4DelphiD2007.dproj
@@ -0,0 +1,125 @@
+
+
+ {B5F683C3-1A4A-48DA-A0EF-BF1761607FB3}
+ php4DelphiD2007.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 0
+ php4DelphiD2007
+ RELEASE;$(DCC_Define)
+ true
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ false
+ 0
+ false
+ php4Delphi (design-time)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ true
+ false
+ false
+ 1058
+ true
+
+
+ php4DelphiD2007_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiD2007_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD2007.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiD2007.res b/Source/php4DelphiD2007.res
new file mode 100644
index 0000000..1da216a
Binary files /dev/null and b/Source/php4DelphiD2007.res differ
diff --git a/Source/php4DelphiD2007_Icon.ico b/Source/php4DelphiD2007_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/php4DelphiD2007_Icon.ico differ
diff --git a/Source/php4DelphiD2009.dpk b/Source/php4DelphiD2009.dpk
new file mode 100644
index 0000000..3627877
--- /dev/null
+++ b/Source/php4DelphiD2009.dpk
@@ -0,0 +1,44 @@
+package php4DelphiD2009;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2009;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/php4DelphiD2009.dproj b/Source/php4DelphiD2009.dproj
new file mode 100644
index 0000000..f096ad0
--- /dev/null
+++ b/Source/php4DelphiD2009.dproj
@@ -0,0 +1,131 @@
+
+
+ {65B66BBA-1F79-4212-AC10-21298E0BC3B0}
+ php4DelphiD2009.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 0
+ ..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiD2009.bpl
+ 00400000
+ false
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 1058
+ true
+ php4DelphiD2009
+ false
+ false
+ false
+ true
+ true
+ php4Delphi (design-time)
+ false
+ true
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+
+
+ RELEASE;$(DCC_Define)
+ false
+ 0
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD2009.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
diff --git a/Source/php4DelphiD2009.res b/Source/php4DelphiD2009.res
new file mode 100644
index 0000000..b946c3c
Binary files /dev/null and b/Source/php4DelphiD2009.res differ
diff --git a/Source/php4DelphiD2009_Icon.ico b/Source/php4DelphiD2009_Icon.ico
new file mode 100644
index 0000000..379ec80
Binary files /dev/null and b/Source/php4DelphiD2009_Icon.ico differ
diff --git a/Source/php4DelphiD2010.dpk b/Source/php4DelphiD2010.dpk
new file mode 100644
index 0000000..f322623
--- /dev/null
+++ b/Source/php4DelphiD2010.dpk
@@ -0,0 +1,48 @@
+package php4DelphiD2010;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2010;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
+
diff --git a/Source/php4DelphiD2010.dproj b/Source/php4DelphiD2010.dproj
new file mode 100644
index 0000000..e8ebf40
--- /dev/null
+++ b/Source/php4DelphiD2010.dproj
@@ -0,0 +1,503 @@
+
+
+ {34B23B2E-657F-42AF-9898-5D22792F862D}
+ php4DelphiD2010.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (design-time)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiD2010
+ true
+ 1049
+ false
+ true
+ true
+ false
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ true
+
+
+ vcl;rtl;vclactnband;vclx;$(DCC_UsePackage)
+ php4DelphiD2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;F:\переуÑтановил\Рабочий Ñтол 08.07.4016\soulengine-5554e3db061d08b94f439be26ed071a74c30071c;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD2010.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ classes
+ 1
+
+
+
+
+ Contents\MacOS
+ 0
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+
+
+ 0
+
+
+ 1
+ .framework
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 0
+ .bpl
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/Source/php4DelphiD2010.res b/Source/php4DelphiD2010.res
new file mode 100644
index 0000000..75bcc36
Binary files /dev/null and b/Source/php4DelphiD2010.res differ
diff --git a/Source/php4DelphiD2010_Icon.ico b/Source/php4DelphiD2010_Icon.ico
new file mode 100644
index 0000000..379ec80
Binary files /dev/null and b/Source/php4DelphiD2010_Icon.ico differ
diff --git a/php4DelphiD5.dpk b/Source/php4DelphiD5.dpk
similarity index 79%
rename from php4DelphiD5.dpk
rename to Source/php4DelphiD5.dpk
index 5815d67..1a98ba0 100644
--- a/php4DelphiD5.dpk
+++ b/Source/php4DelphiD5.dpk
@@ -1,42 +1,45 @@
-package php4DelphiD5;
-
-{$R *.RES}
-{$R 'php4delphi.dcr'}
-{$ALIGN ON}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST ON}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (Design)'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- vcl50,
- php4DelphiR5,
- dsnide50;
-
-contains
- PHPProjectWizard in 'PHPProjectWizard.pas',
- php4DelphiReg in 'php4DelphiReg.pas',
- phpAbout in 'phpAbout.pas' {dlgAbout},
- phpWeb in 'phpWeb.pas',
- php4DelphiWeb in 'php4DelphiWeb.pas';
-
-end.
+package php4DelphiD5;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (Design)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl,
+ php4DelphiR5,
+ dsnide50;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout},
+ phpWeb in 'phpWeb.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas';
+
+END.
diff --git a/Source/php4DelphiD5.dproj b/Source/php4DelphiD5.dproj
new file mode 100644
index 0000000..4eee329
--- /dev/null
+++ b/Source/php4DelphiD5.dproj
@@ -0,0 +1,133 @@
+
+
+ {5CE4325A-009D-4F8F-9CE1-98445D950FC6}
+ php4DelphiD5.dpk
+ True
+ Debug
+ 1
+ Package
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiD5
+ false
+ true
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ false
+ php4Delphi (Design)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ 1058
+ true
+ true
+ true
+
+
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ php4DelphiD5_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiD5_Icon.ico
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD5.dpk
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiD5.res b/Source/php4DelphiD5.res
new file mode 100644
index 0000000..502c3d6
Binary files /dev/null and b/Source/php4DelphiD5.res differ
diff --git a/Source/php4DelphiD5_Icon.ico b/Source/php4DelphiD5_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/php4DelphiD5_Icon.ico differ
diff --git a/php4DelphiD6.dpk b/Source/php4DelphiD6.dpk
similarity index 82%
rename from php4DelphiD6.dpk
rename to Source/php4DelphiD6.dpk
index 7286d67..a1312f7 100644
--- a/php4DelphiD6.dpk
+++ b/Source/php4DelphiD6.dpk
@@ -1,42 +1,46 @@
-package php4DelphiD6;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- designide,
- php4DelphiR6;
-
-contains
- PHPProjectWizard in 'PHPProjectWizard.pas',
- php4DelphiReg in 'php4DelphiReg.pas',
- phpWeb in 'phpWeb.pas',
- php4DelphiWeb in 'php4DelphiWeb.pas',
- phpAbout in 'phpAbout.pas' {dlgAbout};
-
-end.
+package php4DelphiD6;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ php4DelphiR6;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ phpWeb in 'phpWeb.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/php4DelphiD6.dproj b/Source/php4DelphiD6.dproj
new file mode 100644
index 0000000..e0f7376
--- /dev/null
+++ b/Source/php4DelphiD6.dproj
@@ -0,0 +1,110 @@
+
+
+ {AFE103A5-8E11-472A-A798-9F32AC9C090F}
+ php4DelphiD6.dpk
+ True
+ Debug
+ 1
+ Package
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4Delphi
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiD6
+ true
+ 1049
+ false
+ true
+ true
+ false
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ true
+
+
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
+
+
+ php4DelphiD6_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD6.dpk
+
+
+
+ False
+ True
+
+
+ 12
+
+
+
+
diff --git a/php4DelphiD6.res b/Source/php4DelphiD6.res
similarity index 100%
rename from php4DelphiD6.res
rename to Source/php4DelphiD6.res
diff --git a/Source/php4DelphiD6_Icon.ico b/Source/php4DelphiD6_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/php4DelphiD6_Icon.ico differ
diff --git a/Source/php4DelphiD7.cfg b/Source/php4DelphiD7.cfg
new file mode 100644
index 0000000..290f5ea
--- /dev/null
+++ b/Source/php4DelphiD7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-DDEBUG
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/Source/php4DelphiD7.dof b/Source/php4DelphiD7.dof
new file mode 100644
index 0000000..bc67b09
--- /dev/null
+++ b/Source/php4DelphiD7.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=php4Delphi (design-time)
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=DEBUG
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1058
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/php4DelphiD7.dpk b/Source/php4DelphiD7.dpk
similarity index 84%
rename from php4DelphiD7.dpk
rename to Source/php4DelphiD7.dpk
index a6be64c..d19798b 100644
--- a/php4DelphiD7.dpk
+++ b/Source/php4DelphiD7.dpk
@@ -1,45 +1,48 @@
-package php4DelphiD7;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (design-time)'}
-{$DESIGNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl,
- designide,
- vclactnband,
- vclx,
- php4DelphiR7;
-
-contains
- PHPProjectWizard in 'PHPProjectWizard.pas',
- php4DelphiReg in 'php4DelphiReg.pas',
- php4DelphiWeb in 'php4DelphiWeb.pas',
- phpWeb in 'phpWeb.pas',
- phpAbout in 'phpAbout.pas' {dlgAbout};
-
-end.
+package php4DelphiD7;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR7;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
diff --git a/Source/php4DelphiD7.dproj b/Source/php4DelphiD7.dproj
new file mode 100644
index 0000000..107e6cb
--- /dev/null
+++ b/Source/php4DelphiD7.dproj
@@ -0,0 +1,135 @@
+
+
+ {06AB7031-6133-45D0-A8EC-0C226E0BE2BD}
+ php4DelphiD7.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 00400000
+ false
+ 1
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 1058
+ true
+ php4DelphiD7
+ false
+ false
+ false
+ true
+ true
+ php4Delphi (design-time)
+ false
+ true
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+
+
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ true
+ php4DelphiD7_Icon.ico
+ 1033
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ php4DelphiD7_Icon.ico
+
+
+ RELEASE;$(DCC_Define)
+ false
+ 0
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD7.dpk
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiD7.res b/Source/php4DelphiD7.res
new file mode 100644
index 0000000..f3638e8
Binary files /dev/null and b/Source/php4DelphiD7.res differ
diff --git a/Source/php4DelphiD7_Icon.ico b/Source/php4DelphiD7_Icon.ico
new file mode 100644
index 0000000..cfd8992
Binary files /dev/null and b/Source/php4DelphiD7_Icon.ico differ
diff --git a/Source/php4DelphiDRio.dpk b/Source/php4DelphiDRio.dpk
new file mode 100644
index 0000000..acefc0d
--- /dev/null
+++ b/Source/php4DelphiDRio.dpk
@@ -0,0 +1,48 @@
+package php4DelphiDRio;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2010;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
+
diff --git a/Source/php4DelphiDRio.dproj b/Source/php4DelphiDRio.dproj
new file mode 100644
index 0000000..248c41c
--- /dev/null
+++ b/Source/php4DelphiDRio.dproj
@@ -0,0 +1,799 @@
+
+
+ {34B23B2E-657F-42AF-9898-5D22792F862D}
+ php4DelphiDRio.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.7
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (design-time)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiDRio
+ true
+ 1049
+ false
+ true
+ true
+ false
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ true
+
+
+ vcl;rtl;vclactnband;vclx;php4DelphiR2010;$(DCC_UsePackage)
+ php4DelphiD2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;F:\переуÑтановил\Рабочий Ñтол 08.07.4016\soulengine-5554e3db061d08b94f439be26ed071a74c30071c;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiDRio.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/php4DelphiR2005.bdsproj b/Source/php4DelphiR2005.bdsproj
similarity index 97%
rename from php4DelphiR2005.bdsproj
rename to Source/php4DelphiR2005.bdsproj
index 95bf597..d142614 100644
--- a/php4DelphiR2005.bdsproj
+++ b/Source/php4DelphiR2005.bdsproj
@@ -1,165 +1,165 @@
-
-
-
-
- Delphi.Personality
-
- 1.0
- {0B760A8E-1B50-4DF2-9D42-92785BB95C94}
-
-
-
-
- php4DelphiR2005.dpk
-
-
- 7.0
-
-
- 8
- 0
- 1
- 1
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- True
- True
- WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
- False
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- False
- False
- False
- True
- True
- True
-
-
- 0
- 0
- 1
- False
- False
- False
- 16384
- 1048576
- 4194304
- php4Delphi (run-rime)
-
-
-
-
-
-
-
- rtl;vcl;dbrtl;vcldb;vclx;adortl;dbxcds;dbexpress;vclib;ibxpress;IntrawebDB_72_90;Intraweb_72_90;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;indy;dclOfficeXP;VclSmp;dsnap;soaprtl;inetdb;bdertl;vcldbx;webdsnap;websnap;vclactnband;vclshlctrls;dsnapcon;teeui;teedb;tee;Rave60VCL;php4DelphiR2005
-
-
- False
-
-
-
-
-
- False
-
-
-
-
-
- False
-
-
-
- $00000000
-
-
-
- False
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 1049
- 1251
-
-
- 1.0.0.0
- 1.0.0.0
-
-
-
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0B760A8E-1B50-4DF2-9D42-92785BB95C94}
+
+
+
+
+ php4DelphiR2005.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ php4Delphi (run-rime)
+
+
+
+
+
+
+
+ rtl;vcl;dbrtl;vcldb;vclx;adortl;dbxcds;dbexpress;vclib;ibxpress;IntrawebDB_72_90;Intraweb_72_90;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;indy;dclOfficeXP;VclSmp;dsnap;soaprtl;inetdb;bdertl;vcldbx;webdsnap;websnap;vclactnband;vclshlctrls;dsnapcon;teeui;teedb;tee;Rave60VCL;php4DelphiR2005
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+ 1.0.0.0
+ 1.0.0.0
+
+
+
diff --git a/php4DelphiR2005.dpk b/Source/php4DelphiR2005.dpk
similarity index 73%
rename from php4DelphiR2005.dpk
rename to Source/php4DelphiR2005.dpk
index 96903d9..bdd3e86 100644
--- a/php4DelphiR2005.dpk
+++ b/Source/php4DelphiR2005.dpk
@@ -1,48 +1,49 @@
-package php4DelphiR2005;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (run-rime)'}
-{$RUNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl;
-
-contains
- zendAPI in 'ZENDAPI.pas',
- DelphiFunctions in 'DelphiFunctions.pas',
- php4delphi in 'php4delphi.pas',
- phpAPI in 'PHPAPI.pas',
- phpModules in 'phpModules.pas',
- phpLibrary in 'PHPLibrary.pas',
- PHPCustomLibrary in 'phpCustomLibrary.pas',
- phpFunctions in 'PHPFunctions.pas',
- PHPTypes in 'PHPTypes.pas',
- ZENDTypes in 'ZENDTypes.pas',
- phpClass in 'phpClass.pas',
- PHPCommon in 'PHPCommon.pas';
-
-end.
+package php4DelphiR2005;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+end.
diff --git a/Source/php4DelphiR2005.dproj b/Source/php4DelphiR2005.dproj
new file mode 100644
index 0000000..b5a12fd
--- /dev/null
+++ b/Source/php4DelphiR2005.dproj
@@ -0,0 +1,123 @@
+
+
+ {B60FB687-261B-4969-AAC4-3B0E2B26B5F7}
+ php4DelphiR2005.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiR2005
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (run-rime)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ 1058
+ false
+ true
+ true
+
+
+ php4DelphiR2005_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR2005_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2005.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/php4DelphiR2005.res b/Source/php4DelphiR2005.res
similarity index 100%
rename from php4DelphiR2005.res
rename to Source/php4DelphiR2005.res
diff --git a/Source/php4DelphiR2005_Icon.ico b/Source/php4DelphiR2005_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/php4DelphiR2005_Icon.ico differ
diff --git a/Source/php4DelphiR2006.bdsproj b/Source/php4DelphiR2006.bdsproj
new file mode 100644
index 0000000..4add8c4
--- /dev/null
+++ b/Source/php4DelphiR2006.bdsproj
@@ -0,0 +1,658 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {479F2E96-13D0-45DE-8D89-01EF0131F196}
+
+
+
+
+ php4DelphiR2006.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ php4Delphi (run-rime)
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
diff --git a/php4DelphiR2006.dpk b/Source/php4DelphiR2006.dpk
similarity index 85%
rename from php4DelphiR2006.dpk
rename to Source/php4DelphiR2006.dpk
index 140e114..6bb00b2 100644
--- a/php4DelphiR2006.dpk
+++ b/Source/php4DelphiR2006.dpk
@@ -1,48 +1,50 @@
-package php4DelphiR2006;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (run-rime)'}
-{$RUNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl;
-
-contains
- ZENDAPI in 'ZENDAPI.pas',
- DelphiFunctions in 'DelphiFunctions.pas',
- php4delphi in 'php4delphi.pas',
- PHPAPI in 'PHPAPI.pas',
- phpModules in 'phpModules.pas',
- PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
- PHPFunctions in 'PHPFunctions.pas',
- PHPTypes in 'PHPTypes.pas',
- ZENDTypes in 'ZENDTypes.pas',
- phpClass in 'phpClass.pas',
- PHPCommon in 'PHPCommon.pas';
-
-end.
+package php4DelphiR2006;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR2006.dproj b/Source/php4DelphiR2006.dproj
new file mode 100644
index 0000000..52e1216
--- /dev/null
+++ b/Source/php4DelphiR2006.dproj
@@ -0,0 +1,123 @@
+
+
+ {479F2E96-13D0-45DE-8D89-01EF0131F196}
+ php4DelphiR2006.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ php4DelphiR2006
+ 1
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (run-rime)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ false
+ true
+ 2057
+ false
+ true
+ true
+
+
+ php4DelphiR2006_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR2006_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2006.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/php4DelphiR2006.res b/Source/php4DelphiR2006.res
similarity index 100%
rename from php4DelphiR2006.res
rename to Source/php4DelphiR2006.res
diff --git a/Source/php4DelphiR2006_Icon.ico b/Source/php4DelphiR2006_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/php4DelphiR2006_Icon.ico differ
diff --git a/Source/php4DelphiR2007.bpl b/Source/php4DelphiR2007.bpl
new file mode 100644
index 0000000..514af01
Binary files /dev/null and b/Source/php4DelphiR2007.bpl differ
diff --git a/Source/php4DelphiR2007.dpk b/Source/php4DelphiR2007.dpk
new file mode 100644
index 0000000..05939e5
--- /dev/null
+++ b/Source/php4DelphiR2007.dpk
@@ -0,0 +1,50 @@
+package php4DelphiR2007;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR2007.dproj b/Source/php4DelphiR2007.dproj
new file mode 100644
index 0000000..c16b729
--- /dev/null
+++ b/Source/php4DelphiR2007.dproj
@@ -0,0 +1,123 @@
+
+
+ {21B4A370-210E-4033-83C7-D550746F03A9}
+ php4DelphiR2007.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiR2007
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (run-rime)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ 1058
+ false
+ true
+ true
+
+
+ php4DelphiR2007_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR2007_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2007.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiR2007.res b/Source/php4DelphiR2007.res
new file mode 100644
index 0000000..301eb1c
Binary files /dev/null and b/Source/php4DelphiR2007.res differ
diff --git a/Source/php4DelphiR2007_Icon.ico b/Source/php4DelphiR2007_Icon.ico
new file mode 100644
index 0000000..93f732e
Binary files /dev/null and b/Source/php4DelphiR2007_Icon.ico differ
diff --git a/php4DelphiR7.dpk b/Source/php4DelphiR2009.dpk
similarity index 74%
rename from php4DelphiR7.dpk
rename to Source/php4DelphiR2009.dpk
index f5c4f51..e7e09aa 100644
--- a/php4DelphiR7.dpk
+++ b/Source/php4DelphiR2009.dpk
@@ -1,48 +1,47 @@
-package php4DelphiR7;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (run-rime)'}
-{$RUNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl;
-
-contains
- zendAPI in 'ZENDAPI.pas',
- DelphiFunctions in 'DelphiFunctions.pas',
- php4delphi in 'php4delphi.pas',
- phpAPI in 'PHPAPI.pas',
- phpModules in 'phpModules.pas',
- phpLibrary in 'PHPLibrary.pas',
- PHPCustomLibrary in 'phpCustomLibrary.pas',
- phpFunctions in 'PHPFunctions.pas',
- PHPTypes in 'PHPTypes.pas',
- ZENDTypes in 'ZENDTypes.pas',
- phpClass in 'phpClass.pas',
- PHPCommon in 'PHPCommon.pas';
-
-end.
+package php4DelphiR2009;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR2009.dproj b/Source/php4DelphiR2009.dproj
new file mode 100644
index 0000000..1f38f11
--- /dev/null
+++ b/Source/php4DelphiR2009.dproj
@@ -0,0 +1,139 @@
+
+
+ {B0FA1B58-2442-42C7-83BD-6DD3D0CE3CF8}
+ php4DelphiR2009.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 0
+ false
+ ..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2009.bpl
+ php4Delphi (run-rime)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiR2009
+ true
+ 1049
+ false
+ true
+ true
+ true
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ false
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2009.dpk
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ True
+
+
+ 12
+
+
diff --git a/Source/php4DelphiR2009.res b/Source/php4DelphiR2009.res
new file mode 100644
index 0000000..4ed2b32
Binary files /dev/null and b/Source/php4DelphiR2009.res differ
diff --git a/Source/php4DelphiR2009_Icon.ico b/Source/php4DelphiR2009_Icon.ico
new file mode 100644
index 0000000..379ec80
Binary files /dev/null and b/Source/php4DelphiR2009_Icon.ico differ
diff --git a/Source/php4DelphiR2010.dpk b/Source/php4DelphiR2010.dpk
new file mode 100644
index 0000000..8ffc056
--- /dev/null
+++ b/Source/php4DelphiR2010.dpk
@@ -0,0 +1,50 @@
+package php4DelphiR2010;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR2010.dproj b/Source/php4DelphiR2010.dproj
new file mode 100644
index 0000000..1449082
--- /dev/null
+++ b/Source/php4DelphiR2010.dproj
@@ -0,0 +1,497 @@
+
+
+ {E17417E2-2EC1-4971-BB34-C9C25AFF27A5}
+ php4DelphiR2010.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (run-rime)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiR2010
+ true
+ 1049
+ false
+ true
+ true
+ true
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ false
+
+
+ php4DelphiR2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2010.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ php4DelphiR2010.bpl
+ true
+
+
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ classes
+ 1
+
+
+
+
+ Contents\MacOS
+ 0
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+
+
+ 0
+
+
+ 1
+ .framework
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 0
+ .bpl
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/Source/php4DelphiR2010.lpk b/Source/php4DelphiR2010.lpk
new file mode 100644
index 0000000..15061d0
--- /dev/null
+++ b/Source/php4DelphiR2010.lpk
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/php4DelphiR2010.res b/Source/php4DelphiR2010.res
new file mode 100644
index 0000000..75bcc36
Binary files /dev/null and b/Source/php4DelphiR2010.res differ
diff --git a/Source/php4DelphiR2010_Icon.ico b/Source/php4DelphiR2010_Icon.ico
new file mode 100644
index 0000000..379ec80
Binary files /dev/null and b/Source/php4DelphiR2010_Icon.ico differ
diff --git a/php4DelphiR5.dpk b/Source/php4DelphiR5.dpk
similarity index 70%
rename from php4DelphiR5.dpk
rename to Source/php4DelphiR5.dpk
index 3958ee6..555ae25 100644
--- a/php4DelphiR5.dpk
+++ b/Source/php4DelphiR5.dpk
@@ -1,47 +1,49 @@
-package php4DelphiR5;
-
-{$R *.RES}
-{$R 'php4delphi.dcr'}
-{$ALIGN ON}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST ON}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'PHP4Delphi (run-time)'}
-{$RUNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- vcl50;
-
-contains
- zendAPI in 'ZENDAPI.pas',
- DelphiFunctions in 'DelphiFunctions.pas',
- php4delphi in 'php4delphi.pas',
- phpAPI in 'PHPAPI.pas',
- phpLibrary in 'PHPLibrary.pas',
- PHPCustomLibrary in 'phpCustomLibrary.pas',
- phpFunctions in 'phpFunctions.pas',
- PHPTypes in 'PHPTypes.pas',
- ZENDTypes in 'ZENDTypes.pas',
- phpClass in 'phpClass.pas',
- phpModules in 'phpModules.pas',
- PHPCommon in 'PHPCommon.pas';
-
-end.
+package php4DelphiR5;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'PHP4Delphi (run-time)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+END.
diff --git a/Source/php4DelphiR5.dproj b/Source/php4DelphiR5.dproj
new file mode 100644
index 0000000..ba9ec74
--- /dev/null
+++ b/Source/php4DelphiR5.dproj
@@ -0,0 +1,136 @@
+
+
+ {707D296F-20D9-445C-A469-6AF8BB33C170}
+ php4DelphiR5.dpk
+ True
+ Debug
+ 1
+ Package
+ None
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiR5
+ false
+ true
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ false
+ PHP4Delphi (run-time)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ true
+ 1058
+ true
+ true
+
+
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ php4DelphiR5_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR5_Icon.ico
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR5.dpk
+
+
+
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiR5.res b/Source/php4DelphiR5.res
new file mode 100644
index 0000000..ddb7a2e
Binary files /dev/null and b/Source/php4DelphiR5.res differ
diff --git a/Source/php4DelphiR5_Icon.ico b/Source/php4DelphiR5_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/php4DelphiR5_Icon.ico differ
diff --git a/php4DelphiR6.dpk b/Source/php4DelphiR6.dpk
similarity index 67%
rename from php4DelphiR6.dpk
rename to Source/php4DelphiR6.dpk
index 8ebb46e..78e7aa7 100644
--- a/php4DelphiR6.dpk
+++ b/Source/php4DelphiR6.dpk
@@ -1,48 +1,50 @@
-package php4DelphiR6;
-
-{$R *.res}
-{$R 'php4delphi.dcr'}
-{$ALIGN 8}
-{$ASSERTIONS ON}
-{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
-{$EXTENDEDSYNTAX ON}
-{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
-{$LONGSTRINGS ON}
-{$OPENSTRINGS ON}
-{$OPTIMIZATION ON}
-{$OVERFLOWCHECKS OFF}
-{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
-{$SAFEDIVIDE OFF}
-{$STACKFRAMES OFF}
-{$TYPEDADDRESS OFF}
-{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
-{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
-{$DESCRIPTION 'php4Delphi (run-time)'}
-{$RUNONLY}
-{$IMPLICITBUILD OFF}
-
-requires
- rtl,
- vcl;
-
-contains
- zendAPI in 'ZENDAPI.pas',
- DelphiFunctions in 'DelphiFunctions.pas',
- php4delphi in 'php4delphi.pas',
- phpAPI in 'PHPAPI.pas',
- phpModules in 'phpModules.pas',
- phpLibrary in 'PHPLibrary.pas',
- PHPCustomLibrary in 'phpCustomLibrary.pas',
- phpFunctions in 'PHPFunctions.pas',
- ZENDTypes in 'ZendTypes.pas',
- PHPTypes in 'phpTypes.pas',
- phpClass in 'phpClass.pas',
- PHPCommon in 'PHPCommon.pas';
-
-end.
+package php4DelphiR6;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-time)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR6.dproj b/Source/php4DelphiR6.dproj
new file mode 100644
index 0000000..21e327c
--- /dev/null
+++ b/Source/php4DelphiR6.dproj
@@ -0,0 +1,123 @@
+
+
+ {DED15493-B967-43E0-A18F-C40731D537E2}
+ php4DelphiR6.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiR6
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (run-time)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ 1058
+ false
+ true
+ true
+
+
+ php4DelphiR6_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR6_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR6.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/php4DelphiR6.res b/Source/php4DelphiR6.res
similarity index 100%
rename from php4DelphiR6.res
rename to Source/php4DelphiR6.res
diff --git a/Source/php4DelphiR6_Icon.ico b/Source/php4DelphiR6_Icon.ico
new file mode 100644
index 0000000..1998c2d
Binary files /dev/null and b/Source/php4DelphiR6_Icon.ico differ
diff --git a/Source/php4DelphiR7.cfg b/Source/php4DelphiR7.cfg
new file mode 100644
index 0000000..290f5ea
--- /dev/null
+++ b/Source/php4DelphiR7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-DDEBUG
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/Source/php4DelphiR7.dof b/Source/php4DelphiR7.dof
new file mode 100644
index 0000000..f3d0e61
--- /dev/null
+++ b/Source/php4DelphiR7.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=php4Delphi (run-rime)
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=DEBUG
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1058
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/Source/php4DelphiR7.dpk b/Source/php4DelphiR7.dpk
new file mode 100644
index 0000000..dc295fa
--- /dev/null
+++ b/Source/php4DelphiR7.dpk
@@ -0,0 +1,50 @@
+package php4DelphiR7;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiR7.dproj b/Source/php4DelphiR7.dproj
new file mode 100644
index 0000000..1556578
--- /dev/null
+++ b/Source/php4DelphiR7.dproj
@@ -0,0 +1,123 @@
+
+
+ {3E3CB6F4-C2C9-4F65-A546-29B1EB2C2EB7}
+ php4DelphiR7.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 1
+ php4DelphiR7
+ false
+ true
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 00400000
+ true
+ false
+ php4Delphi (run-rime)
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ 1058
+ false
+ true
+ true
+
+
+ php4DelphiR7_Icon.ico
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ true
+
+
+ php4DelphiR7_Icon.ico
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+
+
+ 0
+ 0
+ false
+ RELEASE;$(DCC_Define)
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+
+
+
+ MainSource
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR7.dpk
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
+
+
diff --git a/Source/php4DelphiR7.res b/Source/php4DelphiR7.res
new file mode 100644
index 0000000..400a713
Binary files /dev/null and b/Source/php4DelphiR7.res differ
diff --git a/Source/php4DelphiR7_Icon.ico b/Source/php4DelphiR7_Icon.ico
new file mode 100644
index 0000000..cfd8992
Binary files /dev/null and b/Source/php4DelphiR7_Icon.ico differ
diff --git a/Source/php4DelphiRRio.dpk b/Source/php4DelphiRRio.dpk
new file mode 100644
index 0000000..74a511b
--- /dev/null
+++ b/Source/php4DelphiRRio.dpk
@@ -0,0 +1,50 @@
+package php4DelphiRRio;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiRRio.dproj b/Source/php4DelphiRRio.dproj
new file mode 100644
index 0000000..b61998b
--- /dev/null
+++ b/Source/php4DelphiRRio.dproj
@@ -0,0 +1,806 @@
+
+
+ {E17417E2-2EC1-4971-BB34-C9C25AFF27A5}
+ php4DelphiRRio.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.7
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (run-rime)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiRRio
+ true
+ 1049
+ false
+ true
+ true
+ true
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ false
+
+
+ php4DelphiR2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiRRio.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ php4DelphiRRio.bpl
+ true
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+ 12
+
+
+
+
+
diff --git a/php4DelphiReg.pas b/Source/php4DelphiReg.pas
similarity index 83%
rename from php4DelphiReg.pas
rename to Source/php4DelphiReg.pas
index 8b1b5d2..6b869de 100644
--- a/php4DelphiReg.pas
+++ b/Source/php4DelphiReg.pas
@@ -1,194 +1,227 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP4Delphi components registration }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: php4DelphiReg.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit php4DelphiReg;
-
-interface
-uses
- Windows, SysUtils, Classes, Dialogs, Forms,
- PHPCommon,
- {$IFDEF VERSION6}
- DesignIntf,
- DesignEditors,
- {$ELSE}
- dsgnintf,
- {$ENDIF}
- ShlObj,
- ZendAPI, PHPAPI,
- PHP4Delphi, phpAbout, phpModules, phpLibrary, ShellAPI,
- phpClass,
- phpCustomLibrary;
-
-type
- TScriptFileProperty = class(TStringProperty)
- public
- procedure Edit; override;
- function GetAttributes: TPropertyAttributes; override;
- end;
-
- TINIFolderProperty = class(TStringProperty)
- public
- procedure Edit; override;
- function GetAttributes: TPropertyAttributes; override;
- end;
-
- TpsvPHPEditor = class(TDefaultEditor)
- public
- {$IFDEF VERSION6}
- procedure EditProperty(const Prop: IProperty; var Continue: Boolean); override;
- {$ELSE}
- procedure EditProperty(PropertyEditor: TPropertyEditor;
- var Continue, FreeEditor: boolean); override;
- {$ENDIF}
- procedure ExecuteVerb(Index: integer); override;
- function GetVerb(Index: integer): string; override;
- function GetVerbCount: integer; override;
- procedure Edit; override;
- end;
-
-procedure Register;
-
-implementation
-
-procedure Register;
-begin
- RegisterComponents('PHP', [TpsvPHP]);
- RegisterComponents('PHP', [TPHPLibrary]);
- RegisterComponents('PHP', [TPHPClass]);
- RegisterComponents('PHP', [TPHPSystemLibrary]);
- RegisterPropertyEditor(TypeInfo(String), TpsvPHP, 'FileName', TScriptFileProperty);
- RegisterPropertyEditor(TypeInfo(TPHPAboutInfo), TPHPComponent, 'About', TPHPVersionEditor);
- RegisterPropertyEditor(TypeInfo(TPHPAboutInfo), TCustomPHPExtension, 'About', TphpVersionEditor);
- RegisterComponentEditor(TPHPExtension, TpsvPHPEditor);
- RegisterComponentEditor(TPHPLibrary, TpsvPHPEditor);
-end;
-
-
-procedure TScriptFileProperty.Edit;
-var
- MPFileOpen: TOpenDialog;
-begin
- MPFileOpen := TOpenDialog.Create(Application);
- MPFileOpen.Filename := GetValue;
- MPFileOpen.Filter := 'PHP Script (*.php)|*.php';
- MPFileOpen.Options := MPFileOpen.Options + [ofPathMustExist,
- ofFileMustExist];
- try
- if MPFileOpen.Execute then SetValue(MPFileOpen.Filename);
- finally
- MPFileOpen.Free;
- end;
-end;
-
-function TScriptFileProperty.GetAttributes: TPropertyAttributes;
-begin
- Result := [paDialog];
-end;
-
-{$IFDEF VERSION6}
-procedure TpsvPHPEditor.EditProperty(const Prop: IProperty; var Continue: Boolean);
-var
- PropName: string;
-begin
- PropName := Prop.GetName;
- if (CompareText(PropName, 'FUNCTIONS') = 0) then
- begin
- Prop.Edit;
- Continue := False;
- end;
-end;
-
-{$ELSE}
-procedure TpsvPHPEditor.EditProperty(PropertyEditor: TPropertyEditor;
- var Continue,
- FreeEditor: boolean);
-var
- PropName: string;
-begin
- PropName := PropertyEditor.GetName;
- if (CompareText(PropName, 'FUNCTIONS') = 0) then
- begin
- PropertyEditor.Edit;
- Continue := False;
- end;
-end;
-{$ENDIF}
-
-procedure TpsvPHPEditor.Edit;
-begin
- inherited;
-end;
-
-procedure TpsvPHPEditor.ExecuteVerb(Index: integer);
-begin
- case Index of
- 0:
- begin
- Edit;
- Designer.Modified;
- end;
- 1: ShellExecute(0, 'open', 'http://www.php.net', nil, nil, SW_SHOW);
- 2: ShellExecute(0, 'open', 'http://users.chello.be/ws36637', nil, nil, SW_SHOW);
- end;
-end;
-
-function TpsvPHPEditor.GetVerb(Index: integer): string;
-begin
- case Index of
- 0: Result := 'Edit PHP Functions...';
- 1: Result := 'PHP Home Page';
- 2: Result := 'PHP4Delphi Home Page';
- end;
-end;
-
-function TpsvPHPEditor.GetVerbCount: integer;
-begin
- Result := 3;
-end;
-
-{ TINIFolderProperty }
-
-procedure TINIFolderProperty.Edit;
-var
- BrowseInfo: TBrowseInfo;
- ItemIDList: PItemIDList;
- ItemSelected : PItemIDList;
- NameBuffer: array[0..MAX_PATH] of Char;
- WindowList: Pointer;
-begin
- itemIDList := nil;
- FillChar(BrowseInfo, SizeOf(BrowseInfo), 0);
- BrowseInfo.hwndOwner := Forms.Application.Handle;
- BrowseInfo.pidlRoot := ItemIDList;
- BrowseInfo.pszDisplayName := NameBuffer;
- BrowseInfo.lpszTitle := 'Select folder';
- BrowseInfo.ulFlags := BIF_RETURNONLYFSDIRS;
- WindowList := DisableTaskWindows(0);
- try
- ItemSelected := SHBrowseForFolder(BrowseInfo);
- finally
- EnableTaskWindows(WindowList);
- end;
- if (ItemSelected <> nil) then
- begin
- SHGetPathFromIDList(ItemSelected,NameBuffer);
- SetValue(NameBuffer);
- end;
-end;
-
-function TINIFolderProperty.GetAttributes: TPropertyAttributes;
-begin
- Result := [paDialog];
-end;
-
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP4Delphi components registration }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: php4DelphiReg.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit php4DelphiReg;
+
+interface
+uses
+ Windows, SysUtils, Classes, Dialogs, Forms,
+ PHPCommon,
+ {$IFDEF VERSION6}
+ DesignIntf,
+ DesignEditors,
+ ToolsAPI,
+ {$ELSE}
+ dsgnintf,
+ {$ENDIF}
+ Graphics,
+ ShlObj,
+ ZendAPI, PHPAPI,
+ PHP4Delphi, phpAbout, phpModules, phpLibrary, ShellAPI,
+ phpClass;
+
+type
+ TScriptFileProperty = class(TStringProperty)
+ public
+ procedure Edit; override;
+ function GetAttributes: TPropertyAttributes; override;
+ end;
+
+ TINIFolderProperty = class(TStringProperty)
+ public
+ procedure Edit; override;
+ function GetAttributes: TPropertyAttributes; override;
+ end;
+
+ TpsvPHPEditor = class(TDefaultEditor)
+ public
+ {$IFDEF VERSION6}
+ procedure EditProperty(const Prop: IProperty; var Continue: Boolean); override;
+ {$ELSE}
+ procedure EditProperty(PropertyEditor: TPropertyEditor;
+ var Continue, FreeEditor: boolean); override;
+ {$ENDIF}
+ procedure ExecuteVerb(Index: integer); override;
+ function GetVerb(Index: integer): string; override;
+ function GetVerbCount: integer; override;
+ procedure Edit; override;
+ end;
+
+{$IFDEF VERSION10}
+procedure RegisterSplashScreen;
+{$ENDIF}
+
+procedure Register;
+
+implementation
+
+{$R php4DelphiSplash.res}
+
+{$IFDEF VERSION11}
+{$R php4delphi.dcr}
+{$ENDIF}
+
+{$IFDEF VERSION10}
+procedure RegisterSplashScreen;
+var
+ Bmp: TBitmap;
+begin
+ Bmp := TBitmap.Create;
+ Bmp.LoadFromResourceName( HInstance, 'PHPDELPHIL' );
+ try
+ SplashScreenServices.AddPluginBitmap('php4Delphi version 7.4',
+ Bmp.Handle, False, 'Registered', '' );
+ finally
+ Bmp.Free;
+ end;
+
+end;
+
+{$ENDIF}
+
+procedure Register;
+begin
+ {$IFDEF VERSION10}
+ RegisterSplashScreen;
+ {$ENDIF}
+ RegisterComponents('PHP', [TPHPEngine]);
+ RegisterComponents('PHP', [TpsvPHP]);
+ RegisterComponents('PHP', [TPHPLibrary]);
+ RegisterComponents('PHP', [TPHPClass]);
+ RegisterComponents('PHP', [TPHPSystemLibrary]);
+ RegisterPropertyEditor(TypeInfo(String), TpsvPHP, 'FileName', TScriptFileProperty);
+ RegisterPropertyEditor(TypeInfo(TPHPAboutInfo), TPHPComponent, 'About', TPHPVersionEditor);
+ RegisterPropertyEditor(TypeInfo(TPHPAboutInfo), TCustomPHPExtension, 'About', TphpVersionEditor);
+ RegisterComponentEditor(TPHPExtension, TpsvPHPEditor);
+ RegisterComponentEditor(TPHPLibrary, TpsvPHPEditor);
+end;
+
+
+procedure TScriptFileProperty.Edit;
+var
+ MPFileOpen: TOpenDialog;
+begin
+ MPFileOpen := TOpenDialog.Create(Application);
+ MPFileOpen.Filename := GetValue;
+ MPFileOpen.Filter := 'PHP Script (*.php)|*.php';
+ MPFileOpen.Options := MPFileOpen.Options + [ofPathMustExist,
+ ofFileMustExist];
+ try
+ if MPFileOpen.Execute then SetValue(MPFileOpen.Filename);
+ finally
+ MPFileOpen.Free;
+ end;
+end;
+
+function TScriptFileProperty.GetAttributes: TPropertyAttributes;
+begin
+ Result := [paDialog];
+end;
+
+{$IFDEF VERSION6}
+procedure TpsvPHPEditor.EditProperty(const Prop: IProperty; var Continue: Boolean);
+var
+ PropName: string;
+begin
+ PropName := Prop.GetName;
+ if (CompareText(PropName, 'FUNCTIONS') = 0) then
+ begin
+ Prop.Edit;
+ Continue := False;
+ end;
+end;
+
+{$ELSE}
+procedure TpsvPHPEditor.EditProperty(PropertyEditor: TPropertyEditor;
+ var Continue,
+ FreeEditor: boolean);
+var
+ PropName: string;
+begin
+ PropName := PropertyEditor.GetName;
+ if (CompareText(PropName, 'FUNCTIONS') = 0) then
+ begin
+ PropertyEditor.Edit;
+ Continue := False;
+ end;
+end;
+{$ENDIF}
+
+procedure TpsvPHPEditor.Edit;
+begin
+ inherited;
+end;
+
+procedure TpsvPHPEditor.ExecuteVerb(Index: integer);
+begin
+ case Index of
+ 0:
+ begin
+ Edit;
+ Designer.Modified;
+ end;
+ 1: ShellExecute(0, 'open', 'http://www.php.net', nil, nil, SW_SHOW);
+ 2: ShellExecute(0, 'open', 'http://users.telenet.be/ws36637', nil, nil, SW_SHOW);
+ end;
+end;
+
+function TpsvPHPEditor.GetVerb(Index: integer): string;
+begin
+ case Index of
+ 0: Result := 'Edit PHP Functions...';
+ 1: Result := 'PHP Home Page';
+ 2: Result := 'PHP4Delphi Home Page';
+ end;
+end;
+
+function TpsvPHPEditor.GetVerbCount: integer;
+begin
+ Result := 3;
+end;
+
+{ TINIFolderProperty }
+
+procedure TINIFolderProperty.Edit;
+var
+ BrowseInfo: TBrowseInfo;
+ ItemIDList: PItemIDList;
+ ItemSelected : PItemIDList;
+ NameBuffer: array[0..MAX_PATH] of Char;
+ WindowList: Pointer;
+begin
+ itemIDList := nil;
+ FillChar(BrowseInfo, SizeOf(BrowseInfo), 0);
+ BrowseInfo.hwndOwner := Forms.Application.Handle;
+ BrowseInfo.pidlRoot := ItemIDList;
+ BrowseInfo.pszDisplayName := NameBuffer;
+ BrowseInfo.lpszTitle := 'Select folder';
+ BrowseInfo.ulFlags := BIF_RETURNONLYFSDIRS;
+ WindowList := DisableTaskWindows(0);
+ try
+ ItemSelected := SHBrowseForFolder(BrowseInfo);
+ finally
+ EnableTaskWindows(WindowList);
+ end;
+ if (ItemSelected <> nil) then
+ begin
+ SHGetPathFromIDList(ItemSelected,NameBuffer);
+ SetValue(NameBuffer);
+ end;
+end;
+
+function TINIFolderProperty.GetAttributes: TPropertyAttributes;
+begin
+ Result := [paDialog];
+end;
+
end.
\ No newline at end of file
diff --git a/Source/php4DelphiSplash.res b/Source/php4DelphiSplash.res
new file mode 100644
index 0000000..b045de3
Binary files /dev/null and b/Source/php4DelphiSplash.res differ
diff --git a/php4DelphiWeb.pas b/Source/php4DelphiWeb.pas
similarity index 89%
rename from php4DelphiWeb.pas
rename to Source/php4DelphiWeb.pas
index 1b47465..c24a2cf 100644
--- a/php4DelphiWeb.pas
+++ b/Source/php4DelphiWeb.pas
@@ -1,83 +1,84 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: php4DelphiWeb.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit php4DelphiWeb;
-
-interface
-
-uses
- Windows, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
-
-type
- Tphp4DelphiWeb = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
- public
- function GetMenuText: string;
- function GetIDString: string;
- function GetName: string;
- function GetState: TWizardState;
- procedure Execute;
- end;
-
-procedure Register;
-
-implementation
-
-procedure Register;
-begin
- RegisterPackageWizard(Tphp4DelphiWeb.Create as IOTAWizard);
-end;
-
-procedure InitExpert;
-begin
- { stubbed out }
-end;
-
-procedure DoneExpert;
-begin
- { stubbed out }
-end;
-
-{ Tphp4DelphiWeb }
-
-procedure Tphp4DelphiWeb.Execute;
-begin
- ShellExecute(0, 'open', 'http://users.chello.be/ws36637', nil, nil, SW_SHOW);
-end;
-
-function Tphp4DelphiWeb.GetIDString: string;
-begin
- Result := 'Perevoznyk.Tphp4DelphiWeb';
-end;
-
-function Tphp4DelphiWeb.GetMenuText: string;
-begin
- Result := 'PHP4Delphi Home Page';
-end;
-
-function Tphp4DelphiWeb.GetName: string;
-begin
- Result := 'Tphp4DelphiWeb';
-end;
-
-function Tphp4DelphiWeb.GetState: TWizardState;
-begin
- Result := [wsEnabled];
-end;
-
-initialization
- InitExpert;
-
-finalization
- DoneExpert;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: php4DelphiWeb.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit php4DelphiWeb;
+
+interface
+
+uses
+ Windows, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
+
+type
+ Tphp4DelphiWeb = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
+ public
+ function GetMenuText: string;
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+ end;
+
+procedure Register;
+
+implementation
+
+procedure Register;
+begin
+ RegisterPackageWizard(Tphp4DelphiWeb.Create as IOTAWizard);
+end;
+
+procedure InitExpert;
+begin
+ { stubbed out }
+end;
+
+procedure DoneExpert;
+begin
+ { stubbed out }
+end;
+
+{ Tphp4DelphiWeb }
+
+procedure Tphp4DelphiWeb.Execute;
+begin
+ ShellExecute(0, 'open', 'http://users.chello.be/ws36637', nil, nil, SW_SHOW);
+end;
+
+function Tphp4DelphiWeb.GetIDString: string;
+begin
+ Result := 'Perevoznyk.Tphp4DelphiWeb';
+end;
+
+function Tphp4DelphiWeb.GetMenuText: string;
+begin
+ Result := 'PHP4Delphi Home Page';
+end;
+
+function Tphp4DelphiWeb.GetName: string;
+begin
+ Result := 'Tphp4DelphiWeb';
+end;
+
+function Tphp4DelphiWeb.GetState: TWizardState;
+begin
+ Result := [wsEnabled];
+end;
+
+initialization
+ InitExpert;
+
+finalization
+ DoneExpert;
+
+end.
diff --git a/php4delphi.dcr b/Source/php4delphi.dcr
similarity index 79%
rename from php4delphi.dcr
rename to Source/php4delphi.dcr
index eada9ad..1c9e6a8 100644
Binary files a/php4delphi.dcr and b/Source/php4delphi.dcr differ
diff --git a/Source/php4delphi.pas b/Source/php4delphi.pas
new file mode 100644
index 0000000..e3381b0
--- /dev/null
+++ b/Source/php4delphi.pas
@@ -0,0 +1,2065 @@
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Developers: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ }
+{ Toby Allen (Documentation) }
+{ tobyphp@toflidium.com }
+{ }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+{ $Id: php4delphi.pas,v 7.4 02/2019 delphi32 Exp $ }
+
+// Important:
+// Please check PHP version you are using and change php.inc file
+// See php.inc for more details
+
+{
+You can download the latest version of PHP from
+http://www.php.net/downloads.php
+You have to download and install PHP separately.
+It is not included in the package.
+
+For more information on the PHP Group and the PHP project,
+please see .
+}
+unit php4delphi;
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$if CompilerVersion > 21}
+ System.Types,
+ {$else}
+ Types,
+ {$ifend}
+ Classes,
+ {$if defined(REGISTER_COLOURS) or defined(php_side_handler)}
+
+ {$if defined(LCL) or (defined(VCL) and (CompilerVersion < 22))}
+ Graphics,
+ {$ifdef php_side_handler}
+ Dialogs,
+ {$endif}
+{$elseif defined(KYLIX)}
+ QGraphics,
+ {$ifdef php_side_handler}
+ QDialogs,
+ {$endif}
+{$elseif defined(FMX)}
+ FMX.GraphConsts,
+ {$ifdef php_side_handler}
+ FMX.Dialogs,
+ {$endif}
+{$elseif defined(VCL)}
+ VCL.Graphics,
+ {$ifdef php_side_handler}
+ VCL.Dialogs,
+ {$endif}
+{$ifend}
+ {$ifend}
+ PHPCommon,
+ {$if CompilerVersion > 21}
+ WinApi.WinSock,
+ {$else}
+ WinSock,
+ {$ifend}
+
+ ZendTypes, PHPTypes, PHPAPI, ZENDAPI,
+ DelphiFunctions, phpFunctions, strUtils, varUtils
+ {$IFDEF PHP_UNICODE}, WideStrUtils{$ENDIF}
+ {$if CompilerVersion > 21}
+ , System.UITypes
+ {$ifend};
+
+type
+
+ IPHPEngine = interface (IUnknown)
+ ['{484AE2CA-755A-437C-9B60-E3735973D0A9}']
+ procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer);
+ function GetEngineActive : boolean;
+ end;
+ TPHPMemoryStream = class(TMemoryStream)
+ public
+ constructor Create;
+ procedure SetInitialSize(ASize : integer);
+ end;
+ {-- PHP Events --}
+ TPHPLogMessage = procedure (Sender : TObject; AText : zend_ustr) of object;
+ TPHPErrorEvent = procedure (Sender: TObject; AText: zend_ustr;
+ AType: integer; AFileName: zend_ustr; ALineNo: integer) of object;
+ TPHPReadPostEvent = procedure(Sender : TObject; Stream : TStream) of object;
+ TPHPReadResultEvent = procedure(Sender : TObject; Stream : TStream) of object;
+
+ { TpsvCustomPHP }
+ TpsvCustomPHP = class(TPHPComponent)
+ private
+ FHeaders : TPHPHeaders;
+ FMaxExecutionTime : integer;
+ FExecuteMethod : TPHPExecuteMethod;
+ FSessionActive : boolean;
+ FOnRequestStartup : TNotifyEvent;
+ FOnRequestShutdown : TNotifyEvent;
+ FAfterExecute : TNotifyEvent;
+ FBeforeExecute : TNotifyEvent;
+ FTerminated : boolean;
+ FVariables : TPHPVariables;
+ FBuffer : TPHPMemoryStream;
+ FOnLogMessage : TPHPLogMessage;
+ FOnScriptError : TPHPErrorEvent;
+ FFileName : zend_ustr;
+ {$IFDEF PHP4}
+ FWriterHandle : THandle;
+ FVirtualReadHandle : THandle;
+ FVirtualWriteHandle : THandle;
+ FVirtualCode : zend_ustr;
+ {$ENDIF}
+ FUseDelimiters : boolean;
+ FUseMapping : boolean;
+ FPostStream : TMemoryStream;
+ FOnReadPost : TPHPReadPostEvent;
+ FRequestType : TPHPRequestType;
+ FOnReadResult : TPHPReadResultEvent;
+ FContentType: zend_ustr;
+ FVirtualStream : TStringStream;
+ procedure SetVariables(Value : TPHPVariables);
+ procedure SetHeaders(Value : TPHPHeaders);
+ function GetVariableCount: integer;
+ protected
+
+ procedure ClearBuffer;
+ procedure ClearHeaders;
+ procedure PrepareResult; virtual;
+ procedure PrepareVariables; virtual;
+ function RunTime : boolean;
+ function GetThreadSafeResourceManager : pointer;
+ function CreateVirtualFile(A_code: zend_ustr) : boolean;
+ procedure CloseVirtualFile;
+ {$IFDEF PHP4}
+ property VirtualCode : string read FVirtualCode;
+ {$ENDIF}
+ function GetEngine : IPHPEngine;
+ public
+ TSRMLS_D : pointer;
+ Thread: TThread;
+ {fixed}
+ procedure StartupRequest; virtual;
+ procedure ShutdownRequest; virtual;
+ {/fixed}
+
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ function EngineActive : boolean;
+ function Execute : zend_ustr; overload;
+ function Execute(AFileName : zend_ustr) : zend_ustr; overload;
+ function RunCode(ACode : zend_ustr) : zend_ustr; overload;
+ function RunCode(ACode : TStrings) : string; overload;
+ function VariableByName(AName : zend_ustr) : TPHPVariable;
+ property PostStream : TMemoryStream read FPostStream;
+ property ExecuteMethod : TPHPExecuteMethod read FExecuteMethod write FExecuteMethod default emServer;
+ property FileName : zend_ustr read FFileName write FFileName;
+ property Variables : TPHPVariables read FVariables write SetVariables;
+ property VariableCount : integer read GetVariableCount;
+ property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
+ property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
+ property OnRequestStartup : TNotifyEvent read FOnRequestStartup write FOnRequestStartup;
+ property OnRequestShutdown : TNotifyEvent read FOnRequestShutdown write FOnRequestShutdown;
+ property BeforeExecute : TNotifyEvent read FBeforeExecute write FBeforeExecute;
+ property AfterExecute : TNotifyEvent read FAfterExecute write FAfterExecute;
+ property ThreadSafeResourceManager : pointer read GetThreadSafeResourceManager;
+ property SessionActive : boolean read FSessionActive;
+ property UseDelimiters : boolean read FUseDelimiters write FUseDelimiters default true;
+ property MaxExecutionTime : integer read FMaxExecutionTime write FMaxExecutionTime default 0;
+ property Headers : TPHPHeaders read FHeaders write SetHeaders;
+ property OnReadPost : TPHPReadPostEvent read FOnReadPost write FOnReadPost;
+ property RequestType : TPHPRequestType read FRequestType write FRequestType default prtGet;
+ property ResultBuffer : TPHPMemoryStream read FBuffer;
+ property OnReadResult : TPHPReadResultEvent read FOnReadResult write FOnReadResult;
+ property ContentType : zend_ustr read FContentType write FContentType;
+ end;
+
+ TpsvPHP = class(TpsvCustomPHP)
+ published
+ property About;
+ property FileName;
+ property Variables;
+ property OnLogMessage;
+ property OnScriptError;
+ property OnRequestStartup;
+ property OnRequestShutdown;
+ property OnReadPost;
+ property BeforeExecute;
+ property AfterExecute;
+ property UseDelimiters;
+ property MaxExecutionTime;
+ property RequestType;
+ property OnReadResult;
+ property ContentType;
+ end;
+
+ TCustomPHPLibrary = class(TPHPComponent)
+ private
+ FExecutor : TpsvCustomPHP;
+ FLibraryName : zend_ustr;
+ FFunctions : TPHPFunctions;
+ FLocked: boolean;
+ procedure SetFunctions(const Value : TPHPFunctions);
+ procedure SetExecutor(AValue : TpsvCustomPHP);
+ procedure SetLibraryName(AValue : zend_ustr);
+ protected
+ procedure RegisterLibrary; virtual;
+ procedure UnregisterLibrary; virtual;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure Refresh; virtual;
+ property Executor : TpsvCustomPHP read FExecutor write SetExecutor;
+ property LibraryName : zend_ustr read FLibraryName write SetLibraryName;
+ property Functions : TPHPFunctions read FFunctions write SetFunctions;
+ property Locked : boolean read FLocked write FLocked;
+ end;
+ { TPHPEngine }
+ TPHPEngineInitEvent = procedure(Sender:TObject;TSRMLS_DC:Pointer) of object;
+ TPHPEngine = class(TPHPComponent, IUnknown, IPHPEngine)
+ private
+ FINIPath : zend_ustr;
+ FOnEngineStartup : TNotifyEvent;
+ {$if CompilerVersion > 21}
+ FAddMods : TArray;
+ {$else}
+ FAddMods : array of Pzend_module_entry;
+ {$ifend}
+ FOnEngineShutdown : TNotifyEvent;
+ FEngineActive : boolean;
+ FHandleErrors : boolean;
+ {$IFNDEF PHP540}
+ FSafeMode : boolean;
+ FSafeModeGid : boolean;
+ {$ENDIF}
+ FRegisterGlobals : boolean;
+ FHTMLErrors : boolean;
+ FMaxInputTime : integer;
+ FConstants : TphpConstants;
+ FDLLFolder : zend_ustr;
+ FReportDLLError : boolean;
+ FLock: TRTLCriticalSection;
+ FOnScriptError : TPHPErrorEvent;
+ FOnLogMessage : TPHPLogMessage;
+ FWaitForShutdown : boolean;
+ RegNumFunc : Cardinal;
+ FHash : TStringList;
+ FLibraryModule : Tzend_module_entry;
+ FLibraryEntryTable : array of zend_function_entry;
+ FRequestCount : integer;
+ procedure SetConstants(Value : TPHPConstants);
+ function GetConstantCount: integer;
+ function GetEngineActive : boolean;
+ protected
+ TSRMLS_D : pppointer;
+ procedure StartupPHP; virtual;
+ procedure PrepareEngine; virtual;
+ procedure PrepareIniEntry; virtual;
+ procedure RegisterConstants; virtual;
+ procedure RegisterInternalConstants(TSRMLS_DC : pointer); virtual;
+ procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); virtual;
+ property RequestCount : integer read FRequestCount;
+ procedure HandleError (Sender : TObject; AText : string; AType : Integer; AFileName : string; ALineNo : integer);
+ procedure HandleLogMessage(Sender : TObject; AText : string);
+ procedure RegisterLibrary(ALib : TCustomPHPLibrary);
+ procedure RefreshLibrary;
+ procedure UnlockLibraries;
+ procedure RemoveRequest;
+ procedure AddRequest;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure AddFunction(FN: zend_pchar; Func: Pointer);
+ procedure AddModule(Module_entry: Pzend_module_entry);
+ procedure StartupEngine; virtual;
+ procedure ShutdownEngine; virtual;
+ procedure LockEngine; virtual;
+ procedure UnlockEngine; virtual;
+ procedure PrepareForShutdown; virtual;
+ property EngineActive : boolean read GetEngineActive;
+ property ConstantCount : integer read GetConstantCount;
+ property WaitForShutdown : boolean read FWaitForShutdown;
+ procedure ShutdownAndWaitFor; virtual;
+ property LibraryEntry : Tzend_module_entry read FLibraryModule;
+ published
+ property HandleErrors : boolean read FHandleErrors write FHandleErrors default true;
+ property OnEngineStartup : TNotifyEvent read FOnEngineStartup write FOnEngineStartup;
+ property OnEngineShutdown : TNotifyEvent read FOnEngineShutdown write FOnEngineShutdown;
+ property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
+ property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
+ property IniPath : zend_ustr read FIniPath write FIniPath;
+ {$IFNDEF PHP540}
+ property SafeMode : boolean read FSafeMode write FSafeMode default false;
+ property SafeModeGid : boolean read FSafeModeGid write FSafeModeGid default false;
+ {$ENDIF}
+ property RegisterGlobals : boolean read FRegisterGlobals write FRegisterGlobals default true;
+ property HTMLErrors : boolean read FHTMLErrors write FHTMLErrors default false;
+ property MaxInputTime : integer read FMaxInputTime write FMaxInputTime default 0;
+ property Constants : TPHPConstants read FConstants write SetConstants;
+ property DLLFolder : zend_ustr read FDLLFolder write FDLLFolder;
+ property ReportDLLError : boolean read FReportDLLError write FReportDLLError;
+ end;
+
+ TPHPLibrarian = class
+ private
+ FLibraries : TList;
+ public
+ constructor Create; virtual;
+ destructor Destroy; override;
+ procedure AddLibrary(ALibrary : TCustomPHPLibrary);
+ procedure RemoveLibrary(ALibrary : TCustomPHPLibrary);
+ function Count : integer;
+ function GetLibrary(Index : integer) : TCustomPHPLibrary;
+ property Libraries : TList read FLibraries write FLibraries;
+ end;
+{$IFDEF REGISTER_COLOURS}
+const
+ Colors: array[0..41] of TIdentMapEntry = (
+ (Value: clBlack; Name: 'clBlack'),
+ (Value: clMaroon; Name: 'clMaroon'),
+ (Value: clGreen; Name: 'clGreen'),
+ (Value: clOlive; Name: 'clOlive'),
+ (Value: clNavy; Name: 'clNavy'),
+ (Value: clPurple; Name: 'clPurple'),
+ (Value: clTeal; Name: 'clTeal'),
+ (Value: clGray; Name: 'clGray'),
+ (Value: clSilver; Name: 'clSilver'),
+ (Value: clRed; Name: 'clRed'),
+ (Value: clLime; Name: 'clLime'),
+ (Value: clYellow; Name: 'clYellow'),
+ (Value: clBlue; Name: 'clBlue'),
+ (Value: clFuchsia; Name: 'clFuchsia'),
+ (Value: clAqua; Name: 'clAqua'),
+ (Value: clWhite; Name: 'clWhite'),
+ (Value: clScrollBar; Name: 'clScrollBar'),
+ (Value: clBackground; Name: 'clBackground'),
+ (Value: clActiveCaption; Name: 'clActiveCaption'),
+ (Value: clInactiveCaption; Name: 'clInactiveCaption'),
+ (Value: clMenu; Name: 'clMenu'),
+ (Value: clWindow; Name: 'clWindow'),
+ (Value: clWindowFrame; Name: 'clWindowFrame'),
+ (Value: clMenuText; Name: 'clMenuText'),
+ (Value: clWindowText; Name: 'clWindowText'),
+ (Value: clCaptionText; Name: 'clCaptionText'),
+ (Value: clActiveBorder; Name: 'clActiveBorder'),
+ (Value: clInactiveBorder; Name: 'clInactiveBorder'),
+ (Value: clAppWorkSpace; Name: 'clAppWorkSpace'),
+ (Value: clHighlight; Name: 'clHighlight'),
+ (Value: clHighlightText; Name: 'clHighlightText'),
+ (Value: clBtnFace; Name: 'clBtnFace'),
+ (Value: clBtnShadow; Name: 'clBtnShadow'),
+ (Value: clGrayText; Name: 'clGrayText'),
+ (Value: clBtnText; Name: 'clBtnText'),
+ (Value: clInactiveCaptionText; Name: 'clInactiveCaptionText'),
+ (Value: clBtnHighlight; Name: 'clBtnHighlight'),
+ (Value: cl3DDkShadow; Name: 'cl3DDkShadow'),
+ (Value: cl3DLight; Name: 'cl3DLight'),
+ (Value: clInfoText; Name: 'clInfoText'),
+ (Value: clInfoBk; Name: 'clInfoBk'),
+ (Value: clNone; Name: 'clNone'));
+{$ENDIF}
+var
+ Librarian : TPHPLibrarian = nil;
+ delphi_sapi_module : sapi_module_struct;
+ PHPEngine : TPHPEngine = nil;
+ {$IFDEF php_side_handler}
+ log_handler_php: string;
+ fatal_handler_php: string;
+ phpmd: TpsvPHP;
+ {$ENDIF}
+implementation
+
+function AddSlashes(const S: zend_ustr): zend_ustr;
+begin
+ Result := StringReplace(S, chr(8), '8', [rfReplaceAll]);
+ Result := StringReplace(S, '\', '\\', [rfReplaceAll]);
+ Result := StringReplace(Result, '''', '\''', [rfReplaceAll]);
+ Result := StringReplace(Result, '', '''."<".chr(' + IntToStr(Ord('?')) +
+ ').''', [rfReplaceAll]);
+end;
+
+{ TCustomPHPLibrary }
+
+constructor TCustomPHPLibrary.Create(AOwner: TComponent);
+begin
+ inherited;
+ FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
+ RegisterLibrary;
+end;
+
+destructor TCustomPHPLibrary.Destroy;
+begin
+ UnregisterLibrary;
+ FFunctions.Free;
+ FFunctions := nil;
+ inherited;
+end;
+
+procedure TCustomPHPLibrary.Refresh;
+begin
+end;
+
+
+procedure TCustomPHPLibrary.RegisterLibrary;
+begin
+ if Assigned(Librarian) then
+ Librarian.AddLibrary(Self);
+end;
+
+procedure TCustomPHPLibrary.SetExecutor(AValue: TpsvCustomPHP);
+begin
+ if FExecutor <> AValue then
+ begin
+ if Assigned(FExecutor) then
+ UnregisterLibrary;
+ FExecutor := AValue; //Peter Enz
+ if AValue <> nil then
+ begin
+ Avalue.FreeNotification(Self);
+ RegisterLibrary;
+ end;
+ end;
+end;
+
+procedure TCustomPHPLibrary.SetFunctions(const Value: TPHPFunctions);
+begin
+ FFunctions.Assign(Value);
+end;
+
+procedure TCustomPHPLibrary.SetLibraryName(AValue: zend_ustr);
+begin
+ if FLibraryName <> AValue then
+ begin
+ FLibraryName := AValue;
+ end;
+end;
+
+procedure TCustomPHPLibrary.UnregisterLibrary;
+begin
+ if Assigned(Librarian) then
+ Librarian.RemoveLibrary(Self);
+end;
+
+
+procedure InitLibrarian;
+begin
+ Librarian := TPHPLibrarian.Create;
+end;
+
+procedure UninitLibrarian;
+begin
+ if Assigned(Librarian) then
+ try
+ Librarian.Free;
+ finally
+ Librarian := nil;
+ end;
+end;
+
+{ TPHPLibrarian }
+
+procedure TPHPLibrarian.AddLibrary(ALibrary: TCustomPHPLibrary);
+begin
+ if FLibraries.IndexOf(ALibrary) = -1 then
+ FLibraries.Add(ALibrary);
+end;
+
+function TPHPLibrarian.Count: integer;
+begin
+ Result := FLibraries.Count;
+end;
+
+constructor TPHPLibrarian.Create;
+begin
+ inherited;
+ FLibraries := TList.Create;
+end;
+
+destructor TPHPLibrarian.Destroy;
+begin
+ FLibraries.Free;
+ inherited;
+end;
+
+function TPHPLibrarian.GetLibrary(Index: integer): TCustomPHPLibrary;
+begin
+ Result := TCustomPHPLibrary(FLibraries[Index]);
+end;
+
+procedure TPHPLibrarian.RemoveLibrary(ALibrary: TCustomPHPLibrary);
+begin
+ FLibraries.Remove(ALibrary);
+end;
+{ TPHPMemoryStream }
+
+constructor TPHPMemoryStream.Create;
+begin
+ inherited;
+end;
+
+procedure TPHPMemoryStream.SetInitialSize(ASize: integer);
+begin
+ Capacity := ASize;
+end;
+{ Startup functions }
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterInternalClasses(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{Request initialization}
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+{Request shutdown}
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+{$IFDEF PHP5}
+
+{PHP 5 only}
+function delphi_stream_reader (handle : pointer; buf : zend_pchar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS = nil then
+ result := 0
+ else
+ try
+ result := MS.Read(buf^, len);
+ except
+ result := 0;
+ end;
+end;
+
+{PHP 5 only}
+procedure delphi_stream_closer(handle : pointer; TSRMLS_DC : pointer); cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ MS.Clear;
+ except
+ end;
+end;
+
+{$IFDEF PHP530}
+function delphi_stream_fsizer(handle : pointer; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ELSE}
+{$IFDEF PHP510}
+
+{ PHP 5.10 and higher }
+function delphi_stream_teller(handle : pointer; TSRMLS_DC : pointer) : longint; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ENDIF}
+{$ENDIF}
+{$ENDIF}
+{ PHP Info functions }
+procedure php_info_library(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
+begin
+end;
+
+function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function php_delphi_deactivate(p : pointer) : integer; cdecl;
+begin
+ result := SUCCESS;
+end;
+
+procedure php_delphi_flush(p : pointer); cdecl;
+begin
+end;
+
+function php_delphi_ub_write(str : pointer; len : uint; p : pointer) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+begin
+ Result := 0;
+ gl := GetSAPIGlobals;
+ if Assigned(gl) then
+ begin
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(php) then
+ begin
+ try
+ result := php.FBuffer.Write(str^, len);
+ except
+ end;
+ end;
+ end;
+end;
+function php_delphi_header_handler(sapi_header : psapi_header_struct; sapi_headers : psapi_headers_struct; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SAPI_HEADER_ADD;
+end;
+function php_delphi_send_header(p1, TSRMLS_DC : pointer) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+begin
+ gl := GetSAPIGlobals;
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(p1) and Assigned(php) then
+ begin
+ with php.Headers.Add do
+ Header := String(Psapi_header_struct(p1)^.header);
+ end;
+ Result := SAPI_HEADER_SENT_SUCCESSFULLY;
+end;
+
+function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
+begin
+ result := nil;
+end;
+function php_delphi_read_post(buf : zend_pchar; len : uint; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ gl : psapi_globals_struct;
+ php : TpsvPHP;
+begin
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ php := TpsvPHP(gl^.server_context);
+
+ if PHP = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ if php.PostStream = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ if php.PostStream.Size = 0 then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ Result := php.PostStream.Read(buf^, len);
+end;
+function GetLocalIP: String;
+const WSVer = $101;
+var
+ wsaData: TWSAData;
+ P: PHostEnt;
+ Buf: array [0..127] of Char;
+begin
+ Result := '';
+ if WSAStartup(WSVer, wsaData) = 0 then begin
+ if GetHostName(@Buf, 128) = 0 then begin
+ P := GetHostByName(@Buf);
+ if P <> nil then Result := iNet_ntoa(PInAddr(p^.h_addr_list^)^);
+ end;
+ WSACleanup;
+ end;
+end;
+
+procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ cnt : integer;
+ varcnt : integer;
+begin
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+
+ php := TpsvPHP(gl^.server_context);
+
+ if PHP = nil then
+ begin
+ Exit;
+ end;
+ php_register_variable('PHP_SELF', '_', nil, p);
+ php_register_variable('REMOTE_ADDR', zend_pchar(GetLocalIP()), val, p);
+ php_register_variable('IP_ADDRESS', zend_pchar(GetLocalIP()), val, p);
+ {if php.RequestType = prtPost then
+ php_register_variable('REQUEST_METHOD', 'POST', val, p)
+ else
+ php_register_variable('REQUEST_METHOD', 'GET', val, p);}
+
+ varcnt := PHP.Variables.Count;
+ if varcnt > 0 then
+ begin
+ for cnt := 0 to varcnt - 1 do
+ begin
+ php_register_variable(zend_pchar(php.Variables[cnt].Name),
+ zend_pchar(php.Variables[cnt].Value), val, p);
+ end;
+ end;
+end;
+function wvsprintfA(Output: zend_pchar; Format: zend_pchar; arglist: zend_pchar): Integer; stdcall; external 'user32.dll';
+{$IFDEF PHP4}
+function WriterProc(Parameter : Pointer) : integer;
+var
+ n : integer;
+ php : TpsvCustomPHP;
+ buf : zend_pchar;
+ k : cardinal;
+begin
+ try
+ php := TPsvCustomPHP(Parameter);
+ Buf := zend_pchar(php.FVirtualCode);
+ k := length(php.FVirtualCode);
+ repeat
+ n := _write(php.FVirtualWriteHandle, Buf, k);
+ if (n <= 0) then
+ break
+ else
+ begin
+ inc(Buf, n);
+ dec(K, n);
+ end;
+ until (n <= 0);
+ Close(php.FVirtualWriteHandle);
+ php.FVirtualWriteHandle := 0;
+ finally
+ Result := 0;
+ ExitThread(0);
+ end;
+end;
+{$ENDIF}
+
+{$IFDEF php_side_handler}
+procedure delphi_error_cb(AType: Integer; const AFname: zend_pchar; const ALineNo: UINT;
+ const AFormat: zend_pchar; args: zend_pchar) cdecl;
+var
+ LText: string;
+ LBuffer: array[0..4096] of zend_uchar;
+ S: zend_ustr;
+begin
+ case AType of
+ E_ERROR: LText := 'FATAL Error in ';
+ E_WARNING: LText := 'Warning in ';
+ E_CORE_ERROR: LText := 'Core Error in ';
+ E_CORE_WARNING: LText := 'Core Warning in ';
+ E_COMPILE_ERROR: LText := 'Compile Error in ';
+ E_COMPILE_WARNING: LText := 'Compile Warning in ';
+ E_USER_ERROR: LText := 'User Error in ';
+ E_USER_WARNING: LText := 'User Warning in ';
+ E_RECOVERABLE_ERROR: LText := 'Recoverable Error in ';
+ E_PARSE: LText := 'Parse Error in ';
+ E_NOTICE: LText := 'Notice in ';
+ E_USER_NOTICE: LText := 'User Notice in ';
+ E_STRICT: LText := 'Strict Error in ';
+ E_CORE: LText := 'Core Error in ';
+ else
+ LText := 'Unknown Error(' + inttostr(AType) + '): ' ;
+ end;
+
+ wvsprintfA(LBuffer, AFormat, args);
+
+ LText := LText + AFname + '(' + inttostr(ALineNo) + '): ' + LBuffer;
+ if (fatal_handler_php <> '') and not(Atype in [E_CORE_ERROR, E_CORE, E_CORE_WARNING]) then
+ begin
+ S := zend_ustr(fatal_handler_php + '(' + IntToStr(integer(AType)) + ',' + '''' +
+ AddSlashes(LBuffer) + ''', ''' + AddSlashes(AFName) + ''', ' +
+ IntToStr(ALineNo) + ');' + ' ?>');
+
+ if not phpmd.UseDelimiters then
+ S := ' ' + S;
+
+ phpmd.RunCode(S);
+ S := '';
+ end
+ else
+ begin
+ case AType of
+ E_WARNING, E_CORE_WARNING, E_COMPILE_WARNING, E_USER_WARNING:
+ MessageDlg(LText, mtWarning, [mbOk], 0)
+ ;
+ E_NOTICE, E_USER_NOTICE:
+ MessageDlg(LText, mtInformation, [mbOk], 0)
+ ;
+
+ else
+ MessageDlg(LText, mtError, [mbOk], 0)
+ end;
+ end;
+end;
+{$ELSE}
+procedure delphi_error_cb(_type : integer; const error_filename : zend_pchar;
+ const error_lineno : uint; const _format : zend_pchar; args : zend_pchar); cdecl;
+var
+ buffer : array[0..1023] of zend_uchar;
+ err_msg : zend_pchar;
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ p : pointer;
+ error_type_str : zend_ustr;
+ err : TPHPErrorType;
+begin
+ wvsprintfa(buffer, _format, args);
+ err_msg := buffer;
+ p := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals(p);
+ php := TpsvPHP(gl^.server_context);
+
+ case _type of
+ E_ERROR : err := etError;
+ E_WARNING : err := etWarning;
+ E_PARSE : err := etParse;
+ E_NOTICE : err := etNotice;
+ E_CORE_ERROR : err := etCoreError;
+ E_CORE_WARNING : err := etCoreWarning;
+ E_COMPILE_ERROR : err := etCompileError;
+ E_COMPILE_WARNING : err := etCompileWarning;
+ E_USER_ERROR : err := etUserError;
+ E_USER_WARNING : err := etUserWarning;
+ E_USER_NOTICE : err := etUserNotice;
+ else
+ err := etUnknown;
+ end;
+
+ if assigned(php) then
+ begin
+ if Assigned(php.OnScriptError) then
+ begin
+ php.OnScriptError(php, Err_Msg, integer(err), error_filename, error_lineno);
+ end
+ else
+ begin
+ case _type of
+ E_ERROR,
+ E_CORE_ERROR,
+ E_COMPILE_ERROR,
+ E_USER_ERROR:
+ error_type_str := 'Fatal error';
+ E_WARNING,
+ E_CORE_WARNING,
+ E_COMPILE_WARNING,
+ E_USER_WARNING :
+ error_type_str := 'Warning';
+ E_PARSE:
+ error_type_str := 'Parse error';
+ E_NOTICE,
+ E_USER_NOTICE:
+ error_type_str := 'Notice';
+ else
+ error_type_str := 'Unknown error';
+ end;
+ {$IFDEF COMPILER_php7pv}
+ ShowMessage(
+ Format
+ ('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno]));
+ {$ELSE}
+ php_log_err(zend_pchar(
+ {$IFDEF PHP_UNICODE}Format{$ELSE}AnsiFormat{$ENDIF}
+ ('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno])), p);
+ {$ENDIF}
+ end;
+ end;
+ if PHPLoaded then
+ _zend_bailout(error_filename, error_lineno);
+end;
+{$ENDIF}
+{$IFDEF php_side_handler}
+function php_delphi_log_message(msg : zend_pchar) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ S: zend_ustr;
+begin
+ Result := 0;
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(PHPEngine) then
+ begin
+ if Assigned(PHPEngine.OnLogMessage) then
+ phpEngine.HandleLogMessage(php, msg)
+ else
+ if log_handler_php <> '' then
+ begin
+ S := zend_ustr(fatal_handler_php + '(' + '''' + AddSlashes(msg) + '''' +
+ ');' + ' ?>');
+
+ if not phpmd.UseDelimiters then
+ S := ' ' + S;
+
+ phpmd.RunCode(S);
+ S := '';
+ end
+ else
+ MessageBoxA(0, MSG, 'PHP4Delphi', MB_OK)
+ end
+ else
+ MessageBoxA(0, msg, 'PHP4Delphi', MB_OK);
+end;
+{$ELSE}
+function php_delphi_log_message(msg : Pchar) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ p : pointer;
+begin
+ p := ts_resource_ex(0, nil);
+ gl := GetSAPIGlobals(p);
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(php) then
+ begin
+ if Assigned(php.OnLogMessage) then
+ php.FOnLogMessage(php, msg)
+ else
+ MessageBox(0, MSG, 'PHP4Delphi', MB_OK)
+ end
+ else
+ MessageBox(0, msg, 'PHP4Delphi', MB_OK);
+ result := 0;
+end;
+{$ENDIF}
+{ Request sender/dispatcher }
+
+{$IFDEF PHP510}
+procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ Lib : IPHPEngine;
+{$IFNDEF PHP510}
+ return_value_ptr : ppzval;
+{$ENDIF}
+begin
+ {$IFNDEF PHP510}
+ return_value_ptr := nil;
+ {$ENDIF}
+ ZVALVAL(return_value);
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(php) then
+ begin
+ try
+ Lib := php.GetEngine;
+ if lib <> nil then
+ Lib.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
+ except
+ ZVALVAL(return_value);
+ end;
+ end;
+end;
+
+{ TpsvCustomPHP }
+
+constructor TpsvCustomPHP.Create(AOwner: TComponent);
+begin
+ inherited;
+ FMaxExecutionTime := 0;
+ FExecuteMethod := emServer;
+ FSessionActive := false;
+ FVariables := TPHPVariables.Create(Self);
+ FHeaders := TPHPHeaders.Create(Self);
+ FUseDelimiters := true;
+ FRequestType := prtGet;
+ FBuffer := TPHPMemoryStream.Create;
+ {$IFDEF PHP4}
+ FVirtualCode := '';
+ {$ELSE}
+ FVirtualStream := TStringStream.Create;
+ {$ENDIF}
+end;
+
+destructor TpsvCustomPHP.Destroy;
+begin
+ FVariables.Free;
+ FHeaders.Free;
+ FSessionActive := False;
+ FBuffer.Free;
+ {$IFDEF PHP4}
+ FVirtualCode := '';
+ {$ELSE}
+ if FVirtualStream <> nil then
+ FreeAndNil(FVirtualStream);
+ {$ENDIF}
+ if Assigned(FPostStream) then
+ FreeAndNil(FPostStream);
+ inherited;
+end;
+
+procedure TpsvCustomPHP.ClearBuffer;
+begin
+ FBuffer.Clear;
+end;
+
+procedure TpsvCustomPHP.ClearHeaders;
+begin
+ FHeaders.Clear;
+end;
+
+
+function TpsvCustomPHP.Execute : zend_ustr;
+var
+ file_handle : zend_file_handle;
+ {$IFDEF PHP4}
+ thread_id : cardinal;
+ {$ENDIF}
+ {$IFDEF PHP5}
+ ZendStream : TZendStream;
+ {$ENDIF}
+begin
+
+ if not EngineActive then
+ begin
+ Result := '';
+ Exit;
+ end;
+
+ if PHPEngine.WaitForShutdown then
+ begin
+ Result := '';
+ Exit;
+ end;
+
+ PHPEngine.AddRequest;
+
+ try
+ ClearHeaders;
+ ClearBuffer;
+
+ if Assigned(FBeforeExecute) then
+ FBeforeExecute(Self);
+
+
+
+ FTerminated := false;
+ if not FUseMapping then
+ begin
+ if not FileExists(FFileName) then
+ raise Exception.CreateFmt('File %s does not exists', [FFileName]);
+ end;
+ StartupRequest;
+
+ ZeroMemory(@file_handle, sizeof(zend_file_handle));
+
+ if FUseMapping then
+ begin
+ {$IFDEF PHP5}
+ ZeroMemory(@ZendStream, sizeof(ZendStream));
+ ZendStream.reader := delphi_stream_reader;
+ ZendStream.closer := delphi_stream_closer;
+ {$IFDEF PHP530}
+ ZendStream.fsizer := delphi_stream_fsizer;
+ {$ELSE}
+ {$IFDEF PHP510}
+ ZendStream.fteller := delphi_stream_teller;
+ {$ENDIF}
+ ZendStream.interactive := 0;
+ {$ENDIF}
+ ZendStream.handle := FVirtualStream;
+
+ file_handle._type := ZEND_HANDLE_STREAM;
+ file_handle.opened_path := nil;
+ file_handle.filename := '-';
+ file_handle.free_filename := 0;
+ file_handle.handle.stream := ZendStream;
+ {$ELSE}
+ {for PHP4 only}
+ file_handle._type := ZEND_HANDLE_FD;
+ file_handle.opened_path := nil;
+ file_handle.filename := '-';
+ file_handle.free_filename := 0;
+ file_handle.handle.fd := FVirtualReadHandle;
+ FWriterHandle := BeginThread(nil, 8192, @WriterProc, Self, 0, thread_id);
+ {$ENDIF}
+ end
+ else
+ begin
+ file_handle._type := ZEND_HANDLE_FILENAME;
+ file_handle.filename := zend_pchar(FFileName);
+ file_handle.opened_path := nil;
+ file_handle.free_filename := 0;
+ end;
+
+ try
+ begin
+ PHPAPI.php_execute_script(@file_handle, TSRMLS_D);
+ end
+ except
+ FBuffer.Clear;
+ try
+ ts_free_thread;
+ except
+
+ end;
+ end;
+
+ PrepareResult;
+
+
+ if Assigned(FAfterExecute) then
+ FAfterExecute(Self);
+
+ //ShutdownRequest;
+
+ FBuffer.Position := 0;
+ if Assigned(FOnReadResult) then
+ begin
+ FOnReadResult(Self, FBuffer);
+ Result := '';
+ end
+ else
+ begin
+ SetLength(Result, FBuffer.Size);
+ FBuffer.Read(Result[1], FBuffer.Size);
+ end;
+ FBuffer.Clear;
+ {$IFDEF PHP4}
+ FVirtualCode := '';
+ {$ENDIF}
+ finally
+ PHPEngine.RemoveRequest;
+ end;
+end;
+
+function TpsvCustomPHP.RunCode(Acode : zend_ustr) : zend_ustr;
+begin
+ if not EngineActive then
+ begin
+ Result := '';
+ Exit;
+ end;
+
+ ClearHeaders;
+ ClearBuffer;
+ FUseMapping := true;
+
+ try
+ if FUseDelimiters then
+ begin
+ if Pos('', ACode) = 0 then
+ ACode := Format(' %s ?>', [ACode]);
+ end;
+ if not CreateVirtualFile(ACode) then
+ begin
+ Result := '';
+ Exit;
+ end;
+ Result := Execute;
+ finally
+ FUseMapping := false;
+ end;
+end;
+
+
+function TpsvCustomPHP.RunCode(ACode: TStrings): string;
+begin
+ if Assigned(ACode) then
+ Result := RunCode(ACode.Text);
+end;
+
+
+procedure TpsvCustomPHP.SetVariables(Value: TPHPVariables);
+begin
+ FVariables.Assign(Value);
+end;
+
+procedure TpsvCustomPHP.SetHeaders(Value : TPHPHeaders);
+begin
+ FHeaders.Assign(Value);
+end;
+
+
+
+function TpsvCustomPHP.Execute(AFileName: zend_ustr): zend_ustr;
+begin
+ FFileName := AFileName;
+ Result := Execute;
+end;
+
+procedure TpsvCustomPHP.PrepareResult;
+var
+ ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ data: ^ppzval;
+ cnt : integer;
+ variable : pzval;
+begin
+ if FVariables.Count = 0 then
+ Exit;
+
+ if FExecuteMethod = emServer then
+ ht := GetSymbolsTable
+ else
+ ht := GetTrackHash('_GET');
+ if Assigned(ht) then
+ begin
+ for cnt := 0 to FVariables.Count - 1 do
+ begin
+ new(data);
+ try
+ if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
+ strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
+ begin
+ variable := data^^;
+ convert_to_string(variable);
+ FVariables[cnt].Value := Z_STRVAL(variable);
+ end;
+ finally
+ freemem(data);
+ end;
+ end;
+ end;
+end;
+
+function TpsvCustomPHP.VariableByName(AName: zend_ustr): TPHPVariable;
+begin
+ Result := FVariables.ByName(AName);
+end;
+
+{Indicates activity of PHP Engine}
+function TpsvCustomPHP.EngineActive : boolean;
+begin
+ if Assigned(PHPEngine) then
+ Result := PHPEngine.EngineActive
+ else
+ Result := false;
+end;
+
+procedure TpsvCustomPHP.StartupRequest;
+var
+ gl : psapi_globals_struct;
+ TimeStr : string;
+begin
+ if not EngineActive then
+ raise EDelphiErrorEx.Create('PHP engine is not active ');
+
+ if FSessionActive then
+ Exit;
+
+ TSRMLS_D := tsrmls_fetch;
+
+ gl := GetSAPIGlobals;
+ gl^.server_context := Self;
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- RegisterGlobals');
+ if PHPEngine.RegisterGlobals then
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- Try');
+ try
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- FOnReadPost');
+ if Assigned(FOnReadPost) then
+ FOnReadPost(Self, FPostStream);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- zend_alter_ini_entry');
+ zend_alter_ini_entry('max_execution_time', 19, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- php_request_startup');
+ php_request_startup(TSRMLS_D);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- FOnRequestStartup');
+ if Assigned(FOnRequestStartup) then
+ FOnRequestStartup(Self);
+ //ShowMessage('TpsvCustomPHP.StartupRequest --');
+ FSessionActive := true;
+ except
+ FSessionActive := false;
+ end;
+end;
+
+function TpsvCustomPHP.RunTime: boolean;
+begin
+ Result := not (csDesigning in ComponentState);
+end;
+
+function TpsvCustomPHP.GetThreadSafeResourceManager: pointer;
+begin
+ Result := TSRMLS_D;
+end;
+
+function TpsvCustomPHP.GetVariableCount: integer;
+begin
+ Result := FVariables.Count;
+end;
+
+
+procedure TpsvCustomPHP.ShutdownRequest;
+var
+ gl : psapi_globals_struct;
+begin
+ if not FSessionActive then
+ Exit;
+ try
+
+ if not FTerminated then
+ begin
+ try
+ php_request_shutdown(nil);
+ except
+ end;
+ gl := GetSAPIGlobals;
+ gl^.server_context := nil;
+ end;
+
+
+ if Assigned(FOnRequestShutdown) then
+ FOnRequestShutdown(Self);
+
+ finally
+ FSessionActive := false;
+ end;
+
+end;
+
+procedure TpsvCustomPHP.PrepareVariables;
+var
+ ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ data: ^ppzval;
+ cnt : integer;
+ {$IFDEF PHP5}
+ EG : pzend_executor_globals;
+ {$ENDIF}
+begin
+ {$IFDEF PHP4}
+ ht := GetSymbolsTable;
+ {$ELSE}
+ begin
+ EG := GetExecutorGlobals;
+ if Assigned(EG) then
+ ht := @EG.symbol_table
+ else
+ ht := nil;
+ end;
+ {$ENDIF}
+
+ if Assigned(ht) then
+ begin
+ for cnt := 0 to FVariables.Count - 1 do
+ begin
+ new(data);
+ try
+ if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
+ strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
+ begin
+ {$IFDEF PHP7}
+ if (data^^^.u1.v._type = IS_STRING) then
+ {$ELSE}
+ if (data^^^._type = IS_STRING) then
+ {$ENDIF}
+ begin
+ efree(data^^^.value.str.val);
+ ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
+ end
+ else
+ begin
+ ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
+ end;
+ end;
+ finally
+ freemem(data);
+ end;
+ end;
+ end;
+end;
+
+procedure TpsvCustomPHP.CloseVirtualFile;
+begin
+ {$IFDEF PHP4}
+ if FWriterHandle <> 0 then
+ begin
+ WaitForSingleObject(FWriterHandle, INFINITE);
+ CloseHandle(FWriterHandle);
+ FWriterHandle := 0;
+ end;
+ {$ELSE}
+ FVirtualStream.Clear;
+ {$ENDIF}
+end;
+
+function TpsvCustomPHP.CreateVirtualFile(A_code : zend_ustr): boolean;
+var
+{$IFDEF PHP4}
+_handles : array[0..1] of THandle;
+{$ENDIF}
+sc:PUTF8Char;
+begin
+
+ Result := false;
+ {$IFDEF PHP4}
+ if ACode = '' then
+ begin
+ FVirtualReadHandle := 0;
+ FVirtualWriteHandle := 0;
+ Exit; {empty buffer was provided}
+ end;
+
+ FVirtualCode := A_code;
+
+ if pipe(@_handles, 4096, 0) = -1 then
+ begin
+ FVirtualReadHandle := 0;
+ FVirtualWriteHandle := 0;
+ FVirtualCode := '';
+ Exit;
+ end;
+
+ FVirtualReadHandle := _handles[0];
+ FVirtualWriteHandle := _handles[1];
+ Result := true;
+ {$ELSE}
+ if A_code = '' then
+ Exit;
+ try
+ FVirtualStream.Clear;
+ FVirtualStream.WriteString(A_code);
+ FVirtualStream.Seek(0, TSeekOrigin.soBeginning);
+ finally
+ Result := True;
+ end;
+ {$ENDIF}
+end;
+
+
+function TpsvCustomPHP.GetEngine: IPHPEngine;
+begin
+ Result := PHPEngine;
+end;
+
+{ TPHPEngine }
+
+
+constructor TPHPEngine.Create(AOwner: TComponent);
+begin
+ inherited;
+ if Assigned(PHPEngine) then
+ raise Exception.Create('Only one instance of PHP engine per application');
+ FEngineActive := false;
+ FHandleErrors := true;
+ {$IFNDEF PHP540}
+ FSafeMode := false;
+ FSafeModeGid := false;
+ {$ENDIF}
+ FRegisterGlobals := true;
+ FHTMLErrors := false;
+ FMaxInputTime := 0;
+ FWaitForShutdown := false;
+ FConstants := TPHPConstants.Create(Self);
+ FRequestCount := 0;
+ FHash := TStringList.Create;
+ FHash.Duplicates := dupError;
+ FHash.Sorted := true;
+ InitializeCriticalSection(FLock);
+ PHPEngine := Self;
+
+end;
+
+destructor TPHPEngine.Destroy;
+begin
+ ShutdownAndWaitFor;
+ FEngineActive := false;
+ FConstants.Free;
+ FHash.Free;
+ DeleteCriticalSection(FLock);
+ if (PHPEngine = Self) then
+ PHPEngine := nil;
+ inherited;
+ if PHPLoaded then
+ UnloadPHP;
+end;
+
+function TPHPEngine.GetConstantCount: integer;
+begin
+ Result := FConstants.Count;
+end;
+{
+procedure log(i:String);
+var f:TextFile;
+begin
+ AssignFile(f, 'log.txt');
+ Append(f);
+ Write(f, #10 + #13 + i);
+ CloseFile(f);
+end;
+}
+procedure TPHPEngine.HandleRequest(ht: integer; return_value: pzval;
+ return_value_ptr: ppzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer);
+
+var
+ Params : pzval_array;
+ AFunction : TPHPFunction;
+ j : integer;
+ FActiveFunctionName : string;
+ FunctionIndex : integer;
+ FZendVar : TZendVariable;
+ FParameters : TFunctionParams;
+ ReturnValue : variant;
+begin
+ FParameters := TFunctionParams.Create(nil, TFunctionParam);
+
+ if ht > 0 then
+ begin
+ if ( not (zend_get_parameters_my(ht, Params, TSRMLS_DC) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ end;
+
+ FActiveFunctionName := get_active_function_name(TSRMLS_DC);
+ if FHash.Find(FActiveFunctionName, FunctionIndex) then
+ AFunction := TPHPFunction(FHash.Objects[FunctionIndex])
+ else
+ AFunction := nil;
+
+ if Assigned(AFunction) then
+ begin
+ if AFunction.Collection = nil then
+ Exit; {library was destroyed}
+
+ if Assigned(AFunction.OnExecute) then
+ begin
+ if AFunction.Parameters.Count <> ht then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ FParameters.Assign(AFunction.Parameters);
+ if ht > 0 then
+ begin
+ for j := 0 to ht - 1 do
+ begin
+ if not IsParamTypeCorrect(FParameters[j].ParamType, Params[j]^) then
+ begin
+ zend_error(E_WARNING, zend_pchar(
+ {$IFDEF PHP_UNICODE}Format{$ELSE}AnsiFormat{$ENDIF}
+ ('Wrong parameter type for %s()', [FActiveFunctionName])));
+ Exit;
+ end;
+ FParameters[j].ZendValue := (Params[j]^);
+ end;
+ end; { if ht > 0}
+ //log(FActiveFunctionName);
+ FZendVar := TZendVariable.Create;
+ FZendVar.AsZendVariable := return_value;
+ AFunction.OnExecute(Self, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
+ if Assigned(FZendVar) then
+ begin
+ if FZendVar.ISNull then {perform variant conversion}
+ VariantToZend(ReturnValue, return_value);
+ FZendVar.Free;
+ end
+ else
+ VariantToZend(ReturnValue, return_value);
+ end; {if assigned AFunction.OnExecute}
+ end;
+ FParameters.Free;
+ dispose_pzval_array(Params);
+end;
+
+procedure TPHPEngine.PrepareIniEntry;
+var
+ p, p2 : pointer;
+ TimeStr : string;
+begin
+ if not PHPLoaded then
+ Exit;
+
+ if FHandleErrors then
+ begin
+ HFunc(@delphi_error_cb, 'zend_error_cb');
+ end;
+ {$IFNDEF PHP540}
+ if FSafeMode then
+ zend_alter_ini_entry('safe_mode', 10, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
+ else
+ {$ENDIF}
+ zend_alter_ini_entry('safe_mode', 10, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
+ {$IFNDEF PHP540}
+ if FSafeModeGID then
+ zend_alter_ini_entry('safe_mode_gid', 14, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
+ else
+ {$ENDIF}
+ zend_alter_ini_entry('safe_mode_gid', 14, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
+
+ zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ if FRegisterGlobals then
+ zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
+ else
+ zend_alter_ini_entry('register_globals', 17, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ if FHTMLErrors then
+ zend_alter_ini_entry('html_errors', 12, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
+ else
+ zend_alter_ini_entry('html_errors', 12, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ TimeStr := IntToStr(FMaxInputTime);
+ zend_alter_ini_entry('max_input_time', 15, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+end;
+
+procedure TPHPEngine.PrepareEngine;
+begin
+ delphi_sapi_module.name := 'embed'; {to solve a problem with dl()}
+ delphi_sapi_module.pretty_name := 'PHP for Delphi';
+ delphi_sapi_module.startup := php_delphi_startup;
+ delphi_sapi_module.shutdown := nil; //php_module_shutdown_wrapper;
+ delphi_sapi_module.activate:= nil;
+ delphi_sapi_module.deactivate := @php_delphi_deactivate;
+ delphi_sapi_module.ub_write := @php_delphi_ub_write;
+ delphi_sapi_module.flush := @php_delphi_flush;
+ delphi_sapi_module.stat:= nil;
+ delphi_sapi_module.getenv:= nil;
+ delphi_sapi_module.sapi_error := @zend_error;
+ delphi_sapi_module.header_handler := @php_delphi_header_handler;
+ delphi_sapi_module.send_headers := nil;
+ delphi_sapi_module.send_header := @php_delphi_send_header;
+ delphi_sapi_module.read_post := @php_delphi_read_post;
+ delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
+ delphi_sapi_module.register_server_variables := @php_delphi_register_variables;
+ delphi_sapi_module.log_message := @php_delphi_log_message;
+ if FIniPath <> '' then
+ delphi_sapi_module.php_ini_path_override := zend_pchar(FIniPath)
+ else
+ delphi_sapi_module.php_ini_path_override := nil;
+ delphi_sapi_module.block_interruptions := nil;
+ delphi_sapi_module.unblock_interruptions := nil;
+ delphi_sapi_module.default_post_reader := nil;
+ delphi_sapi_module.treat_data := nil;
+ delphi_sapi_module.executable_location := nil;
+ delphi_sapi_module.php_ini_ignore := 0;
+
+ FLibraryModule.size := sizeOf(Tzend_module_entry);
+ FLibraryModule.zend_api := ZEND_MODULE_API_NO;
+ {$IFDEF PHP_DEBUG}
+ FLibraryModule.zend_debug := 1;
+ {$ELSE}
+ FLibraryModule.zend_debug := 0;
+ {$ENDIF}
+ FLibraryModule.zts := USING_ZTS;
+ FLibraryModule.name := 'php4delphi_internal';
+ FLibraryModule.functions := nil;
+ FLibraryModule.module_startup_func := @minit;
+ FLibraryModule.module_shutdown_func := @mshutdown;
+ FLibraryModule.info_func := @php_info_library;
+
+ FLibraryModule.request_shutdown_func := @rshutdown;
+ FLibraryModule.request_startup_func := @rinit;
+ {$if defined(PHP5) and not defined(PHP520)}
+ FLibraryModule.global_id := 0;
+ {$ifend}
+
+ FLibraryModule.module_started := 0;
+ FLibraryModule._type := MODULE_PERSISTENT;
+
+ FLibraryModule.Handle := nil;
+ FLibraryModule.module_number := 0;
+ {$ifdef PHP530}
+ {$ifndef COMPILER_VC9}
+ FLibraryModule.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$else}
+ FLibraryModule.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$endif}
+ {$endif}
+end;
+
+procedure TPHPEngine.RegisterConstants;
+var
+ cnt : integer;
+ ConstantName : zend_ustr;
+ ConstantValue : zend_ustr;
+begin
+ for cnt := 0 to FConstants.Count - 1 do
+ begin
+ ConstantName := FConstants[cnt].Name;
+ ConstantValue := FConstants[cnt].Value;
+ zend_register_string_constant(zend_pchar(ConstantName),
+ strlen(zend_pchar(ConstantName)) + 1,
+ zend_pchar(ConstantValue), CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
+ end;
+ zend_register_bool_constant( zend_pchar('UTF8_SUPPORT'), 13, {$IFDEF PHP_UNICODE}TRUE{$ELSE}FALSE{$ENDIF},
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
+ RegisterInternalConstants(TSRMLS_D);
+end;
+
+procedure TPHPEngine.RegisterInternalConstants(TSRMLS_DC: pointer);
+{$IFDEF REGISTER_COLOURS}
+var
+ i : integer;
+ ColorName : zend_ustr;
+{$ENDIF}
+begin
+ {$IFDEF REGISTER_COLOURS}
+ for I := Low(Colors) to High(Colors) do
+ begin
+ ColorName := zend_ustr(Colors[i].Name);
+ zend_register_long_constant( zend_pchar(ColorName), strlen(zend_pchar(ColorName)) + 1, Colors[i].Value,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ end;
+ {$ENDIF}
+end;
+
+
+procedure TPHPEngine.SetConstants(Value: TPHPConstants);
+begin
+ FConstants.Assign(Value);
+end;
+
+procedure TPHPEngine.ShutdownEngine;
+begin
+
+ if PHPEngine <> Self then
+ raise EDelphiErrorEx.Create('Only active engine can be stopped');
+
+
+ if not FEngineActive then
+ Exit;
+
+ try
+
+ if @delphi_sapi_module.shutdown <> nil then
+ delphi_sapi_module.shutdown(@delphi_sapi_module);
+ sapi_shutdown;
+ {Shutdown PHP thread safe resource manager}
+ if Assigned(FOnEngineShutdown) then
+ FOnEngineShutdown(Self);
+ {$IF not Defined(PHP550) and not Defined(PHP560)}
+ try
+ tsrm_shutdown();
+ except
+
+ end;
+ {$ifend}
+ FHash.Clear;
+ finally
+ FEngineActive := false;
+ FWaitForShutdown := False;
+ end;
+end;
+
+procedure TPHPEngine.RegisterLibrary(ALib : TCustomPHPLibrary);
+var
+ cnt : integer;
+ skip : boolean;
+ FN : zend_ustr;
+begin
+ skip := false;
+ ALib.Refresh;
+
+ {No functions defined, skip this library}
+ if ALib.Functions.Count = 0 then
+ Exit;
+
+ for cnt := 0 to ALib.Functions.Count - 1 do
+ begin
+ FN :=
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
+ (ALib.Functions[cnt].FunctionName);
+ if FHash.IndexOf(FN) > -1 then
+ begin
+ skip := true;
+ break;
+ end;
+ end;
+
+ if not skip then
+ begin
+ for cnt := 0 to ALib.Functions.Count - 1 do
+ begin
+ FN := {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
+ (ALib.Functions[cnt].FunctionName);
+ FHash.AddObject(FN, ALib.Functions[cnt]);
+ end;
+ ALib.Locked := true;
+ end;
+end;
+
+procedure TPHPEngine.StartupEngine;
+var
+ i : integer;
+ x: Pzend_module_entry;
+begin
+ if PHPEngine <> Self then
+ begin
+ raise EDelphiErrorEx.Create('Only one PHP engine can be activated');
+ end;
+
+ if FEngineActive then
+ raise EDelphiErrorEx.Create('PHP engine already active');
+
+ StartupPHP;
+ PrepareEngine;
+// ini := GetExecutorGlobals.ini_directives;
+
+
+
+ if not PHPLoaded then //Peter Enz
+ begin
+ raise EDelphiErrorEx.Create('PHP engine is not loaded');
+ end;
+
+ try
+ FHash.Clear;
+
+ for i := 0 to Librarian.Count -1 do
+ begin
+ RegisterLibrary(Librarian.GetLibrary(I));
+ end;
+
+
+ //Start PHP thread safe resource manager
+ tsrm_startup(128, 1, 0 , nil);
+
+ sapi_startup(@delphi_sapi_module);
+
+ RefreshLibrary;
+
+ php_module_startup(@delphi_sapi_module, @FLibraryModule, 1);
+
+ TSRMLS_D := ts_resource_ex(0, nil);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ zend_register_module_ex(x, TSRMLS_D);
+ zend_startup_module_ex(x, TSRMLS_D);
+ end;
+
+
+ PrepareIniEntry;
+ RegisterConstants;
+
+ if Assigned(FOnEngineStartup) then
+ FOnEngineStartup(Self);
+
+ FEngineActive := true;
+ except
+ FEngineActive := false;
+ end;
+end;
+
+procedure TPHPEngine.StartupPHP;
+var
+ DLLName : string;
+begin
+ if not PHPLoaded then
+ begin
+ if FDLLFolder <> '' then
+ DLLName := IncludeTrailingBackSlash(FDLLFolder) + PHPlp
+ else
+ DLLName := PHPlp;
+ LoadPHP(DLLName);
+ if FReportDLLError then
+ begin
+ if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllName]);
+ end;
+ end;
+end;
+
+procedure TPHPEngine.LockEngine;
+begin
+ EnterCriticalSection(FLock);
+end;
+
+procedure TPHPEngine.UnlockEngine;
+begin
+ LeaveCriticalSection(FLock);
+end;
+
+procedure TPHPEngine.HandleError(Sender: TObject; AText: string;
+ AType: Integer; AFileName: string; ALineNo: integer);
+begin
+ LockEngine;
+ try
+ if Assigned(FOnScriptError) then
+
+
+ FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
+ //ShowMessage( AText + #10#13 + AType.ToString + #10#13 + AFileName + #10#13 + ALineNo.ToString );
+ // FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.HandleLogMessage(Sender: TObject; AText: string);
+begin
+ LockEngine;
+ try
+ if Assigned(FOnLogMessage) then
+ FOnLogMessage(Sender, AText);
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.PrepareForShutdown;
+begin
+ LockEngine;
+ try
+ FWaitForShutdown := true;
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.ShutdownAndWaitFor;
+var
+ cnt : integer;
+ AllClear : boolean;
+begin
+ PrepareForShutdown;
+
+ AllClear := false;
+ while not AllClear do
+ begin
+ cnt := FRequestCount;
+ if cnt <= 0 then
+ AllClear := true
+ else
+ Sleep(250);
+ end;
+ ShutdownEngine;
+end;
+
+function TPHPEngine.GetEngineActive: boolean;
+begin
+ Result := FEngineActive;
+end;
+
+procedure TPHPEngine.UnlockLibraries;
+var
+ cnt : integer;
+begin
+ if Assigned(Librarian) then
+ begin
+ for cnt := 0 to Librarian.Count - 1 do
+ Librarian.GetLibrary(cnt).Locked := false;
+ end;
+end;
+
+procedure TPHPEngine.RemoveRequest;
+var
+ x: Pzend_module_entry;
+ xp: function(_type : integer; module_number : integer; TSRMLS_DC : pointer):integer;cdecl;
+begin
+ InterlockedDecrement(FRequestCount);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ xp := x^.request_shutdown_func;
+ if(Assigned(xp)) then
+ xp(x^._type, x^.module_number, TSRMLS_D);
+ end;
+end;
+
+procedure TPHPEngine.AddFunction(FN: zend_pchar; Func: Pointer);
+begin
+ inc(RegNumFunc);
+ SetLength(FLibraryEntryTable, RegNumFunc + 1);
+ FLibraryEntryTable[RegNumFunc - 1].fname := FN;
+ //FLibraryEntryTable[RegNumFunc - 1].num_args := 0;
+ FLibraryEntryTable[RegNumFunc - 1].arg_info := nil;
+ FLibraryEntryTable[RegNumFunc - 1].handler := Func;
+end;
+
+procedure TPHPEngine.AddModule(Module_entry: Pzend_module_entry);
+begin
+ SetLength(FAddMods, Length(FAddMods)+1);
+ FAddMods[High(FAddMods)] := Module_entry;
+end;
+
+procedure TPHPEngine.RefreshLibrary;
+var i: integer;
+begin
+ Self.AddFunction('delphi_date', @delphi_date);
+ Self.AddFunction('delphi_get_author', @delphi_get_author);
+ Self.AddFunction('delphi_str_date', @delphi_str_date);
+ Self.AddFunction('InputBox', @delphi_input_box);
+
+ for i := 0 to FHash.Count - 1 do
+ Self.AddFunction(zend_pchar(zend_ustr(FHash[i])), @DispatchRequest);
+ FLibraryModule.functions := @FLibraryEntryTable[0];
+end;
+
+procedure TPHPEngine.AddRequest;
+var
+ x: Pzend_module_entry;
+ xp: function(_type : integer; module_number : integer; TSRMLS_DC : pointer):integer;cdecl;
+begin
+ InterlockedIncrement(FRequestCount);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ xp := x^.request_startup_func;
+ if(Assigned(xp)) then
+ xp(x^._type, x^.module_number, TSRMLS_D);
+ end;
+end;
+
+initialization
+ InitLibrarian;
+
+finalization
+ UnInitLibrarian;
+
+end.
diff --git a/phpAbout.dfm b/Source/phpAbout.dfm
similarity index 98%
rename from phpAbout.dfm
rename to Source/phpAbout.dfm
index 8b6c8c2..88d0aa1 100644
--- a/phpAbout.dfm
+++ b/Source/phpAbout.dfm
@@ -1,1233 +1,1233 @@
-object dlgAbout: TdlgAbout
- Left = 264
- Top = 289
- BorderStyle = bsDialog
- Caption = 'About PHP4Delphi'
- ClientHeight = 186
- ClientWidth = 490
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = True
- Position = poScreenCenter
- Scaled = False
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object pnlLeft: TPanel
- Left = 0
- Top = 0
- Width = 213
- Height = 186
- Align = alLeft
- BevelOuter = bvNone
- TabOrder = 0
- object pnlImage: TPanel
- Left = 6
- Top = 8
- Width = 200
- Height = 168
- BevelOuter = bvLowered
- Caption = 'pnlImage'
- TabOrder = 0
- object imgAbout: TImage
- Left = 1
- Top = 1
- Width = 198
- Height = 166
- Align = alClient
- Center = True
- Picture.Data = {
- 07544269746D6170E6850000424DE6850000000000003604000028000000C700
- 0000A60000000100080000000000B08100000000000000000000000100000001
- 0000392110003929100039291800422910003D3118004A2910004A3110004A31
- 18003D2D210052311800523918005A391800423525004E3921004A392D004532
- 3F005E3D1C0065421B006B4221006B4A2100524231005A4A2D006B4A29006B52
- 2900414D37005B4A41005C583D005D6743006B5033006B57400067584E006B6B
- 4A00734A2100735221007B522100734A2900735229007B5229007B5A2900845A
- 29007B523100735A31007B5A3100845A31008C633100845A3900846339008C63
- 39007756480088634200846B4A008C6B39008C6B42008C6B4A00946B3900946B
- 4200946B4A008C734A009473420094734A009C7342009C734A00A5734A00A57B
- 4A001665650049516E00615965005F5B910086695C00786E6F006F6F94007373
- 9C005149B5006B6BA9006B6BB5007373A5004541D2004944E0006767BD006767
- D1004A4AE7003939EF004239EF00423DF3004242F7004239FF004242FF004A42
- FF004A4AEF004A4AF7004A4AFF00524AEF005252E7005555F2006565ED006868
- FC00217F7F0035877B00557F6300598E7C008C7B6300887B6F007B7B7F008383
- 8800947352009C7352009C7B5200A77E52009C7C5A00AD845600A38361009F8A
- 760017C5BB0012DAD2000FEAE60004F7F30000FFF70000FFFF0008FBFB0014FF
- FF00689695006898BE00998C94009C9BCE0030CFC9002DF4F3004ADAD80074CF
- CE00B5845A00B58C5A00B58C6300BD8C6300BD946300B58C6B00B5946B00BD94
- 6B00C6946B00C69C6B00CE9C6B00AD8C7300AD947300B5947300BD947300BD9C
- 7300AF967E00C19C7700C69C7B00C6A57B00AD9C8400B19C8800BAA28600C6A5
- 8400CE9C7300CEA57300CEA57B00CEA58400CEAD8400D6A57B00D6AD7B00D6AD
- 8400B7A79100C3AA8E00BDAB9A00B8ADA600ADADAD00ADADB500BFB5AE00C6BD
- B500CEAD8C00D2B19000D2B59800D4BAA200D2BDAD00DAC6A900CEBDB500D6C6
- B100ADA5BD00ADADC100ADADCE00BBB7BF00BDBDBD00C6BDC600C6C6C600CEC6
- BD00D6C6B500D6CABD00CECAC600D6CEC600E1CBB500E1CEC000DED6C600EBD8
- C300B5B5CE00BDBDCE00C6BDCE00C6C6CE00ADCECE00CECECE00D6CECE00C6D6
- CE00BDBDD600BDCED600CECED600D6D6CE00C6D6D600C6C6DE00CECEDE00BDBD
- FF00DED6CE00D6D6D600DED6D600DEDED600ADDEDE00C6DEDE00CEDEDE00D6DE
- DE00B5E7E700D2DEE700ADF7F700C9F5F500D6FFFF00DEDEDE00DEDEEF00DEEF
- EF00E7D6CE00E7DECE00EFDECE00EBDED600EFE7D600E7DEDE00E7E7DE00EFE7
- DE00F7E7DE00E7E7E700EFE7E700EFEFE700F7EFE700E7EFEF00EFEFEF00F7EF
- EF00F7F7EF00FFF7EF00DEDEF700DEF7F700F7F7F700FFF7F700FFFFF700DEDE
- FF00E7E7FF00EFEFFF00F7F7FF00DEFFFF00E7FFFF00EFFFFF00F7FFFF00FFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFF4C57A676666677AC5F4FFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFF4F4F4F4FFFFFFFFFFFFFFFFFFFFFFFFFFF4C57A676666677AC5F4FFF4
- F4F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EEEEEEEEEEEEEEEEEEEEEEF4F4
- FFFFFFFFFFFFFFF4F4EEE9DDDDDDDDE9E9EEF4FFFFFFF4EEDE7B7B7B7B7B4F47
- 6666677AB6E9E9DDDDDDE9EEF4FFF4F4EEEEEEEEEEF4FFFFF4EEEEEEEEEEF4F4
- F4EEEEEEEEEEF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E9BAB4B4B4B4
- B4B4B4B4B4B6C5DDE9F4FFFFFFFFF4E9C5B4A4A4A4A4A4A4A5B6D1EEF4EED1B6
- 7B565656565656496666667AA4B3A4A4A4A4A5B6DDEEE9C5B4B4B4B4BAE9F4F4
- D1B6B4B4B4B6C5DDC5B4B4B4B4B6E9F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFF4C5A47A7A7A7A7A7A7A7A7A7A7AA4B4D1EEF4FFF4D1B37A7A676767676767
- 677AA4B6E9E9B37A4B5656565656564966666667676767676767677AB3D1C5A4
- 7A7A7A7AA4C5EEEEB47A7A7A7A7AA4B4A47A7A7A7A7AC5F4FFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFF4B67A6766666666666666666767677AA4C5EEF4DDA57A
- 67666666676767666667677AB6D1A46747565656565656496666666667676766
- 666666677AB4B67A676666677AB6EEE9B36766666667A4B37A676666677AB6EE
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4B67A676666666666676766666666
- 6767A4D1E9B67A67666666677A7A7A6766666667A4B6A4674756565656565649
- 666666677A7A7A676666666667A4B47A676666677AB6EEE9A56766666667A4B3
- 7A676666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4B67A67666666
- 66677A7A6767666666677AB3D1A567666666677AB4C5A467666666677AB4A467
- 475656565656564966666667A4C5B67A6766666667A4B37A676666677AB6EEE9
- A56766666667A4B37A676666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7CFCF
- CF7B7B4E4E4E4E4E4A4BB3B4A46766666666677B5E5E585454595C5E7BDEB67A
- 67494E4E4F4F4F4A475656565656564A4E5C5956595F7BA467664E4E4E4F4F4F
- 476666494E7B7B7B4F4A664E4E4E4F4F4F476666667AB6EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFCF5656565656565656565656565A5FB17A666666674F5656565656
- 56565656565A7B7A675C56565656565C4756565656565656565656565656565E
- 67475656565656564966665C56565656565046565656565656496666667AB6EE
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFCF5656565656565656565656565656594B6766
- 675C565656565656565656565656564A675C56565656565C4756565656565656
- 56565656565656564E475656565656564966665C565656565650465656565656
- 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656565656
- 56565656565847664A56565656565656565656565656565C675C56565656565C
- 475656565656565656565656565656565C475656565656564966665C56565656
- 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 56565656565656565656565656564F664F56565656565847674F565656565654
- 475C56565656565C475656565656564E67475856565656565047565656565656
- 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF0068686868686868686868686868686868686868686868
- 6868686868686868686868686868686868686868686868686868A2FFFFFFFFFF
- FFFFFFFFFFCF5656565656565647475C56565656565658675056565656565C66
- 66495656565656564B5C56565656565C475656565656564966665C5656565656
- 50475656565656564966665C56565656565046565656565656496666667AB6EE
- FFFFFFA268686868686868686868686868686868686868686868686868686868
- 686868686868686868686868686868686800BEBEBEBEBEBEBEBEBEBEBEBEBEBE
- BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE
- BEBEE6FFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565647
- 5056565656565C6666495656565656567B5E56565656565C4756565656565649
- 66665C565656565650475656565656564966665C565656565650465656565656
- 56496666667AB6EEFFFFFFE6BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE
- BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
- 56565656565656465056565656565C6666495656565656564B5C56565656565C
- 475656565656564966665C565656565650475656565656564966665C56565656
- 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565646664956565656565656465056565656565C666649565656565656
- 4B5C56565656565C475656565656564966665C56565656565047565656565656
- 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFCF5656565656565646664956565656565656465056565656565C66
- 6649565656565656475C56565656565C475656565656564966665C5656565656
- 50475656565656564966665C56565656565046565656565656496666667AB6EE
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565646
- 5056565656565C666649565656565656475C56565656565C4756565656565649
- 66665C565656565650475656565656564966665C565656565650465656565656
- 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
- 56565656565656465056565656565C66666667A4C3CAB17A675C56565656565C
- 475656565656564966665C565656565650475656565656564966665C56565656
- 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565646664956565656565656465056565656565654545454545A5A5954
- 475C56565656565C475656565656564966665C56565656565047565656565656
- 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFCF5656565656565646664956565656565656465056565656565656
- 5656565656565656475C56565656565C475656565656564966665C5656565656
- 50475656565656564966665C56565656565046565656565656496666667AB6EE
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565646
- 50565656565656565656565656565656475C56565656565C4756565656565649
- 66665C565656565650475656565656564966665C565656565650465656565656
- 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
- 565656565656564650565656565656565656565656565656475C56565656565C
- 475656565656564966665C565656565650475656565656564966665C56565656
- 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565646664956565656565656465056565656565C666649565656565656
- 475C56565656565C475656565656564966665C56565656565047565656565656
- 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFCF5656565656565646664956565656565656465056565656565C66
- 6649565656565656475C56565656565C475656565656564966665C5656565656
- 50475656565656564966665C56565656565046565656565656496666667AB6EE
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F4F4F4F4F4
- F4FFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565643
- 4D56565656564C454543565656565656434D56565656565C4756565656565649
- 66454C56565656564D435656565656564366665C565656565650435656565656
- 564345454566A4C5D1D1D1D1D1D1D1DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4
- DDD1D1D1D1D1D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
- 56565656565656414C56565656564D1E1941565656565656434D56565656565C
- 475656565656564366454C56565656564C41565656565656431E1E4C56565656
- 564D41565656565656431919191E659495959595A3D1D1D1F4FFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFE7BCACABA196969696C5D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565643454356565656565656414C56565656565C1E070F565656565656
- 434D56565656565C475656565656564166454C56565656564C0F565656565656
- 430E004856565656564C0F56565656565641000000030B13202020206CD1D1C5
- EEF4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4FF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFA16D6B6B6B6B6B6B6EC5D1D1EEFFFFFFFFFFFFFF
- FFFFFFFFFFCF5656565656565643454356565656565656424C56565656565E65
- 0D0F565656565656464D56565656565C475656565656564166454D5656565656
- 4C0F565656565656430E004856565656564D0F56565656565641010101030B13
- 202020206CD1B6B3B6C5C5C5D1D1D1DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD1D1
- D1C5C5C5BAC5E9F4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4826D6D6B6D6B6B6B82C5D1D1
- EEFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565641
- 4C56565656565EA01C415656565656564B5C56565656565C4756565656565641
- 7A7A5C56565656564C0F565656565656430E004856565656564D0F5656565656
- 5641030303071013202020206FC5B47A7A7A7A7A7A7AA4A4A4A4A4A4A4A4A4A4
- A4A4A4A4A4A4A47A7A7A7A7A7AA4C5F4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE06D6D6D6D
- 6B6B6B6B8BC6D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
- 56565656565656424856565656565DB03143565656565656B25E56565656565C
- 4756565656565649B6B25D56565656564C195656565656564E0E084C56565656
- 56501E565656565656430A0A0A0B1113202020208BC5B37A7A7A7A6767676767
- 6767676767676767676767676767676767677A7A7A7AB6EEFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFAA6D6D6D6D6D6B6B6B8DCBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565643454356565656565656434156565656565659585456565656565D
- CD5E56565656565C4756565656565654595A565656565656481E565656565656
- 5452525656565656565C45565656565656430707070710132020202094D1B6A4
- B4A5A5A4A4A4A4A47A6767666666666666666666677A7AA4A4A4A5B3B3B6DDF4
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFF8F6D6D6D6D6D6D6B6B96D1D1D1F4FFFFFFFFFFFFFF
- FFFFFFFFFFCF565656565656564345435656565656565643144C565656565656
- 565656565656567BD15E56565656565C47565656565656565656565656565654
- 421E5656565656565656565656565656565E4556565656565641010101030B13
- 20202020A0D1C5D1EEE9E9E9E9DDDDD1B6A4676666666666666666677AB4C5DD
- E9E9E9E9EEEEF4FFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA826D6D6D6D6D6D6D6BA0D1D1DD
- FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565643
- 0E0F5C56565656565656565656537BCAD15E56565656565C4756565656565356
- 5656565656565343231E56565656565656565656565656565DC8655656565656
- 5643010000030B13201318187AC4C4D5DFF3F3FDFDFDF4F4EEC57A6766666767
- 6767677AA5C4C4C4A5DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB9806D6D6D6D
- 6D6D6B6BA2D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
- 565656565656564615167A7B5F5D5A565654504C4330A6D1D15E56565656565C
- 4B565656564D1E435C56565A5E7B4523201E5656565656564E484C5356565D7B
- CDD16756565656565643010101030B1320164040404040404040404040406040
- 4040404040404040404040404040404040A5FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFA16D6D6D6D6D6D6D6D6BA6D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 565656565647674E565656565656547A322AA0D1CACACDCD65302D2D2B2BA6D1
- D15E56565656565C7A7A7AB0C0B32424A3CECDCDCAD16C20201E565656565656
- 49190C0C45B0C3D1D1D16F30B3CDC8B17A660706070710132017606060606060
- 60606060606060606060606060606060606060606060606040A4FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFF4866D6D6D6D6D6D6D6D6DA7D1D1E9FFFFFFFFFFFFFFFF
- FFFFFFFFFFCF565656565656564F4F595656565656565DC16E2F95D1D1D1D1D1
- 6F2B2B2B2B2BA6D1D15E56565656565ED1D1D1D1E9BB252595DDD1D1D1D16F20
- 201E5656565656567B32101064B6D1D1D1D17A4D59595959594B161010111220
- 201762637979797F79797C70707070707070707070707070707078797F7F7F7F
- 79D9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE382816D6D6D6D6D6D6D6DB7D1D1E9
- FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656565656565656565656567BC5
- 6F2F8BCBD1D1D1CB6F2E2B2B2B2BA6D1D15E56565656565FF4F4F4F4F4D02525
- 6ED2D1D1D1CB6F20201E5656565656567B68131368BAD1D1D1CB7A5656565656
- 567B2A131313202020202039D1D1D1F4FDFDFCDB7F7C7C7C7C7C7C7C7C7C7C7C
- 786767B3E9FEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF81816D6D6D6D
- 6D6D6D6DBAD1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656565656
- 56565656565ECDCB8B2F6CBAD1D1D1CB6F2E2E2B2B2BA6D1D15E56565656565F
- FFFFFFFFFFD025253BC6D1D1D1D16F20201E565656565656B26420202EB7D1D1
- D1D17A5656565656567B2A20202020202020206FD1D1DDFFFFFFFFFFF37E7C7C
- 7C7C7C7C7C7C7E7866667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFA18181816D6D6D6D6D6D80BBD1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
- 5656565656565656565656565FCDD1D16E2F3BB7D1D1D1D16E2E2E2E2B2BA7D1
- D15E56565656565FFFFFFFFFFFD025252DA7D1D1D1D16E20201E565656565656
- B264202025A6D1D1D1D17A5656565656567B25202020202020202095D1D1E9FF
- FFFFFFFFFE7E7E7E7E7E7E7E7E7E7E6766667AB4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFF487818180806D6D6D6D6D82C6D1D1EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFCF56565656565656565656544D48B0CAD1D1CB6E2F33A6D1D1D1CB
- 6E2E2E2B2B2BA7D1D15E56565656565FFFFFFFFFFFD0252525A0D1D1D1D16E20
- 201E565656565656B26420202094D1D1D1D17A5656565656567B282020202020
- 202024A3D1D1E9FFFFFFFFFFFFDA7D7D7D7D7D7D7D7D7E6666667AB4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE78281818181816D6D6D6D86C6D1D1F0
- FFFFFFFFFFFFFFFFFFFFFFFFFFFAF8F8B5444465C1CDCDCDA4353795D1D1D1C5
- 6E2F2F90D1D1D1C56C2F2E2E2B2EA7D1D1CEF8F8F8F8F8F9FFFFFFFFFFD02525
- 256FCBD1D1C66C2420231D1D1D44CDCDCA642020206CCBD1D1C6641C30A4CDCD
- CDA3242020202020202028A7D1D1EEFFFFFFFFFFFFDA7D7D7D7D7D7D7D7D7E66
- 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC82818181816D6D
- 6D6D6D8DCBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBE3D3D3DA3D1D1D1
- 9637376EBAD1D1BA692F2F6CBAD1D1BA3B2F2F2E2E2BA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD025252531B7D1D1C53524202020202031D1D1D1642020202AA7D1
- D1C53520206FD1D1D1A220202020202020202DC6D1D1F4FFFFFFFFFFFFDA7777
- 7777777777777E6666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- A88282818181816D6D6D6D91CBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- E36A3D3C8BC6D1D18B373737A6D1D1A7372F2F34A3D1D1A7342F2E2E2E2EA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD02525252595D1D1A72A24242420202031D1D1
- D1682020202094D1D1B72A20202DB7D1D16F202020202020202068D1D1D1FFFF
- FFFFFFFFFFDB76767676767676767C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFF8F828282818181816D6D6D96D1D1D1F4FFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFE76B3D3D3DA2D1A76A3737376EB7CB9037332F2F6CB7CB90
- 2F2F2F2E2E2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525252531A7CB902524
- 242020202031D1D1D168202020202DA6CB90202020206FC6B731202020202020
- 202090D1D1DDFFFFFFFFFFFFFFDC75757575757575757C6666667AB6EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB8782828281818181816D6DA1D1D1D2F4
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF6E3D3D3D3D8B6E37373737376A8B37
- 3733332F2F3D6E342F2F2F2F2E2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525
- 2525252E6C2A2424242420202031D1D1D16820202020202D6825202020202335
- 31131313131313202020A0D1D1E9F4F4F4F4F4F4F4DC75757575757575757C66
- 66667AB4EEF4F4F4F4F4F4F4F4F4FFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE08282828282818181
- 816D6DA2D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF46E3D3D3D3C3C3C
- 3A3737373737373737332F2F2F2F2F2F2F2F2F2F2F2EA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD025252525252525252424242424202031D1D1D16C202020202020
- 202020202020201210101010101010111116A0B4B4D1E9E9E9E9E9E9E9D57575
- 7575757575757C66666667A5D1DDDDDDDDDDD1C5C5DDEEFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD
- 8282828282818181818181A6D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF863D3D3D3D3C3C3C3A37373737373737373333332F2F2F2F2F2F2F2F2FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD025252525252525252525242424242031D1D1
- D16820202020202020202020202013110703030307070707070D677A7AA4A4A4
- A4A4A4A4A4A475757575757575757C666666677AA4A4A4A4A4A4A47A7AA5E9FF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFA8828282828282818181816DACD1D1DDFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF973D3D3D3D3C3C3C3C373737373737373737332F2F2F2F
- 2F2F2F2F2F2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD025252525252525252525
- 242424242031D1D1D16C20202020202020202020202013100301010101010101
- 010E45454567676767676767676775757575757575757C666666666767676767
- 6767676767A4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFF58F8282828282828281818181A7D1D1E9FF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA3D3D3D3D3D3C3C3C3A3A37373737
- 37373733332F2F2F2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525
- 2525252525252525242424242432D1D1D16C202020202020202020202020130B
- 0301000000000000001445454566666666666666666775757575757575757C66
- 66666666666666666666666667A4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7878382828282828282
- 818181B7D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB83D3D3D3D3D3D
- 3C3C3A37373737373737373733332F2F2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD025252525252525252525242424242432D1D1D16C202020202020
- 2020202020201310070100000000000000194545456666666666666666677575
- 7575757575757C6666666666666666666666666667A4DDF4FFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF84
- 8483828282828282818181BAD1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFBE6A3D3D3D3D3D3D3C3C3A3A373737373737373333332F2F2F2F2F2F2FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD026252525252525252525252424242432D1D1
- D16C2020202020202020201F1F1F1F1B150C040202020101011E454566676767
- 67676767676775757575757575757C6666666767676778786667676667A4DDF4
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFAD848484828282828282828182C5D1D1E9FFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFE36B3D3D3D3D3D3C3C3C3C3A3737373737373737373333
- 2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD026252525252525252525
- 252525242435D1D1D16C202020202020202029797F7F7E7E7E7E717171717171
- 717272727272727272727272727275757575757575757372727D7E7E7E7C7C61
- 607A7A7A7AA4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFA8848483838382828282828182C6D1D1E9FF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB6E3F3D3D3D3D3D3D3D3C3C3A3737
- 37373737373733332F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02A26
- 2525252525252525252525242435D1D1D16C20202020202020201F797F7F7E7E
- 7D7D7D7775757575757575757575757575757575757575757575757575757575
- 77777D7D7E7C7C6160B6B6B4B4C5EEFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF91848484848382828282
- 828286C5D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4823F3D3D3D3D
- 3D3D3C3C3C3A3A3737373737373737332F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD02A262525252525252525252525252435D1D1D16C202020202020
- 202062797F7F7E7E7D7D7D777575757575757575757575757575757575757575
- 757575757575757577777D7D7E7C7C6160EEEEEEEEEEF4FFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB8784
- 8484848382828282828287C6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFF8F3F3F3D3D3D3D3D3D3C3C3C3A3A3737373737373434332F2F2F2F2FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD02A2A2A26252525252525252525252435D1D1
- D16C20202020202020201D797F7F7E7E7D7D7D77757575757575757575757575
- 7575757575757575757575757575757577777D7D7E7C7C6160FFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFE18784848484848382828282828EC6D1D1EEFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFA13F3F3D3D3D3D3D3D3D3C3C3A3A3737373737373734
- 33332F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2A2A2A262525252525
- 252525252535D1D1D16C202020202020202020637F7F7E7E7D7D7D7775757575
- 75757575757575757575757575757575757575757575757577777D7D7E7C7C61
- 60FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFBD8484848484848483828282828EC6D1D1EEFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF3F3F3F3D3D3D3D3D3D3D3C3C3A
- 3A373737373737373333332F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2A
- 2A26262625252525252525252535D1D1D16C24202020202020202029797F7E7E
- 7D7D7D7775757575757575757575757575757575757575757575757575757575
- 77777D7D7E7C7C6160FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAB84848484848484848382
- 82828FC6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBE6B3F3F3F3D
- 3D3D3D3D3C3C3C3A3A373737373737373333332F2F2FA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD02B2B2A2A262525252525252525252535D1D1D16C242020202020
- 20202020627F7E7E7E621F1B1A18181863C4D4D8DCDCDCDCDCDCDCDCDCDB7575
- 7575757575757C78787879C4D8DAD47F7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA98784
- 848484848484838282828EC6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFE46D3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737333333332FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2A2A2A2625252525252525252535D1D1
- D16C2420202020202020202024797E7E7D7820131107030142A4B6DDFFFFFFFF
- FFFFFFFFFFFC75757575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFF938787848484848484838282828EC6D1D1E9FFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFEB6E3F3F3F3F3D3D3D3D3D3D3C3C3A373A3737373737
- 373733332F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2A2A2A25252525
- 252525252535D1D1D16C24202020202020202020201F7E7E7D7D1F20130B0701
- 1E7AB3DDFFFFFFFFFFFFFFFFFFFC75757575757575757C6666667AB6EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFF08F87878484848484848483828286C5D1D1E9FF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6863F3F3F3F3D3D3D3D3D3D3D3C
- 3C3C3A373737373737373333332FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B
- 2B2B2A2A2A262525252525252535D1D1D16C242424242020202020202024787E
- 7D7D7C20201109041E667AC5F4FFFFFFFFFFFFFFFFFC77757575757575757C66
- 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA8987878784848484848484
- 838282BBD1D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF963F3F3F3F
- 3F3D3D3D3D3D3D3D3C3C3A3737373737373737333333A7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFD02B2B2B2B2B2A26252525252525252535D1D1D16C242424202020
- 2020202020201F7E7D7D7D6220131007424567A4DDF4FFFFFFFFFFFFFFFC7775
- 7575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE1898787
- 8784848484848484848382AED1D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFAC3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737373333A7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2B2B2B2A262525252525252535D1D1
- D16C24242424202020202020202020637D7D7D7C1720120B1E45457AB4D3EEFF
- FFFFFFFFFFFC77757575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFBD8887878787848484848484848382A1D1D1D1D1EEF4FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFBD6B3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3A373737
- 373737373333A7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2B2B2A2B2A2625
- 252525252535D1D1D16C24242424202020202020202020297E7D7D7763201311
- 09144266A4B6D1E9F4FFFFFFFFFC77757575757575757C6666667AB6EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFAD888787878787848484848484838287AED1D1D1
- D1D1DDE9EEF4FFFFFFFFFFFFFFFFFFFFFFFFFFE36D6B3F3F3F3F3D3D3D3D3D3D
- 3D3C3C3C3A3A3737373737373733A7D1D1DDEEEEEEEEEEEEEEEEEEEEEEBB2B2B
- 2B2B2B2B2A2A2A26252525252535D1D1D16C2524242424202020202020202020
- 627D7D77721D20131007041E67B3C5D1DDEEFFFFFFFD77757575757575757C66
- 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA8988878787878484848484
- 848483828796A2B7C6D1D1D1D1D1DDEBF4FFFFFFFFFFFFFFFFFFFFEB826B3F3F
- 3F6A3F3D3D3D3D3D3D3D3C3C3A3A3737373737373737A7D1D1D1D1D1D1D1D1D1
- D1D1D1D1D1A72B2B2B2B2B2B2B2A2A26252525252535D1D1D16C252524242420
- 2020202020202020247C7D7775612020110A0301147AB6D1D1D1E9FFFFFD7775
- 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B888888
- 878787878484848484848483828282828E97ABB9D1D1D1D1D1DDE9F4FFFFFFFF
- FFFFFFF68D6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A37373737373737376A6C
- 6C6C6C6C6C6C6C6C6C6C6C68683B2B2B2B2B2B2B2B2B2A26252525252535D1D1
- D16C2525242424242020202020202020201F7D7775731B2013100701010D6FBA
- D1D1D1E9FFFD77757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFF9289898888878787878484848484848382828282828282868FA2B7CB
- D1D1D1D1DDE9F4FFFFFFFFFFA16B6B3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A3A
- 373737373737373434332F2F2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2B2A
- 2A2525252535D1D1D16C25252524242420202020202020202020637775757017
- 20120B0301030A64BAD1D1D1E9FD77757575757575757C6666667AB4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFEF9889898888888787878784848484848484838282
- 828282828181828FA2B7C6D1D1D1D1DDEEF4FFFFAC6B6B6B3F3F3F3F3F3D3D3D
- 3D3D3D3D3D3C3A3A37373737373737373433332F2F2F2F2F2F2F2F2F2E2E2B2E
- 2B2B2B2B2B2B2B2B2A2A26252535D1D1D16C2525252424242424202020202020
- 2020297C75757363201311090301030B64BAD1D1D1D977757575757575757C66
- 66667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7898989898887878787878484
- 848484848483828282828282828181816D828FA2BAD1D1D1D1D1E9F4BE6B6B6B
- 3F3F3F3F3F3D3D3D3D3D3D3D3C3C3C3A3A3737373737373433332F2F2F2F2F2F
- 2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2B2A26252535D1D1D16C252525252424
- 242420202020202020202062767575711D20131007010107106CC6D1D1CC7775
- 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE189898989
- 898887878787878484848484848483828282828282828181816D6D6D8296A7C6
- D1D1D1D1BB6D6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3A373737373737
- 3733332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2A2A2A262535D1D1
- D16C25252525252424242424202020202020201770757575612020120A030103
- 0A126FD1D1CC7D757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFBF89898989898888878787878784848484848484838282828282828181
- 81816D6D6D6D8086A2BBD1D1BB826B6B6B6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C
- 3A3A373737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B
- 2B2A2A262535D1D1D16C2525252525252424242020202020202020201B727575
- 731B201311070101030B16A0D1CC7D757575757575757C6666667AB4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFBD8989898989888888878787878484848484848483
- 82828282828282818181816D6D6D6D6D6D85A2B7D1866B6B6B6B6B3F3F3F3F3F
- 3D3D3D3D3D3D3D3C3C3A37373737373737373733332F2F2F2F2F2F2F2F2F2E2E
- 2E2E2B2B2B2B2B2B2B2B2A262635D1D1D16C2525252525252424242420202020
- 202020202061757575701720120B030103071128A6CC7D757575757575757C66
- 66667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC898989898989888887878787
- 84848484848484838282828282828282818180806D6D6D6D6D6D6D82A2906B6B
- 6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A3737373737373737332F2F2F2F
- 2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2B2A2635D1D1D16C252525252525
- 25242424242020202020202020177175757461202011090301030A1235C77D75
- 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD89898989
- 8989898888878787878784848484848383838282828282828181816D6D6D6D6D
- 6D6D6D6D6D95966D6B6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A37373737
- 373737373333332F2F2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2A2A35D1D1
- D16C252525252525252524242424202020202020202062737575721B20131007
- 01010710136F7D757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFAA89898989898989898887878787878484848484848382828282828282
- 828181816D6D6D6D6D6D6D6D6B8DC6AE8C6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D
- 3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B
- 2B2B2B2A2A39D1D1D16C25252525252525252424242420202020202020202361
- 757575702020120B0301030911297D757575757575757C66666667B4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFA98989898989898988888887878787878484848484
- 84848382828282828281818181816D6D6D6D6D6D6D82BBD1BBA16E6B6B3F3F3F
- 3F3F3D3D3D3D3D3D3D3C3C3C3A3A3737373737373434332F2F2F2F2F2F2F2F2F
- 2F2E2E2E2B2B2B2B2B2B2B2B2A39D1D1D16C2525252525252525252424242420
- 202020202020201D7175757362201311090301030B1671757575757575757C66
- 666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C898989898989898988888887
- 878787848484848484848382828282828282818180806D6D6D6D6D6D6D6DB7D1
- D1D2BE856B3F3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3A37373737373737343333
- 2F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B39D1D1D16C252525252525
- 2525252424242420202020202020202062747575711C20131007010107157175
- 7575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9A89898989
- 898989898989888887878787848484848484848382828282828281818181816D
- 6D6D6D6D6D6DACD1D1D1F4E78D6B6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3737
- 3737373737373333332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B39D1D1
- D16C252525252525252525252424242420202020202020201770757575612020
- 120A0301030D71757575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFF59A89898989898989898989888888878787878484848484848382828282
- 828282818181806D6D6D6D6D6D6DA2D1D1D1EEFFEA916B3F3F3F3F3F3F3D3D3D
- 3D3D3D3C3C3A3A373737373737343733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B
- 2B2B2B2B2B39D1D1D16C25252525252525252525252424242420202020202020
- 201B727575721B2013110703010470757575757575757C66666667B4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFF49A8989898989898989898989888887878784848484
- 8484848483828282828282818181816D6D6D6D6D6D6D96D1D1D1E9FFFFEB8F6B
- 3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737373333332F2F2F2F2F
- 2F2F2F2F2E2E2E2B2B2B2B2B2B68D1D1D16C2525252525252525252525242424
- 2420202020202020202061757575701720131007010470757575757575757C66
- 666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF9A988989898989898989898988
- 8888878787878484848484848382828282828282828181816D6D6D6D6D6D86C5
- D1D1E9FFFFFFE7863F3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3737373737373737
- 33332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B68D1D1D16E262525252525
- 2525252525242424242020202020202020201770757574612020120A03027075
- 7575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEC9A98898989
- 8989898989898989888887878787848484848484848382828282828282818181
- 816D6D6D6D6D82BAD1D1DDFFFFFFFFE3823F3F3F3F3F3D3D3D3D3D3D3D3C3C3C
- 3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B68D1D1
- D16E2A2625252525252525252525252424242420202020202020201B73757572
- 1B201311070470757575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFEB9998988989898989898989898989888887878787848484848484848382
- 828282828282818181816D6D6D6D6DAED1D1D1F4FFFFFFFFBC6B3F3F3F3F3F3D
- 3D3D3D3D3D3D3C3C3A373A3737373737373333332F2F2F2F2F2F2F2F2F2E2E2E
- 2E2B2B2B2B68D1D1D16E2A262525252525252525252525242424242020202020
- 202020206175757570162013100770757575757575757C66666667B4EEFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFEB999898988989898989898989898988888887878787
- 848484848484848382828282828281818181816D6D6D6DA6D1D1D1F4FFFFFFFF
- F6AA6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A37373737373737373333332F2F2F
- 2F2F2F2F2F2F2E2E2E2E2B2B2B68D1D1D16E2A2A262525252525252525252525
- 2424242420202020202020201C71757573622020110A70757575757575757C66
- 666667B3E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE799989898898989898989898989
- 89898888878787878484848484848483828282828282828181816D6D6D6D6DA1
- D1D1D1EEFFFFFFFFFFEB863F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A3737373737
- 37373333332F2F2F2F2F2F2F2F2F2F2E2E2B2B2B2B68D1D1D16E2B2A26252525
- 25252525252525252424242420202020202020202062737575721D2013117075
- 7575757575757C66666667B3E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79998989898
- 8989898989898989898989888887878787878484848484838382828282828281
- 8181816D6D6D6D8FCBD1D1E9FFFFFFFFFFFFBE6D3F3F3F3F3F3D3D3D3D3D3D3D
- 3C3C3A3A37373737373737373333332F2F2F2F2F2F2F2F2F2E2E2B2B2B68D1D1
- D16E2B2A2A262525252525252525252525242424242020202020202020236175
- 75757020201370757575757575757C66666667B3E9FFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFE79998989898898989898989898989898988888787878784848484848484
- 8382828282828282818181816D6D6D86BBD1D1DDFFFFFFFFFFFFF6A13F3F3F3F
- 3F3D3D3D3D3D3D3D3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E
- 2E2E2E2B2B68D1D1D16E2A2A2A2A252525252525252525252525242424202020
- 2020202020201D7175757362201670757575757575757C66666667B3E9FFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFE7999998989898898989898989898989898988888787
- 878784848484848484838282828282828181818181806D81B7D1D1DDF4FFFFFF
- FFFFFFE7823F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3A3A3737373737373733332F
- 2F2F2F2F2F2F2F2F2F2E2E2E2B68D1D1D16E2B2B2A2A26262525252525252525
- 25252524242420202020202020202062737575721D1670757575757575757C66
- 666667A5E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE399999898989898898989898989
- 898F89898888888787878784848484848484838282828282828281818181806D
- ACD1D1D1F4FFFFFFFFFFFFFFAA6B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A373737
- 37373737373333332F2F2F2F2F2F2F2F2F2E2E2E2B68D1D1D16E2B2B2B2A2625
- 2525252525252525252A2A2A2524242020202020202020247075757570177075
- 7575757575757C66666667A5E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39999989898
- 9898988989898989898989898988888887878787848484848484848382828282
- 8282828181818180A1D1D1D1EEFFFFFFFFFFFFFFE7826B3F3F3F3F3F3D3D3D3D
- 3D3D3D3C3A3A37373737373737373333332F2F2F2F2F2F2F2F2F2E2E2B68D1D1
- D16E2B2B2B2B2A2A2625252525252EA3A6A6BBD0BEAEA0682520202020202020
- 1D717575736370757575757575757C66666667A5E9FFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFE39999999898989898898989898989898989898988888787878784848484
- 8484838282828282828282818181808096D1D1D1E9FFFFFFFFFFFFFFFFAA6B3F
- 3F3F3F3F3F3D3D3D3D3D3C3C3C3A3A37373737373737333333332F2F2F2F2F2F
- 2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A26252525252531D1D1D1EEFFFFFFFFF0
- AE2E20202020202020627475757271757575757575757C66666667A4E9FFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFE79A9999999898989898898989898989898989898888
- 8787878787848484848484838282828282828281818181808DC6D1D1E9FFFFFF
- FFFFFFFFFFE36D6B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A3A3737373737373737
- 3333332F2F2F2F2F2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A2A262525252531D1
- D1D1EEFFFFFFFFFFFFB925202020202020247075757575757575757575757C45
- 666667A4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A999999999898989889898989
- 8989898989898988888787878787848484848484838282828282828281818181
- 82BAD1D1DDFFFFFFFFFFFFFFFFF5966B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37
- 373737373737373733332F2F2F2F2F2F2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A
- 2A2A2625252531D1D1D1EEFFFFFFFFFFFFF596202020202020201D7277777777
- 7777777777777C45666667A4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79A99999999
- 9898989898898989898989898989898988888887878784848484848484838282
- 828282828281818181B7D1D1DDF4FFFFFFFFFFFFFFFFBD6B6B3F3F3F3F3F3D3D
- 3D3D3D3D3D3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2F68D1D1
- D16E2B2B2B2B2B2B2A26262A252531D1D1D1EEFFFFFFFFFFFFFFEB3520202020
- 202020637D7777777777777777777E45676667A4E9F4FFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFE79A99999999999898989898898989898989898989898888898F89898784
- 8484848484838282828282828282818181A6D1D1D1F4FFFFFFFFFFFFFFFFEB82
- 6B3F3F3F3F3FA2A6A6AEBEBEBEBEBEBEBEBEBEBEBEAC3737373733332F2F2F2F
- 2F2F2F2F2F68D1D1D16E2B2B2B2B2B2B2B2A2625252531D1D1D1EEFFFFFFFFFF
- FFFFFFA220202020202020247C7D7D7D7D7D7D7D7D7D7E7A7A6767A4DDF4FFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFE79A9999999999989898989898898989898989898989
- 89ACB7B7BEE7E4E1BCA9878484848483828282828282818181A1D1D1D1EEFFFF
- FFFFFFFFFFFFFFA16B3F3F3F3F3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE13737
- 37373333332F2F2F2F2F2F2F2F6AD1D1D16E2B2B2B2B2B2B2B2B2A26252534D1
- D1D1EEFFFFFFFFFFFFFFFFE625202020202020201D7E7D7D7D7D7D7D7D7D7EB4
- B6A4A4B4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA9A999999999999989898989889
- 898989898989898989BBD1D1E9FFFFFFFFFFE49C848484838282828282818181
- 8196D1D1D1E9FFFFFFFFFFFFFFFFFFBE6B6B3F3F3F3FA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE1373737373333332F2F2F2F2F2F2F2F68D1D1D16E2B2B2B2B2B2B
- 2B2A2A2A262534D1D1D1EEFFFFFFFFFFFFFFFFF0352020202020202020637E7E
- 7E7E7E7E7E7E7FC5EEE9DDE9F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF9A99999999
- 9999999898989898898989898989898989BBD1D1E9FFFFFFFFFFFFEB92848483
- 8282828282828282818DC5D1D1E9FFFFFFFFFFFFFFFFFFEB826B6B3F3F3FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE1373737373733332F2F2F2F2F2F2F2F6AD1D1
- D16E2B2B2B2B2B2B2B2B2A2A2A2634D1D1D1EEFFFFFFFFFFFFFFFFF56F202020
- 202020202024787E7E7E7E7E7E7E7FD1F4F4F4F4FFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFF09A999999999999999898989898898989898989898989BBD1D1E9FFFFFF
- FFFFFFFFE087848483828282828282818182BAD1D1DDFFFFFFFFFFFFFFFFFFFF
- 916B6B6B3F3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE337373737373733332F2F
- 2F2F2F2F2F6AD1D1D16E2E2B2B2B2B2B2B2B2B2A2A2A34D1D1D1EEFFFFFFFFFF
- FFFFFFFF952020202020202020201D797F7E7E7E7E7E7FD1F4FFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFF59A9999999999999999989898989889898989898989
- 89BBD1D1E9FFFFFFFFFFFFFFFFAA848484838282828282828181B7D1D1D1F4FF
- FFFFFFFFFFFFFFFFAC6B6B6B6B3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE13737
- 373737373733332F2F2F2F2F2F6AD1D1D16E2E2E2B2B2B2B2B2B2B2B2A2A34D1
- D1D1EEFFFFFFFFFFFFFFFFFFA224202020202020202020201F787F7F7F7F7FD1
- F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9A999999999999999999989898
- 988989898989898989BBD1D1E9FFFFFFFFFFFFFFFFE387848484838282828282
- 8181ABD1D1D1F4FFFFFFFFFFFFFFFFFFE16D6B6B6B3FA7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33737373737373333332F2F2F2F2F2F6AD1D1D16E2E2B2B2B2B2B
- 2B2B2B2B2B2A34D1D1D1EEFFFFFFFFFFFFFFFFFFA62424202020202020202020
- 20202962787F7FD1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C99999999
- 9999999999989898989898898989898989BBD1D1E9FFFFFFFFFFFFFFFFF59384
- 84848382828282828282A1D1D1D1EEFFFFFFFFFFFFFFFFFFEB826B6B6B3FA7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE337373737373737373434332F2F2F2F6AD1D1
- D16E2E2E2B2B2B2B2B2B2B2B2B2B34D1D1D1EEFFFFFFFFFFFFFFFFFFA2242420
- 2020202020202020202020206FC4CCD1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFA8999999999999999999989898989898988989898989BBD1D1E9FFFFFF
- FFFFFFFFFFFFAB848484838282828282828196D1D1D1E9FFFFFFFFFFFFFFFFFF
- F58F6B6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33A373737373737373333
- 2F2F2F2F2F6AD1D1D16E2E2E2E2B2B2B2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFF
- FFFFFFFFA02424202020202020202020202020206FD1D1D1F4FFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFAB9999999999999999999999989898988989898989
- 89BBD1D1E9FFFFFFFFFFFFFFFFFFBD84848484838282828282828FC6D1D1E9FF
- FFFFFFFFFFFFFFFFFFA16B6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33A3A
- 3737373737373733332F2F2F2F6CD1D1D16E2E2E2E2E2B2B2B2B2B2B2B2B35D1
- D1D1EEFFFFFFFFFFFFFFFFFF902424242420202020202020202020206FD1D1D1
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999999998
- 989898988989898989BBD1D1E9FFFFFFFFFFFFFFFFFFE1878484848483828282
- 828287BAD1D1DDFFFFFFFFFFFFFFFFFFFFAF6B6B6B6BAED1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33A3A3737373737373733332F2F2F2F6AD1D1D16E2F2E2E2E2E2B
- 2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFFFF46E2524242420202020202020
- 202020206FD1D1D1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC99999999
- 9999999999999998989898989889898989BBD1D1E9FFFFFFFFFFFFFFFFFFE487
- 8484848484838282828282B7D1D1DDF6FFFFFFFFFFFFFFFFFFE06B6B6B6BAED1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33A3A37373737373737373434332F2F6CD1D1
- D16E2F2F2E2E2E2E2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFFFF035252424
- 24242020202020202020202090D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFBD999999999999999999999999989898989898898989BBD1D1E9FFFFFF
- FFFFFFFFFFFFE78F8484848484838282828282ACD1D1D1F4FFFFFFFFFFFFFFFF
- FFE66D6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33C3A3A37373737373737
- 3434332F2F6CD1D1D16E2F2F2F2E2E2B2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFF
- FFFFFFE72A25252424242020202020202020202094D1D1DDFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFE19999999999999999999999999998989898988989
- 89BBD1D1E9FFFFFFFFFFFFFFFFFFE78F8484848484848382828282AAD1D1D1F4
- FFFFFFFFFFFFFFFFFFEB856B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3C
- 3A3A373737373737373733332F6CD1D1D16E2F2F2F2F2E2E2B2B2B2B2B2B35D1
- D1D1EEFFFFFFFFFFFFFFFFAC25252525242424202020202020202020A0D1D1E9
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A9999999999999999999999
- 999998989898988989BBD1D1E9FFFFFFFFFFFFFFFFFFE3878484848484848382
- 828282A1D1D1D1EEFFFFFFFFFFFFFFFFFFF08D6D6B6BAED1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33C3C3C3A3A3737373737373733332F6CD1D1D16E2F2F2F2E2E2E
- 2E2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFF46F252525252524242024202020
- 20202024A3D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA9A999999
- 9999999999999999999998989898989889BBD1D1E9FFFFFFFFFFFFFFFFFFE187
- 848484848484848382828296D1D1D1EEFFFFFFFFFFFFFFFFFFF58F6D6D6BAED1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3C3C3A3A3737373737373733336CD1D1
- D16F2F2F2F2F2E2E2E2E2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFE62D25252525
- 252424242420202020202024A7D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFF09A9999999999999999999999999999989898989889BBD1D1E9FFFFFF
- FFFFFFFFFFFFBD87878484848484848483828291C6D1D1E9FFFFFFFFFFFFFFFF
- FFFF966D6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3C3C3A3737373737
- 37373733336CD1D1D16F2F2F2F2F2F2E2E2E2B2B2B2B35D1D1D1EEFFFFFFFFFF
- FFF5902525252525252424242420202020202025BAD1D1EEFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFF9C99999999999999999999999999999999989898
- 98BBD1D1E9FFFFFFFFFFFFFFFFFFAB8787878484848484848483828EBBD1D1E9
- FFFFFFFFFFFFFFFFFFFFA86D6D6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D
- 3D3C3C3A3737373737373737336CD1D1D18B2F2F2F2F2F2F2E2E2E2E2B2B35D1
- D1D1EEFFFFFFFFFFFFB92B252525252525252524242420202020202AD1D1D1F4
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA9999999999999999999999
- 999999999998989898BBD1D1E9FFFFFFFFFFFFFFFFFF9C878787848484848484
- 84838284BAD1D1DDFFFFFFFFFFFFFFFFFFFFAA6D6D6DAED1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33D3D3C3C3C3A3A37373737373737336CD1D1D16F2F2F2F2F2F2E
- 2F2E2E2B2B2B35D1D1D1DDE9E9E9E9E9A7312525252525252525242424202420
- 20202035D1D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999
- 9999999999999999999999999898989898BBD1D1E9FFFFFFFFFFFFFFFFEB9287
- 878787848484848484838282B7D1D1DDF4FFFFFFFFFFFFFFFFFFAB6D6D6DAED1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3C3C3A3A373737373737376CD1D1
- D18B2F2F2F2F2F2F2E2F2E2E2B2B34B7B7BABABAB7A7A06E2B25252525252525
- 25252525242424242020206ED1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFBC9999999999999999999999999999999998989898BBD1D1E9FFFFFF
- FFFFFFFFFFBD8987878787848484848484848382ACD1D1D1F4FFFFFFFFFFFFFF
- FFFFAC6D6D6DAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3C3C3A3A3737
- 37373737376CD1D1D16F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2E2F2E2D2B2A2A
- 2625252525252525252525252424242420202094D1D1E9FFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFE199999999999999999999999999999999999898
- 98BBD1D1E9FFFFFFFFFFFFFFF4A88888878787878484848484848484AAD1D1D1
- F4FFFFFFFFFFFFFFFFFFAC6D6D6DAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D
- 3D3D3D3C3C3C3A3A37373737376CD1D1D18B2F2F2F2F2F2F2F2F2E2E2E2E2B2B
- 2B2B2B2B2B2B2B2A2A262525252525252525252525242424202025A6D1D1EEFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79A99999999999999999999
- 999999999999999898BBD1D1E9FFFFFFFFFFFFFFE08988888887878784848484
- 84848483A1D1D1D1F4FFFFFFFFFFFFFFFFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33D3D3D3D3D3D3C3A3A3A37373737376CD1D1D18B2F2F2F2F2F2F
- 2F2F2F2E2E2E2B2B2B2B2B2B2B2A2B2A2A262525252525252525252525242424
- 242028BAD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF09A9999
- 9999999999999999999999999999999998BBD1D1E9FFFFFFFFFFFFEB97898988
- 88888787878784848484848497D1D1D1EEFFFFFFFFFFFFFFFFFFAC6D6D6DB7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3D3D3D3B3A3A37373737376ED1D1
- D18B332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A26252525252525
- 2525252525252424242435D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFA899999999999999999999999999999999999998BBD1D1DDE9E9E9
- E9E9D2A88989898988888787878484848484848497CBD1D1EEFFFFFFFFFFFFFF
- FFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3D3D3D3D3D3D3B3C3A
- 3A373737376ED1D1D18B33332F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2B
- 2B2A2A2625252525252525252525242424248BD1D1E9FFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999999999999999999999
- 99B9BBC6C6C6BBBAAFAA93898989898989888887878787848484848491C6D1D1
- E9FFFFFFFFFFFFFFFFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3D
- 3D3D3D3D3D3D3C3C3A3A3737376ED1D1D18B3333332F2F2F2F2F2F2F2E2F2E2E
- 2E2B2B2B2B2B2B2B2B2A2A262525252525252525252525242425A3D1D1EEFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBD99999999999999999999
- 99999999999999999998989A9A9A998989898989898989898888888787878784
- 848484848FBBD1D1E9FFFFFFFFFFFFFFFFFFAB6D6D6DB7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33F3D3D3D3D3D3D3D3C3C3A3A3737376ED1D1D18B33332F2F2F2F
- 2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2A2A2A2A262525252525252525252524
- 242DC5D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A99
- 9999999999999999999999999999999999999898989898898989898989898989
- 89888888878787878484848487BBD1D1DDFFFFFFFFFFFFFFFFFFAA806D6DB7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3D3D3D3D3D3D3D3C3C3C3A3A376ED1D1
- D18B3733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A2A2A262525
- 2525252525252525256ED1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFEF9A99999999999999999999999999999999999999999898989889
- 898989898989898989898888878787878484848487BAD1D1DDFFFFFFFFFFFFFF
- FFFFA881806DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3D3D3D3D3D3D3D
- 3C3A3A37376ED1D1D18B373333332F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B
- 2B2B2B2A26252525252525252525252525A0D1D1EFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFA89999999999999999999999999999999999
- 9999999998989898898989898989898989898989888887878784848484B7D1D1
- DDFFFFFFFFFFFFFFFFFF97818180B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F
- 3F3F3D3D3D3D3D3D3D3C3B3A376ED1D1D18B37373333332F2F2F2F2F2F2F2F2F
- 2E2E2B2E2B2B2B2B2B2B2B2B2A26252525252525252525252DBAD1DDFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999
- 9999999999999999999999999898989898898989898989898989898988878787
- 8787848484B7D1D1DDFFFFFFFFFFFFFFFFF49181806DB7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE33F3F3F3F3D3D3D3D3D3D3C3C3C3A3A6ED1D1D18B37373333332F
- 2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2B2A26252525252525252525
- 6FD1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF99
- 9999999999999999999999999999999999999999999898989889898989898989
- 89898988888888878787848484AED1D1DDF4FFFFFFFFFFFFFFEF8F818180B7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3F3F3D3D3D3D3D3D3C3C3C3A6ED1D1
- D18B373737333333332F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2A2A26
- 252525252525252AA7D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFEB9A999999999999999999999999999999999999999999989898
- 989889898989898989898989898888878787878484ACD1D1D1F4FFFFFFFFFFFF
- FFEA87818181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3F3F3D3D3D3D3D
- 3D3D3C3C3A6ED1D1D18B3737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B
- 2B2B2B2B2B2A2626262525252525256ED1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C99999999999999999999999999999999
- 9999999999999998989898898989898989898989898988888787878784ACD1D1
- D1F4FFFFFFFFFFFFFFE782818181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B3F
- 3F3F3F3F3D3D3D3D3D3D3D3C3C6ED1D1D18B373737373733332F2F2F2F2F2F2F
- 2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A2A2625252525252DA7D1E9FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD9999999999999999
- 9999999999999999999999999999999898989898898989898989898989898888
- 8887878784AAD1D1D1F4FFFFFFFFFFFFFFE182818181B7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE36B6B3F3F3F3F3F3D3D3D3D3D3D3D3C6ED1D1D18B373737373733
- 33332F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2B2A2A262525252590D1
- DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
- 9999999999999999999999999999999999999999999999989898989889898989
- 89898989898989888888878787AAD1D1D1F4FFFFFFFFFFFFFFB882828181B7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B6B3F3F3F3F3D3D3D3D3D3D3D3D6ED1D1
- D18B37373737373733332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2A
- 2A2625252568C6DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFEF9A9999999999999999999999999999999999999999999999
- 989898988989898989898989898989888888878787A1D1D1D1F4FFFFFFFFFFFF
- FFAA82828181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B3F3F3F3F3F3D3D3D
- 3D3D3D3D3C6ED1D1D18B37373737373433332F2F2F2F2F2F2F2F2F2E2E2E2E2B
- 2B2B2B2B2B2B2B2A2A2A262535BADDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA999999999999999999999999999999
- 9999999999999999989898989889898989898989898989898888878787A8D1D1
- D1F4FFFFFFFFFFFFFF9782828281B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B
- 6B3F3F3F3F3F3D3D3D3D3D3D3D6ED1D1D18B3737373737373733332F2F2F2F2F
- 2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2A2A68B7E9FFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBD99999999999999
- 9999999999999999999999999999999999989898989889898989898989898989
- 8888888787A1D1D1D1F4FFFFFFFFFFFFEF9182828281B7D1D1DDFFFFFFFFFFFF
- FFFFFFFFFFE36B6B6B6B3F3F3F3F3F3D3D3D3D3D3D6ED1D1D18B373737373737
- 373333332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B6ECBF4FFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- EA9A999999999999999999999999999999999999999999999999989898988989
- 89898989898989898989888887A8D1D1D1F4FFFFFFFFFFFFE48482828282B7D1
- D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B6B6B6B3F3F3F3F3F3D3D3D3D3D6ED1D1
- D18C3A373737373737373734332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B
- 3BACF0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFA899999999999999999999999999999999999999999999
- 999998989898898989898989898989898989888888A1D1D1D1E9E9E9E9E9EEEE
- AF8282828281B9DDD1E9FFFFFFFFFFFFFFFFFFFFFFE36B6B6B6B6B3F3F3F3F3F
- 3F3D3D3D3D6ED1D1D18C3A37373737373737373434332F2F2F2F2F2F2F2E2F2E
- 2E2B2B2B2B2F6CACF0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC9C9E9A9A9A9A9A9A999999999999
- 999999999999999999999898989898988989898989898989898989888897C6C6
- C6C6C6C6C6CBCBCB978482828282E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFE36B6B
- 6B6B6B6B6B3F3F3F3F3D3D3D3D85FFFFFF963A3A37373737373737373434332F
- 2F2F2F2F2F2F2E2F2F34388BA6E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F0ECECE7
- E7E3BFBCADAA9C9A9A9A99999999999999999999989898989889898989898989
- 898989898887878E8F8F9192919297A1AEAEAEBEBFBDEFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFEFBCB9BCB8B8B8B8B8B8B8B8AFB8AFAFBDFFFFFFBEAFACAAA2AAA2
- A296969696908C8C8C8B909696A2ABB8BEE7F5FFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EBE1BDADA89A9A999999999999989898
- 9889898989898989898989898988878787878484848484A1D1D1E9FFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EAE1
- BCAA9A9A999998989898988989898989898989898988888787878484848487AE
- D1DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFF4EABFAD9C9A99989889898989898989898989898888
- 87878787848497C6DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFE1BCAA9A99898989
- 8989898989898888878787878491BBE9F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFF5EABFAB9C999889898989898888878789AAEBFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EAE1BCADAAA89BA8AABCE7FFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00}
- end
- end
- end
- object pnlBody: TPanel
- Left = 213
- Top = 0
- Width = 277
- Height = 186
- Align = alClient
- BevelOuter = bvNone
- TabOrder = 1
- object labDelphiShadow: TLabel
- Left = 77
- Top = 61
- Width = 130
- Height = 32
- Alignment = taCenter
- Anchors = []
- Caption = 'for Delphi'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clBlack
- Font.Height = -27
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = True
- end
- object labDelphi: TLabel
- Left = 75
- Top = 56
- Width = 130
- Height = 32
- Alignment = taCenter
- Anchors = []
- Caption = 'for Delphi'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clRed
- Font.Height = -27
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = True
- end
- object bvlSpit: TBevel
- Left = 6
- Top = 145
- Width = 269
- Height = 37
- ParentShowHint = False
- Shape = bsTopLine
- ShowHint = False
- end
- object labTitleShadow: TLabel
- Left = 87
- Top = 8
- Width = 99
- Height = 56
- Alignment = taCenter
- Anchors = []
- Caption = 'PHP'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clBlack
- Font.Height = -48
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = True
- end
- object labTitle: TLabel
- Left = 83
- Top = 3
- Width = 99
- Height = 56
- Alignment = taCenter
- Anchors = []
- Caption = 'PHP'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWhite
- Font.Height = -48
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = True
- end
- object lblAuthor: TLabel
- Left = 9
- Top = 114
- Width = 269
- Height = 31
- Alignment = taCenter
- Anchors = []
- AutoSize = False
- Caption = '(c) Copyright 2002-2006, Serhiy Perevoznyk'#13#10'All Rights Reserved'
- end
- object labVersion: TLabel
- Left = 4
- Top = 92
- Width = 271
- Height = 13
- Alignment = taCenter
- AutoSize = False
- Caption = 'Version 6.0'
- Layout = tlCenter
- end
- object btnOK: TButton
- Left = 200
- Top = 154
- Width = 75
- Height = 25
- Cursor = crHandPoint
- Cancel = True
- Caption = 'OK'
- Default = True
- ModalResult = 1
- TabOrder = 0
- end
- end
-end
+object dlgAbout: TdlgAbout
+ Left = 264
+ Top = 289
+ BorderStyle = bsDialog
+ Caption = 'About PHP4Delphi'
+ ClientHeight = 186
+ ClientWidth = 490
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = True
+ Position = poScreenCenter
+ Scaled = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object pnlLeft: TPanel
+ Left = 0
+ Top = 0
+ Width = 213
+ Height = 186
+ Align = alLeft
+ BevelOuter = bvNone
+ TabOrder = 0
+ object pnlImage: TPanel
+ Left = 6
+ Top = 8
+ Width = 200
+ Height = 168
+ BevelOuter = bvLowered
+ Caption = 'pnlImage'
+ TabOrder = 0
+ object imgAbout: TImage
+ Left = 1
+ Top = 1
+ Width = 198
+ Height = 166
+ Align = alClient
+ Center = True
+ Picture.Data = {
+ 07544269746D6170E6850000424DE6850000000000003604000028000000C700
+ 0000A60000000100080000000000B08100000000000000000000000100000001
+ 0000392110003929100039291800422910003D3118004A2910004A3110004A31
+ 18003D2D210052311800523918005A391800423525004E3921004A392D004532
+ 3F005E3D1C0065421B006B4221006B4A2100524231005A4A2D006B4A29006B52
+ 2900414D37005B4A41005C583D005D6743006B5033006B57400067584E006B6B
+ 4A00734A2100735221007B522100734A2900735229007B5229007B5A2900845A
+ 29007B523100735A31007B5A3100845A31008C633100845A3900846339008C63
+ 39007756480088634200846B4A008C6B39008C6B42008C6B4A00946B3900946B
+ 4200946B4A008C734A009473420094734A009C7342009C734A00A5734A00A57B
+ 4A001665650049516E00615965005F5B910086695C00786E6F006F6F94007373
+ 9C005149B5006B6BA9006B6BB5007373A5004541D2004944E0006767BD006767
+ D1004A4AE7003939EF004239EF00423DF3004242F7004239FF004242FF004A42
+ FF004A4AEF004A4AF7004A4AFF00524AEF005252E7005555F2006565ED006868
+ FC00217F7F0035877B00557F6300598E7C008C7B6300887B6F007B7B7F008383
+ 8800947352009C7352009C7B5200A77E52009C7C5A00AD845600A38361009F8A
+ 760017C5BB0012DAD2000FEAE60004F7F30000FFF70000FFFF0008FBFB0014FF
+ FF00689695006898BE00998C94009C9BCE0030CFC9002DF4F3004ADAD80074CF
+ CE00B5845A00B58C5A00B58C6300BD8C6300BD946300B58C6B00B5946B00BD94
+ 6B00C6946B00C69C6B00CE9C6B00AD8C7300AD947300B5947300BD947300BD9C
+ 7300AF967E00C19C7700C69C7B00C6A57B00AD9C8400B19C8800BAA28600C6A5
+ 8400CE9C7300CEA57300CEA57B00CEA58400CEAD8400D6A57B00D6AD7B00D6AD
+ 8400B7A79100C3AA8E00BDAB9A00B8ADA600ADADAD00ADADB500BFB5AE00C6BD
+ B500CEAD8C00D2B19000D2B59800D4BAA200D2BDAD00DAC6A900CEBDB500D6C6
+ B100ADA5BD00ADADC100ADADCE00BBB7BF00BDBDBD00C6BDC600C6C6C600CEC6
+ BD00D6C6B500D6CABD00CECAC600D6CEC600E1CBB500E1CEC000DED6C600EBD8
+ C300B5B5CE00BDBDCE00C6BDCE00C6C6CE00ADCECE00CECECE00D6CECE00C6D6
+ CE00BDBDD600BDCED600CECED600D6D6CE00C6D6D600C6C6DE00CECEDE00BDBD
+ FF00DED6CE00D6D6D600DED6D600DEDED600ADDEDE00C6DEDE00CEDEDE00D6DE
+ DE00B5E7E700D2DEE700ADF7F700C9F5F500D6FFFF00DEDEDE00DEDEEF00DEEF
+ EF00E7D6CE00E7DECE00EFDECE00EBDED600EFE7D600E7DEDE00E7E7DE00EFE7
+ DE00F7E7DE00E7E7E700EFE7E700EFEFE700F7EFE700E7EFEF00EFEFEF00F7EF
+ EF00F7F7EF00FFF7EF00DEDEF700DEF7F700F7F7F700FFF7F700FFFFF700DEDE
+ FF00E7E7FF00EFEFFF00F7F7FF00DEFFFF00E7FFFF00EFFFFF00F7FFFF00FFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFF4C57A676666677AC5F4FFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFF4F4F4F4FFFFFFFFFFFFFFFFFFFFFFFFFFF4C57A676666677AC5F4FFF4
+ F4F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EEEEEEEEEEEEEEEEEEEEEEF4F4
+ FFFFFFFFFFFFFFF4F4EEE9DDDDDDDDE9E9EEF4FFFFFFF4EEDE7B7B7B7B7B4F47
+ 6666677AB6E9E9DDDDDDE9EEF4FFF4F4EEEEEEEEEEF4FFFFF4EEEEEEEEEEF4F4
+ F4EEEEEEEEEEF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E9BAB4B4B4B4
+ B4B4B4B4B4B6C5DDE9F4FFFFFFFFF4E9C5B4A4A4A4A4A4A4A5B6D1EEF4EED1B6
+ 7B565656565656496666667AA4B3A4A4A4A4A5B6DDEEE9C5B4B4B4B4BAE9F4F4
+ D1B6B4B4B4B6C5DDC5B4B4B4B4B6E9F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFF4C5A47A7A7A7A7A7A7A7A7A7A7AA4B4D1EEF4FFF4D1B37A7A676767676767
+ 677AA4B6E9E9B37A4B5656565656564966666667676767676767677AB3D1C5A4
+ 7A7A7A7AA4C5EEEEB47A7A7A7A7AA4B4A47A7A7A7A7AC5F4FFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFF4B67A6766666666666666666767677AA4C5EEF4DDA57A
+ 67666666676767666667677AB6D1A46747565656565656496666666667676766
+ 666666677AB4B67A676666677AB6EEE9B36766666667A4B37A676666677AB6EE
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4B67A676666666666676766666666
+ 6767A4D1E9B67A67666666677A7A7A6766666667A4B6A4674756565656565649
+ 666666677A7A7A676666666667A4B47A676666677AB6EEE9A56766666667A4B3
+ 7A676666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4B67A67666666
+ 66677A7A6767666666677AB3D1A567666666677AB4C5A467666666677AB4A467
+ 475656565656564966666667A4C5B67A6766666667A4B37A676666677AB6EEE9
+ A56766666667A4B37A676666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7CFCF
+ CF7B7B4E4E4E4E4E4A4BB3B4A46766666666677B5E5E585454595C5E7BDEB67A
+ 67494E4E4F4F4F4A475656565656564A4E5C5956595F7BA467664E4E4E4F4F4F
+ 476666494E7B7B7B4F4A664E4E4E4F4F4F476666667AB6EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF5656565656565656565656565A5FB17A666666674F5656565656
+ 56565656565A7B7A675C56565656565C4756565656565656565656565656565E
+ 67475656565656564966665C56565656565046565656565656496666667AB6EE
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFCF5656565656565656565656565656594B6766
+ 675C565656565656565656565656564A675C56565656565C4756565656565656
+ 56565656565656564E475656565656564966665C565656565650465656565656
+ 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656565656
+ 56565656565847664A56565656565656565656565656565C675C56565656565C
+ 475656565656565656565656565656565C475656565656564966665C56565656
+ 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 56565656565656565656565656564F664F56565656565847674F565656565654
+ 475C56565656565C475656565656564E67475856565656565047565656565656
+ 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF0068686868686868686868686868686868686868686868
+ 6868686868686868686868686868686868686868686868686868A2FFFFFFFFFF
+ FFFFFFFFFFCF5656565656565647475C56565656565658675056565656565C66
+ 66495656565656564B5C56565656565C475656565656564966665C5656565656
+ 50475656565656564966665C56565656565046565656565656496666667AB6EE
+ FFFFFFA268686868686868686868686868686868686868686868686868686868
+ 686868686868686868686868686868686800BEBEBEBEBEBEBEBEBEBEBEBEBEBE
+ BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE
+ BEBEE6FFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565647
+ 5056565656565C6666495656565656567B5E56565656565C4756565656565649
+ 66665C565656565650475656565656564966665C565656565650465656565656
+ 56496666667AB6EEFFFFFFE6BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE
+ BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
+ 56565656565656465056565656565C6666495656565656564B5C56565656565C
+ 475656565656564966665C565656565650475656565656564966665C56565656
+ 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565646664956565656565656465056565656565C666649565656565656
+ 4B5C56565656565C475656565656564966665C56565656565047565656565656
+ 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF5656565656565646664956565656565656465056565656565C66
+ 6649565656565656475C56565656565C475656565656564966665C5656565656
+ 50475656565656564966665C56565656565046565656565656496666667AB6EE
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565646
+ 5056565656565C666649565656565656475C56565656565C4756565656565649
+ 66665C565656565650475656565656564966665C565656565650465656565656
+ 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
+ 56565656565656465056565656565C66666667A4C3CAB17A675C56565656565C
+ 475656565656564966665C565656565650475656565656564966665C56565656
+ 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565646664956565656565656465056565656565654545454545A5A5954
+ 475C56565656565C475656565656564966665C56565656565047565656565656
+ 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF5656565656565646664956565656565656465056565656565656
+ 5656565656565656475C56565656565C475656565656564966665C5656565656
+ 50475656565656564966665C56565656565046565656565656496666667AB6EE
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564666495656565656565646
+ 50565656565656565656565656565656475C56565656565C4756565656565649
+ 66665C565656565650475656565656564966665C565656565650465656565656
+ 56496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656466649
+ 565656565656564650565656565656565656565656565656475C56565656565C
+ 475656565656564966665C565656565650475656565656564966665C56565656
+ 565046565656565656496666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565646664956565656565656465056565656565C666649565656565656
+ 475C56565656565C475656565656564966665C56565656565047565656565656
+ 4966665C56565656565046565656565656496666667AB6EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF5656565656565646664956565656565656465056565656565C66
+ 6649565656565656475C56565656565C475656565656564966665C5656565656
+ 50475656565656564966665C56565656565046565656565656496666667AB6EE
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F4F4F4F4F4
+ F4FFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565643
+ 4D56565656564C454543565656565656434D56565656565C4756565656565649
+ 66454C56565656564D435656565656564366665C565656565650435656565656
+ 564345454566A4C5D1D1D1D1D1D1D1DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4
+ DDD1D1D1D1D1D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
+ 56565656565656414C56565656564D1E1941565656565656434D56565656565C
+ 475656565656564366454C56565656564C41565656565656431E1E4C56565656
+ 564D41565656565656431919191E659495959595A3D1D1D1F4FFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFE7BCACABA196969696C5D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565643454356565656565656414C56565656565C1E070F565656565656
+ 434D56565656565C475656565656564166454C56565656564C0F565656565656
+ 430E004856565656564C0F56565656565641000000030B13202020206CD1D1C5
+ EEF4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4FF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFA16D6B6B6B6B6B6B6EC5D1D1EEFFFFFFFFFFFFFF
+ FFFFFFFFFFCF5656565656565643454356565656565656424C56565656565E65
+ 0D0F565656565656464D56565656565C475656565656564166454D5656565656
+ 4C0F565656565656430E004856565656564D0F56565656565641010101030B13
+ 202020206CD1B6B3B6C5C5C5D1D1D1DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD1D1
+ D1C5C5C5BAC5E9F4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4826D6D6B6D6B6B6B82C5D1D1
+ EEFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565641
+ 4C56565656565EA01C415656565656564B5C56565656565C4756565656565641
+ 7A7A5C56565656564C0F565656565656430E004856565656564D0F5656565656
+ 5641030303071013202020206FC5B47A7A7A7A7A7A7AA4A4A4A4A4A4A4A4A4A4
+ A4A4A4A4A4A4A47A7A7A7A7A7AA4C5F4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE06D6D6D6D
+ 6B6B6B6B8BC6D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
+ 56565656565656424856565656565DB03143565656565656B25E56565656565C
+ 4756565656565649B6B25D56565656564C195656565656564E0E084C56565656
+ 56501E565656565656430A0A0A0B1113202020208BC5B37A7A7A7A6767676767
+ 6767676767676767676767676767676767677A7A7A7AB6EEFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFAA6D6D6D6D6D6B6B6B8DCBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565643454356565656565656434156565656565659585456565656565D
+ CD5E56565656565C4756565656565654595A565656565656481E565656565656
+ 5452525656565656565C45565656565656430707070710132020202094D1B6A4
+ B4A5A5A4A4A4A4A47A6767666666666666666666677A7AA4A4A4A5B3B3B6DDF4
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFF8F6D6D6D6D6D6D6B6B96D1D1D1F4FFFFFFFFFFFFFF
+ FFFFFFFFFFCF565656565656564345435656565656565643144C565656565656
+ 565656565656567BD15E56565656565C47565656565656565656565656565654
+ 421E5656565656565656565656565656565E4556565656565641010101030B13
+ 20202020A0D1C5D1EEE9E9E9E9DDDDD1B6A4676666666666666666677AB4C5DD
+ E9E9E9E9EEEEF4FFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA826D6D6D6D6D6D6D6BA0D1D1DD
+ FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656564345435656565656565643
+ 0E0F5C56565656565656565656537BCAD15E56565656565C4756565656565356
+ 5656565656565343231E56565656565656565656565656565DC8655656565656
+ 5643010000030B13201318187AC4C4D5DFF3F3FDFDFDF4F4EEC57A6766666767
+ 6767677AA5C4C4C4A5DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB9806D6D6D6D
+ 6D6D6B6BA2D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656434543
+ 565656565656564615167A7B5F5D5A565654504C4330A6D1D15E56565656565C
+ 4B565656564D1E435C56565A5E7B4523201E5656565656564E484C5356565D7B
+ CDD16756565656565643010101030B1320164040404040404040404040406040
+ 4040404040404040404040404040404040A5FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFA16D6D6D6D6D6D6D6D6BA6D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 565656565647674E565656565656547A322AA0D1CACACDCD65302D2D2B2BA6D1
+ D15E56565656565C7A7A7AB0C0B32424A3CECDCDCAD16C20201E565656565656
+ 49190C0C45B0C3D1D1D16F30B3CDC8B17A660706070710132017606060606060
+ 60606060606060606060606060606060606060606060606040A4FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFF4866D6D6D6D6D6D6D6D6DA7D1D1E9FFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF565656565656564F4F595656565656565DC16E2F95D1D1D1D1D1
+ 6F2B2B2B2B2BA6D1D15E56565656565ED1D1D1D1E9BB252595DDD1D1D1D16F20
+ 201E5656565656567B32101064B6D1D1D1D17A4D59595959594B161010111220
+ 201762637979797F79797C70707070707070707070707070707078797F7F7F7F
+ 79D9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE382816D6D6D6D6D6D6D6DB7D1D1E9
+ FFFFFFFFFFFFFFFFFFFFFFFFFFCF565656565656565656565656565656567BC5
+ 6F2F8BCBD1D1D1CB6F2E2B2B2B2BA6D1D15E56565656565FF4F4F4F4F4D02525
+ 6ED2D1D1D1CB6F20201E5656565656567B68131368BAD1D1D1CB7A5656565656
+ 567B2A131313202020202039D1D1D1F4FDFDFCDB7F7C7C7C7C7C7C7C7C7C7C7C
+ 786767B3E9FEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF81816D6D6D6D
+ 6D6D6D6DBAD1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFCF56565656565656565656
+ 56565656565ECDCB8B2F6CBAD1D1D1CB6F2E2E2B2B2BA6D1D15E56565656565F
+ FFFFFFFFFFD025253BC6D1D1D1D16F20201E565656565656B26420202EB7D1D1
+ D1D17A5656565656567B2A20202020202020206FD1D1DDFFFFFFFFFFF37E7C7C
+ 7C7C7C7C7C7C7E7866667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFA18181816D6D6D6D6D6D80BBD1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFCF5656
+ 5656565656565656565656565FCDD1D16E2F3BB7D1D1D1D16E2E2E2E2B2BA7D1
+ D15E56565656565FFFFFFFFFFFD025252DA7D1D1D1D16E20201E565656565656
+ B264202025A6D1D1D1D17A5656565656567B25202020202020202095D1D1E9FF
+ FFFFFFFFFE7E7E7E7E7E7E7E7E7E7E6766667AB4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFF487818180806D6D6D6D6D82C6D1D1EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFCF56565656565656565656544D48B0CAD1D1CB6E2F33A6D1D1D1CB
+ 6E2E2E2B2B2BA7D1D15E56565656565FFFFFFFFFFFD0252525A0D1D1D1D16E20
+ 201E565656565656B26420202094D1D1D1D17A5656565656567B282020202020
+ 202024A3D1D1E9FFFFFFFFFFFFDA7D7D7D7D7D7D7D7D7E6666667AB4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE78281818181816D6D6D6D86C6D1D1F0
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFAF8F8B5444465C1CDCDCDA4353795D1D1D1C5
+ 6E2F2F90D1D1D1C56C2F2E2E2B2EA7D1D1CEF8F8F8F8F8F9FFFFFFFFFFD02525
+ 256FCBD1D1C66C2420231D1D1D44CDCDCA642020206CCBD1D1C6641C30A4CDCD
+ CDA3242020202020202028A7D1D1EEFFFFFFFFFFFFDA7D7D7D7D7D7D7D7D7E66
+ 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC82818181816D6D
+ 6D6D6D8DCBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBE3D3D3DA3D1D1D1
+ 9637376EBAD1D1BA692F2F6CBAD1D1BA3B2F2F2E2E2BA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD025252531B7D1D1C53524202020202031D1D1D1642020202AA7D1
+ D1C53520206FD1D1D1A220202020202020202DC6D1D1F4FFFFFFFFFFFFDA7777
+ 7777777777777E6666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ A88282818181816D6D6D6D91CBD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ E36A3D3C8BC6D1D18B373737A6D1D1A7372F2F34A3D1D1A7342F2E2E2E2EA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD02525252595D1D1A72A24242420202031D1D1
+ D1682020202094D1D1B72A20202DB7D1D16F202020202020202068D1D1D1FFFF
+ FFFFFFFFFFDB76767676767676767C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFF8F828282818181816D6D6D96D1D1D1F4FFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFE76B3D3D3DA2D1A76A3737376EB7CB9037332F2F6CB7CB90
+ 2F2F2F2E2E2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525252531A7CB902524
+ 242020202031D1D1D168202020202DA6CB90202020206FC6B731202020202020
+ 202090D1D1DDFFFFFFFFFFFFFFDC75757575757575757C6666667AB6EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB8782828281818181816D6DA1D1D1D2F4
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF6E3D3D3D3D8B6E37373737376A8B37
+ 3733332F2F3D6E342F2F2F2F2E2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525
+ 2525252E6C2A2424242420202031D1D1D16820202020202D6825202020202335
+ 31131313131313202020A0D1D1E9F4F4F4F4F4F4F4DC75757575757575757C66
+ 66667AB4EEF4F4F4F4F4F4F4F4F4FFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE08282828282818181
+ 816D6DA2D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF46E3D3D3D3C3C3C
+ 3A3737373737373737332F2F2F2F2F2F2F2F2F2F2F2EA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD025252525252525252424242424202031D1D1D16C202020202020
+ 202020202020201210101010101010111116A0B4B4D1E9E9E9E9E9E9E9D57575
+ 7575757575757C66666667A5D1DDDDDDDDDDD1C5C5DDEEFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD
+ 8282828282818181818181A6D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF863D3D3D3D3C3C3C3A37373737373737373333332F2F2F2F2F2F2F2F2FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD025252525252525252525242424242031D1D1
+ D16820202020202020202020202013110703030307070707070D677A7AA4A4A4
+ A4A4A4A4A4A475757575757575757C666666677AA4A4A4A4A4A4A47A7AA5E9FF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFA8828282828282818181816DACD1D1DDFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF973D3D3D3D3C3C3C3C373737373737373737332F2F2F2F
+ 2F2F2F2F2F2EA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD025252525252525252525
+ 242424242031D1D1D16C20202020202020202020202013100301010101010101
+ 010E45454567676767676767676775757575757575757C666666666767676767
+ 6767676767A4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFF58F8282828282828281818181A7D1D1E9FF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA3D3D3D3D3D3C3C3C3A3A37373737
+ 37373733332F2F2F2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02525
+ 2525252525252525242424242432D1D1D16C202020202020202020202020130B
+ 0301000000000000001445454566666666666666666775757575757575757C66
+ 66666666666666666666666667A4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7878382828282828282
+ 818181B7D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB83D3D3D3D3D3D
+ 3C3C3A37373737373737373733332F2F2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD025252525252525252525242424242432D1D1D16C202020202020
+ 2020202020201310070100000000000000194545456666666666666666677575
+ 7575757575757C6666666666666666666666666667A4DDF4FFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF84
+ 8483828282828282818181BAD1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFBE6A3D3D3D3D3D3D3C3C3A3A373737373737373333332F2F2F2F2F2F2FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD026252525252525252525252424242432D1D1
+ D16C2020202020202020201F1F1F1F1B150C040202020101011E454566676767
+ 67676767676775757575757575757C6666666767676778786667676667A4DDF4
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFAD848484828282828282828182C5D1D1E9FFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFE36B3D3D3D3D3D3C3C3C3C3A3737373737373737373333
+ 2F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD026252525252525252525
+ 252525242435D1D1D16C202020202020202029797F7F7E7E7E7E717171717171
+ 717272727272727272727272727275757575757575757372727D7E7E7E7C7C61
+ 607A7A7A7AA4DDF4FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFA8848483838382828282828182C6D1D1E9FF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB6E3F3D3D3D3D3D3D3D3C3C3A3737
+ 37373737373733332F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02A26
+ 2525252525252525252525242435D1D1D16C20202020202020201F797F7F7E7E
+ 7D7D7D7775757575757575757575757575757575757575757575757575757575
+ 77777D7D7E7C7C6160B6B6B4B4C5EEFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF91848484848382828282
+ 828286C5D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4823F3D3D3D3D
+ 3D3D3C3C3C3A3A3737373737373737332F2F2F2F2F2FA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD02A262525252525252525252525252435D1D1D16C202020202020
+ 202062797F7F7E7E7D7D7D777575757575757575757575757575757575757575
+ 757575757575757577777D7D7E7C7C6160EEEEEEEEEEF4FFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB8784
+ 8484848382828282828287C6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFF8F3F3F3D3D3D3D3D3D3C3C3C3A3A3737373737373434332F2F2F2F2FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD02A2A2A26252525252525252525252435D1D1
+ D16C20202020202020201D797F7F7E7E7D7D7D77757575757575757575757575
+ 7575757575757575757575757575757577777D7D7E7C7C6160FFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFE18784848484848382828282828EC6D1D1EEFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFA13F3F3D3D3D3D3D3D3D3C3C3A3A3737373737373734
+ 33332F2F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2A2A2A262525252525
+ 252525252535D1D1D16C202020202020202020637F7F7E7E7D7D7D7775757575
+ 75757575757575757575757575757575757575757575757577777D7D7E7C7C61
+ 60FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFBD8484848484848483828282828EC6D1D1EEFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF3F3F3F3D3D3D3D3D3D3D3C3C3A
+ 3A373737373737373333332F2F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2A
+ 2A26262625252525252525252535D1D1D16C24202020202020202029797F7E7E
+ 7D7D7D7775757575757575757575757575757575757575757575757575757575
+ 77777D7D7E7C7C6160FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAB84848484848484848382
+ 82828FC6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBE6B3F3F3F3D
+ 3D3D3D3D3C3C3C3A3A373737373737373333332F2F2FA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD02B2B2A2A262525252525252525252535D1D1D16C242020202020
+ 20202020627F7E7E7E621F1B1A18181863C4D4D8DCDCDCDCDCDCDCDCDCDB7575
+ 7575757575757C78787879C4D8DAD47F7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA98784
+ 848484848484838282828EC6D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFE46D3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737333333332FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2A2A2A2625252525252525252535D1D1
+ D16C2420202020202020202024797E7E7D7820131107030142A4B6DDFFFFFFFF
+ FFFFFFFFFFFC75757575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFF938787848484848484838282828EC6D1D1E9FFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFEB6E3F3F3F3F3D3D3D3D3D3D3C3C3A373A3737373737
+ 373733332F2FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2A2A2A25252525
+ 252525252535D1D1D16C24202020202020202020201F7E7E7D7D1F20130B0701
+ 1E7AB3DDFFFFFFFFFFFFFFFFFFFC75757575757575757C6666667AB6EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFF08F87878484848484848483828286C5D1D1E9FF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6863F3F3F3F3D3D3D3D3D3D3D3C
+ 3C3C3A373737373737373333332FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B
+ 2B2B2A2A2A262525252525252535D1D1D16C242424242020202020202024787E
+ 7D7D7C20201109041E667AC5F4FFFFFFFFFFFFFFFFFC77757575757575757C66
+ 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA8987878784848484848484
+ 838282BBD1D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF963F3F3F3F
+ 3F3D3D3D3D3D3D3D3C3C3A3737373737373737333333A7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFD02B2B2B2B2B2A26252525252525252535D1D1D16C242424202020
+ 2020202020201F7E7D7D7D6220131007424567A4DDF4FFFFFFFFFFFFFFFC7775
+ 7575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE1898787
+ 8784848484848484848382AED1D1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFAC3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737373333A7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2B2B2B2A262525252525252535D1D1
+ D16C24242424202020202020202020637D7D7D7C1720120B1E45457AB4D3EEFF
+ FFFFFFFFFFFC77757575757575757C6666667AB6EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFBD8887878787848484848484848382A1D1D1D1D1EEF4FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFBD6B3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3A373737
+ 373737373333A7D1D1DDFFFFFFFFFFFFFFFFFFFFFFD02B2B2B2B2B2A2B2A2625
+ 252525252535D1D1D16C24242424202020202020202020297E7D7D7763201311
+ 09144266A4B6D1E9F4FFFFFFFFFC77757575757575757C6666667AB6EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFAD888787878787848484848484838287AED1D1D1
+ D1D1DDE9EEF4FFFFFFFFFFFFFFFFFFFFFFFFFFE36D6B3F3F3F3F3D3D3D3D3D3D
+ 3D3C3C3C3A3A3737373737373733A7D1D1DDEEEEEEEEEEEEEEEEEEEEEEBB2B2B
+ 2B2B2B2B2A2A2A26252525252535D1D1D16C2524242424202020202020202020
+ 627D7D77721D20131007041E67B3C5D1DDEEFFFFFFFD77757575757575757C66
+ 66667AB6EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA8988878787878484848484
+ 848483828796A2B7C6D1D1D1D1D1DDEBF4FFFFFFFFFFFFFFFFFFFFEB826B3F3F
+ 3F6A3F3D3D3D3D3D3D3D3C3C3A3A3737373737373737A7D1D1D1D1D1D1D1D1D1
+ D1D1D1D1D1A72B2B2B2B2B2B2B2A2A26252525252535D1D1D16C252524242420
+ 2020202020202020247C7D7775612020110A0301147AB6D1D1D1E9FFFFFD7775
+ 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B888888
+ 878787878484848484848483828282828E97ABB9D1D1D1D1D1DDE9F4FFFFFFFF
+ FFFFFFF68D6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A37373737373737376A6C
+ 6C6C6C6C6C6C6C6C6C6C6C68683B2B2B2B2B2B2B2B2B2A26252525252535D1D1
+ D16C2525242424242020202020202020201F7D7775731B2013100701010D6FBA
+ D1D1D1E9FFFD77757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFF9289898888878787878484848484848382828282828282868FA2B7CB
+ D1D1D1D1DDE9F4FFFFFFFFFFA16B6B3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A3A
+ 373737373737373434332F2F2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2B2A
+ 2A2525252535D1D1D16C25252524242420202020202020202020637775757017
+ 20120B0301030A64BAD1D1D1E9FD77757575757575757C6666667AB4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFEF9889898888888787878784848484848484838282
+ 828282828181828FA2B7C6D1D1D1D1DDEEF4FFFFAC6B6B6B3F3F3F3F3F3D3D3D
+ 3D3D3D3D3D3C3A3A37373737373737373433332F2F2F2F2F2F2F2F2F2E2E2B2E
+ 2B2B2B2B2B2B2B2B2A2A26252535D1D1D16C2525252424242424202020202020
+ 2020297C75757363201311090301030B64BAD1D1D1D977757575757575757C66
+ 66667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7898989898887878787878484
+ 848484848483828282828282828181816D828FA2BAD1D1D1D1D1E9F4BE6B6B6B
+ 3F3F3F3F3F3D3D3D3D3D3D3D3C3C3C3A3A3737373737373433332F2F2F2F2F2F
+ 2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2B2A26252535D1D1D16C252525252424
+ 242420202020202020202062767575711D20131007010107106CC6D1D1CC7775
+ 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE189898989
+ 898887878787878484848484848483828282828282828181816D6D6D8296A7C6
+ D1D1D1D1BB6D6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3A373737373737
+ 3733332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2A2A2A262535D1D1
+ D16C25252525252424242424202020202020201770757575612020120A030103
+ 0A126FD1D1CC7D757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFBF89898989898888878787878784848484848484838282828282828181
+ 81816D6D6D6D8086A2BBD1D1BB826B6B6B6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C
+ 3A3A373737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B
+ 2B2A2A262535D1D1D16C2525252525252424242020202020202020201B727575
+ 731B201311070101030B16A0D1CC7D757575757575757C6666667AB4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFBD8989898989888888878787878484848484848483
+ 82828282828282818181816D6D6D6D6D6D85A2B7D1866B6B6B6B6B3F3F3F3F3F
+ 3D3D3D3D3D3D3D3C3C3A37373737373737373733332F2F2F2F2F2F2F2F2F2E2E
+ 2E2E2B2B2B2B2B2B2B2B2A262635D1D1D16C2525252525252424242420202020
+ 202020202061757575701720120B030103071128A6CC7D757575757575757C66
+ 66667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC898989898989888887878787
+ 84848484848484838282828282828282818180806D6D6D6D6D6D6D82A2906B6B
+ 6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A3737373737373737332F2F2F2F
+ 2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2B2A2635D1D1D16C252525252525
+ 25242424242020202020202020177175757461202011090301030A1235C77D75
+ 7575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD89898989
+ 8989898888878787878784848484848383838282828282828181816D6D6D6D6D
+ 6D6D6D6D6D95966D6B6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A37373737
+ 373737373333332F2F2F2F2F2F2F2F2F2E2E2B2B2B2B2B2B2B2B2B2A2A35D1D1
+ D16C252525252525252524242424202020202020202062737575721B20131007
+ 01010710136F7D757575757575757C6666667AB4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFAA89898989898989898887878787878484848484848382828282828282
+ 828181816D6D6D6D6D6D6D6D6B8DC6AE8C6B6B6B3F3F3F3F3F3F3D3D3D3D3D3D
+ 3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B
+ 2B2B2B2A2A39D1D1D16C25252525252525252424242420202020202020202361
+ 757575702020120B0301030911297D757575757575757C66666667B4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFA98989898989898988888887878787878484848484
+ 84848382828282828281818181816D6D6D6D6D6D6D82BBD1BBA16E6B6B3F3F3F
+ 3F3F3D3D3D3D3D3D3D3C3C3C3A3A3737373737373434332F2F2F2F2F2F2F2F2F
+ 2F2E2E2E2B2B2B2B2B2B2B2B2A39D1D1D16C2525252525252525252424242420
+ 202020202020201D7175757362201311090301030B1671757575757575757C66
+ 666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C898989898989898988888887
+ 878787848484848484848382828282828282818180806D6D6D6D6D6D6D6DB7D1
+ D1D2BE856B3F3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3A37373737373737343333
+ 2F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B39D1D1D16C252525252525
+ 2525252424242420202020202020202062747575711C20131007010107157175
+ 7575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9A89898989
+ 898989898989888887878787848484848484848382828282828281818181816D
+ 6D6D6D6D6D6DACD1D1D1F4E78D6B6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3737
+ 3737373737373333332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B39D1D1
+ D16C252525252525252525252424242420202020202020201770757575612020
+ 120A0301030D71757575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFF59A89898989898989898989888888878787878484848484848382828282
+ 828282818181806D6D6D6D6D6D6DA2D1D1D1EEFFEA916B3F3F3F3F3F3F3D3D3D
+ 3D3D3D3C3C3A3A373737373737343733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B
+ 2B2B2B2B2B39D1D1D16C25252525252525252525252424242420202020202020
+ 201B727575721B2013110703010470757575757575757C66666667B4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFF49A8989898989898989898989888887878784848484
+ 8484848483828282828282818181816D6D6D6D6D6D6D96D1D1D1E9FFFFEB8F6B
+ 3F3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37373737373737373333332F2F2F2F2F
+ 2F2F2F2F2E2E2E2B2B2B2B2B2B68D1D1D16C2525252525252525252525242424
+ 2420202020202020202061757575701720131007010470757575757575757C66
+ 666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF9A988989898989898989898988
+ 8888878787878484848484848382828282828282828181816D6D6D6D6D6D86C5
+ D1D1E9FFFFFFE7863F3F3F3F3F3F3D3D3D3D3D3D3C3C3C3A3737373737373737
+ 33332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B68D1D1D16E262525252525
+ 2525252525242424242020202020202020201770757574612020120A03027075
+ 7575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEC9A98898989
+ 8989898989898989888887878787848484848484848382828282828282818181
+ 816D6D6D6D6D82BAD1D1DDFFFFFFFFE3823F3F3F3F3F3D3D3D3D3D3D3D3C3C3C
+ 3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B68D1D1
+ D16E2A2625252525252525252525252424242420202020202020201B73757572
+ 1B201311070470757575757575757C66666667B4EEFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFEB9998988989898989898989898989888887878787848484848484848382
+ 828282828282818181816D6D6D6D6DAED1D1D1F4FFFFFFFFBC6B3F3F3F3F3F3D
+ 3D3D3D3D3D3D3C3C3A373A3737373737373333332F2F2F2F2F2F2F2F2F2E2E2E
+ 2E2B2B2B2B68D1D1D16E2A262525252525252525252525242424242020202020
+ 202020206175757570162013100770757575757575757C66666667B4EEFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFEB999898988989898989898989898988888887878787
+ 848484848484848382828282828281818181816D6D6D6DA6D1D1D1F4FFFFFFFF
+ F6AA6B3F3F3F3F3F3D3D3D3D3D3D3D3C3C3A37373737373737373333332F2F2F
+ 2F2F2F2F2F2F2E2E2E2E2B2B2B68D1D1D16E2A2A262525252525252525252525
+ 2424242420202020202020201C71757573622020110A70757575757575757C66
+ 666667B3E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE799989898898989898989898989
+ 89898888878787878484848484848483828282828282828181816D6D6D6D6DA1
+ D1D1D1EEFFFFFFFFFFEB863F3F3F3F3F3F3D3D3D3D3D3D3C3C3A3A3737373737
+ 37373333332F2F2F2F2F2F2F2F2F2F2E2E2B2B2B2B68D1D1D16E2B2A26252525
+ 25252525252525252424242420202020202020202062737575721D2013117075
+ 7575757575757C66666667B3E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79998989898
+ 8989898989898989898989888887878787878484848484838382828282828281
+ 8181816D6D6D6D8FCBD1D1E9FFFFFFFFFFFFBE6D3F3F3F3F3F3D3D3D3D3D3D3D
+ 3C3C3A3A37373737373737373333332F2F2F2F2F2F2F2F2F2E2E2B2B2B68D1D1
+ D16E2B2A2A262525252525252525252525242424242020202020202020236175
+ 75757020201370757575757575757C66666667B3E9FFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFE79998989898898989898989898989898988888787878784848484848484
+ 8382828282828282818181816D6D6D86BBD1D1DDFFFFFFFFFFFFF6A13F3F3F3F
+ 3F3D3D3D3D3D3D3D3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2E
+ 2E2E2E2B2B68D1D1D16E2A2A2A2A252525252525252525252525242424202020
+ 2020202020201D7175757362201670757575757575757C66666667B3E9FFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFE7999998989898898989898989898989898988888787
+ 878784848484848484838282828282828181818181806D81B7D1D1DDF4FFFFFF
+ FFFFFFE7823F3F3F3F3F3D3D3D3D3D3D3D3C3C3A3A3A3737373737373733332F
+ 2F2F2F2F2F2F2F2F2F2E2E2E2B68D1D1D16E2B2B2A2A26262525252525252525
+ 25252524242420202020202020202062737575721D1670757575757575757C66
+ 666667A5E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE399999898989898898989898989
+ 898F89898888888787878784848484848484838282828282828281818181806D
+ ACD1D1D1F4FFFFFFFFFFFFFFAA6B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A373737
+ 37373737373333332F2F2F2F2F2F2F2F2F2E2E2E2B68D1D1D16E2B2B2B2A2625
+ 2525252525252525252A2A2A2524242020202020202020247075757570177075
+ 7575757575757C66666667A5E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39999989898
+ 9898988989898989898989898988888887878787848484848484848382828282
+ 8282828181818180A1D1D1D1EEFFFFFFFFFFFFFFE7826B3F3F3F3F3F3D3D3D3D
+ 3D3D3D3C3A3A37373737373737373333332F2F2F2F2F2F2F2F2F2E2E2B68D1D1
+ D16E2B2B2B2B2A2A2625252525252EA3A6A6BBD0BEAEA0682520202020202020
+ 1D717575736370757575757575757C66666667A5E9FFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFE39999999898989898898989898989898989898988888787878784848484
+ 8484838282828282828282818181808096D1D1D1E9FFFFFFFFFFFFFFFFAA6B3F
+ 3F3F3F3F3F3D3D3D3D3D3C3C3C3A3A37373737373737333333332F2F2F2F2F2F
+ 2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A26252525252531D1D1D1EEFFFFFFFFF0
+ AE2E20202020202020627475757271757575757575757C66666667A4E9FFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFE79A9999999898989898898989898989898989898888
+ 8787878787848484848484838282828282828281818181808DC6D1D1E9FFFFFF
+ FFFFFFFFFFE36D6B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A3A3737373737373737
+ 3333332F2F2F2F2F2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A2A262525252531D1
+ D1D1EEFFFFFFFFFFFFB925202020202020247075757575757575757575757C45
+ 666667A4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A999999999898989889898989
+ 8989898989898988888787878787848484848484838282828282828281818181
+ 82BAD1D1DDFFFFFFFFFFFFFFFFF5966B3F3F3F3F3F3D3D3D3D3D3D3D3C3A3A37
+ 373737373737373733332F2F2F2F2F2F2F2F2F2E2E68D1D1D16E2B2B2B2B2B2A
+ 2A2A2625252531D1D1D1EEFFFFFFFFFFFFF596202020202020201D7277777777
+ 7777777777777C45666667A4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79A99999999
+ 9898989898898989898989898989898988888887878784848484848484838282
+ 828282828281818181B7D1D1DDF4FFFFFFFFFFFFFFFFBD6B6B3F3F3F3F3F3D3D
+ 3D3D3D3D3D3C3C3A3A3A3737373737373733332F2F2F2F2F2F2F2F2F2F68D1D1
+ D16E2B2B2B2B2B2B2A26262A252531D1D1D1EEFFFFFFFFFFFFFFEB3520202020
+ 202020637D7777777777777777777E45676667A4E9F4FFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFE79A99999999999898989898898989898989898989898888898F89898784
+ 8484848484838282828282828282818181A6D1D1D1F4FFFFFFFFFFFFFFFFEB82
+ 6B3F3F3F3F3FA2A6A6AEBEBEBEBEBEBEBEBEBEBEBEAC3737373733332F2F2F2F
+ 2F2F2F2F2F68D1D1D16E2B2B2B2B2B2B2B2A2625252531D1D1D1EEFFFFFFFFFF
+ FFFFFFA220202020202020247C7D7D7D7D7D7D7D7D7D7E7A7A6767A4DDF4FFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFE79A9999999999989898989898898989898989898989
+ 89ACB7B7BEE7E4E1BCA9878484848483828282828282818181A1D1D1D1EEFFFF
+ FFFFFFFFFFFFFFA16B3F3F3F3F3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE13737
+ 37373333332F2F2F2F2F2F2F2F6AD1D1D16E2B2B2B2B2B2B2B2B2A26252534D1
+ D1D1EEFFFFFFFFFFFFFFFFE625202020202020201D7E7D7D7D7D7D7D7D7D7EB4
+ B6A4A4B4E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA9A999999999999989898989889
+ 898989898989898989BBD1D1E9FFFFFFFFFFE49C848484838282828282818181
+ 8196D1D1D1E9FFFFFFFFFFFFFFFFFFBE6B6B3F3F3F3FA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE1373737373333332F2F2F2F2F2F2F2F68D1D1D16E2B2B2B2B2B2B
+ 2B2A2A2A262534D1D1D1EEFFFFFFFFFFFFFFFFF0352020202020202020637E7E
+ 7E7E7E7E7E7E7FC5EEE9DDE9F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF9A99999999
+ 9999999898989898898989898989898989BBD1D1E9FFFFFFFFFFFFEB92848483
+ 8282828282828282818DC5D1D1E9FFFFFFFFFFFFFFFFFFEB826B6B3F3F3FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE1373737373733332F2F2F2F2F2F2F2F6AD1D1
+ D16E2B2B2B2B2B2B2B2B2A2A2A2634D1D1D1EEFFFFFFFFFFFFFFFFF56F202020
+ 202020202024787E7E7E7E7E7E7E7FD1F4F4F4F4FFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFF09A999999999999999898989898898989898989898989BBD1D1E9FFFFFF
+ FFFFFFFFE087848483828282828282818182BAD1D1DDFFFFFFFFFFFFFFFFFFFF
+ 916B6B6B3F3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE337373737373733332F2F
+ 2F2F2F2F2F6AD1D1D16E2E2B2B2B2B2B2B2B2B2A2A2A34D1D1D1EEFFFFFFFFFF
+ FFFFFFFF952020202020202020201D797F7E7E7E7E7E7FD1F4FFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFF59A9999999999999999989898989889898989898989
+ 89BBD1D1E9FFFFFFFFFFFFFFFFAA848484838282828282828181B7D1D1D1F4FF
+ FFFFFFFFFFFFFFFFAC6B6B6B6B3FA7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE13737
+ 373737373733332F2F2F2F2F2F6AD1D1D16E2E2E2B2B2B2B2B2B2B2B2A2A34D1
+ D1D1EEFFFFFFFFFFFFFFFFFFA224202020202020202020201F787F7F7F7F7FD1
+ F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9A999999999999999999989898
+ 988989898989898989BBD1D1E9FFFFFFFFFFFFFFFFE387848484838282828282
+ 8181ABD1D1D1F4FFFFFFFFFFFFFFFFFFE16D6B6B6B3FA7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33737373737373333332F2F2F2F2F2F6AD1D1D16E2E2B2B2B2B2B
+ 2B2B2B2B2B2A34D1D1D1EEFFFFFFFFFFFFFFFFFFA62424202020202020202020
+ 20202962787F7FD1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C99999999
+ 9999999999989898989898898989898989BBD1D1E9FFFFFFFFFFFFFFFFF59384
+ 84848382828282828282A1D1D1D1EEFFFFFFFFFFFFFFFFFFEB826B6B6B3FA7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE337373737373737373434332F2F2F2F6AD1D1
+ D16E2E2E2B2B2B2B2B2B2B2B2B2B34D1D1D1EEFFFFFFFFFFFFFFFFFFA2242420
+ 2020202020202020202020206FC4CCD1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFA8999999999999999999989898989898988989898989BBD1D1E9FFFFFF
+ FFFFFFFFFFFFAB848484838282828282828196D1D1D1E9FFFFFFFFFFFFFFFFFF
+ F58F6B6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33A373737373737373333
+ 2F2F2F2F2F6AD1D1D16E2E2E2E2B2B2B2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFF
+ FFFFFFFFA02424202020202020202020202020206FD1D1D1F4FFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFAB9999999999999999999999989898988989898989
+ 89BBD1D1E9FFFFFFFFFFFFFFFFFFBD84848484838282828282828FC6D1D1E9FF
+ FFFFFFFFFFFFFFFFFFA16B6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33A3A
+ 3737373737373733332F2F2F2F6CD1D1D16E2E2E2E2E2B2B2B2B2B2B2B2B35D1
+ D1D1EEFFFFFFFFFFFFFFFFFF902424242420202020202020202020206FD1D1D1
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999999998
+ 989898988989898989BBD1D1E9FFFFFFFFFFFFFFFFFFE1878484848483828282
+ 828287BAD1D1DDFFFFFFFFFFFFFFFFFFFFAF6B6B6B6BAED1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33A3A3737373737373733332F2F2F2F6AD1D1D16E2F2E2E2E2E2B
+ 2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFFFF46E2524242420202020202020
+ 202020206FD1D1D1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC99999999
+ 9999999999999998989898989889898989BBD1D1E9FFFFFFFFFFFFFFFFFFE487
+ 8484848484838282828282B7D1D1DDF6FFFFFFFFFFFFFFFFFFE06B6B6B6BAED1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33A3A37373737373737373434332F2F6CD1D1
+ D16E2F2F2E2E2E2E2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFFFF035252424
+ 24242020202020202020202090D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFBD999999999999999999999999989898989898898989BBD1D1E9FFFFFF
+ FFFFFFFFFFFFE78F8484848484838282828282ACD1D1D1F4FFFFFFFFFFFFFFFF
+ FFE66D6B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33C3A3A37373737373737
+ 3434332F2F6CD1D1D16E2F2F2F2E2E2B2B2B2B2B2B2B35D1D1D1EEFFFFFFFFFF
+ FFFFFFE72A25252424242020202020202020202094D1D1DDFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFE19999999999999999999999999998989898988989
+ 89BBD1D1E9FFFFFFFFFFFFFFFFFFE78F8484848484848382828282AAD1D1D1F4
+ FFFFFFFFFFFFFFFFFFEB856B6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3C
+ 3A3A373737373737373733332F6CD1D1D16E2F2F2F2F2E2E2B2B2B2B2B2B35D1
+ D1D1EEFFFFFFFFFFFFFFFFAC25252525242424202020202020202020A0D1D1E9
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A9999999999999999999999
+ 999998989898988989BBD1D1E9FFFFFFFFFFFFFFFFFFE3878484848484848382
+ 828282A1D1D1D1EEFFFFFFFFFFFFFFFFFFF08D6D6B6BAED1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33C3C3C3A3A3737373737373733332F6CD1D1D16E2F2F2F2E2E2E
+ 2E2B2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFF46F252525252524242024202020
+ 20202024A3D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA9A999999
+ 9999999999999999999998989898989889BBD1D1E9FFFFFFFFFFFFFFFFFFE187
+ 848484848484848382828296D1D1D1EEFFFFFFFFFFFFFFFFFFF58F6D6D6BAED1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3C3C3A3A3737373737373733336CD1D1
+ D16F2F2F2F2F2E2E2E2E2B2B2B2B35D1D1D1EEFFFFFFFFFFFFFFE62D25252525
+ 252424242420202020202024A7D1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFF09A9999999999999999999999999999989898989889BBD1D1E9FFFFFF
+ FFFFFFFFFFFFBD87878484848484848483828291C6D1D1E9FFFFFFFFFFFFFFFF
+ FFFF966D6B6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3C3C3A3737373737
+ 37373733336CD1D1D16F2F2F2F2F2F2E2E2E2B2B2B2B35D1D1D1EEFFFFFFFFFF
+ FFF5902525252525252424242420202020202025BAD1D1EEFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFF9C99999999999999999999999999999999989898
+ 98BBD1D1E9FFFFFFFFFFFFFFFFFFAB8787878484848484848483828EBBD1D1E9
+ FFFFFFFFFFFFFFFFFFFFA86D6D6BAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D
+ 3D3C3C3A3737373737373737336CD1D1D18B2F2F2F2F2F2F2E2E2E2E2B2B35D1
+ D1D1EEFFFFFFFFFFFFB92B252525252525252524242420202020202AD1D1D1F4
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA9999999999999999999999
+ 999999999998989898BBD1D1E9FFFFFFFFFFFFFFFFFF9C878787848484848484
+ 84838284BAD1D1DDFFFFFFFFFFFFFFFFFFFFAA6D6D6DAED1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33D3D3C3C3C3A3A37373737373737336CD1D1D16F2F2F2F2F2F2E
+ 2F2E2E2B2B2B35D1D1D1DDE9E9E9E9E9A7312525252525252525242424202420
+ 20202035D1D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999
+ 9999999999999999999999999898989898BBD1D1E9FFFFFFFFFFFFFFFFEB9287
+ 878787848484848484838282B7D1D1DDF4FFFFFFFFFFFFFFFFFFAB6D6D6DAED1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3C3C3A3A373737373737376CD1D1
+ D18B2F2F2F2F2F2F2E2F2E2E2B2B34B7B7BABABAB7A7A06E2B25252525252525
+ 25252525242424242020206ED1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFBC9999999999999999999999999999999998989898BBD1D1E9FFFFFF
+ FFFFFFFFFFBD8987878787848484848484848382ACD1D1D1F4FFFFFFFFFFFFFF
+ FFFFAC6D6D6DAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3C3C3A3A3737
+ 37373737376CD1D1D16F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2E2F2E2D2B2A2A
+ 2625252525252525252525252424242420202094D1D1E9FFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFE199999999999999999999999999999999999898
+ 98BBD1D1E9FFFFFFFFFFFFFFF4A88888878787878484848484848484AAD1D1D1
+ F4FFFFFFFFFFFFFFFFFFAC6D6D6DAED1D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D
+ 3D3D3D3C3C3C3A3A37373737376CD1D1D18B2F2F2F2F2F2F2F2F2E2E2E2E2B2B
+ 2B2B2B2B2B2B2B2A2A262525252525252525252525242424202025A6D1D1EEFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE79A99999999999999999999
+ 999999999999999898BBD1D1E9FFFFFFFFFFFFFFE08988888887878784848484
+ 84848483A1D1D1D1F4FFFFFFFFFFFFFFFFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33D3D3D3D3D3D3C3A3A3A37373737376CD1D1D18B2F2F2F2F2F2F
+ 2F2F2F2E2E2E2B2B2B2B2B2B2B2A2B2A2A262525252525252525252525242424
+ 242028BAD1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF09A9999
+ 9999999999999999999999999999999998BBD1D1E9FFFFFFFFFFFFEB97898988
+ 88888787878784848484848497D1D1D1EEFFFFFFFFFFFFFFFFFFAC6D6D6DB7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33D3D3D3D3D3D3D3B3A3A37373737376ED1D1
+ D18B332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A26252525252525
+ 2525252525252424242435D1D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFA899999999999999999999999999999999999998BBD1D1DDE9E9E9
+ E9E9D2A88989898988888787878484848484848497CBD1D1EEFFFFFFFFFFFFFF
+ FFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3D3D3D3D3D3D3B3C3A
+ 3A373737376ED1D1D18B33332F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2B
+ 2B2A2A2625252525252525252525242424248BD1D1E9FFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999999999999999999999
+ 99B9BBC6C6C6BBBAAFAA93898989898989888887878787848484848491C6D1D1
+ E9FFFFFFFFFFFFFFFFFFAC6D6D6DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3D
+ 3D3D3D3D3D3D3C3C3A3A3737376ED1D1D18B3333332F2F2F2F2F2F2F2E2F2E2E
+ 2E2B2B2B2B2B2B2B2B2A2A262525252525252525252525242425A3D1D1EEFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBD99999999999999999999
+ 99999999999999999998989A9A9A998989898989898989898888888787878784
+ 848484848FBBD1D1E9FFFFFFFFFFFFFFFFFFAB6D6D6DB7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33F3D3D3D3D3D3D3D3C3C3A3A3737376ED1D1D18B33332F2F2F2F
+ 2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2A2A2A2A262525252525252525252524
+ 242DC5D1D1F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE39A99
+ 9999999999999999999999999999999999999898989898898989898989898989
+ 89888888878787878484848487BBD1D1DDFFFFFFFFFFFFFFFFFFAA806D6DB7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3D3D3D3D3D3D3D3C3C3C3A3A376ED1D1
+ D18B3733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A2A2A262525
+ 2525252525252525256ED1D1E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFEF9A99999999999999999999999999999999999999999898989889
+ 898989898989898989898888878787878484848487BAD1D1DDFFFFFFFFFFFFFF
+ FFFFA881806DB7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3D3D3D3D3D3D3D
+ 3C3A3A37376ED1D1D18B373333332F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B
+ 2B2B2B2A26252525252525252525252525A0D1D1EFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFA89999999999999999999999999999999999
+ 9999999998989898898989898989898989898989888887878784848484B7D1D1
+ DDFFFFFFFFFFFFFFFFFF97818180B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F
+ 3F3F3D3D3D3D3D3D3D3C3B3A376ED1D1D18B37373333332F2F2F2F2F2F2F2F2F
+ 2E2E2B2E2B2B2B2B2B2B2B2B2A26252525252525252525252DBAD1DDFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD999999999999999999
+ 9999999999999999999999999898989898898989898989898989898988878787
+ 8787848484B7D1D1DDFFFFFFFFFFFFFFFFF49181806DB7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE33F3F3F3F3D3D3D3D3D3D3C3C3C3A3A6ED1D1D18B37373333332F
+ 2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2B2A26252525252525252525
+ 6FD1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF99
+ 9999999999999999999999999999999999999999999898989889898989898989
+ 89898988888888878787848484AED1D1DDF4FFFFFFFFFFFFFFEF8F818180B7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3F3F3D3D3D3D3D3D3C3C3C3A6ED1D1
+ D18B373737333333332F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2A2A26
+ 252525252525252AA7D1DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFEB9A999999999999999999999999999999999999999999989898
+ 989889898989898989898989898888878787878484ACD1D1D1F4FFFFFFFFFFFF
+ FFEA87818181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE33F3F3F3F3F3D3D3D3D3D
+ 3D3D3C3C3A6ED1D1D18B3737373733332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B
+ 2B2B2B2B2B2A2626262525252525256ED1D1EEFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C99999999999999999999999999999999
+ 9999999999999998989898898989898989898989898988888787878784ACD1D1
+ D1F4FFFFFFFFFFFFFFE782818181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B3F
+ 3F3F3F3F3D3D3D3D3D3D3D3C3C6ED1D1D18B373737373733332F2F2F2F2F2F2F
+ 2F2F2E2E2E2E2B2B2B2B2B2B2B2B2A2A2625252525252DA7D1E9FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD9999999999999999
+ 9999999999999999999999999999999898989898898989898989898989898888
+ 8887878784AAD1D1D1F4FFFFFFFFFFFFFFE182818181B7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE36B6B3F3F3F3F3F3D3D3D3D3D3D3D3C6ED1D1D18B373737373733
+ 33332F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2B2A2A262525252590D1
+ DDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
+ 9999999999999999999999999999999999999999999999989898989889898989
+ 89898989898989888888878787AAD1D1D1F4FFFFFFFFFFFFFFB882828181B7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B6B3F3F3F3F3D3D3D3D3D3D3D3D6ED1D1
+ D18B37373737373733332F2F2F2F2F2F2F2F2F2F2E2E2E2B2B2B2B2B2B2B2B2A
+ 2A2625252568C6DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFEF9A9999999999999999999999999999999999999999999999
+ 989898988989898989898989898989888888878787A1D1D1D1F4FFFFFFFFFFFF
+ FFAA82828181B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B3F3F3F3F3F3D3D3D
+ 3D3D3D3D3C6ED1D1D18B37373737373433332F2F2F2F2F2F2F2F2F2E2E2E2E2B
+ 2B2B2B2B2B2B2B2A2A2A262535BADDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAA999999999999999999999999999999
+ 9999999999999999989898989889898989898989898989898888878787A8D1D1
+ D1F4FFFFFFFFFFFFFF9782828281B7D1D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B
+ 6B3F3F3F3F3F3D3D3D3D3D3D3D6ED1D1D18B3737373737373733332F2F2F2F2F
+ 2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B2A2A68B7E9FFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBD99999999999999
+ 9999999999999999999999999999999999989898989889898989898989898989
+ 8888888787A1D1D1D1F4FFFFFFFFFFFFEF9182828281B7D1D1DDFFFFFFFFFFFF
+ FFFFFFFFFFE36B6B6B6B3F3F3F3F3F3D3D3D3D3D3D6ED1D1D18B373737373737
+ 373333332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B2B2B2B6ECBF4FFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ EA9A999999999999999999999999999999999999999999999999989898988989
+ 89898989898989898989888887A8D1D1D1F4FFFFFFFFFFFFE48482828282B7D1
+ D1DDFFFFFFFFFFFFFFFFFFFFFFE36B6B6B6B6B3F3F3F3F3F3D3D3D3D3D6ED1D1
+ D18C3A373737373737373734332F2F2F2F2F2F2F2F2F2E2E2E2E2B2B2B2B2B2B
+ 3BACF0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFA899999999999999999999999999999999999999999999
+ 999998989898898989898989898989898989888888A1D1D1D1E9E9E9E9E9EEEE
+ AF8282828281B9DDD1E9FFFFFFFFFFFFFFFFFFFFFFE36B6B6B6B6B3F3F3F3F3F
+ 3F3D3D3D3D6ED1D1D18C3A37373737373737373434332F2F2F2F2F2F2F2E2F2E
+ 2E2B2B2B2B2F6CACF0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC9C9E9A9A9A9A9A9A999999999999
+ 999999999999999999999898989898988989898989898989898989888897C6C6
+ C6C6C6C6C6CBCBCB978482828282E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFE36B6B
+ 6B6B6B6B6B3F3F3F3F3D3D3D3D85FFFFFF963A3A37373737373737373434332F
+ 2F2F2F2F2F2F2E2F2F34388BA6E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F0ECECE7
+ E7E3BFBCADAA9C9A9A9A99999999999999999999989898989889898989898989
+ 898989898887878E8F8F9192919297A1AEAEAEBEBFBDEFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFEFBCB9BCB8B8B8B8B8B8B8B8AFB8AFAFBDFFFFFFBEAFACAAA2AAA2
+ A296969696908C8C8C8B909696A2ABB8BEE7F5FFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EBE1BDADA89A9A999999999999989898
+ 9889898989898989898989898988878787878484848484A1D1D1E9FFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EAE1
+ BCAA9A9A999998989898988989898989898989898988888787878484848487AE
+ D1DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFF4EABFAD9C9A99989889898989898989898989898888
+ 87878787848497C6DDF4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFE1BCAA9A99898989
+ 8989898989898888878787878491BBE9F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFF5EABFAB9C999889898989898888878789AAEBFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EAE1BCADAAA89BA8AABCE7FFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00}
+ end
+ end
+ end
+ object pnlBody: TPanel
+ Left = 213
+ Top = 0
+ Width = 277
+ Height = 186
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ object labDelphiShadow: TLabel
+ Left = 77
+ Top = 61
+ Width = 130
+ Height = 32
+ Alignment = taCenter
+ Anchors = []
+ Caption = 'for Delphi'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -27
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ end
+ object labDelphi: TLabel
+ Left = 75
+ Top = 56
+ Width = 130
+ Height = 32
+ Alignment = taCenter
+ Anchors = []
+ Caption = 'for Delphi'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clRed
+ Font.Height = -27
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ end
+ object bvlSpit: TBevel
+ Left = 6
+ Top = 145
+ Width = 269
+ Height = 37
+ ParentShowHint = False
+ Shape = bsTopLine
+ ShowHint = False
+ end
+ object labTitleShadow: TLabel
+ Left = 87
+ Top = 8
+ Width = 99
+ Height = 56
+ Alignment = taCenter
+ Anchors = []
+ Caption = 'PHP'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -48
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ end
+ object labTitle: TLabel
+ Left = 83
+ Top = 3
+ Width = 99
+ Height = 56
+ Alignment = taCenter
+ Anchors = []
+ Caption = 'PHP'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -48
+ Font.Name = 'Arial'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ end
+ object lblAuthor: TLabel
+ Left = 9
+ Top = 114
+ Width = 269
+ Height = 31
+ Alignment = taCenter
+ Anchors = []
+ AutoSize = False
+ Caption = 'Copyright (c) 2002-2020 Serhiy Perevoznyk, Lew Zienin, Nikita Ganzikov'#13#10'All Rights Reserved'
+ end
+ object labVersion: TLabel
+ Left = 4
+ Top = 92
+ Width = 271
+ Height = 13
+ Alignment = taCenter
+ AutoSize = False
+ Caption = 'Version 7.4'
+ Layout = tlCenter
+ end
+ object btnOK: TButton
+ Left = 200
+ Top = 154
+ Width = 75
+ Height = 25
+ Cursor = crHandPoint
+ Cancel = True
+ Caption = 'OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ end
+ end
+end
diff --git a/phpAbout.pas b/Source/phpAbout.pas
similarity index 90%
rename from phpAbout.pas
rename to Source/phpAbout.pas
index 2e467ee..5c7ff02 100644
--- a/phpAbout.pas
+++ b/Source/phpAbout.pas
@@ -1,111 +1,112 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpAbout.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit phpAbout;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls,
- {$IFDEF VERSION6}
- DesignIntf,
- DesignEditors,
- {$ELSE}
- dsgnintf,
- {$ENDIF}
- math;
-
-type
- TdlgAbout = class(TForm)
- pnlLeft: TPanel;
- pnlImage: TPanel;
- imgAbout: TImage;
- pnlBody: TPanel;
- bvlSpit: TBevel;
- labTitleShadow: TLabel;
- labTitle: TLabel;
- labDelphiShadow: TLabel;
- lblAuthor: TLabel;
- labDelphi: TLabel;
- labVersion: TLabel;
- btnOK: TButton;
- procedure FormCreate(Sender: TObject);
- protected
- end;
-
- TPHPVersionEditor = class(TPropertyEditor)
- function AllEqual: boolean; override;
- procedure Edit; override;
- function GetAttributes: TPropertyAttributes; override;
- function GetValue: string; override;
- procedure SetValue(const Value: string); override;
- end;
-
-
-const php4DelphiVersion = '6.2';
-
-implementation
-
-{$R *.DFM}
-
-function TPHPVersionEditor.AllEqual: boolean;
-var
- componentIndex: integer;
- currentValue: string;
-begin
- Result := False;
- if (PropCount > 1) then
- begin
- currentValue := GetStrValue;
- for componentIndex := 1 to PropCount - 1 do
- begin
- if (GetStrValueAt(componentIndex) <> currentValue) then
- exit;
- end;
- end;
- Result := True;
-end;
-
-procedure TPHPVersionEditor.Edit;
-begin
- with TdlgAbout.Create(NIL) do
- begin
- try
- ShowModal;
- finally
- Free; { Free dialog. }
- end;
- end;
-end;
-
-function TPHPVersionEditor.GetAttributes: TPropertyAttributes;
-begin
- Result := [paDialog, paReadOnly];
-end;
-
-function TPHPVersionEditor.GetValue: string;
-begin
- Result := 'PHP4Delphi ' + php4DelphiVersion;
-end;
-
-procedure TPHPVersionEditor.SetValue(const Value: string);
-begin
-end;
-
-procedure TdlgAbout.FormCreate(Sender: TObject);
-begin
- labVersion.Caption := 'Version ' + php4DelphiVersion;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpAbout.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpAbout;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ExtCtrls,
+ {$IFDEF VERSION6}
+ DesignIntf,
+ DesignEditors,
+ {$ELSE}
+ dsgnintf,
+ {$ENDIF}
+ math;
+
+type
+ TdlgAbout = class(TForm)
+ pnlLeft: TPanel;
+ pnlImage: TPanel;
+ imgAbout: TImage;
+ pnlBody: TPanel;
+ bvlSpit: TBevel;
+ labTitleShadow: TLabel;
+ labTitle: TLabel;
+ labDelphiShadow: TLabel;
+ lblAuthor: TLabel;
+ labDelphi: TLabel;
+ labVersion: TLabel;
+ btnOK: TButton;
+ procedure FormCreate(Sender: TObject);
+ protected
+ end;
+
+ TPHPVersionEditor = class(TPropertyEditor)
+ function AllEqual: boolean; override;
+ procedure Edit; override;
+ function GetAttributes: TPropertyAttributes; override;
+ function GetValue: string; override;
+ procedure SetValue(const Value: string); override;
+ end;
+
+
+const php4DelphiVersion = '7.4';
+
+implementation
+
+{$R *.DFM}
+
+function TPHPVersionEditor.AllEqual: boolean;
+var
+ componentIndex: integer;
+ currentValue: string;
+begin
+ Result := False;
+ if (PropCount > 1) then
+ begin
+ currentValue := GetStrValue;
+ for componentIndex := 1 to PropCount - 1 do
+ begin
+ if (GetStrValueAt(componentIndex) <> currentValue) then
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+procedure TPHPVersionEditor.Edit;
+begin
+ with TdlgAbout.Create(NIL) do
+ begin
+ try
+ ShowModal;
+ finally
+ Free; { Free dialog. }
+ end;
+ end;
+end;
+
+function TPHPVersionEditor.GetAttributes: TPropertyAttributes;
+begin
+ Result := [paDialog, paReadOnly];
+end;
+
+function TPHPVersionEditor.GetValue: string;
+begin
+ Result := 'PHP4Delphi ' + php4DelphiVersion;
+end;
+
+procedure TPHPVersionEditor.SetValue(const Value: string);
+begin
+end;
+
+procedure TdlgAbout.FormCreate(Sender: TObject);
+begin
+ labVersion.Caption := 'Version ' + php4DelphiVersion;
+end;
+
+end.
diff --git a/phpApp.pas b/Source/phpApp.pas
similarity index 91%
rename from phpApp.pas
rename to Source/phpApp.pas
index 381b015..7dd7745 100644
--- a/phpApp.pas
+++ b/Source/phpApp.pas
@@ -1,56 +1,56 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ Custom PHP extension application }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpApp.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-
-{$DENYPACKAGEUNIT}
-
-unit phpAPP;
-
-interface
-
-uses
- Windows, SysUtils, PHPAPI, phpModules;
-
-implementation
-
-{ InitApplication }
-procedure InitApplication;
-begin
- Application := TPHPApplication.Create(nil);
-end;
-
-{ DoneApplication }
-procedure DoneApplication;
-begin
- try
- if Assigned(Application) then
- begin
- Application.CacheConnections := false;
- Application.Free;
- Application := nil;
- end;
- except
- end;
-end;
-
-initialization
- if not PHPLoaded then
- LoadPHP;
-
- InitApplication;
-
-finalization
- DoneApplication;
-
-end.
-
+{*******************************************************}
+{ PHP4Delphi }
+{ Custom PHP extension application }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpApp.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+
+{$DENYPACKAGEUNIT}
+
+unit phpAPP;
+
+interface
+
+uses
+ Windows, SysUtils, PHPAPI, phpModules;
+
+implementation
+
+{ InitApplication }
+procedure InitApplication;
+begin
+ Application := TPHPApplication.Create(nil);
+end;
+
+{ DoneApplication }
+procedure DoneApplication;
+begin
+ try
+ if Assigned(Application) then
+ begin
+ Application.CacheConnections := false;
+ Application.Free;
+ Application := nil;
+ end;
+ except
+ end;
+end;
+
+initialization
+ if not PHPLoaded then
+ LoadPHP;
+
+ InitApplication;
+
+finalization
+ DoneApplication;
+
+end.
+
diff --git a/phpClass.pas b/Source/phpClass.pas
similarity index 66%
rename from phpClass.pas
rename to Source/phpClass.pas
index d39470f..0c9f39b 100644
--- a/phpClass.pas
+++ b/Source/phpClass.pas
@@ -1,1131 +1,938 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP classes support }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpClass.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit phpClass;
-
-interface
-
-uses
- Windows, SysUtils, Classes, PHPCommon,
- ZendTypes, ZendAPI, phpTypes, PHPAPI,
- phpFunctions;
-
-type
- // Instance of the class
- TPHPClassInstance = class;
-
- //Execute method
- TClassMethodExecute = procedure (Sender : TPHPClassInstance; Parameters : TFunctionParams;
- var ReturnValue : variant; ZendValue : pzval; this_ptr : pzval; TSRMLS_DC : pointer) of object;
-
- //Property
- TClassProperty = class(TCollectionItem)
- private
- FName : string;
- FValue : string;
- function GetAsBoolean: boolean;
- function GetAsFloat: double;
- function GetAsInteger: integer;
- procedure SetAsBoolean(const Value: boolean);
- procedure SetAsFloat(const Value: double);
- procedure SetAsInteger(const Value: integer);
- protected
- function GetDisplayName : string; override;
- public
- procedure Assign(Source : TPersistent); override;
- property AsInteger : integer read GetAsInteger write SetAsInteger;
- property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
- property AsString : string read FValue write FValue;
- property AsFloat : double read GetAsFloat write SetAsFloat;
- published
- property Name : string read FName write FName;
- property Value : string read FValue write FValue;
- end;
-
- //Collection of the class properties
- TClassProperties = class(TCollection)
- private
- FOwner : TComponent;
- procedure SetItem(Index: Integer; const Value: TClassProperty);
- function GetItem(Index: Integer): TClassProperty;
- protected
- function GetOwner : TPersistent; override;
- public
- function Add: TClassProperty;
- constructor Create(AOwner: TComponent);
- function GetVariables : string;
- function IndexOf(AName : string) : integer;
- function ByName(AName : string) : TClassProperty;
- property Items[Index: Integer]: TClassProperty read GetItem write SetItem; default;
- end;
-
- //The method of the class
- TPHPClassMethod = class(TCollectionItem)
- private
- FOnExecute : TClassMethodExecute;
- FName: string;
- FTag : integer;
- FFunctionParams: TFunctionParams;
- FZendVar : TZendVariable;
- procedure SetFunctionParams(const Value: TFunctionParams);
- public
- ReturnValue : variant;
- constructor Create(Collection : TCollection); override;
- destructor Destroy; override;
- function GetDisplayName: string; override;
- procedure SetDisplayName(const Value: string); override;
- procedure AssignTo(Dest: TPersistent); override;
- property ZendVar: TZendVariable read FZendVar;
- published
- property Name : string read FName write SetDisplayName;
- property Tag : integer read FTag write FTag;
- property Parameters: TFunctionParams read FFunctionParams write SetFunctionParams;
- property OnExecute : TClassMethodExecute read FOnExecute write FOnExecute;
- end;
-
- //Collection of the class methods
- TPHPClassMethods = class(TCollection)
- private
- FOwner: TPersistent;
- function GetItem(Index: Integer): TPHPClassMethod;
- procedure SetItem(Index: Integer; Value: TPHPClassMethod);
- protected
- function GetOwner: TPersistent; override;
- procedure SetItemName(Item: TCollectionItem); override;
- public
- constructor Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
- function Add : TPHPClassMethod;
- function ByName(AName : string) : TPHPClassMethod;
- property Items[Index: Integer]: TPHPClassMethod read GetItem write SetItem; default;
- end;
-
- //Represents PHP class
- TPHPClass = class(TPHPComponent)
- private
- FProperties : TClassProperties;
- FMethods : TPHPClassMethods;
- FClassObject: pzend_class_entry;
- FClassName : string;
- FClassEntry : tzend_class_entry;
- {$IFDEF PHP5}
- FClassFunction : array[0..1] of zend_function_entry;
- {$ENDIF}
- procedure SetProperties(const Value: TClassProperties);
- procedure SetMethods(const Value : TPHPClassMethods);
- procedure SetClassName(const Value: string);
- protected
- function GetClassEntry : pzend_class_entry; virtual;
- procedure Loaded; override;
- function InstanceConstructor(return_value : pzval) : TPHPClassInstance;
- property ZendClassObject : pzend_class_entry read FClassObject write FClassObject;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- procedure ClassRegister(AModuleNumber : integer); virtual;
- procedure ProduceInstance(AValue : pzval); virtual;
- published
- property Properties : TClassProperties read FProperties write SetProperties;
- property Methods : TPHPClassMethods read FMethods write SetMethods;
- property PHPClassName : string read FClassName write SetClassName;
- end;
-
-
- TPHPClassInstance = class(TComponent)
- private
- FProperties : TClassProperties;
- FProducer : TPHPClass;
- procedure SetProperties(const Value: TClassProperties);
- protected
- property Producer : TPHPClass read FProducer;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- property Properties : TClassProperties read FProperties write SetProperties;
- end;
-
-
-{$IFDEF PHP5}
-procedure RegisterClassHandlers;
-{$ENDIF}
-
-implementation
-
-uses
- phpModules;
-
-var
- le_classresource : integer = 0;
-
- {$IFDEF PHP5}
- ClassObjectHandlers : zend_object_handlers;
- {$ENDIF}
-
-const
- {$IFDEF PHP4}
- le_classresource_name = 'TPHPCLASS4';
- {$ELSE}
- le_classresource_name = 'TPHPCLASS5';
- {$ENDIF}
-
-procedure class_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
-var
- resource : TPHPClassInstance;
-begin
- if rsrc = nil then
- Exit;
- resource := rsrc^.ptr;
- if Assigned(Resource) then
- try
- resource.free;
- except
- end;
-end;
-
-{ TphpClass }
-
-
-//when object created from script using "new"
-function class_call_constructor(AClassName : string; return_value : pzval) : TPHPClassInstance;
-var
- Extension : TPHPExtension;
- idp : pointer;
- id : integer;
- cnt : integer;
-begin
- Result := nil;
- idp := ts_resource_ex(integer(app_globals_id), nil);
- id := integer(idp^);
- if id <= 0 then
- Exit;
- Extension := TPHPExtension(id);
- for cnt := 0 to Extension.ComponentCount - 1 do
- begin
- if (Extension.Components[cnt] is TphpClass) then
- begin
- if SameText(AClassName, TphpClass(Extension.Components[cnt]).PHPClassName) then
- begin
- Result := TPHPClass(Extension.Components[cnt]).InstanceConstructor(return_value);
- break;
- end;
- end;
- end;
-end;
-
-{$IFDEF PHP4}
-
-//PHP4
-function class_set_property_handler(property_reference : Pzend_property_reference; value : pzval) : integer; cdecl;
-var
- this_ptr : pzval;
- OBJ : TPHPClassInstance;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- propname : string;
- tsrmls : pointer;
- param : TClassProperty;
-begin
- tsrmls := ts_resource_ex(0, nil);
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
-
- this_ptr := property_reference^._object;
- new(data);
- if zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
- Obj := zend_fetch_resource(data^, TSRMLS, -1, 'class resource', nil, 1, le_classresource)
- else
- OBJ := nil;
- freemem(data);
- if Assigned(Obj) then
- begin
- convert_to_string(value);
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- param.Value := value.value.str.val;
- end;
- Result := SUCCESS;
-end;
-
-
-
-//PHP4
-procedure class_call_function(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer; property_reference : Pzend_property_reference ); cdecl;
-var
- OBJ : TPHPClassInstance;
- Producer : TPHPClass;
- M : TPHPClassMethod;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- MethodName : string;
- Params : pzval_array;
- j : integer;
-begin
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- MethodName := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- if (zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) = SUCCESS) then
- Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
- else
- Obj := nil;
- freemem(data);
-
- if not Assigned(Obj) then
- begin
- //not assigned obj = new instance (constructor)
- class_call_constructor(MethodName, this_ptr);
- exit;
- end;
-
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- end;
-
-
- Producer := Obj.Producer;
- if Assigned(Producer) then
- begin
- M := Producer.Methods.ByName(MethodName);
- if Assigned(M) then
- begin
- if Assigned(M.FOnExecute) then
- begin
- if M.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ht > 0 then
- begin
- for j := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(M.Parameters[j].ParamType, Params[j]^) then
- begin
- zend_error(E_WARNING, PChar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
- Exit;
- end;
- M.Parameters[j].Value := zval2variant(Params[j]^^);
- end;
- end; // if ht > 0
-
-
- M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
- M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
- if M.ZendVar.ISNull then //perform variant conversion
- variant2zval(M.ReturnValue, return_value);
-
- end;
- end;
- end;
- dispose_pzval_array(Params);
-end;
-
-
-//PHP4
-procedure class_get_property_handler(val : pzval; property_reference : PZend_property_reference); cdecl;
-var
- this_ptr : pzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- obj : TPHPClassInstance;
- p : pointer;
- propname : string;
- tsrmls : pointer;
- data: ^ppzval;
- param : TClassProperty;
-begin
- tsrmls := ts_resource_ex(0, nil);
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- if ( zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) <> SUCCESS) then
- Obj := nil
- else
- Obj := zend_fetch_resource(data^, TSRMLS, -1, 'class resource', nil, 1, le_classresource);
- freemem(data);
- if Assigned(Obj) then
- begin
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- ZVAL_STRING(val, PChar(param.value), true)
- else
- ZVAL_EMPTY_STRING(val)
- end
- else
- ZVAL_STRING(val, 'undefined', true);
-end;
-
-//PHP4
-procedure _class_get_property_wrapper; assembler;
-asm
- push ebp
- mov ebp,esp
- sub esp,50h
- push ebx
- push esi
- push edi
- lea edi,[ebp-50h]
- mov ecx,14h
- mov eax,0CCCCCCCCh
- rep stosd
- mov eax,dword ptr [ebp+0Ch]
- push eax
- lea ecx,[ebp-10h]
- push ecx
- call class_get_property_handler
- add esp,8
- mov edx,dword ptr [ebp+8]
- mov eax,dword ptr [ebp-10h]
- mov dword ptr [edx],eax
- mov ecx,dword ptr [ebp-0Ch]
- mov dword ptr [edx+4],ecx
- mov eax,dword ptr [ebp-8]
- mov dword ptr [edx+8],eax
- mov ecx,dword ptr [ebp-4]
- mov dword ptr [edx+0Ch],ecx
- mov eax,dword ptr [ebp+8]
-
- pop edi
- pop esi
- pop ebx
- add esp,50h
- cmp ebp,esp
- mov esp,ebp
- pop ebp
- ret
-end;
-{$ENDIF}
-
-
-
-
-{$IFDEF PHP5}
-
-// Read object property value (getter)
-//PHP5
-function class_get_property_handler(_object : pzval; member : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
-var
- retval : pzval;
- obj : TPHPClassInstance;
- data: ^ppzval;
- propname : string;
- object_properties : PHashTable;
- param : TClassProperty;
-begin
- retval := emalloc(sizeof(zval));
- FillChar(retval^, sizeof(zval), 0);
- propname := member^.value.str.val;
- new(data);
- try
- object_properties := Z_OBJPROP(_object^);
- if zend_hash_find(object_properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
- Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
- else
- Obj := nil;
- finally
- freemem(data);
- end;
-
- if Assigned(Obj) then
- begin
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- ZVAL_STRING(retval, PChar(param.value), true)
- else
- ZVAL_EMPTY_STRING(retval);
- end
- else
- ZVAL_STRING(retval, 'undefined', true);
-
- Result := retval;
-end;
-
-// Write object property value (setter)
-//PHP5
-procedure class_set_property_handler(_object : pzval; member : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
-var
- OBJ : TPHPClassInstance;
- data: ^ppzval;
- propname : string;
- object_properties : PHashTable;
- param : TClassProperty;
-begin
- propname := member^.value.str.val;
- new(data);
- try
- object_properties := Z_OBJPROP(_object^);
- if zend_hash_find(object_properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
- Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
- else
- Obj := nil;
- finally
- freemem(data);
- end;
-
- if Assigned(Obj) then
- begin
- convert_to_string(value);
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- param.Value := value.value.str.val;
- end;
-
-end;
-
-{$IFDEF PHP510}
-function class_call_method(method : pchar; ht : integer; return_value : pzval; return_value_ptr : ppzval;
- this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
-{$ELSE}
-function class_call_method(method : pchar; ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
-{$ENDIF}
-var
- OBJ : TPHPClassInstance;
- data: ^ppzval;
- Params : pzval_array;
- Producer : TPHPClass;
- M : TPHPClassMethod;
- j : integer;
-begin
- new(data);
- if zend_hash_find(this_ptr^.value.obj.handlers.get_properties(this_ptr, TSRMLS_DC), 'instance', strlen('instance') + 1, data) = SUCCESS then
- Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
- else
- Obj := nil;
- freemem(data);
-
- if not Assigned(Obj) then
- begin
- //not assigned obj = new instance (constructor)
- class_call_constructor(Method, this_ptr);
- Result := SUCCESS;
- exit;
- end;
-
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Result := FAILURE;
- Exit;
- end;
- end;
-
-
- Producer := Obj.Producer;
- if Assigned(Producer) then
- begin
- M := Producer.Methods.ByName(Method);
- if Assigned(M) then
- begin
- if Assigned(M.FOnExecute) then
- begin
- if M.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Result := FAILURE;
- Exit;
- end;
-
- if ht > 0 then
- begin
- for j := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(M.Parameters[j].ParamType, Params[j]^) then
- begin
- zend_error(E_WARNING, PChar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
- Result := FAILURE;
- Exit;
- end;
- M.Parameters[j].ZendValue := (Params[j]^);
- end;
- end; // if ht > 0
-
-
- M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
- M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
- if M.ZendVar.ISNull then //perform variant conversion
- variant2zval(M.ReturnValue, return_value);
-
- end;
- end;
- end;
- dispose_pzval_array(Params);
-
- result := SUCCESS;
-end;
-
-//PHP5
-function class_get_method(_object : pzval; method_name : pchar; method_len : integer; TSRMLS_DC : pointer) : PzendFunction; cdecl;
-var
- fnc : pZendFunction;
-begin
- fnc := emalloc(sizeof(TZendFunction));
- FillChar(fnc^, sizeOf(TZendFunction), 0);
- fnc^.internal_function._type := ZEND_OVERLOADED_FUNCTION;
- fnc^.internal_function.function_name := estrndup(method_name, method_len);
- fnc^.internal_function.handler := @class_call_method;
- result := fnc;
-end;
-
-
-{$IFDEF PHP510}
-procedure class_init_new(ht : integer; return_value : pzval; return_value_ptr : ppzval;
- this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure class_init_new(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- AClassName : PChar;
- len : integer;
- Extension : TPHPExtension;
- idp : pointer;
- id : integer;
- cnt : integer;
-begin
- if not Assigned(Application) then
- Exit;
-
- AClassName := '';
- this_ptr^.value.obj.handlers.get_class_name(this_ptr, @AClassName, @len, 0, TSRMLS_DC);
-
- idp := ts_resource_ex(integer(app_globals_id), nil);
- id := integer(idp^);
- if id <= 0 then
- Exit;
- Extension := TPHPExtension(id);
- for cnt := 0 to Extension.ComponentCount - 1 do
- begin
- if (Extension.Components[cnt] is TphpClass) then
- begin
- if SameText(AClassName, TphpClass(Extension.Components[cnt]).PHPClassName) then
- begin
- TPHPClass(Extension.Components[cnt]).ProduceInstance(this_ptr);
- break;
- end;
- end;
- end;
-
-
-end;
-
-{$ENDIF}
-
-
-procedure TPHPClass.ClassRegister(AModuleNumber : integer);
-var
- tsrmls : pointer;
-begin
- if not Assigned(Application) then
- Exit;
-
- if not Application.Loading then
- Exit;
-
- if (csDesigning in ComponentState) then
- Exit;
-
- {$IFDEF PHP5}
- RegisterClassHandlers;
- {$ENDIF}
-
- if le_classresource = 0 then
- le_classresource := zend_register_list_destructors_ex(@class_destructor_handler, nil, PChar(le_classresource_name), AModuleNumber);
-
- if (Application.GetPHPClass(FClassName) = nil) then
- begin
- tsrmls := ts_resource_ex(0, nil);
- FillChar(FClassEntry, SizeOf(TZend_Class_Entry), #0);
-
- {$IFDEF PHP5}
- FClassFunction[0].fname := PChar(FClassName);
- FClassFunction[0].handler := @class_init_new;
- INIT_CLASS_ENTRY(FClassEntry, PChar(FClassName) , @FClassFunction);
- {$ELSE}
- INIT_CLASS_ENTRY(FClassEntry, PChar(FClassName) , nil);
- {$ENDIF}
-
-
- FClassObject := zend_register_internal_class(@FClassEntry, tsrmls);
-
- {$IFDEF PHP4}
- FClassObject.handle_property_get := @_class_get_property_wrapper;
- FClassObject.handle_property_set := @class_set_property_handler;
- FClassObject.handle_function_call := @class_call_function;
- {$ENDIF}
-
-
- Application.RegisterPHPClass(FClassName, FClassObject);
- end;
-end;
-
-constructor TPHPClass.Create(AOwner: TComponent);
-begin
- inherited;
- if Assigned(Owner) then
- begin
- if ( not (AOwner is TCustomPHPExtension)) then
- raise Exception.Create('TPHPClass component can be placed only on PHPExtension module');
- end;
- FProperties := TClassProperties.Create(Self);
- FMethods := TPHPClassMethods.Create(Self, TPHPClassMethod);
-end;
-
-destructor TPHPClass.Destroy;
-begin
- FProperties.Free;
- FMethods.Free;
- inherited;
-end;
-
-function TPHPClass.GetClassEntry: pzend_class_entry;
-begin
- Result := Application.GetPHPClass(FClassName);
-end;
-
-function TPHPClass.InstanceConstructor(return_value : pzval): TPHPClassInstance;
-var
- CI : TphpClassInstance;
- rn : integer;
- tsrmls : pointer;
-begin
- Result := nil;
- if not Assigned(Application) then
- Exit;
- tsrmls := ts_resource_ex(0, nil);
- CI := TPHPClassInstance.Create(nil);
- CI.FProperties.Assign(FProperties);
- CI.FProducer := Self;
- Result := CI;
- rn := zend_register_resource(nil, CI, le_classresource);
- FClassObject := GetClassEntry;
- if not assigned(FClassObject) then
- Exit;
- {$IFDEF PHP4}
- _object_init_ex(return_value, FClassObject, nil, 0, TSRMLS);
- {$ELSE}
- object_init(return_value, FClassObject, TSRMLS );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_resource_ex(return_value, 'instance', strlen('instance') +1, rn);
- {$ELSE}
- add_property_resource_ex(return_value, 'instance', strlen('instance') +1, rn, TSRMLS);
- {$ENDIF}
-
- {$IFDEF PHP5}
- return_value.value.obj.handlers := @ClassObjectHandlers;
- {$ENDIF}
-
-end;
-
-procedure TPHPClass.Loaded;
-begin
- inherited;
- if ( not (csDesigning in ComponentState)) then
- begin
- if Assigned(Application) then
- ClassRegister(Application.ModuleNumber);
- end;
-end;
-
-procedure TPHPClass.ProduceInstance(AValue: pzval);
-var
- CI : TphpClassInstance;
- rn : integer;
- tsrmls : pointer;
-begin
- if not Assigned(Application) then
- Exit;
- tsrmls := ts_resource_ex(0, nil);
- CI := TPHPClassInstance.Create(nil);
- CI.FProperties.Assign(FProperties);
- CI.FProducer := Self;
- rn := zend_register_resource(nil, CI, le_classresource);
- FClassObject := Application.GetPHPClass(FClassName);
- if not assigned(FClassObject) then
- Exit;
-
- {$IFDEF PHP4}
- _object_init_ex(AValue, FClassObject, nil, 0, TSRMLS);
- {$ELSE}
- object_init(AValue, FClassObject, TSRMLS );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_resource_ex(AValue, 'instance', strlen('instance') +1, rn);
- {$ELSE}
- add_property_resource_ex(AValue, 'instance', strlen('instance') +1, rn, TSRMLS);
- {$ENDIF}
-
- {$IFDEF PHP5}
- AValue.value.obj.handlers := @ClassObjectHandlers;
- {$ENDIF}
-
-end;
-
-procedure TPHPClass.SetClassName(const Value: string);
-begin
- FClassName := LowerCase(Value);
-end;
-
-procedure TPHPClass.SetMethods(const Value: TPHPClassmethods);
-begin
- FMethods.Assign(Value);
-end;
-
-procedure TphpClass.SetProperties(const Value: TClassProperties);
-begin
- FProperties.Assign(Value);
-end;
-
-{ TPHPClassInstance }
-
-constructor TPHPClassInstance.Create;
-begin
- inherited;
- FProperties := TClassProperties.Create(Self);
-end;
-
-destructor TPHPClassInstance.Destroy;
-begin
- FProperties.Free;
- inherited;
-end;
-
-
-procedure TPHPClassInstance.SetProperties(const Value: TClassProperties);
-begin
- FProperties.Assign(Value);
-end;
-
-
-{ TClassProperty }
-
-procedure TClassProperty.Assign(Source: TPersistent);
-begin
- if (Source is TClassProperty) then
- begin
- FName := TClassProperty(Source).Name;
- FValue := TClassProperty(Source).Value;
- end
- else
- inherited;
-end;
-
-function TClassProperty.GetAsBoolean: boolean;
-begin
- if FValue = '' then
- begin
- Result := false;
- Exit;
- end;
-
- if SameText(FValue, 'True') then
- Result := true
- else
- Result := false;
-end;
-
-function TClassProperty.GetAsFloat: double;
-begin
- if FValue = '' then
- begin
- Result := 0;
- Exit;
- end;
-
- Result := ValueToFloat(FValue);
-end;
-
-function TClassProperty.GetAsInteger: integer;
-var
- c : char;
-begin
- c := DecimalSeparator;
- DecimalSeparator := '.';
- Result := Round(ValueToFloat(FValue));
- DecimalSeparator := c;
-end;
-
-function TClassProperty.GetDisplayName: string;
-begin
- if FName = '' then
- result := inherited GetDisplayName
- else
- Result := FName;
-end;
-
-procedure TClassProperty.SetAsBoolean(const Value: boolean);
-begin
- if Value then
- FValue := 'True'
- else
- FValue := 'False';
-end;
-
-procedure TClassProperty.SetAsFloat(const Value: double);
-begin
- FValue := FloatToValue(Value);
-end;
-
-procedure TClassProperty.SetAsInteger(const Value: integer);
-var
- c : char;
-begin
- c := DecimalSeparator;
- DecimalSeparator := '.';
- FValue := IntToStr(Value);
- DecimalSeparator := c;
-end;
-
-
-{ TClassProperties }
-function TClassProperties.Add: TClassProperty;
-begin
- result := TClassProperty(inherited Add);
-end;
-
-constructor TClassProperties.Create(AOwner: TComponent);
-begin
- inherited create(TClassProperty);
- FOwner := AOwner;
-end;
-
-function TClassProperties.GetItem(Index: Integer): TClassProperty;
-begin
- Result := TClassProperty(inherited GetItem(Index));
-end;
-
-procedure TClassProperties.SetItem(Index: Integer; const Value: TClassProperty);
-begin
- inherited SetItem(Index, Value)
-end;
-
-function TClassProperties.GetOwner : TPersistent;
-begin
- Result := FOwner;
-end;
-
-function TClassProperties.GetVariables: string;
-var i : integer;
-begin
- for i := 0 to Count - 1 do
- begin
- Result := Result + Items[i].FName + '=' + Items[i].FValue;
- if i < Count - 1 then
- Result := Result + '&';
- end;
-end;
-
-function TClassProperties.IndexOf(AName: string): integer;
-var
- i : integer;
-begin
- Result := -1;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := i;
- break;
- end;
- end;
-end;
-
-
-function TClassProperties.ByName(AName: string): TClassProperty;
-var
- i : integer;
-begin
- Result := nil;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := Items[i];
- break;
- end;
- end;
-end;
-
-{ TPHPClassMethods }
-
-function TPHPClassMethods.Add: TPHPClassMethod;
-begin
- Result := TPHPClassMethod(inherited Add);
-end;
-
-function TPHPClassMethods.ByName(AName: string): TPHPClassMethod;
-var
- i : integer;
-begin
- Result := nil;
- for i := 0 to Count - 1 do
- begin
- if SameText(Items[i].Name, AName) then
- begin
- Result := Items[i];
- break;
- end;
- end;
-end;
-
-constructor TPHPClassMethods.Create(Owner: TPersistent;
- ItemClass: TCollectionItemClass);
-begin
- inherited Create(ItemClass);
- FOwner := Owner;
-end;
-
-function TPHPClassMethods.GetItem(Index: Integer): TPHPClassMethod;
-begin
- Result := TPHPClassMethod(inherited GetItem(Index));
-end;
-
-function TPHPClassMethods.GetOwner: TPersistent;
-begin
- Result := FOwner;
-end;
-
-procedure TPHPClassMethods.SetItem(Index: Integer; Value: TPHPClassMethod);
-begin
- inherited SetItem(Index, TCollectionItem(Value));
-end;
-
-procedure TPHPClassMethods.SetItemName(Item: TCollectionItem);
-var
- I, J: Integer;
- ItemName: string;
- CurItem: TPHPClassMethod;
-begin
- J := 1;
- while True do
- begin
- ItemName := Format('classmethod%d', [J]);
- I := 0;
- while I < Count do
- begin
- CurItem := Items[I] as TPHPClassMethod;
- if (CurItem <> Item) and (CompareText(CurItem.Name, ItemName) = 0) then
- begin
- Inc(J);
- Break;
- end;
- Inc(I);
- end;
- if I >= Count then
- begin
- (Item as TPHPClassMethod).Name := ItemName;
- Break;
- end;
- end;
-end;
-
-{ TPHPClassMethod }
-
-procedure TPHPClassMethod.AssignTo(Dest: TPersistent);
-begin
- if Dest is TPHPClassMethod then
- begin
- if Assigned(Collection) then Collection.BeginUpdate;
- try
- with TPHPClassMethod(Dest) do
- begin
- Tag := Self.Tag;
- Name := Self.Name;
- end;
- finally
- if Assigned(Collection) then Collection.EndUpdate;
- end;
- end else inherited AssignTo(Dest);
-end;
-
-constructor TPHPClassMethod.Create(Collection: TCollection);
-begin
- inherited;
- FFunctionParams := TFunctionParams.Create(TPHPClassMethods(Self.Collection).GetOwner, TFunctionParam);
- FZendVar := TZendVariable.Create;
-end;
-
-destructor TPHPClassMethod.Destroy;
-begin
- FFunctionParams.Free;
- FZendVar.Free;
- inherited;
-end;
-
-function TPHPClassMethod.GetDisplayName: string;
-begin
- if FName = '' then
- result := inherited GetDisplayName else
- Result := FName;
-end;
-
-procedure TPHPClassMethod.SetDisplayName(const Value: string);
-var
- I: Integer;
- F: TPHPClassMethod;
-begin
- if AnsiCompareText(Value, FName) <> 0 then
- begin
- if Collection <> nil then
- for I := 0 to Collection.Count - 1 do
- begin
- F := TPHPClassMethods(Collection).Items[I];
- if (F <> Self) and (F is TPHPClassMethod) and
- (AnsiCompareText(Value, F.Name) = 0) then
- raise Exception.Create('Duplicate method name');
- end;
- FName := LowerCase(Value);
- Changed(False);
- end;
-end;
-
-procedure TPHPClassMethod.SetFunctionParams(const Value: TFunctionParams);
-begin
- FFunctionParams.Assign(Value);
-end;
-
-
-{$IFDEF PHP5}
-procedure RegisterClassHandlers;
-begin
- Move(zend_get_std_object_handlers()^, ClassObjectHandlers, sizeof(zend_object_handlers));
- ClassObjectHandlers.read_property := @class_get_property_handler;
- ClassObjecthandlers.write_property := @class_set_property_handler;
- ClassObjectHandlers.call_method := @class_call_method;
- ClassObjectHandlers.get_method := @class_get_method;
-end;
-{$ENDIF}
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP classes support }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpClass.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpClass;
+
+interface
+
+uses
+ Windows, SysUtils, Classes, PHPCommon,
+ {$IFDEF PHP_UNICODE}WideStrUtils, {$ENDIF}
+ ZendTypes, ZendAPI, phpTypes, PHPAPI,
+ phpFunctions;
+
+type
+ // Instance of the class
+ TPHPClassInstance = class;
+
+ //Execute method
+ TClassMethodExecute = procedure (Sender : TPHPClassInstance; Parameters : TFunctionParams;
+ var ReturnValue : variant; ZendValue : pzval; this_ptr : pzval; TSRMLS_DC : pointer) of object;
+
+ //Property
+ TClassProperty = class(TCollectionItem)
+ private
+ FName : zend_ustr;
+ FValue : zend_ustr;
+ function GetAsBoolean: boolean;
+ function GetAsFloat: double;
+ function GetAsInteger: integer;
+ procedure SetAsBoolean(const Value: boolean);
+ procedure SetAsFloat(const Value: double);
+ procedure SetAsInteger(const Value: integer);
+ protected
+ function GetDisplayName : string; override;
+ public
+ procedure Assign(Source : TPersistent); override;
+ property AsInteger : integer read GetAsInteger write SetAsInteger;
+ property AsBoolean : boolean read GetAsBoolean write SetAsBoolean;
+ property AsString : zend_ustr read FValue write FValue;
+ property AsFloat : double read GetAsFloat write SetAsFloat;
+ published
+ property Name : zend_ustr read FName write FName;
+ property Value : zend_ustr read FValue write FValue;
+ end;
+
+ //Collection of the class properties
+ TClassProperties = class(TCollection)
+ private
+ FOwner : TComponent;
+ procedure SetItem(Index: Integer; const Value: TClassProperty);
+ function GetItem(Index: Integer): TClassProperty;
+ protected
+ function GetOwner : TPersistent; override;
+ public
+ function Add: TClassProperty;
+ constructor Create(AOwner: TComponent);
+ function GetVariables : zend_ustr;
+ function IndexOf(AName : zend_ustr) : integer;
+ function ByName(AName : zend_ustr) : TClassProperty;
+ property Items[Index: Integer]: TClassProperty read GetItem write SetItem; default;
+ end;
+
+ //The method of the class
+ TPHPClassMethod = class(TCollectionItem)
+ private
+ FOnExecute : TClassMethodExecute;
+ FName: zend_ustr;
+ FTag : integer;
+ FFunctionParams: TFunctionParams;
+ FZendVar : TZendVariable;
+ procedure SetFunctionParams(const Value: TFunctionParams);
+ procedure _SetDisplayName(value : zend_ustr);
+ public
+ ReturnValue : variant;
+ constructor Create(Collection : TCollection); override;
+ destructor Destroy; override;
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+ procedure AssignTo(Dest: TPersistent); override;
+ property ZendVar: TZendVariable read FZendVar;
+ published
+ property Name : zend_ustr read FName write _SetDisplayName;
+ property Tag : integer read FTag write FTag;
+ property Parameters: TFunctionParams read FFunctionParams write SetFunctionParams;
+ property OnExecute : TClassMethodExecute read FOnExecute write FOnExecute;
+ end;
+
+ //Collection of the class methods
+ TPHPClassMethods = class(TCollection)
+ private
+ FOwner: TPersistent;
+ function GetItem(Index: Integer): TPHPClassMethod;
+ procedure SetItem(Index: Integer; Value: TPHPClassMethod);
+ protected
+ function GetOwner: TPersistent; override;
+ procedure SetItemName(Item: TCollectionItem); override;
+ public
+ constructor Create(Owner: TPersistent; ItemClass: TCollectionItemClass);
+ function Add : TPHPClassMethod;
+ function ByName(AName : zend_ustr) : TPHPClassMethod;
+ property Items[Index: Integer]: TPHPClassMethod read GetItem write SetItem; default;
+ end;
+
+ //Represents PHP class
+ TPHPClass = class(TPHPComponent)
+ private
+ FProperties : TClassProperties;
+ FMethods : TPHPClassMethods;
+ FClassObject: pzend_class_entry;
+ FClassName : zend_ustr;
+ FClassEntry : tzend_class_entry;
+ {$IFDEF PHP5}
+ FClassFunction : array[0..1] of zend_function_entry;
+ {$ENDIF}
+ procedure SetProperties(const Value: TClassProperties);
+ procedure SetMethods(const Value : TPHPClassMethods);
+ procedure SetClassName(const Value: zend_ustr);
+ protected
+ function GetClassEntry : pzend_class_entry; virtual;
+ procedure Loaded; override;
+ function InstanceConstructor(return_value : pzval) : TPHPClassInstance;
+ property ZendClassObject : pzend_class_entry read FClassObject write FClassObject;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure ClassRegister(AModuleNumber : integer); virtual;
+ procedure ProduceInstance(AValue : pzval); virtual;
+ published
+ property Properties : TClassProperties read FProperties write SetProperties;
+ property Methods : TPHPClassMethods read FMethods write SetMethods;
+ property PHPClassName : zend_ustr read FClassName write SetClassName;
+ end;
+
+
+ TPHPClassInstance = class(TComponent)
+ private
+ FProperties : TClassProperties;
+ FProducer : TPHPClass;
+ procedure SetProperties(const Value: TClassProperties);
+ protected
+ property Producer : TPHPClass read FProducer;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ property Properties : TClassProperties read FProperties write SetProperties;
+ end;
+
+{$IFDEF PHP5}
+procedure RegisterClassHandlers;
+{$ENDIF}
+
+implementation
+
+uses
+ phpModules;
+
+var
+ le_classresource : integer = 0;
+
+ {$IFDEF PHP5}
+ ClassObjectHandlers : zend_object_handlers;
+ {$ENDIF}
+
+const
+ le_classresource_name = 'TPHPCLASS5';
+
+procedure class_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
+var
+ resource : TPHPClassInstance;
+begin
+ if rsrc = nil then
+ Exit;
+ resource := rsrc^.ptr;
+ if Assigned(Resource) then
+ try
+ resource.free;
+ except
+ end;
+end;
+
+{ TphpClass }
+
+
+//when object created from script using "new"
+function class_call_constructor(AClassName : zend_ustr; return_value : pzval) : TPHPClassInstance;
+var
+ Extension : TPHPExtension;
+ idp : pointer;
+ id : integer;
+ cnt : integer;
+begin
+ Result := nil;
+ idp := ts_resource_ex(integer(app_globals_id), nil);
+ id := integer(idp^);
+ if id <= 0 then
+ Exit;
+ Extension := TPHPExtension(id);
+ for cnt := 0 to Extension.ComponentCount - 1 do
+ begin
+ if (Extension.Components[cnt] is TphpClass) then
+ begin
+ if SameText(AClassName, TphpClass(Extension.Components[cnt]).PHPClassName) then
+ begin
+ Result := TPHPClass(Extension.Components[cnt]).InstanceConstructor(return_value);
+ break;
+ end;
+ end;
+ end;
+end;
+
+{$IFDEF PHP5}
+
+// Read object property value (getter)
+//PHP5
+function class_get_property_handler(_object : pzval; member : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
+var
+ retval : pzval;
+ obj : TPHPClassInstance;
+ data: ^ppzval;
+ propname : zend_ustr;
+ object_properties : PHashTable;
+ param : TClassProperty;
+begin
+ retval := emalloc(sizeof(zval));
+ ZeroMemory(retval, sizeof(zval));
+ propname := Z_STRVAL(member);
+ new(data);
+ try
+ object_properties := Z_OBJPROP(_object);
+ if zend_hash_find(object_properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
+ Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
+ else
+ Obj := nil;
+ finally
+ freemem(data);
+ end;
+
+ if Assigned(Obj) then
+ begin
+ param := Obj.Properties.ByName(propname);
+ if Assigned(param) then
+ ZVAL_STRING(retval, zend_pchar(param.value), true)
+ else
+ ZVAL_EMPTY_STRING(retval);
+ end
+ else
+ ZVAL_STRING(retval, 'undefined', true);
+
+ retval.refcount := 1;
+ Result := retval;
+end;
+
+// Write object property value (setter)
+//PHP5
+procedure class_set_property_handler(_object : pzval; member : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
+var
+ OBJ : TPHPClassInstance;
+ data: ^ppzval;
+ propname : zend_ustr;
+ object_properties : PHashTable;
+ param : TClassProperty;
+begin
+ propname := Z_STRVAL(member);
+ new(data);
+ try
+ object_properties := Z_OBJPROP(_object);
+ if zend_hash_find(object_properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
+ Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
+ else
+ Obj := nil;
+ finally
+ freemem(data);
+ end;
+
+ if Assigned(Obj) then
+ begin
+ convert_to_string(value);
+ param := Obj.Properties.ByName(propname);
+ if Assigned(param) then
+ param.Value := Z_STRVAL(value);
+ end;
+
+end;
+
+{$IFDEF PHP510}
+function class_call_method(method : zend_pchar; ht : integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
+{$ELSE}
+function class_call_method(method : zend_pchar; ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
+{$ENDIF}
+var
+ OBJ : TPHPClassInstance;
+ data: ^ppzval;
+ Params : pzval_array;
+ Producer : TPHPClass;
+ M : TPHPClassMethod;
+ j : integer;
+begin
+ new(data);
+ if zend_hash_find(this_ptr^.value.obj.handlers.get_properties(this_ptr, TSRMLS_DC), 'instance', strlen('instance') + 1, data) = SUCCESS then
+ Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
+ else
+ Obj := nil;
+ freemem(data);
+
+ if not Assigned(Obj) then
+ begin
+ //not assigned obj = new instance (constructor)
+ class_call_constructor(Method, this_ptr);
+ Result := SUCCESS;
+ exit;
+ end;
+
+ if ht > 0 then
+ begin
+ if ( not (zend_get_parameters_my(ht, Params, TSRMLS_DC) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Result := FAILURE;
+ Exit;
+ end;
+ end;
+
+
+ Producer := Obj.Producer;
+ if Assigned(Producer) then
+ begin
+ M := Producer.Methods.ByName(Method);
+ if Assigned(M) then
+ begin
+ if Assigned(M.FOnExecute) then
+ begin
+ if M.Parameters.Count <> ht then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Result := FAILURE;
+ Exit;
+ end;
+
+ if ht > 0 then
+ begin
+ for j := 0 to ht - 1 do
+ begin
+ if not IsParamTypeCorrect(M.Parameters[j].ParamType, Params[j]^) then
+ begin
+ zend_error(E_WARNING, zend_pchar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
+ Result := FAILURE;
+ Exit;
+ end;
+ M.Parameters[j].ZendValue := (Params[j]^);
+ end;
+ end; // if ht > 0
+
+
+ M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
+ M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
+ if M.ZendVar.ISNull then //perform variant conversion
+ VariantToZend(M.ReturnValue, return_value);
+
+ end;
+ end;
+ end;
+ dispose_pzval_array(Params);
+
+ result := SUCCESS;
+end;
+
+//PHP5
+function class_get_method(_object : pzval; method_name : zend_pchar; method_len : integer; TSRMLS_DC : pointer) : PzendFunction; cdecl;
+var
+ fnc : pZendFunction;
+begin
+ fnc := emalloc(sizeof(TZendFunction));
+
+ ZeroMemory(fnc, sizeOf(TZendFunction));
+
+ fnc^.internal_function._type := ZEND_OVERLOADED_FUNCTION;
+
+ {$IFNDEF COMPILER_VC9}
+ fnc^.internal_function.function_name := strdup(method_name);
+ {$ELSE}
+ fnc^.internal_function.function_name := DupStr(method_name);
+ {$ENDIF}
+
+ fnc^.internal_function.handler := @class_call_method;
+ result := fnc;
+end;
+
+
+{$IFDEF PHP510}
+procedure class_init_new(ht : integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure class_init_new(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
+var
+ AClassName : zend_pchar;
+ len : integer;
+ Extension : TPHPExtension;
+ idp : pointer;
+ id : integer;
+ cnt : integer;
+begin
+ if not Assigned(Application) then
+ Exit;
+
+ AClassName := '';
+ this_ptr^.value.obj.handlers.get_class_name(this_ptr, @AClassName, @len, 0, TSRMLS_DC);
+
+ idp := ts_resource_ex(integer(app_globals_id), nil);
+ id := integer(idp^);
+ if id <= 0 then
+ Exit;
+ Extension := TPHPExtension(id);
+ for cnt := 0 to Extension.ComponentCount - 1 do
+ begin
+ if (Extension.Components[cnt] is TphpClass) then
+ begin
+ if SameText(AClassName, TphpClass(Extension.Components[cnt]).PHPClassName) then
+ begin
+ TPHPClass(Extension.Components[cnt]).ProduceInstance(this_ptr);
+ break;
+ end;
+ end;
+ end;
+
+
+end;
+
+{$ENDIF}
+
+
+procedure TPHPClass.ClassRegister(AModuleNumber : integer);
+var
+ tsrmls : pointer;
+begin
+ if not Assigned(Application) then
+ Exit;
+
+ if not Application.Loading then
+ Exit;
+
+ if (csDesigning in ComponentState) then
+ Exit;
+
+ {$IFDEF PHP5}
+ RegisterClassHandlers;
+ {$ENDIF}
+
+ if le_classresource = 0 then
+ le_classresource := zend_register_list_destructors_ex(@class_destructor_handler, nil, zend_pchar(le_classresource_name), AModuleNumber);
+
+ if (Application.GetPHPClass(FClassName) = nil) then
+ begin
+ tsrmls := ts_resource_ex(0, nil);
+
+ ZeroMemory(@FClassEntry, SizeOf(TZend_Class_Entry));
+
+ FClassFunction[0].fname := zend_pchar(FClassName);
+ FClassFunction[0].handler := @class_init_new;
+ INIT_CLASS_ENTRY(FClassEntry, zend_pchar(FClassName) , @FClassFunction);
+
+
+ FClassObject := zend_register_internal_class(@FClassEntry, tsrmls);
+ Application.RegisterPHPClass(FClassName, FClassObject);
+ end;
+end;
+
+constructor TPHPClass.Create(AOwner: TComponent);
+begin
+ inherited;
+ if Assigned(Owner) then
+ begin
+ if ( not (AOwner is TCustomPHPExtension)) then
+ raise Exception.Create('TPHPClass component can be placed only on PHPExtension module');
+ end;
+ FProperties := TClassProperties.Create(Self);
+ FMethods := TPHPClassMethods.Create(Self, TPHPClassMethod);
+end;
+
+destructor TPHPClass.Destroy;
+begin
+ FProperties.Free;
+ FMethods.Free;
+ inherited;
+end;
+
+function TPHPClass.GetClassEntry: pzend_class_entry;
+begin
+ Result := Application.GetPHPClass(FClassName);
+end;
+
+function TPHPClass.InstanceConstructor(return_value : pzval): TPHPClassInstance;
+var
+ CI : TphpClassInstance;
+ rn : integer;
+ tsrmls : pointer;
+begin
+ Result := nil;
+ if not Assigned(Application) then
+ Exit;
+ tsrmls := ts_resource_ex(0, nil);
+ CI := TPHPClassInstance.Create(nil);
+ CI.FProperties.Assign(FProperties);
+ CI.FProducer := Self;
+ Result := CI;
+ rn := zend_register_resource(nil, CI, le_classresource);
+ FClassObject := GetClassEntry;
+ if not assigned(FClassObject) then
+ Exit;
+ object_init(return_value, FClassObject, TSRMLS );
+ add_property_resource_ex(return_value, 'instance', strlen('instance') +1, rn, TSRMLS);
+
+ {$IFDEF PHP5}
+ return_value.value.obj.handlers := @ClassObjectHandlers;
+ {$ENDIF}
+
+end;
+
+procedure TPHPClass.Loaded;
+begin
+ inherited;
+ if ( not (csDesigning in ComponentState)) then
+ begin
+ if Assigned(Application) then
+ ClassRegister(Application.ModuleNumber);
+ end;
+end;
+
+procedure TPHPClass.ProduceInstance(AValue: pzval);
+var
+ CI : TphpClassInstance;
+ rn : integer;
+ tsrmls : pointer;
+begin
+ if not Assigned(Application) then
+ Exit;
+ tsrmls := ts_resource_ex(0, nil);
+ CI := TPHPClassInstance.Create(nil);
+ CI.FProperties.Assign(FProperties);
+ CI.FProducer := Self;
+ rn := zend_register_resource(nil, CI, le_classresource);
+ FClassObject := Application.GetPHPClass(FClassName);
+ if not assigned(FClassObject) then
+ Exit;
+ object_init(AValue, FClassObject, TSRMLS );
+ add_property_resource_ex(AValue, 'instance', strlen('instance') +1, rn, TSRMLS);
+
+ {$IFDEF PHP5}
+ AValue.value.obj.handlers := @ClassObjectHandlers;
+ {$ENDIF}
+
+end;
+
+procedure TPHPClass.SetClassName(const Value: zend_ustr);
+begin
+ FClassName := {$IFDEF PHP_UNICODE}UTF8LowerCase(Value){$ELSE}LowerCase(Value){$ENDIF};
+end;
+
+procedure TPHPClass.SetMethods(const Value: TPHPClassmethods);
+begin
+ FMethods.Assign(Value);
+end;
+
+procedure TphpClass.SetProperties(const Value: TClassProperties);
+begin
+ FProperties.Assign(Value);
+end;
+
+{ TPHPClassInstance }
+
+constructor TPHPClassInstance.Create;
+begin
+ inherited;
+ FProperties := TClassProperties.Create(Self);
+end;
+
+destructor TPHPClassInstance.Destroy;
+begin
+ FProperties.Free;
+ inherited;
+end;
+
+
+procedure TPHPClassInstance.SetProperties(const Value: TClassProperties);
+begin
+ FProperties.Assign(Value);
+end;
+
+
+{ TClassProperty }
+
+procedure TClassProperty.Assign(Source: TPersistent);
+begin
+ if (Source is TClassProperty) then
+ begin
+ FName := TClassProperty(Source).Name;
+ FValue := TClassProperty(Source).Value;
+ end
+ else
+ inherited;
+end;
+
+function TClassProperty.GetAsBoolean: boolean;
+begin
+ if FValue = '' then
+ begin
+ Result := false;
+ Exit;
+ end;
+
+ if SameText(FValue, 'True') then
+ Result := true
+ else
+ Result := false;
+end;
+
+function TClassProperty.GetAsFloat: double;
+begin
+ if FValue = '' then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ Result := ValueToFloat(FValue);
+end;
+
+function TClassProperty.GetAsInteger: integer;
+var
+ c: CharPtr;
+begin
+{$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
+end;
+
+function TClassProperty.GetDisplayName: string;
+begin
+ if FName = '' then
+ result := inherited GetDisplayName
+ else
+ Result := FName;
+end;
+
+procedure TClassProperty.SetAsBoolean(const Value: boolean);
+begin
+ if Value then
+ FValue := 'True'
+ else
+ FValue := 'False';
+end;
+
+procedure TClassProperty.SetAsFloat(const Value: double);
+begin
+ FValue := FloatToValue(Value);
+end;
+
+procedure TClassProperty.SetAsInteger(const Value: integer);
+var
+ c: CharPtr;
+begin
+{$if CompilerVersion > 21}
+ c := FormatSettings.DecimalSeparator;
+ try
+ FormatSettings.DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
+end;
+
+
+{ TClassProperties }
+function TClassProperties.Add: TClassProperty;
+begin
+ result := TClassProperty(inherited Add);
+end;
+
+constructor TClassProperties.Create(AOwner: TComponent);
+begin
+ inherited create(TClassProperty);
+ FOwner := AOwner;
+end;
+
+function TClassProperties.GetItem(Index: Integer): TClassProperty;
+begin
+ Result := TClassProperty(inherited GetItem(Index));
+end;
+
+procedure TClassProperties.SetItem(Index: Integer; const Value: TClassProperty);
+begin
+ inherited SetItem(Index, Value)
+end;
+
+function TClassProperties.GetOwner : TPersistent;
+begin
+ Result := FOwner;
+end;
+
+function TClassProperties.GetVariables: zend_ustr;
+var i : integer;
+begin
+ for i := 0 to Count - 1 do
+ begin
+ Result := Result + Items[i].FName + '=' + Items[i].FValue;
+ if i < Count - 1 then
+ Result := Result + '&';
+ end;
+end;
+
+function TClassProperties.IndexOf(AName: zend_ustr): integer;
+var
+ i : integer;
+begin
+ Result := -1;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := i;
+ break;
+ end;
+ end;
+end;
+
+
+function TClassProperties.ByName(AName: zend_ustr): TClassProperty;
+var
+ i : integer;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := Items[i];
+ break;
+ end;
+ end;
+end;
+
+{ TPHPClassMethods }
+
+function TPHPClassMethods.Add: TPHPClassMethod;
+begin
+ Result := TPHPClassMethod(inherited Add);
+end;
+
+function TPHPClassMethods.ByName(AName: zend_ustr): TPHPClassMethod;
+var
+ i : integer;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do
+ begin
+ if SameText(Items[i].Name, AName) then
+ begin
+ Result := Items[i];
+ break;
+ end;
+ end;
+end;
+
+constructor TPHPClassMethods.Create(Owner: TPersistent;
+ ItemClass: TCollectionItemClass);
+begin
+ inherited Create(ItemClass);
+ FOwner := Owner;
+end;
+
+function TPHPClassMethods.GetItem(Index: Integer): TPHPClassMethod;
+begin
+ Result := TPHPClassMethod(inherited GetItem(Index));
+end;
+
+function TPHPClassMethods.GetOwner: TPersistent;
+begin
+ Result := FOwner;
+end;
+
+procedure TPHPClassMethods.SetItem(Index: Integer; Value: TPHPClassMethod);
+begin
+ inherited SetItem(Index, TCollectionItem(Value));
+end;
+
+procedure TPHPClassMethods.SetItemName(Item: TCollectionItem);
+var
+ I, J: Integer;
+ ItemName: string;
+ CurItem: TPHPClassMethod;
+begin
+ J := 1;
+ while True do
+ begin
+ ItemName := Format('classmethod%d', [J]);
+ I := 0;
+ while I < Count do
+ begin
+ CurItem := Items[I] as TPHPClassMethod;
+ if (CurItem <> Item) and (CompareText(CurItem.Name, ItemName) = 0) then
+ begin
+ Inc(J);
+ Break;
+ end;
+ Inc(I);
+ end;
+ if I >= Count then
+ begin
+ (Item as TPHPClassMethod).Name := ItemName;
+ Break;
+ end;
+ end;
+end;
+
+{ TPHPClassMethod }
+
+procedure TPHPClassMethod.AssignTo(Dest: TPersistent);
+begin
+ if Dest is TPHPClassMethod then
+ begin
+ if Assigned(Collection) then Collection.BeginUpdate;
+ try
+ with TPHPClassMethod(Dest) do
+ begin
+ Tag := Self.Tag;
+ Name := Self.Name;
+ end;
+ finally
+ if Assigned(Collection) then Collection.EndUpdate;
+ end;
+ end else inherited AssignTo(Dest);
+end;
+
+constructor TPHPClassMethod.Create(Collection: TCollection);
+begin
+ inherited;
+ FFunctionParams := TFunctionParams.Create(TPHPClassMethods(Self.Collection).GetOwner, TFunctionParam);
+ FZendVar := TZendVariable.Create;
+end;
+
+destructor TPHPClassMethod.Destroy;
+begin
+ FFunctionParams.Free;
+ FZendVar.Free;
+ inherited;
+end;
+
+function TPHPClassMethod.GetDisplayName: string;
+begin
+ if FName = '' then
+ result := inherited GetDisplayName else
+ Result := FName;
+end;
+
+procedure TPHPClassMethod.SetDisplayName(const Value: string);
+var
+ I: Integer;
+ F: TPHPClassMethod;
+begin
+ if
+ {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
+ begin
+ if Collection <> nil then
+ for I := 0 to Collection.Count - 1 do
+ begin
+ F := TPHPClassMethods(Collection).Items[I];
+ if (F <> Self) and (F is TPHPClassMethod) and
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0) then
+ raise Exception.Create('Duplicate method name');
+ end;
+ FName := {$IFDEF PHP_UNICODE}UTF8LowerCase(Value){$ELSE}AnsiLowerCase(Value){$ENDIF};
+ Changed(False);
+ end;
+end;
+
+procedure TPHPClassMethod._SetDisplayName(Value: zend_ustr);
+var
+ NewName : string;
+begin
+ NewName := value;
+ SetDisplayName(NewName);
+end;
+
+procedure TPHPClassMethod.SetFunctionParams(const Value: TFunctionParams);
+begin
+ FFunctionParams.Assign(Value);
+end;
+
+
+{$IFDEF PHP5}
+procedure RegisterClassHandlers;
+begin
+ Move(zend_get_std_object_handlers()^, ClassObjectHandlers, sizeof(zend_object_handlers));
+ ClassObjectHandlers.read_property := @class_get_property_handler;
+ ClassObjecthandlers.write_property := @class_set_property_handler;
+ ClassObjectHandlers.call_method := @class_call_method;
+ ClassObjectHandlers.get_method := @class_get_method;
+end;
+{$ENDIF}
+
+end.
diff --git a/phpModules.pas b/Source/phpModules.pas
similarity index 73%
rename from phpModules.pas
rename to Source/phpModules.pas
index 1ad29e2..43629c7 100644
--- a/phpModules.pas
+++ b/Source/phpModules.pas
@@ -1,767 +1,854 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpModules.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-
-unit phpModules;
-
-interface
- uses
- SyncObjs, Windows, SysUtils, Classes, Forms, Consts,
- PHPCommon,
- {$IFDEF VERSION6}RTLConsts, Variants,{$ENDIF} ZendAPI, phpAPI, phpFunctions,
- ZendTypes, PHPTypes;
-
-type
- TOnModuleEvent = procedure(Sender : TObject; TSRMLS_DC : pointer) of object;
-
- TCustomPHPExtension = class(TDataModule)
- private
- FAbout : TPHPAboutInfo;
- FTSRMLS : pointer;
- FOnModuleInfo : TOnModuleEvent;
- FOnModuleInit : TOnModuleEvent;
- FOnModuleShutdown : TOnModuleEvent;
- FOnRequestInit : TOnModuleEvent;
- FOnRequestShutdown : TOnModuleEvent;
- FOnActivation : TNotifyEvent;
- FOnDeactivation : TNotifyEvent;
- FModuleType : TZendModuleType;
- FVersion : string;
- FModuleName : string;
- FFunctions : TPHPFunctions;
- procedure SetFunctions(const Value : TPHPFunctions);
- protected
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- procedure puts(str : PChar);
- procedure phpwrite(str : PChar; str_len : integer);
- procedure phpwrite_h(str : PChar; str_len : integer);
- procedure puts_h(str : PChar);
- procedure ReportError(ErrType : integer; ErrText : PChar);
- function FunctionByName(const AName : string) :TPHPFunction;
- property About : TPHPAboutInfo read FAbout write FAbout stored False;
- property ModuleType : TZendModuleType read FModuleType write FModuleType default mtPersistent;
- property Version : string read FVersion write FVersion;
- property Functions : TPHPFunctions read FFunctions write SetFunctions;
- property ModuleName : string read FModuleName write FModuleName;
- property TSRMLS : pointer read FTSRMLS;
- property OnActivation : TNotifyEvent read FOnActivation write FOnActivation;
- property OnDeactivation : TNotifyEvent read FOnDeactivation write FOnDeactivation;
- property OnModuleInit : TOnModuleEvent read FOnModuleInit write FOnModuleInit;
- property OnModuleShutdown : TOnModuleEvent read FOnModuleShutdown write FOnModuleShutdown;
- property OnRequestInit : TOnModuleEvent read FOnRequestInit write FOnRequestInit;
- property OnRequestShutdown : TOnModuleEvent read FOnRequestShutdown write FOnRequestShutdown;
- property OnModuleInfo : TOnModuleEvent read FOnModuleInfo write FOnModuleInfo;
- end;
-
-
- TPHPExtension = class(TCustomPHPExtension)
- public
- constructor Create(AOwner : TComponent); override;
- published
- property About;
- property ModuleType;
- property Version;
- property Functions;
- property ModuleName;
- property OnActivation;
- property OnDeactivation;
- property OnModuleInit;
- property OnModuleShutdown;
- property OnRequestInit;
- property OnRequestShutdown;
- property OnModuleInfo;
- end;
-
- TClassRegister = class
- CN : string;
- CH : integer;
- end;
-
- TPHPApplication = class(TComponent)
- private
- FClassList : TThreadList;
- FActiveFunctionName : PChar;
- FPHPExtensionClass: TComponentClass;
- FCriticalSection: TCriticalSection;
- FActivePHPModules: TList;
- FInactivePHPModules: TList;
- FTitle: string;
- FMaxConnections: Integer;
- FCacheConnections: Boolean;
- FModuleNumber : integer;
- FLoading : boolean;
- function GetActiveCount: Integer;
- function GetInactiveCount: Integer;
- procedure SetCacheConnections(Value: Boolean);
- protected
- function ActivatePHPModule: TPHPExtension; dynamic;
- procedure DeactivatePHPModule(DataModule: TPHPExtension); dynamic;
- procedure DoHandleException(E: Exception); dynamic;
- procedure OnExceptionHandler(Sender: TObject; E: Exception);
-
- {$IFDEF PHP510}
- procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
- {$ELSE}
- procedure HandleRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
- {$ENDIF}
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Initialize; virtual;
- procedure Run; virtual;
- procedure CreateForm(InstanceClass: TComponentClass; var Reference);
- function GetPHPClass(const AClassName : string) : pzend_class_entry;
- function FindPHPClass(const AClassName : string) : pzend_class_entry;
- procedure RegisterPHPClass(const AClassName : string; AClassEntry : pzend_class_entry);
- procedure UnregisterPHPClasses;
- property Title: string read FTitle write FTitle;
- property ActiveCount: Integer read GetActiveCount;
- property CacheConnections: Boolean read FCacheConnections write SetCacheConnections;
- property InactiveCount: Integer read GetInactiveCount;
- property MaxConnections: Integer read FMaxConnections write FMaxConnections;
- property ModuleNumber : integer read FModuleNumber write FModuleNumber;
- property Loading : boolean read FLoading;
- end;
-
-
-function get_module : Pzend_module_entry; cdecl;
-
-
-var
- Application : TPHPApplication = nil;
- ModuleEntry : Tzend_module_entry;
- module_entry_table : array of zend_function_entry;
- app_globals_id : integer;
-
-implementation
-
-
-resourcestring
- SResNotFound = 'Resource %s not found';
-
-
-procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
-var
- Extension : TPHPExtension;
-begin
- if Assigned(Application) then
- begin
- Extension := Application.ActivatePHPModule;
- try
- if Assigned(Extension.OnModuleInfo) then
- begin
- Extension.OnModuleInfo(Application, TSRMLS_DC);
- end
- else
- begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar(Extension.ModuleName + ' support'), PChar('enabled'));
- php_info_print_table_end();
- end;
- finally
- Application.DeactivatePHPModule(Extension);
- end;
- end;
-end;
-
-
-{Module initialization}
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-var
- Extension : TPHPExtension;
-begin
- if app_globals_id = 0 then
- ts_allocate_id(@app_globals_id, sizeof(pointer), nil, nil);
- if Assigned(Application) then
- begin
- Application.ModuleNumber := module_number;
- Extension := Application.ActivatePHPModule;
- try
- if Assigned(Extension.OnModuleInit) then
- Extension.OnModuleInit(Application, TSRMLS_DC);
- finally
- Application.DeactivatePHPModule(Extension);
- end;
- end;
- result := SUCCESS;
-end;
-
-
-{Module shutdown}
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-var
- Extension : TPHPExtension;
-begin
- ts_free_id(app_globals_id);
-
- if Assigned(Application) then
- begin
- Extension := Application.ActivatePHPModule;
- try
- if Assigned(Extension.OnModuleShutdown) then
- Extension.OnModuleShutdown(Application, TSRMLS_DC);
- finally
- Application.DeactivatePHPModule(Extension);
- end;
- end;
- result := SUCCESS;
-end;
-
-
-{Request initialization}
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-var
- Extension : TPHPExtension;
- idp : pointer;
-begin
- if Assigned(Application) then
- begin
- Extension := Application.ActivatePHPModule;
- try
- if Assigned(Extension.OnRequestInit) then
- Extension.OnRequestInit(Application, TSRMLS_DC);
- idp := ts_resource_ex(app_globals_id, nil);
- integer(idp^) := integer(Extension);
- finally
- end;
- Result := SUCCESS;
- end
- else
- Result := FAILURE;
-end;
-
-{Request shutdown}
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-var
- Extension : TPHPExtension;
- idp : pointer;
- id : integer;
-begin
- Result := SUCCESS;
- idp := ts_resource_ex(app_globals_id, nil);
- id := integer(idp^);
- if Assigned(Application) then
- begin
- Extension := pointer(id);
- try
- if Assigned(Extension.OnRequestShutdown) then
- Extension.OnRequestShutdown(Application, TSRMLS_DC);
- finally
- Application.DeactivatePHPModule(Extension);
- end;
- end;
-end;
-
-{$IFDEF PHP510}
-procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval;
- this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-begin
- ZVAL_NULL(return_value);
- if Assigned(Application) then
- try
- Application.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
- except
- end;
-end;
-{$ELSE}
-procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-begin
- ZVAL_NULL(return_value);
- if Assigned(Application) then
- try
- Application.HandleRequest(ht, return_value, this_ptr, return_value_used, TSRMLS_DC);
- except
- end;
-end;
-{$ENDIF}
-
-
-function get_module : Pzend_module_entry; cdecl;
-var
- cnt : integer;
- Extension : TPHPExtension;
-begin
- if ModuleEntry.module_started = 1 then
- begin
- Result := @ModuleEntry;
- Exit;
- end;
-
-
- try
- if Assigned(Application) then
- begin
- Application.FLoading := true;
- Extension := TPHPExtension(Application.ActivatePHPModule);
- ModuleEntry.size := sizeof(Tzend_module_entry);
- ModuleEntry.zend_api := ZEND_MODULE_API_NO;
- ModuleEntry.zts := USING_ZTS;
- {$IFDEF PHP510}
- ModuleEntry.Name := estrndup(PChar(Extension.ModuleName), length(extension.ModuleName));
- ModuleEntry.version := estrndup(PChar(Extension.Version), length(Extension.Version));
- {$ELSE}
- ModuleEntry.Name := StrNew(PChar(Extension.ModuleName));
- ModuleEntry.version := StrNew(PChar(Extension.Version));
- {$ENDIF}
- ModuleEntry.module_startup_func := @minit;
- ModuleEntry.module_shutdown_func := @mshutdown;
- ModuleEntry.request_startup_func := @rinit;
- ModuleEntry.request_shutdown_func := @rshutdown;
- ModuleEntry.info_func := @php_info_module;
- SetLength(module_entry_table, Extension.FFunctions.Count + 1);
- for cnt := 0 to Extension.FFunctions.Count - 1 do
- begin
- {$IFDEF PHP510}
- module_entry_table[cnt].fname := estrndup(PChar(Extension.FFunctions[cnt].FunctionName), length(Extension.FFunctions[cnt].FunctionName));
- {$ELSE}
- module_entry_table[cnt].fname := StrNew(PChar(Extension.FFunctions[cnt].FunctionName));
- {$ENDIF}
- module_entry_table[cnt].handler := @DispatchRequest;
- {$IFDEF PHP4}
- module_entry_table[cnt].func_arg_types := nil;
- {$ENDIF}
- end;
- module_entry_table[Extension.FFunctions.Count].fname := nil;
- module_entry_table[Extension.FFunctions.Count].handler := nil;
- {$IFDEF PHP4}
- module_entry_table[Extension.FFunctions.Count].func_arg_types := nil;
- {$ENDIF}
-
- ModuleEntry.functions := @module_entry_table[0];
- ModuleEntry._type := ORD(Extension.ModuleType) + 1;
- Application.DeactivatePHPModule(Extension);
- Application.FLoading := false;
- Result := @ModuleEntry;
- end
- else
- Result := nil;
- except
- Result := nil;
- end;
-end;
-
-{ TCustomPHPExtension }
-constructor TCustomPHPExtension.Create(AOwner: TComponent);
-begin
- inherited CreateNew(AOwner);
- FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
- FModuleType := mtPersistent;
- FVersion := '0.0';
-end;
-
-destructor TCustomPHPExtension.Destroy;
-begin
- if Assigned(OnDestroy) then
- try
- OnDestroy(Self);
- except
- end;
- FFunctions.Free;
- inherited;
-end;
-
-
-function TCustomPHPExtension.FunctionByName(
- const AName: string): TPHPFunction;
-var
- cnt : integer;
-begin
- Result := nil;
- for cnt := 0 to FFunctions.Count - 1 do
- begin
- if SameText(AName, FFunctions[cnt].FunctionName) then
- break;
- end;
-end;
-
-procedure TCustomPHPExtension.phpwrite(str: PChar; str_len: integer);
-begin
- php_body_write(str, str_len, FTSRMLS);
-end;
-
-procedure TCustomPHPExtension.phpwrite_h(str: PChar; str_len: integer);
-begin
- php_header_write(str, str_len, FTSRMLS);
-end;
-
-procedure TCustomPHPExtension.puts(str: PChar);
-begin
- php_body_write(str, strlen(str), FTSRMLS);
-end;
-
-procedure TCustomPHPExtension.puts_h(str: PChar);
-begin
- php_header_write(str, strlen(str), FTSRMLS);
-end;
-
-procedure TCustomPHPExtension.ReportError(ErrType: integer;
- ErrText: PChar);
-begin
- zend_error(ErrType, ErrText);
-end;
-
-procedure TCustomPHPExtension.SetFunctions(const Value: TPHPFunctions);
-begin
- FFunctions.Assign(Value);
-end;
-
-{ TPHPExtension }
-
-constructor TPHPExtension.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- if (ClassType <> TCustomPHPExtension) and not (csDesigning in ComponentState) then
- begin
- if not InitInheritedComponent(Self, TCustomPHPExtension) then
- raise EResNotFound.CreateFmt(SResNotFound, [ClassName]);
- try
- if Assigned(OnCreate) and OldCreateOrder then OnCreate(Self);
- except
- Forms.Application.HandleException(Self);
- end;
- end;
-end;
-
-{ TPHPApplication }
-
-
-procedure DoneVCLApplication;
-begin
- try
- Forms.Application.OnException := nil;
- if Forms.Application.Handle <> 0 then ShowOwnedPopups(Forms.Application.Handle, False);
- Forms.Application.ShowHint := False;
- Forms.Application.Destroying;
- Forms.Application.DestroyComponents;
- except
- end;
-end;
-
-procedure DLLExitProc(Reason: Integer); register;
-begin
- if Reason = DLL_PROCESS_DETACH then DoneVCLApplication;
-end;
-
-
-constructor TPHPApplication.Create(AOwner: TComponent);
-begin
- inherited;
- FLoading := false;
- FClassList := TThreadList.Create;
- FCriticalSection := TCriticalSection.Create;
- FActivePHPModules := TList.Create;
- FInactivePHPModules := TList.Create;
- FMaxConnections := 32;
- FCacheConnections := true;
- IsMultiThread := True;
- DLLProc := @DLLExitProc;
-end;
-
-destructor TPHPApplication.Destroy;
-begin
- try
- FCriticalSection.Free;
- FActivePHPModules.Free;
- FInactivePHPModules.Free;
- UnregisterPHPClasses;
- FClassList.Free;
- except
- on E : Exception do
- OutputDebugString(PChar(E.Message));
- end;
- inherited Destroy;
-end;
-
-
-procedure TPHPApplication.CreateForm(InstanceClass: TComponentClass;
- var Reference);
-begin
- if FPHPExtensionClass = nil then
- FPHPExtensionClass := InstanceClass
- else
- raise Exception.Create('Only one PHP extension allowed');
-end;
-
-function TPHPApplication.ActivatePHPModule: TPHPExtension;
-begin
- FCriticalSection.Enter;
- try
- Result := nil;
- if (FMaxConnections > 0) and (FActivePHPModules.Count >= FMaxConnections) then
- raise Exception.Create('Too many active connections');
- if FInactivePHPModules.Count > 0 then
- begin
- Result := FInactivePHPModules[0];
- FInactivePHPModules.Delete(0);
- FActivePHPModules.Add(Result);
- end else if FPHPExtensionClass <> nil then
- begin
- TComponent(Result) := FPHPExtensionClass.Create(Self);
- FActivePHPModules.Add(Result);
- if Assigned(Result.FOnActivation) then
- Result.FOnActivation(Self);
- end else raise Exception.Create('No PHP extensions registered');
- finally
- FCriticalSection.Leave;
- end;
-end;
-
-procedure TPHPApplication.DeactivatePHPModule(DataModule: TPHPExtension);
-begin
- FCriticalSection.Enter;
- try
- if FActivePHPModules.IndexOf(DataModule) > -1 then
- begin
- if Assigned(DataModule.FOnDeactivation) then
- DataModule.FOnDeactivation(Self);
- FActivePHPModules.Remove(DataModule);
- if FCacheConnections then
- FInactivePHPModules.Add(DataModule)
- else DataModule.Free;
- end;
- finally
- FCriticalSection.Leave;
- end;
-end;
-
-procedure TPHPApplication.DoHandleException(E: Exception);
-begin
-
-end;
-
-
-function TPHPApplication.GetActiveCount: Integer;
-begin
- FCriticalSection.Enter;
- try
- Result := FActivePHPModules.Count;
- finally
- FCriticalSection.Leave;
- end;
-end;
-
-function TPHPApplication.GetInactiveCount: Integer;
-begin
- FCriticalSection.Enter;
- try
- Result := FInactivePHPModules.Count;
- finally
- FCriticalSection.Leave;
- end;
-end;
-
-
-procedure TPHPApplication.Initialize;
-begin
- // This is a place holder
- if InitProc <> nil then TProcedure(InitProc);
-end;
-
-procedure TPHPApplication.OnExceptionHandler(Sender: TObject;
- E: Exception);
-begin
- DoHandleException(E);
-end;
-
-procedure TPHPApplication.Run;
-begin
- Forms.Application.OnException := OnExceptionHandler;
-end;
-
-
-procedure TPHPApplication.SetCacheConnections(Value: Boolean);
-var
- I: Integer;
-begin
- if Value <> FCacheConnections then
- begin
- FCacheConnections := Value;
- if not Value then
- begin
- FCriticalSection.Enter;
- try
- for I := 0 to FInactivePHPModules.Count - 1 do
- TPHPExtension(FInactivePHPModules[I]).Free;
- FInactivePHPModules.Clear;
- finally
- FCriticalSection.Leave;
- end;
- end;
- end;
-end;
-
-
-
-{$IFDEF PHP510}
-procedure TPHPApplication.HandleRequest(ht: integer; return_value : pzval; return_value_ptr : ppzval;
- this_ptr: pzval; return_value_used: integer; TSRMLS_DC: pointer);
-{$ELSE}
-procedure TPHPApplication.HandleRequest(ht: integer; return_value : pzval;
- this_ptr: pzval; return_value_used: integer; TSRMLS_DC: pointer);
-{$ENDIF}
-var
- DataModule: TPHPExtension;
- cnt : integer;
- Params : pppointer;
- AFunction : TPHPFunction;
- i : integer;
- pval : pzval;
- idp : pointer;
- id : integer;
-
-begin
- pval := nil;
-
- idp := ts_resource_ex(integer(app_globals_id), nil);
- id := integer(idp^);
- if id <= 0 then
- Exit;
-
- Params := emalloc(ht * sizeOf(ppzval));
- try
- if ht > 0 then
- begin
- if ( not (_zend_get_parameters_array_ex(ht, Params, TSRMLS_DC) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- pval := pzval(params^^);
- end;
-
-
- DataModule := TPHPExtension(id);
- if DataModule <> nil then
- try
- DataModule.FTSRMLS := TSRMLS_DC;
- FActiveFunctionName := get_active_function_name(TSRMLS_DC);
- for cnt := 0 to DataModule.FFunctions.Count - 1 do
- begin
- if SameText(DataModule.FFunctions[cnt].FunctionName, FActiveFunctionName) then
- begin
- AFunction := DataModule.FFunctions[cnt];
- if Assigned(AFunction.OnExecute) then
- begin
- if AFunction.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ht > 0 then begin
- for i := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(AFunction.Parameters[i].ParamType, pval) then
- begin
- zend_error(E_WARNING, PChar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
- Exit;
- end;
- AFunction.Parameters[i].ZendValue := pval;
- inc(integer(params^), sizeof(ppzval));
- pval := pzval(params^^);
- end;
- end;
-
- AFunction.ZendVar.AsZendVariable := return_value;
- AFunction.OnExecute(DataModule, AFunction.Parameters, AFunction.ReturnValue, this_ptr, TSRMLS_DC);
- if AFunction.ZendVar.ISNull then
- variant2zval(AFunction.ReturnValue, return_value);
- end;
- break;
- end;
- end;
- finally
- efree(Params);
- end;
- except
- end;
-end;
-
-
-
-function TPHPApplication.GetPHPClass(
- const AClassName: string): pzend_class_entry;
-var
- I: Integer;
-begin
- with FClassList.LockList do
- try
- for I := 0 to Count - 1 do
- begin
- if SameText(TClassRegister(Items[I]).CN, AClassName) then
- begin
- Result := pzend_class_entry(TClassRegister(Items[I]).CH);
- Exit;
- end;
- end;
- Result := nil;
- finally
- FClassList.UnlockList;
- end;
-end;
-
-
-procedure ClassNotFound(const ClassName: string);
-begin
- raise EClassNotFound.CreateFmt(SClassNotFound, [ClassName]);
-end;
-
-function TPHPApplication.FindPHPClass(
- const AClassName: string): pzend_class_entry;
-begin
- Result := GetPHPClass(AClassName);
- if Result = nil then ClassNotFound(AClassName);
-end;
-
-procedure TPHPApplication.RegisterPHPClass(const AClassName: string;
- AClassEntry: pzend_class_entry);
-var
- ClassRegister : TClassRegister;
-begin
- With FClassList.LockList do
- try
- if GetPHPClass(AClassName) <> nil then
- raise EFilerError.CreateResFmt(@SDuplicateClass, [AClassName]);
- ClassRegister := TClassRegister.Create;
- ClassRegister.CN := LowerCase(AClassName);
- ClassRegister.CH := integer(AClassEntry);
- Add(ClassRegister);
- finally
- FClassList.UnlockList;
- end;
-end;
-
-procedure TPHPApplication.UnregisterPHPClasses;
-var
- i : integer;
-begin
- with FClassList.LockList do
- try
- for I := 0 to Count - 1 do
- TClassRegister(Items[i]).Free;
- FClassList.Clear;
- finally
- FClassList.UnlockList;
- end;
-end;
-
-
-exports
- get_module;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpModules.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+
+unit phpModules;
+
+interface
+ uses
+ SyncObjs, {$IFNDEF FPC} Windows, {$ELSE} LCLType,LCLIntf,dynlibs,LCLProc,{$ENDIF} SysUtils, Types, Classes,
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms, VCL.Consts,
+ {$elseif defined(FMX)}
+ FMX.Forms, FMX.Consts,
+ {$elseif defined(KYLIX)}
+ QForms, QConsts,
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms, Consts,
+ {$ifend}
+
+ PHPCommon,
+ {$IFDEF VERSION6}RTLConsts, Variants,{$ENDIF} ZendAPI, phpAPI,
+ phpFunctions,
+ ZendTypes,
+ PHPTypes;
+
+type
+ TOnModuleEvent = procedure(Sender : TObject; TSRMLS_DC : pointer) of object;
+
+ TCustomPHPExtension = class(TDataModule)
+ private
+ FAbout : TPHPAboutInfo;
+ FTSRMLS : pointer;
+ FOnModuleInfo : TOnModuleEvent;
+ FOnModuleInit : TOnModuleEvent;
+ FOnModuleShutdown : TOnModuleEvent;
+ FOnRequestInit : TOnModuleEvent;
+ FOnRequestShutdown : TOnModuleEvent;
+ FOnActivation : TNotifyEvent;
+ FOnDeactivation : TNotifyEvent;
+ FModuleType : TZendModuleType;
+ FVersion : string;
+ FModuleName : string;
+ FFunctions : TPHPFunctions;
+ procedure SetFunctions(const Value : TPHPFunctions);
+ protected
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure puts(str : zend_pchar);
+ procedure phpwrite(str : zend_pchar; str_len : integer);
+ procedure phpwrite_h(str : zend_pchar; str_len : integer);
+ procedure puts_h(str : zend_pchar);
+ procedure ReportError(ErrType : integer; ErrText : zend_pchar);
+ function FunctionByName(const AName : string) :TPHPFunction;
+ property About : TPHPAboutInfo read FAbout write FAbout stored False;
+ property ModuleType : TZendModuleType read FModuleType write FModuleType default mtPersistent;
+ property Version : string read FVersion write FVersion;
+ property Functions : TPHPFunctions read FFunctions write SetFunctions;
+ property ModuleName : string read FModuleName write FModuleName;
+ property TSRMLS : pointer read FTSRMLS;
+ property OnActivation : TNotifyEvent read FOnActivation write FOnActivation;
+ property OnDeactivation : TNotifyEvent read FOnDeactivation write FOnDeactivation;
+ property OnModuleInit : TOnModuleEvent read FOnModuleInit write FOnModuleInit;
+ property OnModuleShutdown : TOnModuleEvent read FOnModuleShutdown write FOnModuleShutdown;
+ property OnRequestInit : TOnModuleEvent read FOnRequestInit write FOnRequestInit;
+ property OnRequestShutdown : TOnModuleEvent read FOnRequestShutdown write FOnRequestShutdown;
+ property OnModuleInfo : TOnModuleEvent read FOnModuleInfo write FOnModuleInfo;
+ end;
+
+
+ TPHPExtension = class(TCustomPHPExtension)
+ public
+ constructor Create(AOwner : TComponent); override;
+ published
+ property About;
+ property ModuleType;
+ property Version;
+ property Functions;
+ property ModuleName;
+ property OnActivation;
+ property OnDeactivation;
+ property OnModuleInit;
+ property OnModuleShutdown;
+ property OnRequestInit;
+ property OnRequestShutdown;
+ property OnModuleInfo;
+ end;
+
+ TClassRegister = class
+ CN : string;
+ CH : integer;
+ end;
+
+ TPHPApplication = class(TComponent)
+ private
+ FClassList : TThreadList;
+ FPHPExtensionClass: TComponentClass;
+ FCriticalSection: TCriticalSection;
+ FActivePHPModules: TList;
+ FInactivePHPModules: TList;
+ FTitle: string;
+ FMaxConnections: Integer;
+ FCacheConnections: Boolean;
+ FModuleNumber : integer;
+ FLoading : boolean;
+ function GetActiveCount: Integer;
+ function GetInactiveCount: Integer;
+ procedure SetCacheConnections(Value: Boolean);
+ protected
+ function ActivatePHPModule: TPHPExtension; dynamic;
+ procedure DeactivatePHPModule(DataModule: TPHPExtension); dynamic;
+ procedure DoHandleException(E: Exception); dynamic;
+ procedure OnExceptionHandler(Sender: TObject; E: Exception);
+ procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Initialize; virtual;
+ procedure Run; virtual;
+ procedure CreateForm(InstanceClass: TComponentClass; var Reference);
+ function GetPHPClass(const AClassName : string) : pzend_class_entry;
+ function FindPHPClass(const AClassName : string) : pzend_class_entry;
+ procedure RegisterPHPClass(const AClassName : string; AClassEntry : pzend_class_entry);
+ procedure UnregisterPHPClasses;
+ property Title: string read FTitle write FTitle;
+ property ActiveCount: Integer read GetActiveCount;
+ property CacheConnections: Boolean read FCacheConnections write SetCacheConnections;
+ property InactiveCount: Integer read GetInactiveCount;
+ property MaxConnections: Integer read FMaxConnections write FMaxConnections;
+ property ModuleNumber : integer read FModuleNumber write FModuleNumber;
+ property Loading : boolean read FLoading;
+ end;
+
+
+function get_module : Pzend_module_entry; cdecl;
+
+
+var
+ Application : TPHPApplication = nil;
+ ModuleEntry : Tzend_module_entry;
+ module_entry_table : array of zend_function_entry;
+ app_globals_id : integer;
+
+implementation
+
+
+resourcestring
+ SResNotFound = 'Resource %s not found';
+
+
+procedure php_info_module(zend_module : Pzend_module_entry; TSRMLS_DC : pointer); cdecl;
+var
+ Extension : TPHPExtension;
+begin
+ if Assigned(Application) then
+ begin
+ Extension := Application.ActivatePHPModule;
+ try
+ if Assigned(Extension.OnModuleInfo) then
+ begin
+ Extension.OnModuleInfo(Application, TSRMLS_DC);
+ end
+ else
+ begin
+ php_info_print_table_start();
+ php_info_print_table_row(2, zend_pchar(Extension.ModuleName + ' support'), zend_pchar('enabled'));
+ php_info_print_table_end();
+ end;
+ finally
+ Application.DeactivatePHPModule(Extension);
+ end;
+ end;
+end;
+
+
+{Module initialization}
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ Extension : TPHPExtension;
+begin
+ if app_globals_id = 0 then
+ ts_allocate_id(@app_globals_id, sizeof(pointer), nil, nil);
+ if Assigned(Application) then
+ begin
+ Application.ModuleNumber := module_number;
+ Extension := Application.ActivatePHPModule;
+ try
+ if Assigned(Extension.OnModuleInit) then
+ Extension.OnModuleInit(Application, TSRMLS_DC);
+ finally
+ Application.DeactivatePHPModule(Extension);
+ end;
+ end;
+ result := SUCCESS;
+end;
+
+
+{Module shutdown}
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ Extension : TPHPExtension;
+begin
+ ts_free_id(app_globals_id);
+
+ if Assigned(Application) then
+ begin
+ Extension := Application.ActivatePHPModule;
+ try
+ if Assigned(Extension.OnModuleShutdown) then
+ Extension.OnModuleShutdown(Application, TSRMLS_DC);
+ finally
+ Application.DeactivatePHPModule(Extension);
+ end;
+ end;
+ result := SUCCESS;
+end;
+
+
+{Request initialization}
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ Extension : TPHPExtension;
+ idp : pointer;
+begin
+ if Assigned(Application) then
+ begin
+ Extension := Application.ActivatePHPModule;
+ try
+ if Assigned(Extension.OnRequestInit) then
+ Extension.OnRequestInit(Application, TSRMLS_DC);
+ idp := ts_resource_ex(app_globals_id, nil);
+ integer(idp^) := integer(Extension);
+ finally
+ end;
+ Result := SUCCESS;
+ end
+ else
+ Result := FAILURE;
+end;
+
+{Request shutdown}
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ Extension : TPHPExtension;
+ idp : pointer;
+ id : integer;
+begin
+ Result := SUCCESS;
+ idp := ts_resource_ex(app_globals_id, nil);
+ id := integer(idp^);
+ if Assigned(Application) then
+ begin
+ Extension := pointer(id);
+ try
+ if Assigned(Extension.OnRequestShutdown) then
+ Extension.OnRequestShutdown(Application, TSRMLS_DC);
+ finally
+ Application.DeactivatePHPModule(Extension);
+ end;
+ end;
+end;
+
+{$IFDEF PHP510}
+procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+begin
+ ZvalVal(return_value);
+ if Assigned(Application) then
+ try
+ Application.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
+ except
+ end;
+end;
+{$ELSE}
+procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+begin
+ ZVAL_NULL(return_value);
+ if Assigned(Application) then
+ try
+ Application.HandleRequest(ht, return_value, nil, this_ptr, return_value_used, TSRMLS_DC);
+ except
+ end;
+end;
+{$ENDIF}
+
+
+function get_module : Pzend_module_entry; cdecl;
+var
+ cnt : integer;
+ Extension : TPHPExtension;
+ ModuleName: zend_ustr;
+ Version : zend_ustr;
+ FunctionName : zend_ustr;
+begin
+ if ModuleEntry.module_started = 1 then
+ begin
+ Result := @ModuleEntry;
+ Exit;
+ end;
+
+
+ try
+ if Assigned(Application) then
+ begin
+ Application.FLoading := true;
+ Extension := TPHPExtension(Application.ActivatePHPModule);
+ ModuleEntry.size := sizeof(Tzend_module_entry);
+ ModuleEntry.zend_api := ZEND_MODULE_API_NO;
+ ModuleEntry.zts := USING_ZTS;
+ ModuleName := zend_ustr(Extension.ModuleName);
+
+ {$IFNDEF COMPILER_VC9}
+ ModuleEntry.Name := strdup(zend_pchar(ModuleName));
+ {$ELSE}
+ ModuleEntry.Name := DupStr(zend_pchar(ModuleName));
+ {$ENDIF}
+
+ Version := zend_ustr(Extension.Version);
+
+ {$IFNDEF COMPILER_VC9}
+ ModuleEntry.version := strdup(zend_pchar(Version));
+ {$ELSE}
+ ModuleEntry.version := DupStr(zend_pchar(Version));
+ {$ENDIF}
+
+
+ ModuleEntry.module_startup_func := @minit;
+ ModuleEntry.module_shutdown_func := @mshutdown;
+ ModuleEntry.request_startup_func := @rinit;
+ ModuleEntry.request_shutdown_func := @rshutdown;
+ ModuleEntry.info_func := @php_info_module;
+ SetLength(module_entry_table, Extension.FFunctions.Count + 1);
+ for cnt := 0 to Extension.FFunctions.Count - 1 do
+ begin
+ FunctionName := zend_ustr(Extension.FFunctions[cnt].FunctionName);
+
+ {$IFNDEF COMPILER_VC9}
+ module_entry_table[cnt].fname := strdup(zend_pchar(FunctionName));
+ {$ELSE}
+ module_entry_table[cnt].fname :=DupStr(zend_pchar(FunctionName));
+ {$ENDIF}
+
+ module_entry_table[cnt].handler := @DispatchRequest;
+ module_entry_table[cnt].arg_info := nil;
+ end;
+ module_entry_table[Extension.FFunctions.Count].fname := nil;
+ module_entry_table[Extension.FFunctions.Count].handler := nil;
+ module_entry_table[Extension.FFunctions.Count].arg_info := nil;
+
+ ModuleEntry.functions := @module_entry_table[0];
+ ModuleEntry._type := ORD(Extension.ModuleType) + 1;
+ {$IFDEF PHP530}
+
+ {$IFNDEF COMPILER_VC9}
+ moduleEntry.build_id := strdup(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ moduleEntry.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
+
+ {$ENDIF}
+ Application.DeactivatePHPModule(Extension);
+ Application.FLoading := false;
+ Result := @ModuleEntry;
+ end
+ else
+ Result := nil;
+ except
+ Result := nil;
+ end;
+end;
+
+{ TCustomPHPExtension }
+constructor TCustomPHPExtension.Create(AOwner: TComponent);
+begin
+ inherited CreateNew(AOwner);
+ FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
+ FModuleType := mtPersistent;
+ FVersion := '0.0';
+end;
+
+destructor TCustomPHPExtension.Destroy;
+begin
+ if Assigned(OnDestroy) then
+ try
+ OnDestroy(Self);
+ except
+ end;
+ FFunctions.Free;
+ inherited;
+end;
+
+
+function TCustomPHPExtension.FunctionByName(
+ const AName: string): TPHPFunction;
+var
+ cnt : integer;
+begin
+ Result := nil;
+ for cnt := 0 to FFunctions.Count - 1 do
+ begin
+ if SameText(AName, FFunctions[cnt].FunctionName) then
+ break;
+ end;
+end;
+
+procedure TCustomPHPExtension.phpwrite(str: zend_pchar; str_len: integer);
+begin
+{$IFNDEF PHP550}
+ php_body_write(str, str_len, FTSRMLS);
+{$ENDIF}
+end;
+
+procedure TCustomPHPExtension.phpwrite_h(str: zend_pchar; str_len: integer);
+begin
+{$IFNDEF PHP550}
+ php_header_write(str, str_len, FTSRMLS);
+{$ENDIF}
+end;
+
+procedure TCustomPHPExtension.puts(str: zend_pchar);
+begin
+{$IFNDEF PHP550}
+ php_body_write(str, strlen(str), FTSRMLS);
+{$ENDIF}
+end;
+
+procedure TCustomPHPExtension.puts_h(str: zend_pchar);
+begin
+{$IFNDEF PHP550}
+ php_header_write(str, strlen(str), FTSRMLS);
+{$ENDIF}
+end;
+
+procedure TCustomPHPExtension.ReportError(ErrType: integer;
+ ErrText: zend_pchar);
+begin
+ zend_error(ErrType, ErrText);
+end;
+
+procedure TCustomPHPExtension.SetFunctions(const Value: TPHPFunctions);
+begin
+ FFunctions.Assign(Value);
+end;
+
+{ TPHPExtension }
+
+constructor TPHPExtension.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ if (ClassType <> TCustomPHPExtension) and not (csDesigning in ComponentState) then
+ begin
+ if not InitInheritedComponent(Self, TCustomPHPExtension) then
+ raise EResNotFound.CreateFmt(SResNotFound, [ClassName]);
+ try
+ if Assigned(OnCreate) and OldCreateOrder then OnCreate(Self);
+ except
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.HandleException(Self);
+ end;
+ end;
+end;
+
+{ TPHPApplication }
+
+
+procedure DoneVCLApplication;
+begin
+ try
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.OnException := nil;
+ {$IFDEF WINDOWS}
+ if {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.Handle <> 0 then ShowOwnedPopups({$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.Handle, False);
+ {$ELSE}
+ Forms.Application.ShowHint := False;
+ Forms.Application.Destroying;
+ Forms.Application.DestroyComponents;
+ {$ENDIF}
+ except
+ end;
+end;
+
+procedure DLLExitProc(Reason: Integer); register;
+begin
+ if Reason = DLL_PROCESS_DETACH then DoneVCLApplication;
+end;
+
+
+constructor TPHPApplication.Create(AOwner: TComponent);
+begin
+ inherited;
+ FLoading := false;
+ FClassList := TThreadList.Create;
+ FCriticalSection := TCriticalSection.Create;
+ FActivePHPModules := TList.Create;
+ FInactivePHPModules := TList.Create;
+ FMaxConnections := 32;
+ FCacheConnections := true;
+ IsMultiThread := True;
+ DLLProc := @DLLExitProc;
+end;
+
+destructor TPHPApplication.Destroy;
+begin
+ try
+ FCriticalSection.Free;
+ FActivePHPModules.Free;
+ FInactivePHPModules.Free;
+ UnregisterPHPClasses;
+ FClassList.Free;
+ except
+ on E : Exception do
+ OutputDebugStringA(zend_pchar(E.Message));
+ end;
+ inherited Destroy;
+end;
+
+
+procedure TPHPApplication.CreateForm(InstanceClass: TComponentClass;
+ var Reference);
+begin
+ if FPHPExtensionClass = nil then
+ FPHPExtensionClass := InstanceClass
+ else
+ raise Exception.Create('Only one PHP extension allowed');
+end;
+
+function TPHPApplication.ActivatePHPModule: TPHPExtension;
+begin
+ FCriticalSection.Enter;
+ try
+ Result := nil;
+ if (FMaxConnections > 0) and (FActivePHPModules.Count >= FMaxConnections) then
+ raise Exception.Create('Too many active connections');
+ if FInactivePHPModules.Count > 0 then
+ begin
+ Result := FInactivePHPModules[0];
+ FInactivePHPModules.Delete(0);
+ FActivePHPModules.Add(Result);
+ end else if FPHPExtensionClass <> nil then
+ begin
+ TComponent(Result) := FPHPExtensionClass.Create(Self);
+ FActivePHPModules.Add(Result);
+ if Assigned(Result.FOnActivation) then
+ Result.FOnActivation(Self);
+ end else raise Exception.Create('No PHP extensions registered');
+ finally
+ FCriticalSection.Leave;
+ end;
+end;
+
+procedure TPHPApplication.DeactivatePHPModule(DataModule: TPHPExtension);
+begin
+ FCriticalSection.Enter;
+ try
+ if FActivePHPModules.IndexOf(DataModule) > -1 then
+ begin
+ if Assigned(DataModule.FOnDeactivation) then
+ DataModule.FOnDeactivation(Self);
+ FActivePHPModules.Remove(DataModule);
+ if FCacheConnections then
+ FInactivePHPModules.Add(DataModule)
+ else DataModule.Free;
+ end;
+ finally
+ FCriticalSection.Leave;
+ end;
+end;
+
+procedure TPHPApplication.DoHandleException(E: Exception);
+begin
+
+end;
+
+
+function TPHPApplication.GetActiveCount: Integer;
+begin
+ FCriticalSection.Enter;
+ try
+ Result := FActivePHPModules.Count;
+ finally
+ FCriticalSection.Leave;
+ end;
+end;
+
+function TPHPApplication.GetInactiveCount: Integer;
+begin
+ FCriticalSection.Enter;
+ try
+ Result := FInactivePHPModules.Count;
+ finally
+ FCriticalSection.Leave;
+ end;
+end;
+
+
+procedure TPHPApplication.Initialize;
+begin
+ // This is a place holder
+ if InitProc <> nil then TProcedure(InitProc);
+end;
+
+procedure TPHPApplication.OnExceptionHandler(Sender: TObject;
+ E: Exception);
+begin
+ DoHandleException(E);
+end;
+
+procedure TPHPApplication.Run;
+begin
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.OnException := OnExceptionHandler;
+end;
+
+
+procedure TPHPApplication.SetCacheConnections(Value: Boolean);
+var
+ I: Integer;
+begin
+ if Value <> FCacheConnections then
+ begin
+ FCacheConnections := Value;
+ if not Value then
+ begin
+ FCriticalSection.Enter;
+ try
+ for I := 0 to FInactivePHPModules.Count - 1 do
+ TPHPExtension(FInactivePHPModules[I]).Free;
+ FInactivePHPModules.Clear;
+ finally
+ FCriticalSection.Leave;
+ end;
+ end;
+ end;
+end;
+
+
+
+procedure TPHPApplication.HandleRequest(ht: integer; return_value : pzval; return_value_ptr : ppzval;
+ this_ptr: pzval; return_value_used: integer; TSRMLS_DC: pointer);
+var
+ DataModule: TPHPExtension;
+ cnt : integer;
+ Params : pppzval;
+ AFunction : TPHPFunction;
+ i : integer;
+ pval : pzval;
+ idp : pointer;
+ id : integer;
+ ReturnValue : variant;
+ FZendVar : TZendVariable;
+ FParameters : TFunctionParams;
+ FActiveFunctionName : string;
+
+begin
+ pval := nil;
+ idp := ts_resource_ex(integer(app_globals_id), nil);
+ id := integer(idp^);
+ if id <= 0 then
+ Exit;
+
+ FParameters := TFunctionParams.Create(nil, TFunctionParam);
+ try
+
+ Params := emalloc(ht * sizeOf(ppzval));
+ try
+ if ht > 0 then
+ begin
+ if ( not (_zend_get_parameters_array_ex(ht, Params, TSRMLS_DC) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ pval := pzval(params^^);
+ end;
+
+
+ DataModule := TPHPExtension(id);
+ if DataModule <> nil then
+ try
+ DataModule.FTSRMLS := TSRMLS_DC;
+ FActiveFunctionName := get_active_function_name(TSRMLS_DC);
+ for cnt := 0 to DataModule.FFunctions.Count - 1 do
+ begin
+ if SameText(DataModule.FFunctions[cnt].FunctionName, FActiveFunctionName) then
+ begin
+ AFunction := DataModule.FFunctions[cnt];
+ if Assigned(AFunction.OnExecute) then
+ begin
+ if AFunction.Parameters.Count <> ht then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ FParameters.Assign(AFunction.Parameters);
+ if ht > 0 then begin
+ for i := 0 to ht - 1 do
+ begin
+ if not IsParamTypeCorrect(FParameters[i].ParamType, pval) then
+ begin
+ zend_error(E_WARNING, zend_pchar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
+ Exit;
+ end;
+ FParameters[i].ZendValue := pval;
+ inc(integer(params^), sizeof(ppzval));
+ pval := pzval(params^^);
+ end;
+ end;
+
+ FZendVar := TZendVariable.Create;
+ try
+ FZendVar.AsZendVariable := return_value;
+ AFunction.OnExecute(DataModule, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
+ if FZendVar.ISNull then
+ VariantToZend(ReturnValue, return_value);
+ finally
+ FZendVar.Free;
+ end;
+ end;
+ break;
+ end;
+ end;
+ finally
+ efree(Params);
+ end;
+ except
+ end;
+ finally
+ FParameters.Free;
+ end;
+end;
+
+
+
+function TPHPApplication.GetPHPClass(
+ const AClassName: string): pzend_class_entry;
+var
+ I: Integer;
+begin
+ with FClassList.LockList do
+ try
+ for I := 0 to Count - 1 do
+ begin
+ if SameText(TClassRegister(Items[I]).CN, AClassName) then
+ begin
+ Result := pzend_class_entry(TClassRegister(Items[I]).CH);
+ Exit;
+ end;
+ end;
+ Result := nil;
+ finally
+ FClassList.UnlockList;
+ end;
+end;
+
+
+procedure ClassNotFound(const ClassName: string);
+begin
+ raise EClassNotFound.CreateFmt(SClassNotFound, [ClassName]);
+end;
+
+function TPHPApplication.FindPHPClass(
+ const AClassName: string): pzend_class_entry;
+begin
+ Result := GetPHPClass(AClassName);
+ if Result = nil then ClassNotFound(AClassName);
+end;
+
+procedure TPHPApplication.RegisterPHPClass(const AClassName: string;
+ AClassEntry: pzend_class_entry);
+var
+ ClassRegister : TClassRegister;
+begin
+ With FClassList.LockList do
+ try
+ if GetPHPClass(AClassName) <> nil then
+ raise EFilerError.CreateResFmt(@SDuplicateClass, [AClassName]);
+ ClassRegister := TClassRegister.Create;
+ ClassRegister.CN := LowerCase(AClassName);
+ ClassRegister.CH := integer(AClassEntry);
+ Add(ClassRegister);
+ finally
+ FClassList.UnlockList;
+ end;
+end;
+
+procedure TPHPApplication.UnregisterPHPClasses;
+var
+ i : integer;
+begin
+ with FClassList.LockList do
+ try
+ for I := 0 to Count - 1 do
+ TClassRegister(Items[i]).Free;
+ FClassList.Clear;
+ finally
+ FClassList.UnlockList;
+ end;
+end;
+
+
+exports
+ get_module;
+
+end.
diff --git a/phpWeb.pas b/Source/phpWeb.pas
similarity index 88%
rename from phpWeb.pas
rename to Source/phpWeb.pas
index 1a78d14..ac4ab48 100644
--- a/phpWeb.pas
+++ b/Source/phpWeb.pas
@@ -1,123 +1,123 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpWeb.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit phpWeb;
-
-interface
-
-uses
- Windows, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
-
-type
- TphpWebWizard = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
- public
- function GetMenuText: string;
- function GetIDString: string;
- function GetName: string;
- function GetState: TWizardState;
- procedure Execute;
- end;
-
-
- TphpForumWizard = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
- public
- function GetMenuText: string;
- function GetIDString: string;
- function GetName: string;
- function GetState: TWizardState;
- procedure Execute;
- end;
-
-procedure Register;
-
-implementation
-
-procedure Register;
-begin
- RegisterPackageWizard(TphpWebWizard.Create as IOTAWizard);
- RegisterPackageWizard(TphpForumWizard.Create as IOTAWizard);
-end;
-
-procedure InitExpert;
-begin
- { stubbed out }
-end;
-
-procedure DoneExpert;
-begin
- { stubbed out }
-end;
-
-{ TphpWebWizard }
-
-procedure TphpWebWizard.Execute;
-begin
- ShellExecute(0, 'open', 'http://www.php.net', nil, nil, SW_SHOW);
-end;
-
-function TphpWebWizard.GetIDString: string;
-begin
- Result := 'Perevoznyk.TphpWebWizard';
-end;
-
-function TphpWebWizard.GetMenuText: string;
-begin
- Result := 'PHP Home Page';
-end;
-
-function TphpWebWizard.GetName: string;
-begin
- Result := 'TphpWebWizard';
-end;
-
-function TphpWebWizard.GetState: TWizardState;
-begin
- Result := [wsEnabled];
-end;
-
-
-
-{ TphpForumWizard }
-
-procedure TphpForumWizard.Execute;
-begin
- ShellExecute(0, 'open', 'http://sourceforge.net/forum/forum.php?forum_id=324242', nil, nil, SW_SHOW);
-end;
-
-function TphpForumWizard.GetIDString: string;
-begin
- Result := 'Perevoznyk.TphpForumWizard';
-end;
-
-function TphpForumWizard.GetMenuText: string;
-begin
- Result := 'PHP4Delphi Forum';
-end;
-
-function TphpForumWizard.GetName: string;
-begin
- Result := 'TphpForumWizard';
-end;
-
-function TphpForumWizard.GetState: TWizardState;
-begin
- Result := [wsEnabled];
-end;
-
-initialization
- InitExpert;
-
-finalization
- DoneExpert;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.telenet.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: phpWeb.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit phpWeb;
+
+interface
+
+uses
+ {$IFNDEF FPC} Windows{$ELSE} LCLType,LCLIntf,dynlibs,libc{$ENDIF}, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
+
+type
+ TphpWebWizard = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
+ public
+ function GetMenuText: string;
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+ end;
+
+
+ TphpForumWizard = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
+ public
+ function GetMenuText: string;
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+ end;
+
+procedure Register;
+
+implementation
+
+procedure Register;
+begin
+ RegisterPackageWizard(TphpWebWizard.Create as IOTAWizard);
+ RegisterPackageWizard(TphpForumWizard.Create as IOTAWizard);
+end;
+
+procedure InitExpert;
+begin
+ { stubbed out }
+end;
+
+procedure DoneExpert;
+begin
+ { stubbed out }
+end;
+
+{ TphpWebWizard }
+
+procedure TphpWebWizard.Execute;
+begin
+ ShellExecute(0, 'open', 'http://www.php.net', nil, nil, SW_SHOW);
+end;
+
+function TphpWebWizard.GetIDString: string;
+begin
+ Result := 'Perevoznyk.TphpWebWizard';
+end;
+
+function TphpWebWizard.GetMenuText: string;
+begin
+ Result := 'PHP Home Page';
+end;
+
+function TphpWebWizard.GetName: string;
+begin
+ Result := 'TphpWebWizard';
+end;
+
+function TphpWebWizard.GetState: TWizardState;
+begin
+ Result := [wsEnabled];
+end;
+
+
+
+{ TphpForumWizard }
+
+procedure TphpForumWizard.Execute;
+begin
+ ShellExecute(0, 'open', 'http://sourceforge.net/forum/forum.php?forum_id=324242', nil, nil, SW_SHOW);
+end;
+
+function TphpForumWizard.GetIDString: string;
+begin
+ Result := 'Perevoznyk.TphpForumWizard';
+end;
+
+function TphpForumWizard.GetMenuText: string;
+begin
+ Result := 'PHP4Delphi Forum';
+end;
+
+function TphpForumWizard.GetName: string;
+begin
+ Result := 'TphpForumWizard';
+end;
+
+function TphpForumWizard.GetState: TWizardState;
+begin
+ Result := [wsEnabled];
+end;
+
+initialization
+ InitExpert;
+
+finalization
+ DoneExpert;
+
+end.
diff --git a/zend_dynamic_array.pas b/Source/zend_dynamic_array.pas
similarity index 92%
rename from zend_dynamic_array.pas
rename to Source/zend_dynamic_array.pas
index 6fadad3..99eec4d 100644
--- a/zend_dynamic_array.pas
+++ b/Source/zend_dynamic_array.pas
@@ -1,78 +1,78 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: zend_dynamic_array.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit zend_dynamic_array;
-
-interface
- uses
- Windows, SysUtils;
-
-type
-
-
- dynamic_array = record
- _array : PChar;
- element_size : UINT;
- current : UINT;
- allocated : UINT;
- end;
-
- TDynamicArray = dynamic_array;
- PDynamicArray = ^TDynamicArray;
-
-function zend_dynamic_array_init(da : PDynamicArray; element_size : UINT; size: UINT) : integer; cdecl;
-function zend_dynamic_array_push(da : PDynamicArray) : pointer; cdecl;
-function zend_dynamic_array_pop(da : PDynamicArray) : pointer; cdecl;
-function zend_dynamic_array_get_element(da : PDynamicArray; index: UINT) : pointer; cdecl;
-
-implementation
-
-function zend_dynamic_array_init(da : PDynamicArray; element_size : UINT; size: UINT) : integer; cdecl;
-begin
- da^.element_size := element_size;
- da^.allocated := size;
- da^.current := 0;
- da^._array := AllocMem(size*element_size);
- if (da^._array = nil) then
- Result := 1
- else
- Result := 0;
-end;
-
-
-function zend_dynamic_array_push(da : PDynamicArray) : pointer; cdecl;
-begin
- if (da^.current = da^.allocated) then
- begin
- da^.allocated := da^.Allocated * 2;
- da^._array := ReallocMemory (da^._array, da^.allocated*da^.element_size);
- end;
- Result := da^._array + (da^.current)*da^.element_size;
- inc(da^.current);
-end;
-
-function zend_dynamic_array_pop(da : PDynamicArray) : pointer; cdecl;
-begin
- dec(da^.current);
- Result := da^._array + (da^.current)*da^.element_size;
-end;
-
-function zend_dynamic_array_get_element(da : PDynamicArray; index: UINT) : pointer; cdecl;
-begin
- if (index >= da^.current) then
- result := nil
- else
- Result := da^._array+index*da^.element_size;
-end;
-
-end.
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Author: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ http://users.chello.be/ws36637 }
+{*******************************************************}
+{$I PHP.INC}
+
+{ $Id: zend_dynamic_array.pas,v 7.4 10/2009 delphi32 Exp $ }
+
+unit zend_dynamic_array;
+
+interface
+ uses
+ SysUtils, ZENDTypes;
+
+type
+
+
+ dynamic_array = record
+ _array : zend_pchar;
+ element_size : UINT;
+ current : UINT;
+ allocated : UINT;
+ end;
+
+ TDynamicArray = dynamic_array;
+ PDynamicArray = ^TDynamicArray;
+
+function zend_dynamic_array_init(da : PDynamicArray; element_size : UINT; size: UINT) : integer; cdecl;
+function zend_dynamic_array_push(da : PDynamicArray) : pointer; cdecl;
+function zend_dynamic_array_pop(da : PDynamicArray) : pointer; cdecl;
+function zend_dynamic_array_get_element(da : PDynamicArray; index: UINT) : pointer; cdecl;
+
+implementation
+
+function zend_dynamic_array_init(da : PDynamicArray; element_size : UINT; size: UINT) : integer; cdecl;
+begin
+ da^.element_size := element_size;
+ da^.allocated := size;
+ da^.current := 0;
+ da^._array := AllocMem(size*element_size);
+ if (da^._array = nil) then
+ Result := 1
+ else
+ Result := 0;
+end;
+
+
+function zend_dynamic_array_push(da : PDynamicArray) : pointer; cdecl;
+begin
+ if (da^.current = da^.allocated) then
+ begin
+ da^.allocated := da^.Allocated * 2;
+ da^._array := ReallocMemory (da^._array, da^.allocated*da^.element_size);
+ end;
+ Result := da^._array + (da^.current)*da^.element_size;
+ inc(da^.current);
+end;
+
+function zend_dynamic_array_pop(da : PDynamicArray) : pointer; cdecl;
+begin
+ dec(da^.current);
+ Result := da^._array + (da^.current)*da^.element_size;
+end;
+
+function zend_dynamic_array_get_element(da : PDynamicArray; index: UINT) : pointer; cdecl;
+begin
+ if (index >= da^.current) then
+ result := nil
+ else
+ Result := da^._array+index*da^.element_size;
+end;
+
+end.
diff --git a/ZENDAPI.pas b/ZENDAPI.pas
deleted file mode 100644
index 1067be4..0000000
--- a/ZENDAPI.pas
+++ /dev/null
@@ -1,2062 +0,0 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ ZEND - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: ZENDAPI.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit zendAPI;
-
-interface
-
-uses
- Windows, SysUtils, ZendTypes;
-
-type
- EPHP4DelphiException = class(Exception)
- constructor Create(const Msg: string);
- end;
-
- align_test = record
- case Integer of
- 1: (ptr: Pointer; );
- 2: (dbl: Double; );
- 3: (lng: Longint; );
- end;
-
-const
- PLATFORM_ALIGNMENT = (SizeOf(align_test));
-
-{$IFDEF PHP5}
-function LoadZEND(const DllFilename: string = 'php5ts.dll') : boolean;
-{$ELSE}
-function LoadZEND(const DllFilename: string = 'php4ts.dll') : boolean;
-{$ENDIF}
-
-procedure UnloadZEND;
-function ZENDLoaded: boolean;
-
-{Memory management functions}
-var
- zend_strndup : function(s: PChar; length: Integer): PChar; cdecl;
- _emalloc : function(size: size_t; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
- _efree : procedure(ptr: pointer; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint); cdecl;
- _ecalloc : function(nmemb: size_t; size: size_t; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
- _erealloc : function(ptr: pointer; size: size_t; allow_failure: integer; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
- _estrdup : function(const s: PChar; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
- _estrndup : function(s: PChar; Len: Cardinal; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): PChar; cdecl;
-
-function emalloc(size: size_t): pointer;
-procedure efree(ptr: pointer);
-function ecalloc(nmemb: size_t; size: size_t): pointer;
-function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
-function estrdup(const s: PChar): PChar;
-function estrndup(s: PChar; len: Cardinal): PChar;
-function STR_EMPTY_ALLOC : PChar;
-
-var
- zend_set_memory_limit : function(memory_limit: uint): integer; cdecl;
- start_memory_manager : procedure(TSRMLS_D: pointer); cdecl;
- shutdown_memory_manager : procedure(silent: integer; clean_cache: integer; TSRMLS_DC: pointer); cdecl;
-
-
- { startup/shutdown }
-
-var
-
- zend_register_resource : function (rsrc_result : pzval; rsrc_pointer : pointer; rsrc_type : integer) : integer; cdecl;
- zend_fetch_resource : function (passed_id : ppzval; TSRMLS_DC : pointer; default_id : integer; resource_type_name : PChar; found_resource_type : pointer; num_resource_types: integer; resource_type: integer) : pointer; cdecl;
- zend_list_insert : function (ptr : pointer; _type: integer) : integer; cdecl;
- _zend_list_addref : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
- _zend_list_delete : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
- _zend_list_find : function (id : integer; _type : pointer; TSRMLS_DC : pointer) : pointer; cdecl;
- zend_rsrc_list_get_rsrc_type : function (resource: integer; TSRMLS_DC : pointer) : PChar; cdecl;
- zend_fetch_list_dtor_id : function (type_name : PChar) : integer; cdecl;
- zend_register_list_destructors_ex : function (ld : pointer; pld : pointer; type_name : pChar; module_number : integer) : integer; cdecl;
-
-
-
-{disable functions}
-
-var
- zend_disable_function : function(function_name : pchar; function_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
- zend_disable_class : function(class_name : pchar; class_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
-
-
- zend_hash_add_or_update : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint; pData: Pointer; nDataSize: uint; pDest: Pointer;
- flag: Integer): Integer; cdecl;
-
-var
- {$IFDEF PHP4}
- zend_hash_init : function(ht: PHashTable; nSize: uint;
- pHashFunction: pointer; pDestructor: pointer;
- persistent: Integer): Integer; cdecl;
-
- zend_hash_init_ex : function(ht: PHashTable; nSize: uint;
- pHashFunction: pointer; pDestructor: pointer;
- persistent: Integer; bApplyProtection: boolean): Integer; cdecl;
-
-
- zend_hash_quick_add_or_update : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint; h: ulong; pData: Pointer; nDataSize: uint;
- pDest: Pointer; flag: Integer): Integer; cdecl;
-
- zend_hash_index_update_or_next_insert : function(ht: PHashTable; h: ulong;
- pData: Pointer; nDataSize: uint; pDest: Pointer; flag: Integer): Integer; cdecl;
-
- zend_hash_merge : procedure(target: PHashTable; source: PHashTable;
- pCopyConstructor: pointer; tmp: Pointer; size: uint; overwrite: Integer); cdecl;
-
- {$ENDIF}
-
-
- zend_hash_destroy : procedure(ht: PHashTable); cdecl;
- zend_hash_clean : procedure(ht: PHashTable); cdecl;
-
- { additions/updates/changes }
-
-
-
-
- zend_hash_add_empty_element : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint): Integer; cdecl;
-
-
-
-
-var
- zend_hash_graceful_destroy : procedure(ht: PHashTable); cdecl;
- zend_hash_graceful_reverse_destroy : zend_hash_graceful_reverse_destroy_t;
-
- zend_hash_apply : procedure(ht: PHashTable; apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
-
- zend_hash_apply_with_argument : procedure(ht: PHashTable;
- apply_func: pointer; _noname1: Pointer; TSRMLS_DC: Pointer); cdecl;
-
- { This function should be used with special care (in other words,
- * it should usually not be used). When used with the ZEND_HASH_APPLY_STOP
- * return value, it assumes things about the order of the elements in the hash.
- * Also, it does not provide the same kind of reentrancy protection that
- * the standard apply functions do.
- }
-
- zend_hash_reverse_apply : procedure(ht: PHashTable;
- apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
-
- { Deletes }
-
- zend_hash_del_key_or_index : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint; h: ulong; flag: Integer): Integer; cdecl;
-
- zend_get_hash_value : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint): Longint; cdecl;
-
- { Data retreival }
-
- zend_hash_find : function(ht: PHashTable; arKey: PChar; nKeyLength: uint;
- pData: Pointer): Integer; cdecl;
-
- zend_hash_quick_find : function(ht: PHashTable; arKey: PChar;
- nKeyLength: uint; h: ulong; pData: Pointer): Integer; cdecl;
-
- zend_hash_index_find : function(ht: PHashTable; h: ulong; pData: Pointer): Integer; cdecl;
-
- { Misc }
-
- zend_hash_exists : function(ht: PHashTable; arKey: PChar; nKeyLength: uint): Integer; cdecl;
-
- zend_hash_index_exists : function(ht: PHashTable; h: ulong): Integer; cdecl;
-
- zend_hash_next_free_element : function(ht: PHashTable): Longint; cdecl;
-
- { traversing }
-
- zend_hash_move_forward_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
-
- zend_hash_move_backwards_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
-
- zend_hash_get_current_key_ex : function(ht: PHashTable;
- var str_index: PChar; var str_length: uint; var num_index: ulong;
- duplicate: boolean; pos: HashPosition): Integer; cdecl;
-
- zend_hash_get_current_key_type_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
-
- zend_hash_get_current_data_ex : function(ht: PHashTable; pData: Pointer; pos: HashPosition): Integer; cdecl;
-
- zend_hash_internal_pointer_reset_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
-
- zend_hash_internal_pointer_end_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
-
- { Copying, merging and sorting }
-
- zend_hash_copy : procedure(target: PHashTable; source: PHashTable;
- pCopyConstructor: pointer; tmp: Pointer; size: uint); cdecl;
-
-
- zend_hash_sort : function(ht: PHashTable; sort_func: pointer;
- compare_func: pointer; renumber: Integer; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_hash_compare : function(ht1: PHashTable; ht2: PHashTable;
- compar: pointer; ordered: boolean; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_hash_minmax : function(ht: PHashTable; compar: pointer;
- flag: Integer; pData: Pointer; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_hash_num_elements : function(ht: PHashTable): Integer; cdecl;
-
- zend_hash_rehash : function(ht: PHashTable): Integer; cdecl;
-
- zend_hash_func : function(arKey: PChar; nKeyLength: uint): Longint; cdecl;
-
-
-function zend_hash_get_current_data(ht: PHashTable; pData: Pointer): Integer; cdecl;
-procedure zend_hash_internal_pointer_reset(ht: PHashTable); cdecl;
-
-
-var
- zend_get_constant : function(name: PChar; name_len: uint; var result: zval;
- TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_register_long_constant : procedure(name: PChar; name_len: uint;
- lval: Longint; flags: Integer; module_number: Integer; TSRMLS_DC: Pointer); cdecl;
-
- zend_register_double_constant : procedure(name: PChar; name_len: uint; dval: Double; flags: Integer; module_number: Integer;
- TSRMLS_DC: Pointer); cdecl;
-
- zend_register_string_constant : procedure(name: PChar; name_len: uint; strval: PChar; flags: Integer; module_number: Integer;
- TSRMLS_DC: Pointer); cdecl;
-
- zend_register_stringl_constant : procedure(name: PChar; name_len: uint;
- strval: PChar; strlen: uint; flags: Integer; module_number: Integer;
- TSRMLS_DC: Pointer); cdecl;
-
- zend_register_constant : function(var c: zend_constant; TSRMLS_DC: Pointer): Integer; cdecl;
-
-procedure REGISTER_MAIN_LONG_CONSTANT(name: PChar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
-procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: PChar; dval: double; flags: integer; TSRMLS_DC: Pointer);
-procedure REGISTER_MAIN_STRING_CONSTANT(name: PChar; str: PChar; flags: integer; TSRMLS_DC: Pointer);
-procedure REGISTER_MAIN_STRINGL_CONSTANT(name: PChar; str: PChar; len: uint; flags: integer; TSRMLS_DC: Pointer);
-
-
-var
- tsrm_startup : function(expected_threads: integer;
- expected_resources: integer; debug_level: integer; debug_filename: pchar): integer; cdecl;
-
- ts_allocate_id : function(rsrc_id: pts_rsrc_id; size: size_t; ctor: pointer; dtor: pointer): ts_rsrc_id; cdecl;
- // deallocates all occurrences of a given id
- ts_free_id : procedure(id: ts_rsrc_id); cdecl;
-
- tsrm_shutdown : procedure(); cdecl;
- ts_resource_ex : function(id: integer; p: pointer): pointer; cdecl;
- ts_free_thread : procedure; cdecl;
-
- zend_error : procedure(ErrType: integer; ErrText: PChar); cdecl;
- zend_error_cb : procedure; cdecl;
-
- zend_eval_string : function(str: pchar; val: pointer; strname: pchar; tsrm: pointer): integer; cdecl;
- zend_make_compiled_string_description : function(a: Pchar; tsrm: pointer): PChar; cdecl;
- _zval_dtor : procedure(val: pzval; __zend_filename: PChar; __zend_lineno: uint); cdecl;
- _zval_copy_ctor : function(val: pzval; __zend_filename: PChar; __zend_lineno: uint): integer; cdecl;
- zend_print_variable : function(val: pzval): integer; cdecl;
-
-
- zend_get_compiled_filename : function(TSRMLS_DC: Pointer): PChar; cdecl;
- zend_get_compiled_lineno : function(TSRMLS_DC: Pointer): integer; cdecl;
-
-
-function zval_copy_ctor(val : pzval) : integer;
-function ts_resource(id : integer) : pointer;
-
-procedure zenderror(Error : PChar);
-
-var
- zend_stack_init : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_push : function(stack: Pzend_stack; element: Pointer; size: Integer): Integer; cdecl;
-
- zend_stack_top : function(stack: Pzend_stack; element: Pointer): Integer; cdecl;
-
- zend_stack_del_top : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_int_top : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_is_empty : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_destroy : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_base : function(stack: Pzend_stack): Pointer; cdecl;
-
- zend_stack_count : function(stack: Pzend_stack): Integer; cdecl;
-
- zend_stack_apply : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer); cdecl;
-
- zend_stack_apply_with_argument : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer; arg: Pointer); cdecl;
-
-
- //zend_operators.h
-
-var
- _convert_to_string : procedure(op: pzval; __zend_filename: PChar; __zend_lineno: uint); cdecl;
-
-procedure convert_to_string(op: pzval);
-
-var
- add_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- sub_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- mul_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- div_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- mod_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- boolean_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- boolean_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
-
- bitwise_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
-
- bitwise_or_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- bitwise_and_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- bitwise_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- shift_left_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- shift_right_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- concat_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_not_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_not_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_smaller_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- is_smaller_or_equal_function : function(_result: Pzval; op1: Pzval; var op2: zval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- increment_function : function(op1: Pzval): Integer; cdecl;
-
- decrement_function : function(op2: Pzval): Integer; cdecl;
-
- convert_scalar_to_number : procedure(op: Pzval; TSRMLS_DC: Pointer); cdecl;
-
- convert_to_long : procedure(op: Pzval); cdecl;
-
- convert_to_double : procedure(op: Pzval); cdecl;
-
- convert_to_long_base : procedure(op: Pzval; base: Integer); cdecl;
-
- convert_to_null : procedure(op: Pzval); cdecl;
-
- convert_to_boolean : procedure(op: Pzval); cdecl;
-
- convert_to_array : procedure(op: Pzval); cdecl;
-
- convert_to_object : procedure(op: Pzval); cdecl;
-
- add_char_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
-
- add_string_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
-
- zend_string_to_double : function(number: PChar; length: zend_uint): Double; cdecl;
-
- zval_is_true : function(op: Pzval): Integer; cdecl;
-
- compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- numeric_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- string_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_str_tolower : procedure(str: PChar; length: Integer); cdecl;
-
- zend_binary_zval_strcmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
-
- zend_binary_zval_strncmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
-
- zend_binary_zval_strcasecmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
-
- zend_binary_zval_strncasecmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
-
- zend_binary_strcmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint): Integer; cdecl;
-
- zend_binary_strncmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint; length: uint): Integer; cdecl;
-
- zend_binary_strcasecmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint): Integer; cdecl;
-
- zend_binary_strncasecmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint; length: uint): Integer; cdecl;
-
- zendi_smart_strcmp : procedure(_result: zval; s1: Pzval; s2: Pzval); cdecl;
-
- zend_compare_symbol_tables : procedure(_result: Pzval; ht1: PHashTable; ht2: PHashTable; TSRMLS_DC: Pointer); cdecl;
-
- zend_compare_arrays : procedure(_result: zval; a1: Pzval; a2: Pzval; TSRMLS_DC: Pointer); cdecl;
-
- zend_compare_objects : procedure(_result: Pzval; o1: Pzval; o2: Pzval; TSRMLS_DC: Pointer); cdecl;
-
- zend_atoi : function(str: PChar; str_len: Integer): Integer; cdecl;
-
- //zend_execute.h
- get_active_function_name : function(TSRMLS_D: pointer): PChar; cdecl;
-
- zend_get_executed_filename : function(TSRMLS_D: pointer): PChar; cdecl;
-
- zend_set_timeout : procedure(seconds: Longint); cdecl;
-
- zend_unset_timeout : procedure(TSRMLS_D: pointer); cdecl;
-
- zend_timeout : procedure(dummy: Integer); cdecl;
-
-
-var
- zend_highlight : procedure(syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer); cdecl;
-
- zend_strip : procedure(TSRMLS_D: pointer); cdecl;
-
- highlight_file : function(filename: PChar; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer): Integer; cdecl;
-
- highlight_string : function(str: Pzval; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; str_name: PChar; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_html_putc : procedure(c: Char); cdecl;
-
- zend_html_puts : procedure(s: PChar; len: uint; TSRMLS_DC: Pointer); cdecl;
-
- zend_indent : procedure; cdecl;
-
- ZendGetParameters : function: integer; cdecl;
-
-function zend_get_parameters_ex(number: integer; var Params: pzval_array): integer;
-
-function zend_get_parameters(ht: integer; param_count: integer; Params: array of ppzval): integer;
-
-var
- _zend_get_parameters_array_ex : function(param_count: integer; argument_array: pppointer; TSRMLS_CC: pointer): integer; cdecl;
-
-procedure dispose_pzval_array(Params: pzval_array);
-
-var
- zend_ini_refresh_caches : procedure(stage: Integer; TSRMLS_DC: Pointer); cdecl;
-
-
-var
- _zend_bailout : procedure (filename : PChar; lineno : uint); cdecl;
-
- zend_alter_ini_entry : function(name: PChar; name_length: uint; new_value: PChar; new_value_length: uint; modify_type: Integer; stage: Integer): Integer; cdecl;
-
- zend_restore_ini_entry : function(name: PChar; name_length: uint; stage: Integer): Integer; cdecl;
-
- zend_ini_long : function(name: PChar; name_length: uint; orig: Integer): Longint; cdecl;
-
- zend_ini_double : function(name: PChar; name_length: uint; orig: Integer): Double; cdecl;
-
- zend_ini_string : function(name: PChar; name_length: uint; orig: Integer): PChar; cdecl;
-
- compile_string : function(source_string: pzval; filename: PChar; TSRMLS_DC: Pointer): pointer; cdecl;
-
- execute : procedure(op_array: pointer; TSRMLS_DC: Pointer); cdecl;
-
- zend_wrong_param_count : procedure(TSRMLS_D: pointer); cdecl;
-
- {$IFDEF PHP4}
- add_property_long_ex : function(arg: pzval; key: PChar; key_len: uint; l: longint): integer; cdecl;
- {$ELSE}
- add_property_long_ex : function(arg: pzval; key: PChar; key_len: uint; l: longint; TSRMLS_DC : pointer): integer; cdecl;
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_null_ex : function(arg: pzval; key: PChar; key_len: uint): integer; cdecl;
- add_property_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer): integer; cdecl;
- add_property_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer): integer; cdecl;
- add_property_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double): integer; cdecl;
- add_property_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer): integer; cdecl;
- add_property_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
- add_property_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval): integer; cdecl;
- {$ELSE}
- add_property_null_ex : function(arg: pzval; key: PChar; key_len: uint; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
- add_property_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval; TSRMLS_DC: Pointer): integer; cdecl;
- {$ENDIF}
-
- add_assoc_long_ex : function(arg: pzval; key: PChar; key_len: uint; n: longint): integer; cdecl;
- add_assoc_null_ex : function(arg: pzval; key: PChar; key_len: uint): integer; cdecl;
- add_assoc_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer): integer; cdecl;
- add_assoc_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer): integer; cdecl;
- add_assoc_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double): integer; cdecl;
- add_assoc_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer): integer; cdecl;
- add_assoc_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
- add_assoc_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval): integer; cdecl;
-
- add_index_long : function(arg: pzval; idx: uint; n: longint): integer; cdecl;
- add_index_null : function(arg: pzval; idx: uint): integer; cdecl;
- add_index_bool : function(arg: pzval; idx: uint; b: integer): integer; cdecl;
- add_index_resource : function(arg: pzval; idx: uint; r: integer): integer; cdecl;
- add_index_double : function(arg: pzval; idx: uint; d: double): integer; cdecl;
- add_index_string : function(arg: pzval; idx: uint; str: PChar; duplicate: integer): integer; cdecl;
- add_index_stringl : function(arg: pzval; idx: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
- add_index_zval : function(arg: pzval; index: uint; value: pzval): integer; cdecl;
-
- add_next_index_long : function(arg: pzval; n: longint): integer; cdecl;
- add_next_index_null : function(arg: pzval): integer; cdecl;
- add_next_index_bool : function(arg: pzval; b: integer): integer; cdecl;
- add_next_index_resource : function(arg: pzval; r: integer): integer; cdecl;
- add_next_index_double : function(arg: pzval; d: double): integer; cdecl;
- add_next_index_string : function(arg: pzval; str: PChar; duplicate: integer): integer; cdecl;
- add_next_index_stringl : function(arg: pzval; str: PChar; len: uint; duplicate: integer): integer; cdecl;
- add_next_index_zval : function(arg: pzval; value: pzval): integer; cdecl;
-
- add_get_assoc_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; dest: pointer; duplicate: integer): integer; cdecl;
- add_get_assoc_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
-
- add_get_index_long : function(arg: pzval; idx: uint; l: longint; dest: pointer): integer; cdecl;
- add_get_index_double : function(arg: pzval; idx: uint; d: double; dest: pointer): integer; cdecl;
- add_get_index_string : function(arg: pzval; idx: uint; str: PChar; dest: pointer; duplicate: integer): integer; cdecl;
- add_get_index_stringl : function(arg: pzval; idx: uint; str: PChar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
-
- _array_init : function(arg: pzval; __zend_filename: pchar; __zend_lineno: uint): integer; cdecl;
-
- {$IFDEF PHP4}
- _object_init : function(arg: pzval; __zend_filename: PChar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
- {$ELSE}
- _object_init : function(arg: pzval;TSRMLS_DC: pointer): integer; cdecl;
- {$ENDIF}
-
- {$IFDEF PHP4}
- _object_init_ex : function (arg: pzval; ce: pzend_class_entry; __zend_filename: pchar; __zend_lineno: uint; TSRMLS_DC: pointer) : integer; cdecl;
- {$ELSE}
- _object_init_ex : function (arg: pzval; ce: pzend_class_entry; __zend_lineno : integer; TSRMLS_DC : pointer) : integer; cdecl;
- {$ENDIF}
-
- _object_and_properties_init : function(arg: pzval; ce: pointer; properties: phashtable; __zend_filename: pchar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
-
-
- {$IFDEF PHP5}
- zend_destroy_file_handle : procedure(file_handle : PZendFileHandle; TSRMLS_DC : pointer); cdecl;
- {$ENDIF}
-
-var
- zend_write : zend_write_t;
-
-procedure ZEND_PUTS(str: PChar);
-
-
-var
- zend_register_internal_class : function(class_entry: pzend_class_entry; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
- zend_register_internal_class_ex : function(class_entry: pzend_class_entry; parent_ce: pzend_class_entry; parent_name: Pchar; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
-
-procedure ZVAL_RESOURCE(value: pzval; l: longint);
-procedure ZVAL_BOOL(z: pzval; b: boolean);
-procedure ZVAL_NULL(z: pzval);
-procedure ZVAL_LONG(z: pzval; l: longint);
-procedure ZVAL_DOUBLE(z: pzval; d: double);
-procedure ZVAL_STRING(z: pzval; s: pchar; duplicate: boolean);
-procedure ZVAL_STRINGL(z: pzval; s: pchar; l: integer; duplicate: boolean);
-procedure ZVAL_EMPTY_STRING(z: pzval);
-procedure ZVAL_TRUE(z: pzval);
-procedure ZVAL_FALSE(z: pzval);
-
-
-procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: pchar; functions: pointer);
-
-
-var
- get_zend_version : function(): PChar; cdecl;
- zend_make_printable_zval : procedure(expr: pzval; expr_copy: pzval; use_copy: pint); cdecl;
- zend_print_zval : function(expr: pzval; indent: integer): integer; cdecl;
- zend_print_zval_r : procedure(expr: pzval; indent: integer); cdecl;
- zend_output_debug_string : procedure(trigger_break: boolean; Msg: PChar); cdecl;
-
-{$IFDEF PHP5}
- zend_objects_new : function (_object : pointer; class_type : pointer; TSRMLS_DC : pointer) : _zend_object_value; cdecl;
-{$ENDIF}
-
-
-//Microsoft C++ functions
-function setjmp(buf : jump_buf) : integer; cdecl; external 'msvcrt.dll' name '_setjmp3';
-function pipe(phandles : pointer; psize : uint; textmode : integer) : integer; cdecl; external 'msvcrt.dll' name '_pipe';
-procedure close(AHandle : THandle); cdecl; external 'msvcrt.dll' name '_close';
-function _write(AHandle : integer; ABuffer : pointer; count : uint) : integer; cdecl; external 'msvcrt.dll' name '_write';
-
-
-function ZEND_FAST_ALLOC: pzval;
-function ALLOC_ZVAL: pzval;
-procedure INIT_PZVAL(p: pzval);
-function MAKE_STD_ZVAL: pzval;
-
-{$IFNDEF QUIET_LOAD}
-procedure CheckZendErrors;
-{$ENDIF}
-
-var
- PHPLib : THandle = 0;
-
-var
- zend_ini_deactivate : function(TSRMLS_D : pointer) : integer; cdecl;
-
-function GetGlobalResource(resource_name: string; TSRMLS_DC : pointer) : pointer;
-
-function GetCompilerGlobals(TSRMLS_DC : pointer) : Pzend_compiler_globals;
-function GetExecutorGlobals(TSRMLS_DC : pointer) : pzend_executor_globals;
-function GetAllocGlobals(TSRMLS_DC : pointer) : pointer;
-
-function zend_register_functions(functions : pzend_function_entry; function_table : PHashTable; _type: integer; TSRMLS_DC : pointer) : integer;
-function zend_unregister_functions(functions : pzend_function_entry; count : integer; function_table : PHashTable; TSRMLS_DC : pointer) : integer;
-
-{$IFDEF PHP5}
-
-var
- zend_get_std_object_handlers : function() : pzend_object_handlers;
- zend_objects_get_address : function (_object : pzval; TSRMLS_DC : pointer) : pzend_object; cdecl;
- zend_is_true : function(z : pzval) : integer; cdecl;
-
-function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
-
-function Z_LVAL(z : zval) : longint;
-function Z_BVAL(z : zval) : boolean;
-function Z_DVAL(z : zval) : double;
-function Z_STRVAL(z : zval) : string;
-function Z_STRLEN(z : zval) : longint;
-function Z_ARRVAL(z : zval ) : PHashTable;
-function Z_OBJ_HANDLE(z :zval) : zend_object_handle;
-function Z_OBJ_HT(z : zval) : pzend_object_handlers;
-function Z_OBJPROP(z : zval) : PHashtable;
-
-
-{$ENDIF}
-
-implementation
-
-function STR_EMPTY_ALLOC : PChar;
-begin
- Result := estrndup('', 0);
-end;
-
-function estrndup(s: PChar; len: Cardinal): PChar;
-begin
- if assigned(s) then
- Result := _estrndup(s, len, nil, 0, nil, 0)
- else
- Result := nil;
-end;
-
-function emalloc(size: size_t): pointer;
-begin
- Result := _emalloc(size, nil, 0, nil, 0);
-end;
-
-procedure efree(ptr: pointer);
-begin
- _efree(ptr, nil, 0, nil, 0);
-end;
-
-function ecalloc(nmemb: size_t; size: size_t): pointer;
-begin
- Result := _ecalloc(nmemb, size, nil, 0, nil, 0);
-end;
-
-function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
-begin
- Result := _erealloc(ptr, size, allow_failure, nil, 0, nil, 0);
-end;
-
-function estrdup(const s: PChar): PChar;
-begin
- if assigned(s) then
- Result := _estrdup(s, nil, 0, nil, 0)
- else
- Result := nil;
-end;
-
-procedure REGISTER_MAIN_LONG_CONSTANT(name: PChar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
-begin
- zend_register_long_constant(name, length(name) + 1, lval, flags, 0, TSRMLS_DC);
-end;
-
-procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: PChar; dval: double; flags: integer; TSRMLS_DC: Pointer);
-begin
- zend_register_double_constant(name, length(name) + 1, dval, flags, 0, TSRMLS_DC);
-end;
-
-procedure REGISTER_MAIN_STRING_CONSTANT(name: PChar; str: PChar; flags: integer; TSRMLS_DC: Pointer);
-begin
- zend_register_string_constant(name, length(name) + 1, str, flags, 0, TSRMLS_DC);
-end;
-
-procedure REGISTER_MAIN_STRINGL_CONSTANT(name: PChar; str: PChar; len: uint; flags: integer; TSRMLS_DC: Pointer);
-begin
- zend_register_stringl_constant(name, length(name) + 1, str, len, flags, 0, TSRMLS_DC);
-end;
-
-procedure ZVAL_RESOURCE(value: pzval; l: longint);
-begin
- value^._type := IS_RESOURCE;
- value^.value.lval := l;
-end;
-
-procedure ZVAL_BOOL(z: pzval; b: boolean);
-begin
- z^._type := IS_BOOL;
- z^.value.lval := integer(b);
-end;
-
-procedure ZVAL_NULL(z: pzval);
-begin
- z^._type := IS_NULL;
-end;
-
-procedure ZVAL_LONG(z: pzval; l: longint);
-begin
- z^._type := IS_LONG;
- z^.value.lval := l;
-end;
-
-procedure ZVAL_DOUBLE(z: pzval; d: double);
-begin
- z^._type := IS_DOUBLE;
- z^.value.dval := d;
-end;
-
-procedure ZVAL_STRING(z: pzval; s: pchar; duplicate: boolean);
-var
- __s : pchar;
-begin
- if not assigned(s) then
- __s := ''
- else
- __s := s;
-
- z^.value.str.len := strlen(__s);
- if duplicate then
-
- z^.value.str.val := estrndup(__s, z^.value.str.len)
- else
- z^.value.str.val := __s;
- z^._type := IS_STRING;
-end;
-
-procedure ZVAL_STRINGL(z: pzval; s: pchar; l: integer; duplicate: boolean);
-var
- __s : pchar;
- __l : integer;
-begin
- if not assigned(s) then
- __s := ''
- else
- __s := s;
- __l := l;
- z^.value.str.len := __l;
- if duplicate then
- z^.value.str.val := estrndup(__s, __l)
- else
- z^.value.str.val := __s;
- z^._type := IS_STRING;
-end;
-
-procedure ZVAL_EMPTY_STRING(z: pzval);
-begin
- z^.value.str.len := 0;
- {$IFDEF PHP510}
- z^.value.str.val := STR_EMPTY_ALLOC;
- {$ELSE}
- z^.value.str.val := '';
- {$ENDIF}
- z^._type := IS_STRING;
-end;
-
-procedure ZVAL_TRUE(z: pzval);
-begin
- z^._type := IS_BOOL;
- z^.value.lval := 1;
-end;
-
-procedure ZVAL_FALSE(z: pzval);
-begin
- z^._type := IS_BOOL;
- z^.value.lval := 0;
-end;
-
-function ZENDLoaded: boolean;
-begin
- Result := PHPLib <> 0;
-end;
-
-procedure UnloadZEND;
-var
- H : THandle;
-begin
- H := InterlockedExchange(Integer(PHPLib), 0);
- if H > 0 then
- begin
- FreeLibrary(H);
- end;
-end;
-
-
-function LoadZEND(const DllFilename: string) : boolean;
-var
- WriteFuncPtr : pointer;
-begin
- Result := false;
- PHPLib := LoadLibrary(PChar(DllFileName));
-{$IFNDEF QUIET_LOAD}
- if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllFileName]);
-{$ELSE}
- if PHPLib = 0 then Exit;
-{$ENDIF}
-
- {$IFDEF PHP5}
- zend_objects_new := GetProcAddress(PHPLib, 'zend_objects_new');
- zend_get_std_object_handlers := GetProcAddress(PHPLib, 'zend_get_std_object_handlers');
- zend_objects_get_address := GetProcAddress(PHPLib, 'zend_objects_get_address');
- zend_is_true := GetProcAddress(PHPLib, 'zend_is_true');
-{$ENDIF}
-
- _zend_bailout := GetProcAddress(PHPLib, '_zend_bailout');
-
- zend_disable_function := GetProcAddress(PHPLib, 'zend_disable_function');
- zend_disable_class := GetProcAddress(PHPLib, 'zend_disable_class');
- zend_register_list_destructors_ex := GetProcAddress(PHPLib, 'zend_register_list_destructors_ex');
- zend_register_resource := GetProcAddress(PHPLib, 'zend_register_resource');
- zend_fetch_resource := GetProcAddress(PHPLib, 'zend_fetch_resource');
- zend_list_insert := GetProcAddress(PHPLib, 'zend_list_insert');
- _zend_list_addref := GetProcAddress(PHPLib, '_zend_list_addref');
- _zend_list_delete := GetProcAddress(PHPLib, '_zend_list_delete');
- _zend_list_find := GetProcAddress(PHPLib, '_zend_list_find');
- zend_rsrc_list_get_rsrc_type := GetProcAddress(PHPLib, 'zend_rsrc_list_get_rsrc_type');
- zend_fetch_list_dtor_id := GetProcAddress(PHPLib, 'zend_fetch_list_dtor_id');
-
- zend_get_compiled_filename := GetProcAddress(PHPLib, 'zend_get_compiled_filename');
-
- zend_get_compiled_lineno := GetProcAddress(PHPLib, 'zend_get_compiled_lineno');
-
- zend_ini_deactivate := GetProcAddress(PHPLib, 'zend_ini_deactivate');
-
- // -- tsrm_startup
- tsrm_startup := GetProcAddress(PHPLib, 'tsrm_startup');
-
- // -- ts_allocate_id
- ts_allocate_id := GetProcAddress(PHPLib, 'ts_allocate_id');
-
- // -- ts_free_id
- ts_free_id := GetProcAddress(PHPLib, 'ts_free_id');
-
-
- // -- zend_strndup
- zend_strndup := GetProcAddress(PHPLib, 'zend_strndup');
-
-
- // -- _emalloc
- _emalloc := GetProcAddress(PHPLib, '_emalloc');
-
-
- // -- _efree
- _efree := GetProcAddress(PHPLib, '_efree');
-
-
- // -- _ecalloc
- _ecalloc := GetProcAddress(PHPLib, '_ecalloc');
-
-
- // -- _erealloc
- _erealloc := GetProcAddress(PHPLib, '_erealloc');
-
-
- // -- _estrdup
- _estrdup := GetProcAddress(PHPLib, '_estrdup');
-
- // -- _estrndup
- _estrndup := GetProcAddress(PHPLib, '_estrndup');
-
- // -- zend_set_memory_limit
- zend_set_memory_limit := GetProcAddress(PHPLib, 'zend_set_memory_limit');
-
- // -- start_memory_manager
- start_memory_manager := GetProcAddress(PHPLib, 'start_memory_manager');
-
- // -- shutdown_memory_manager
- shutdown_memory_manager := GetProcAddress(PHPLib, 'shutdown_memory_manager');
-
- {$IFDEF PHP4}
- // -- zend_hash_init
- zend_hash_init := GetProcAddress(PHPLib, 'zend_hash_init');
- // -- zend_hash_init_ex
- zend_hash_init_ex := GetProcAddress(PHPLib, 'zend_hash_init_ex');
-
- // -- zend_hash_quick_add_or_update
- zend_hash_quick_add_or_update := GetProcAddress(PHPLib, 'zend_hash_quick_add_or_update');
-
- // -- zend_hash_index_update_or_next_insert
- zend_hash_index_update_or_next_insert := GetProcAddress(PHPLib, 'zend_hash_index_update_or_next_insert');
-
- // -- zend_hash_merge
- zend_hash_merge := GetProcAddress(PHPLib, 'zend_hash_merge');
- {$ENDIF}
-
- {$IFDEF PHP4}
- // -- zend_hash_add_or_update
- zend_hash_add_or_update := GetProcAddress(PHPLib, 'zend_hash_add_or_update');
- {$ELSE}
- // -- zend_hash_add_or_update
- zend_hash_add_or_update := GetProcAddress(PHPLib, '_zend_hash_add_or_update');
- {$ENDIF}
-
- // -- zend_hash_destroy
- zend_hash_destroy := GetProcAddress(PHPLib, 'zend_hash_destroy');
-
- // -- zend_hash_clean
- zend_hash_clean := GetProcAddress(PHPLib, 'zend_hash_clean');
-
- // -- zend_hash_add_empty_element
- zend_hash_add_empty_element := GetProcAddress(PHPLib, 'zend_hash_add_empty_element');
-
- // -- zend_hash_graceful_destroy
- zend_hash_graceful_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_destroy');
-
- // -- zend_hash_graceful_reverse_destroy
- zend_hash_graceful_reverse_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_reverse_destroy');
-
- // -- zend_hash_apply
- zend_hash_apply := GetProcAddress(PHPLib, 'zend_hash_apply');
-
- // -- zend_hash_apply_with_argument
- zend_hash_apply_with_argument := GetProcAddress(PHPLib, 'zend_hash_apply_with_argument');
-
- // -- zend_hash_reverse_apply
- zend_hash_reverse_apply := GetProcAddress(PHPLib, 'zend_hash_reverse_apply');
-
- // -- zend_hash_del_key_or_index
- zend_hash_del_key_or_index := GetProcAddress(PHPLib, 'zend_hash_del_key_or_index');
-
- // -- zend_get_hash_value
- zend_get_hash_value := GetProcAddress(PHPLib, 'zend_get_hash_value');
-
- // -- zend_hash_find
- zend_hash_find := GetProcAddress(PHPLib, 'zend_hash_find');
-
- // -- zend_hash_quick_find
- zend_hash_quick_find := GetProcAddress(PHPLib, 'zend_hash_quick_find');
-
- // -- zend_hash_index_find
- zend_hash_index_find := GetProcAddress(PHPLib, 'zend_hash_index_find');
-
- // -- zend_hash_exists
- zend_hash_exists := GetProcAddress(PHPLib, 'zend_hash_exists');
-
- // -- zend_hash_index_exists
- zend_hash_index_exists := GetProcAddress(PHPLib, 'zend_hash_index_exists');
-
- // -- zend_hash_next_free_element
- zend_hash_next_free_element := GetProcAddress(PHPLib, 'zend_hash_next_free_element');
-
- // -- zend_hash_move_forward_ex
- zend_hash_move_forward_ex := GetProcAddress(PHPLib, 'zend_hash_move_forward_ex');
-
- // -- zend_hash_move_backwards_ex
- zend_hash_move_backwards_ex := GetProcAddress(PHPLib, 'zend_hash_move_backwards_ex');
-
- // -- zend_hash_get_current_key_ex
- zend_hash_get_current_key_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_ex');
-
- // -- zend_hash_get_current_key_type_ex
- zend_hash_get_current_key_type_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_type_ex');
-
- // -- zend_hash_get_current_data_ex
- zend_hash_get_current_data_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_data_ex');
-
- // -- zend_hash_internal_pointer_reset_ex
- zend_hash_internal_pointer_reset_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_reset_ex');
-
- // -- zend_hash_internal_pointer_end_ex
- zend_hash_internal_pointer_end_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_end_ex');
-
- // -- zend_hash_copy
- zend_hash_copy := GetProcAddress(PHPLib, 'zend_hash_copy');
-
-
- // -- zend_hash_sort
- zend_hash_sort := GetProcAddress(PHPLib, 'zend_hash_sort');
-
- // -- zend_hash_compare
- zend_hash_compare := GetProcAddress(PHPLib, 'zend_hash_compare');
-
- // -- zend_hash_minmax
- zend_hash_minmax := GetProcAddress(PHPLib, 'zend_hash_minmax');
-
- // -- zend_hash_num_elements
- zend_hash_num_elements := GetProcAddress(PHPLib, 'zend_hash_num_elements');
-
- // -- zend_hash_rehash
- zend_hash_rehash := GetProcAddress(PHPLib, 'zend_hash_rehash');
-
- // -- zend_hash_func
- zend_hash_func := GetProcAddress(PHPLib, 'zend_hash_func');
-
- // -- zend_get_constant
- zend_get_constant := GetProcAddress(PHPLib, 'zend_get_constant');
-
- // -- zend_register_long_constant
- zend_register_long_constant := GetProcAddress(PHPLib, 'zend_register_long_constant');
-
- // -- zend_register_double_constant
- zend_register_double_constant := GetProcAddress(PHPLib, 'zend_register_double_constant');
-
- // -- zend_register_string_constant
- zend_register_string_constant := GetProcAddress(PHPLib, 'zend_register_string_constant');
-
- // -- zend_register_stringl_constant
- zend_register_stringl_constant := GetProcAddress(PHPLib, 'zend_register_stringl_constant');
-
- // -- zend_register_constant
- zend_register_constant := GetProcAddress(PHPLib, 'zend_register_constant');
-
- // -- tsrm_shutdown
- tsrm_shutdown := GetProcAddress(PHPLib, 'tsrm_shutdown');
-
- // -- ts_resource_ex
- ts_resource_ex := GetProcAddress(PHPLib, 'ts_resource_ex');
-
- // -- ts_free_thread
- ts_free_thread := GetProcAddress(PHPLib, 'ts_free_thread');
-
- // -- zend_error
- zend_error := GetProcAddress(PHPLib, 'zend_error');
-
- // -- zend_error_cb
- zend_error_cb := GetProcAddress(PHPLib, 'zend_error_cb');
-
- // -- zend_eval_string
- zend_eval_string := GetProcAddress(PHPLib, 'zend_eval_string');
-
- // -- zend_make_compiled_string_description
- zend_make_compiled_string_description := GetProcAddress(PHPLib, 'zend_make_compiled_string_description');
-
- // -- _zval_dtor
- _zval_dtor := GetProcAddress(PHPLib, '_zval_dtor');
-
- // -- _zval_copy_ctor
- _zval_copy_ctor := GetProcAddress(PHPLib, '_zval_copy_ctor');
-
- // -- zend_print_variable
- zend_print_variable := GetProcAddress(PHPLib, 'zend_print_variable');
-
- // -- zend_stack_init
- zend_stack_init := GetProcAddress(PHPLib, 'zend_stack_init');
-
- // -- zend_stack_push
- zend_stack_push := GetProcAddress(PHPLib, 'zend_stack_push');
-
- // -- zend_stack_top
- zend_stack_top := GetProcAddress(PHPLib, 'zend_stack_top');
-
- // -- zend_stack_del_top
- zend_stack_del_top := GetProcAddress(PHPLib, 'zend_stack_del_top');
-
- // -- zend_stack_int_top
- zend_stack_int_top := GetProcAddress(PHPLib, 'zend_stack_int_top');
-
- // -- zend_stack_is_empty
- zend_stack_is_empty := GetProcAddress(PHPLib, 'zend_stack_is_empty');
-
- // -- zend_stack_destroy
- zend_stack_destroy := GetProcAddress(PHPLib, 'zend_stack_destroy');
-
- // -- zend_stack_base
- zend_stack_base := GetProcAddress(PHPLib, 'zend_stack_base');
-
- // -- zend_stack_count
- zend_stack_count := GetProcAddress(PHPLib, 'zend_stack_count');
-
- // -- zend_stack_apply
- zend_stack_apply := GetProcAddress(PHPLib, 'zend_stack_apply');
-
- // -- zend_stack_apply_with_argument
- zend_stack_apply_with_argument := GetProcAddress(PHPLib, 'zend_stack_apply_with_argument');
-
- // -- _convert_to_string
- _convert_to_string := GetProcAddress(PHPLib, '_convert_to_string');
-
- // -- add_function
- add_function := GetProcAddress(PHPLib, 'add_function');
-
- // -- sub_function
- sub_function := GetProcAddress(PHPLib, 'sub_function');
-
- // -- mul_function
- mul_function := GetProcAddress(PHPLib, 'mul_function');
-
- // -- div_function
- div_function := GetProcAddress(PHPLib, 'div_function');
-
- // -- mod_function
- mod_function := GetProcAddress(PHPLib, 'mod_function');
-
- // -- boolean_xor_function
- boolean_xor_function := GetProcAddress(PHPLib, 'boolean_xor_function');
-
- // -- boolean_not_function
- boolean_not_function := GetProcAddress(PHPLib, 'boolean_not_function');
-
- // -- bitwise_not_function
- bitwise_not_function := GetProcAddress(PHPLib, 'bitwise_not_function');
-
- // -- bitwise_or_function
- bitwise_or_function := GetProcAddress(PHPLib, 'bitwise_or_function');
-
- // -- bitwise_and_function
- bitwise_and_function := GetProcAddress(PHPLib, 'bitwise_and_function');
-
- // -- bitwise_xor_function
- bitwise_xor_function := GetProcAddress(PHPLib, 'bitwise_xor_function');
-
- // -- shift_left_function
- shift_left_function := GetProcAddress(PHPLib, 'shift_left_function');
-
- // -- shift_right_function
- shift_right_function := GetProcAddress(PHPLib, 'shift_right_function');
-
- // -- concat_function
- concat_function := GetProcAddress(PHPLib, 'concat_function');
-
- // -- is_equal_function
- is_equal_function := GetProcAddress(PHPLib, 'is_equal_function');
-
- // -- is_identical_function
- is_identical_function := GetProcAddress(PHPLib, 'is_identical_function');
-
- // -- is_not_identical_function
- is_not_identical_function := GetProcAddress(PHPLib, 'is_not_identical_function');
-
- // -- is_not_equal_function
- is_not_equal_function := GetProcAddress(PHPLib, 'is_not_equal_function');
-
- // -- is_smaller_function
- is_smaller_function := GetProcAddress(PHPLib, 'is_smaller_function');
-
- // -- is_smaller_or_equal_function
- is_smaller_or_equal_function := GetProcAddress(PHPLib, 'is_smaller_or_equal_function');
-
- // -- increment_function
- increment_function := GetProcAddress(PHPLib, 'increment_function');
-
- // -- decrement_function
- decrement_function := GetProcAddress(PHPLib, 'decrement_function');
-
- // -- convert_scalar_to_number
- convert_scalar_to_number := GetProcAddress(PHPLib, 'convert_scalar_to_number');
-
- // -- convert_to_long
- convert_to_long := GetProcAddress(PHPLib, 'convert_to_long');
-
- // -- convert_to_double
- convert_to_double := GetProcAddress(PHPLib, 'convert_to_double');
-
- // -- convert_to_long_base
- convert_to_long_base := GetProcAddress(PHPLib, 'convert_to_long_base');
-
- // -- convert_to_null
- convert_to_null := GetProcAddress(PHPLib, 'convert_to_null');
-
- // -- convert_to_boolean
- convert_to_boolean := GetProcAddress(PHPLib, 'convert_to_boolean');
-
- // -- convert_to_array
- convert_to_array := GetProcAddress(PHPLib, 'convert_to_array');
-
- // -- convert_to_object
- convert_to_object := GetProcAddress(PHPLib, 'convert_to_object');
-
- // -- add_char_to_string
- add_char_to_string := GetProcAddress(PHPLib, 'add_char_to_string');
-
- // -- add_string_to_string
- add_string_to_string := GetProcAddress(PHPLib, 'add_string_to_string');
-
- // -- zend_string_to_double
- zend_string_to_double := GetProcAddress(PHPLib, 'zend_string_to_double');
-
- // -- zval_is_true
- zval_is_true := GetProcAddress(PHPLib, 'zval_is_true');
-
- // -- compare_function
- compare_function := GetProcAddress(PHPLib, 'compare_function');
-
- // -- numeric_compare_function
- numeric_compare_function := GetProcAddress(PHPLib, 'numeric_compare_function');
-
- // -- string_compare_function
- string_compare_function := GetProcAddress(PHPLib, 'string_compare_function');
-
- // -- zend_str_tolower
- zend_str_tolower := GetProcAddress(PHPLib, 'zend_str_tolower');
-
- // -- zend_binary_zval_strcmp
- zend_binary_zval_strcmp := GetProcAddress(PHPLib, 'zend_binary_zval_strcmp');
-
- // -- zend_binary_zval_strncmp
- zend_binary_zval_strncmp := GetProcAddress(PHPLib, 'zend_binary_zval_strncmp');
-
- // -- zend_binary_zval_strcasecmp
- zend_binary_zval_strcasecmp := GetProcAddress(PHPLib, 'zend_binary_zval_strcasecmp');
-
- // -- zend_binary_zval_strncasecmp
- zend_binary_zval_strncasecmp := GetProcAddress(PHPLib, 'zend_binary_zval_strncasecmp');
-
- // -- zend_binary_strcmp
- zend_binary_strcmp := GetProcAddress(PHPLib, 'zend_binary_strcmp');
-
- // -- zend_binary_strncmp
- zend_binary_strncmp := GetProcAddress(PHPLib, 'zend_binary_strncmp');
-
- // -- zend_binary_strcasecmp
- zend_binary_strcasecmp := GetProcAddress(PHPLib, 'zend_binary_strcasecmp');
-
- // -- zend_binary_strncasecmp
- zend_binary_strncasecmp := GetProcAddress(PHPLib, 'zend_binary_strncasecmp');
-
- // -- zendi_smart_strcmp
- zendi_smart_strcmp := GetProcAddress(PHPLib, 'zendi_smart_strcmp');
-
- // -- zend_compare_symbol_tables
- zend_compare_symbol_tables := GetProcAddress(PHPLib, 'zend_compare_symbol_tables');
-
- // -- zend_compare_arrays
- zend_compare_arrays := GetProcAddress(PHPLib, 'zend_compare_arrays');
-
- // -- zend_compare_objects
- zend_compare_objects := GetProcAddress(PHPLib, 'zend_compare_objects');
-
- // -- zend_atoi
- zend_atoi := GetProcAddress(PHPLib, 'zend_atoi');
-
- // -- get_active_function_name
- get_active_function_name := GetProcAddress(PHPLib, 'get_active_function_name');
-
- // -- zend_get_executed_filename
- zend_get_executed_filename := GetProcAddress(PHPLib, 'zend_get_executed_filename');
-
- // -- zend_set_timeout
- zend_set_timeout := GetProcAddress(PHPLib, 'zend_set_timeout');
-
- // -- zend_unset_timeout
- zend_unset_timeout := GetProcAddress(PHPLib, 'zend_unset_timeout');
-
- // -- zend_timeout
- zend_timeout := GetProcAddress(PHPLib, 'zend_timeout');
-
- // -- zend_highlight
- zend_highlight := GetProcAddress(PHPLib, 'zend_highlight');
-
- // -- zend_strip
- zend_strip := GetProcAddress(PHPLib, 'zend_strip');
-
- // -- highlight_file
- highlight_file := GetProcAddress(PHPLib, 'highlight_file');
-
- // -- highlight_string
- highlight_string := GetProcAddress(PHPLib, 'highlight_string');
-
- // -- zend_html_putc
- zend_html_putc := GetProcAddress(PHPLib, 'zend_html_putc');
-
- // -- zend_html_puts
- zend_html_puts := GetProcAddress(PHPLib, 'zend_html_puts');
-
- // -- zend_indent
- zend_indent := GetProcAddress(PHPLib, 'zend_indent');
-
- // -- _zend_get_parameters_array_ex
- _zend_get_parameters_array_ex := GetProcAddress(PHPLib, '_zend_get_parameters_array_ex');
-
- // -- zend_ini_refresh_caches
- zend_ini_refresh_caches := GetProcAddress(PHPLib, 'zend_ini_refresh_caches');
-
- // -- zend_alter_ini_entry
- zend_alter_ini_entry := GetProcAddress(PHPLib, 'zend_alter_ini_entry');
-
- // -- zend_restore_ini_entry
- zend_restore_ini_entry := GetProcAddress(PHPLib, 'zend_restore_ini_entry');
-
- // -- zend_ini_long
- zend_ini_long := GetProcAddress(PHPLib, 'zend_ini_long');
-
- // -- zend_ini_double
- zend_ini_double := GetProcAddress(PHPLib, 'zend_ini_double');
-
- // -- zend_ini_string
- zend_ini_string := GetProcAddress(PHPLib, 'zend_ini_string');
-
- // -- compile_string
- compile_string := GetProcAddress(PHPLib, 'compile_string');
-
- // -- execute
- execute := GetProcAddress(PHPLib, 'execute');
-
- // -- zend_wrong_param_count
- zend_wrong_param_count := GetProcAddress(PHPLib, 'zend_wrong_param_count');
-
- // -- add_property_long_ex
- add_property_long_ex := GetProcAddress(PHPLib, 'add_property_long_ex');
-
- // -- add_property_null_ex
- add_property_null_ex := GetProcAddress(PHPLib, 'add_property_null_ex');
-
- // -- add_property_bool_ex
- add_property_bool_ex := GetProcAddress(PHPLib, 'add_property_bool_ex');
-
- // -- add_property_resource_ex
- add_property_resource_ex := GetProcAddress(PHPLib, 'add_property_resource_ex');
-
- // -- add_property_double_ex
- add_property_double_ex := GetProcAddress(PHPLib, 'add_property_double_ex');
-
- // -- add_property_string_ex
- add_property_string_ex := GetProcAddress(PHPLib, 'add_property_string_ex');
-
- // -- add_property_stringl_ex
- add_property_stringl_ex := GetProcAddress(PHPLib, 'add_property_stringl_ex');
-
- // -- add_property_zval_ex
- add_property_zval_ex := GetProcAddress(PHPLib, 'add_property_zval_ex');
-
- // -- add_assoc_long_ex
- add_assoc_long_ex := GetProcAddress(PHPLib, 'add_assoc_long_ex');
-
- // -- add_assoc_null_ex
- add_assoc_null_ex := GetProcAddress(PHPLib, 'add_assoc_null_ex');
-
- // -- add_assoc_bool_ex
- add_assoc_bool_ex := GetProcAddress(PHPLib, 'add_assoc_bool_ex');
-
- // -- add_assoc_resource_ex
- add_assoc_resource_ex := GetProcAddress(PHPLib, 'add_assoc_resource_ex');
-
- // -- add_assoc_double_ex
- add_assoc_double_ex := GetProcAddress(PHPLib, 'add_assoc_double_ex');
-
- // -- add_assoc_string_ex
- add_assoc_string_ex := GetProcAddress(PHPLib, 'add_assoc_string_ex');
-
- // -- add_assoc_stringl_ex
- add_assoc_stringl_ex := GetProcAddress(PHPLib, 'add_assoc_stringl_ex');
-
- // -- add_assoc_zval_ex
- add_assoc_zval_ex := GetProcAddress(PHPLib, 'add_assoc_zval_ex');
-
- // -- add_index_long
- add_index_long := GetProcAddress(PHPLib, 'add_index_long');
-
- // -- add_index_null
- add_index_null := GetProcAddress(PHPLib, 'add_index_null');
-
- // -- add_index_bool
- add_index_bool := GetProcAddress(PHPLib, 'add_index_bool');
-
- // -- add_index_resource
- add_index_resource := GetProcAddress(PHPLib, 'add_index_resource');
-
- // -- add_index_double
- add_index_double := GetProcAddress(PHPLib, 'add_index_double');
-
- // -- add_index_string
- add_index_string := GetProcAddress(PHPLib, 'add_index_string');
-
- // -- add_index_stringl
- add_index_stringl := GetProcAddress(PHPLib, 'add_index_stringl');
-
- // -- add_index_zval
- add_index_zval := GetProcAddress(PHPLib, 'add_index_zval');
-
- // -- add_next_index_long
- add_next_index_long := GetProcAddress(PHPLib, 'add_next_index_long');
-
- // -- add_next_index_null
- add_next_index_null := GetProcAddress(PHPLib, 'add_next_index_null');
-
- // -- add_next_index_bool
- add_next_index_bool := GetProcAddress(PHPLib, 'add_next_index_bool');
-
- // -- add_next_index_resource
- add_next_index_resource := GetProcAddress(PHPLib, 'add_next_index_resource');
-
- // -- add_next_index_double
- add_next_index_double := GetProcAddress(PHPLib, 'add_next_index_double');
-
- // -- add_next_index_string
- add_next_index_string := GetProcAddress(PHPLib, 'add_next_index_string');
-
- // -- add_next_index_stringl
- add_next_index_stringl := GetProcAddress(PHPLib, 'add_next_index_stringl');
-
- // -- add_next_index_zval
- add_next_index_zval := GetProcAddress(PHPLib, 'add_next_index_zval');
-
- // -- add_get_assoc_string_ex
- add_get_assoc_string_ex := GetProcAddress(PHPLib, 'add_get_assoc_string_ex');
-
- // -- add_get_assoc_stringl_ex
- add_get_assoc_stringl_ex := GetProcAddress(PHPLib, 'add_get_assoc_stringl_ex');
-
- // -- add_get_index_long
- add_get_index_long := GetProcAddress(PHPLib, 'add_get_index_long');
-
- // -- add_get_index_double
- add_get_index_double := GetProcAddress(PHPLib, 'add_get_index_double');
-
- // -- add_get_index_string
- add_get_index_string := GetProcAddress(PHPLib, 'add_get_index_string');
-
- // -- add_get_index_stringl
- add_get_index_stringl := GetProcAddress(PHPLib, 'add_get_index_stringl');
-
- // -- _array_init
- _array_init := GetProcAddress(PHPLib, '_array_init');
-
- // -- _object_init
- _object_init := GetProcAddress(PHPLib, '_object_init');
-
- // -- _object_init_ex
- _object_init_ex := GetProcAddress(PHPLib, '_object_init_ex');
-
- // -- _object_and_properties_init
- _object_and_properties_init := GetProcAddress(PHPLib, '_object_and_properties_init');
-
- // -- zend_register_internal_class
- zend_register_internal_class := GetProcAddress(PHPLib, 'zend_register_internal_class');
-
- // -- zend_register_internal_class_ex
- zend_register_internal_class_ex := GetProcAddress(PHPLib, 'zend_register_internal_class_ex');
-
- // -- get_zend_version
- get_zend_version := GetProcAddress(PHPLib, 'get_zend_version');
-
- // -- zend_make_printable_zval
- zend_make_printable_zval := GetProcAddress(PHPLib, 'zend_make_printable_zval');
-
- // -- zend_print_zval
- zend_print_zval := GetProcAddress(PHPLib, 'zend_print_zval');
-
- // -- zend_print_zval_r
- zend_print_zval_r := GetProcAddress(PHPLib, 'zend_print_zval_r');
-
- // -- zend_output_debug_string
- zend_output_debug_string := GetProcAddress(PHPLib, 'zend_output_debug_string');
-
- // -- zend_get_parameters
- ZendGetParameters := GetProcAddress(PHPLib, 'zend_get_parameters');
-
- zend_destroy_file_handle := GetProcAddress(PHPLib, 'zend_destroy_file_handle');
-
- {$IFNDEF QUIET_LOAD}
- CheckZendErrors;
- {$ENDIF}
-
- WriteFuncPtr := GetProcAddress(PHPLib, 'zend_write');
- if Assigned(WriteFuncPtr) then
- @zend_write := pointer(WriteFuncPtr^);
-
- Result := true;
-end;
-
-procedure ZEND_PUTS(str: PChar);
-begin
- if assigned(str) then
- zend_write(str, strlen(str));
-end;
-
-procedure convert_to_string(op: pzval);
-begin
- _convert_to_string(op, nil, 0);
-end;
-
-procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: pchar; functions: pointer);
-begin
- if class_name = nil then
- Exit;
- FillChar(class_container, sizeof(Tzend_class_entry), 0);
-
- {$IFDEF PHP5}
- {$IFDEF PHP512}
- class_container.name := estrdup(class_name);
- {$ELSE}
- {$IFDEF PHP511}
- class_container.name := estrdup(class_name);
- {$ELSE}
- class_container.name := PChar(class_name);
- {$ENDIF}
- {$ENDIF}
- {$ELSE}
- class_container.name := estrdup(class_name);
- {$ENDIF}
-
- class_container.name_length := strlen(class_name);
- class_container.builtin_functions := functions;
-
- {$IFDEF PHP4}
- class_container.handle_function_call := nil;
- class_container.handle_property_get := nil;
- class_container.handle_property_set := nil;
- {$ENDIF}
-end;
-
-function ZEND_FAST_ALLOC: pzval;
-begin
- Result := emalloc(sizeof(zval));
-end;
-
-function ALLOC_ZVAL: pzval;
-begin
- Result := emalloc(sizeof(zval));
-end;
-
-procedure INIT_PZVAL(p: pzval);
-begin
- p^.refcount := 1;
- p^.is_ref := 0;
-end;
-
-function MAKE_STD_ZVAL: pzval;
-begin
- Result := ALLOC_ZVAL;
- INIT_PZVAL(Result);
-end;
-
-function zend_get_parameters_ex(number: integer; var Params: pzval_array): integer;
-var
- i : integer;
-begin
- SetLength(Params, number);
- if number = 0 then
- begin
- Result := SUCCESS;
- Exit;
- end;
- for i := 0 to number - 1 do
- New(Params[i]);
- Result := zend_get_parameters(number, number, Params);
-end;
-
-function zend_get_parameters(ht: integer; param_count: integer; Params: array of ppzval): integer; assembler; register;
-asm
- push esi
- mov esi, ecx
- mov ecx, [ebp+8]
- cmp ecx, 0
- je @first
- @toploop:
- {$IFDEF VERSION6}
- push [esi][ecx * 4]
- {$ELSE}
- push dword [esi][ecx * 4]
- {$ENDIF}
- loop @toploop
- @first:
- push dword [esi]
- push edx
- push eax
- call ZendGetParameters
- mov ecx, [ebp+8]
- add ecx, 3
- @toploop2:
- pop edx
- loop @toploop2
- pop esi
-end;
-
-procedure dispose_pzval_array(Params: pzval_array);
-var
- i : integer;
-begin
- for i := 0 to High(Params) do
- FreeMem(Params[i]);
-end;
-
-{ EPHP4DelphiException }
-
-constructor EPHP4DelphiException.Create(const Msg: string);
-begin
- inherited Create('Unable to link '+ Msg+' function');
-end;
-
-procedure zenderror(Error : PChar);
-begin
- zend_error(E_PARSE, Error);
-end;
-
-
-{$IFNDEF QUIET_LOAD}
-procedure CheckZendErrors;
-begin
- if @zend_disable_function = nil then raise EPHP4DelphiException.Create('zend_disable_function');
- if @zend_disable_class = nil then raise EPHP4DelphiException.Create('zend_disable_class');
- if @zend_register_list_destructors_ex = nil then raise EPHP4DelphiException.Create('zend_register_list_destructors_ex');
- if @zend_register_resource = nil then raise EPHP4DelphiException.Create('zend_register_resource');
- if @zend_fetch_resource = nil then raise EPHP4DelphiException.Create('zend_fetch_resource');
- if @zend_list_insert = nil then raise EPHP4DelphiException.Create('zend_list_insert');
- if @_zend_list_addref = nil then raise EPHP4DelphiException.Create('zend_list_addref');
- if @_zend_list_delete = nil then raise EPHP4DelphiException.Create('zend_list_delete');
- if @_zend_list_find = nil then raise EPHP4DelphiException.Create('_zend_list_find');
- if @zend_rsrc_list_get_rsrc_type = nil then raise EPHP4DelphiException.Create('zend_rsrc_list_get_rsrc_type');
- if @zend_fetch_list_dtor_id = nil then raise EPHP4DelphiException.Create('zend_fetch_list_dtor_id');
- if @zend_get_compiled_filename = nil then raise EPHP4DelphiException.Create('zend_get_compiled_filename');
- if @zend_get_compiled_lineno = nil then raise EPHP4DelphiException.Create('zend_get_compiled_lineno');
- if @tsrm_startup = nil then raise EPHP4DelphiException.Create('tsrm_startup');
- if @ts_allocate_id = nil then raise EPHP4DelphiException.Create('ts_allocate_id');
- if @ts_free_id = nil then raise EPHP4DelphiException.Create('ts_free_id');
- if @zend_strndup = nil then raise EPHP4DelphiException.Create('zend_strndup');
- if @_emalloc = nil then raise EPHP4DelphiException.Create('_emalloc');
- if @_efree = nil then raise EPHP4DelphiException.Create('_efree');
- if @_ecalloc = nil then raise EPHP4DelphiException.Create('_ecalloc');
- if @_erealloc = nil then raise EPHP4DelphiException.Create('_erealloc');
- if @_estrdup = nil then raise EPHP4DelphiException.Create('_estrdup');
- if @_estrndup = nil then raise EPHP4DelphiException.Create('_estrndup');
- if @zend_set_memory_limit = nil then raise EPHP4DelphiException.Create('zend_set_memory_limit');
- if @start_memory_manager = nil then raise EPHP4DelphiException.Create('start_memory_manager');
- if @shutdown_memory_manager = nil then raise EPHP4DelphiException.Create('shutdown_memory_manager');
- {$IFDEF PHP4}
- if @zend_hash_init = nil then raise EPHP4DelphiException.Create('zend_hash_init');
- if @zend_hash_init_ex = nil then raise EPHP4DelphiException.Create('zend_hash_init_ex');
- if @zend_hash_add_or_update = nil then raise EPHP4DelphiException.Create('zend_hash_add_or_update');
- if @zend_hash_quick_add_or_update = nil then raise EPHP4DelphiException.Create('zend_hash_quick_add_or_update');
- if @zend_hash_index_update_or_next_insert = nil then raise EPHP4DelphiException.Create('zend_hash_index_update_or_next_insert');
- if @zend_hash_merge = nil then raise EPHP4DelphiException.Create('zend_hash_merge');
- {$ENDIF}
-
- {$IFDEF PHP5}
- if @zend_hash_add_or_update = nil then raise EPHP4DelphiException.Create('_zend_hash_add_or_update');
- {$ENDIF}
-
- if @zend_hash_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_destroy');
- if @zend_hash_clean = nil then raise EPHP4DelphiException.Create('zend_hash_clean');
- if @zend_hash_add_empty_element = nil then raise EPHP4DelphiException.Create('zend_hash_add_empty_element');
- if @zend_hash_graceful_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_graceful_destroy');
- if @zend_hash_graceful_reverse_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_graceful_reverse_destroy');
- if @zend_hash_apply = nil then raise EPHP4DelphiException.Create('zend_hash_apply');
- if @zend_hash_apply_with_argument = nil then raise EPHP4DelphiException.Create('zend_hash_apply_with_argument');
- if @zend_hash_reverse_apply = nil then raise EPHP4DelphiException.Create('zend_hash_reverse_apply');
- if @zend_hash_del_key_or_index = nil then raise EPHP4DelphiException.Create('zend_hash_del_key_or_index');
- if @zend_get_hash_value = nil then raise EPHP4DelphiException.Create('zend_get_hash_value');
- if @zend_hash_find = nil then raise EPHP4DelphiException.Create('zend_hash_find');
- if @zend_hash_quick_find = nil then raise EPHP4DelphiException.Create('zend_hash_quick_find');
- if @zend_hash_index_find = nil then raise EPHP4DelphiException.Create('zend_hash_index_find');
- if @zend_hash_exists = nil then raise EPHP4DelphiException.Create('zend_hash_exists');
- if @zend_hash_index_exists = nil then raise EPHP4DelphiException.Create('zend_hash_index_exists');
- if @zend_hash_next_free_element = nil then raise EPHP4DelphiException.Create('zend_hash_next_free_element');
- if @zend_hash_move_forward_ex = nil then raise EPHP4DelphiException.Create('zend_hash_move_forward_ex');
- if @zend_hash_move_backwards_ex = nil then raise EPHP4DelphiException.Create('zend_hash_move_backwards_ex');
- if @zend_hash_get_current_key_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_key_ex');
- if @zend_hash_get_current_key_type_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_key_type_ex');
- if @zend_hash_get_current_data_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_data_ex');
- if @zend_hash_internal_pointer_reset_ex = nil then raise EPHP4DelphiException.Create('zend_hash_internal_pointer_reset_ex');
- if @zend_hash_internal_pointer_end_ex = nil then raise EPHP4DelphiException.Create('zend_hash_internal_pointer_end_ex');
- if @zend_hash_copy = nil then raise EPHP4DelphiException.Create('zend_hash_copy');
- if @zend_hash_sort = nil then raise EPHP4DelphiException.Create('zend_hash_sort');
- if @zend_hash_compare = nil then raise EPHP4DelphiException.Create('zend_hash_compare');
- if @zend_hash_minmax = nil then raise EPHP4DelphiException.Create('zend_hash_minmax');
- if @zend_hash_num_elements = nil then raise EPHP4DelphiException.Create('zend_hash_num_elements');
- if @zend_hash_rehash = nil then raise EPHP4DelphiException.Create('zend_hash_rehash');
- if @zend_hash_func = nil then raise EPHP4DelphiException.Create('zend_hash_func');
- if @zend_get_constant = nil then raise EPHP4DelphiException.Create('zend_get_constant');
- if @zend_register_long_constant = nil then raise EPHP4DelphiException.Create('zend_register_long_constant');
- if @zend_register_double_constant = nil then raise EPHP4DelphiException.Create('zend_register_double_constant');
- if @zend_register_string_constant = nil then raise EPHP4DelphiException.Create('zend_register_string_constant');
- if @zend_register_stringl_constant = nil then raise EPHP4DelphiException.Create('zend_register_stringl_constant');
- if @zend_register_constant = nil then raise EPHP4DelphiException.Create('zend_register_constant');
- if @tsrm_shutdown = nil then raise EPHP4DelphiException.Create('tsrm_shutdown');
- if @ts_resource_ex = nil then raise EPHP4DelphiException.Create('ts_resource_ex');
- if @ts_free_thread = nil then raise EPHP4DelphiException.Create('ts_free_thread');
- if @zend_error = nil then raise EPHP4DelphiException.Create('zend_error');
- if @zend_error_cb = nil then raise EPHP4DelphiException.Create('zend_error_cb');
- if @zend_eval_string = nil then raise EPHP4DelphiException.Create('zend_eval_string');
- if @zend_make_compiled_string_description = nil then raise EPHP4DelphiException.Create('zend_make_compiled_string_description');
- if @_zval_dtor = nil then raise EPHP4DelphiException.Create('_zval_dtor');
- if @_zval_copy_ctor = nil then raise EPHP4DelphiException.Create('_zval_copy_ctor');
- if @zend_print_variable = nil then raise EPHP4DelphiException.Create('zend_print_variable');
- if @zend_stack_init = nil then raise EPHP4DelphiException.Create('zend_stack_init');
- if @zend_stack_push = nil then raise EPHP4DelphiException.Create('zend_stack_push');
- if @zend_stack_top = nil then raise EPHP4DelphiException.Create('zend_stack_top');
- if @zend_stack_del_top = nil then raise EPHP4DelphiException.Create('zend_stack_del_top');
- if @zend_stack_int_top = nil then raise EPHP4DelphiException.Create('zend_stack_int_top');
- if @zend_stack_is_empty = nil then raise EPHP4DelphiException.Create('zend_stack_is_empty');
- if @zend_stack_destroy = nil then raise EPHP4DelphiException.Create('zend_stack_destroy');
- if @zend_stack_base = nil then raise EPHP4DelphiException.Create('zend_stack_base');
- if @zend_stack_count = nil then raise EPHP4DelphiException.Create('zend_stack_count');
- if @zend_stack_apply = nil then raise EPHP4DelphiException.Create('zend_stack_apply');
- if @zend_stack_apply_with_argument = nil then raise EPHP4DelphiException.Create('zend_stack_apply_with_argument');
- if @_convert_to_string = nil then raise EPHP4DelphiException.Create('_convert_to_string');
- if @add_function = nil then raise EPHP4DelphiException.Create('add_function');
- if @sub_function = nil then raise EPHP4DelphiException.Create('sub_function');
- if @mul_function = nil then raise EPHP4DelphiException.Create('mul_function');
- if @div_function = nil then raise EPHP4DelphiException.Create('div_function');
- if @mod_function = nil then raise EPHP4DelphiException.Create('mod_function');
- if @boolean_xor_function = nil then raise EPHP4DelphiException.Create('boolean_xor_function');
- if @boolean_not_function = nil then raise EPHP4DelphiException.Create('boolean_not_function');
- if @bitwise_not_function = nil then raise EPHP4DelphiException.Create('bitwise_not_function');
- if @bitwise_or_function = nil then raise EPHP4DelphiException.Create('bitwise_or_function');
- if @bitwise_and_function = nil then raise EPHP4DelphiException.Create('bitwise_and_function');
- if @bitwise_xor_function = nil then raise EPHP4DelphiException.Create('bitwise_xor_function');
- if @shift_left_function = nil then raise EPHP4DelphiException.Create('shift_left_function');
- if @shift_right_function = nil then raise EPHP4DelphiException.Create('shift_right_function');
- if @concat_function = nil then raise EPHP4DelphiException.Create('concat_function');
- if @is_equal_function = nil then raise EPHP4DelphiException.Create('is_equal_function');
- if @is_identical_function = nil then raise EPHP4DelphiException.Create('is_identical_function');
- if @is_not_identical_function = nil then raise EPHP4DelphiException.Create('is_not_identical_function');
- if @is_not_equal_function = nil then raise EPHP4DelphiException.Create('is_not_equal_function');
- if @is_smaller_function = nil then raise EPHP4DelphiException.Create('is_smaller_function');
- if @is_smaller_or_equal_function = nil then raise EPHP4DelphiException.Create('is_smaller_or_equal_function');
- if @increment_function = nil then raise EPHP4DelphiException.Create('increment_function');
- if @decrement_function = nil then raise EPHP4DelphiException.Create('decrement_function');
- if @convert_scalar_to_number = nil then raise EPHP4DelphiException.Create('convert_scalar_to_number');
- if @convert_to_long = nil then raise EPHP4DelphiException.Create('convert_to_long');
- if @convert_to_double = nil then raise EPHP4DelphiException.Create('convert_to_double');
- if @convert_to_long_base = nil then raise EPHP4DelphiException.Create('convert_to_long_base');
- if @convert_to_null = nil then raise EPHP4DelphiException.Create('convert_to_null');
- if @convert_to_boolean = nil then raise EPHP4DelphiException.Create('convert_to_boolean');
- if @convert_to_array = nil then raise EPHP4DelphiException.Create('convert_to_array');
- if @convert_to_object = nil then raise EPHP4DelphiException.Create('convert_to_object');
- if @add_char_to_string = nil then raise EPHP4DelphiException.Create('add_char_to_string');
- if @add_string_to_string = nil then raise EPHP4DelphiException.Create('add_string_to_string');
- if @zend_string_to_double = nil then raise EPHP4DelphiException.Create('zend_string_to_double');
- if @zval_is_true = nil then raise EPHP4DelphiException.Create('zval_is_true');
- if @compare_function = nil then raise EPHP4DelphiException.Create('compare_function');
- if @numeric_compare_function = nil then raise EPHP4DelphiException.Create('numeric_compare_function');
- if @string_compare_function = nil then raise EPHP4DelphiException.Create('string_compare_function');
- if @zend_str_tolower = nil then raise EPHP4DelphiException.Create('zend_str_tolower');
- if @zend_binary_zval_strcmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strcmp');
- if @zend_binary_zval_strncmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strncmp');
- if @zend_binary_zval_strcasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strcasecmp');
- if @zend_binary_zval_strncasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strncasecmp');
- if @zend_binary_strcmp = nil then raise EPHP4DelphiException.Create('zend_binary_strcmp');
- if @zend_binary_strncmp = nil then raise EPHP4DelphiException.Create('zend_binary_strncmp');
- if @zend_binary_strcasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_strcasecmp');
- if @zend_binary_strncasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_strncasecmp');
- if @zendi_smart_strcmp = nil then raise EPHP4DelphiException.Create('zendi_smart_strcmp');
- if @zend_compare_symbol_tables = nil then raise EPHP4DelphiException.Create('zend_compare_symbol_tables');
- if @zend_compare_arrays = nil then raise EPHP4DelphiException.Create('zend_compare_arrays');
- if @zend_compare_objects = nil then raise EPHP4DelphiException.Create('zend_compare_objects');
- if @zend_atoi = nil then raise EPHP4DelphiException.Create('zend_atoi');
- if @get_active_function_name = nil then raise EPHP4DelphiException.Create('get_active_function_name');
- if @zend_get_executed_filename = nil then raise EPHP4DelphiException.Create('zend_get_executed_filename');
- if @zend_set_timeout = nil then raise EPHP4DelphiException.Create('zend_set_timeout');
- if @zend_unset_timeout = nil then raise EPHP4DelphiException.Create('zend_unset_timeout');
- if @zend_timeout = nil then raise EPHP4DelphiException.Create('zend_timeout');
- if @zend_highlight = nil then raise EPHP4DelphiException.Create('zend_highlight');
- if @zend_strip = nil then raise EPHP4DelphiException.Create('zend_strip');
- if @highlight_file = nil then raise EPHP4DelphiException.Create('highlight_file');
- if @highlight_string = nil then raise EPHP4DelphiException.Create('highlight_string');
- if @zend_html_putc = nil then raise EPHP4DelphiException.Create('zend_html_putc');
- if @zend_html_puts = nil then raise EPHP4DelphiException.Create('zend_html_puts');
- if @zend_indent = nil then raise EPHP4DelphiException.Create('zend_indent');
- if @_zend_get_parameters_array_ex = nil then raise EPHP4DelphiException.Create('_zend_get_parameters_array_ex');
- if @zend_ini_refresh_caches = nil then raise EPHP4DelphiException.Create('zend_ini_refresh_caches');
- if @zend_alter_ini_entry = nil then raise EPHP4DelphiException.Create('zend_alter_ini_entry');
- if @zend_restore_ini_entry = nil then raise EPHP4DelphiException.Create('zend_restore_ini_entry');
- if @zend_ini_long = nil then raise EPHP4DelphiException.Create('zend_ini_long');
- if @zend_ini_double = nil then raise EPHP4DelphiException.Create('zend_ini_double');
- if @zend_ini_string = nil then raise EPHP4DelphiException.Create('zend_ini_string');
- if @compile_string = nil then raise EPHP4DelphiException.Create('compile_string');
- if @execute = nil then raise EPHP4DelphiException.Create('execute');
- if @zend_wrong_param_count = nil then raise EPHP4DelphiException.Create('zend_wrong_param_count');
- if @add_property_long_ex = nil then raise EPHP4DelphiException.Create('add_property_long_ex');
- if @add_property_null_ex = nil then raise EPHP4DelphiException.Create('add_property_null_ex');
- if @add_property_bool_ex = nil then raise EPHP4DelphiException.Create('add_property_bool_ex');
- if @add_property_resource_ex = nil then raise EPHP4DelphiException.Create('add_property_resource_ex');
- if @add_property_double_ex = nil then raise EPHP4DelphiException.Create('add_property_double_ex');
- if @add_property_string_ex = nil then raise EPHP4DelphiException.Create('add_property_string_ex');
- if @add_property_stringl_ex = nil then raise EPHP4DelphiException.Create('add_property_stringl_ex');
- if @add_property_zval_ex = nil then raise EPHP4DelphiException.Create('add_property_zval_ex');
- if @add_assoc_long_ex = nil then raise EPHP4DelphiException.Create('add_assoc_long_ex');
- if @add_assoc_null_ex = nil then raise EPHP4DelphiException.Create('add_assoc_null_ex');
- if @add_assoc_bool_ex = nil then raise EPHP4DelphiException.Create('add_assoc_bool_ex');
- if @add_assoc_resource_ex = nil then raise EPHP4DelphiException.Create('add_assoc_resource_ex');
- if @add_assoc_double_ex = nil then raise EPHP4DelphiException.Create('add_assoc_double_ex');
- if @add_assoc_string_ex = nil then raise EPHP4DelphiException.Create('add_assoc_string_ex');
- if @add_assoc_stringl_ex = nil then raise EPHP4DelphiException.Create('add_assoc_stringl_ex');
- if @add_assoc_zval_ex = nil then raise EPHP4DelphiException.Create('add_assoc_zval_ex');
- if @add_index_long = nil then raise EPHP4DelphiException.Create('add_index_long');
- if @add_index_null = nil then raise EPHP4DelphiException.Create('add_index_null');
- if @add_index_bool = nil then raise EPHP4DelphiException.Create('add_index_bool');
- if @add_index_resource = nil then raise EPHP4DelphiException.Create('add_index_resource');
- if @add_index_double = nil then raise EPHP4DelphiException.Create('add_index_double');
- if @add_index_string = nil then raise EPHP4DelphiException.Create('add_index_string');
- if @add_index_stringl = nil then raise EPHP4DelphiException.Create('add_index_stringl');
- if @add_index_zval = nil then raise EPHP4DelphiException.Create('add_index_zval');
- if @add_next_index_long = nil then raise EPHP4DelphiException.Create('add_next_index_long');
- if @add_next_index_null = nil then raise EPHP4DelphiException.Create('add_next_index_null');
- if @add_next_index_bool = nil then raise EPHP4DelphiException.Create('add_next_index_bool');
- if @add_next_index_resource = nil then raise EPHP4DelphiException.Create('add_next_index_resource');
- if @add_next_index_double = nil then raise EPHP4DelphiException.Create('add_next_index_double');
- if @add_next_index_string = nil then raise EPHP4DelphiException.Create('add_next_index_string');
- if @add_next_index_stringl = nil then raise EPHP4DelphiException.Create('add_next_index_stringl');
- if @add_next_index_zval = nil then raise EPHP4DelphiException.Create('add_next_index_zval');
- if @add_get_assoc_string_ex = nil then raise EPHP4DelphiException.Create('add_get_assoc_string_ex');
- if @add_get_assoc_stringl_ex = nil then raise EPHP4DelphiException.Create('add_get_assoc_stringl_ex');
- if @add_get_index_long = nil then raise EPHP4DelphiException.Create('add_get_index_long');
- if @add_get_index_double = nil then raise EPHP4DelphiException.Create('add_get_index_double');
- if @add_get_index_string = nil then raise EPHP4DelphiException.Create('add_get_index_string');
- if @add_get_index_stringl = nil then raise EPHP4DelphiException.Create('add_get_index_stringl');
- if @_array_init = nil then raise EPHP4DelphiException.Create('_array_init');
- if @_object_init = nil then raise EPHP4DelphiException.Create('_object_init');
- if @_object_init_ex = nil then raise EPHP4DelphiException.Create('_object_init_ex');
- if @_object_and_properties_init = nil then raise EPHP4DelphiException.Create('_object_and_properties_init');
- if @zend_register_internal_class = nil then raise EPHP4DelphiException.Create('zend_register_internal_class');
- if @zend_register_internal_class_ex = nil then raise EPHP4DelphiException.Create('zend_register_internal_class_ex');
- if @get_zend_version = nil then raise EPHP4DelphiException.Create('get_zend_version');
- if @zend_make_printable_zval = nil then raise EPHP4DelphiException.Create('zend_make_printable_zval');
- if @zend_print_zval = nil then raise EPHP4DelphiException.Create('zend_print_zval');
- if @zend_print_zval_r = nil then raise EPHP4DelphiException.Create('zend_print_zval_r');
- if @zend_output_debug_string = nil then raise EPHP4DelphiException.Create('zend_output_debug_string');
- if @ZendGetParameters = nil then raise EPHP4DelphiException.Create('zend_get_parameters');
-end;
-{$ENDIF}
-
-function zend_hash_get_current_data(ht: PHashTable; pData: Pointer): Integer; cdecl;
-begin
- result := zend_hash_get_current_data_ex(ht, pData, nil);
-end;
-
-procedure zend_hash_internal_pointer_reset(ht: PHashTable); cdecl;
-begin
- zend_hash_internal_pointer_reset_ex(ht, nil);
-end;
-
-function ts_resource(id : integer) : pointer;
-begin
- result := ts_resource_ex(id, nil);
-end;
-
-
-function zval_copy_ctor(val : pzval) : integer;
-begin
- result := _zval_copy_ctor(val, nil, 0);
-end;
-
-
-function zend_unregister_functions(functions : pzend_function_entry; count : integer; function_table : PHashTable; TSRMLS_DC : pointer) : integer;
-var
- i : integer;
- ptr : pzend_function_entry;
-begin
- Result := SUCCESS;
- i := 0;
- ptr := functions;
- if ptr = nil then
- Exit;
- while ptr.fname <> nil do
- begin
- if ( count <> -1 ) and (i >= count) then
- break;
- zend_hash_del_key_or_index(function_table, ptr.fname, strlen(ptr.fname) +1, 0, HASH_DEL_KEY);
- inc(ptr);
- inc(i);
- end;
-end;
-
-// registers all functions in *library_functions in the function hash
-
-function zend_register_functions(functions : pzend_function_entry; function_table : PHashTable; _type: integer; TSRMLS_DC : pointer) : integer;
-var
- ptr : pzend_function_entry;
- _function : zend_function;
- internal_function : PzendInternalFunction;
- count : integer;
- unload : integer;
- target_function_table : PHashTable;
- error_type : integer;
-
-begin
- Result := FAILURE;
- if functions = nil then
- Exit;
- ptr := functions;
- count := 0;
- unload := 0;
- if _type = MODULE_PERSISTENT then
- error_type := E_CORE_WARNING
- else
- error_type := E_WARNING;
-
- internal_function := @_function;
- target_function_table := function_table;
-
- if (target_function_table = nil) then
- target_function_table := GetCompilerGlobals(TSRMLS_DC).function_table;
-
-
- internal_function._type := ZEND_INTERNAL_FUNCTION;
-
- while (ptr.fname <> nil) do
- begin
- internal_function.handler := ptr.handler;
- internal_function.function_name := ptr.fname;
- if (internal_function.handler = nil) then begin
- zend_error(error_type, 'Null function defined as active function');
- zend_unregister_functions(functions, count, target_function_table, TSRMLS_DC);
- Result := FAILURE;
- Exit;
- end;
-
- if (zend_hash_add_or_update(target_function_table, ptr.fname, strlen(ptr.fname)+1, @_function, sizeof(zend_function), nil, HASH_ADD) = FAILURE) then
- begin
- unload:=1;
- break;
- end;
- inc(ptr);
- inc(count);
- end;
-
-
- if (unload = 1) then begin // before unloading, display all remaining bad function in the module */
- while (ptr.fname<> nil) do begin
- if (zend_hash_exists(target_function_table, ptr.fname, strlen(ptr.fname)+1)) = 1 then
- begin
- zend_error(error_type, PChar(Format('Function registration failed - duplicate name - %s', [ptr.fname])));
- end;
- inc(ptr);
- end;
- zend_unregister_functions(functions, count, target_function_table, TSRMLS_DC);
- result := FAILURE;
- Exit;
- end;
- Result := SUCCESS;
-
-end;
-
-
-
-function GetGlobalResource(resource_name: string; TSRMLS_DC : pointer) : pointer;
-var
- global_id : pointer;
- global_value : integer;
- global_ptr : pointer;
-begin
- Result := nil;
- global_id := GetProcAddress(PHPLib, PChar(resource_name));
- if Assigned(global_id) then
- begin
- global_value := integer(global_id^);
- asm
- mov ecx, global_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- mov global_ptr, ecx
- end;
- Result := global_ptr;
- end;
-end;
-
-
-function GetCompilerGlobals(TSRMLS_DC : pointer) : Pzend_compiler_globals;
-begin
- result := GetGlobalResource('compiler_globals_id', TSRMLS_DC);
-end;
-
-function GetExecutorGlobals(TSRMLS_DC : pointer) : pzend_executor_globals;
-begin
- result := GetGlobalResource('executor_globals_id', TSRMLS_DC);
-end;
-
-function GetAllocGlobals(TSRMLS_DC : pointer) : pointer;
-begin
- result := GetGlobalResource('alloc_globals_id', TSRMLS_DC);
-end;
-
-{$IFDEF PHP5}
-
-function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
-asm
- mov eax, [esp + 16]
- mov ecx, [esp + 12]
- mov edx, [esp + 8]
- pop ebp
- push eax
- push ecx
- push edx
- call _object_init_ex
- add esp, $0c
- ret
-end;
-
-
-function Z_LVAL(z : zval) : longint;
-begin
- Result := z.value.lval;
-end;
-
-function Z_BVAL(z : zval) : boolean;
-begin
- Result := zend_bool(z.value.lval);
-end;
-
-function Z_DVAL(z : zval) : double;
-begin
- Result := z.value.dval;
-end;
-
-
-function Z_STRVAL(z : zval) : string;
-begin
- Result := z.value.str.val;
-end;
-
-function Z_STRLEN(z : zval) : longint;
-begin
- Result := z.value.str.len;
-end;
-
-function Z_ARRVAL(z : zval ) : PHashTable;
-begin
- Result := z.value.ht;
-end;
-
-function Z_OBJ_HANDLE(z :zval) : zend_object_handle;
-begin
- Result := z.value.obj.handle;
-end;
-
-function Z_OBJ_HT(z : zval) : pzend_object_handlers;
-begin
- Result := z.value.obj.handlers;
-end;
-
-function Z_OBJPROP(z : zval) : PHashtable;
-var
- TSRMLS_DC : pointer;
-begin
- TSRMLS_DC := ts_resource_ex(0, nil);
- Result := Z_OBJ_HT(z)^.get_properties(@z, TSRMLS_DC);
-end;
-
-
-{$ENDIF}
-
-initialization
-{$IFDEF PHP4DELPHI_AUTOLOAD}
- LoadZEND;
-{$ENDIF}
-
-finalization
-{$IFDEF PHP4DELPHI_AUTOUNLOAD}
- UnloadZEND;
-{$ENDIF}
-
-end.
-
-
diff --git a/license.txt b/license.txt
index 8f77bc2..7b99a14 100644
--- a/license.txt
+++ b/license.txt
@@ -1,68 +1,68 @@
---------------------------------------------------------------------
- The PHP License, version 3.0
-Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact group@php.net.
-
- 4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from group@php.net. You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
-
- 5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP, freely available from
- ".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see .
-
-This product includes the Zend Engine, freely available at
-.
+--------------------------------------------------------------------
+ The PHP License, version 3.0
+Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. The name "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP, freely available from
+ ".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see .
+
+This product includes the Zend Engine, freely available at
+.
diff --git a/php4App.res b/php4App.res
deleted file mode 100644
index 6a66091..0000000
Binary files a/php4App.res and /dev/null differ
diff --git a/php4AppIntf.pas b/php4AppIntf.pas
deleted file mode 100644
index 171a3c0..0000000
--- a/php4AppIntf.pas
+++ /dev/null
@@ -1,40 +0,0 @@
-{*******************************************************}
-{ PHP4Applications }
-{ }
-{ Delphi interface for PHP4Applications }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-
-unit php4AppIntf;
-
-interface
-
-function InitRequest : integer; stdcall;
-procedure DoneRequest(RequestID : integer); stdcall;
-procedure RegisterVariable(RequestID : integer; AName : PChar; AValue : PChar); stdcall;
-function ExecutePHP(RequestID : integer; FileName : PChar) : integer; stdcall;
-function ExecuteCode(RequestID : integer; ACode : PChar) : integer; stdcall;
-function GetResultText(RequestID : integer; Buffer : PChar; BufLen : integer) : integer; stdcall;
-function GetVariable(RequestID : integer; AName : PChar; Buffer : PChar; BufLen : integer) : integer; stdcall;
-procedure SaveToFile(RequestID : integer; AFileName : PChar); stdcall;
-function GetVariableSize(RequestID : integer; AName : PChar) : integer; stdcall;
-function GetResultBufferSize(RequestID : integer) : integer; stdcall;
-
-implementation
-
-function InitRequest; external 'php4app.dll';
-procedure DoneRequest; external 'php4app.dll';
-procedure RegisterVariable; external 'php4app.dll';
-function ExecutePHP; external 'php4app.dll';
-function ExecuteCode; external 'php4app.dll';
-function GetResultText; external 'php4app.dll';
-function GetVariable; external 'php4app.dll';
-procedure SaveToFile; external 'php4app.dll';
-function GetVariableSize; external 'php4app.dll';
-function GetResultBufferSize; external 'php4app.dll';
-
-end.
\ No newline at end of file
diff --git a/php4Applications/PHP4/php4App.dll b/php4Applications/PHP4/php4App.dll
deleted file mode 100644
index 62a5982..0000000
Binary files a/php4Applications/PHP4/php4App.dll and /dev/null differ
diff --git a/php4Applications/PHP511/php4App.dll b/php4Applications/PHP511/php4App.dll
deleted file mode 100644
index d02c891..0000000
Binary files a/php4Applications/PHP511/php4App.dll and /dev/null differ
diff --git a/php4Applications/PHP512/php4App.dll b/php4Applications/PHP512/php4App.dll
deleted file mode 100644
index aa4ea5b..0000000
Binary files a/php4Applications/PHP512/php4App.dll and /dev/null differ
diff --git a/php4DelphiR2006.bdsproj b/php4DelphiR2006.bdsproj
deleted file mode 100644
index 4c0b17b..0000000
--- a/php4DelphiR2006.bdsproj
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
- Delphi.Personality
- VCLApplication
- 1.0
- {6358A15F-008A-4F73-A236-052B34A4F68C}
-
-
-
-
- php4DelphiR2006.dpk
-
-
- 7.0
-
-
- 8
- 0
- 1
- 1
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 1
- 1
- 1
- True
- True
- WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
- False
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- False
- False
- False
- True
- True
- True
- True
- True
- True
-
-
-
- 0
- 0
- False
- 1
- False
- False
- False
- 16384
- 1048576
- 4194304
- php4Delphi (run-rime)
-
-
-
-
-
-
-
-
-
-
- False
-
-
-
-
-
- False
-
-
- True
- False
-
-
-
- $00000000
-
-
-
- False
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 2067
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
-
diff --git a/php4delphi.pas b/php4delphi.pas
deleted file mode 100644
index 180e8c8..0000000
--- a/php4delphi.pas
+++ /dev/null
@@ -1,1132 +0,0 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Developers: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ }
-{ Toby Allen (Documentation) }
-{ tobyphp@toflidium.com }
-{ }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: php4delphi.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-// Important:
-// Please check PHP version you are using and change php.inc file
-// See php.inc for more details
-
-{
-You can download the latest version of PHP from
-http://www.php.net/downloads.php
-You have to download and install PHP separately.
-It is not included in the package.
-
-For more information on the PHP Group and the PHP project,
-please see .
-}
-
-unit php4delphi;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics,
- PHPCommon,
- ZendTypes, PHPTypes, zendAPI, PHPAPI, DelphiFunctions;
-
-
-type
-
- TPHPLogMessage = procedure (Sender : TObject; AText : string) of object;
- TPHPErrorEvent = procedure (Sender : TObject; AText : string;
- AType : TPHPErrorType; AFileName : string; ALineNo : integer) of object;
-
-
-
- IPHPLibrary = interface (IUnknown)
- ['{484AE2CA-755A-437C-9B60-E3735973D0A9}']
- procedure AddModule(AModule : Pointer);
- procedure RemoveModule(AModule : Pointer);
- {$IFDEF PHP510}
- procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
- {$ELSE}
- procedure HandleRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
- {$ENDIF}
- end;
-
-
- TpsvCustomPHP = class(TPHPComponent, IPHPLibrary)
- private
- FHeaders : TPHPHeaders;
- FSafeMode : boolean;
- FSafeModeGid : boolean;
- FMaxExecutionTime : integer;
- FMaxInputTime : integer;
- FRegisterGlobals : boolean;
- FINIPath : string;
- FExecuteMethod : TPHPExecuteMethod;
- FKeepSession : boolean;
- FModuleActive : boolean;
- FSessionActive : boolean;
- FOnModuleStartup : TNotifyEvent;
- FOnModuleShutdown : TNotifyEvent;
- FOnRequestStartup : TNotifyEvent;
- FOnRequestShutdown : TNotifyEvent;
- FAfterExecute : TNotifyEvent;
- FBeforeExecute : TNotifyEvent;
- FAdditionalModules : TList;
- FTerminated : boolean;
- FConstants : TphpConstants;
- TSRMLS_D : pppointer;
- FVariables : TPHPVariables;
- FBuffer : string;
- FOnLogMessage : TPHPLogMessage;
- FOnScriptError : TPHPErrorEvent;
- FHTMLErrors : boolean;
- FHandleErrors : boolean;
- FFileName : string;
- FVirtualReadHandle : THandle;
- FVirtualWriteHandle : THandle;
- FUseDelimiters : boolean;
- FUseMapping : boolean;
- FDLLFolder : string;
- FReportDLLError : boolean;
- procedure SetVariables(Value : TPHPVariables);
- procedure SetConstants(Value : TPHPConstants);
- procedure SetHeaders(Value : TPHPHeaders);
- function GetVariableCount: integer;
- function GetConstantCount: integer;
- protected
- procedure ClearBuffer;
- procedure ClearHeaders;
- procedure PrepareModule; virtual;
- procedure PrepareIniEntry; virtual;
- procedure StartupRequest; virtual;
- procedure ShutdownRequest; virtual;
- procedure PrepareResult(TSRMLS_D : pointer); virtual;
- procedure PrepareVariables(TSRMLS_D : pointer); virtual;
- procedure RegisterInternalConstants(TSRMLS_DC : pointer); virtual;
- procedure AddModule(AModule : Pointer); virtual;
- procedure RemoveModule(AModule : Pointer); virtual;
- {$IFDEF PHP510}
- procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); virtual;
- {$ELSE}
- procedure HandleRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); virtual;
- {$ENDIF}
- function RunTime : boolean;
- function GetThreadSafeResourceManager : pointer;
- procedure RegisterConstants; virtual;
- function CreateVirtualFile(ACode : string) : boolean;
- procedure CloseVirtualFile;
- procedure StartupPHP; virtual;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- function Execute : string; overload;
- function Execute(AFileName : string) : string; overload;
- function RunCode(ACode : string) : string; overload;
- function RunCode(ACode : TStrings) : string; overload;
- function VariableByName(AName : string) : TPHPVariable;
- procedure StartupModule; virtual;
- procedure ShutdownModule; virtual;
- property ExecuteMethod : TPHPExecuteMethod read FExecuteMethod write FExecuteMethod default emServer;
- property FileName : string read FFileName write FFileName;
- property Constants : TPHPConstants read FConstants write SetConstants;
- property ConstantCount : integer read GetConstantCount;
- property Variables : TPHPVariables read FVariables write SetVariables;
- property VariableCount : integer read GetVariableCount;
- property HTMLErrors : boolean read FHTMLErrors write FHTMLErrors default false;
- property KeepSession : boolean read FKeepSession write FKeepSession default false;
- property HandleErrors : boolean read FHandleErrors write FHandleErrors default true;
- property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
- property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
- property OnModuleStartup : TNotifyEvent read FOnModuleStartup write FOnModuleStartup;
- property OnModuleShutdown : TNotifyEvent read FOnModuleShutdown write FOnModuleShutdown;
- property OnRequestStartup : TNotifyEvent read FOnRequestStartup write FOnRequestStartup;
- property OnRequestShutdown : TNotifyEvent read FOnRequestShutdown write FOnRequestShutdown;
- property BeforeExecute : TNotifyEvent read FBeforeExecute write FBeforeExecute;
- property AfterExecute : TNotifyEvent read FAfterExecute write FAfterExecute;
- property ThreadSafeResourceManager : pointer read GetThreadSafeResourceManager;
- property ModuleActive : boolean read FModuleActive;
- property SessionActive : boolean read FSessionActive;
- property IniPath : string read FIniPath write FIniPath;
- property UseDelimiters : boolean read FUseDelimiters write FUseDelimiters default true;
- property RegisterGlobals : boolean read FRegisterGlobals write FRegisterGlobals default true;
- property MaxExecutionTime : integer read FMaxExecutionTime write FMaxExecutionTime default 0;
- property MaxInputTime : integer read FMaxInputTime write FMaxInputTime default 0;
- property SafeMode : boolean read FSafeMode write FSafeMode default false;
- property SafeModeGid : boolean read FSafeModeGid write FSafeModeGid default false;
- property DLLFolder : string read FDLLFolder write FDLLFolder;
- property ReportDLLError : boolean read FReportDLLError write FReportDLLError;
- property Headers : TPHPHeaders read FHeaders write SetHeaders;
- end;
-
-
- TpsvPHP = class(TpsvCustomPHP)
- published
- property About;
- property FileName;
- property Constants;
- property Variables;
- property HTMLErrors;
- property HandleErrors;
- property KeepSession;
- property OnLogMessage;
- property OnScriptError;
- property OnModuleStartup;
- property OnModuleShutdown;
- property OnRequestStartup;
- property OnRequestShutdown;
- property BeforeExecute;
- property AfterExecute;
- property IniPath;
- property UseDelimiters;
- property RegisterGlobals;
- property MaxExecutionTime;
- property MaxInputTime;
- property SafeMode;
- property SafeModeGid;
- property DLLFolder;
- end;
-
-
-
-implementation
-
-uses
- PHPFunctions,
- phpCustomLibrary;
-
-var
- delphi_sapi_module : sapi_module_struct;
- php_delphi_module : Tzend_module_entry;
- module_active : boolean = false;
-
-procedure php_info_delphi(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
-begin
- php_info_print_table_start();
- php_info_print_table_row(2, PChar('SAPI module version'), PChar('PHP4Delphi 6.2 Feb 2006'));
- php_info_print_table_row(2, PChar('Variables support'), PChar('enabled'));
- php_info_print_table_row(2, PChar('Constants support'), PChar('enabled'));
- php_info_print_table_row(2, PChar('Classes support'), PChar('enabled'));
- php_info_print_table_row(2, PChar('Home page'), PChar('http://users.chello.be/ws36637'));
- php_info_print_table_end();
-
-end;
-
-function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
-begin
- result := php_module_startup(sapi_module, nil, 0);
-end;
-
-function php_delphi_deactivate(p : pointer) : integer; cdecl;
-begin
- result := 0;
-end;
-
-
-function php_delphi_ub_write(str : pchar; len : uint; p : pointer) : integer; cdecl;
-var
- s : string;
- php : TpsvPHP;
- gl : psapi_globals_struct;
-begin
- Result := 0;
- gl := GetSAPIGlobals(p);
- if Assigned(gl) then
- begin
- php := TpsvPHP(gl^.server_context);
- if Assigned(php) then
- begin
- SetLength(s, len);
- Move(str^, s[1], len);
- try
- php.FBuffer := php.FBuffer + s;
- except
- end;
- result := len;
- end;
- end;
-end;
-
-
-procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
- ts : pointer;
- cnt : integer;
-begin
- ts := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(ts);
- php := TpsvPHP(gl^.server_context);
- php_register_variable('PHP_SELF', '_', nil, p);
- php_register_variable('SERVER_NAME','DELPHI', val, p);
- php_register_variable('SERVER_SOFTWARE', 'Delphi', val, p);
- php_register_variable('IsLibrary', 'False', val, p);
- if Assigned(php) then
- begin
- for cnt := 0 to php.Variables.Count - 1 do
- begin
- php_register_variable(PChar(php.Variables[cnt].Name),
- PChar(php.Variables[cnt].Value), val, p);
- end;
- end;
-end;
-
-function php_delphi_log_message(msg : Pchar) : integer; cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
- p : pointer;
-begin
- p := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(p);
- php := TpsvPHP(gl^.server_context);
- if Assigned(php) then
- begin
- if Assigned(php.OnLogMessage) then
- php.FOnLogMessage(php, msg)
- else
- MessageBox(0, MSG, 'PHP4Delphi', MB_OK)
- end
- else
- MessageBox(0, msg, 'PHP4Delphi', MB_OK);
- result := 0;
-end;
-
-procedure php_delphi_send_header(p1, p2, p3 : pointer); cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
-begin
- gl := GetSAPIGlobals(p3);
- php := TpsvPHP(gl^.server_context);
- if Assigned(p1) and Assigned(php) then
- begin
- with php.Headers.Add do
- Header := String(Psapi_header_struct(p1).header);
- end;
-end;
-
-function php_delphi_header_handler(sapi_header : psapi_header_struct; sapi_headers : psapi_headers_struct; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SAPI_HEADER_ADD;
-end;
-
-function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
-begin
- result := nil;
-end;
-
-
-
-procedure delphi_error_cb(_type : integer; const error_filename : PChar;
- const error_lineno : uint; const _format : PChar; args : PChar); cdecl;
-var
- buffer : array[0..1023] of char;
- err_msg : PChar;
- php : TpsvPHP;
- gl : psapi_globals_struct;
- p : pointer;
- error_type_str : string;
- err : TPHPErrorType;
-begin
- wvsprintf(buffer, _format, args);
- err_msg := buffer;
- p := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(p);
- php := TpsvPHP(gl^.server_context);
-
- case _type of
- E_ERROR : err := etError;
- E_WARNING : err := etWarning;
- E_PARSE : err := etParse;
- E_NOTICE : err := etNotice;
- E_CORE_ERROR : err := etCoreError;
- E_CORE_WARNING : err := etCoreWarning;
- E_COMPILE_ERROR : err := etCompileError;
- E_COMPILE_WARNING : err := etCompileWarning;
- E_USER_ERROR : err := etUserError;
- E_USER_WARNING : err := etUserWarning;
- E_USER_NOTICE : err := etUserNotice;
- else
- err := etUnknown;
- end;
-
- if assigned(php) then
- begin
- if Assigned(php.FOnScriptError) then
- begin
- php.FOnScriptError(php, Err_Msg, err, error_filename, error_lineno);
- end
- else
- begin
- case _type of
- E_ERROR,
- E_CORE_ERROR,
- E_COMPILE_ERROR,
- E_USER_ERROR:
- error_type_str := 'Fatal error';
- E_WARNING,
- E_CORE_WARNING,
- E_COMPILE_WARNING,
- E_USER_WARNING :
- error_type_str := 'Warning';
- E_PARSE:
- error_type_str := 'Parse error';
- E_NOTICE,
- E_USER_NOTICE:
- error_type_str := 'Notice';
- else
- error_type_str := 'Unknown error';
- end;
-
- php_log_err(PChar(Format('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno])), p);
- end;
- end;
-
- _zend_bailout(error_filename, error_lineno);
-end;
-
-
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RegisterInternalClasses(TSRMLS_DC);
- module_active := true;
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- module_active := false;
- RESULT := SUCCESS;
-end;
-
-{ TpsvCustomPHP }
-
-constructor TpsvCustomPHP.Create(AOwner: TComponent);
-begin
- inherited;
- FSafeMode := false;
- FSafeModeGid := false;
- FMaxExecutionTime := 0;
- FMaxInputTime := 0;
- FRegisterGlobals := true;
- FExecuteMethod := emServer;
- FModuleActive := false;
- FSessionActive := false;
- FAdditionalModules := TList.Create;
- FVariables := TPHPVariables.Create(Self);
- FConstants := TPHPConstants.Create(Self);
- FHeaders := TPHPHeaders.Create(Self);
- FHandleErrors := true;
- FHTMLErrors := false;
- FKeepSession := false;
- FUseDelimiters := true;
-end;
-
-destructor TpsvCustomPHP.Destroy;
-begin
- ShutdownModule;
- FVariables.Free;
- FConstants.Free;
- FHeaders.Free;
- FAdditionalModules.Free;
- FModuleActive := false;
- FSessionActive := False;
- inherited;
-end;
-
-procedure TpsvCustomPHP.ClearBuffer;
-begin
- FBuffer := '';
-end;
-
-procedure TpsvCustomPHP.ClearHeaders;
-begin
- FHeaders.Clear;
-end;
-
-procedure TpsvCustomPHP.StartupModule;
-var
- i : integer;
- p : pointer;
-begin
- if php_delphi_module.module_started = 0 then
- begin
- StartupPHP;
-
- PrepareModule;
-
- if FModuleActive then
- raise EDelphiErrorEx.Create('PHP engine already active');
-
- if not PHPLoaded then //Peter Enz
- begin
- raise EDelphiErrorEx.Create('PHP engine is not active');
- end;
-
- try
- //Start PHP thread safe resource manager
- tsrm_startup(128, 1, TSRM_ERROR_LEVEL_CORE , nil);
- sapi_startup(@delphi_sapi_module);
- php_module_startup(@delphi_sapi_module, @php_delphi_module, 1);
- TSRMLS_D := ts_resource_ex(0, nil);
-
- PrepareIniEntry;
- RegisterConstants;
- if FKeepSession then
- PG(TSRMLS_D)^.output_buffering := 0;
-
-
- for i := 0 to FAdditionalModules.Count -1 do
- begin
- p := FAdditionalModules[i];
- TCustomPHPLibrary(p).Refresh;
- p := @TCustomPHPLibrary(p).LibraryEntry;
- {$IFDEF PHP510}
- php_register_extensions(@p, 1, TSRMLS_D);
- {$ELSE}
- php_startup_extensions(@p, 1);
- {$ENDIF}
- end;
-
- if Assigned(FOnModuleStartup) then
- FOnModuleStartup(Self);
-
- FModuleActive := true;
- except
- FModuleActive := false;
- end;
- end
- else
- begin
- FModuleActive := true;
- TSRMLS_D := ts_resource_ex(0, nil);
- end;
- StartupRequest;
-end;
-
-function TpsvCustomPHP.Execute : string;
-var
- file_handle : zend_file_handle;
-begin
- ClearHeaders;
- ClearBuffer;
-
- if Assigned(FBeforeExecute) then
- FBeforeExecute(Self);
-
-
-
- FTerminated := false;
- if not FUseMapping then
- begin
- if not FileExists(FFileName) then
- raise Exception.CreateFmt('File %s does not exists', [FFileName]);
- end;
-
- if not FModuleActive then
- StartupModule
- else
- StartupRequest;
-
- if FKeepSession then
- PrepareVariables(TSRMLS_D);
-
- FillChar(file_handle, sizeof(zend_file_handle), 0);
- if FUseMapping then
- begin
- file_handle._type := ZEND_HANDLE_FD;
- file_handle.opened_path := nil;
- file_handle.filename := '-';
- file_handle.free_filename := 0;
- file_handle.handle.fd := FVirtualReadHandle;
- end
- else
- begin
- file_handle._type := ZEND_HANDLE_FILENAME;
- file_handle.filename := PChar(FFileName);
- file_handle.opened_path := nil;
- file_handle.free_filename := 0;
- end;
-
-
- try
- php_execute_script(@file_handle, TSRMLS_D);
- except
- FBuffer := '';
- end;
-
- PrepareResult(TSRMLS_D);
-
-
-
- if Assigned(FAfterExecute) then
- FAfterExecute(Self);
-
- if not FKeepSession then
- ShutdownRequest;
-
- Result := FBuffer;
-end;
-
-function TpsvCustomPHP.RunCode(ACode : string) : string;
-begin
- ClearHeaders;
- ClearBuffer;
- FUseMapping := true;
- try
- if FUseDelimiters then
- begin
- if Pos('', ACode) = 0 then
- ACode := ' ' + ACode;
- if Pos('?>', ACode) = 0 then
- ACode := ACode + ' ?>';
- end;
- if not CreateVirtualFile(ACode) then
- begin
- Result := '';
- Exit;
- end;
- Result := Execute;
- CloseVirtualFile;
- finally
- FUseMapping := false;
- end;
-end;
-
-
-
-procedure TpsvCustomPHP.PrepareModule;
-begin
- if php_delphi_module.module_started = 1 then
- Exit;
-
- delphi_sapi_module.name := 'embed'; //to solve a problem with dl()
- delphi_sapi_module.pretty_name := 'PHP for Delphi'; (* pretty name *)
- delphi_sapi_module.startup := php_delphi_startup; (* startup *)
- delphi_sapi_module.shutdown := php_module_shutdown_wrapper; (* shutdown *)
- delphi_sapi_module.activate:= nil; (* activate *)
- delphi_sapi_module.deactivate := @php_delphi_deactivate; (* deactivate *)
- delphi_sapi_module.ub_write := @php_delphi_ub_write; (* unbuffered write *)
- delphi_sapi_module.flush := nil;
- delphi_sapi_module.stat:= nil;
- delphi_sapi_module.getenv:= nil;
- delphi_sapi_module.sapi_error := @zend_error; (* error handler *)
- delphi_sapi_module.header_handler := @php_delphi_header_handler;
- delphi_sapi_module.send_headers := nil;
- delphi_sapi_module.send_header := @php_delphi_send_header;
- delphi_sapi_module.read_post := nil;
- delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
- delphi_sapi_module.register_server_variables := @php_delphi_register_variables; (* register server variables *)
- delphi_sapi_module.log_message := @php_delphi_log_message; (* Log message *)
- if FIniPath <> '' then
- delphi_sapi_module.php_ini_path_override := PChar(FIniPath)
- else
- delphi_sapi_module.php_ini_path_override := nil;
- delphi_sapi_module.block_interruptions := nil;
- delphi_sapi_module.unblock_interruptions := nil;
- delphi_sapi_module.default_post_reader := nil;
- delphi_sapi_module.treat_data := nil;
- delphi_sapi_module.executable_location := nil;
- delphi_sapi_module.php_ini_ignore := 0;
-
- InitDelphiFunctions;
- php_delphi_module.size := sizeOf(Tzend_module_entry);
- php_delphi_module.zend_api := ZEND_MODULE_API_NO;
- php_delphi_module.zend_debug := 0;
- php_delphi_module.zts := USING_ZTS;
- php_delphi_module.name := 'php4delphi_support';
- php_delphi_module.functions := @DelphiTable[0];
- php_delphi_module.module_startup_func := @minit;
- php_delphi_module.module_shutdown_func := @mshutdown;
- php_delphi_module.info_func := @php_info_delphi;
- php_delphi_module.version := '6.2';
- {$IFDEF PHP4}
- php_delphi_module.global_startup_func := nil;
- {$ENDIF}
- php_delphi_module.request_shutdown_func := nil;
- php_delphi_module.global_id := 0;
- php_delphi_module.module_started := 0;
- php_delphi_module._type := 0;
- php_delphi_module.handle := nil;
- php_delphi_module.module_number := 0;
-end;
-
-function TpsvCustomPHP.RunCode(ACode: TStrings): string;
-begin
- if Assigned(ACode) then
- Result := RunCode(ACode.Text);
-end;
-
-procedure TpsvCustomPHP.SetConstants(Value: TPHPConstants);
-begin
- FConstants.Assign(Value);
-end;
-
-procedure TpsvCustomPHP.SetVariables(Value: TPHPVariables);
-begin
- FVariables.Assign(Value);
-end;
-
-procedure TpsvCustomPHP.SetHeaders(Value : TPHPHeaders);
-begin
- FHeaders.Assign(Value);
-end;
-
-procedure TpsvCustomPHP.PrepareIniEntry;
-var
- p : integer;
- TimeStr : string;
-begin
- if not PHPLoaded then
- Exit;
-
- if FHandleErrors then
- begin
- p := integer(GetProcAddress(PHPLib, 'zend_error_cb'));
- asm
- mov edx, dword ptr [p]
- mov dword ptr [edx], offset delphi_error_cb
- end;
- end;
-
- if FSafeMode then
- zend_alter_ini_entry('safe_mode', 10, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
- else
- zend_alter_ini_entry('safe_mode', 10, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
-
- if FSafeModeGID then
- zend_alter_ini_entry('safe_mode_gid', 14, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
- else
- zend_alter_ini_entry('safe_mode_gid', 14, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
-
- zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- if FRegisterGlobals then
- zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
- else
- zend_alter_ini_entry('register_globals', 17, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- if FHTMLErrors then
- zend_alter_ini_entry('html_errors', 12, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
- else
- zend_alter_ini_entry('html_errors', 12, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- TimeStr := IntToStr(FMaxInputTime);
- zend_alter_ini_entry('max_input_time', 15, PChar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-end;
-
-{$IFDEF REGISTER_COLORS}
-const
- Colors: array[0..41] of TIdentMapEntry = (
- (Value: clBlack; Name: 'clBlack'),
- (Value: clMaroon; Name: 'clMaroon'),
- (Value: clGreen; Name: 'clGreen'),
- (Value: clOlive; Name: 'clOlive'),
- (Value: clNavy; Name: 'clNavy'),
- (Value: clPurple; Name: 'clPurple'),
- (Value: clTeal; Name: 'clTeal'),
- (Value: clGray; Name: 'clGray'),
- (Value: clSilver; Name: 'clSilver'),
- (Value: clRed; Name: 'clRed'),
- (Value: clLime; Name: 'clLime'),
- (Value: clYellow; Name: 'clYellow'),
- (Value: clBlue; Name: 'clBlue'),
- (Value: clFuchsia; Name: 'clFuchsia'),
- (Value: clAqua; Name: 'clAqua'),
- (Value: clWhite; Name: 'clWhite'),
- (Value: clScrollBar; Name: 'clScrollBar'),
- (Value: clBackground; Name: 'clBackground'),
- (Value: clActiveCaption; Name: 'clActiveCaption'),
- (Value: clInactiveCaption; Name: 'clInactiveCaption'),
- (Value: clMenu; Name: 'clMenu'),
- (Value: clWindow; Name: 'clWindow'),
- (Value: clWindowFrame; Name: 'clWindowFrame'),
- (Value: clMenuText; Name: 'clMenuText'),
- (Value: clWindowText; Name: 'clWindowText'),
- (Value: clCaptionText; Name: 'clCaptionText'),
- (Value: clActiveBorder; Name: 'clActiveBorder'),
- (Value: clInactiveBorder; Name: 'clInactiveBorder'),
- (Value: clAppWorkSpace; Name: 'clAppWorkSpace'),
- (Value: clHighlight; Name: 'clHighlight'),
- (Value: clHighlightText; Name: 'clHighlightText'),
- (Value: clBtnFace; Name: 'clBtnFace'),
- (Value: clBtnShadow; Name: 'clBtnShadow'),
- (Value: clGrayText; Name: 'clGrayText'),
- (Value: clBtnText; Name: 'clBtnText'),
- (Value: clInactiveCaptionText; Name: 'clInactiveCaptionText'),
- (Value: clBtnHighlight; Name: 'clBtnHighlight'),
- (Value: cl3DDkShadow; Name: 'cl3DDkShadow'),
- (Value: cl3DLight; Name: 'cl3DLight'),
- (Value: clInfoText; Name: 'clInfoText'),
- (Value: clInfoBk; Name: 'clInfoBk'),
- (Value: clNone; Name: 'clNone'));
-{$ENDIF}
-
-procedure TpsvCustomPHP.RegisterInternalConstants(TSRMLS_DC : pointer);
-{$IFDEF REGISTER_COLORS}
-var
- i : integer;
-{$ENDIF}
-begin
- {$IFDEF REGISTER_COLORS}
- for I := Low(Colors) to High(Colors) do
- zend_register_long_constant( PChar(Colors[i].Name), strlen(PChar(Colors[i].Name)) + 1, Colors[i].Value,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- {$ENDIF}
-end;
-
-procedure TpsvCustomPHP.AddModule(AModule: Pointer);
-begin
- FAdditionalModules.Add(AModule);
-end;
-
-procedure TpsvCustomPHP.RemoveModule(AModule: Pointer);
-begin
- try
- FAdditionalModules.Remove(AModule);
- except
- end;
-end;
-
-
-{$IFDEF PHP510}
-procedure TpsvCustomPHP.HandleRequest(ht: integer; return_value : pzval; return_value_ptr : ppzval; this_ptr: pzval;
- return_value_used: integer; TSRMLS_DC: pointer);
-{$ELSE}
-procedure TpsvCustomPHP.HandleRequest(ht: integer; return_value, this_ptr: pzval;
- return_value_used: integer; TSRMLS_DC: pointer);
-{$ENDIF}
-var
- cnt : integer;
- Params : pzval_array;
- AFunction : TPHPFunction;
- i, j : integer;
- FActiveFunctionName : string;
-begin
- try
-
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- end;
-
- FActiveFunctionName := get_active_function_name(TSRMLS_DC);
-
- for i := 0 to FAdditionalModules.Count - 1 do
- begin
- for cnt := 0 to TCustomPHPLibrary(FAdditionalModules[i]).Functions.Count - 1 do
- begin
- if SameText(TCustomPHPLibrary(FAdditionalModules[i]).Functions[cnt].FunctionName, FActiveFunctionName) then
- begin
- TCustomPHPLibrary(FAdditionalModules[i]).ActiveFunctionName := FActiveFunctionName;
- AFunction := TCustomPHPLibrary(FAdditionalModules[i]).Functions[cnt];
- if Assigned(AFunction.OnExecute) then
- begin
- if AFunction.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ht > 0 then
- begin
- for j := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(AFunction.Parameters[j].ParamType, Params[j]^) then
- begin
- zend_error(E_WARNING, PChar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
- Exit;
- end;
- AFunction.Parameters[j].ZendValue := (Params[j]^);
- end;
- end; // if ht > 0
-
- AFunction.ZendVar.AsZendVariable := return_value; //direct access to zend variable
- AFunction.OnExecute(Self, AFunction.Parameters, AFunction.ReturnValue, this_ptr, TSRMLS_DC);
- if AFunction.ZendVar.ISNull then //perform variant conversion
- variant2zval(AFunction.ReturnValue, return_value);
- end; //if assigned AFunction.OnExecute
- Exit;
- end; //found function
- end; //functions.count
-
- end; //modules.count
- finally
- dispose_pzval_array(Params);
- end;
-end;
-
-function TpsvCustomPHP.Execute(AFileName: string): string;
-begin
- FFileName := AFileName;
- Result := Execute;
-end;
-
-procedure TpsvCustomPHP.PrepareResult(TSRMLS_D : pointer);
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
- variable : pzval;
-begin
- if FExecuteMethod = emServer then
- {$IFDEF PHP4}
- ht := GetSymbolsTable(TSRMLS_D)
- {$ELSE}
- ht := @GetExecutorGlobals(TSRMLS_D).symbol_table
- {$ENDIF}
- else
- ht := GetTrackHash('_GET', TSRMLS_D);
- if Assigned(ht) then
- begin
- for cnt := 0 to FVariables.Count - 1 do
- begin
- new(data);
- try
- if zend_hash_find(ht, PChar(FVariables[cnt].Name),
- strlen(PChar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
- begin
- variable := data^^;
- convert_to_string(variable);
- FVariables[cnt].Value := variable^.value.str.val;
- end;
- finally
- freemem(data);
- end;
- end;
- end;
-end;
-
-function TpsvCustomPHP.VariableByName(AName: string): TPHPVariable;
-begin
- Result := FVariables.ByName(AName);
-end;
-
-procedure TpsvCustomPHP.ShutdownModule;
-begin
- if module_active then
- begin
- FModuleActive := false;
- FSessionActive := false;
- Exit;
- end;
-
- if not FModuleActive then
- Exit;
-
- if FSessionActive then
- ShutdownRequest;
- try
- delphi_sapi_module.shutdown(@delphi_sapi_module);
- sleep(10);
- sapi_shutdown;
- //Shutdown PHP thread safe resource manager
- if Assigned(FOnModuleShutdown) then
- FOnModuleShutdown(Self);
- tsrm_shutdown();
- sleep(10); //?
- if PHPLoaded then
- UnloadPHP;
- finally
- FModuleActive := false;
- end;
-end;
-
-procedure TpsvCustomPHP.ShutdownRequest;
-begin
- if not FSessionActive then
- Exit;
- try
-
- if not FTerminated then
- begin
- php_request_shutdown(nil);
- end;
-
- if Assigned(FOnRequestShutdown) then
- FOnRequestShutdown(Self);
-
- finally
- FSessionActive := false;
- end;
-
-end;
-
-procedure TpsvCustomPHP.StartupRequest;
-var
- gl : psapi_globals_struct;
- TimeStr : string;
-begin
- if not FModuleActive then
- raise EDelphiErrorEx.Create('PHP engine is not active ');
-
- if FSessionActive then
- Exit;
-
- if FRegisterGlobals then
- PG(TSRMLS_D)^.register_globals := true;
-
- try
- gl := GetSAPIGlobals(TSRMLS_D);
- gl^.server_context := Self;
- gl^.request_info.query_string := PChar(Variables.GetVariables);
- gl^.sapi_headers.http_response_code := 200;
- gl^.request_info.request_method := 'GET';
- php_request_startup(TSRMLS_D);
- if Assigned(FOnRequestStartup) then
- FOnRequestStartup(Self);
- TimeStr := IntToStr(FMaxExecutionTime);
- zend_alter_ini_entry('max_execution_time', 19, PChar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
-
- FSessionActive := true;
- except
- FSessionActive := false;
- end;
-end;
-
-function TpsvCustomPHP.RunTime: boolean;
-begin
- Result := not (csDesigning in ComponentState);
-end;
-
-function TpsvCustomPHP.GetThreadSafeResourceManager: pointer;
-begin
- Result := TSRMLS_D;
-end;
-
-function TpsvCustomPHP.GetVariableCount: integer;
-begin
- Result := FVariables.Count;
-end;
-
-function TpsvCustomPHP.GetConstantCount: integer;
-begin
- Result := FConstants.Count;
-end;
-
-procedure TpsvCustomPHP.RegisterConstants;
-var
- cnt : integer;
-begin
- for cnt := 0 to FConstants.Count - 1 do
- begin
- zend_register_string_constant(PChar(FConstants[cnt].Name),
- strlen(PChar(FConstants[cnt].Name)) + 1,
- PChar(FConstants[cnt].Value), CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
- end;
-
- RegisterInternalConstants(TSRMLS_D);
-end;
-
-procedure TpsvCustomPHP.PrepareVariables(TSRMLS_D: pointer);
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
-begin
- {$IFDEF PHP4}
- ht := GetSymbolsTable(TSRMLS_D);
- {$ELSE}
- ht := @GetExecutorGlobals(TSRMLS_D).symbol_table;
- {$ENDIF}
- if Assigned(ht) then
- begin
- for cnt := 0 to FVariables.Count - 1 do
- begin
- new(data);
- try
- if zend_hash_find(ht, PChar(FVariables[cnt].Name),
- strlen(PChar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
- begin
- if (data^^^._type = IS_STRING) then
- begin
- efree(data^^^.value.str.val);
- ZVAL_STRING(data^^, PChar(FVariables[cnt].Value), true);
- end
- else
- begin
- ZVAL_STRING(data^^, PChar(FVariables[cnt].Value), true);
- end;
- end;
- finally
- freemem(data);
- end;
- end;
- end;
-end;
-
-procedure TpsvCustomPHP.CloseVirtualFile;
-begin
- if FVirtualReadHandle <> 0 then
- Close(FVirtualReadHandle);
-end;
-
-function TpsvCustomPHP.CreateVirtualFile(ACode : string): boolean;
-var
- _handles : array[0..1] of THandle;
-begin
- Result := false;
- if ACode = '' then
- Exit; //empty buffer was provided
-
- if pipe(@_handles, Length(ACode) + 512, 0) = -1 then
- Exit;
-
- FVirtualReadHandle := _handles[0];
- FVirtualWriteHandle := _handles[1];
- _write(FVirtualWriteHandle, @ACode[1], Length(ACode));
- close(_handles[1]);
-
- Result := true;
-end;
-
-procedure TpsvCustomPHP.StartupPHP;
-var
- DLLName : string;
-begin
- if not PHPLoaded then
- begin
- if FDLLFolder <> '' then
- begin
- {$IFDEF PHP5}
- DLLName := IncludeTrailingBackslash(FDLLFolder) + 'php5ts.dll';
- {$ELSE}
- DLLName := IncludeTrailingBackslash(FDLLFolder) + 'php4ts.dll';
- {$ENDIF}
- LoadPHP(DLLName);
- end
- else
- {$IFDEF PHP5}
- DLLName := 'php5ts.dll';
- {$ELSE}
- DLLName := 'php4ts.dll';
- {$ENDIF}
- LoadPHP;
- if FReportDLLError then
- begin
- if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllName]);
- end;
- end;
-end;
-
-end.
-
-
diff --git a/phpCustomLibrary.pas b/phpCustomLibrary.pas
deleted file mode 100644
index 4e51716..0000000
--- a/phpCustomLibrary.pas
+++ /dev/null
@@ -1,196 +0,0 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Author: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{*******************************************************}
-{$I PHP.INC}
-
-{ $Id: phpCustomLibrary.pas,v 6.2 02/2006 delphi32 Exp $ }
-
-unit PHPCustomLibrary;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- PHPCommon,
- ZendTypes, PHPTypes, PHPAPI, ZENDAPI, php4Delphi, phpFunctions;
-
-type
-
- TCustomPHPLibrary = class(TPHPComponent)
- private
- FExecutor : TpsvCustomPHP;
- FLibraryName : string;
- FFunctions : TPHPFunctions;
- FActiveFunctionName : string;
- module_entry_table : array of zend_function_entry;
- procedure SetFunctions(const Value : TPHPFunctions);
- procedure SetExecutor(AValue : TpsvCustomPHP);
- procedure SetLibraryName(AValue : string);
- protected
- php_delphi_module : Tzend_module_entry;
- procedure Notification(AComponent: TComponent; Operation: TOperation); override;
- procedure RegisterLibrary; virtual;
- procedure UnregisterLibrary; virtual;
- procedure Loaded; override;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- procedure Refresh; virtual;
- property LibraryEntry : Tzend_module_entry read php_delphi_module;
- property Executor : TpsvCustomPHP read FExecutor write SetExecutor;
- property LibraryName : string read FLibraryName write SetLibraryName;
- property Functions : TPHPFunctions read FFunctions write SetFunctions;
- property ActiveFunctionName: string read FActiveFunctionName write FActiveFunctionName;
- published
- end;
-
-
-implementation
-
-{$IFDEF PHP510}
-procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- php : TpsvCustomPHP;
- gl : psapi_globals_struct;
- p : pointer;
-begin
- ZVAL_NULL(return_value);
- p := ts_resource_ex(0, nil);
- gl := GetSAPIGlobals(p);
- php := TpsvPHP(gl^.server_context);
- if Assigned(php) then
- begin
- try
- {$IFNDEF PHP510}
- IPHPLibrary(php).HandleRequest(ht, return_value, this_ptr, return_value_used, TSRMLS_DC);
- {$ELSE}
- IPHPLibrary(php).HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
- {$ENDIF}
- except
- ZVAL_NULL(return_value);
- end;
- end;
-end;
-
-{ TCustomPHPLibrary }
-
-constructor TCustomPHPLibrary.Create(AOwner: TComponent);
-begin
- inherited;
- FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
- php_delphi_module.size := sizeOf(Tzend_module_entry);
- php_delphi_module.zend_api := ZEND_MODULE_API_NO;
- php_delphi_module.zend_debug := 0;
- php_delphi_module.zts := USING_ZTS;
- php_delphi_module.name := PChar(FLibraryName);
- php_delphi_module.functions := nil;
- php_delphi_module.module_startup_func := nil;
- php_delphi_module.module_shutdown_func := nil;
- php_delphi_module.info_func := nil;
- php_delphi_module.version := '6.2';
- {$IFDEF PHP4}
- php_delphi_module.global_startup_func := nil;
- {$ENDIF}
- php_delphi_module.request_shutdown_func := nil;
- php_delphi_module.global_id := 0;
- php_delphi_module.module_started := 0;
- php_delphi_module._type := 1;
- php_delphi_module.handle := nil;
- php_delphi_module.module_number := 0;
-end;
-
-destructor TCustomPHPLibrary.Destroy;
-begin
- UnregisterLibrary;
- FFunctions.Free;
- inherited;
-end;
-
-
-procedure TCustomPHPLibrary.Loaded;
-begin
- inherited;
- UnregisterLibrary;
- RegisterLibrary;
-end;
-
-procedure TCustomPHPLibrary.Notification(AComponent: TComponent;
- Operation: TOperation);
-begin
- inherited Notification(AComponent, Operation);
- if (Operation = opRemove) and (AComponent = FExecutor) then
- FExecutor := nil;
-end;
-
-procedure TCustomPHPLibrary.Refresh;
-var
- cnt : integer;
-begin
- SetLength(module_entry_table, FFunctions.Count + 1);
- for cnt := 0 to FFunctions.Count - 1 do
- begin
- module_entry_table[cnt].fname := PChar(FFunctions[cnt].FunctionName);
- module_entry_table[cnt].handler := @DispatchRequest;
- {$IFDEF PHP4}
- module_entry_table[cnt].func_arg_types := nil;
- {$ENDIF}
- end;
- module_entry_table[FFunctions.Count].fname := nil;
- module_entry_table[FFunctions.Count].handler := nil;
- {$IFDEF PHP4}
- module_entry_table[FFunctions.Count].func_arg_types := nil;
- {$ENDIF}
-
- php_delphi_module.functions := @module_entry_table[0];
-end;
-
-procedure TCustomPHPLibrary.RegisterLibrary;
-begin
- if Assigned(FExecutor) then
- IPHPLibrary(FExecutor).AddModule(Self);
-end;
-
-procedure TCustomPHPLibrary.SetExecutor(AValue: TpsvCustomPHP);
-begin
- if FExecutor <> AValue then
- begin
- if Assigned(FExecutor) then
- UnregisterLibrary;
- FExecutor := AValue; //Peter Enz
- if AValue <> nil then
- begin
- Avalue.FreeNotification(Self);
- RegisterLibrary;
- end;
- end;
-end;
-
-procedure TCustomPHPLibrary.SetFunctions(const Value: TPHPFunctions);
-begin
- FFunctions.Assign(Value);
-end;
-
-procedure TCustomPHPLibrary.SetLibraryName(AValue: string);
-begin
- FLibraryName := AValue;
- php_delphi_module.name := PChar(FLibraryName);
-end;
-
-procedure TCustomPHPLibrary.UnregisterLibrary;
-begin
- if Assigned(Executor) then
- IPHPLibrary(FExecutor).RemoveModule(Self);
-end;
-
-end.
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index f461302..0000000
--- a/readme.txt
+++ /dev/null
@@ -1,365 +0,0 @@
- PHP4Delphi library
-PHP - Delphi interface and PHP extensions development framework
-
-{ $Id: readme.txt,v 6.2 02/2006 delphi32 Exp $ }
-
-PHP4Delphi is a Delphi interface to PHP for Delphi 5, 6, 7, Delphi 2005 and Delphi 2006.
-
-PHP4Delphi consists of 3 big subprojects:
-
-1. PHP scripting (using php as a scripting language in Delphi applications)
-PHP4Delphi allows to execute the PHP scripts within the Delphi program using
-TpsvPHP component directly without a WebServer. TpsvPHP is not a component for
-server-side development. It is a scripting for applications (like VBA for Office).
-It is a PHP extension that enables you to write client-side GUI applications.
-One of the goals behind it was to prove that PHP is a capable general-purpose scripting
-language that is suited for more than just Web applications. It is intended for
-creating standalone GUI applications. If you want to use PHP within your application
-you can use Indy idHTTPServer component and idISAPIRunner + PHP4ISAPI or
-idCGIRunner + php.exe. You will have exactly the same results as using IIS or Apache.
-With php4Delphi you can use delphi forms instead of web-forms, pass parameters to
-script directly, without using GET and POST methods.
-
-2. PHP extensions development framework (using Delphi to extend PHP functionality)
-Visual Development Framework gives possibility to create custom PHP
-Extensions using Delphi.
-PHP extension, in the most basic of terms, is a set of instructions that is
-designed to add functionality to PHP.
-
-3. PHP4Applications (integrate PHP in any application)
-Supports C, C++, Visual Basic, VBA, C#, Delphi, Delphi .NET, Visual Basic .NET etc.
-
-
-More detail information available in php4Delphi manual php4Delphi.pdf
-
-
-This is a source-only release of php4Delphi. It includes
-designtime and runtime packages for Delphi 5 through Delphi 2006.
-
-Warning:
-
-PHP 4.3.5 gives some memory management troubles with php4delphi
-This problem is fixed in PHP 4.3.6
-
-History:
-
-6.2
-
-* Compatible with Delphi 2006
-* Compatible with PHP 5.1.1
-* Compatible with PHP 5.1.2
-* Code reorganized, some crap was removed
-* Added headers support (Michael Maroszek)
-* New demo projects
-* PHP4Applications revisited
-
-6.1
-
-* Compatible with PHP 5.0.4
-* Compatible with PHP 5.1.0b3
-* Compatible with Delphi 2005
-
-6.0
-
-* Translated Zend II API
-* New PHP Object Model support
-* PHP classes support for PHP4 and PHP5
-* New demo projects
-* TPHPClass component compatible with PHP4 and PHP5
-* Added new property DLLFolder to psvPHP component
-* New component PHPSystemLibrary
-
-5.5 fix 1
-
-* New property RegisterGlobals (boolean) added to psvPHP component
-* New property MaxExecutionTime (integer) added to psvPHP component - Maximum execution time of each script, in seconds
-* New property MaxInputTime (integer) added to psvPHP component - Maximum amount of time each script may spend parsing request data
-* New property SafeMode (boolean) added to psvPHP component
-* New property SafeModeGid (boolean) added to psvPHP component - When safe_mode is on, UID/GID checks are bypassed when
- including files from this directory and its subdirectories. (directory must also be in include_path or full path must
- be used when including)
-* Memory leak fixed in phpModules unit
-* php_class demo project errors fixed
-* psvPHP can load now PHP modules using dl() function
-
-5.5
-
-* New component TPHPClass added (only for PHP 4)
-* Added support of PHP 5
-* Improved speed of unloading of the PHP extensions under Apache
-* Decreased size of the compiled modules (based on API only and developed using Visual FrameWork)
-* ZendAPI unit is splitted to ZendAPI and ZendTypes units
-* PHPAPI unit is splitted to PHPAPI and PHPTypes units
-* New version of php4App - php4Applications subproject.
- php4Applications allows to use php scripts in VB, C, C++, etc applications.
- Demo projects for Delphi, VC and MS Word included.
-* New property UseDelimiters added to TpsvPHP component. If UseDelimiters = true (by default) the
- syntax of RunCode method parameter ACode should include standard script delimiters "" and "?>"
- to make RunCode and Execute method compatible.
-* New parameters for OnScriptError event (error type, file name and line number)
-
-5.4
-
-* Minor bugs fixed
-* Documentation improved
-* New property IniPath (folder where php.ini located) added to TpsvPHP component
-* New functions translated in ZendAPI unit
-
-5.3
-* Added new public property ExecuteMethod to psvPHP component.
- if ExecuteMethod is emGet, psvPHP receives variables as $_GET["variable"],
- if ExecuteMethod is emServer (default), psvPHP receives variables as $variable.
- Can be used to debug real PHP scripts with GET parameters.
-* Added possibility to access published property of Delphi components from PHP
-* Fixed problem with loading of PHP extension compiled wihout PHP4DELPHI_AUTOLOAD
- option.
-
-5.2
-* Added dynamic attachement of all exported functions from php4ts.dll
- in PHPAPI.pas
-* New function for safe dynamic functions linking PHPStubInit and ZendStubInit
- This functions can be used if you are planning to work with beta-version of PHP,
- for example
-* New unit zend_dynamic_array.pas
-* New unit logos.pas
-
-5.0.3
-* Fixed bug when php function without parameters does not return value.
-* New classes: TZendVariable and TZendValue in phpFunctions.pas
-* New subproject: php4App
- Using php4App you can integrate PHP not only with Delphi, but with VB, for example
-
-5.0.2
-* Fixed problem with assembler code in ZENDAPI.pas for Delphi 7
-
-5.0.1
-* Fixed problem with number of parameters of zend_getparameters_ex function
-
-
-
-
-Before using php4Delphi library:
-
-If you have no PHP installed, you have to download and
-install PHP separately. It is not included in the package.
-You can download the latest version of PHP from
-http://www.php.net/downloads.php
-
-ZEND API documentation available at http://www.zend.com
-PHP API documentation available at http://www.php.net
-
-You need to ensure that the dlls which php uses can be found.
-php4ts.dll is always used. If you are using any php extension dlls then you
-will need those as well.
-To make sure that the dlls can be found, you can either copy them to the
-system directory (e.g. winnt/system32 or windows/system).
-
-Copy the file, php.ini-dist to your %WINDOWS% directory on
-Windows 95/98 or to your %SYSTEMROOT% directory under Windows NT,
-Windows 2000 or Windows XP and rename it to php.ini. Your %WINDOWS% or
-%SYSTEMROOT% directory is typically:
-c:\windows for Windows 95/98
-c:\winnt or c:\winnt40 for NT/2000/XP servers
-
-How to install php4Delphi library:
-
-1. Delphi 5.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 5 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR5.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR5.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD5.dpk.
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-2. Delphi 6.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 6 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR6.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR6.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD6.dpk.
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-3. Delphi 7.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 7 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR7.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR7.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD7.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-4. Delphi 2005:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 2005 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR2005.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR2005.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD2005.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-
-5. Delphi 2006:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 2006 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR2006.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR2006.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD2006.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-Since this is a freeware you are strongly encouraged to look
-at the source code and improve on the components if you want to.
-Of course I would appreciate it if you would send me back the
-changes and bug fixes you have made.
-
-For more information on the PHP Group and the PHP project,
-please see .
-
-
-
-Author:
-Serhiy Perevoznyk
-Belgium
-
-
-
diff --git a/versions.md b/versions.md
new file mode 100644
index 0000000..9af88d4
--- /dev/null
+++ b/versions.md
@@ -0,0 +1,141 @@
+## 7.5-rc1
+* Some of the ZVAL_*Type procedures moved:
+ ZVAL_*Type -> ZVALVAL( z: pzval, what: Type )
+* Major bug fixes (AV, Range Checking, NullPointer, php executing order, etc.)
+* Introduced metatypes, so the types can be used regardless of Delphi version (x64/32, dcc version, other)
+* Replaced assembler calls with pointer math
+* Added procedures: HFunc - hook library function LFunc - load library function
+
+## 7.4 Mar 2019
+
+* Compatible with PHP 5.5.0
+* Compatible with PHP 5.6.0
+* Compatible with PHP 5.6.x
+* Compatible with Delphi 2011, XE8, Seattle, Berlin
+* Added unicode support
+
+## 7.3 Jan 2019
+
+* Compatible with PHP 5.4.0
+* Removed PHP 4 support
+
+## 7.2 Oct 2009
+
+* Compatible with Delphi 2010
+* Compatible with PHP 5.2.11
+* Compatible with PHP 5.3.0 (VC6 and VC9 editions : see PHP.INC for more details)
+
+## 7.1 Oct 2008
+
+* Compatible with Delphi 2009
+
+## 7.0 Apr 2007
+
+* Compatible with Delphi 2007
+* Compatible with PHP 5.2.1
+* Compatible with PHP 4.4.6
+* Thread safe TpsvPHP component
+* New component TPHPEngine introduced
+* RunCode method reimplemented to solve "black horror" of pipes.
+* Not fully compatible with previous version due to multithreading, but migration is easy.
+
+## 6.2 Feb 2006
+
+* Compatible with PHP 5.2.0
+* Compatible with Delphi 2006
+* Compatible with PHP 5.1.1
+* Compatible with PHP 5.1.2
+* Code reorganized, some crap was removed
+* Added headers support (Michael Maroszek)
+* New demo projects
+* PHP4Applications revisited
+
+## 6.1
+
+* Compatible with PHP 5.0.4
+* Compatible with PHP 5.1.0b3
+* Compatible with Delphi 2005
+
+## 6.0
+
+* Translated Zend II API
+* New PHP Object Model support
+* PHP classes support for PHP4 and PHP5
+* New demo projects
+* TPHPClass component compatible with PHP4 and PHP5
+* Added new property DLLFolder to psvPHP component
+* New component PHPSystemLibrary
+
+## 5.5 fix 1
+
+* New property RegisterGlobals (boolean) added to psvPHP component
+* New property MaxExecutionTime (integer) added to psvPHP component - Maximum execution time of each script, in seconds
+* New property MaxInputTime (integer) added to psvPHP component - Maximum amount of time each script may spend parsing request data
+* New property SafeMode (boolean) added to psvPHP component
+* New property SafeModeGid (boolean) added to psvPHP component - When safe_mode is on, UID/GID checks are bypassed when
+ including files from this directory and its subdirectories. (directory must also be in include_path or full path must
+ be used when including)
+* Memory leak fixed in phpModules unit
+* php_class demo project errors fixed
+* psvPHP can load now PHP modules using dl() function
+
+## 5.5
+
+* New component TPHPClass added (only for PHP 4)
+* Added support of PHP 5
+* Improved speed of unloading of the PHP extensions under Apache
+* Decreased size of the compiled modules (based on API only and developed using Visual FrameWork)
+* ZendAPI unit is splitted to ZendAPI and ZendTypes units
+* PHPAPI unit is splitted to PHPAPI and PHPTypes units
+* New version of php4App - php4Applications subproject.
+ php4Applications allows to use php scripts in VB, C, C++, etc applications.
+ Demo projects for Delphi, VC and MS Word included.
+* New property UseDelimiters added to TpsvPHP component. If UseDelimiters = true (by default) the
+ syntax of RunCode method parameter ACode should include standard script delimiters "" and "?>"
+ to make RunCode and Execute method compatible.
+* New parameters for OnScriptError event (error type, file name and line number)
+
+## 5.4
+
+* Minor bugs fixed
+* Documentation improved
+* New property IniPath (folder where php.ini located) added to TpsvPHP component
+* New functions translated in ZendAPI unit
+
+## 5.3
+* Added new public property ExecuteMethod to psvPHP component.
+ if ExecuteMethod is emGet, psvPHP receives variables as $_GET["variable"],
+ if ExecuteMethod is emServer (default), psvPHP receives variables as $variable.
+ Can be used to debug real PHP scripts with GET parameters.
+* Added possibility to access published property of Delphi components from PHP
+* Fixed problem with loading of PHP extension compiled wihout PHP4DELPHI_AUTOLOAD
+ option.
+
+## 5.2
+* Added dynamic attachement of all exported functions from php4ts.dll
+ in PHPAPI.pas
+* New function for safe dynamic functions linking PHPStubInit and ZendStubInit
+ This functions can be used if you are planning to work with beta-version of PHP,
+ for example
+* New unit zend_dynamic_array.pas
+* New unit logos.pas
+
+## 5.0.3
+* Fixed bug when php function without parameters does not return value.
+* New classes: TZendVariable and TZendValue in phpFunctions.pas
+* New subproject: php4App
+ Using php4App you can integrate PHP not only with Delphi, but with VB, for example
+
+## 5.0.2
+* Fixed problem with assembler code in ZENDAPI.pas for Delphi 7
+
+## 5.0.1
+* Fixed problem with number of parameters of zend_getparameters_ex function
+
+## 5.0
+* First version written in Delphi
+
+
+## 1.0 - 4.0
+* php4Delphi was written in C as a DLL with simple Delphi wrapper
+