-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsonRead.php
More file actions
23 lines (22 loc) · 865 Bytes
/
jsonRead.php
File metadata and controls
23 lines (22 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once "dbController.php";
session_start();
if(isset($_POST['id']) && $_POST['id'] != false && $_POST['id'] != "")
{
if ($_POST['id'] == "self" && isset($_SESSION['JSON'])) echo $_SESSION['JSON'];
else if ($_POST['id'] == "test") echo '{"bitRate":128,"rows":20,"addrArr":["::30:0:0:0:0:0","::","::","::","ff0:41fe:1e0::2:0:0:0","800:4040:7bc::7:0:0:0","800:4040:402:180:40c::","1000:4020:401:cc:410:8000::","19f0:4020:801:4c:800::","80e:2020:c01:2c:1016:f800::","c02:2020:403:2c:4020:1000::","3cc:2020:202:1a:20:1000::","30::1d4:1b:8000:1000:0:0","::20:0:0:0:0:0","::","::","::","::","::","::"]}';
else
{
$JSON = DbController::GetJSON($_POST['id']);
if ($JSON instanceof Exception)
{
echo $_SESSION['SERVER_ERROR'];
exit();
}
else echo $JSON;
}
}
else
{
echo "";
}