ESEMÉNYEK

=0; $i--) { if($json[$i]["title"] != ""){ if($json[$i]["ownertype"] == 2){ $viewsql = "SELECT * FROM `companies` WHERE `id` = ".$json[$i]["ownerid"]; }else{ $viewsql = "SELECT * FROM `schools` WHERE `id` = ".$json[$i]["ownerid"]; } $result = $conn->query($viewsql); if ($result == TRUE) { if (!empty($result) && $result->num_rows > 0) { $vals = $result->fetch_assoc(); if($json[$i]["uploadedas_userid"] != ""){ $userjson = json_decode(file_get_contents($siteurl."/API/request.php?type=user&id=".$json[$i]["ownerid"]), true); $ownername = $userjson["name"]; }else{ $ownername = $vals["name"]; } }else{ $ownername = "Ismeretlen"; } } echo '
'.$json[$i]["title"].'
'.$ownername.'
'.$json[$i]["description"].'
'; } } } ?>