source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMVVITA.m@ 1211

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

initial load of WorldVistAEHR

File size: 5.9 KB
RevLine 
[613]1XMVVITA ;ISC-SF/GMB-Edit User's MailMan Variables ;04/29/2003 07:49
2 ;;8.0;MailMan;**18**;Jun 28, 2002
3 ; Replaces ^XMGAPI1,FWD^XMA21FWD,BANNER^XMA6,EDIT^XMA7 (ISC-WASH/CAP)
4 ;
5 ; Entry points used by MailMan options (not covered by DBIA):
6 ; BANNER XMBANNER - Edit user's banner
7 ; EDIT XMEDITUSER - Edit user's preferences
8 ; FILTER XM FILTER EDIT - Edit user's message filters
9 ; BASKET XM DELIVERY BASKET EDIT - Edit user's delivery basket preferences
10 ; FORWARD XMEDITFWD - Edit user's forwarding address
11 ; SURR XMEDITSURR - Edit user's surrogates
12FORWARD ; Edit forwarding address
13 N XMIA
14 S XMIA=1
15 N DIE,DA,DR
16 S DIE=3.7
17 S DA=DUZ
18 S DR="2;2.1"
19 D ^DIE
20 Q
21XMFWD(XMADDR,XMIA) ; Serves as input transform for 'forwarding address'
22 N XMERROR,XMRESTR,XMINSTR,XMFULL,XMFWDADD
23 I XMADDR'["@",".D.d.H.h.S.s."'[("."_$E(XMADDR,1,2)) K XMADDR Q
24 S XMINSTR("ADDR FLAGS")="X" ; do not create ^TMP(, just check.
25 S XMFWDADD=DUZ ; editing forwarding address
26 D ADDRESS^XMXADDR(DUZ,XMADDR,.XMFULL,.XMERROR)
27 I $D(XMERROR) K XMADDR Q
28 I XMFULL'["@" D
29 . ; Remote address is really local. OK if device or server.
30 . I ".D.H.S."[("."_$E(XMFULL,1,2)) S XMFULL=XMFULL_"@"_^XMB("NETNAME")
31 I XMFULL'["@" D Q
32 . ; Remote address is really local
33 . K XMADDR
34 . D EN^DDIOL($$EZBLD^DIALOG(38130)) ; You can't have your mail forwarded to a local address.
35 S XMADDR=XMFULL
36 Q
37DELFWD(XMUSER,XMFWD,XMERROR) ; Delete a user's invalid forwarding address.
38 S XMFDA(3.7,XMUSER_",",2)="@"
39 D FILE^DIE("","XMFDA")
40 N XMPARM,XMINSTR,XMTEXT,XMAPPEND
41 S XMINSTR("FROM")=.5
42 S XMPARM(1)=XMFWD
43 I +XMERROR=XMERROR D
44 . D BLD^DIALOG(XMERROR,.XMERROR,"","XMTEXT","F")
45 . D MSG^DIALOG("AE",.XMAPPEND,"","","XMTEXT")
46 E D
47 . S XMPARM(2)=XMERROR
48 . S XMAPPEND=""
49 D TASKBULL^XMXBULL(.5,"XM FWD ADDRESS DELETE",.XMPARM,"XMAPPEND",XMUSER,.XMINSTR)
50 Q
51BANNER ; Edit banner
52 N DIE,DA,DR
53 S DIE=3.7
54 S (XMDUZ,DA)=$G(XMDUZ,DUZ)
55 S DR=4
56 D ^DIE
57 D SETBAN^XMVVITAE(XMDUZ,.XMV)
58 Q
59FILTER ; Edit filters
60 N DIE,DA,DR,XMIA
61 S XMIA=1
62 S DIE=3.7
63 S DA=DUZ
64 S DR="16;15" ; Message filters flag ; Message filters
65 D ^DIE
66 Q:$D(^XMB(3.7,DUZ,15,"AF"))
67 W !!,$C(7),$$EZBLD^DIALOG(38131) ; Note that you have no active filters.
68 Q
69BASKET ; Edit delivery baskets
70 N DIE,DA,DR
71 S DIE=3.7
72 S DA=DUZ
73 S DR="16.2;S:X'=""S"" Y=0;1" ; Accept delivery basket? ; Select basket.
74 S DR(2,3.701)="3" ; Is this a delivery basket?
75 D ^DIE
76 Q
77SURR ; Edit Surrogates
78 N DIE,DA,DR
79 S DIE="^XMB(3.7,"
80 S DA=DUZ
81 S DR="8" ; surrogate
82 D ^DIE
83 Q
84EDIT ; Edit User Preferences
85 N DIE,DA,DR
86 D CHECK^XMVVITAE
87 W !!,$$EZBLD^DIALOG(38132,$$GET1^DID(3.7,"","","NAME")) ; Editing data in the MAILBOX file:
88 S DIE="^XMB(3.7,"
89 S DA=DUZ
90 S DR=""
91 S DR=DR_";4" ; banner
92 S DR=DR_";17" ; message display order
93 S DR=DR_";21" ; new message read order
94 S DR=DR_";18" ; message reader default
95 S DR=DR_";19" ; message reader prompt
96 S DR=DR_";20" ; new messages default option
97 S DR=DR_";6" ; show message preview
98 S DR=DR_";11" ; message action default
99 S DR=DR_";12" ; ask basket
100 S DR=DR_";13" ; show titles
101 S DR=DR_";14" ; priority responses flag
102 S DR=DR_";14.1" ; priority responses prompt
103 S DR=DR_";16.3" ; p-message queued from
104 S DR=DR_";9" ; mailman institution
105 S DR=DR_";2.21:2.23" ; network signature lines
106 S DR=DR_";4.5" ; introduction
107 S DR=$E(DR,2,99)
108 D ^DIE
109 D NEWORDER
110 W !!,$$EZBLD^DIALOG(38132,$$GET1^DID(200,"","","NAME")) ; Editing data in the NEW PERSON file:
111 S DIE="^VA(200,"
112 S DA=DUZ
113 S DR=""
114 S DR=DR_";31.3" ; preferred editor
115 S DR=DR_";.111" ; street address 1
116 S DR=DR_";.112" ; street address 2
117 S DR=DR_";.113" ; street address 3
118 S DR=DR_";.114" ; city
119 S DR=DR_";.115" ; state
120 S DR=DR_";.116" ; zip
121 S DR=DR_";.132" ; office phone
122 S DR=DR_";.136" ; fax #
123 S DR=DR_";.137" ; voice pager
124 S DR=DR_";.138" ; digital pager
125 S DR=DR_";.133"_$$EZBLD^DIALOG(38133,1) ; ADD'L PHONE 1 phone #3
126 S DR=DR_";.134"_$$EZBLD^DIALOG(38133,2) ; ADD'L PHONE 2 phone #4
127 S DR=$E(DR,2,99)
128 D ^DIE
129 D PREFER^XMVVITAE(DUZ,.XMV,.XMDISPI)
130 D SETBAN^XMVVITAE(XMDUZ,.XMV)
131 D SETNET^XMVVITAE(XMDUZ,.XMV)
132 Q
133NEWORDER ;
134 N XMDIC,XMK
135 I $D(^XMB(3.7,DUZ,2,"AP")) D
136 . N I,XMKN,XMTEXT
137 . W !
138 . ;Current priority order for reading baskets with new messages:
139 . D BLD^DIALOG(38140,"","","XMTEXT","F")
140 . D MSG^DIALOG("WM","","","","XMTEXT")
141 . S (I,XMK)=0
142 . F S I=$O(^XMB(3.7,DUZ,2,"AP",I)) Q:'I D
143 . . F S XMK=$O(^XMB(3.7,DUZ,2,"AP",I,XMK)) Q:'XMK D
144 . . . S ^TMP("XM",$J,"AP",I,$$BSKTNAME^XMXUTIL(DUZ,XMK))=""
145 . S I=0,XMKN=""
146 . F S I=$O(^TMP("XM",$J,"AP",I)) Q:'I D
147 . . F S XMKN=$O(^TMP("XM",$J,"AP",I,XMKN)) Q:XMKN="" D
148 . . . W !,$J(I,4),?8,XMKN
149 . K ^TMP("XM",$J,"AP")
150 W !
151 ;Editing the priority order for reading baskets with new messages.
152 ;Note: You don't need priority ordering unless you want to change the
153 ;default 'read new messages' basket from IN to other basket(s).
154 D BLD^DIALOG(38141,"","","XMTEXT","F")
155 D MSG^DIALOG("WM","","","","XMTEXT")
156 F D Q:XMK=U
157 . S XMDIC("B")="@" ; no default basket
158 . S XMDIC("S")="I Y>1" ; can't select IN or WASTE baskets
159 . S XMDIC("W")="W ?40,$P(^(0),U,4)"
160 . W !
161 . D SELBSKT^XMJBU(DUZ,"","",.XMDIC,.XMK) Q:XMK=U
162 . N DA,DR,DIE
163 . S DIE="^XMB(3.7,"_DUZ_",2,"
164 . S DA(1)=DUZ,DA=XMK
165 . S DR="4T" ; Read new messages basket priority
166 . D ^DIE
167 Q
168GOTNS(XMDUZ) ; Function: Does the user have a network signature? (1=yes; 0=no)
169 Q "^^"'[$G(^XMB(3.7,XMDUZ,"NS1"))
170CRE8NS ; The user does not have a network signature.
171 ; Does the user want to create a network signature now?
172 ; If the user creates one, routine sets $T to true; else false
173 N DIR,X,Y
174 S DIR(0)="Y",DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
175 S DIR("A")=$$EZBLD^DIALOG(37309.5) ; Would you like to create a Network Signature now
176 D ^DIR Q:'Y
177 K DIR
178 D EDITNS
179 I $$GOTNS(DUZ)
180 Q
181EDITNS ; Edit network signature
182 N DIE,DA,DR
183 S DIE="^XMB(3.7,",DA=DUZ,DR="2.21:2.23" D ^DIE
184 Q
Note: See TracBrowser for help on using the repository browser.