Rev 5724 | Rev 8515 | 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 |
||
24 | model_author=!getopt author in $r |
||
4846 | bpr | 25 | model_email=!getopt email in $r |
5815 | bpr | 26 | model_css=!getopt css in $r |
23 | reyssat | 27 | model_random=!getopt random in $r |
28 | model_random=!items2words $model_random |
||
29 | model_computed=!getopt computed in $r |
||
30 | model_computed=!items2words $model_computed |
||
31 | model_helped=$model_random $model_computed |
||
32 | model_menutester=item( |
||
33 | |||
34 | r=!record 1 of $input |
||
35 | r=!trim $r |
||
36 | desc=!line 1 of $r |
||
37 | help1=!line 2 to -1 of $r |
||
38 | |||
39 | !if $wims_developer!= |
||
40 | !read adm/getdeveloper |
||
41 | !endif |
||
42 | |||
43 | !for i=2 to $cnt |
||
44 | r=!record $i of $input |
||
45 | r=!trim $r |
||
46 | n=!linecnt $r |
||
47 | c=!char 1 of $r |
||
48 | !if \ = $c |
||
49 | v=!translate internal \{} to $ $ in $r |
||
50 | v=!word 1 of $v |
||
5724 | bpr | 51 | !if $v iswordof title author email css credits |
23 | reyssat | 52 | name$i=$v |
53 | model_$v=!embraced extract $r |
||
54 | !if $oef_author!=$empty |
||
4846 | bpr | 55 | !default model_author=$oef_author |
56 | !default model_email=$oef_email |
||
23 | reyssat | 57 | !endif |
58 | val$i=$(model_$v) |
||
59 | sps=!append item $i to $sps |
||
60 | !endif |
||
61 | !goto loopend |
||
62 | !endif |
||
63 | !if $c=% |
||
64 | !goto loopend |
||
65 | !endif |
||
66 | !if $c=: |
||
67 | !for j=1 to $n |
||
68 | l=!line $j of $r |
||
69 | l=!trim $l |
||
70 | c=!char 1 of $l |
||
71 | !if \ = $c |
||
72 | statement=!line $j to -1 of $r |
||
73 | statement=!embraced extract $statement |
||
74 | statementrec=$i |
||
75 | !break |
||
76 | !else |
||
77 | helpst=!append line $l to $helpst |
||
78 | !endif |
||
79 | !next j |
||
80 | !goto loopend |
||
81 | !endif |
||
82 | title$i=!line 1 of $r |
||
83 | !reset help$i name$i type$i menu$i |
||
84 | !for j=2 to $n |
||
85 | l=!line $j of $r |
||
86 | l=!trim $l |
||
87 | c=!char 1 of $l |
||
88 | !if \ = $c |
||
89 | def=!line $j to -1 of $r |
||
90 | t=!positionof char $lbrace in $def |
||
91 | t=!item 1 of $t |
||
92 | type=!char 2 to $t-1 of $def |
||
93 | type$i=!word 1 of $type |
||
94 | def=!char $t to -1 of $def |
||
95 | def=!trim $def |
||
96 | def=!declosing $def |
||
97 | c=!char 1 of $def |
||
98 | !if $c=$lbrace |
||
99 | !goto loopend |
||
100 | !endif |
||
101 | t=!positionof char = in $def |
||
102 | t=!item 1 of $t |
||
103 | !if $t=$empty |
||
104 | !goto loopend |
||
105 | !endif |
||
106 | name=!char 1 to $t-1 of $def |
||
107 | name$i=!word 1 of $name |
||
108 | val$i=!char $t+1 to -1 of $def |
||
109 | !if $(type$i)=text |
||
110 | val$i=!trim $(val$i) |
||
111 | menutest=!char 1 to 5 of $(val$i) |
||
112 | !if $menutest=$model_menutester |
||
113 | menu$i=!char 6 to -2 of $(val$i) |
||
114 | val$i=!item 1 of $(menu$i) |
||
115 | menu$i=!item 2 to -1 of $(menu$i) |
||
116 | !endif |
||
117 | !endif |
||
118 | !break |
||
119 | !else |
||
120 | help$i=!append line $l to $(help$i) |
||
121 | !endif |
||
122 | !next j |
||
123 | !if $(name$i)!=$empty |
||
124 | parms=!append item $i to $parms |
||
125 | !endif |
||
126 | :loopend |
||
127 | !next i |