s4

changeset 469:f095f639e5bf

Show lastlog in other user's home
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 22 Aug 2017 21:04:16 +0859
parents c00857f0e9d2
children 4e185146fc00
files s4-funcs.sh
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Tue Aug 22 15:23:39 2017 +0859
     1.2 +++ b/s4-funcs.sh	Tue Aug 22 21:04:16 2017 +0859
     1.3 @@ -1725,7 +1725,7 @@
     1.4    cond="gname in (select gname from grp_mem where user='$uname')"
     1.5    search_form_args=""
     1.6    if [ x"$user" = x"$uname" ]; then
     1.7 -    conflink="<a href=\"?userconf\" accesskey=\"e\"
     1.8 +    usermenu="<a href=\"?userconf\" accesskey=\"e\"
     1.9  	 title=\"E\">プロフィールの編集</a> /
    1.10  	<a href=\"?blog\" accesskey=\"n\" title=\"N\">新規話題の作成</a>"
    1.11      # Display folders
    1.12 @@ -1736,10 +1736,13 @@
    1.13      nfile=`query "$sql"`
    1.14      # err nfile=$nfile
    1.15      if [ $nfile -gt 0 ]; then
    1.16 -      conflink="$conflink / <a href=\"?lsmyfile\" accesskey=\"l\"
    1.17 +      usermenu="$usermenu / <a href=\"?lsmyfile\" accesskey=\"l\"
    1.18         title=\"L\">過去の提出ファイル</a>"
    1.19      fi
    1.20    else
    1.21 +    latestlog=`query "SELECT max(time) FROM acclog WHERE user='$uname' \
    1.22 +    		     GROUP BY user;"`
    1.23 +    usermenu="<p>Last seen on $latestlog</p>"
    1.24      search_form_args="author=$uname"
    1.25    fi
    1.26    . ./s4-blog.sh
    1.27 @@ -1856,7 +1859,7 @@
    1.28    #
    1.29    listgroupbytable $formdir/grp.def $cond |
    1.30        _m4 -D_BODYCLASS_=home -D_TITLE_="spaste(\`$tf')" \
    1.31 -	  -D_PROFILE_="spaste(\`$pf')$conflink" \
    1.32 +	  -D_PROFILE_="spaste(\`$pf')$usermenu" \
    1.33  	  -D_PROFIMG_="spaste(\`$imf')" \
    1.34  	  -D_BLOGS_="spaste(\`$bf')" \
    1.35  	  -D_SEARCH_="spaste(\`$sf')" \