function mainHTML() { global $schedulePID, $schedulePars, $debugString, $showLog; echo '<!DOCTYPE html>'; echo '<html>'; echo '<head>'; echo '<meta name="viewport" content="width=550, initial-scale=1">'; echo '<title>RPi Cam Download</title>'; echo '<link rel="stylesheet" href="css/style_minified.css" />'; echo '<link rel="stylesheet" href="' . getStyle() . '" />'; echo '<script src="js/style_minified.js"></script>'; echo '<script src="js/script.js"></script>'; echo '</head>'; echo '<body onload="schedule_rows()">'; echo '<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">'; echo '<div class="container">'; echo '<div class="navbar-header">'; if ($showLog) { echo '<a class="navbar-brand" href="schedule.php">'; } else { echo '<a class="navbar-brand" href="' . ROOT_PHP . '">'; } echo '<span class="glyphicon glyphicon-chevron-left"></span>Back - ' . CAM_STRING . '</a>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<div class="container-fluid">'; echo '<form action="schedule.php" method="POST">'; if ($debugString) { echo $debugString . "<br>"; } if ($showLog) { echo "  <button class='btn btn-primary' type='submit' name='action' value='downloadlog'>" . BTN_DOWNLOADLOG . "</button>"; echo "  <button class='btn btn-primary' type='submit' name='action' value='clearlog'>" . BTN_CLEARLOG . "</button><br><br>"; displayLog(); } else { echo '<div class="container-fluid text-center">'; echo " <button class='btn btn-primary' type='submit' name='action' value='save'>" . BTN_SAVE . "</button>"; echo " <button class='btn btn-primary' type='submit' name='action' value='backup'>" . BTN_BACKUP . "</button>"; echo " <button class='btn btn-primary' type='submit' name='action' value='restore'>" . BTN_RESTORE . "</button>"; echo " <button class='btn btn-primary' type='submit' name='action' value='showlog'>" . BTN_SHOWLOG . "</button>"; echo ' '; if ($schedulePID != 0) { echo "<button class='btn btn-danger' type='submit' name='action' value='stop'>" . BTN_STOP . "</button>"; } else { echo "<button class='btn btn-danger' type='submit' name='action' value='start'>" . BTN_START . "</button>"; } echo "<br></div>"; showScheduleSettings($schedulePars); } echo '</form>'; echo '</div>'; cmdHelp(); echo '</body>'; echo '</html>'; }
} else { $selected_date = $today; } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" media="all" type="text/css" href="style.css" /> <title>Manage RSK Database</title> </head> <body> <?php switcher(); ?> <h4>Log from <?php echo $selected_date; ?> </h4> <form name="show_log" action="log.php" method="get"> Select Date: <?php generateLogDateSelector(); ?> </form><br /> <?php displayLog($selected_date); ?> </body> </html> <?php closedb();