1 / 64

; Messy source? .. hum.. who gives a shit?

; Messy source? .. hum.. who gives a shit?. STRING NAME,K, NUPPER, PAGER, NUPPIE, NUP, F, PWD, CHATPPE. BOOLEAN USENUP, USEPAGE. INTEGER CHOSEN, TRIES, X, MAXTRIES, pwdtries, Y. PRINT "@POFF@". FOPEN 0, PPEPATH()+"LOGIN.CFG", O_RW, S_DB. FGET 0, NUPPER. FGET 0, PAGER. FGET 0, CHATPPE.

coral
Download Presentation

; Messy source? .. hum.. who gives a shit?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ; Messy source? .. hum.. who gives a shit?

  2. STRING NAME,K, NUPPER, PAGER, NUPPIE, NUP, F, PWD, CHATPPE

  3. BOOLEAN USENUP, USEPAGE

  4. INTEGER CHOSEN, TRIES, X, MAXTRIES, pwdtries, Y

  5. PRINT "@POFF@"

  6. FOPEN 0, PPEPATH()+"LOGIN.CFG", O_RW, S_DB

  7. FGET 0, NUPPER

  8. FGET 0, PAGER

  9. FGET 0, CHATPPE

  10. FGET 0, NUPPIE

  11. FGET 0, MAXTRIES

  12. FCLOSE 0

  13. IF (UPPER(NUPPER) = "NO") THEN USENUP = TRUE • ELSE USENUP = FALSE • endif

  14. IF (UPPER(PAGER) = "NO") THEN USEPAGE = TRUE • ELSE USENUP = FALSE • endif

  15. :entername

  16. if (tries > MAXTRIES-1) then • Cls • PRINTLN "@X02TOO MANY NAME TRiES" • DTROFF • HANGUP • ENDIF

  17. CLS

  18. DISPFILE PPEPATH()+"LOGIN.PCB", GRAPH

  19. Ansipos 19,4

  20. :NotJustEnterDumbAss

  21. INPUTSTR "_", NAME, 7, 50, MASK_ASCII()+"›‘†’", UPCASE

  22. if (NAME = "") then goto NotJustEnterDumbAss: endif

  23. if (U_RECNUM(NAME) = -1) then

  24. :menu

  25. Ansipos 32,11: PRINT "@X02eSC = lOGOFF" • AnsiPos 3,9 • Print "@X04|-@X02CONTiNUE@X04-@X02AS@X04-@X02NEWUSER@X04-|" • chosen = 1

  26. :d • k = inkey() • IF (k = chr(27)) then • DISPFILE PPEPATH()+"LOGOFF.PCB", GRAPH • DTROFF • HANGUP • ENDIF • if (k = chr(13)) then goto checkwhat: endif • if (k = "RIGHT") then • inc chosen • if (chosen = 2) then • AnsiPos 3, 9 • Print "@X02|-CONTiNUE-AS-NEWUSER-|" • AnsiPos 29,9 • Print "@X04|----@X02RE-ENTER@X04-@X02NAME@X04----|" • chosen = 2 • endif • if (chosen = 3) then • Ansipos 29,9 • Print "@X02|----RE-ENTER-NAME----|" • Ansipos 55,9 • Print "@X04|-----@X02PAGE@X04-@X02SYSOP!@X04-----|" • chosen = 3 • endif • if (chosen = 4) then • Ansipos 55,9 • Print "@X02|-----PAGE-SYSOP!-----|" • Ansipos 3,9 • Print "@X04|-@X02CONTiNUE@X04-@X02AS@X04-@X02NEWUSER@X04-|" • chosen = 1 • endif • endif • if (k = "LEFT") then

  27. dec chosen • if (chosen = 2) then • Ansipos 55,9

  28. Print "@X02|-----PAGE-SYSOP!-----|" • AnsiPos 29,9 • Print "@X04|----@X02RE-ENTER@X04-@X02NAME@X04----|" • chosen = 2 • endif • if (chosen = 0) then • AnsiPos 3, 9 • Print "@X02|-CONTiNUE-AS-NEWUSER-|" • Ansipos 55,9 • Print "@X04|-----@X02PAGE@X04-@X02SYSOP!@X04-----|" • chosen = 3 • endif • if (chosen = 1) then • Ansipos 29,9 • Print "@X02|----RE-ENTER-NAME----|" • Ansipos 3,9 • Print "@X04|-@X02CONTiNUE@X04-@X02AS@X04-@X02NEWUSER@X04-|" • chosen = 1 • endif • endif • goto d

  29. ELSE

  30. GetALTuser U_RECNUM(NAME) • ANSIPOS 19, 6 • PRINT "@X02"+U_CITY

  31. :pwdenter

  32. inc pwdtries

  33. if (pwdtries > Maxtries) then • DISPFILE PPEPATH()+"WRONGPWD.PCB", GRAPH • DTROFF • HANGUP • ENDIF

  34. Ansipos 19,5

  35. InputStr "_", PWD, 7, 50, MASK_ASCII()+"›‘†’", ECHODOTS

  36. if (UPPER(PWD) = UPPER(U_PWD)) THEN • ANSIPOS 19, 6 • PRINT " " • GOTO LOGIN

  37. else • ANSIPOS 19, 6 • PRINT "@X04Wrong Password Entered, Tries Left : ",MAXTRIES-PwdTries • Pwd = "" • AnsiPos 19, 5 • Print " " • goto PwdEnter

  38. endif

  39. ENDIF

  40. :LOGIN

  41. kbdstuff NAME+CHR(13)+CHR(13)

  42. kbdstuff PWD+CHR(13)

  43. CLS

  44. goto endie

  45. :checkwhat

  46. if (chosen = 1) then • if (USENUP = FALSE) THEN CALL NUPPER • else • CLS • PRINTLN "@X01|-----------------------------------------------------------------------------|" • PRINTLN " @X02ENTER NUP: " • PRINTLN "@X01|-----------------------------------------------------------------------------|" • ANSIPOS 13,2 • INPUTSTR "_", NUP, 7, 30, MASK_ASCII()+"›‘†’", UPCASE • IF (UPPER(NUP) = UPPER(NUPPIE)) THEN • DISPFILE PPEPATH()+"CORRECT.PCB", GRAPH • ELSE • DISPFILE PPEPATH()+"WRONG.PCB", GRAPH • DTROFF • HANGUP • ENDIF • ENDIF

  47. ENDIF

  48. IF (Chosen = 2) then • inc tries • goto entername • endif

  49. IF (Chosen = 3) then • CLS • PRINTLN "@X02PAGiNG SYSOP ..." • PRINTLN "@X01|-------------------------------------|" • PRINTLN "" • PRINTLN "@X01|-------------------------------------|@X02"

  50. print "@X8F"

More Related