Subversion Repositories wimsdev

Rev

Rev 17882 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17882 Rev 18171
Line 1... Line 1...
1
!! decide if right is open or note for the user according to the file .E$exam .S$seq or .$sheet
1
!! decide if right is open or not for the user according to the file .E$exam .S$seq .$sheet or .F$freework
2
!! wims_read_parm : file name
2
!! wims_read_parm : file name
3
!! output : output=yes output=no
3
!! output : output=yes output=no
4
!!          condition= the condition string
4
!!          condition= the condition string
5
!!          accessstart= starting access date, if not empty
5
!!          accessstart= starting access date, if not empty
6
!!          accessend= ending access date, if not empty
6
!!          accessend= ending access date, if not empty
Line 50... Line 50...
50
      !else
50
      !else
51
        IP_=!text select 0123456789.  in $l_
51
        IP_=!text select 0123456789.  in $l_
52
      !endif
52
      !endif
53
    !endif
53
    !endif
54
  !next l_
54
  !next l_
55
!!  !! ------ test for IP
55
  !! ------ test for IP
56
!!  !! TODO this test is not operationnel
56
  !! use function checkhost
57
!!  !! need to be careful: like this, it only works for IP (not for dns names)
-
 
58
!!  !if $IP_!=$empty_
57
  !if $IP_!=$empty_
59
!!    nb_=!charcnt $IP_
58
    nb_=!charcnt $IP_
60
!!    user_=!char 1 to $nb_ of http_REMOTE_ADDR
59
    test_=!checkhost $IP_
61
!!    !if $user_!=$IP_
60
    !if $test_!=1
62
!!      output=no
61
      output=no
63
!!      !exit
62
      !exit
64
!!    !endif
63
    !endif
65
!!  !endif
64
  !endif
66
  now_=!text select char 0123456789 in $wims_now
65
  now_=!text select char 0123456789 in $wims_now
67
  now_=!char 1 to 12 of $now_
66
  now_=!char 1 to 12 of $now_
68
  !! ----- test for expiration
67
  !! ----- test for expiration
69
  !if $accessend!=$empty
68
  !if $accessend!=$empty
70
    !if $now_>$accessend
69
    !if $now_>$accessend