Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_abort_if_admin.kix

(view source code of login_abort_if_admin.kix as plain text)

  1. ; Get the current date in YYYYMMDD format
  2.  
  3. $Today = "@YEAR" + Right( "0@MONTHNO", 2 ) + Right( "0@MDAYNO", 2 )
  4.  
  5. ; Create the directory if it doesn't exist
  6. If Exist( "\\Server\Logs\$Today\*.*" ) = 0
  7. 	MD "\\Server\Logs\$Today"
  8. EndIf
  9.  
  10. ; Log current computer access
  11. If RedirectOutput( "\\Server\Logs\$Today\@USERID.log" ) = 0
  12. 	"@WKSTA,@USERID,@DATE,@TIME,@PRIV@CRLF"
  13. 	$RC = RedirectOutput( "" )
  14. EndIf
  15.  
  16. ; Administrators should quit now
  17. If @PRIV = "ADMIN"
  18. 	Quit 1
  19. EndIf

page last modified: 2024-04-16; loaded in 0.0186 seconds