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