Mercurial > hgrepos > hgweb.cgi > s4
comparison y4-funcs.sh @ 13:f2204bd941d5
periodic
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 21 Jul 2015 10:13:33 +0900 |
parents | 3565d93c2fb1 |
children | 59b6b1c446c8 |
comparison
equal
deleted
inserted
replaced
12:262bbdea72e2 | 13:f2204bd941d5 |
---|---|
41 | 41 |
42 7/19 設置 | 42 7/19 設置 |
43 締切設定 | 43 締切設定 |
44 一斉送信 | 44 一斉送信 |
45 自分の提出物リスト | 45 自分の提出物リスト |
46 getparfilename の tmpd の扱い | |
47 やっぱりs4にしようかな | |
46 7/18 ○書込著者からホームへのリンク | 48 7/18 ○書込著者からホームへのリンク |
47 7/17 ○個人blogに「レポート提出用」がついたときの挙動 | 49 7/17 ○個人blogに「レポート提出用」がついたときの挙動 |
48 ○添付ファイル回収 | 50 ○添付ファイル回収 |
49 ○imgcacheは別ディレクトリにしないと + .htaccess | 51 ○imgcacheは別ディレクトリにしないと + .htaccess |
50 7/15 ○レポート提出モードの表示を付ける | 52 7/15 ○レポート提出モードの表示を付ける |
416 query "select count(*) from par where var='$1' and sessid='$session' $2;" | 418 query "select count(*) from par where var='$1' and sessid='$session' $2;" |
417 } | 419 } |
418 getparfilename() { | 420 getparfilename() { |
419 # null if type of $1 is not file | 421 # null if type of $1 is not file |
420 (f=`query "select val from par where var='$1' and sessid='$session' and type='file' $2;"` | 422 (f=`query "select val from par where var='$1' and sessid='$session' and type='file' $2;"` |
421 [ -n "$f" ] && echo $tmpdir/$f) | 423 [ -n "$f" ] && echo $f) |
422 } | 424 } |
423 sqlquote() { | 425 sqlquote() { |
424 (v="$1" | 426 (v="$1" |
425 case "$v" in | 427 case "$v" in |
426 "") return ;; # null | 428 "") return ;; # null |
487 pk=`gettblpkey $1` | 489 pk=`gettblpkey $1` |
488 # key=`sq $db "select $pk from $1 where rowid=$3"` | 490 # key=`sq $db "select $pk from $1 where rowid=$3"` |
489 key=`query "select $pk from $1 where rowid=$3;"` | 491 key=`query "select $pk from $1 where rowid=$3;"` |
490 ### err "select $pk from $1 where rowid=$3" - key=$key '$4(tmp)'=$4 | 492 ### err "select $pk from $1 where rowid=$3" - key=$key '$4(tmp)'=$4 |
491 for kt in s m; do | 493 for kt in s m; do |
492 td=${4:-$tmpdir} | 494 td=${4:-$tmpd} |
493 [ -d $td ] || mkdir -p $td | 495 [ -d $td ] || mkdir -p $td |
494 t=${1}_$kt | 496 t=${1}_$kt |
495 for c in `gettbl_${kt}_cols $1`; do | 497 for c in `gettbl_${kt}_cols $1`; do |
496 vcount=1 # count(val) | 498 vcount=1 # count(val) |
497 if [ x"$2" = x"$c" ]; then | 499 if [ x"$2" = x"$c" ]; then |
943 tmpfiles=$tmpfiles" $tmpd" | 945 tmpfiles=$tmpfiles" $tmpd" |
944 addsession $session | 946 addsession $session |
945 getcookie | 947 getcookie |
946 case "$REQUEST_METHOD" in | 948 case "$REQUEST_METHOD" in |
947 get|GET) s="$QUERY_STRING" ;; | 949 get|GET) s="$QUERY_STRING" ;; |
948 post|POST) dd count=$CONTENT_LENGTH bs=1 of=$tmpf 2>/dev/null | 950 post|POST) ## dd count=$CONTENT_LENGTH bs=1 of=$tmpf 2>/dev/null #slow |
949 # cat > $tmpf | 951 # cat > $tmpf # too much? |
952 head -c $CONTENT_LENGTH > $tmpf # safe? | |
953 (echo CL=$CONTENT_LENGTH; ls -lF $tmpf) 1>&3 | |
950 s="`cat tmp/stream`" | 954 s="`cat tmp/stream`" |
951 tmpfiles=$tmpfiles"${tmpfiles+ }$tmpf" | 955 tmpfiles=$tmpfiles"${tmpfiles+ }$tmpf" |
952 ;; | 956 ;; |
953 esac | 957 esac |
954 case "$CONTENT_TYPE" in | 958 case "$CONTENT_TYPE" in |
955 *boundary*) | 959 *boundary*) |
956 bndry=${CONTENT_TYPE#*boundary=} | 960 bndry=${CONTENT_TYPE#*boundary=} |
957 #for us in `LC_CTYPE=C ./mpsplit.rb "$bndry" $tmpdir < $tmpf` | 961 #for us in `LC_CTYPE=C ./mpsplit.rb "$bndry" $tmpd < $tmpf` |
958 for us in `LC_CTYPE=C ./mpsplit.pl "$bndry" $tmpdir < $tmpf` | 962 for us in `LC_CTYPE=C ./mpsplit.pl "$bndry" $tmpd < $tmpf` |
959 do | 963 do |
960 k=${us%%\=*} | 964 k=${us%%\=*} |
961 #echo u=$us | 965 #echo u=$us |
962 #v="`echo ${us#*=}|nkf -Ww -mQ|sed -e 's/\"/\"\"/g'`" | 966 #v="`echo ${us#*=}|nkf -Ww -mQ|sed -e 's/\"/\"\"/g'`" |
963 v="`echo ${us#*=}|unhexize`" | 967 v="`echo ${us#*=}|unhexize`" |
964 # err k=$k v=$v | 968 # err k=$k v=$v |
965 case "$k" in | 969 case "$k" in |
966 *:filename) | 970 *:filename) |
967 type='file'; k=${k%:filename} | 971 type='file'; k=${k%:filename} |
968 case `file --mime-type $tmpdir/$v|cut -d' ' -f2` in | 972 (echo k=$k; ls -lF $tmpd/$v; file --mime-type $tmpd/$v) 1>&3 |
973 case `file --mime-type $tmpd/$v|cut -d' ' -f2` in | |
969 [Ii]mage/*) | 974 [Ii]mage/*) |
970 mogrify -resize $maximagexy'>' $tmpdir/$v | 975 mogrify -resize $maximagexy'>' $tmpd/$v |
971 ;; | 976 ;; |
972 esac | 977 esac |
973 ;; | 978 ;; |
974 *) | 979 *) |
975 type='string' | 980 type='string' |
1117 # $1=deffile | 1122 # $1=deffile |
1118 tagline=`grep :tag: $1`; shift | 1123 tagline=`grep :tag: $1`; shift |
1119 and="${1:+and }" | 1124 and="${1:+and }" |
1120 href="<a href=\"$myname?grp+" | 1125 href="<a href=\"$myname?grp+" |
1121 echo '<div class="listgroup">' | 1126 echo '<div class="listgroup">' |
1122 err ListGRP: query "select val from grp_s where key='tag' $and$* group by val;" | 1127 sql="select val from grp_s where key='tag' $and$* group by val order by ctime desc;" |
1123 for tag in `query "select val from grp_s where key='tag' $and$* group by val;"` | 1128 err ListGRP: query |
1129 for tag in `query "$sql"` | |
1124 do | 1130 do |
1125 err ListGrp: tag=$tag | 1131 err ListGrp: tag=$tag |
1126 tn=${tagline%%=${tag}*} | 1132 tn=${tagline%%=${tag}*} |
1127 tn=${tn##*[ :]} | 1133 tn=${tn##*[ :]} |
1128 sql="select gname as 'グループ名',説明 from (select gname,max(case key when 'gecos' then val end) as '説明',max(case key when 'tag' then val end) as 'tag' from grp_s group by gname having tag='$tag');" | 1134 sql="select gname as 'グループ名',説明 from (select gname,max(case key when 'gecos' then val end) as '説明',max(case key when 'tag' then val end) as 'tag' from grp_s group by gname having tag='$tag');" |
1182 cond="where nick like '%$2%' or b.name like '%$2%'" | 1188 cond="where nick like '%$2%' or b.name like '%$2%'" |
1183 fi | 1189 fi |
1184 | 1190 |
1185 # XX: これ複雑すぎるかな。もっとシンプルにしたい。$3条件も。2015-07-08 | 1191 # XX: これ複雑すぎるかな。もっとシンプルにしたい。$3条件も。2015-07-08 |
1186 sql="select a.rowid, a.$link, coalesce(b.gecos, a.$nm) as nick, b.tag, | 1192 sql="select a.rowid, a.$link, coalesce(b.gecos, a.$nm) as nick, b.tag, |
1187 case when '$iamowner' = '' then '' | 1193 case when a.$nm in (select user from grp_adm |
1188 when a.$nm in (select user from grp_adm | 1194 where gname='$grp') then '(管理者)' -- from group mode |
1189 where gname='$grp') then '(管理者)' | 1195 when '$user' in (select user from grp_adm where gname=a.$nm) |
1196 then '(ADMIN)' | |
1197 when '$iamowner' = '' then '' | |
1190 else ',not='||a.rowid end as ownerlink | 1198 else ',not='||a.rowid end as ownerlink |
1191 from $tbl a left join | 1199 from $tbl a left join |
1192 (select $nm as name, | 1200 (select $nm as name, |
1193 max(case key when 'gecos' then val end) as gecos, | 1201 max(case key when 'gecos' then val end) as gecos, |
1194 max(case key when 'tag' then val end) as tag | 1202 max(case key when 'tag' then val end) as tag |
1225 `cgi_hidden kwd "$kwd"` | 1233 `cgi_hidden kwd "$kwd"` |
1226 `cgi_hidden offset $((offset - limit))`</form> | 1234 `cgi_hidden offset $((offset - limit))`</form> |
1227 EOF | 1235 EOF |
1228 fi | 1236 fi |
1229 | 1237 |
1230 err `echo $sql\;` | 1238 err ListEntry: `echo $sql\;` |
1231 | 1239 |
1232 query "$sql limit $limit ${offset:+offset $offset};" \ | 1240 query "$sql limit $limit ${offset:+offset $offset};" \ |
1233 | while IFS='|' read id lnk name tag ownerp; do | 1241 | while IFS='|' read id lnk name tag ownerp; do |
1234 err name=$name owner=$ownerp | 1242 err name=$name owner=$ownerp |
1235 files=`getvalbyid $tbl profimg $id $dir` | 1243 files=`getvalbyid $tbl profimg $id $dir` |
1252 listgroup() { | 1260 listgroup() { |
1253 listentry group "$@" | 1261 listentry group "$@" |
1254 } | 1262 } |
1255 showgroup() { | 1263 showgroup() { |
1256 grp=$1 | 1264 grp=$1 |
1257 | 1265 |
1258 showgroupsub $formdir/grp.def $grp | \ | 1266 gname=`getpar gname` |
1259 m4 -D_TITLE_="グループ $grp" \ | 1267 if [ -n "$gname" ]; then |
1260 -D_FORM_="syscmd(\`cat')" \ | 1268 err REMOVING::::::: |
1261 -D_DUMPTABLE_="" \ | 1269 par2table $formdir/grp.def |
1262 $layout/groupman.m4.html | 1270 fi |
1271 if isgroup "$grp"; then | |
1272 showgroupsub $formdir/grp.def "$grp" | \ | |
1273 m4 -D_TITLE_="グループ $grp" \ | |
1274 -D_FORM_="syscmd(\`cat')" \ | |
1275 -D_DUMPTABLE_="" \ | |
1276 $layout/groupman.m4.html | |
1277 else # if $grp is removed at par2table | |
1278 listgroup | |
1279 fi | |
1263 } | 1280 } |
1264 showgroupsub() { | 1281 showgroupsub() { |
1265 # $1=def-file $2=group | 1282 # $1=def-file $2=group |
1266 grp=$2 | 1283 grp=$2 |
1267 rowid=`sq $db "select rowid from grp where gname='$grp'"` | 1284 rowid=`sq $db "select rowid from grp where gname='$grp'"` |
1270 grp=`sq $db "select gname from grp where rowid=$grp"` | 1287 grp=`sq $db "select gname from grp where rowid=$grp"` |
1271 fi | 1288 fi |
1272 val=`getvalbyid grp profimg $rowid $tmpd` | 1289 val=`getvalbyid grp profimg $rowid $tmpd` |
1273 # 6/14の次グループのHOMEで出す情報を作る Done | 1290 # 6/14の次グループのHOMEで出す情報を作る Done |
1274 viewtable $1 grp $rowid | 1291 viewtable $1 grp $rowid |
1275 if isgrpowner $user $grp; then | 1292 if isgrpowner "$user" "$grp"; then |
1276 echo "<p><a href=\"?groupconf+$grp\">グループ情報の編集</a>" | 1293 echo "<p><a href=\"?groupconf+$grp\">グループ情報の編集</a>" |
1277 iamowner=$grp | 1294 iamowner=$grp |
1278 fi | 1295 fi |
1279 if ismember $user $grp; then | 1296 if ismember "$user" "$grp"; then |
1280 echo "${iamowner:+ / }<a href=\"?blog+$grp\">グループの新規話題作成</a></p>" | 1297 echo "${iamowner:+ / }<a href=\"?blog+$grp\">グループの新規話題作成</a></p>" |
1281 fi | 1298 fi |
1282 # 加入ボタン + 加入者リスト | 1299 # 加入ボタン + 加入者リスト |
1283 err ismember $user $grp | 1300 err ismember $user $grp |
1284 ismember $user $grp && ismem='checked' || nomem='checked' | 1301 ismember "$user" "$grp" && ismem='checked' || nomem='checked' |
1285 # このグループでの加入アドレス | 1302 # このグループでの加入アドレス |
1286 eml=`query "select val from grp_mem_s where gname='$2' and user='$user' \ | 1303 eml=`query "select val from grp_mem_s where gname='$2' and user='$user' \ |
1287 and key='email';"` | 1304 and key='email';"` |
1288 err EML: "select val from grp_mem_s where gname='$2' and user='$user' \ | 1305 err EML: "select val from grp_mem_s where gname='$2' and user='$user' \ |
1289 and key='email';" | 1306 and key='email';" |
1315 cm="?commission+$grp" | 1332 cm="?commission+$grp" |
1316 thumbxy=50x50 listmember "" "$c" \ | 1333 thumbxy=50x50 listmember "" "$c" \ |
1317 |sed -e "s|\(<br>\),not=\(.*\)|\1<a href=\"$cm+\2\">管理者委託</a>|" | 1334 |sed -e "s|\(<br>\),not=\(.*\)|\1<a href=\"$cm+\2\">管理者委託</a>|" |
1318 } | 1335 } |
1319 joingrp() { | 1336 joingrp() { |
1320 # $1=group $2=user $3=yes/no $4=email(if any) | 1337 # $1=group $2=user $3=yes/no $4=email(if any $5=AsAdmin) |
1321 err joingrp: \$1=$1 \$2=$2 \$3=$3 \$4=$4 | 1338 err joingrp: \$1=$1 \$2=$2 \$3=$3 \$4=$4 |
1339 isgrpowner "$user" "$1" && isowner="yes" || isowner="" | |
1322 if [ x"$2" != x"$user" ]; then # if user is not login user | 1340 if [ x"$2" != x"$user" ]; then # if user is not login user |
1323 if ! isgrpowner $user $1; then | 1341 if [ -z "$isowner" ; then |
1324 echo "<p>本人か、グループ管理者しか加入操作はできません。</p>" | 1342 echo "<p>本人か、グループ管理者しか加入操作はできません。</p>" |
1325 return | 1343 return |
1326 fi | 1344 fi |
1327 fi | 1345 fi |
1328 cond="where gname='$1' and user='$2'" | 1346 cond="where gname='$1' and user='$2'" |
1332 if msg=`emaildomaincheck "$4"`; then | 1350 if msg=`emaildomaincheck "$4"`; then |
1333 err "replace into grp_mem_s values('$1', '$user', 'email', \ | 1351 err "replace into grp_mem_s values('$1', '$user', 'email', \ |
1334 'string', '$4', NULL);" | 1352 'string', '$4', NULL);" |
1335 query "replace into grp_mem_s values('$1', '$user', 'email', \ | 1353 query "replace into grp_mem_s values('$1', '$user', 'email', \ |
1336 'string', '$4', NULL);" | 1354 'string', '$4', NULL);" |
1355 if [ -n "$5" ]; then # as ADMIN | |
1356 # Coming here means newly created group | |
1357 sql="select case\ | |
1358 when (select count(*) from grp_mem where gname='$1')=1\ | |
1359 then (select user from grp_mem\ | |
1360 where gname='$1' and user='$user')\ | |
1361 else '' end;" | |
1362 err NewGrpChk: $sql | |
1363 if [ -n "`query \"$sql\"`" ]; then | |
1364 err ADMIN: "replace into grp_adm values('$1', '$user');" | |
1365 query "replace into grp_adm values('$1', '$user');" | |
1366 fi | |
1367 fi | |
1337 else | 1368 else |
1338 echo $msg | 1369 echo $msg |
1339 fi | 1370 fi |
1340 else | 1371 else |
1341 query "delete from grp_mem_s $cond and key='email';" | 1372 query "delete from grp_mem_s $cond and key='email';" |
1369 fi | 1400 fi |
1370 fi | 1401 fi |
1371 showgroup $1 | 1402 showgroup $1 |
1372 } | 1403 } |
1373 dumptable() { | 1404 dumptable() { |
1374 # $1=mode $2=Table $3=column-list(defaults to *) $4=conditions(if any) | 1405 # $1=mode $2=Table $3=column-list-of-*_s(defaults to *) $4=conditions(if any) |
1375 # textのフィールドだけ全てダンプにしたほうがいいか | 1406 # textのフィールドだけ全てダンプにしたほうがいいか |
1376 # $DT_VIEW sets link | 1407 # $DT_VIEW sets link |
1377 # 6/17の次: editリンクじゃなくてスレッドVIEWリンクでいいんちゃう? | 1408 # 6/17の次: editリンクじゃなくてスレッドVIEWリンクでいいんちゃう? |
1378 ### elink="<a href=\"$myname?edittable+$2+\\2\">EDIT</a>" | 1409 ### elink="<a href=\"$myname?edittable+$2+\\2\">EDIT</a>" |
1379 VIEW=${DT_VIEW-replyblog} | 1410 VIEW=${DT_VIEW-replyblog} |
1396 eav="" scols="" | 1427 eav="" scols="" |
1397 pk=`gettblpkey $2` | 1428 pk=`gettblpkey $2` |
1398 substr=${dumpcollen:+"substr(val, 0, $dumpcollen)"} | 1429 substr=${dumpcollen:+"substr(val, 0, $dumpcollen)"} |
1399 substr=${substr:-val} | 1430 substr=${substr:-val} |
1400 for col in ${3:-`gettbl_s_cols $2`}; do | 1431 for col in ${3:-`gettbl_s_cols $2`}; do |
1401 eav=$eav${eav:+,}" max(case key when '$col' then $substr end) as $col" | 1432 case $col in |
1402 scols="$scols${scols:+, }b.$col" | 1433 *:*) col=${col%:*} as=${col#*:} ;; |
1434 *) as=${col} ;; | |
1435 esac | |
1436 eav=$eav${eav:+,}" max(case key when '$col' then $substr end) as $as" | |
1437 scols="$scols${scols:+, }b.$as" | |
1403 done | 1438 done |
1404 #case author when '$user' then a.rowid else '---' end as ID, | 1439 #case author when '$user' then a.rowid else '---' end as ID, |
1405 sql="select \ | 1440 sql="select \ |
1406 a.rowid as ID,\ | 1441 a.rowid as ID,\ |
1407 $cnt\ | 1442 $cnt\ |
1430 tbl=${tbl##*/} | 1465 tbl=${tbl##*/} |
1431 if [ -n "$rowid" ]; then # Modify existing entry | 1466 if [ -n "$rowid" ]; then # Modify existing entry |
1432 if [ x"$tbl" = x"user" ]; then | 1467 if [ x"$tbl" = x"user" ]; then |
1433 rowowner=`query "select name from $tbl where rowid=$rowid;"` | 1468 rowowner=`query "select name from $tbl where rowid=$rowid;"` |
1434 elif [ x"$tbl" = x"grp" ]; then | 1469 elif [ x"$tbl" = x"grp" ]; then |
1435 isgrpowner $user `query "select gname from $tbl where rowid=$rowid;"` \ | 1470 sql="select gname from $tbl where rowid=$rowid;" |
1436 && rowowner=$user | 1471 ##err p2t:grp:q $sql |
1472 isgrpowner $user "`query $sql`" && rowowner=$user | |
1437 else | 1473 else |
1438 rowowner=`query "select owner from $tbl where rowid=$rowid;"` | 1474 rowowner=`query "select owner from $tbl where rowid=$rowid;"` |
1439 rowowner=${rowowner:-`query "select author from $tbl | 1475 rowowner=${rowowner:-`query "select author from $tbl |
1440 where rowid=$rowid;"`} | 1476 where rowid=$rowid;"`} |
1441 fi | 1477 fi |
1478 ### err rowowner=$rowowner | |
1442 if [ x"$user" != x"$rowowner" ]; then | 1479 if [ x"$user" != x"$rowowner" ]; then |
1443 echo "<p>他人のレコードはいじれないの</p>" | 1480 echo "<p>他人のレコードはいじれないの</p>" |
1444 return | 1481 return |
1445 elif [ -z "$rowowner" ]; then | 1482 elif [ -z "$rowowner" ]; then |
1446 echo "<p>指定したレコードはないみたい</p>" | 1483 echo "<p>指定したレコードはないみたい</p>" |
1526 echo "<p>削除確認未チェック</p>" | 1563 echo "<p>削除確認未チェック</p>" |
1527 fi ;; | 1564 fi ;; |
1528 edit) | 1565 edit) |
1529 case `gettbl_coltype $tbl/$origcol` in | 1566 case `gettbl_coltype $tbl/$origcol` in |
1530 image|document|binary) | 1567 image|document|binary) |
1531 file=`getparfilename $v` | 1568 file=$tmpd/`getparfilename $v` |
1532 err type=file=$file | 1569 err type=file=$file |
1533 [ -z "$file" ] && continue | 1570 [ -z "$file" ] && continue |
1534 bn=${file##*/} | 1571 bn=${file##*/} |
1535 bin="X'"$(hexize $file)"'" | 1572 bin="X'"$(hexize $file)"'" |
1536 ct=`file --mime-type $file|cut -d' ' -f2` | 1573 ct=`file --mime-type $file|cut -d' ' -f2` |
1566 [ -z "$val" -o x"$val" = x'""' -o x"$val" = x"NULL" ] && continue | 1603 [ -z "$val" -o x"$val" = x'""' -o x"$val" = x"NULL" ] && continue |
1567 err $col=$val | 1604 err $col=$val |
1568 bin=NULL | 1605 bin=NULL |
1569 err partype$col=`getpartype $col "$limit"` | 1606 err partype$col=`getpartype $col "$limit"` |
1570 case $ptype in | 1607 case $ptype in |
1571 file) file=`getparfilename $col "$limit"` | 1608 file) file=$tmpd/`getparfilename $col "$limit"` |
1572 err parfile-$col=$file | 1609 err parfile-$col=$file |
1573 [ -z "$file" ] && continue | 1610 [ -z "$file" ] && continue |
1574 bin="X'"$(hexize $file)"'" | 1611 bin="X'"$(hexize $file)"'" |
1575 ct=`file --mime-type $file|cut -d' ' -f2` | 1612 ct=`file --mime-type $file|cut -d' ' -f2` |
1576 type=\"file:$ct\" ;; | 1613 type=\"file:$ct\" ;; |
1603 return | 1640 return |
1604 fi | 1641 fi |
1605 fi | 1642 fi |
1606 ;; | 1643 ;; |
1607 esac | 1644 esac |
1608 #err "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" | 1645 err p2t: "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" |
1609 echo "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" \ | 1646 echo "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" \ |
1610 | sq $db | 1647 | sq $db |
1611 done | 1648 done |
1612 done | 1649 done |
1613 done | 1650 done |
1805 <form action="${GF_ACTION:-$myname}" method="POST" enctype="multipart/form-data"> | 1842 <form action="${GF_ACTION:-$myname}" method="POST" enctype="multipart/form-data"> |
1806 ${rowid:+$rm} | 1843 ${rowid:+$rm} |
1807 <table class="b $2"> | 1844 <table class="b $2"> |
1808 $forms | 1845 $forms |
1809 </table>$hiddens | 1846 </table>$hiddens |
1847 ${GF_STAGE:+`cgi_hidden stage $GF_STAGE`} | |
1810 ${rowid:+<input type="hidden" name="rowid" value="$rowid">} | 1848 ${rowid:+<input type="hidden" name="rowid" value="$rowid">} |
1811 EOF | 1849 EOF |
1812 if [ -z $GF_VIEWONLY ]; then | 1850 if [ -z $GF_VIEWONLY ]; then |
1813 cat<<EOF | 1851 cat<<EOF |
1814 <input type="submit" name="sub" value="OK"> | 1852 <input type="submit" name="sub" value="OK"> |