Mercurial > hgrepos > hgweb.cgi > s4
changeset 446:39823dfee44f
Display warning about quiz mode on the top of articles
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 01 Jul 2017 22:43:22 +0859 |
parents | 12548e1a4ff8 |
children | 4769510d6169 |
files | s4-blog.sh |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-blog.sh Sat Jul 01 20:17:41 2017 +0859 +++ b/s4-blog.sh Sat Jul 01 22:43:22 2017 +0859 @@ -196,9 +196,13 @@ <tr class="preface${frozen_class:+ }$frozen_class"> <td>`echo "$hexhead"|unhexize|hreflink|minitbl`</td></tr> </table> - - <table class="blog_replies"> EOF + case "$blogtype" in + "クイズ") + echo "クイズモードは本人と管理者の書き込みのみが表示されます。" + ;; + esac | html p 'class="warn"' + echo '<table class="blog_replies">' if [ x"$blogtype" = x"クイズ" ]; then if $isgroup; then if ! isgrpowner "$user" "$blogowner"; then @@ -209,6 +213,12 @@ author='$user') EOF fi + else # if user's blog + if [ x"$user" != x"$blogowner" ]; then + cat<<-EOF > $quizmodefile + AND author IN ('$blogowner', '$user') + EOF + fi fi fi }