-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
executable file
·42 lines (41 loc) · 1.59 KB
/
footer.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
<?php
$active = $_GET['page']
?>
<!--
<div data-role="footer" data-id="Myfooter" data-position="fixed" data-theme="c" data-tap-toggle="false" class="nav-glyphish-example">
<div data-role="navbar" class="nav-glyphish-example">
-->
<div data-role="footer" data-id="foo1" data-position="fixed" data-theme="c" data-tap-toggle="false" >
<div data-role="navbar" class="nav-glyphish-example">
<ul>
<?
$sql_footerconf = query( "SELECT * FROM configFooter ORDER by sortOrder ASC");
$sql_dreambox = query("SELECT ip FROM devices WHERE type='enigma2'");
$dreambox = fetch($sql_dreambox);
while( $footerconf = fetch( $sql_footerconf ) ){
if ($footerconf['codename'] == 'room'){
$sql = query( "SELECT id FROM rooms");
$Rooms = fetch( $sql );
$sql2 = query( "SELECT value FROM config WHERE options='StandardRoom'");
$StandardRoom = fetch( $sql2 );
if( $Rooms['id'] ){
$page = $footerconf['codename'] . "&room=" . $StandardRoom['value'];
}else{
$footerconf['visible'] == 'No';
}
}elseif ($footerconf['codename'] == 'dreambox'){
$page = $footerconf['codename'] . "&id=start&ip=" . $dreambox['ip'];
}else{
$page = $footerconf['codename'];
}
if ($footerconf['visible'] == 'Yes'){
?>
<li><a href="?page=<? echo $page; ?>" <?php if($active == $footerconf['codename']) { ?> class="ui-btn-active ui-state-persist" <?php } ?> id="<? echo $footerconf['icon'];?>" data-icon="custom" rel="external"><? echo $footerconf['name'];?></a></li>
<?
}
$page = '';
}
?>
</ul>
</div><!-- /navbar -->
</div><!-- /footer -->