Rev 5815 | Rev 13617 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $cmd=help |
2 | ses=!replace internal _mhelp by in $wims_session |
||
3 | !else |
||
4 | ses=$wims_session |
||
5 | !endif |
||
6 | input=$wims_read_parm |
||
7 | !default input=wimshome/sessions/$ses/submit.oef |
||
8 | !default embraced_randitem=help |
||
9 | |||
10 | !reset sps parms desc explain statement statementrec helpst |
||
11 | cnt=!recordcnt $input |
||
12 | |||
13 | !if $cnt<6 |
||
14 | !exit |
||
15 | !endif |
||
16 | |||
17 | lbrace={ |
||
18 | |||
19 | r=!record 0 of $input |
||
20 | model_def=$r |
||
21 | model_type=!getopt type in $r |
||
22 | model_textarea=!getopt textarea in $r |
||
23 | model_textarea=!items2words $model_textarea |
||
8515 | obado | 24 | model_asis=!getopt asis in $r |
25 | model_asis=!items2words $model_asis |
||
23 | reyssat | 26 | model_author=!getopt author in $r |
4846 | bpr | 27 | model_email=!getopt email in $r |
5815 | bpr | 28 | model_css=!getopt css in $r |
23 | reyssat | 29 | model_random=!getopt random in $r |
30 | model_random=!items2words $model_random |
||
31 | model_computed=!getopt computed in $r |
||
32 | model_computed=!items2words $model_computed |
||
33 | model_helped=$model_random $model_computed |
||
34 | model_menutester=item( |
||
35 | |||
36 | r=!record 1 of $input |
||
37 | r=!trim $r |
||
38 | desc=!line 1 of $r |
||
39 | help1=!line 2 to -1 of $r |
||
40 | |||
41 | !if $wims_developer!= |
||
42 | !read adm/getdeveloper |
||
43 | !endif |
||
44 | |||
45 | !for i=2 to $cnt |
||
46 | r=!record $i of $input |
||
47 | r=!trim $r |
||
48 | n=!linecnt $r |
||
49 | c=!char 1 of $r |
||
50 | !if \ = $c |
||
51 | v=!translate internal \{} to $ $ in $r |
||
52 | v=!word 1 of $v |
||
5724 | bpr | 53 | !if $v iswordof title author email css credits |
23 | reyssat | 54 | name$i=$v |
55 | model_$v=!embraced extract $r |
||
56 | !if $oef_author!=$empty |
||
4846 | bpr | 57 | !default model_author=$oef_author |
58 | !default model_email=$oef_email |
||
23 | reyssat | 59 | !endif |
60 | val$i=$(model_$v) |
||
61 | sps=!append item $i to $sps |
||
62 | !endif |
||
63 | !goto loopend |
||
64 | !endif |
||
65 | !if $c=% |
||
66 | !goto loopend |
||
67 | !endif |
||
68 | !if $c=: |
||
69 | !for j=1 to $n |
||
70 | l=!line $j of $r |
||
71 | l=!trim $l |
||
72 | c=!char 1 of $l |
||
73 | !if \ = $c |
||
74 | statement=!line $j to -1 of $r |
||
75 | statement=!embraced extract $statement |
||
76 | statementrec=$i |
||
77 | !break |
||
78 | !else |
||
79 | helpst=!append line $l to $helpst |
||
80 | !endif |
||
81 | !next j |
||
82 | !goto loopend |
||
83 | !endif |
||
84 | title$i=!line 1 of $r |
||
85 | !reset help$i name$i type$i menu$i |
||
86 | !for j=2 to $n |
||
87 | l=!line $j of $r |
||
88 | l=!trim $l |
||
89 | c=!char 1 of $l |
||
90 | !if \ = $c |
||
91 | def=!line $j to -1 of $r |
||
92 | t=!positionof char $lbrace in $def |
||
93 | t=!item 1 of $t |
||
94 | type=!char 2 to $t-1 of $def |
||
95 | type$i=!word 1 of $type |
||
96 | def=!char $t to -1 of $def |
||
97 | def=!trim $def |
||
98 | def=!declosing $def |
||
99 | c=!char 1 of $def |
||
100 | !if $c=$lbrace |
||
101 | !goto loopend |
||
102 | !endif |
||
103 | t=!positionof char = in $def |
||
104 | t=!item 1 of $t |
||
105 | !if $t=$empty |
||
106 | !goto loopend |
||
107 | !endif |
||
108 | name=!char 1 to $t-1 of $def |
||
109 | name$i=!word 1 of $name |
||
110 | val$i=!char $t+1 to -1 of $def |
||
111 | !if $(type$i)=text |
||
112 | val$i=!trim $(val$i) |
||
113 | menutest=!char 1 to 5 of $(val$i) |
||
114 | !if $menutest=$model_menutester |
||
115 | menu$i=!char 6 to -2 of $(val$i) |
||
116 | val$i=!item 1 of $(menu$i) |
||
117 | menu$i=!item 2 to -1 of $(menu$i) |
||
118 | !endif |
||
119 | !endif |
||
120 | !break |
||
121 | !else |
||
122 | help$i=!append line $l to $(help$i) |
||
123 | !endif |
||
124 | !next j |
||
125 | !if $(name$i)!=$empty |
||
126 | parms=!append item $i to $parms |
||
127 | !endif |
||
128 | :loopend |
||
129 | !next i |