s4

view s4.cgi @ 520:0d8785102531

Resolve confliction of s4.cgi
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 06 Apr 2019 17:35:07 +0900
parents e8bde2d9cb0b
children
line source
1 #!/bin/sh
2 #!/bin/ksh
3 # 愛 - Do not EDIT this file manually. GENERATE from scripts/s4-*.case.
4 mydir=`dirname $0`
5 echo "1=[$1]" >> tmp/debug.out
6 . $mydir/s4-funcs.sh
8 cgiinit
9 if [ -z "$guestonlymode" ]; then
10 if [ x"$1" = x"reg" ]; then
11 contenttype; echo
12 regist $2
13 putfooter
14 exit
15 fi
17 dologin
18 fi
20 case ${SERVER_SOFTWARE} in
21 bozohttp*) # Ugly workaround for bozohttpd, which can't send
22 # two or more arguments.
23 set -- `echo "$@"|(IFS=+ read a b c d e f g; echo $a $b $c $d $e $f $g)`
24 ;;
25 esac
27 err "1=$1 2=$2 3=$3 4=$4"
28 stage=`getpar stage`
29 stage=${stage:-$1}
30 case ${stage} in
31 home|"")
32 contenttype; echo
33 err HOME: just in rowid=`getpar rowid`
34 [ -n "`getpar rowid`" ] && par2table $formdir/user.def
35 showhome ${2:-$user}
36 ;;
37 login)
38 contenttype; echo
39 myargs=""
40 showlogin
41 ;;
42 # "edittable")
43 # contenttype; echo
44 # m4 -D_TITLE_="グループ編集/削除" $layout/html.m4.html
45 # edittable "$formdir/$2.def" "$2" "$3"
46 # ;;
47 "showattc")
48 shift
49 showattc "$@"
50 exit 0 # Do not output further chunks
51 ;;
52 invite|groupman|userconf|groupconf|mems|grps|grp|groupupdate|groupclone|grpaction|joingrpadmit|commission|editheading|editart|showattc|send2mem|mvart)
53 contenttype; echo
54 [ -n "$1" ] && shift
55 $stage "$@"
56 ;;
57 "blog") # $2=grpID
58 contenttype; echo
59 . ./s4-blog.sh
60 blog_addentry $2
61 ;;
62 "replyblog")
63 contenttype; echo
64 rowid=${2%%[!A-Z0-9a-z_]*}
65 ## err ROWid=$rowid, '$2'=$2
66 . ./s4-blog.sh
67 err blog_reply2 $rowid
68 blog_reply $rowid
69 ;;
70 aid[1-9]*)
71 arid=${1#aid}
72 arid=${arid%%[!0-9]*}
73 . ./s4-blog.sh
74 err b_r_a "$arid"
75 blog_reply_article "$arid"
76 ;;
77 reload*) # Dirty workaround for reloading page just after submit
78 newurl="$urlbase?replyblog+${stage#*/}#bottom"
79 echo "Refresh: 0; $newurl"; echo
80 exit 0
81 ;;
82 lshandout|lshandoutall|gethandout|gethandoutcsv|gethandoutcsv2|blogseen)
83 case "$stage" in
84 lshandout*|blogseen*) contenttype; echo ;;
85 esac
86 rowid=${2%%[!A-Z0-9a-z_]*}
87 if [ -z "$rowid" ]; then
88 echo "話題番号が未指定です。" | html p
89 return
90 fi
91 . ./s4-blog.sh
92 $stage $rowid
93 ;;
94 lsmyfile)
95 contenttype; echo
96 . ./s4-blog.sh
97 shift
98 $stage "$@"
99 ;;
100 "searchart") # $2=blogowner
101 contenttype; echo
102 m4 -D_TITLE_="検索結果" $layout/html.m4.html
103 . ./s4-blog.sh
104 searchart $2
105 ;;
106 *)
107 exec $0 login
108 ;;
109 esac
111 putfooter