s4

view s4-blog.sh @ 239:25e0b1eaf04d

Degrade fixed: Explicit notify works again.
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 30 Jun 2016 12:41:10 +0859
parents 45b7facac49e
children b915381669d6
line source
1 #
2 type cgiinit >/dev/null 2>&1 || . ./s4-funcs.sh
4 blog_genform() {
5 #
6 t=$1
7 }
9 blog_writable() (
10 # $1=articleid $2=user
11 blogowner=`getvalbyid blog owner "$1"`
12 [ x"$blogowner" = x"$2" ] || isuser "$blogowner" || ismember "$2" "$blogowner"
13 )
14 blog_readable() {
15 # $1=articleid $2=user
16 mode=`getgroupattr $grp regmode`
17 }
18 blog_notify_reply() (
19 # $1=blogid $2=ReplyingUser $3=WrittenText $4(optional)=Action
20 blogowner=`getvalbyid blog owner "$1"`
21 [ x"$2" = x"$blogowner" ] && return # If author=blogowner, unnecessary
22 blogtitle=`getvalbyid blog title "$1"`
23 blogurl="$urlbase?replyblog+$1"
24 action=${4:-書き込み}
25 mode=`getvalbyid blog notify "$1"`
26 ### EXCEPT=`sqlquote "$user"` ## User should receive to feal some annoyance
27 case $mode in
28 admin)
29 if isgroup "$blogowner"; then
30 emails=`getgroupadminmails $blogowner`
31 else
32 emails=`collectemail $blogowner`
33 fi
34 notifyto=`getpar notifyto`
35 if [ -n "$notifyto" ]; then
36 emails=$emails" `email4groupbyuid \"$blogowner\" $notifyto`"
37 fi
38 ;;
39 no) return ;;
40 *) team=`query "SELECT val FROM blog_s
41 WHERE id=(SELECT id FROM blog WHERE rowid=$1)
42 AND key='team';"`
43 # team cannot get `getvalbyid blog team "$1"` because it's not
44 # defined in blog.def. Yes, it is Illegal USE!!
45 emails=`TEAM=$team collectemail $blogowner` ;;
46 esac
47 err notify: user=$user Admins=`getgroupadmins $blogowner` Mode=$mode Emails="[$emails]"
48 SMAIL_TO="`echo "$blogowner" | nkf -jM | tr -d '\n'` readers <$admin>" \
49 smail "$emails" "${action}通知 $urlbase"<<EOF
50 [$blogtitle]板に${action}がありました。
51 場所: $blogurl
52 題目: $blogtitle
53 筆者: `gecos $2`
54 内容:
55 `echo "$3"|sed 's/^/> /'`
56 EOF
57 )
59 blog_showentry() {
60 # $1=table $2=rowid
61 # if [ -n "$2" ]; then
62 # if [ -n "$imgcached" ]; then
63 # bstmpdir=$tmpdir/$imgcached/$thumbxy
64 # else
65 # bstmpdir=$tmpd
66 # # tmpd=`mktempd`
67 # # tmpfiles=$tmpfiles" $tmpd"
68 # fi
69 # fi
70 td=`getcachedir "article/$2"`
71 tbl=${1%%[!A-Z0-9a-z_]*} rowid=${2%%[!A-Z0-9a-z_]*}
72 err rowid=$rowid, '$2'=$2
73 ts=${tbl}_s tm=${tbl}_m
74 at=article as=article_s am=article_m
75 serial=$(($(date +%s)-1420038000))s$$
76 blog_writable $rowid $user && iswritable=true || iswritable=false
77 # This function grasps blog entry definiton directly.
78 # blog: id
79 # blog_s: title,ctime,heading
80 # blog_m: *article
82 # 2015-10-05 check readable
83 if ! $iswritable; then
84 blogowner=`getvalbyid blog owner "$2"`
85 # err blogowner=$blogowner
86 if isgroup $blogowner; then
87 regmode=`getgroupattr $blogowner regmode`
88 # err regmode=$regmode
89 if [ x"$regmode" = x"moderated" ]; then
90 if ! ismember $user $blogowner; then
91 echo "加入してからどうぞ" | html p
92 return
93 fi
94 fi
95 fi
96 fi
97 case `getvalbyid blog notify "$2"` in # "all", "admin" or "no" (or NULL)
98 admin) notifyto=1 ;;
99 *) notifyto="" ;;
100 esac
102 err "SELECT id from $tbl where rowid=$rowid"
103 id=`query "select id from $tbl where rowid=$rowid;"`
104 err id=$id
105 err "select val from $ts where key='title' and id='$id';"
108 #(1)Display root article
109 cat<<EOF
110 <form class="replyblog" action="$myname?replyblog+${rowid}#bottom" method="POST" enctype="multipart/form-data">
111 <table class="bloghead">
112 EOF
114 href="<a href=\"?editheading+$rowid\"> 編集 </a>"
115 if $iswritable; then
116 href2="<a href=\"?lshandout+$rowid\"> 提出状況 </a>"
117 href3="(<a href=\"?gethandout+$rowid\">ファイル取得</a>)"
118 fi
119 href4='<a href="#bottom"> 末尾へ</a>'
120 cat<<EOF | sq -html $db \
121 | sed -e "s|\(<TR><TD>\),e,|\1 $href |" \
122 -e "s|,s,|$href2$href3|" \
123 -e "s|,t,\(</TD>\)|$href4\1|"
124 -- select val from $ts where key="title" and id="$id";
125 select
126 coalesce((select ",e," from blog where rowid=$rowid and author='$user'),'')
127 ||val||" "
128 ||case (select val from $ts where key="mode" and id="$id")
129 when 'report-closed' then "レポート提出用(自身のファイルのみ参照可),s,"
130 when 'report-open' then "レポート提出用,s,"
131 else ""
132 end || ',t,'
133 from $ts where key="ctime" and id="$id";
134 select val from $ts where key="heading" and id="$id";
135 EOF
136 cat<<EOF
137 </table>
138 <table class="blog_replies">
139 EOF
141 lkhome="<a href=\"$myname?home" lke='">'
142 lkedit="<a href=\"$myname?editart"
143 if false; then
144 sq -html $db<<EOF |
145 WITH a_s AS (
146 SELECT id,
147 max(CASE key WHEN 'ctime' THEN val END) TIME,
148 max(CASE key WHEN 'text' THEN val END) TEXT
149 FROM article_s
150 GROUP by id
151 )
152 SELECT 'id:'||a.id,
153 CASE author
154 WHEN '$user' THEN 'ed:'||a.rowid||':'||$rowid
155 ELSE 'e0:'
156 END edit,
157 'at:'||(SELECT rowid FROM user WHERE name=author)||':'
158 ||coalesce((SELECT val FROM user_s
159 WHERE name=author AND key='gecos'),
160 author),
161 'ti:'||s.TIME,
162 'te:'||s.TEXT,
163 'im:'||(SELECT group_concat(hex(bin)
164 FROM (select rowid,id,author from article where blogid in
165 (select id from blog where rowid=$rowid)) a
166 LEFT JOIN
167 a_s s
168 ON a.id=s.id;
169 EOF
170 sed -e "s|^<TR><TD>id:\(.*\)</TD>|<TR id=\"\1\"><TD>|" \
171 -e "/^<TR/N" -e 's/\n//' \
172 -e "s|<TD>ed:\([0-9]*\):\(.*\)</TD>|$lkedit+\1+\2${lke}編集</a>|" \
173 -e "s|<TD>e0:</TD>||" \
174 -e "s|^<TD>at:\([0-9]*\):\(.*\)</TD>|$lkhome+\1$lke\2</a>|" \
175 -e "s|^<TD>ti:\(.*\)</TD>|\1</TD>|" \
176 -e "s|^<TD>te:\(.*\)|<TD>\1|"
177 else
178 hlink="$myname?home" elink="$myname?editart"
179 catlink="$myname?showattc+article_m"
180 deficon="img/file-icon.png"
181 sq $db<<EOF |
182 WITH a_s AS (
183 SELECT id,
184 max(CASE key WHEN 'ctime' THEN val END) TIME,
185 max(CASE key WHEN 'text' THEN val END) TEXT
186 FROM article_s
187 GROUP by id
188 )
189 SELECT a.id,
190 CASE author
191 WHEN '$user' THEN a.rowid||'+'||$rowid
192 ELSE ''
193 END edit,
194 CASE -- 「通知送信」ボタンの有無
195 WHEN '$notifyto' = '' THEN '' -- 不要モードならなし
196 WHEN '$user' = author THEN '' -- 筆者自身ならなし
197 ELSE "yes"
198 END notify,
199 (SELECT rowid FROM user WHERE name=author) user_rid,
200 coalesce((SELECT val FROM user_s
201 WHERE name=author AND key='gecos'),
202 author) uname,
203 a.rowid,
204 s.TIME,
205 hex(s.TEXT),
206 (SELECT group_concat(rowid||':'||length(bin)||':'||hex(val), ' ')
207 FROM article_m
208 WHERE id=a.id AND key='image') imxgids
209 FROM (select rowid,id,author from article where blogid in
210 (select id from blog where rowid=$rowid)) a
211 LEFT JOIN
212 a_s s
213 ON a.id=s.id;
214 EOF
215 while IFS='|' read id edit notify uid uname aid tm hte imgids; do
216 nt="<label style=\"font-size: 70%;\"><input type=\"checkbox\"
217 name=\"notifyto\" value=\"$uid\">返信通知送信</label>"
218 cat<<EOF |
219 <tr id="$id">
220 <td>${edit:+<a href="$elink+$edit">編集</a> }#$aid
221 <a href="$hlink+$uid">$uname</a>
222 $tm
223 ${notify:+$nt}</td><td>`echo "$hte"|unhexize|htmlescape`
224 EOF
225 hreflink
226 for i in $imgids; do
227 mrid=${i%%:*}; i=${i#*:}; sz=`size_h ${i%%:*}`
228 fn=`echo "${i#*:}"|unhexize`
229 fnb=$fn"(${sz})"
230 # echo r=$mrid fn=$fn
231 case "$fn" in
232 *.[Pp][Nn][Gg]|*.[Jj][Pp][Gg]|*.[Jj][Pp][Ee][Gg])
233 sq $db "SELECT hex(bin) FROM article_m WHERE rowid=$mrid" \
234 | unhexize \
235 | convert -define jpeg:size=100x100 -resize 100x100'>' - jpeg:- \
236 | hexize \
237 | sed -e 's/\(..\)/%\1/g' \
238 -e "s|^|<a href=\"$catlink+$mrid\"><img src=\"data:image/jpeg,|" \
239 -e "s|\$|\">$fnb</a>|"
240 ;;
241 *)
242 echo "<a href=\"$catlink+$mrid\"><img src=\"$deficon\">$fnb</a>"
243 ;;
244 esac
245 done
246 done
247 fi
249 textform='<div class="fold">
250 <input type="checkbox" id="cmt" checked><label for="cmt"
251 >コメントする</label><div>
252 <table class="b">
253 <tr><td><textarea name="text" cols="72" rows="4"></textarea></td></tr>
254 <tr><td>添付ファイル:
255 <input type="file" name="image"'" $file_accept multiple></td></tr>"'
256 </table>
257 <input type="submit" value="送信">
258 <input type="reset" value="リセット"></div></div>
259 '
260 cat<<-EOF
261 </table> <!-- end of s4-blog:blog_showentry() main table -->
262 <p class="update_link"><a
263 href="?reload/$rowid">再読込</a></p>
264 EOF
265 $iswritable && cat<<-EOF
266 <div class="blogcomment">
267 <input type="hidden" name="blogid" value="$id">
268 <input type="hidden" name="stage" value="replyblog">
269 $textform
270 </div>
271 </form> <!-- End of s4-blog:blog_showentry() main form -->
272 <p id="bottom"> </p>
273 EOF
274 : <<-EOF
275 <div class="blogcomment">
276 <div class="fold">
277 <input type="checkbox" id="cmt" checked><label for="cmt"
278 >コメントする</label>
279 <div>
280 `GF_ACTION="?replyblog+${rowid}#bottom" \
281 GF_ARGS="<input type=\"hidden\" name=\"blogid\" value=\"$id\">" \
282 genform $formdir/article.def`
283 </div></div></div>
284 <p id="bottom"></p>
285 EOF
286 # Record access log
287 acclog blog $rowid
288 }
290 lshandout() {
291 # $1=rowid of blog
292 if ! blog_writable $1 $user; then
293 echo "メンバー以外は利用できません。" | html p; return
294 fi
295 time=`getvalbyid blog ctime $1|colrm 11`
296 owner=`getvalbyid blog owner $1`
297 title=`getvalbyid blog title $1`
298 ge=`gecos $owner`
299 lshandoutsub $owner "$@" \
300 |_m4 -D_TITLE_="提出状況" \
301 -D_FORMHEAD_="$time [$title]@${ge:-$owner}" \
302 -D_FORM_="syscmd(cat)" -D_DUMPHEAD_= -D_DUMPTABLE_= \
303 $layout/html.m4.html $layout/form+dump-whead.m4.html
304 }
305 lshandoutsub() {
306 # $1=owner $2=rowid of blog
307 if isgroup $1; then
308 sample="(select user from grp_mem where gname='$1')"
309 else
310 sample="(select distinct author as user from arts)"
311 echo "(集計は板への投稿者のみ)" | html p
312 fi
313 sql="with arts as (select id,author from article \
314 where blogid=(select id from blog where rowid=$2))\
315 select (select rowid from user where name=c0.user)||' '|| \
316 coalesce((select val from user_s where name=c0.user \
317 and key='gecos'),\
318 c0.user) as 'メンバー',\
319 sum(case when c1.key is not null then 1 else 0 end)\
320 as 'コメント記入',\
321 sum(case when c2.key is not null then 1 else 0 end)\
322 as 'ファイルの提出'\
323 from $sample c0 \
324 left join (select id,author from arts) a\
325 on c0.user=a.author\
326 left join (select id,key from article_s where key='text') c1\
327 on a.id=c1.id left join (select id,key from article_m ) c2\
328 on c1.id=c2.id group by c0.user order by c0.user;"
329 err ishandoutsub: sql="$sql"
330 echo '<table class="b td2r td3r">'
331 hrb="<a href=\"?home+"
332 echo "$sql" | sq -header -html $db \
333 | sed -e "s,\(<TR><TD>\)\([^ ]*\) \(.*\)</TD>,\1$hrb\2\">\3</TD>," -e 's,<TD>0</TD>,<TD class="warn">0</TD>,'
334 echo '</table>'
335 }
336 gethandout() {
337 # $1=rowid of blog
338 if ! blog_writable $1 $user; then
339 echo "メンバー以外は利用できません。" | html p; return
340 fi
341 i=0
342 bd=$tmpd/archive.$$
343 mkdir $bd
344 query "select m.rowid,author,m.val from article a join article_m m\
345 on a.id=m.id where blogid=(select id from blog where rowid=$1)\
346 and m.key in ('image', 'document', 'binary');" \
347 | while IFS='|' read rowid author filename; do
348 # err isfilereadable $user article_m $rowid
349 isfilereadable $user article_m $rowid || continue
350 # err ok
351 i=$((i+1))
352 dir=`printf $bd/%03d $i`
353 mkdir $dir
354 query "select quote(bin) from article_m where rowid=$rowid;" \
355 | unhexize > $dir/$filename
356 done
357 if [ ! -d $bd/001 ]; then
358 contenttype; echo
359 echo "取得できるファイルがありませんでした。" | html p
360 return
361 fi
362 (cd $bd
363 err cdto$bd; (pwd; ls -lFa) 1>&3
364 tar zcf .archive.tar.gz * && mv .archive.tar.gz archive.tar.gz
365 )
366 arc=$bd/archive.tar.gz
367 echo "Content-type: application/x-gzip"
368 echo "Content-Length: `cat $arc|wc -c`"
369 echo "Content-Disposition: filename=\"archive.tar.gz\""
370 echo
371 cat $arc
372 }
373 lsmyfile() { # $1(optional)=SortBy
374 case "$1" in
375 ""|CTIME-DESC)
376 by="CTIME" ord="DESC" ;;
377 CTIME*) by="CTIME" ;;
378 FILE*) by="FILE" ;;
379 OWNER*) by="OWNER" ;;
380 TITLE*) by="TITLE" ;;
381 esac
382 case "$1" in
383 *DESC) ord="DESC" ;;
384 esac
385 case "$ord" in
386 DESC) lkod="" jord="降順" ;;
387 *) lkod="-DESC" jord="昇順" ;;
388 esac
389 sql="select m.val||'/'||m.rowid FILE,
390 coalesce(
391 case when (select name from user where name=bs.owner)
392 is not null
393 then (select val from user_s where name=bs.owner
394 and key='gecos')
395 when (select gname from grp where gname=bs.owner)
396 is not null
397 then (select val from grp_s where gname=bs.owner
398 and key='gecos')
399 else
400 null
401 end,
402 bs.owner
403 ) OWNER,
404 a_s.val CTIME,
405 ',t,'||bs.title||':'||b.rowid||'#'||a.id TITLE
406 from (select rowid,id,val from article_m where id
407 in (select id from article where author='$user')
408 and type like 'file:%')
409 m left join article a on m.id=a.id
410 left join article_s a_s on a.id=a_s.id and a_s.key='ctime'
411 left join (select id,
412 max(case key when 'owner' then val end) as owner,
413 max(case key when 'title' then val end) as title
414 from blog_s group by id)
415 bs on a.blogid=bs.id
416 left join blog b on bs.id=b.id
417 where m.val is not null order by $by $ord;"
418 err lshandoutbyauthor: sql=`echo "$sql"`
419 title="個人提出ファイル"
420 _m4 -D_TITLE_=$title $layout/html.m4.html
421 hra="<a href=\"?lsmyfile+"
422 hrb="<a href=\"?showattc+article_m+"
423 hrc="<a href=\"?replyblog+"
424 (echo '<table class="b">'
425 echo "$sql"|sq -html -header $db ) \
426 | sed -e "s|\(<TR><TD>\)\([^/]*\)/\([0-9]*\)|\1$hrb\3\">\2</a>|" \
427 -e "s|,t,\(.*\):\([^<]*\)\(</TD>\)|$hrc\2\">\1</a>\3|" \
428 -e "s|\(<TH>\)\([A-Z]*\)\(</TH>\)|\1$hra\2$lkod\">\2</a>|" \
429 | _m4 -D_TITLE_=$title -D_FORM_="<p>($by$jord)</p>" \
430 -D_DUMPTABLE_="syscmd(cat)" $layout/form+dump.m4.html
431 echo '</table>'
432 }
433 searchart() {
434 kwd=`getpar kwd`
435 if [ -z "$kwd" ]; then
436 echo "検索語を指定してください" | html p; return
437 fi
438 for k in `echo "$kwd" | sed "s/'/''/g"`; do
439 kc=$kc${kc:+" AND "}"s.val LIKE '%$k%'"
440 done
441 kwd=`echo "$kwd"|htmlescape`
442 owner=`getpar owner`
443 owner=${owner:-$1}
444 echo "「$kwd」による検索結果" | html p
445 if [ -n "$owner" ]; then
446 cond="where key='owner' and val='$owner'"
447 if isuser $owner; then
448 echo "(`linkhome $owner` さんの記録からの検索)" | html p
449 else
450 linkhome $owner 1>&3
451 echo "(`linkhome $owner` グループからの検索)" | html p
452 fi
453 fi
454 # article_s: id=article-id, key='text', val='TEXT'
455 # article: id=article-id, blogid=blogkd
456 # blog: id=blog-id, author=LeaderAuthor
457 # blog_s: id=blog-id, key='title', val='BLOG-TITLE'
458 # WANT: blog-ROWid,article-id,val(TEXT)
459 sql="select b.rowid||'#'||x.id as '',
460 b.title as TITLE,
461 substr(x.val, 0, 80) as TEXT
462 from (select blog.rowid,blog.*,bs.val as title from blog join blog_s bs
463 on blog.id=bs.id and bs.key='title') b
464 join
465 (select a.id,a.blogid,s.val from article a join article_s s
466 on a.id=s.id where $kc)
467 x on b.id=x.blogid
468 where b.id in (select id from blog_s
469 $cond);"
470 sedopt="s,<TR><TD>\([^<]*\)</TD>,<TR><TD><a\
471 href=\"?replyblog+\1\">VIEW</a></TD>,"
472 cat<<EOF
473 <table class="b searchart">
474 `sq -header -html $db "$sql"|sed "$sedopt"`
475 </table>
476 EOF
477 }
478 listblog() (
479 # $1={user,group}
480 qow=`sqlquote $1`
481 cond="where a.id in (select id from blog_s where key='owner' and val=$qow) order by ctime desc"
482 DT_CHLD=article:blogid
483 cgi_form searchart<<EOF
484 <label>`cgi_text kwd`という語を含む記事をこの一覧から検索</label>
485 `cgi_hidden owner $user`
486 EOF
487 dumptable html blog 'ctime title heading' "$cond"
488 )
490 blog_addentry() {
491 # $1=GRPname(if it is a group)
492 grprowid=$1
493 rowid=`getpar rowid`
494 err blog_addentry0: rowid=$rowid
495 if [ -n "$grprowid" ]; then
496 owner=`getgroupbyid $grprowid`
497 else
498 owner=`getpar owner`
499 fi
500 err blog-add: \$1=$1 rowid=$rowid owner=$owner
501 if isgroup $owner; then
502 groupmode=1 listing=$owner guide="[${owner}]" GF_OWNER=$owner
503 else
504 usermode=1 listing=$user guide="[個人]"
505 fi
507 if [ -n "`getpar title`" ]; then
508 if [ "$usermode" ]; then
509 err usermode: user=$user owner=$owner
510 if [ x"$user" != x"$owner" ]; then
511 echo "他人の日記は書けません" | html p
512 return 2
513 fi
514 elif [ "$groupmode" ]; then # if write to group log
515 grp=$owner #\`getpar grp\`
516 err ismember: $user $grp
517 if ! ismember "$user" "$grp"; then
518 echo "(話題作成はこのグループに加入してから)" | html p
519 return 3
520 fi
521 fi
522 par2table $formdir/blog.def
523 serial=`getpar serial`
524 err SERIAL: $serial ROWID=$rowid listing=$listing
525 id=""
526 if [ -n "$rowid" ]; then
527 # Here, id becomes NULL when removal of entries at par2table
528 id=`query "select rowid from blog where rowid=$rowid;"`
529 elif [ -n "$serial" ]; then
530 # If new blog leader created, traverse to its head.
531 id=`query "select rowid from blog where id='$serial';"`
532 err new-Leader: "select rowid from blog where id='$serial';" id=$id
533 fi
534 if [ -n "$id" ]; then
535 ## If new aritcle is entered, JUMP to blog_reply
536 blog_reply $id
537 return
538 fi
539 fi
540 echo "${guide}新規話題作成" > $tmpd/title.$$
541 listblog $listing > $tmpd/listblog.$$
542 genform $formdir/blog.def \
543 | _m4 -D_TITLE_="spaste(\`$tmpd/title.$$')" \
544 -D_FORMHEAD_="序文は簡単に詳しくはコメントに" \
545 -D_DUMPHEAD_="これまでの蓄積" \
546 -D_FORM_="syscmd(\`cat')" \
547 -D_DUMPTABLE_="spaste(\`$tmpd/listblog.$$')" \
548 $layout/html.m4.html \
549 $layout/form+dump-whead.m4.html
550 }
552 blog_reply() {
553 rowid=$1
554 err rowid=$1
556 if [ -z "$rowid" ]; then
557 echo "表示する日記番号が未指定です。" | html p
558 return
559 fi
560 title=`getvalbyid blog title $rowid`
561 owner=`getvalbyid blog owner $rowid`
562 if isuser "$owner"; then
563 subtitle="`gecos $owner` さんの話題"
564 else
565 grprowid=`query "select rowid from grp where gname=\"$owner\";"`
566 subtitle="グループ <a href=\"?grp+$grprowid\">$owner</a> での話題
567 `query \"SELECT printf('(チーム:%s)', val)\
568 FROM blog_s
569 WHERE id=(SELECT id FROM blog WHERE rowid=$rowid)
570 AND key='team';
571 \"|htmlescape`"
572 fi
573 if [ -z "$title" ]; then
574 echo "日記番号指定が無効です。" | html p
575 return
576 fi
578 text=`getpar text`
579 if [ -n "$text" ]; then
580 if blog_writable $rowid $user; then
581 par2table $formdir/article.def
582 st=$? # ; err par2t-st=$st
583 case $st in
584 0|4)
585 [ "$st" = "4" ] && act="書込削除"
586 blog_notify_reply $rowid $user "$text" $act ;;
587 esac
588 else
589 title="$title(加入してないので書き込み不可)"
590 fi
591 fi
592 def=$formdir/article.def
593 echo "$title" > $tmpd/title.$$
594 echo "$subtitle" > $tmpd/subtitle.$$
595 ${BLOG_SHOW:-blog_showentry} blog $rowid \
596 | _m4 -D_TITLE_="spaste(\`$tmpd/title.$$')" -D_BODYCLASS_=general \
597 -D_FORMHEAD_="spaste(\`$tmpd/subtitle.$$')" \
598 -D_FORM_='' \
599 -D_DUMPTABLE_="syscmd(cat)" -D_DUMPHEAD_="" \
600 $layout/html.m4.html $layout/form+dump-whead.m4.html
601 }