Subversion Repositories wimsdev

Rev

Rev 15998 | Rev 16153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15998 Rev 16143
Line 1... Line 1...
1
 
1
 
2
!bound seq between integer 1 and $seq_cnt+1 default $empty
2
!bound seq between integer 1 and $seq_cnt+1 default $empty
-
 
3
jquery_defined=!defof jquery_defined in themes/$wims_theme/header.phtml
3
 
4
 
4
!if $cf_abandon!=$empty or $seq=$empty
5
!if $cf_abandon!=$empty or $seq=$empty
5
  !reset cf_abandon
6
  !reset cf_abandon
6
  job=show
7
  job=show
7
  !exit
8
  !exit
Line 9... Line 10...
9
 
10
 
10
!if $seq>$maxseq
11
!if $seq>$maxseq
11
  error=toomanyseq
12
  error=toomanyseq
12
  !exit
13
  !exit
13
!endif
14
!endif
-
 
15
 
-
 
16
!readproc adm/vfilter/listvarfilter.proc
14
 
17
 
15
!if $cmd=reply
18
!if $cmd=reply
16
  seq_desc=!replace internal $\
19
  seq_desc=!replace internal $\
17
$ by $ $ in $seq_desc
20
$ by $ $ in $seq_desc
18
  seq_title=!char 1 to $title_limit of $seq_title
21
  seq_title=!char 1 to $title_limit of $seq_title
19
  seq_desc=!char 1 to $desc_limit of $seq_desc
22
  seq_desc=!char 1 to $desc_limit of $seq_desc
20
  new_data=:$seq_title\
23
  new_data=:$seq_title\
21
$seq_desc
24
$seq_desc
22
  !! ---- check hidedate and showdate
25
!!  !! ---- check hidedate and showdate
23
  today=!char 1 to 8 of $wims_now
26
!!  today=!char 1 to 8 of $wims_now
24
  thisyear=!char 1 to 4 of $today
27
!!  thisyear=!char 1 to 4 of $today
25
  !for k in hide,show
28
!!  !for k in hide,show
26
    $(k)date=!text select char 0123456789 in $($(k)date)
29
!!    $(k)date=!text select char 0123456789 in $($(k)date)
27
    expmon=!char 5 to 6 of $($(k)date)
30
!!    expmon=!char 5 to 6 of $($(k)date)
28
    expday=!char 7 to 8 of $($(k)date)
31
!!    expday=!char 7 to 8 of $($(k)date)
29
    expyear=!char 1 to 4 of $($(k)date)
32
!!    expyear=!char 1 to 4 of $($(k)date)
30
    !if $expday<1 or $expday>31 or $expmon<1 or $expmon>12 \
33
!!    !if $expday<1 or $expday>31 or $expmon<1 or $expmon>12 \
31
      or $expyear<$thisyear or $expyear>$thisyear+1 \
34
!!      or $expyear<$thisyear or $expyear>$thisyear+1 \
32
      or $($(k)date)<$class_creation \
35
!!      or $($(k)date)<$class_creation \
33
      or $($(k)date)>$class_expiration \
36
!!      or $($(k)date)>$class_expiration \
34
      or N isin $expmon$expday$expyear \
37
!!      or N isin $expmon$expday$expyear \
35
      or $($(k)date)<=$today
38
!!      or $($(k)date)<=$today
36
      !reset $(k)date
39
!!      !reset $(k)date
-
 
40
!!    !endif
-
 
41
!!  !next k
-
 
42
 
-
 
43
!! ------ save 
-
 
44
 
-
 
45
 
-
 
46
!! ------  manage of allow
-
 
47
    !if $tv_listname=$empty
-
 
48
      !bound allowtype within all,none,select default all
-
 
49
    !else
-
 
50
      !bound allowtype within all,none,select,techvar default all
-
 
51
    !endif
-
 
52
    !read adm/scorerestriction get
-
 
53
    IPlist=$_output
-
 
54
    IPlist=!translate ,;\
-
 
55
* to $    $ in $IPlist
-
 
56
    IPlist=!trim $IPlist
-
 
57
    !if $allowtype=select and $IPlist=$empty and $save!=$empty
-
 
58
      allowtype=all
-
 
59
    !endif
-
 
60
    !if $allowtype=all
-
 
61
      allow_parm=
-
 
62
    !endif
-
 
63
    !if $allowtype=none
-
 
64
      allow_parm=none
-
 
65
    !endif
-
 
66
    !if $allowtype=select
-
 
67
      allow_parm=$IPlist
-
 
68
    !endif
-
 
69
  old_allowtype=$allowtype
-
 
70
  old_allowtechvar=$allowtechvar
-
 
71
    !if $allowtype=techvar
-
 
72
      !readproc adm/vfilter/shexselect.proc .S$seq
-
 
73
    !endif
-
 
74
 
-
 
75
  !! ---- save modification of allow parameters for sequence
-
 
76
  !if $save!=$empty
-
 
77
    !if $sharers!=$empty and $allowshare=1
-
 
78
      setclass=!items2words $wims_class,$sharers
-
 
79
      setclass=!words2items $setclass
-
 
80
    !else
-
 
81
      setclass=$wims_class
-
 
82
    !endif
-
 
83
    !if $allow_parm=$empty
-
 
84
      !sh for c in $setclass; do rm -f $wims_home/log/classes/$$c/.S$seq; done
-
 
85
    !else
-
 
86
      !for c in $setclass
-
 
87
        !writefile wimshome/log/classes/$c/.S$seq $allow_parm
-
 
88
      !next c
37
    !endif
89
    !endif
-
 
90
    wims_class_log=sequence $seq allow $allowtype $allowshare by $wims_realuser
38
  !next k
91
  !endif
-
 
92
  !! ---- end of saving
39
 
93
 
-
 
94
 
-
 
95
!! -------- end manage of allow
-
 
96
 
-
 
97
 
40
 
98
 
41
  !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt
99
  !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt
42
  !set listc=!filelist $wims_home/log/classes/$wims_class/doc
100
  !set listc=!filelist $wims_home/log/classes/$wims_class/doc
43
  !set listc=!lines2items $listc
101
  !set listc=!lines2items $listc
44
  !set listc=!replace internal c by c_$ $ in $listc
102
  !set listc=!replace internal c by c_$ $ in $listc
Line 66... Line 124...
66
  !next j
124
  !next j
67
  list=!replace internal _ by $ $ in $(listfinal)
125
  list=!replace internal _ by $ $ in $(listfinal)
68
  new_data=!append line $list to $new_data
126
  new_data=!append line $list to $new_data
69
  !bound visible within 0,1 default 0
127
  !bound visible within 0,1 default 0
70
  !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\
128
  !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\
71
$visible\
129
$visible
-
 
130
 
72
$hidedate\
131
!!$hidedate\
73
$showdate
132
!!$showdate
74
 
133
 
75
  s_ =!record 0 of .sequences
134
  s_ =!record 0 of .sequences
76
  s_=!line 2 to -1 of s_
135
  s_=!line 2 to -1 of s_
77
  !if $seq= $[$seq_cnt+1]
136
  !if $seq= $[$seq_cnt+1]
78
    seq_cnt=$[$seq_cnt+1]
137
    seq_cnt=$[$seq_cnt+1]
79
    !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\
138
    !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\
80
    $s_
139
    $s_
81
  !endif
140
  !endif
82
!endif
141
!endif
-
 
142
 
-
 
143
!! --- read saving configuration for allow parameters initial time and after saving 
-
 
144
  !if $allow=$empty or $save!=$empty
-
 
145
    !readproc adm/vfilter/shexread.proc S$seq
-
 
146
    !! to distribute IPlist content into variable
-
 
147
    !read adm/scorerestriction put\
-
 
148
$IPlist
-
 
149
  !endif
-
 
150
  old_allowtype=$allowtype
-
 
151
  old_allowtechvar=$allowtechvar
-
 
152
  !reset allow,save
-
 
153
!! --- end of reading
-
 
154