forked from RaspberryPints/RaspberryPints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·29 lines (24 loc) · 839 Bytes
/
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
<?php
session_start();
if (!file_exists(__DIR__ . '/includes/dbconfig.php')) {
header('Location: install/index.php', true, 303);
die();
}
require_once __DIR__ . '/includes/common.php';
require_once __DIR__ . '/admin/includes/managers/tap_manager.php';
require_once __DIR__ . '/admin/includes/models/tap.php';
$Smarty->Assign('Page', 'taplist');
// Setup array for all the taps that will be contained in the list
$tapManager = new TapManager();
$taps = $tapManager->getActiveTaps();
ksort($taps);
$Smarty->assign('taps', $taps);
$Smarty->assign('tapManager', $tapManager);
# Get SRM to SRMRGB conversion table
$SRM2RGB = array();
foreach ($DBO->query('select * from srmRgb', PDO::FETCH_ASSOC) as $srm) {
$SRM2RGB[$srm['srm']] = $srm['rgb'];
}
$Smarty->assign('SRM2RGB', $SRM2RGB);
$Smarty->display('frontend/layout.tpl')
?>