Permalink
Browse files

Insert Routes, Database classes, htaccess and some templates

  • Loading branch information...
1 parent b1289ce commit 4a664db2b3a4b0d2924d6853ac8f1b14e1952e4b @hanspolo hanspolo committed Apr 3, 2011
Showing with 127 additions and 0 deletions.
  1. +6 −0 .htaccess
  2. +2 −0 gui/footer.tpl.php
  3. +11 −0 gui/header.tpl.php
  4. +1 −0 gui/home.tpl.php
  5. +3 −0 gui/main.tpl.php
  6. +3 −0 gui/style.css
  7. +6 −0 inc/activity.php
  8. +53 −0 inc/main.php
  9. +6 −0 inc/milestone.php
  10. +10 −0 inc/project.php
  11. +7 −0 inc/ticket.php
  12. +9 −0 inc/user.php
  13. +10 −0 index.php
View
@@ -0,0 +1,6 @@
+RewriteEngine On
+RewriteBase /bugtrckr/
+RewriteCond %{REQUEST_FILENAME} !-l
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule .* index.php [L,QSA]
View
@@ -0,0 +1,2 @@
+ </body>
+</html>
View
@@ -0,0 +1,11 @@
+<html>
+ <head>
+ <link ref="stylesheet" href="/{@BASE}/gui/style.css"
+ rel="stylesheet" typ="text/css" />
+
+ <title>{@title}</title>
+
+ </head>
+
+ <body>
+
View
@@ -0,0 +1 @@
+Home
View
@@ -0,0 +1,3 @@
+<F3:include href="header.tpl.php" />
+<F3:include href="{@template}" />
+<F3:include href="footer.tpl.php" />
View
@@ -0,0 +1,3 @@
+body
+{
+}
View
@@ -0,0 +1,6 @@
+<?php
+
+ class Activity
+ {
+
+ }
View
@@ -0,0 +1,53 @@
+<?php
+
+ class main
+ {
+ function start()
+ {
+ F3::set('template', 'home.tpl.php');
+ $this->tpserve();
+ }
+
+
+ function showRoadmap()
+ {
+
+ $this->tpserve();
+ }
+
+
+ function showTimeline()
+ {
+
+ $this->tpserve();
+ }
+
+
+ function showTickets()
+ {
+
+ $this->tpserve();
+ }
+
+
+ function showTicket($hash)
+ {
+
+ $this->tpserve();
+ }
+
+
+ function addTicket()
+ {
+
+ $hash = rand(); // Created while saving into DB
+
+ showTicket($hash);
+ }
+
+
+ private function tpserve()
+ {
+ echo Template::serve('main.tpl.php');
+ }
+ }
View
@@ -0,0 +1,6 @@
+<?php
+
+ class Milestone
+ {
+
+ }
View
@@ -0,0 +1,10 @@
+<?php
+
+
+ class Project
+ {
+ private $id;
+ private $hash;
+ private $name;
+
+ }
View
@@ -0,0 +1,7 @@
+<?php
+
+ class Ticket
+ {
+
+
+ }
View
@@ -0,0 +1,9 @@
+<?php
+
+ class User
+ {
+ private $id;
+ private $hash;
+ private $name;
+
+ }
View
@@ -2,8 +2,18 @@
$app=require(__DIR__.'/lib/base.php');
+require 'inc/main.php';
+
$app->set('CACHE', true);
$app->set('DEBUG', 2);
$app->set('EXTEND', true);
$app->set('GUI','gui/');
+$app->route('GET /', 'main->start');
+$app->route('GET /roadmap', 'main->showRoadmap');
+$app->route('GET /timeline', 'main->showTimeline');
+$app->route('GET /tickets', 'main->showTickets');
+$app->route('GET /ticket/@hash', 'main->showTicket');
+$app->route('POST /ticket', 'main->addTicket');
+
+$app->run();

0 comments on commit 4a664db

Please sign in to comment.