source: EWD/archive/C0CE001L.m@ 1351

Last change on this file since 1351 was 1265, checked in by George Lilly, 13 years ago

old version of EWD fileman file and sample applications

File size: 5.7 KB
Line 
1 ;GT.M version of page loginPanel (patientportal application)
2 ;Compiled on Mon, 01 Mar 2010 17:10:45
3 ;using Enterprise Web Developer (Build 790)
4 QUIT
5 ;
6run ;
7 n confirmText,ebToken,Error,formInfo,ok,sessid,sessionArray,tokens
8 s ok=$$pre()
9 i ok d body
10 QUIT
11 ;
12pre() ;
13 ;
14 n ctype,ewdAction,headers,jump,quitStatus,pageTitle,stop,urlNo
15 ;
16 s confirmText="Click OK if you're sure you want to delete this record"
17 s sessionArray("ewd_isFirstPage")="0"
18 s sessionArray("ewd_sessid_timeout")="1200"
19 s sessionArray("ewd_prePageScript")=""
20 s sessionArray("ewd_default_timeout")="1200"
21 s sessionArray("ewd_persistRequest")="true"
22 s sessionArray("ewd_pageTitle")=""
23 s sessionArray("ewd_errorPage")="ewdError"
24 s sessionArray("ewd_templatePrePageScript")=""
25 s sessionArray("ewd_onErrorScript")=""
26 s sessionArray("ewd_appName")="patientportal"
27 s sessionArray("ewd_pageName")="loginPanel"
28 s sessionArray("ewd_translationMode")="0"
29 s sessionArray("ewd_technology")="gtm"
30 s sessionArray("ewd_pageType")="ajax"
31 s tokens("ewdAjaxError")=$$setNextPageToken^%zewdGTMRuntime("ewdAjaxError")
32 s Error=$$startSession^%zewdPHP("loginPanel",.%KEY,.%CGIEVAR,.sessionArray,.filesArray)
33 s sessid=$g(sessionArray("ewd_sessid"))
34 i Error["Enterprise Web Developer Error :",$g(sessionArray("ewd_pageType"))="ajax" d
35 . s Error=$p(Error,":",2,200)
36 . s Error=$$replaceAll^%zewdAPI(Error,"<br>",": ")
37 . s Error="EWD runtime error: "_Error
38 i $e(Error,1,32)="Enterprise Web Developer Error :" d QUIT 0
39 . n errorPage
40 . s errorPage=$g(sessionArray("ewd_errorPage"))
41 . i errorPage="" s errorPage="ewdError"
42 . i $g(sessionArray("ewd_pageType"))="ajax" s errorPage="ewdAjaxErrorRedirect"
43 . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),errorPage,,,sessid,Error)
44 s stop=0
45 i Error="" d i stop QUIT 0
46 . n nextpage
47 . s nextpage=$$getSessionValue^%zewdAPI("ewd_nextPage",sessid)
48 . i nextpage'="" d
49 . . n x
50 . . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),nextpage,$$getSessionValue^%zewdAPI("ewd_token",sessid),$$getSessionValue^%zewdAPI("ewd_pageToken",sessid))
51 . . s stop=1
52 i $$getSessionValue^%zewdAPI("ewd_warning",sessid)'="" d
53 . s Error=$$getSessionValue^%zewdAPI("ewd_warning",sessid)
54 . d deleteFromSession^%zewdAPI("ewd_warning",sessid)
55 w "HTTP/1.1 200 OK"_$c(13,10)
56 s ctype="text/html"
57 d mergeArrayFromSession^%zewdAPI(.headers,"ewd.header",sessid)
58 i $d(headers) d
59 . n lcname,name
60 . s name=""
61 . f s name=$o(headers(name)) q:name="" d
62 . . s lcname=$$zcvt^%zewdAPI(name,"l")
63 . . i lcname="content-type" s ctype=headers(name) q
64 . . w name_": "_headers(name)_$c(13,10)
65 w "Content-type: "_ctype_$c(13,10)
66 w $c(13,10)
67 QUIT 1
68 ;
69body ;
70 if ($g(Error)="") d
71 .w " <div id=""ewdscript"">"_$c(13,10)
72 .w "EWD.page.yuiResourcePath = """_$$getSessionValue^%zewdAPI("yui.resourcePath",sessid)_""" ;"_""
73 .w "if (EWD.page.yuiResourcePath == '') {"_""
74 .w " alert('Unable to determine path to YUI resource file. Did you run d install^%zewdYUIConf()?') ;"_""
75 .w "}"_""
76 .w "EWD.page.loadResource("""_$$getSessionValue^%zewdAPI("yui.resourceLoaderPath",sessid)_$$getSessionValue^%zewdAPI("yui.resourceLoader",sessid)_""",""js"") ;"_""
77 .w "if (!EWD.yui) alert('YUI Javascript resource file ewdYUIResources.js was not found in the web server root path');"_""
78 .w "if (!EWD.yui.build) alert('YUI Javascript resource file ewdYUIResources.js is out of date. You must be using build 790');"_""
79 .w "if (EWD.yui.build != 790) alert('YUI Javascript resource file ewdYUIResources.js is out of date. You are using build ' + EWD.yui.build + ' but you should be using build 790');"_""
80 .w "EWD.yui.version = """_$$getSessionValue^%zewdAPI("yui.resourcePath",sessid)_""" ;"_""
81 .w "EWD.yui.resourceLoader.Dialog() ;"_""
82 .w "document.getElementsByTagName('body')[0].className = 'yui-skin-sam' ;"_""
83 .w "var fReturnloginPanel7=function() {"_""
84 .w "EWD.yui.widgetIndex[""yuiDialogRegloginPanel7""]={widgetName:""loginPanel7"",tagId:""yuiDialogDivloginPanel7""};"_""
85 .w "EWD.yui.moveDialogToBody('yuiDialogDivloginPanel7');"_""
86 .w "EWD.yui.widget.loginPanel7=new YAHOO.widget.Dialog(""yuiDialogDivloginPanel7"",{iframe:true,width:""270px"",x:150,y:100});"_""
87 .w "EWD.yui.widget.loginPanel7.render();"_""
88 .w "};"_""
89 .w "YAHOO.util.Event.onAvailable(""yuiDialogDivloginPanel7"",fReturnloginPanel7);"_""
90 .w " </div>"_$c(13,10)
91 .w " <div id=""yuiDialogRegloginPanel7"">"_$c(13,10)
92 .w " <div id=""yuiDialogDivloginPanel7"" style=""visibility:hidden"">"_$c(13,10)
93 .w " <div class=""hd"">"_$c(13,10)
94 .w "Login"_""
95 .w " </div>"_$c(13,10)
96 .w " <div class=""bd"">"_$c(13,10)
97 .w "Login Form will go here"_""
98 .w " </div>"_$c(13,10)
99 .w " <div class=""ft"">"_$c(13,10)
100 .w "</div>"_$c(13,10)
101 .w " </div>"_$c(13,10)
102 .w " </div>"_$c(13,10)
103 .
104 w "<span id=""ewdajaxonload"">"_$c(13,10)
105 w " var ewdtext='"_$$jsEscape^%zewdGTMRuntime(Error)_"' ; if (ewdtext != '') { if (ewdtext.substring(0,11) == 'javascript:') { ewdtext=ewdtext.substring(11) ; eval(ewdtext) ; } else { EWD.ajax.alert('"_$$htmlEscape^%zewdGTMRuntime($$jsEscape^%zewdGTMRuntime(Error))_"') }"_$c(13,10)
106 s id=""
107 f s id=$o(^%zewdSession("session","ewd_idList",id)) q:id="" d
108 . w "idPointer = document.getElementById('"_id_"') ; "
109 . w "if (idPointer != null) idPointer.className='"_$g(^%zewdSession("session","ewd_idList"))_"' ; "
110 s id=""
111 f s id=$o(^%zewdSession("session","ewd_errorFields",id)) q:id="" d
112 . w "idPointer = document.getElementById('"_id_"') ; "
113 . w "if (idPointer != null) idPointer.className='"_$g(^%zewdSession("session","ewd_errorClass"))_"' ; "
114 k ^%zewdSession("session","ewd_hasErrors")
115 k ^%zewdSession("session","ewd_errorFields")
116 k ^%zewdSession("session","ewd_idList")
117 w " }"_""
118 w "</span>"_$c(13,10)
119 QUIT
Note: See TracBrowser for help on using the repository browser.