Show sourcecode

The following files exists in this folder. Click to view.

Foogler_blog/

config.php
images/
index.php
pages/
placeholder.php
source.php
src/
stylesheet.css

index.php

102 lines ASCII Windows (CRLF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
//------------------
// index.php
//
// frontcontroller for foogler blog
//------------------
error_reporting(E_ALL);

// -------------------------
//Starts session
session_start(); 

// ------------------
// Common files for all pagecontrollers
require_once('config.php');

// Allow only access to pagecontrollers through frontcontroller
$indexIsVisited TRUE;

// ------------------
//
// Redirect to the choosen pagecontroller
//
$page = isset($_GET['p']) ? $_GET['p'] : 'index';

switch(
$page) {
  
//Index page
  
case 'index':   
    require_once(
TP_PAGESPATH 'PIndex.php'); 
    break;
    
  
//DB
  
case 'install':
      require_once(
TP_PAGESPATH 'PInstall.php');
      break;     
    case 
'installp':
      require_once(
TP_PAGESPATH 'PInstallProcess.php');
      break;     
      
    
//Posting
  
case 'post':
    require_once(
TP_PAGESPATH 'PShowPost.php');
    break;
  case 
'edit':
    require_once(
TP_PAGESPATH 'PEditPost.php');
    break;
  case 
'editp':
    require_once(
TP_PAGESPATH 'PEditPostProcess.php');
    break;
  case 
'delete':
    require_once(
TP_PAGESPATH 'PDeletePost.php');
    break;
  case 
'deletep':
    require_once(
TP_PAGESPATH 'PDeletePostProcess.php');
    break;
  case 
'commentp':
    require_once(
TP_PAGESPATH 'PCommentProcess.php');
    break;
  case 
'cdeletep':
    require_once(
TP_PAGESPATH 'PDeleteCommentProcess.php');
    break;
  case 
'new':
    require_once(
TP_PAGESPATH 'PNewPost.php');
    break;
  case 
'newp':
    require_once(
TP_PAGESPATH 'PNewPostProcess.php');
    break;
      
    
//Login & -out
    
case 'login':
      require_once(
TP_PAGESPATH 'login/PLogin.php');
      break;
    case 
'loginp':
      require_once(
TP_PAGESPATH 'login/PLoginProcess.php');
      break;
    case 
'logout':
      require_once(
TP_PAGESPATH 'login/PLogoutProcess.php');
      break;
      
    
//Other pages
  
case 'ER':
    require_once(
TP_PAGESPATH 'PErDiagramme.php');
    break;
  case 
'stats':
    require_once(
TP_PAGESPATH 'PStatistics.php');
    break;
  case 
'author':
    require_once(
TP_PAGESPATH 'PAuthor.php');
    break;
  case 
'rss':
    require_once(
TP_PAGESPATH 'PRssFeed.php');
    break;  
  case 
'validate':
    require_once(
TP_PAGESPATH 'PValidate.php');
    break;
    
  
//Default
  
default:      
    require_once(
TP_PAGESPATH 'PIndex.php'); 
    break;
}