]> git.plutz.net Git - confetti/blob - courses/index.cgi
use $upcase constant only in its function
[confetti] / courses / index.cgi
1 #!/bin/sh
2
3 . $_EXEC/pdiread.sh
4 . $_EXEC/courses/l10n.sh
5 . $_EXEC/courses/widgets.sh
6 . $_EXEC/courses/list.sh
7
8 order="$(GET o |grep -m1 -xE 'DOW|TOD')"
9 edit="$(GET e |PATH)"
10
11 [ "$order" ] || order=DOW
12 edit="${edit##*/}"
13
14 { w_sort_courses
15   printf '
16   [form .newcourses action="%s/courses/new_course.sh" method="POST"
17     [button type="submit" %s]
18   ]' "${_BASE}" "$(l10n newcourse)"
19
20   [ "$edit" ] && edit_course "$edit"
21   printf '[div .courselist\n'
22     list_courses
23   printf ']'
24 } | yield_page courses #/courses/courses.css