The administration panel and web client for ParEdu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
1.6 KiB

<?php ini_set("allow_url_fopen", 1); $isadmin = true; include "../header.php"; ?>
<section class="content">
<div class="container-fluid">
<div class="block-header">
<h2>ESEMÉNYKEZELÉS</h2>
</div>
<div class="row clearfix">
<div class="container-fluid innercontainer">
<?php
if($type == 2){ $ownertype = 2; $ownerid = substr($_SESSION["selectedcompany"], 1); }else{ $ownertype = 1; $ownerid = substr($_SESSION["selectedschool"], 1); }
$json = json_decode(file_get_contents($url."/API/request.php?type=events&ownertype=".$ownertype."&ownerid=".$ownerid), true);
if(!isset($json["response"])){
echo "<div class='list-group'>";
for($i = 0; $i<count($json); $i++) {
if($json[$i]["title"] != ""){
echo '<a class="listitem list-group-item waves-effect"><img class="smallimg listitemimg squircle" src="'.$url.'/API/request.php?type=image&subtype=eventcategory&category='.$json[$i]["category"].'"><b>'.$json[$i]["title"].'</b><br>'.$json[$i]["description"].'</a>';
}
}
echo "</div>";
}else{
echo "<div class='text-center'><img src='".$curdir."images/nodata.png' width=80px height=80px class='center'><p style='font-size: x-large'>Még nincsennek események hozzáadva</p></div>";
}
?>
</div>
</div>
</div>
</section>
<?php include "../footer.php"; ?>