Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM {GTW 2009};
- OneMb := 1000000;
- BeingMailed:=@If(@IsDocBeingMailed;1;0);
- REM {DebugFlag=0 –> Debug mode off};
- REM {DebugFlag=1 –> Debug mode on};
- DebugFlag:=0;
- quotaStdUser:=6;
- GroupNameManager := "Group8MB";
- quotaManager:=8;
- GroupNameBOD := "Group10MB";
- quotaBOD:=10;
- GroupNameOwner:= "Group15MB";
- quotaOwner:=15;
- AttLengths:=@If(@Attachments=0;0;@Sum(@AttachmentLengths));
- msg1:="You are attempting to send a mail item whose total size is ";
- msg2:=" megabytes or greater. Please reduce the number of attachments and/or the size of the attachment(s) so the total amount of data being sent is below ";
- msg3:=" megabytes";
- G2:=@If(@Member(GroupNameManager; @UserNamesList); 1;0);
- Q2:=@If(AttLengths < (quotaManager*oneMb);1;0) ;
- F2:=msg1+@Text(quotaManager)+msg2+@Text(quotaManager)+msg3;
- G3:=@If(@Member(GroupNameBOD; @UserNamesList); 1;0);
- Q3:= @If(AttLengths < (quotaBOD*oneMb);1;0) ;
- F3:=msg1+@Text(quotaBOD)+msg2+@Text(quotaBOD)+msg3;
- G4:=@If(@Member(GroupNameOwner; @UserNamesList); 1;0);
- Q4:= @If(AttLengths < (quotaOwner*oneMb);1;0) ;
- F4:=msg1+@Text(quotaOwner)+msg2+@Text(quotaOwner)+msg3;
- G1:=@If(G2:G3:G4 = 0;1;0);
- Q1:= @If(AttLengths < (quotaStdUser*oneMb);1;0) ;
- F1:=msg1+@Text(quotaStdUser)+msg2+@Text(quotaStdUser)+msg3;
- FErrMsg:=@If (
- (G2=1 & Q2=0);F2;
- (G3=1 & Q3=0);F3;
- (G4=1 & Q4=0);F4;
- F1);
- GW:=@If( (G1&Q1=1 | G2&Q2=1 | G3&Q3=1 | G4&Q4=1);"Success";"Gagal " + FErrMsg);
- GW2:=@If( (G1&Q1=1 | G2&Q2=1 | G3&Q3=1 | G4&Q4=1);1;0);
- y1:="G1 = " + @Text(G1) + " G2=" + @Text(G2) + " G3 = " + @Text(G3) +" G4 = " + @Text(G4);
- y2:=". Att Length = "+@Text(AttLengths)+""+GW;
- y3:=y1+y2;
- GW3:=@If(DebugFlag = 1 ;@Failure(y3);
- DebugFlag = 0 & GW2=1;@Success;
- DebugFlag = 0 & GW2=0;@Failure(FerrMsg);@Success
- );
- @If(BeingMailed;GW3;@Success)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement