source: FOIAVistA/tag/r/MAILMAN-XM/XMJBL.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1XMJBL ;ISC-SF/GMB-List contents of user's Mailbox ;12/04/2002 13:46
2 ;;8.0;MailMan;**10**;Jun 28, 2002
3 ; Entry points used by MailMan options (not covered by DBIA):
4 ; LISTMBOX XMBASKLIST - List all messages in user's mailbox
5MBOX ; List messages in mailbox of DUZ
6 N DIC,Y
7 S DIC(0)="AEQZ",DIC=3.7
8 D ^DIC Q:Y=-1
9 D LISTM(+Y,$P(Y(0,0),U))
10 Q
11LISTMBOX ; Option to list mailbox contents comes in here
12 N ZTSAVE,XMNAME,DIR,X,Y,XMALL
13 D CHECK^XMVVITAE
14 S DIR("A")=$$EZBLD^DIALOG(34650) ; List contents of
15 S XMALL=$$EZBLD^DIALOG(34651) ; A:All Baskets
16 S DIR(0)="S^"_XMALL_";"_$$EZBLD^DIALOG(34652) ; O:One Basket
17 S DIR("B")=$P(XMALL,":",2) ; All Baskets
18 D ^DIR Q:$D(DIRUT)
19 S XMNAME=XMV("NAME")
20 S (ZTSAVE("XMDUZ"),ZTSAVE("XMNAME"),ZTSAVE("XMV(""ORDER"")"))=""
21 I Y=$P(XMALL,":",1) D EN^XUTMDEVQ("ZLISTM^XMJBL",$$EZBLD^DIALOG(34654),.ZTSAVE) Q ; MailMan: Mailbox Contents List
22 N XMK,XMKN
23 D SELBSKT^XMJBU(XMDUZ,34653,"","",.XMK,.XMKN) Q:XMK=U ; List contents of MAIL BASKET:
24 S (ZTSAVE("XMK"),ZTSAVE("XMKN"))=""
25 D EN^XUTMDEVQ("ZLISTB^XMJBL",$$EZBLD^DIALOG(34655),.ZTSAVE) ; MailMan: Basket Contents List
26 Q
27LISTM(XMDUZ,XMNAME) ; List Mailbox
28ZLISTM ;
29 N XMPAGE,XMLEN,XMK,XMKN,XMABORT
30 S XMKN=""
31 S XMLEN("XMKZ")=6
32 D INIT(.XMNAME,.XMLEN,.XMPAGE,.XMABORT)
33 F S XMKN=$O(^XMB(3.7,XMDUZ,2,"B",XMKN)) Q:XMKN="" D Q:XMABORT
34 . S XMK=$O(^(XMKN,"")) ; Naked reference to above line
35 . D LB(XMDUZ,XMNAME,XMK,XMKN,.XMLEN,.XMPAGE,.XMABORT)
36 Q:$E($G(IOST),1,2)'="C-"!XMABORT
37 D WAIT^XMXUTIL
38 Q
39LISTB(XMDUZ,XMNAME,XMK,XMKN) ; List Basket
40ZLISTB ;
41 N XMPAGE,XMLEN,XMABORT
42 S XMLEN("XMKZ")=$L($O(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1))
43 D INIT(.XMNAME,.XMLEN,.XMPAGE,.XMABORT)
44 D LB(XMDUZ,XMNAME,XMK,XMKN,.XMLEN,.XMPAGE,.XMABORT)
45 Q:$E($G(IOST),1,2)'="C-"!XMABORT
46 D WAIT^XMXUTIL
47 Q
48LB(XMDUZ,XMNAME,XMK,XMKN,XMLEN,XMPAGE,XMABORT) ;
49 N XMKZ,XMZ,XMZREC
50 I $Y+5>IOSL D PAGE Q:XMABORT
51 W !!,$$EZBLD^DIALOG(34656,XMKN) ; Basket: |1|
52 S XMKZ=""
53 F S XMKZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ),XMV("ORDER")) Q:XMKZ'>0 D Q:XMABORT
54 . S XMZ=$O(^(XMKZ,"")) ; Naked reference to line above
55 . S XMZREC=$G(^XMB(3.9,XMZ,0))
56 . I XMZREC="" D ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ) Q
57 . I $Y+3>IOSL D Q:XMABORT
58 . . D PAGE Q:XMABORT
59 . . W !!,$$EZBLD^DIALOG(34656.1,XMKN) ; Basket: |1| (continued)
60 . W !,$J(XMKZ,XMLEN("XMKZ")),". ",$J("["_XMZ_"]",XMLEN("XMZ"))," ",$$DATE^XMXUTIL2(XMZREC,1)," ",$E($$SUBJ^XMXUTIL2(XMZREC),1,XMLEN("SUBJ"))
61 Q
62INIT(XMNAME,XMLEN,XMPAGE,XMABORT) ;
63 I $D(ZTQUEUED) S ZTREQ="@"
64 S (XMPAGE,XMABORT)=0
65 S XMLEN("XMZ")=$L($O(^XMB(3.9,":"),-1))+2
66 S XMLEN("DATE")=$L($$MMDT^XMXUTIL1($$NOW^XLFDT))
67 S XMLEN("SUBJ")=79-XMLEN("DATE")-XMLEN("XMKZ")-XMLEN("XMZ")-5
68 S XMNAME=XMNAME_" - "_$$MMDT^XMXUTIL1($$NOW^XLFDT)
69 W:$E($G(IOST),1,2)="C-" @IOF
70 D HEADER
71 Q
72PAGE ;
73 I $E($G(IOST),1,2)="C-" D PAGE^XMXUTIL(.XMABORT) Q:XMABORT
74 W @IOF
75 D HEADER
76 Q
77HEADER ;
78 N XMPARM
79 S XMPAGE=XMPAGE+1
80 S XMPARM(1)=XMNAME,XMPARM(2)=XMPAGE
81 W $$EZBLD^DIALOG(34657,.XMPARM) ; Mailbox Content for |1| Page: |2|
82 W !,$$REPEAT^XLFSTR("-",79)
83 Q
Note: See TracBrowser for help on using the repository browser.