home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / WCVFY.ZIP / WCVFYUTL.WCC < prev    next >
Text File  |  1994-10-11  |  5KB  |  124 lines

  1. Type TempRecord
  2.    Name As String*25
  3.    Phone As String*15
  4.    Data As String*15
  5.    Fax As String*15
  6.    SecLevel As String*10
  7. End Type
  8.  
  9. Dim wcVfyV As String
  10. Dim uRec As UserRecord
  11. Dim tRec As TempRecord
  12. Dim Selection As String*1
  13. Dim Exclude As String*10
  14. Dim Today As DateTime
  15. Dim GO As Integer
  16. Dim FName As String
  17. Dim FView As Integer
  18. Dim First As String
  19. CurrentDateTime(Today)
  20. wcVfyV = "1.01"
  21.  
  22. Do
  23.   CLS
  24.   Locate 2,1
  25.   Print "                          @0F@wcVFY Utility@0E@ v@0F@" + wcVfyV + "@0E@"
  26.   Print "                       written by @0F@Stephen Barclay@0E@"
  27.   Locate 6,1
  28.   Print "          [A] Create WCVFY.DAT file, for Dupe Checking"
  29.   Print "          [B] Export User List from WCVFY.DAT to a File"
  30.   Print "          [C] View WCVFY.LOG File"
  31.   Print " "
  32.   Print "          [Q] Quit and Exit Program"
  33.   Print " "
  34.   Print "          Please select [@0F@A B C Q@0E@] ? " ;
  35.   Input Selection
  36.      Select Case uCase(Selection)
  37.       Case "A"
  38.         CLS
  39.         Locate 2,1
  40.         Print "                    Welcome to the wcVFY Data creator"
  41.         Locate 4,1
  42.         Print "   This Program will create a WCVFY.DAT file in your Wildcat Home Dir,"
  43.         Print "this is usually only preformed ONCE!  It will export the Phone, Data,"
  44.         Print "and Fax Numbers from your Current Users.  It will NOT export the Numbers"
  45.         Print "for a specific Profile that you may specify in a moment."
  46.         Locate 10,1
  47.         Print "   This file (WCVFY.DAT) will be used by wcVFY Call-Back Verifier program "
  48.         Print "that is distributed by Stephen Barclay.  This program will also update"
  49.         Print "the phone numbers after a User has been validated.  Also included in the"
  50.         Print "program is Log Creating ability.  It will capture the time, date, and "
  51.         Print "other information which may be usefull to you.  You can also use it to"
  52.         Print "post a message to yourself once someone is validated."
  53.         WaitEnter
  54.         CLS
  55.         Locate 4,1
  56.         Print "Please make sure if you EXCLUDE a Security Profile it is typed in"
  57.         Print "UPPER CASE and also is a valid Security Profile in Makewild."
  58.         Print "Pressing [ENTER] will include ALL Security Levels."
  59.         Locate 8,1
  60.         Print "Which Security Level would you like to exclude? " ;
  61.         Input Exclude
  62.          If Exclude <> "" Then
  63.             Locate 10,1
  64.                Print " The Security Profile of @0F@" ; Exclude ; "@0E@ will not be added to the database."
  65.          End If
  66.  
  67.         Open "wcvfy.dat" For Random As #1 Len = Len(TempRecord)
  68.         First = ""
  69.         If GetUser(uRec, First) Then
  70.           Do While GetNextUser(uRec)
  71.            If uRec.SecLevel <> Exclude Then
  72.              tRec.Name = Pad(uRec.Name, 25)
  73.              tRec.Phone = uRec.PhoneNumber
  74.              tRec.Data = uRec.DataNumber
  75.              tRec.Fax = uRec.FaxNumber
  76.              tRec.Seclevel = Pad(uRec.SecLevel, 10)
  77.                If tRec.Phone <> "" Then
  78.                  Put #1,, tRec
  79.                End If
  80.            End If
  81.            Loop
  82.            Close
  83.          End If
  84.          Locate 15,1
  85.          Print "........All Done, the DATA file was created successfully!"
  86.          WaitEnter
  87.       Case "B"
  88.         Print ""
  89.         GO = InputYesNo("Would you like to export the Users to a text file? ")
  90.         If GO = True Then
  91.            FName = InputMask ("Please give me a vaild 8 character Dos file Name (No Numbers): ", "XXXXXXXX")
  92.            Dim g As Integer
  93.            Open "wcvfy.dat" For Random As #1 Len = Len(TempRecord)
  94.            Open FName + ".lst" For Output As #2
  95.            g = 1
  96.            Print #2, "           wcVFY User Listing, at " ; FormatTime(Today.t, "hh:mm:ss") ; " on " ; FormatDate(Today.d, "mm/dd/yy")
  97.            Print #2, ""
  98.            Print #2, " User Name                 Home Phone     Data Phone    Fax Phone "
  99.            Print #2, "---------------------------------------------------------------------"
  100.              Do While Not (EOF(1))
  101.                g = g + 1
  102.                Get #1, g, tRec
  103.                Print #2, Pad(tRec.Name,25) + " " ; tRec.Phone + "   " ; tRec.Data + "   " ; tRec.Fax
  104.              Loop
  105.              Close
  106.         End If
  107.         Print "All Done..."
  108.         FView = InputYesNo ("Would you like to view the file? ")
  109.         If FView = True Then
  110.           DisplayTextFile FName + ".lst"
  111.           WaitEnter
  112.         End If
  113.       Case "C"
  114.          DisplayTextFile "wcvfy.log"
  115.          WaitEnter
  116.       Case "Q"
  117.          Exit Do
  118.       Case Else
  119.          Print "Not a valid selection, please try again"
  120.          Beep
  121.          WaitEnter
  122.      End Select
  123. Loop
  124.