Call/open web "FORM" from within OI subroutine. (OpenInsight Specific)
At 25 JAN 2001 09:19:57AM Steve Carlson wrote:
I need to be able to open an internet/OI form from within an OI
stored procedure.
I would normally call the form from the internet as:
http://999.999.99.9/cgi-bin/oicgi.exe/INET_FORMLOAD?FORM_ID=form_name
.
I have an OI sp that does some security/audit trail work and then
accordingly will either allow or disallow access to the above form.
If it allows access.. how/what code, would I use to open the
above form from within OI.
Thanks
Steve C.
At 25 JAN 2001 09:38AM Oystein Reigem wrote:
Steve,
Perhaps you can do the following:
Put your security programming in the Inet_Security procedure. Something like
- What kind of Inet call was that? Was it an Inet_Formload for that form we don't always want to show?
- In that case: Do the security considerations.
- If after considering security the user can't be allowed access: Abort processing by returning an error message. Else return nothing and default processing will continue.
- Oystein -
At 25 JAN 2001 09:50AM Donald Bakke wrote:
Steve,
Just read the HTML contents of this form and pass it back as your return variable. We do this all the time. Our security module will also add a hidden prompt to all of our HTML forms on-the-fly identifying the person who logged in.
dbakke@srpcs.com
At 25 JAN 2001 09:53AM Steve Carlson wrote:
Oystein
I understand that… but once I do that I need to open the form by
a "call" from within the OI subroutine.
http://999.999.99.9/cgi-bin/oicgi.exe/INET_FORMLOAD?FORM_ID=form_name
Should I maybe "READ" the "DOS" ".htm" file and pass it back through
the inet_gateway to the browser??
TIA
Steve C.
At 25 JAN 2001 09:59AM Don Miller - C3 Inc. wrote:
Don ..
Like your new logo. Cheers..
Don Miller
At 26 JAN 2001 05:01AM Oystein Reigem wrote:
Steve,
I understand that… but once I do that I need to open the form by a "call" from within the OI subroutine.
No.
I can get this to work with Inet_Security. Here's what I tried just now:
As a preparation for the real test I first did a simple request
http://999.999.99.9/cgi-bin/oicgi.exe/INET_FORMLOAD?FORM_ID=form_name[/i] with the url for my own web server and OI's standard BLANK html document. This worked fine. (Actually that was a lie. For some reason the BLANK html doc won't show. Instead I get an error message ("Form IO failure - Cannot find the specified form - BLANK"). But that doesn't matter. It's probably some minor detail I forgot. The important thing is that INET_FORMLOAD runs. Agree?) Then to the real test. I opened my Inet_Security procedure and added the following code beneath were it says /* put your authorization check code here */: <code> <code> Authorized=false$ if Authorized then HtmlMessage=Authorization Error" end </code> </code> In your case you should of course replace that Authorized=false$ line with some real code that gets the identity of the user and checks if he's allowed access. Then I ran the same request again. The result this time was the "Authorization Error" message, and no attempt at all on OI's behalf to show me the BLANK doc. So my Inet_Security function, that always runs before any other Inet function, had intervened and aborted further processing by returning something else than null - the error message "Authorization Error". Satisfied? Should I maybe "READ" the "DOS" ".htm" file and pass it back through the inet_gateway to the browser?? That's possible too. That's what I do in my web app. But you shouldn't do this in Inet_Security, of course. Do that in your own Inet function (e.g, INET_MY_FORMLOAD) and call that instead of INET_FORMLOAD. The authorization checking could be in either INET_MY_FORMLOAD or Inet_Security. One thing in my app is different from yours. I have mostly dynamic html docs. They cannot be handled with INET_FORMLOAD because they don't exist yet. I have some static docs too, but I haven't bothered registering them in the Repository. My INET_MY_FORMLOAD must therefore be told the full path name of the (static) document to show. Since you have your html docs registered in the Repository I believe you could do something like this in your INET_MY_FORMLOAD: - get the id of the html doc to show (i.e, the value of the FORM_ID query parameter) - from this calculate the id of the Repository entity for the doc (which is *DOC*HTML* or something) - read that entity with the Get_Repos_Entities function (I think) - extract the path of the html file - read the file - return the content of the file. But I think I'd first have another go at solving it the simple way with Inet_Security. Unless you want that added flexibility there is in returning the html doc yourself. When you do that you can for instance modify the content before you return it. E.g, if you wanted your document always to contain the current date, you could let the text of the file contain some special code DATE, and swap that with the current date before you returned it. - Oystein - </QUOTE> —- === At 26 JAN 2001 09:30AM WinWin/Revelation Support wrote: === <QUOTE>Steve: To start browser from inside OI try: call Utility('RUNWIN','runit.vbs http://www.winwinsol.com') where runit.vbs is a file made by cutting the following into notepad and saving it as runit.vbs (not runit.vbs.txt!) in the OI directory Vince Poirer suggests trying the 'START' command too, rather than this vbscript. Hope this helps ' ————————- ' This script uses the windows scripting host to start files ' ' To Use it, ' 1. Copy it to the Openinsight Direcotry ' 2. rather than coding x=Utility("RUNWIN","c:\progra~1….\Myfile.xls") ' code x=Utility("RUNWIN",'runit MyFile.Xls') ' ' The vbScript runs in 32-bit context so it can use the registry to ' find, open excel automatically ' Must have Win Nt/98/2000/me, or 95 + Office 2000 or IE 5.0 or Windows scripting host for this to work ' This works from Arev too as SUSPEND CSCRIPT RUNIT ' can open web page from inside Arev ' RJCarten 11-15-1999 ' ———————– Dim oShell set oshell=Wscript.CreateObject( "WScript.Shell" ) cmd=Wsh.Arguments(0) oShell.Run(cmd) set oshell=nothing </QUOTE> —- === At 26 JAN 2001 09:45AM Oystein Reigem wrote: === <QUOTE>Steve, Is it me or Mike who's misunderstood what you try to do? - Oystein - </QUOTE> View this thread on the forum...