]> git.plutz.net Git - busy/blobdiff - index.cgi
upgraded to fit new shcgi revision, slightly better input validation, switched to...
[busy] / index.cgi
deleted file mode 100755 (executable)
index e794d138f3ca905b0d1429ebfd5c2ab1fe62aac8..0000000000000000000000000000000000000000
--- a/index.cgi
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/zsh
-
-# Copyright 2011 Paul Haensch
-# This file is part of Busy
-#
-# Busy is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Busy is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with Busy.  If not, see <http://www.gnu.org/licenses/>.
-
-umask=002
-alias _wiki="stx2any --no-template --link-abbrevs --quote -T html"
-
-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"
-  exit 0
-fi
-
-echo -n "Content-type: text/html\n\n"
-
-cat <<END_index.cgi
-<!DOCTYPE HTML>
-<!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" -->
-
-<html>
-  <head>
-    <title>Busy</title>
-    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <link rel="stylesheet" type="text/css" href="busy.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";
-}
-    -->
-    </script>
-  </head>
-  <body onload="init();">
-    <div id="TITLE">
-      <h1 id="NAME">$(egrep '^name=.*$' project.meta |cut -d= -f2-)</h1>
-      <span id="SLOGAN">$(egrep '^slogan=.*$' project.meta |cut -d= -f2-)</span>
-    </div>
-    <div id="USERMENU">
-$( $LOGIN || echo '<form action="/login.cgi?'${QUERY_STRING:gs/&/&amp;/}'" method="post" accept-charset="UTF-8">
-                    Login:<br>
-                    <input type="text" name="user" value placeholder="Username"><br>
-                    <input type="password" name="pass" value placeholder="Password"><br>
-                    <input type="submit" value="Go!">
-                  </form>')
-    </div>
-    <div id="ACCOUNTING">
-    </div>
-    <div id="MENU">
-      <a href='/?p=Home'>Home</a>
-      <a href='/?p=Wiki'>Wiki</a>
-      <a href='/?p=Code'>Code</a>
-      <a href='/?p=Issues'>Issues</a>
-    </div>
-      $(if [ -r "./${page}.page" ]; then
-       . "./${page}.page"
-        else
-       echo '<h2>Page not found or nevermore</h2>'
-       echo 'Quoth the Raven: 404'
-        fi
-      )
-  </body>
-</html>
-END_index.cgi
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..410e699d63ab9fc7348d1ad94344a7d904bbd060
--- /dev/null
+++ b/index.cgi
@@ -0,0 +1 @@
+shcgi/index.cgi
\ No newline at end of file