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.
 
 
 
 
 

82 lines
5.4 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);
$schjson = json_decode(file_get_contents($url."/API/request.php?type=schools&id=".$ownerid), true);
$userjson = json_decode(file_get_contents($url."/API/request.php?type=user&id=".$userid), 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 '<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>'.$selschvals["name"].'<br>'.$json[$i]["description"].'</b><td></table></a>';
echo '
<div class="panel panel-default panel-post">
<div class="panel-heading">
<div class="media">
<div class="media-left">
<a href="#">';
if($json[$i]["uploadedas_userid"] != ""){ echo '<img src="'.$url.'/API/request.php?type=image&subtype=user&id='.$userid.'">';
}else{ echo '<img src="'.$url.'/API/request.php?type=image&subtype=school&id='.$ownerid.'">'; }
echo'</a>
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="#">';
if($json[$i]["uploadedas_userid"] != ""){ echo "stuff";
}else{ echo $schjson[0]["name"]; }
echo '</a>
</h4>
'.date_format(date_create($json[$i]["datetime"]),"Y.m.d. H:i").'
</div>
</div>
</div>
<div class="panel-body">
<div class="post">
<div class="post-heading">
<p><b>'.$json[$i]["title"].'</b></p><br>
<p>'.$json[$i]["description"].'</p>
</div>
<div class="post-content">
</div>
</div>
</div>
<div class="panel-footer">
<ul>
<li>
<a href="#">
<i class="material-icons">comment</i>
<span>0 komment</span>
</a>
</li>
</ul>
<div class="form-group">
<div class="form-line">
<input type="text" class="form-control" placeholder="Komment írása">
</div>
</div>
</div>
</div>
';
}
}
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"; ?>