Mercurial > hgrepos > hgweb.cgi > s4
changeset 282:e6c1cbe4ffcc
Add article-rowid to id of tr(article list)
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 06 Aug 2016 12:18:03 +0859 |
parents | dd8629e6d67e |
children | fe73fb3f9f35 |
files | s4-blog.sh |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-blog.sh Tue Aug 02 22:09:06 2016 +0859 +++ b/s4-blog.sh Sat Aug 06 12:18:03 2016 +0859 @@ -181,7 +181,7 @@ nt="<label style=\"font-size: 70%;\"><input type=\"checkbox\" name=\"notifyto\" value=\"$uid\">返信通知送信</label>" cat<<EOF | -<tr id="$id"> +<tr id="$id" id="$aid"> <td>${edit:+<a href="$elink+$edit">編集</a> }#$aid <a href="$hlink+$uid">$uname</a> $tm @@ -255,6 +255,25 @@ <p class="update_link"><a href="?reload/$rowid">再読込</a></p> EOF + query<<-EOF + WITH mrt AS ( + SELECT max(val) maxtime FROM article_s + WHERE key='ctime' AND id IN + (SELECT id FROM article + WHERE blogid=(select id from blog where rowid=$id)) + ) + SELECT 'A:'|| + (SELECT count(*) FROM tblaccesses + WHERE tbl='blog' AND tblrowid=$id) access, + 'C:'|| + (SELECT count(distinct user) FROM acclog + WHERE tbl='blog' AND tblrowid=$id + AND time > (SELECT maxtime from mrt) + AND user IN + (SELECT user FROM grp_mem + WHERE gname = $(sqlquote "$blogowner"))) + ; + EOF $iswritable && cat<<-EOF <div class="blogcomment"> <input type="hidden" name="blogid" value="$id">