Subversion Repositories wimsdev

Rev

Rev 5297 | Rev 5369 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4142 guerimand 1
vcnt=!defof vcnt in wimshome/log/classes/$wims_class/vote/$vote.votes
4147 guerimand 2
!default vote_status=0
4950 bpr 3
!if $vote_status=0 or $vcnt=0 or $vcnt=$empty or $reg_src$vote_src=$empty
4142 guerimand 4
 !bound reg_status between integer 0 and 3 default 0
5
 !bound reg_option within anonymous,nominative,trace default anonymous
6
!else
7
 !bound reg_status between integer 1 and 3 default 1
8
 reg_option=$vote_option
9
!endif
23 reyssat 10
reg_title=!trim $reg_title
11
reg_title=!singlespace $reg_title
12
!bound reg_show within 0,1 default 1
2150 guerimand 13
!bound reg_whovoteshow within 0,1 default 0
23 reyssat 14
!if $reg_title=$empty
4950 bpr 15
  reg_status=0
23 reyssat 16
 error=no_title
17
 :edit
18
 job=edit
19
 !changeto edit.proc
20
!endif
21
reg_src=!trim $reg_src
5297 czzmrn 22
!! FIXME: for models I need to bypass this error. Anyway there is
23
!!        no real syntax check, so is it really useful?
24
!!
25
!! !if $reg_src=$empty and $vote>$votecnt
26
!!    error=no_content
27
!!    reg_status=0
28
!!  !goto edit
29
!! !endif
23 reyssat 30
 
31
!for i=1 to $votecnt
32
 v_$i=!record $i of $votedir/.votes
33
!next i
34
 
35
v_$vote=$reg_status\
36
$reg_title\
37
$reg_option\
2150 guerimand 38
$reg_show\
5340 czzmrn 39
$reg_whovoteshow\
40
$reg_model
23 reyssat 41
 
42
!sh mkdir -p $wims_home/log/$Votedir
43
!writefile $votedir/.votes
44
 
45
!for i=1 to $[max($votecnt,$vote)]
46
 !appendfile $votedir/.votes :$(v_$i)
47
!next i
48
 
5297 czzmrn 49
!if $reg_src!=$empty and ($vote_status=0 or $mod_numsess>0)
23 reyssat 50
 !writefile $votedir/$vote.src $reg_src
51
 msg2wims_primitives=def define comment draw if for uservar\
52
	menu list radio mmenu mlist checkbox textarea
53
 !sh cd $wims_home; bin/msg2wims log/$Votedir/$vote.src log/$Votedir/$vote.def
54
!endif
55
 
4950 bpr 56
!if $reg_src=$empty and $vote_status=0
57
  !goto edit
58
!endif
23 reyssat 59
job=read
60
!read var.proc
61