-
Notifications
You must be signed in to change notification settings - Fork 1
/
guestbook.php
39 lines (33 loc) · 1.12 KB
/
guestbook.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
<?php
// cog core modules
include_once("./engine/_config.php");
include_once("./engine/cog_common.php");
include_once("./engine/cog_errorhandler.php");
include_once("./engine/cog_database.php");
include_once("./engine/cog_logger.php");
include_once("./engine/cog_scriptor.php");
include_once("./engine/cog_variants.php");
include_once("./engine/cog_webhandler.php");
include_once("./engine/cog_session.php");
initsql(); // initalize database
session_start(); // start session
log_start(); // log request
variants_start(); // initalizes variants
// create a new webhandler for all requests
$w = new WebHandler([ // URL handlers
// main pages
"/" => "site_guestbook/guestbook.php",
"/purchase" => "site_guestbook/purchase.php",
"/thanks" => "site_guestbook/thanks.html",
// admin interface
"/admin" => "site_admin/multivariants.php",
"/user_api" => "site_admin/user_api.php",
"(.*)" => "site_guestbook/notfound.php"
],
// frame parameters
["title" => "Cog - guestbook example",
"frame" => "site_guestbook/frame.html"
] );
// print_r($w); exit;
echo $w->result();
?>