! CRS_RESERVE_D.SCP REB, 18-Sep-1989 12:00 .LABEL TEST_PRIV .IF $CRS_PRV EQS "Y" THEN .GOTO CONTINUE GET #TEST=CRS_RESERVE.RESERVER[$CRS_LAST_USED] .IF #TEST NES OA$USER THEN .GOTO NO_PRIV .LABEL CONTINUE GET #R=ROOM GET #M=MEETING GET #D=BEG_DT GET #T=BEG_TIME GET #E=END_TIME GET #C1=CRS_RESERVE.CONTACT1[$CRS_LAST_USED] GET #E1=CRS_RESERVE.EXT1[$CRS_LAST_USED] GET #C2=CRS_RESERVE.CONTACT2[$CRS_LAST_USED] GET #E2=CRS_RESERVE.EXT2[$CRS_LAST_USED] GET #A=CRS_RESERVE.AM_YN[$CRS_LAST_USED] .LABEL DISPLAY_FORM FORM CRS_RESERVE_D/PRE='GET ROOM=#R\GET MEETING=#M\GET BEG_DT=#D\- GET BEG_TIME=#T\GET END_TIME=#E\GET CONTACT1=#C1\- GET EXT1=#E1\GET CONTACT2=#C2\GET EXT2=#E2\GET AM_YN=#A' .IF OA$FORM_TERMINATOR = 112 THEN .GOTO CANCELLED .LABEL PROMPT PROMPT "Really delete? [Y/N] " OA$FLD_STAY .IF OA$FORM_TERMINATOR = 112 OR OA$PROMPT_TEXT NES "Y" THEN - .GOTO CANCELLED GET #NEXT_KEY=CRS_RESERVE:CRS_KEY.%NEXT[$CRS_LAST_USED] WRITE DELETE CRS_RESERVE CRS_KEY=$CRS_LAST_USED GET #DTEST=CRS_RESERVE.RESERVER[$CRS_LAST_USED] .IF #DTEST NES "" THEN .GOTO ERROR GET $CRS_LAST_USED=#NEXT_KEY .IF #AM_YN EQS "Y" THEN .GOTO POST_MSG OA$MSG_PURGE DISPLAY The specified RESERVATION was cancelled. .GOTO EXIT_PROCEDURE .LABEL ERROR OA$MSG_PURGE DISPLAY An error has occurred in trying to delete this record. .GOTO EXIT_PROCEDURE .LABEL CANCELLED OA$MSG_PURGE DISPLAY The specified RESERVATION has NOT been cancelled. .GOTO EXIT_PROCEDURE .LABEL NO_PRIV OA$MSG_PURGE DISPLAY YOU are NOT AUTHORIZED to cancel THIS reservation. .GOTO EXIT_PROCEDURE .LABEL POST_MSG display Creating message to AM ADVISER . . .\force mail create/open/nosend/noedit mail subject "NOTICE OF CANCELLED MEETING" mail to "AM_ADVISER" mail text "" mail text - "The following meeting has been cancelled. A request had been sent that it" mail text - "be listed in the AM Adviser. If it has already been listed, please list its" mail text - "cancellation. If it has not yet been listed, please do not do so at all." mail text mail text "MEETING: " #meeting mail text "PLACE: " #room mail text "DATE: " #beg_dt mail text "TIME: " #beg_time " - " #end_time mail text mail text "Let me know if you have any questions." mail close_message .label edit_prompt mail read prompt "Do you need to edit this message? [Y/N] " oa$fld_stay .if oa$prompt_text nes "Y" then .goto send_am_msg .label edit_msg mail edit .goto edit_prompt .label send_am_msg get #curdoc=oa$curmes mail send ! do wpdelete ! display Notice has been sent to AM ADVISER. oa$msg_purge display Reservation cancelled as requested; AM Adviser notified. .goto exit_procedure .LABEL EXIT_PROCEDURE .EXIT