par oguruma » 11 Fév 2004 à 08:36
si ça peut t'aider...Remote_User and Remote_Ident CGI Variables do not Return Values in DominoProblem:You have a CGI script that uses Remote_User and Remote_Ident variables; however, these variable are returning blank values.Solution:This issue was reported to Lotus Quality Engineering and has been addressed in Domino 5.0. As of release 4.6.x, Domino does not officially support the file system for access control. When executing a CGI script, you are accessing a file on the file system and the username that you supplied to Domino is not applicable in this context.The CGI variable Remote_User returns a blank value when using Domino R5 for Microsoft IIS. The blank value occurs if you are using Anonymous Access authentication in IIS. Instead, use either Basic Authentication or NT Challenge/Response.Supporting Information:Install the CGITest.HTM and CGITest.EXE on a Domino Server as instructed in document number 2650 "CGITEST -- Sample CGI Program For Use with Domino" (referenced below). Set the Domino Server to require a Name and Password. Try the CGITest.HTM and you will notice that the output for Remote_User and Remote_Ident is blank.The following is an output from Netscape 4.04 NA 128-Bit Encrypt when the CGITest.HTM and CGITest.EXE was run. Notice that the Remote_User and Remote_Ident does not return any information.Results of CGITEST...Display Fields:=================:SelectField = Lotus+Development+CorporationMultiSelectField = FebruaryMultiSelectField = MayColor = redYear2 = onYear3 = onYear4 = ontextline = Type+some+text+in+here.textarea = A+quick+movement+of+the+enemy+will+jeopardize+six+gunboats. Type+in multiple+rows of+text+here. Command Line Args:=================:Number of arguments (argc) = 1argv[0] = cgitest.exeEnvironment variables:=====================:ComSpec=C:\WINNT\system32\cmd.exeNOTESNTSERVICE=1NUMBER_OF_PROCESSORS=1OS=Windows_NTOs2LibPath=C:\WINNT\system32\os2\dll;Path=C:\WINNT\system32;C:\WINNT;C:\Lotus\Notes;C:\Lotus\Notes\DataPROCESSOR_ARCHITECTURE=x86PROCESSOR_IDENTIFIER=x86 Family 5 Model 1 Stepping 5, GenuineIntelPROCESSOR_LEVEL=5PROCESSOR_REVISION=0105SystemDrive=C:SystemRoot=C:\WINNTUSERPROFILE=C:\WINNT\Profiles\Default Userwindir=C:\WINNTSERVER_ROOT=c:/lotus/notes/dataSERVER_SOFTWARE=Lotus-Domino/4.5SERVER_NAME=9.95.228.130SERVER_PORT=80HWND_FRAME=5261226RULE_FILE=c:\lotus\notes\data\domino.cnfSERVER_PROTOCOL=HTTP/1.0REQUEST_METHOD=POSTGATEWAY_INTERFACE=CGI/1.1PATH_INFO=PATH_TRANSLATED=QUERY_STRING=SERVER_ADDR=9.95.228.130SCRIPT_NAME=/cgi-bin/cgitest.exeREMOTE_HOST=VCHAUREMOTE_ADDR=9.95.229.87AUTH_TYPE=REMOTE_USER=REMOTE_IDENT=CONTENT_TYPE=application/x-www-form-urlencodedCONTENT_LENGTH=284REFERER_URL=https://9.95.228.130/cgitest.htmHTTPS_KEYSIZE=Export [40]HTTPS=ONSHTTP_AUTH_USER=SHTTP_HEADER_DATA=SHTTP_NONCE_ECHO=SHTTP_PROCESS=SHTTP_SIGNER=SHTTP_SIGNER_CERT_CHAIN=SHTTP_SIGNER_CERT_CHAIN_LEN=0SHTTP_VERSION=HTTP_AUTHORIZATION=Basic QXBwbGUgSmFja3M6cGFzc3dvcmQ=HTTP_ACCEPT_CHARSET=iso-8859-1,*,utf-8HTTP_ACCEPT_LANGUAGE=enHTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*HTTP_HOST=9.95.228.130HTTP_USER_AGENT=Mozilla/4.04 [en] (Win95; U ;Nav)HTTP_CONNECTION=Keep-AliveHTTP_REFERER=https://9.95.228.130/cgitest.htmRelated Documents:CGITEST -- Sample CGI Program For Use with DominoDocument #: 2650 How to Use the CGI Variable HTTP_Referer to Create a "Back" LinkProblem:How can you use the CGI variable HTTP_Referer on a Notes form to create a "Back" button or hot spot?Solution:To use the CGI variable HTTP_Referer on a Notes form to create a "Back" button or hot spot, follow these steps:1. Create a Computed for Display, Text Field called HTTP_Referer with a null value [""] for the formula. Set a Hide When formula for the field to hide the field if the formula is true and add a formula of @True.2. Create another Computed for Display, Text Field (that is not hidden) with the following formula:"[<a href="+http_referer+">Go Back</a>]"The quotes are needed since this is a string concatenation formula. The key to this issue is using Computed for Display fields. If the HTTP_Referer field is just a Computed field, then the computed value is saved in the document, and, when opened in read mode, the Computed field is not recalculated as they are in Computed for Display fields. Computed fields are recalculated only when the document is saved or submitted.Using Computed for Display fields may help with other CGI variables that you need to be dynamic in read mode. But, Computed for Display fields are not saved with Notes documents.This method will make HTTP_Refer always contain the previous URL.Supporting Information:HTTP_Referer with $$Return Incorrectly Returns Empty Form After you Submit Completed FormProblem:You have a form that, when submitted from the web, is supposed to bring you back to the URL you were in before you composed the form. However, when you use HTTP_Referer in conjunction with a $$Return field to achive this, you are returned to the empty version of the form that you just submitted instead of the previous URL. Is there a way to use HTTP_Referer with $$Return to bring you back to the URL that was in use before the form was composed instead of the empty form?For example, you have an action at the top of a view that composes new documents. When you submit the document, instead of incorrectly returning the user to an empty version of the form, you want to return the user back to the view.Solution:HTTP_Referer can be used in conjunction with $$Return to bring the user back the starting URL as opposed to an empty version of the form. First though, it helps to understand why HTTP_Referer working in conjunction with $$Return brings you back to the empty form. When you compose a form from a view on the web, HTTP_Referer points to the URL for the view you were just in. For example, you start at a view and use the following URL to compose a new form:Host/database.nsf/FormName?OpenFormWhen the form displays, HTTP_Referer points to the URL of the view that you were just in. But, when you submit that form, the following new URL is generated to submit the form to the server:Host/database.nsf/FormName?CreateDocumentAs the new URL is generated, HTTP_Referer is updated to point to the URL that was used to create the empty form (HTTP_Referer always points to the previous URL). If $$Return uses this version of HTTP_Referer, then you are returned to the empty version of the form.Using the following method, you can create a $$Return field that will bring the user back to where they were before composing the form. This method works for both new documents and when editing existing documents.1. Create a Text field called HTTP_Referer that is computed for display with a null value [""] for the formula. Set the hide when formula for this field to hide the paragraph when the formula is true and add a formula of @True.2. Create another Text field called My_Referer (the actual name is not important) that is editable. Set the hide when formula to be hidden when reading and enter the following pass through HTML in the field's HTML Attributes event: "[<type=\"hidden\">]" In Notes 4.5x, enter this pass through HTML in the Help description on the Options tab of the Field Properties dialog box.3. Set the default value formula for the second field, My_Referer in our example, to be HTTP_Referer. 4. Create a $$Return field with the same field properties as the My_Referer field: Text, editable, hidden in read mode with HTML pass through of [<type = "hidden">] in the field's HTML Attributes event.5. Enter the following Input Translation formula for the $$Return field: @If(@IsNewDoc;"["+My_referer+"]";"["+@LeftBack(HTTP_Referer;"/")+"?openview]") This Input Translation formula takes into account the following two conditions:1. When composing a new document, return the user to the view URL which is in the My_Referer field.2. When editing an existing document, return the user to the view URL which is in the HTTP_Referer field. @LeftBack is used because HTTP_Referer points to the document in read mode and you cannot open a document into edit mode from a view.Note: The following caveats apply to this solution:- This solution was tested using links from inside the same .NSF file.- The documents where composed from view actions and triggered from a form sub
Bien à vous
http://www.dominoarea.org/oguruma/
Les téléphones PORTABLES dans les TGV y en a MARRRE de ces voyageurs qui ne respectent pas les autres ! ARRET DES PORTABLES SVP - Merci
Fumeurs ! respectez les non fumeurs !!!
Fumeurs ! respectez la loi de février 2007 et les lieux publics !!! (ie. hall de gares)