(集計は板への投稿者のみ)
" + fi + sql="with arts as (select id,author from article \ where blogid=(select id from blog where rowid=$2))\ select (select rowid from user where name=c0.user)||' '|| \ coalesce((select val from user_s where name=c0.user \ @@ -209,7 +223,7 @@ as 'コメント記入',\ sum(case when c2.key is not null then 1 else 0 end)\ as 'ファイルの提出'\ - from (select user from grp_mem where gname='$owner') c0\ + from $sample c0 \ left join (select id,author from arts) a\ on c0.user=a.author\ left join (select id,key from article_s where key='text') c1\ @@ -222,6 +236,40 @@ | sed -e "s,\(取得できるファイルがありませんでした。
" + return + fi + (cd $bd + err cdto$bd; (pwd; ls -lFa) 1>&3 + tar zcf .archive.tar.gz * && mv .archive.tar.gz archive.tar.gz + ) + arc=$bd/archive.tar.gz + echo "Content-type: application/x-gzip" + echo "Content-Length: `cat $arc|wc -c`" + echo "Content-Disposition: filename=\"archive.tar.gz\"" + echo + cat $arc +} listblog() ( # $1=user diff --git a/se-funcs.sh b/se-funcs.sh index 8ce0ec7..eb91f96 100755 --- a/se-funcs.sh +++ b/se-funcs.sh @@ -7,8 +7,9 @@ bindir=`(cd $mydir/bin; pwd)` PATH=/usr/local/sqlite3/bin:$PATH:$bindir tmpdir=${TMPDIR:-tmp} +dbdir=${DBDIR:-db} tmpfiles="" -db=${DB:-$tmpdir/cgi.sq3} +db=${DB:-$dbdir/cgi.sq3} admin=wwwadmin@gentei.org layout=templ/default formdir=templ/form @@ -36,10 +37,12 @@ グループへの一斉送信機能は付いたが表に出てない(7/6) ひとつのarticleをheadingにして新規ツリーを作成、あるといいかも。 -7/17 個人blogに「レポート提出用」がついたとき +7/18 ○書込著者からホームへのリンク + 締切設定 一斉送信 - 添付ファイル回収 - imgcacheは別ディレクトリにしないと + .htaccess +7/17 ○個人blogに「レポート提出用」がついたときの挙動 + ○添付ファイル回収 + ○imgcacheは別ディレクトリにしないと + .htaccess 7/15 ○レポート提出モードの表示を付ける 管理者権限での削除? → まだいいか @@ -372,8 +375,14 @@ } gecos() ( u=${1:-$user} - gecos=`query "select val from user_s where name='$u' and key='gecos';"` - echo "${gecos:-$u}" + #gecos=`query "select val from user_s where name='$u' and key='gecos';"` + sql="select case when (select name from user where name='$u') is not null + then (select val from user_s where name='$u' and key='gecos') + when (select gname from grp where gname='$u') is not null + then (select val from grp_s where gname='$u' and key='gecos') + else '$u' + end;" + query "$sql" ) getpar() { err getpar: "select val from par where var='$1' and sessid='$session' $2;" @@ -545,7 +554,7 @@ query "select quote(bin) from $cond and val=\"$fn\";" \ | xxd -r -p > $file echo ${type#file:} > $file.content-type -err TTTTTTTTTTTTTTTT: $type +# err TTTTTTTTTTTTTTTT: $type case $type in *:[Ii]mage*) mogrify -geometry $thumbxy $file ;; *:[Aa]pplication*) @@ -932,7 +941,7 @@ type='file'; k=${k%:filename} case `file --mime-type $tmpdir/$v|cut -d' ' -f2` in [Ii]mage/*) - mogrify -resize $maximagexy $tmpdir/$v + mogrify -resize $maximagexy'>' $tmpdir/$v ;; esac ;; @@ -1391,7 +1400,7 @@ fi tbl=${1%.def} tbl=${tbl##*/} - if [ -n "$rowid" ]; then + if [ -n "$rowid" ]; then # Modify existing entry if [ x"$tbl" = x"user" ]; then rowowner=`query "select name from $tbl where rowid=$rowid;"` elif [ x"$tbl" = x"grp" ]; then