-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.php
52 lines (38 loc) · 1.21 KB
/
home.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
<?php
class ControllerIndex{
private $_system;
private $_hat;
private $_shoe;
function __construct()
{
require_once 'libs/config.php';
$this->_system = System::singleton();
new Check();
$this->_hat = new Hat();
$this->_shoe = new Shoe();
$data["baseHref"] = $this->_system->GetBaseRef();
$data["skin"] = $this->_system->get('skin');
$data['env'] = $this->_system->getEnviroment();
$data['dbconsumer'] = $_SESSION['consumerdb'];
$data['dbmanager'] = $_SESSION['dbmanager'];
$data['dbquality'] = $_SESSION['dbquality'];
$data['dbwater'] = $_SESSION['dbwater'];
$data['dbenergy'] = $_SESSION['dbbnergy'];
$data['dbsmartmeter'] = false;
$this->_hat->pintaHat('home');
$array_bg = array();
$directory = $this->_system->get('background');
$dirint = dir($directory);
while (($archivo = $dirint->read()) !== false){
if (eregi("gif", $archivo) || eregi("jpg", $archivo) || eregi("png", $archivo)){
array_push($array_bg, $directory.$archivo);
}
}
$dirint->close();
$data['background'] = $array_bg;
$this->_system->fShow($this->_system->get('skin')."/tpl_mhome.php",$data);
$this->_shoe->pintaShoe();
}
}
new ControllerIndex();
?>