source: ccr/trunk/p/C0CE003.m@ 1150

Last change on this file since 1150 was 721, checked in by George Lilly, 15 years ago

ccr demo pages compiled by EWD and renamed to the C0C name space

File size: 2.8 KB
RevLine 
[721]1 ;GT.M version of page ccr2 (patientportal application)
2 ;Compiled on Mon, 01 Mar 2010 17:10:44
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")="ccr2"
28 s sessionArray("ewd_translationMode")="0"
29 s sessionArray("ewd_technology")="gtm"
30 s sessionArray("ewd_pageType")=""
31 s Error=$$startSession^%zewdPHP("ccr2",.%KEY,.%CGIEVAR,.sessionArray,.filesArray)
32 s sessid=$g(sessionArray("ewd_sessid"))
33 i Error["Enterprise Web Developer Error :",$g(sessionArray("ewd_pageType"))="ajax" d
34 . s Error=$p(Error,":",2,200)
35 . s Error=$$replaceAll^%zewdAPI(Error,"<br>",": ")
36 . s Error="EWD runtime error: "_Error
37 i $e(Error,1,32)="Enterprise Web Developer Error :" d QUIT 0
38 . n errorPage
39 . s errorPage=$g(sessionArray("ewd_errorPage"))
40 . i errorPage="" s errorPage="ewdError"
41 . i $g(sessionArray("ewd_pageType"))="ajax" s errorPage="ewdAjaxErrorRedirect"
42 . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),errorPage,,,sessid,Error)
43 s stop=0
44 i Error="" d i stop QUIT 0
45 . n nextpage
46 . s nextpage=$$getSessionValue^%zewdAPI("ewd_nextPage",sessid)
47 . i nextpage'="" d
48 . . n x
49 . . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),nextpage,$$getSessionValue^%zewdAPI("ewd_token",sessid),$$getSessionValue^%zewdAPI("ewd_pageToken",sessid))
50 . . s stop=1
51 i $$getSessionValue^%zewdAPI("ewd_warning",sessid)'="" d
52 . s Error=$$getSessionValue^%zewdAPI("ewd_warning",sessid)
53 . d deleteFromSession^%zewdAPI("ewd_warning",sessid)
54 w "HTTP/1.1 200 OK"_$c(13,10)
55 s ctype="text/html"
56 d mergeArrayFromSession^%zewdAPI(.headers,"ewd.header",sessid)
57 i $d(headers) d
58 . n lcname,name
59 . s name=""
60 . f s name=$o(headers(name)) q:name="" d
61 . . s lcname=$$zcvt^%zewdAPI(name,"l")
62 . . i lcname="content-type" s ctype=headers(name) q
63 . . w name_": "_headers(name)_$c(13,10)
64 w "Content-type: "_ctype_$c(13,10)
65 w $c(13,10)
66 QUIT 1
67 ;
68body ;
69 w "<html>"_$c(13,10)
70 w " <body onload=""EWD.page.setErrorClass() ; EWD.page.errorMessage('"_$$htmlEscape^%zewdGTMRuntime($$jsEscape^%zewdGTMRuntime(Error))_"')"">"_$c(13,10)
71 w "hello world"_""
72 w " </body>"_$c(13,10)
73 w "</html>"_$c(13,10)
74 QUIT
Note: See TracBrowser for help on using the repository browser.