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