forked from basv1996/MyBand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
91 lines (75 loc) · 2.63 KB
/
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
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
<meta charset="utf-8">
<?php
// Get username, password from database
include 'includes/config.php';
// Load Smarty library
require 'libs/Smarty.class.php';
// Initialize
include 'includes/bootstrap.php';
// Make database connection
include 'includes/database.php';
// include funtions
include 'includes/funcs.php';
//include select newsartciles
// Assign value of page title to the smarty variable 'title', usually the value comes from a database
$templateParser->assign('title', 'Titeltje');
// Display template: output html
$templateParser->display('head.tpl');
// Display template: output html
$templateParser->display('header.tpl');
$action=isset($_GET['action'])?$_GET['action']:'home';
switch ($action) {
case 'home':
$page_nr = isset($_GET['page_nr'])?$_GET['page_nr']:1;
include('model/select_newsarticles.php');
$templateParser->assign('result',$result);
//calculate total number of articles
include('model/get_nr_articles.php');
$templateParser->assign('total_number_articles',$total_number_articles);
$templateParser->display('newsarticles.tpl');
break;
case 'band':
include('model/select_bandleden.php');
$templateParser->assign('result2',$result2);
$templateParser->display('band.tpl');
break;
case 'tour':
include('model/select_tour.php');
$templateParser->assign('result3',$result3);
$templateParser->display('tour.tpl');
break;
case 'shop':
include('model/select_shop.php');
$templateParser->assign('result4',$result4);
$templateParser->display('shop.tpl');
//$page=isset($_GET['page'])?$_GET['page']:'home';
//$templateParser->assign('page',$page);
//$templateParser->display('active.tpl');
//switch ($page) {
// case "home";
// $templateParser->display('active.tpl');
// $templateParser->display('index.php');
// break;
// case "Band";
// $templateParser->display('active.tpl');
// $templateParser->display('Band.tpl');
// break;
// case "Tour";
//$templateParser->display('active.tpl');
// $templateParser->display('Tour.tpl');
// break;
// case "Shop";
// $templateParser->display('active.tpl');
// $templateParser->display('Shop.tpl');
//break;
// case "Search";
// $templateParser->display('active.tpl');
// $templateParser->display('Serach.tpl');
// break;
//}
}
$templateParser->assign('footer', 'Made By Bas Vugts <br>In cooperation With MediaCollege Amsterdam <br>
School-Project 2016-2017');
//de footer
$templateParser->display('footer.tpl');
?>