XMJBM1 ;ISC-SF/GMB-Manage Mail in Mailbox (cont.) ;07/19/2000 14:13
;;8.0;MailMan;;Jun 28, 2002
INIT(XMDUZ,XMRDR,XMABORT) ;
D CHECK^XMVVITAE
I XMDUZ'=DUZ,'$$RPRIV^XMXSEC D Q
. S XMABORT=1
. D SHOW^XMJERR
D RDR(.XMRDR,.XMABORT)
Q
RDR(XMRDR,XMABORT) ;
S XMRDR=XMV("RDR DEF")
Q:XMV("RDR ASK")="N"
N XMRDRTXT,XMOPT,XMOX,XMDIR
D SET^XMXSEC1("C",34036,.XMOPT,.XMOX) ; C:Classic
D SET^XMXSEC1("D",34037,.XMOPT,.XMOX) ; D:Detailed Full Screen
D SET^XMXSEC1("S",34038,.XMOPT,.XMOX) ; S:Summary Full Screen
I XMRDR="" S XMRDR="C"
S XMRDRTXT=XMOPT(XMRDR)
S XMDIR("A")=$$EZBLD^DIALOG(34047) ; Select message reader:
S XMDIR("B")=XMOX("O",XMRDR)_":"_XMRDRTXT
S XMDIR("??")="D QRDR^XMJBM1"
D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMRDR,.XMABORT)
Q
QRDR ;
N XMTEXT
;The Classic reader is the one that has been around forever.
;The Full Screen reader has two flavors:
;Detailed Full Screen contains a detailed message list.
;Summary Full Screen contains a summary message list.
D BLD^DIALOG(34039,"","","XMTEXT","F")
I $P($G(^XMB(3.7,DUZ,0)),U,16)="" D
. ;You may choose a default MESSAGE READER under
. ;'Personal Preferences|User Options Edit'.
. ;Until you do, the Classic reader will be your default.
. D BLD^DIALOG(34040,"","","XMTEXT","F")
E D
. ;Your default MESSAGE READER is the _XMRDRTXT_ reader.
. ;You may change your default MESSAGE READER under
. ;'Personal Preferences|User Options Edit'.
. D BLD^DIALOG(34041,XMRDRTXT,"","XMTEXT","F")
;If you don't want to be asked this question again, and wish to use the
;XMRDRTXT_ reader exclusively, set the MESSAGE READER PROMPT to
;"No, don't ask" under 'Personal Preferences|User Options Edit'.
D BLD^DIALOG(34042,XMRDRTXT,"","XMTEXT","F")
D MSG^DIALOG("WH","","","","XMTEXT")
Q
ASKBSKT(XMDUZ,XMRDR,XMK,XMKN,XMABORT) ;
N XMKNUM
F D ASKBSKT^XMJBN(XMDUZ,0,.XMK,.XMKN,.XMABORT) Q:XMABORT D Q:XMKNUM
. S XMKNUM=+$P($G(^XMB(3.7,XMDUZ,2,XMK,1,0)),U,4)
. D:'XMKNUM NOMSGS(XMDUZ,XMK,XMKN)
Q:XMABORT
Q:'XMKNUM
Q:XMRDR'="C"
N XMPARM,XMTEXT
S XMPARM(1)=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1)
S XMPARM(2)=XMKNUM
S XMPARM(3)=$P(^XMB(3.7,XMDUZ,2,XMK,0),U,2)
;Last message number: |1| Messages in basket: |2| (|3| new)
;Enter ??? for help.
D BLD^DIALOG($S(XMPARM(3):34043.1,1:34043),.XMPARM,"","XMTEXT","F")
D MSG^DIALOG("WM","","","","XMTEXT")
Q
NOMSGS(XMDUZ,XMK,XMKN) ;
W !,$$EZBLD^DIALOG(34044,XMKN) ; No messages in '|1|' basket.
Q:XMK<2
I XMDUZ'=DUZ,$G(XMV("PRIV"))'["R",$G(XMV("PRIV"))'["W" Q
W !
N DIR,DIRUT,X,Y
S DIR(0)="Y"
;Since the '_XMKN_' basket is empty,
;do you want to delete it
D BLD^DIALOG(34045,XMKN,"","DIR(""A"")")
S DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
D ^DIR Q:'Y
D DELBSKT^XMXBSKT(XMDUZ,XMK)
W !,$$EZBLD^DIALOG(34046) ; Basket deleted.
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMJBM1 2842 printed Dec 13, 2024@02:11:46 Page 2
XMJBM1 ;ISC-SF/GMB-Manage Mail in Mailbox (cont.) ;07/19/2000 14:13
+1 ;;8.0;MailMan;;Jun 28, 2002
INIT(XMDUZ,XMRDR,XMABORT) ;
+1 DO CHECK^XMVVITAE
+2 IF XMDUZ'=DUZ
IF '$$RPRIV^XMXSEC
Begin DoDot:1
+3 SET XMABORT=1
+4 DO SHOW^XMJERR
End DoDot:1
QUIT
+5 DO RDR(.XMRDR,.XMABORT)
+6 QUIT
RDR(XMRDR,XMABORT) ;
+1 SET XMRDR=XMV("RDR DEF")
+2 if XMV("RDR ASK")="N"
QUIT
+3 NEW XMRDRTXT,XMOPT,XMOX,XMDIR
+4 ; C:Classic
DO SET^XMXSEC1("C",34036,.XMOPT,.XMOX)
+5 ; D:Detailed Full Screen
DO SET^XMXSEC1("D",34037,.XMOPT,.XMOX)
+6 ; S:Summary Full Screen
DO SET^XMXSEC1("S",34038,.XMOPT,.XMOX)
+7 IF XMRDR=""
SET XMRDR="C"
+8 SET XMRDRTXT=XMOPT(XMRDR)
+9 ; Select message reader:
SET XMDIR("A")=$$EZBLD^DIALOG(34047)
+10 SET XMDIR("B")=XMOX("O",XMRDR)_":"_XMRDRTXT
+11 SET XMDIR("??")="D QRDR^XMJBM1"
+12 DO XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMRDR,.XMABORT)
+13 QUIT
QRDR ;
+1 NEW XMTEXT
+2 ;The Classic reader is the one that has been around forever.
+3 ;The Full Screen reader has two flavors:
+4 ;Detailed Full Screen contains a detailed message list.
+5 ;Summary Full Screen contains a summary message list.
+6 DO BLD^DIALOG(34039,"","","XMTEXT","F")
+7 IF $PIECE($GET(^XMB(3.7,DUZ,0)),U,16)=""
Begin DoDot:1
+8 ;You may choose a default MESSAGE READER under
+9 ;'Personal Preferences|User Options Edit'.
+10 ;Until you do, the Classic reader will be your default.
+11 DO BLD^DIALOG(34040,"","","XMTEXT","F")
End DoDot:1
+12 IF '$TEST
Begin DoDot:1
+13 ;Your default MESSAGE READER is the _XMRDRTXT_ reader.
+14 ;You may change your default MESSAGE READER under
+15 ;'Personal Preferences|User Options Edit'.
+16 DO BLD^DIALOG(34041,XMRDRTXT,"","XMTEXT","F")
End DoDot:1
+17 ;If you don't want to be asked this question again, and wish to use the
+18 ;XMRDRTXT_ reader exclusively, set the MESSAGE READER PROMPT to
+19 ;"No, don't ask" under 'Personal Preferences|User Options Edit'.
+20 DO BLD^DIALOG(34042,XMRDRTXT,"","XMTEXT","F")
+21 DO MSG^DIALOG("WH","","","","XMTEXT")
+22 QUIT
ASKBSKT(XMDUZ,XMRDR,XMK,XMKN,XMABORT) ;
+1 NEW XMKNUM
+2 FOR
DO ASKBSKT^XMJBN(XMDUZ,0,.XMK,.XMKN,.XMABORT)
if XMABORT
QUIT
Begin DoDot:1
+3 SET XMKNUM=+$PIECE($GET(^XMB(3.7,XMDUZ,2,XMK,1,0)),U,4)
+4 if 'XMKNUM
DO NOMSGS(XMDUZ,XMK,XMKN)
End DoDot:1
if XMKNUM
QUIT
+5 if XMABORT
QUIT
+6 if 'XMKNUM
QUIT
+7 if XMRDR'="C"
QUIT
+8 NEW XMPARM,XMTEXT
+9 SET XMPARM(1)=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1)
+10 SET XMPARM(2)=XMKNUM
+11 SET XMPARM(3)=$PIECE(^XMB(3.7,XMDUZ,2,XMK,0),U,2)
+12 ;Last message number: |1| Messages in basket: |2| (|3| new)
+13 ;Enter ??? for help.
+14 DO BLD^DIALOG($SELECT(XMPARM(3):34043.1,1:34043),.XMPARM,"","XMTEXT","F")
+15 DO MSG^DIALOG("WM","","","","XMTEXT")
+16 QUIT
NOMSGS(XMDUZ,XMK,XMKN) ;
+1 ; No messages in '|1|' basket.
WRITE !,$$EZBLD^DIALOG(34044,XMKN)
+2 if XMK<2
QUIT
+3 IF XMDUZ'=DUZ
IF $GET(XMV("PRIV"))'["R"
IF $GET(XMV("PRIV"))'["W"
QUIT
+4 WRITE !
+5 NEW DIR,DIRUT,X,Y
+6 SET DIR(0)="Y"
+7 ;Since the '_XMKN_' basket is empty,
+8 ;do you want to delete it
+9 DO BLD^DIALOG(34045,XMKN,"","DIR(""A"")")
+10 ; Yes
SET DIR("B")=$$EZBLD^DIALOG(39054)
+11 DO ^DIR
if 'Y
QUIT
+12 DO DELBSKT^XMXBSKT(XMDUZ,XMK)
+13 ; Basket deleted.
WRITE !,$$EZBLD^DIALOG(34046)
+14 QUIT