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.
 
 
 
 
 

93 lines
4.2 KiB

<?php
ini_set("allow_url_fopen", 1);
$sqldependent = true;
include "header.php";
$json = json_decode(file_get_contents($url."/API/request.php?type=events"), true);
$jsonlang = json_decode(file_get_contents($url."/API/request.php?type=string&subtype=school"), true);
for($eventid = 0; $eventid<count($json); $eventid++) {
if($json[$eventid]["eventid"] == $_GET["id"]){
break;
}
}
if($json[$eventid]["ownertype"] == 2){
$iscompany = true;
$viewsql = "SELECT * FROM `companies` WHERE `id` = ".$json[$eventid]["ownerid"];
$profimg = $url."/API/request.php?type=image&subtype=company&id=".$json[$eventid]["ownerid"];
}else{
$viewsql = "SELECT * FROM `schools` WHERE `id` = ".$json[$eventid]["ownerid"];
$profimg = $url."/API/request.php?type=image&subtype=school&id=".$json[$eventid]["ownerid"];
}
$result = $conn->query($viewsql);
if ($result == TRUE) {
if (!empty($result) && $result->num_rows > 0) {
$ownervals = $result->fetch_assoc();
$ownername = $ownervals["name"];
}else{
$ownername = "Ismeretlen";
}
}
?>
<section class="content">
<div class="row clearfix" >
<div class="container-fluid">
<div class="col-xs-12 col-sm-3">
<?php $borderless = true; $inputid = $ownervals["id"]; include "school.php"; ?>
</div>
<div class="col-xs-12 col-sm-9">
<div class="card profile-card">
<div class="profile-footer">
<a href="events.php">
<button class="btn bg-indigo btn-lg waves-effect btn-block" style="margin-bottom: 15px;"><i class="material-icons left">keyboard_backspace</i><span>VISSZA</span></button>
</a>
<div class="panel panel-default panel-post">
<div class="panel-heading">
<div class="media">
<div class="media-left">
<a href="#">
<img src="<?php echo $profimg; ?>" height=42px>
</a>
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="#"><?php echo $ownername; ?></a>
</h4>
<?php echo date_format(date_create($json[0]["datetime"]),"Y.m.d. H:i"); ?>
</div>
</div>
</div>
<div class="panel-body">
<div class="post">
<div class="post-heading">
<p><b><?php echo $json[0]["title"]; ?></b></p><br>
<p><?php echo $json[0]["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>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include "footer.php"; ?>