|
|
|
<?php ini_set("allow_url_fopen", 1); $sqldependent = true; include "header.php"; ?>
|
|
|
|
|
|
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="block-header">
|
|
|
|
<h2>ESEMÉNYEK</h2>
|
|
|
|
</div>
|
|
|
|
<div class="row clearfix">
|
|
|
|
<div class="list-group">
|
|
|
|
<?php
|
|
|
|
$json = json_decode(file_get_contents($url."/API/request.php?type=events"), true);
|
|
|
|
if(!isset($json["response"])){
|
|
|
|
for($i = 0; $i<count($json); $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();
|
|
|
|
$ownername = $vals["name"];
|
|
|
|
}else{
|
|
|
|
$ownername = "Ismeretlen";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '<a class="listitem list-group-item waves-effect" href="'.$curdir.'event.php?id='.$json[$i]["eventid"].'">
|
|
|
|
<table>
|
|
|
|
<td><img class="smallimg listitemimg squircle" src="'.$url.'/API/request.php?type=image&subtype=eventcategory&category='.$json[$i]["category"].'"><td>
|
|
|
|
<td><b>'.$json[$i]["title"].'</b><br>'.$ownername.'<br>'.$json[$i]["description"].'</b><td>
|
|
|
|
</table>
|
|
|
|
</a>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<?php include "footer.php"; ?>
|