-
Notifications
You must be signed in to change notification settings - Fork 0
/
tournaments.php
41 lines (30 loc) · 1002 Bytes
/
tournaments.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
<?php
require_once("tournament.settings.php");
$className = 'Tournament';
$classFile = classFile($className);
require_once($classFile);
// get all rows from table
$object = new $className;
require_once('Tournament_Smarty.php');
//** un-comment the following line to show the debug console
//$smarty->debugging = true;
$smarty = new Tournament_Smarty();
$breadCrumbs['index.php'] = "Home";
$breadCrumbs['sponsor.php'] = "Sponsor";
$breadCrumbs['tournaments.php'] = "Tournament";
$smarty->assign('breadCrumbs', $breadCrumbs);
$keys = $object->keys();
$smarty->assign('keyField', "id");
$columnHeaders[] = "ID";
$columnHeaders[] = "Title";
$columnHeaders[] = "Description";
$smarty->assign('columnHeaders', $columnHeaders);
$columns[] = "id";
$columns[] = "title";
$columns[] = "description";
$smarty->assign('columns', $columns);
$smarty->assign('rows', $object->rows());
$pageName = "tournament";
$smarty->assign('table_caption', ucfirst($pageName));
$smarty->display("{$pageName}.tpl");
?>