X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=index.cgi;h=6084c3e04902543ff56d5eadef0d0f3bc105f8ad;hp=e794d138f3ca905b0d1429ebfd5c2ab1fe62aac8;hb=ab208fff56e536585bc0978898a7c3f610c73dce;hpb=62c3d9c54dec22772956bea9f2ec482c891e511e diff --git a/index.cgi b/index.cgi index e794d13..6084c3e 100755 --- a/index.cgi +++ b/index.cgi @@ -18,16 +18,15 @@ umask=002 alias _wiki="stx2any --no-template --link-abbrevs --quote -T html" +. auth/permissions.sh page=$(egrep -o '(^|&)p=[a-zA-Z0-9/_-]+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,p=,,') [ -z "$LOGIN" ] && LOGIN=false -[ -z "$DEV" ] && DEV=false -[ -z "$ADM" ] && ADM=false [ -z "$page" ] && page=Home if (! $LOGIN && egrep -qx "https?://${HTTP_HOST}/(session.cgi\?|write/).*" <<<"${HTTP_REFERER}"); then - echo -n "Location: http://${HTTP_HOST}/session.cgi?${QUERY_STRING}\n\n" + echo -n "Location: https://${HTTP_HOST}/session.cgi?${QUERY_STRING}\n\n" exit 0 fi @@ -39,21 +38,36 @@ cat < - Busy + $(sed -rn 's:^name=(.*)$:\1:p' project.meta) - Busy + $([ -r "${page}.css" ] && echo '') + + + + +
@@ -61,20 +75,42 @@ function hide_screen(id){ $(egrep '^slogan=.*$' project.meta |cut -d= -f2-)
-$( $LOGIN || echo '
+$( $LOGIN || echo ' Login:


') +$( $LOGIN && echo "You are loggeed in as ${REMOTE_USER}
") +$( $LOGIN && $ACL_ADMIN && echo 'Admin
') +$( $LOGIN && echo 'My Settings
')
+ $(btcAddress="$(sed -rn 's:^btcAddress=(.*)$:\1:p' project.meta)" + flattrThingURL=$(sed -rn 's:^flattrThingURL=(.*)$:\1:p' project.meta) + + grep -q 'useBitcoin=yes' project.meta && [ \! -f "QRcodes/bitcoin:${btcAddress}.png" ] &&\ + qrencode -o "QRcodes/bitcoin:${btcAddress}.png" "bitcoin:$btcAddress" + grep -q 'useBitcoin=yes' project.meta && echo ' + + + ' + grep -q 'useFlattr=yes' project.meta && echo ' + + + ')
$(if [ -r "./${page}.page" ]; then . "./${page}.page"