Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions iot/classes/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
class Database {
private $host = "localhost";
private $database = "hivaindb_alldata";
private $username = "root";
private $password = "";
private $username = "hivaindb_gainer";
private $password = "6)Nwk3w.pI[u";
public $conn;
public function __construct(){
try {
Expand Down
47 changes: 47 additions & 0 deletions iot/configAPI.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
header('Content-Type: application/json');

if (
isset($_GET['id']) && !empty($_GET['id'])
) {



$id = $_GET['id'];

echo json_encode(
array(
'id' => $id,
'minA' => "0",
'maxA' => "0",
'Ca' => "0",
'minB' => "0",
'maxB' => "0",
'Cb' => "0",
'minC' => "0",
'maxC' => "0",
'Cc' => "0",
'minD' => "0",
'maxD' => "0",
'Cd' => "0",
'minE' => "0",
'maxE' => "0",
'Ce' => "0",
'minF' => "0",
'maxF' => "0",
'Cf' => "0",
'minG' => "0",
'maxG' => "0",
'Cg' => "0",
'minH' => "0",
'maxH' => "0",
'Ch' => "0"

)
);

}

else {
echo json_encode(array('status' => 'Invalid information entered'));
}
32 changes: 32 additions & 0 deletions iot/error_log
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,35 @@
[19-Jun-2022 16:12:31 Asia/Tehran] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/hivaindb/public_html/iot/loglastjson.php on line 14
[19-Jun-2022 16:12:31 Asia/Tehran] PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in /home/hivaindb/public_html/iot/loglastjson.php on line 14
[19-Jun-2022 16:12:31 Asia/Tehran] PHP Warning: mysqli::close(): Couldn't fetch mysqli in /home/hivaindb/public_html/iot/loglastjson.php on line 55
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 37
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 45
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 53
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 61
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 69
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 77
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 85
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 93
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 101
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 109
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 117
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 125
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 133
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 141
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 149
[18-Dec-2023 11:45:10 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 157
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 37
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 45
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 53
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 61
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 69
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 77
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 85
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 93
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 101
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 109
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 117
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 125
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 133
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 141
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 149
[18-Dec-2023 12:24:31 Asia/Tehran] PHP Warning: Undefined variable $row in /home/hivaindb/public_html/iot/insert.php on line 157
47 changes: 47 additions & 0 deletions iot/test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
header('Content-Type: application/json');

if (
isset($_GET['id']) && !empty($_GET['id'])
) {



$id = $_GET['id'];

echo json_encode(
array(
'id' => $id,
'minA' => "0",
'maxA' => "0",
'Ca' => "0",
'minB' => "0",
'maxB' => "0",
'Cb' => "0",
'minC' => "0",
'maxC' => "0",
'Cc' => "0",
'minD' => "0",
'maxD' => "0",
'Cd' => "0",
'minE' => "0",
'maxE' => "0",
'Ce' => "0",
'minF' => "0",
'maxF' => "0",
'Cf' => "0",
'minG' => "0",
'maxG' => "0",
'Cg' => "0",
'minH' => "0",
'maxH' => "0",
'Ch' => "0"

)
);

}

else {
echo json_encode(array('status' => 'Invalid information entered'));
}