Rev 12 | Rev 19 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12 | Rev 16 | ||
---|---|---|---|
Line 96... | Line 96... | ||
96 | begin |
96 | begin |
97 | Result := INET_E_DEFAULT_ACTION; |
97 | Result := INET_E_DEFAULT_ACTION; |
98 | end; |
98 | end; |
99 | function TEmbeddedSecurityManager.MapUrlToZone(pwszUrl: LPCWSTR; out dwZone: DWORD; dwFlags: DWORD): HResult; |
99 | function TEmbeddedSecurityManager.MapUrlToZone(pwszUrl: LPCWSTR; out dwZone: DWORD; dwFlags: DWORD): HResult; |
100 | begin |
100 | begin |
101 | dwZone := URLZONE_INTERNET; |
101 | dwZone := URLZONE_TRUSTED; |
102 | Result := S_OK; |
102 | Result := S_OK; |
103 | end; |
103 | end; |
104 | 104 | ||
105 | function TForm2.EmbeddedWBQueryService(const rsid, iid: TGUID; out Obj{: IInterface}): HRESULT; |
105 | function TForm2.EmbeddedWBQueryService(const rsid, iid: TGUID; out Obj{: IInterface}): HRESULT; |
106 | var |
106 | var |
Line 148... | Line 148... | ||
148 | 148 | ||
149 | procedure TForm2.WebBrowser1BeforeNavigate2(ASender: TObject; |
149 | procedure TForm2.WebBrowser1BeforeNavigate2(ASender: TObject; |
150 | const pDisp: IDispatch; const URL, Flags, TargetFrameName, PostData, |
150 | const pDisp: IDispatch; const URL, Flags, TargetFrameName, PostData, |
151 | Headers: OleVariant; var Cancel: WordBool); |
151 | Headers: OleVariant; var Cancel: WordBool); |
152 | var |
152 | var |
153 | myURL, getData: string; |
153 | myURL, myUrl2, getData: string; |
154 | p: integer; |
154 | p: integer; |
155 | background: boolean; |
155 | background: boolean; |
156 | ArgGet, ArgPost, ArgHeader: string; |
156 | ArgGet, ArgPost, ArgHeader: string; |
157 | begin |
157 | begin |
158 | background := Pos('background|', URL) >= 1; |
158 | background := Pos('background|', URL) >= 1; |
Line 183... | Line 183... | ||
183 | else |
183 | else |
184 | begin |
184 | begin |
185 | getData := ''; |
185 | getData := ''; |
186 | end; |
186 | end; |
187 | 187 | ||
- | 188 | myURL := StringReplace(myURL, 'http://wa.viathinksoft.de', '', []); |
|
- | 189 | ||
188 | myURL := StringReplace(myURL, 'file:///', '', []); |
190 | myURL := StringReplace(myURL, 'file:///', '', []); |
189 | myURL := StringReplace(myURL, '/', '\', [rfReplaceAll]); |
191 | myURL := StringReplace(myURL, '/', '\', [rfReplaceAll]); |
190 | 192 | ||
191 | // TODO: real myURL urldecode |
193 | // TODO: real myURL urldecode |
192 | myURL := StringReplace(myURL, '+', ' ', []); |
194 | myURL := StringReplace(myURL, '+', ' ', []); |
Line 211... | Line 213... | ||
211 | begin |
213 | begin |
212 | // TODO: somehow prepend fastphp_server.inc.php (populates the $_GET and $_POST arrays) |
214 | // TODO: somehow prepend fastphp_server.inc.php (populates the $_GET and $_POST arrays) |
213 | // TODO: is there a maximal length for the command line? |
215 | // TODO: is there a maximal length for the command line? |
214 | ArgGet := MyVarToStr(getData); |
216 | ArgGet := MyVarToStr(getData); |
215 | ArgPost := MyVarToStr(PostData); |
217 | ArgPost := MyVarToStr(PostData); |
- | 218 | ||
- | 219 | myUrl2 := myUrl; |
|
- | 220 | myUrl2 := StringReplace(myUrl2, '\', '/', [rfReplaceAll]); |
|
- | 221 | // TODO: real myURL urlencode |
|
- | 222 | myUrl2 := StringReplace(myUrl2, '%', '%%', []); |
|
- | 223 | //myUrl2 := StringReplace(myUrl2, ' ', '%20', []); |
|
- | 224 | myUrl2 := StringReplace(myUrl2, ' ', '+', []); |
|
- | 225 | myUrl2 := 'http://wa.viathinksoft.de/' + myUrl2; |
|
- | 226 | ||
- | 227 | showmessage(myUrl2); |
|
216 | WebBrowser1.LoadHTML(GetDosOutput('"'+GetPHPExe+'" "'+myURL+'" "'+ArgGet+'" "'+ArgPost+'" "'+ArgHeader+'"', ExtractFileDir(Application.ExeName)), myUrl); |
228 | WebBrowser1.LoadHTML(GetDosOutput('"'+GetPHPExe+'" "'+myURL+'" "'+ArgGet+'" "'+ArgPost+'" "'+ArgHeader+'"', ExtractFileDir(Application.ExeName)), myUrl2); |
217 | end; |
229 | end; |
218 | Cancel := true; |
230 | Cancel := true; |
219 | end; |
231 | end; |
220 | end; |
232 | end; |
221 | {$ENDREGION} |
233 | {$ENDREGION} |