]> git.llucax.com Git - software/bife/web.git/commitdiff
Added a first (useless) version of the website.
authorLeandro Lucarella <llucax@gmail.com>
Fri, 11 Jul 2003 16:01:26 +0000 (16:01 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Fri, 11 Jul 2003 16:01:26 +0000 (16:01 +0000)
index.php [new file with mode: 0644]
index.xbf [new file with mode: 0644]
templates/bife_link.tpl.html [new file with mode: 0644]
templates/bife_page.tpl.html [new file with mode: 0644]
templates/bife_title.tpl.html [new file with mode: 0644]

diff --git a/index.php b/index.php
new file mode 100644 (file)
index 0000000..862cc1f
--- /dev/null
+++ b/index.php
@@ -0,0 +1,66 @@
+<?php
+// vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker:
+// +--------------------------------------------------------------------+
+// |                       BIFE - Buil It FastEr                        |
+// +--------------------------------------------------------------------+
+// | This file is part of BIFE.                                         |
+// |                                                                    |
+// | BIFE is free software; you can redistribute it and/or modify it    |
+// | under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation; either version 2 of the License, or  |
+// | (at your option) any later version.                                |
+// |                                                                    |
+// | BIFE 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   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// Inicialization {{{
+#ini_set('include_path', '../src:../../hit/src:../../bife/src:'.
+#    ini_get('include_path'));
+umask('002');
+require_once 'HTML/Template/HIT.php';
+require_once 'BIFE/Parser.php';
+require_once 'BIFE/Translate.php';
+// }}}
+
+// Selects the file to view {{{
+$file = (@$_SERVER['PATH_INFO'] and ($_SERVER['PATH_INFO'] != '/'))
+    ? ".{$_SERVER['PATH_INFO']}"
+    : 'index.xbf';
+// }}}
+
+// Looks if we want to show the source {{{
+if (@$_REQUEST['S']) {
+    if (@$_REQUEST['B']) {
+        // We want to see the BIFE file source.
+        echo '<PRE>';
+        echo htmlentities(join('', file($file)));
+    } else {
+        // We want to see the php file source.
+        highlight_file($_SERVER['SCRIPT_FILENAME']);
+    }
+    exit;
+}
+// }}}
+
+// If we are not looking at the source, we use BIFE to show the page {{{
+$template =& new HTML_Template_HIT('templates');
+$parser   =& new BIFE_Parser('BIFE_Translate');
+$page     =& $parser->parseFile($file);
+$parser->__destruct();
+echo $page->render($template);
+// }}}
+
+?>
diff --git a/index.xbf b/index.xbf
new file mode 100644 (file)
index 0000000..cb96fa5
--- /dev/null
+++ b/index.xbf
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="BIFE - Build It FastEr">
+    <Title>Welcome to BIFE!</Title>
+    <P>BIFE is a blah.</P>
+</Page>
diff --git a/templates/bife_link.tpl.html b/templates/bife_link.tpl.html
new file mode 100644 (file)
index 0000000..873ba85
--- /dev/null
@@ -0,0 +1 @@
+<A href="{URL}" title="{DESC}">{CONTENTS}</A>
diff --git a/templates/bife_page.tpl.html b/templates/bife_page.tpl.html
new file mode 100644 (file)
index 0000000..7f99f80
--- /dev/null
@@ -0,0 +1,12 @@
+<HTML>
+    <HEAD>
+        <TITLE>{TITLE}</TITLE>
+    </HEAD>
+    <BODY>
+        <H1>{TITLE}</H1>
+        {CONTENTS}
+        <HR noshade="noshade" size="2"/>
+        <A href="?S=1&B=1">View BIFE (xbf) source</A> |
+        <A href="?S=1">View PHP source</A>
+    </BODY>
+</HTML>
diff --git a/templates/bife_title.tpl.html b/templates/bife_title.tpl.html
new file mode 100644 (file)
index 0000000..3590da3
--- /dev/null
@@ -0,0 +1 @@
+<H2>{CONTENTS}</H2>