Promotic
WikipediaLinkedInYoutubeTwitterFacebook

onNewRequest - event of object PmWeb

Description:
The event fires on the request for each new Web page (the document of the HTML, XML, BMP, etc. type). The event fires before creating and sending the document into the Web client. In this event it is possible to get all required information about the request and to affect if the required page is really sent.

But the event is obsolete and it is better to perform the test of the client's access rights by the "Permissions" page of the appropriate objects.

Parameters:
pMe(Object) Reference to the Promotic object where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.
pEvent.HostName - (String) Name of the logged on user in the WWW browser (client). If the user isn't logged on, the string is empty.
pEvent.HostPwd - (String) Password of the logged on user in the WWW browser (client). If the user isn't logged on, the string is empty.
pEvent.HostAddr - (String) Nework address of the client computer - the WWW browser
pEvent.ComponentId - (String) Identifier of the Web component from which the page is requested. This text is always converted to lower case.
pEvent.PageAddr - (String) Address of the requested page on the Web component (e.g. "default.htm"). This text is always converted to lower case.
pEvent.TypeEnable - (Long) It enables to set the type of sending the page to the client. The designer can (according to the user setting, password or the computer address) disable the operation. Setting this parameter is recommended only for special cases. Common security setting is better to be done by standard means of the permissions: WebRead. See also PmWebDir.onPageLoad, PmObject-Cfg.Methods.
1 (default) - enabling operation.
-1 - required log-on of the user (if the user hasn't been set) or disabling the user (if the user has been set but the name and password are wrong).
-2 - disabling operation for the client unconditionally.
Example:
If pEvent.HostAddr <> "192.168.0.24" And pEvent.HostAddr <> "192.168.0.26" Then
ElseIf pEvent.HostName <> "admin" Or pEvent.HostPwd <> "Pokemon" Then
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice