changeset 467:598f00f1b995

Offer links to board and group home in read-time table
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 22 Aug 2017 08:55:48 +0859
parents 929a925f10d8
children c00857f0e9d2
files s4-blog.sh
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/s4-blog.sh	Tue Aug 22 08:51:06 2017 +0859
+++ b/s4-blog.sh	Tue Aug 22 08:55:48 2017 +0859
@@ -650,12 +650,16 @@
     echo "メンバー以外は利用できません。" | html p; return
   fi
   owner=`getvalbyid blog owner $rowid`
-  #qowner=`sqlquotestr "$owner"`
-  ge=`gecos "$owner"`
-  title=`getvalbyid blog title $rowid`
-  _m4 -D_TITLE_="アクセス時刻" $layout/html.m4.html
-  tmpf=$tmpd/header
-  echo "[title]@${ge:-$owner}" > $tmpf
+  qowner=`sqlquotestr "$owner"`
+  grprowid=`query "SELECT rowid FROM grp WHERE gname=$qowner;"`
+  ge=`gecos "$owner" | htmlescape`
+  title=`getvalbyid blog title $rowid | htmlescape`
+  h1="アクセス時刻"
+  link2board="<a href=\"?replyblog+$rowid\">$title</a>"
+  link2group="<a href=\"?grp+$grprowid\">$ge</a>"
+  _m4 -D_TITLE_="$h1" $layout/html.m4.html
+  echo "$h1" | html h1
+  echo "[$link2board]@$link2group" | html h2
   warn=' class="warn"'
   cat <<-EOF
 	<table class="b">

yatex.org