home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
WCPOST.ZIP
/
WCPOST_X.WCC
< prev
next >
Wrap
Text File
|
1994-10-11
|
8KB
|
204 lines
Dim wcPv As String
Dim uRec As UserRecord
Dim Msg As MessageHeader
Dim Selection As String*1
Dim SendOk As Integer
Dim t As Integer
Dim MsgToUsers As String
Dim MsgToUsersOnly As String*10
Dim MsgToUsersNot1 As String*10
Dim MsgToUsersNot2 As String*10
Dim MsgToAll As String
Dim First As String
Dim TodayNow As DateTime
CurrentDateTime(TodayNow)
wcPv = "1.01"
First = ""
Open "wcpost.log" For Append As #1
Open "wcpost.err" For Append As #2
Function StartLog
Print #1, "------------------------------------------------------------------------------"
Print #1, FormatDate(TodayNow.d, "mm/dd/yy") + " " ;
Print #1, FormatTime(TodayNow.t, "hh:mm:ss") + " " ;
Print #1, " wcPost v" + wcPv + " Log File, the GREAT Message Poster!"
End Function
Function SendUser(MsgHd As MessageHeader) As Integer
SendUser = False
Dim Ok As Integer
Do
MsgHd.From = "wcPOST v" + wcPv
MsgHd.To = uRec.Name
MsgHd.Flags = 1
MsgHd.Subject = "Auto-Posting from wcPOST"
Ok = Trim(MsgHd.From + MsgHd.To + MsgHd.Subject) > ""
If Not(Ok) Then
Print #2, "There wsa an Error creating the Message to the User!"
End If
Loop Until Ok
SendUser = True
End Function
Join 0
StartLog
Do
CLS
Locate 4,1
Print " @0F@wcPOST @0E@v@0F@" + wcPv + "@0E@, the Simple Message Poster"
Print " written by, @0F@Stephen Barclay@0E@"
Print ""
Print " @0E@[@0F@A@0E@] - Send a Message to All Excluding"
Print " Two Different Security Profiles"
Print " @0E@[@0F@B@0E@] - Send a Message to All Excluding"
Print " One Different Security Profile"
Print " @0E@[@0F@C@0E@] - Send a Message to ONE Security Level"
Print " @0E@[@0F@D@0E@] - Send a Message to ALL Users"
Print " @0E@[@0F@E@0E@] - Drop/Shell to DOS"
Print " @0E@[@0F@Q@0E@] - Quit to @0F@" ; MakeWild.BBSName ; "@0E@"
Print ""
Print " Please Select @0E@[@0F@A,B,C,D,Q@0E@] : " ;
Input Selection
Select Case uCase(Selection)
Case "A"
CLS
Locate 2,1
Print " wcPOST v" + wcPv + ", Send a Message to All Except TWO Security Levels"
Locate 5,1
Print " This Selection will allow you to send any specified text file"
Print "to a selected User Security Profile(s). You may either only send"
Print "the Message to one Security Level or you may exclude one Security"
Print "Level. Please make sure that the Text file you are sending dose"
Print "exist, and is in a text readable format."
Print ""
Locate 12,1
MsgToUsers = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
MsgToUsersNot1 = InputMask("Please enter the first Security Level to exclude : ", "XXXXXXXXXX")
MsgToUsersNot2 = InputMask("@0F@Please enter the second Security Level to exclude : ", "XXXXXXXXXX")
SendOk = False
SendOk = InputYesNo("Do you wish to continue ? ")
If SendOk = True Then
If MsgToUsers <> "" And MsgToUsersNot1 <> "" Then
If GetUser(uRec, First) Then
t = 0
Do While GetNextUser(uRec)
If uRec.SecLevel <> MsgToUsersNot1 And uRec.SecLevel <> MsgToUsersNot2 Then
If SendUser(Msg) Then
AddMessage Msg, MsgToUsers
t = t + 1
Print #1, " ! MSGTOUSERS1 sent to : " ; uRec.Name ; ", sucessfully"
End If
End If
Loop
Print ""
Print "A total of @0B@" ; t ; "@0E@ Message(s) were sent."
WaitEnter
End If
End If
End If
Case "B"
CLS
Locate 2,1
Print " wcPOST v" + wcPv + ", Send a Message to All except One Security Level"
Locate 5,1
Print " This selection will allow you to send a message to All Users except"
Print "ONE different Security Profile. This might be hand to send a message"
Print "to All of your normal Users exculding the NewUsers. "
Print ""
Locate 10,1
MsgToUsers = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
MsgToUsersNot1 = InputMask("Please enter the first Security Level to exclude : ", "XXXXXXXXXX")
SendOk = False
SendOk = InputYesNo("Do you wish to continue ? ")
If SendOk = True Then
If MsgToUsers <> "" And MsgToUsersNot1 <> "" Then
If GetUser(uRec, First) Then
t = 0
Do While GetNextUser(uRec)
If uRec.SecLevel <> MsgToUsersNot1 Then
If SendUser(Msg) Then
AddMessage Msg, MsgToUsers
t = t + 1
Print #1, " ! MSGTOUSERS1 sent to : " ; uRec.Name ; ", sucessfully"
End If
End If
Loop
Print ""
Print "A total of @0B@" ; t ; "@0E@ Message(s) were sent."
WaitEnter
End If
End If
End If
Case "C"
CLS
Locate 2,1
Print " wcPOST v" + wcPv + ", Send a Message to ONE Security Level Option"
Locate 5,1
Print " This selection will allow you to send a text file to any ONE"
Print "Security Level you wish. Pretty simple."
Print ""
Locate 10,1
MsgToUsers = Trim(InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
MsgToUsersOnly = Trim(InputMask("Please enter the Security Level to Send the Message to : ", "XXXXXXXXXX"))
SendOk = False
SendOk = InputYesNo("Do you wish to continue ?")
If SendOk = True Then
If MsgToUsers <> "" And MsgToUsersOnly <> "" Then
If GetUser(uRec, First) Then
t = 0
Do While GetNextUser(uRec)
If uRec.SecLevel = MsgToUsersOnly Then
If SendUser(Msg) Then
AddMessage Msg, MsgToUsers
t = t + 1
Print #1, " ! MSGTOALL sent to : " ; uRec.Name ; ", sucessfully"
End If
End If
Loop
Print ""
Print "A total of @0B@" ; t ; "@0E@ Message(s) were sent."
WaitEnter
End If
End If
End If
Case "D"
Locate 2,1
Print " wcPOST v" + wcPv + ", Send a Message to ALL Users at once"
Locate 5,1
Print " This selection allows you to send a message to ALL of your Users"
Print "at one time. This is by far the easiest command to use to get more"
Print "information to ALL of your Users."
Locate 10,1
MsgToUsers = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
SendOk = False
SendOk = InputYesNo("Do you wish to continue ? ")
If SendOk = True Then
If MsgToUsers <> "" Then
If GetUser(uRec, First) Then
t = 0
Do While GetNextUser(uRec)
If SendUser(Msg) Then
AddMessage Msg, MsgToUsers
t = t + 1
Print #1, " ! MSGTOUSERS1 sent to : " ; uRec.Name ; ", sucessfully"
End If
Loop
Print ""
Print "A total of @0B@" ; t ; "@0E@ Message(s) were sent."
WaitEnter
End If
End If
End If
Case "E"
Shell
Case "Q"
Exit Do
Case Else
Print "Not a valid Selection, please try again."
Beep
WaitEnter
End Select
Loop
Close