Mercurial > hgrepos > hgweb.cgi > s4
diff s4-blog.sh @ 875:380167e9cfcf
Add link to generate csv file for Zoom(TM) pre-assigned rooms
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 02 Dec 2020 19:10:52 +0859 |
parents | 1b0669c854cf |
children | 85a20c87bf97 |
line wrap: on
line diff
--- a/s4-blog.sh Wed Oct 28 16:01:46 2020 +0900 +++ b/s4-blog.sh Wed Dec 02 19:10:52 2020 +0859 @@ -1077,6 +1077,35 @@ -D_DUMPTABLE_="syscmd(cat)" $layout/form+dump.m4.html echo '</table>' } +getteamcsv() { + gid=`numericalize "$1"` + grp=`getgroupbyid "$gid"` + err gid=$gid grp=$grp + if ! isgrpowner "$user" "$grp"; then + contentytpe 'text/plain; charset="utf-8"'; echo + echo "管理者メンバー以外は利用できません。" | html p; return + fi + fn="team-$gid.csv" + csv="$tmpd/$fn" + err csv=$csv + # We can leave csv mode here because this scripts will exit soon + query <<-EOF + .mode csv + .head 1 + .output $csv + SELECT val "ルーム名を事前割り当て", user "メールアドレス" + FROM grp_mem_m + WHERE key='team' + AND gname=(SELECT gname FROM grp WHERE rowid=$gid) + ORDER BY val; + EOF + contenttype 'text/plain; charset="utf-8"' + echo "Content-Disposition: filename=\"$fn\"" + echo "Content-Length: " `cat $csv | wc -c`; echo + #echo "Content-Type: " ${type#file:}; echo + cat $csv + exit +} searchart() { _m4 -D_TITLE_="検索結果" $layout/html.m4.html kwd=`getpar kwd|nkf -wZ1` # Convert Zenkaku-SPC to ASCII-SPC