Rev 16143 | Rev 16154 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1406 | bpr | 1 | |
3912 | bpr | 2 | !bound seq between integer 1 and $seq_cnt+1 default $empty |
16143 | guerimand | 3 | jquery_defined=!defof jquery_defined in themes/$wims_theme/header.phtml |
1406 | bpr | 4 | |
5 | !if $cf_abandon!=$empty or $seq=$empty |
||
12335 | bpr | 6 | !reset cf_abandon |
7 | job=show |
||
8 | !exit |
||
1406 | bpr | 9 | !endif |
10 | |||
11 | !if $seq>$maxseq |
||
12335 | bpr | 12 | error=toomanyseq |
13 | !exit |
||
1406 | bpr | 14 | !endif |
15 | |||
16143 | guerimand | 16 | !readproc adm/vfilter/listvarfilter.proc |
17 | |||
1406 | bpr | 18 | !if $cmd=reply |
15987 | guerimand | 19 | seq_desc=!replace internal $\ |
20 | $ by $ $ in $seq_desc |
||
15988 | guerimand | 21 | seq_title=!char 1 to $title_limit of $seq_title |
22 | seq_desc=!char 1 to $desc_limit of $seq_desc |
||
14049 | bpr | 23 | new_data=:$seq_title\ |
15998 | guerimand | 24 | $seq_desc |
16143 | guerimand | 25 | !! !! ---- check hidedate and showdate |
26 | !! today=!char 1 to 8 of $wims_now |
||
27 | !! thisyear=!char 1 to 4 of $today |
||
28 | !! !for k in hide,show |
||
29 | !! $(k)date=!text select char 0123456789 in $($(k)date) |
||
30 | !! expmon=!char 5 to 6 of $($(k)date) |
||
31 | !! expday=!char 7 to 8 of $($(k)date) |
||
32 | !! expyear=!char 1 to 4 of $($(k)date) |
||
33 | !! !if $expday<1 or $expday>31 or $expmon<1 or $expmon>12 \ |
||
34 | !! or $expyear<$thisyear or $expyear>$thisyear+1 \ |
||
35 | !! or $($(k)date)<$class_creation \ |
||
36 | !! or $($(k)date)>$class_expiration \ |
||
37 | !! or N isin $expmon$expday$expyear \ |
||
38 | !! or $($(k)date)<=$today |
||
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 |
||
15998 | guerimand | 51 | !endif |
16143 | guerimand | 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 |
||
16153 | guerimand | 71 | !if $allowtype=techvar |
72 | !readproc adm/vfilter/shexselect.proc .S$seq |
||
73 | !endif |
||
16143 | guerimand | 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 |
||
89 | !endif |
||
90 | wims_class_log=sequence $seq allow $allowtype $allowshare by $wims_realuser |
||
91 | !endif |
||
92 | !! ---- end of saving |
||
15998 | guerimand | 93 | |
1406 | bpr | 94 | |
16143 | guerimand | 95 | !! -------- end manage of allow |
96 | |||
97 | |||
98 | |||
14049 | bpr | 99 | !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt |
100 | !set listc=!filelist $wims_home/log/classes/$wims_class/doc |
||
101 | !set listc=!lines2items $listc |
||
102 | !set listc=!replace internal c by c_$ $ in $listc |
||
103 | !set listexam=!makelist exam_ i for i=1 to $examcnt |
||
104 | !set listsheet=!makelist sheet_ i for i=1 to $sheetcnt |
||
105 | !set listvote=!makelist vote_ i for i=1 to $votecnt |
||
106 | !set listtool=!makelist tool_ i for i=1 to $toolcnt |
||
107 | !set listglossary=!makelist glossary_ i for i=1 to $glossarycnt |
||
14769 | guerimand | 108 | !set listfreework=!makelist freework_ i for i=1 to $freeworkcnt |
109 | list=!nospace $listc,$listdoc,$listsheet,$listexam,$listvote,$listtool,$listglossary,$listfreework |
||
14049 | bpr | 110 | list=!nonempty items $list |
111 | list1=debut |
||
112 | !for x in $list |
||
113 | list1=!append item $($x) to $list1 |
||
114 | !next |
||
115 | list1=$(list1[2..-1]) |
||
116 | listcnt=!replace internal ,0, by , in ,$list1, |
||
117 | listcnt=!nonempty items $listcnt |
||
118 | listcnt=!itemcnt $listcnt |
||
119 | !for j = 1 to $listcnt |
||
120 | jj=!positionof item $j in $list1 |
||
121 | !if $jj!= |
||
122 | listfinal=!append item $(list[$jj]) to $listfinal |
||
123 | !endif |
||
14769 | guerimand | 124 | !next j |
14049 | bpr | 125 | list=!replace internal _ by $ $ in $(listfinal) |
126 | new_data=!append line $list to $new_data |
||
15989 | guerimand | 127 | !bound visible within 0,1 default 0 |
14049 | bpr | 128 | !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\ |
16143 | guerimand | 129 | $visible |
1406 | bpr | 130 | |
16143 | guerimand | 131 | !!$hidedate\ |
132 | !!$showdate |
||
133 | |||
14049 | bpr | 134 | s_ =!record 0 of .sequences |
135 | s_=!line 2 to -1 of s_ |
||
136 | !if $seq= $[$seq_cnt+1] |
||
137 | seq_cnt=$[$seq_cnt+1] |
||
138 | !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\ |
||
139 | $s_ |
||
140 | !endif |
||
1406 | bpr | 141 | !endif |
16143 | guerimand | 142 | |
143 | !! --- read saving configuration for allow parameters initial time and after saving |
||
16153 | guerimand | 144 | !if $save!=$empty |
16143 | guerimand | 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 |
||
16153 | guerimand | 152 | !reset save |
16143 | guerimand | 153 | !! --- end of reading |
154 |