#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin . /usr/lib/libmodcgi.sh [ -e "/mod/etc/reg/extra.reg" ] || touch /mod/etc/reg/extra.reg if [ -z "$PATH_INFO" ]; then _cgi_extras() { if [ -s /mod/etc/reg/extra.reg ]; then [ -e /mod/etc/reg/cgi.reg ] || touch /mod/etc/reg/cgi.reg cat /mod/etc/reg/extra.reg | while IFS='|' read -r pkg title sec cgi; do if [ ! -z "$title" ]; then if [ "$cur_pkg" != "$pkg" ]; then [ -z "$cur_pkg" ] || echo '' if [ "$pkg" = "mod" ]; then echo '
$(lang de:"keine Extras" en:"no extras")
' fi } cgi_begin 'Extras' 'extras' [ -e /mod/var/cache/extras ] || _cgi_extras > /mod/var/cache/extras cat /mod/var/cache/extras cgi_end else OIFS="$IFS" IFS='/' set -- $(echo "$PATH_INFO" | sed -e 's/\.//g') pkg="$2"; cgi="$3" IFS='|' set -- $(cat /mod/etc/reg/extra.reg | grep "^$pkg|.*|$cgi\$") IFS="$OIFS" if [ "$sec_level" -gt "$3" ]; then cgi_begin 'Extras' echo '$(lang de:"Fehler" en:"Error"): $(lang de:"Zusatz-Skript '$cgi.cgi' nicht gefunden." en:"Additional script '$cgi.cgi' not found.")
" cgi_end fi fi fi