Exemplo n.º 1
0
            while ($array_table = mysql_fetch_assoc($result_table)) {
                echo '<tr>';
                foreach ($array_table as $key => $value) {
                    if ($key != 'equipment-log') {
                        echo '<td>' . $value . '</td>';
                    }
                }
                echo '</tr>';
            }
            echo '</table>';
            echo '<h2 style="page-break-before: always;"></h2>';
        }
    }
}
main_menu();
mk_form_from_table('equipment-log', 'equipment-log-monitor');
echo '<form method=post>';
echo 'Show equipment log chart of following year and month';
read_date_time(2);
echo '<input type=submit name=submit value=show>';
echo '</form>';
save_temperature($_POST);
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == 'show') {
        //echo $_POST['year'].'-'.$_POST['month'].'-%';
        show_refrigerator($_POST['year'] . '-' . $_POST['month'] . '-%');
    } else {
        //echo '3333';
        show_refrigerator(strftime('%Y-%m-%%'));
    }
} else {
            while ($array_table = mysql_fetch_assoc($result_table)) {
                echo '<tr>';
                foreach ($array_table as $key => $value) {
                    if ($key != 'refrigerator') {
                        echo '<td>' . $value . '</td>';
                    }
                }
                echo '</tr>';
            }
            echo '</table>';
            echo '<h2 style="page-break-before: always;"></h2>';
        }
    }
}
main_menu();
mk_form_from_table('refrigerator', 'refrigerator_temperature');
echo '<form method=post>';
echo 'Show temperature chart of following year and month';
read_date_time(2);
echo '<input type=submit name=submit value=show>';
echo '</form>';
save_temperature($_POST);
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == 'show') {
        show_refrigerator($_POST['year'] . '-' . $_POST['month'] . '-%');
    } else {
        show_refrigerator(strftime('%Y-%m-%%'));
    }
} else {
    show_refrigerator(strftime('%Y-%m-%%'));
}
            while ($array_table = mysql_fetch_assoc($result_table)) {
                echo '<tr>';
                foreach ($array_table as $key => $value) {
                    if ($key != 'environmental-parameter') {
                        echo '<td>' . $value . '</td>';
                    }
                }
                echo '</tr>';
            }
            echo '</table>';
            echo '<h2 style="page-break-before: always;"></h2>';
        }
    }
}
main_menu();
mk_form_from_table('environmental-parameter', 'environmental-parameter-monitor');
echo '<form method=post>';
echo 'Show environmental parameters chart of following year and month';
read_date_time(2);
echo '<input type=submit name=submit value=show>';
echo '</form>';
save_temperature($_POST);
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == 'show') {
        //echo $_POST['year'].'-'.$_POST['month'].'-%';
        show_refrigerator($_POST['year'] . '-' . $_POST['month'] . '-%');
    } else {
        //echo '3333';
        show_refrigerator(strftime('%Y-%m-%%'));
    }
} else {