2010-06-20 17:21:35 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
print_optionbar_start();
|
|
|
|
|
2011-09-12 02:35:58 +00:00
|
|
|
echo("<span style='font-weight: bold;'>Apps</span> » ");
|
|
|
|
|
2010-06-20 17:21:35 +00:00
|
|
|
unset($sep);
|
2011-03-16 23:10:10 +00:00
|
|
|
|
2011-05-15 15:29:47 +00:00
|
|
|
foreach (dbFetchRows("SELECT * FROM `applications` WHERE `device_id` = ?", array($device['device_id'])) as $app)
|
2011-03-16 23:10:10 +00:00
|
|
|
{
|
2010-06-20 17:21:35 +00:00
|
|
|
echo($sep);
|
|
|
|
|
2011-09-12 04:57:56 +00:00
|
|
|
if (!$_GET['optc']) { $_GET['optc'] = $app['app_type']; }
|
2010-06-20 17:21:35 +00:00
|
|
|
|
2011-09-12 04:57:56 +00:00
|
|
|
if ($_GET['optc'] == $app['app_type'])
|
2010-06-20 17:21:35 +00:00
|
|
|
{
|
2011-04-11 09:18:29 +00:00
|
|
|
echo("<span class='pagemenu-selected'>");
|
|
|
|
#echo('<img src="images/icons/'.$app['app_type'].'.png" class="optionicon" />');
|
2010-06-20 17:21:35 +00:00
|
|
|
} else {
|
2011-04-11 09:18:29 +00:00
|
|
|
#echo('<img src="images/icons/greyscale/'.$app['app_type'].'.png" class="optionicon" />');
|
2010-06-20 17:21:35 +00:00
|
|
|
}
|
2011-09-12 04:57:56 +00:00
|
|
|
echo("<a href='device/".$device['device_id']."/apps/" . $app['app_type'] . ($_GET['optd'] ? "/" . $_GET['optd'] : ''). "/'> " . $app['app_type'] ."</a>");
|
|
|
|
if ($_GET['optc'] == $app['app_type']) { echo("</span>"); }
|
2010-06-20 17:21:35 +00:00
|
|
|
$sep = " | ";
|
|
|
|
}
|
|
|
|
|
|
|
|
print_optionbar_end();
|
|
|
|
|
2011-09-12 04:57:56 +00:00
|
|
|
$app = dbFetchRow("SELECT * FROM `applications` WHERE `device_id` = ? AND `app_type` = ?", array($device['device_id'], $_GET['optc']));
|
2010-06-20 17:21:35 +00:00
|
|
|
|
2011-09-12 04:57:56 +00:00
|
|
|
if (is_file("pages/device/apps/".mres($_GET['optc']).".inc.php"))
|
2010-06-20 17:21:35 +00:00
|
|
|
{
|
2011-09-12 04:57:56 +00:00
|
|
|
include("pages/device/apps/".mres($_GET['optc']).".inc.php");
|
2010-06-20 17:21:35 +00:00
|
|
|
}
|
|
|
|
|
2011-04-11 09:18:29 +00:00
|
|
|
?>
|