s4
diff s4-funcs.sh @ 447:4769510d6169
Multiple Page Listing allows user specification of starting number
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 14 Jul 2017 10:25:06 +0859 |
parents | 12548e1a4ff8 |
children | 9724472a3cd2 |
line diff
1.1 --- a/s4-funcs.sh Sat Jul 01 20:17:41 2017 +0859 1.2 +++ b/s4-funcs.sh Fri Jul 14 10:25:06 2017 +0859 1.3 @@ -1931,8 +1931,11 @@ 1.4 # Referring variable $iamowner=$grp to attach owner-request links 1.5 ## err listentry: \$1=$1 \$2=$2 \$3=$3 1.6 cond='' hiddens='' 1.7 - offset=`getpar offset` 1.8 - offset=${offset%%[!0-9]*} 1.9 + offset=`getpar offset`; offset=${offset%%[!0-9]*} 1.10 + if [ -z "$offset" ]; then 1.11 + offset=`getpar start`; offset=${offset%%[!0-9]*} 1.12 + offset=$((offset-1)) 1.13 + fi 1.14 offset=$((offset + 0)) # change to numeric forcibly 1.15 [ $offset -lt 0 ] && offset=0 1.16 limit=30 1.17 @@ -2028,7 +2031,11 @@ 1.18 `cgi_hidden kwd \"$kwd\"` 1.19 `cgi_hidden stage \"$stage\"`" 1.20 cat<<EOF 1.21 - <p>${total}件中の$((offset+1))件めから${kwd:+" - 検索語: $kwd"}</p> 1.22 + <form action="$myname" method="POST"> 1.23 + <p>${total}件中の<input class="hidesub" type="text" name="start" 1.24 + value="$((offset+1))" size="3">件めから${kwd:+" - 検索語: $kwd"}$hiddens 1.25 + <input type="submit" value="確定"></p> 1.26 + </form> 1.27 EOF 1.28 if [ $((offset+limit)) -lt $total ]; then 1.29 nextbtn=$(