--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/includes/global.inc.php Sat Aug 11 22:49:44 2018 +0200 @@ -0,0 +1,136 @@ +<?php +/***************************************************************************** + * Copyright (C) 2014-2018 + * + * Michiel Broek <mbroek at mbse dot eu> + * + * This file is part of Brewery Management System + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * BrewCloud is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + *****************************************************************************/ + +/* + * Look for the style names in the jqwidgets/styles directory. + * + * energyblue of ui-redmond + */ +#$my_style = 'mbse-dark'; +$my_style = 'ui-redmond'; +$my_style = 'android'; + +require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); +require_once($_SERVER['DOCUMENT_ROOT'].'/version.php'); + + +function page_header($title, $loadjs) { + global $my_style; + + $outstr = '<!DOCTYPE html>'.PHP_EOL; + $outstr .= '<html lang=nl-NL>'.PHP_EOL; + $outstr .= ' <head>'.PHP_EOL; + $outstr .= ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />'.PHP_EOL; + $outstr .= ' <title>BMS v'.$my_version.' - ' . $title . '</title>'.PHP_EOL; + $outstr .= ' <link type="text/css" href="css/style.css" rel="stylesheet" media="all" />'.PHP_EOL; + $outstr .= ' <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" />'.PHP_EOL; + $outstr .= ' <link type="text/css" href="jqwidgets/styles/jqx.'.$my_style.'.css" rel="stylesheet" />'.PHP_EOL; + $outstr .= ' <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" />'.PHP_EOL; + $outstr .= ' <script>'.PHP_EOL; + $outstr .= ' var theme = "'.$my_style.'";'.PHP_EOL; + $outstr .= ' </script>'.PHP_EOL; + $outstr .= ' <script src="js/jquery-1.11.1.min.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxcore.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxwindow.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxmenu.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxwindow.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxdata.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxbuttons.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxscrollbar.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxgrid.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxgrid.pager.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxgrid.filter.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxgrid.selection.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxnumberinput.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxlistbox.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxdropdownlist.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxdropdownbutton.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxinput.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxeditor.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxtooltip.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxcheckbox.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxdatetimeinput.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/jqxcalendar.js"></script>'.PHP_EOL; + $outstr .= ' <script src="jqwidgets/globalization/globalize.js"></script>'.PHP_EOL; + $outstr .= ' <script src="js/global.js"></script>'.PHP_EOL; + if (strlen($loadjs)) + $outstr .= ' <script src="js/'.$loadjs.'.js"></script>'.PHP_EOL; + $outstr .= ' </head>'.PHP_EOL; + $outstr .= ' <body class="default">'.PHP_EOL; + $outstr .= ' <div id="jqxWidget">'.PHP_EOL; + + /* + * Menu + */ + $outstr .= ' <div id="jqxMenu">'.PHP_EOL; + $outstr .= ' <ul>'.PHP_EOL; + $outstr .= ' <li><a href="#Home">Home</a></li>'.PHP_EOL; + $outstr .= ' <li>Monitoren'.PHP_EOL; + $outstr .= ' <ul>'.PHP_EOL; + $outstr .= ' <li><a href="monitor.php">Probeersel</a></li>'.PHP_EOL; + $outstr .= ' </ul>'.PHP_EOL; + $outstr .= ' </li>'.PHP_EOL; // Monitoren + $outstr .= ' <li>Inventaris'.PHP_EOL; + $outstr .= ' <ul>'.PHP_EOL; + $outstr .= ' <li><a href="inv_suppliers.php">Leveranciers</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_fermentables.php">Vergistbare producten</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_hops.php">Hoppen</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_yeasts.php">Gist</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_waters.php">Water profielen</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_miscs.php">Diverse ingredienetn</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_mashs.php">Maisch profielen</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_equipments.php">Brouw apparatuur</a></li>'.PHP_EOL; + $outstr .= ' <li><a href="inv_styles.php">Bier stijlen</a></li>'.PHP_EOL; + $outstr .= ' </ul>'.PHP_EOL; + $outstr .= ' </li>'.PHP_EOL; // Inventaris + $outstr .= ' <li>About'.PHP_EOL; + $outstr .= ' <ul>'.PHP_EOL; + $outstr .= ' <li><a href="#aboutWindow">Informatie</a></li>'.PHP_EOL; + $outstr .= ' </ul>'.PHP_EOL; + $outstr .= ' </li>'.PHP_EOL; + $outstr .= ' </ul>'.PHP_EOL; + $outstr .= ' </div>'.PHP_EOL; + + $outstr .= ' <div id="aboutWindow">'.PHP_EOL; + $outstr .= ' <div>'.PHP_EOL; + $outstr .= ' About BrewCloud'.PHP_EOL; + $outstr .= ' </div>'.PHP_EOL; + $outstr .= ' <div>'.PHP_EOL; + $outstr .= ' The about text comes here'.PHP_EOL; + $outstr .= ' </div>'.PHP_EOL; + $outstr .= ' </div>'.PHP_EOL; + + return $outstr; +} + + +function page_footer() { + + $outstr = ' </div> <!-- jqxWidget -->'.PHP_EOL; + $outstr .= ' </body>'.PHP_EOL; + $outstr .= '</html>'.PHP_EOL; + + return $outstr; +} + +