</div>
							</div>
						</nav>
					</div>
					<div class="main-content">
						<h1>Graph</h1>
						Select Node
						<?php 
$obj = new Model();
$arr_node = $obj->getNode();
echo '<select name="node" class="node">';
foreach ($arr_node as $val) {
    echo '<option value="' . $val . '">' . $val . '</option>';
}
echo '</select>';
$arr_accel = $obj->getAccel();
?>
						<div id="graph1" style="width:100%; height:320px;"></div>
						<h2>Accel</h2>
						<div class="table-responsive">
						  <table class="table table-striped">
							<thead>
							  <tr>
								<th>timestamp</th>
								<th>node</th>
								<th>xval</th>
								<th>yval</th>
								<th>zval</th>
								<th>mval</th>
								<th>purged</th>
							  </tr>
<?php

define('DS', DIRECTORY_SEPARATOR);
// separator
define('ROOT', dirname(__FILE__));
//root directory
require_once ROOT . DS . 'config' . DS . 'config.php';
//config for db
require_once ROOT . DS . 'classes' . DS . 'autoload.php';
//autoload the file name to be used
$isave = 0;
if (isset($_POST['cases'])) {
    $case = $_POST['cases'];
    $obj = new Model();
    switch ($case) {
        case 1:
            //ajax request random quotes
            echo json_encode($obj->getQuotes());
            break;
        case 2:
            //ajax request accel selected by node
            $id = $_POST['id'];
            echo json_encode($obj->getSelectedNode($id));
            break;
        case 3:
            //ajax request get all data of accel table
            echo json_encode($obj->getAccel());
            break;
    }
}