Count Me App
getConnection(); // initialize objects $esp = new Esp($db); // read all devices from the database // $stmt = $esp->readDay($from_record_num, $records_per_page); $stmt = $esp->readDay($_SESSION['DEVICE_ID_IOT']); //$stmt = $esp->readDay('CB'); // count retrieved users $num = $stmt->rowCount(); // to identify page for paging $page_url= "/var/www/html/admin/read_devices.php?"; if(!is_null($_SESSION['DEVICE_ID_IOT'])) { //echo "non variabile vuota"; if($num>0) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // loop through the user records while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); // display user details echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ""; //$page_url="/var/www/html/admin/read_devices.php?"; //$total_rows = $esp->countAllDevices(); } else{ echo "
No users found.
"; } } else { //echo "sessione nulla"; //header("Location: {$home_url}login.php"); echo ""; exit; } ?>
CounterBattery %CountMe StateDevice IdSerial NumberDevice Iot IdInsert Time
"; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo "
{$COUNTER}{$BATTERYLEVEL}{$COUNTMESTATE}{$DEVICE_ID}{$SERIALNUMBER}{$DEVICE_ID_IOT}{$INSERTTIME}

More table examples coming soon...