umask=002
alias _wiki="stx2any --no-template --link-abbrevs --quote -T html"
-. auth/acl.sh
+. auth/permissions.sh
page=$(egrep -o '(^|&)p=[a-zA-Z0-9/_-]+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,p=,,')
<link rel="stylesheet" type="text/css" href="wikitext.css">
$([ -r "${page}.css" ] && echo '<link rel="stylesheet" type="text/css" href="'"$page"'.css">')
<style type="text/css"><!-- --></style>
+
<script type="text/javascript">
<!--
-function show_screen(id){
- document.getElementById(id).style.display = "inline";
-}
-function hide_screen(id){
- document.getElementById(id).style.display = "none";
-}
+ function show_screen(id){
+ document.getElementById(id).style.display = "inline";
+ }
+ function hide_screen(id){
+ document.getElementById(id).style.display = "none";
+ }
-->
</script>
+
+ <!-- Script for Flattr Button -->
+ <script type="text/javascript">
+ /* <![CDATA[ */
+ (function() {
+ var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
+ s.type = 'text/javascript';
+ s.async = true;
+ s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
+ t.parentNode.insertBefore(s, t);
+ })();
+ /* ]]> */</script>
+
</head>
<body onload="init();">
<div id="TITLE">
<input type="password" name="pass" value placeholder="Password"><br>
<input type="submit" value="Go!">
</form>')
+$( $LOGIN && echo "You are loggeed in as <b>${REMOTE_USER}</b><br>")
+$( $LOGIN && $ACL_ADMIN && echo '<a href="?p=Admin">Admin</a><br>')
+$( $LOGIN && echo '<a href="?p=Settings">My Settings</a><br>')
</div>
<div id="ACCOUNTING">
+ $(grep -q 'useFlattr=yes' project.meta && echo '
+ <a class="FlattrButton" style="display:none;" href="http://'${HTTP_HOST}'"></a>
+ <noscript> <a href="'$(sed -rn 's:^flattrThingURL=(.*)$:\1:p' project.meta)'" target="_blank">
+ <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
+ </a></noscript>
+ ')
</div>
<div id="MENU">
<a href='/?p=Home'>Home</a>