My favorites
|
Sign in
phpskeleton
lightweight PHP web application framework
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
‹r47
r111
Source path:
svn
/
samples
/
forum
/
index.php
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
<?php
function include_dir($directory) {
foreach(scandir("$directory/") as $file) {
if(!strpos($file,".") == 0 && !is_dir($file)) {
include "$directory/$file";
}
}
}
// get config
include 'app/config.php';
// get core
include_dir('core/');
// for timer, etc
do_hooks('absolute_beginning');
// get helpers
include_dir('helpers');
// connect to database
if(!empty($config['database'])) {
$db = new Database($config['database'],$config['database_print_queries']);
}
// load application
include_dir('app/models');
include_dir('app/helpers');
// decide which controller, action, ident
$url = parse_request($config);
include 'app/routes.php';
// decide which format
if(!empty($_GET['format'])){
$format = $_GET['format'];
} else {
$format = $defaults['format'];
}
// revert to defaults if necessary
if(empty($controller)){$controller=$defaults['controller'];};
if(empty($action)){$action='index';};
// this will be included from wrapper.php
$view = "app/views/$format/$controller/$action.php";
if($action == 'list'){$action='all';}; // 'list' is already a php function
// load, initialize the main class
include "app/controllers/$controller-controller.php";
eval("\$controller = new $controller"."_controller();");
eval("\$controller -> $action();");
// get the show on the road
include "app/views/$format/layout.php";
// finish up
do_hooks('absolute_end');
?>
Show details
Hide details
Change log
r60
by bonasaurus1 on Mar 27, 2008
Diff
added syntax highlighting, tweaks
Go to:
/samples/forum/.htaccess
/samples/forum/app/config.php
...orum/app/helpers/syntaxhighlight
.../app/helpers/syntaxhighlight.php
...pp/helpers/syntaxhighlight/geshi
...elpers/syntaxhighlight/geshi.php
...s/syntaxhighlight/geshi/abap.php
...highlight/geshi/actionscript.php
...rs/syntaxhighlight/geshi/ada.php
...syntaxhighlight/geshi/apache.php
...xhighlight/geshi/applescript.php
...rs/syntaxhighlight/geshi/asm.php
...rs/syntaxhighlight/geshi/asp.php
...syntaxhighlight/geshi/autoit.php
...s/syntaxhighlight/geshi/bash.php
...ntaxhighlight/geshi/basic4gl.php
...axhighlight/geshi/blitzbasic.php
...rs/syntaxhighlight/geshi/bnf.php
...pers/syntaxhighlight/geshi/c.php
.../syntaxhighlight/geshi/c_mac.php
...syntaxhighlight/geshi/caddcl.php
...yntaxhighlight/geshi/cadlisp.php
...s/syntaxhighlight/geshi/cfdg.php
...rs/syntaxhighlight/geshi/cfm.php
...syntaxhighlight/geshi/cpp-qt.php
...rs/syntaxhighlight/geshi/cpp.php
...syntaxhighlight/geshi/csharp.php
...yntaxhighlight/geshi/css-gen.cfg
...rs/syntaxhighlight/geshi/css.php
...pers/syntaxhighlight/geshi/d.php
...syntaxhighlight/geshi/delphi.php
...s/syntaxhighlight/geshi/diff.php
...rs/syntaxhighlight/geshi/div.php
...rs/syntaxhighlight/geshi/dos.php
...rs/syntaxhighlight/geshi/dot.php
...syntaxhighlight/geshi/eiffel.php
...yntaxhighlight/geshi/fortran.php
...taxhighlight/geshi/freebasic.php
...syntaxhighlight/geshi/genero.php
...rs/syntaxhighlight/geshi/gml.php
...syntaxhighlight/geshi/groovy.php
...yntaxhighlight/geshi/haskell.php
...xhighlight/geshi/html4strict.php
...rs/syntaxhighlight/geshi/idl.php
...rs/syntaxhighlight/geshi/ini.php
...s/syntaxhighlight/geshi/inno.php
...ers/syntaxhighlight/geshi/io.php
...s/syntaxhighlight/geshi/java.php
.../syntaxhighlight/geshi/java5.php
...axhighlight/geshi/javascript.php
Project members,
sign in
to write a code review
Older revisions
r47
by bonasaurus1 on Mar 22, 2008
Diff
re-added forum sample
All revisions of this file
File info
Size: 1378 bytes, 47 lines
View raw file
Hosted by