Rev 5471 | Rev 8256 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $wims_class=$empty or $wims_user=$empty |
2 | error=not_class |
||
3 | !exit |
||
4 | !endif |
||
1407 | bpr | 5 | !if $seq!= |
6 | !set wims_sequence=$seq |
||
7 | !endif |
||
5369 | bpr | 8 | !read adm/lang/date.phtml.$moduclass_lang |
4951 | bpr | 9 | limit_textarea=600 |
10 | |||
23 | reyssat | 11 | wims_nw=votedir Votedir userdef vote Vote job empty |
12 | wims_nr=wims_sesrandom |
||
13 | Votedir=classes/$wims_class/vote |
||
14 | votedir=wimshome/log/$Votedir |
||
15 | !read adm/class/userdef classes,$wims_class,$wims_user |
||
16 | userfile=$userdef |
||
2369 | bpr | 17 | !read adm/class/classlang names.phtml |
18 | |||
23 | reyssat | 19 | !bound vote between integer 1 and 64 default 0 |
20 | |||
5369 | bpr | 21 | |
22 | !default gstep=0 |
||
23 | |||
23 | reyssat | 24 | vote_class=!defof sharing_vote in wimshome/log/classes/$wims_class/neighbors |
25 | !default vote_class=$wims_class |
||
26 | !default wims_superclass=$wims_class |
||
27 | !if $wims_superclass != $wims_class |
||
28 | Votevar=!replace internal $wims_superclass/ by $ in $vote_class |
||
29 | Votevar=!translate internal / to _ in $Votevar |
||
30 | Vote=$(Votevar)_$vote |
||
31 | !else |
||
32 | Vote=$vote |
||
33 | Votevar= |
||
34 | !endif |
||
35 | |||
36 | !if $rEg!=$empty |
||
37 | job=reg |
||
38 | rEg= |
||
39 | !endif |
||
40 | !if $abandon!=$empty |
||
5369 | bpr | 41 | !!!FIXME edit or home |
42 | job=edit |
||
43 | !set gstep=$[max($gstep-2,0)] |
||
23 | reyssat | 44 | abandon= |
45 | !endif |
||
5369 | bpr | 46 | |
4142 | guerimand | 47 | readjobs=home,read,help,vote,showresult |
7998 | bpr | 48 | editjobs=creat,guided,edit,reg,erase,preview,csv,getsource |
23 | reyssat | 49 | !if $wims_user=supervisor |
50 | !bound job within $readjobs,$editjobs default home |
||
51 | !else |
||
52 | !bound job within $readjobs default home |
||
53 | !endif |
||
54 | !if $job=help or robot isin $session |
||
55 | !exit |
||
56 | !endif |
||
57 | |||
58 | !read tabletheme |
||
59 | !for i=1 to 64 |
||
60 | m_parm$i=$(parm$i) |
||
61 | !next i |
||
62 | |||
63 | votecnt=!recordcnt $votedir/.votes |
||
217 | bpr | 64 | !if $votecnt<1 and $job notwordof reg creat csv |
23 | reyssat | 65 | job=home |
66 | !changeto home.proc |
||
67 | !endif |
||
68 | !if $job=creat |
||
5369 | bpr | 69 | !reset gstep |
23 | reyssat | 70 | !if $votecnt>=64 |
71 | error=too_many_votes |
||
72 | !exit |
||
73 | !else |
||
74 | vote=$[$votecnt+1] |
||
4142 | guerimand | 75 | !increase votecnt |
23 | reyssat | 76 | job=edit |
77 | !endif |
||
78 | !endif |
||
79 | |||
5340 | czzmrn | 80 | !default vote_model=$reg_model |
23 | reyssat | 81 | !if $vote>0 and $vote<=$votecnt |
82 | vdata=!record $vote of $votedir/.votes |
||
5340 | czzmrn | 83 | !distribute lines $vdata into vote_status,vote_title,vote_option,vote_show,vote_whovoteshow,vote_model |
23 | reyssat | 84 | !default vote_option=anonymous |
85 | !default vote_status=0 |
||
86 | !default vote_show=1 |
||
5340 | czzmrn | 87 | !! !default vote_model=free |
23 | reyssat | 88 | vote_src=!record 0 of $votedir/$vote.src |
89 | !endif |
||
5340 | czzmrn | 90 | !default reg_model=$vote_model |
5369 | bpr | 91 | !! at some gstep these variables are not in the form but are required by reg.proc, so |
92 | !! we need to be sure to have found defaults |
||
93 | !default reg_status=$vote_status |
||
94 | !default reg_option=$vote_option |
||
95 | !default reg_show=$vote_show |
||
5471 | bpr | 96 | !default reg_whovoteshow=$vote_whovoteshow |
23 | reyssat | 97 | !if $vote<1 |
98 | job=home |
||
99 | !endif |
||
100 | |||
5369 | bpr | 101 | !set vmodellist=accessvar,group |
102 | !set name_vmodellist=$(name_accessvar), $(name_group) |
||
5297 | czzmrn | 103 | |
23 | reyssat | 104 | !read $job.proc |
105 |