|
|
|
<?php
|
|
|
|
ini_set("allow_url_fopen", 1);
|
|
|
|
$load_leaflet = true;
|
|
|
|
if(!isset($borderless)){ include "header.php"; $inputid = $_GET["id"]; }
|
|
|
|
|
|
|
|
if(isset($iscompany)){
|
|
|
|
$mjson = json_decode(file_get_contents($url."/API/request.php?type=companies"), true);
|
|
|
|
}else{
|
|
|
|
$mjson = json_decode(file_get_contents($url."/API/request.php?type=schools"), true);
|
|
|
|
}
|
|
|
|
$mjsonlang = json_decode(file_get_contents($url."/API/request.php?type=string&subtype=school"), true);
|
|
|
|
for($mid = 0; $mid<count($mjson); $mid++) {
|
|
|
|
if($mjson[$mid]["id"] == $inputid){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php if(!isset($borderless)){ ?>
|
|
|
|
<section class="content">
|
|
|
|
<div class="row clearfix" >
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<?php } ?>
|
|
|
|
<div class="card profile-card">
|
|
|
|
<div class="profile-header" style="background: url('<?php echo $url; ?>/API/request.php?type=image&subtype=school&id=<?php echo $mjson[$mid]["id"]; ?>') center center; width: 100%; height: <?php if(!isset($borderless)){ echo '200px"'; }else{ echo "150px"; } ?>; background-repeat: no-repeat; background-size: cover;"></div>
|
|
|
|
<div class="profile-body">
|
|
|
|
<div style="text-align: left; padding-left: 15px;">
|
|
|
|
<?php if(!isset($borderless)){ echo "<h3>".$mjson[$mid]["name"]."</h3>"; }else{ echo "<h4>".$mjson[$mid]["name"]."</h4>"; }?>
|
|
|
|
<p><b><?php
|
|
|
|
for($i = 0; $i<count($mjsonlang); $i++) {
|
|
|
|
if($mjsonlang[$i]["abbr"] == $mjson[$mid]["type"]){
|
|
|
|
echo $mjsonlang[$i]["hun"];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}; ?></b></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-footer">
|
|
|
|
<div <?php if(!isset($borderless)){ echo 'class="col-md-6 col-sm-12"'; } ?> style="padding: 0 0 0 0;">
|
|
|
|
<div class="card" tabindex="-1" style="background-color: transparent; box-shadow: 0 0 0 0;">
|
|
|
|
<div class="body" style="padding: 0 0 0 0;">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<span><i class="material-icons left" style="vertical-align: middle;">map</i><?php if(!isset($borderless)){ echo 'Cím'; } ?></span>
|
|
|
|
<?php if($mjson[$mid]["locationspec"] != ""){ echo "<span><a href='geo:".$mjson[$mid]["postalcode"]." ".$mjson[$mid]["location"]." ".$mjson[$mid]["locationspec"]."'><b>".$mjson[$mid]["location"]."</b>, ".$mjson[$mid]["locationspec"]." </a></span>"; }else{ echo "<span><b>Nincs megadva</b></span>"; }?>
|
|
|
|
<br>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span><i class="material-icons left" style="vertical-align: middle;">phone</i><?php if(!isset($borderless)){ echo 'Telefonszám'; } ?></span>
|
|
|
|
<?php if($mjson[$mid]["phonenumber"] != ""){ echo "<span><a href='tel:".$mjson[$mid]["phonenumber"]."'><b>".$mjson[$mid]["phonenumber"]."</b></a></span>"; }else{ echo "<span><b>Nincs megadva</b></span>"; }?>
|
|
|
|
<br>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span><i class="material-icons left" style="vertical-align: middle;">email</i><?php if(!isset($borderless)){ echo 'E-mail cím'; } ?></span>
|
|
|
|
<?php if($mjson[$mid]["emailaddress"] != ""){ echo "<span><a href='mailto:".$mjson[$mid]["emailaddress"]."'><b>".$mjson[$mid]["emailaddress"]."</b></a> </span>"; }else{ echo "<span><b>Nincs megadva</b></span>"; }?>
|
|
|
|
<br>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if(!isset($borderless)){ ?>
|
|
|
|
<div class="col-md-6 col-sm-12" style="padding-right: 0;">
|
|
|
|
<div id="map"></div>
|
|
|
|
</div>
|
|
|
|
<a href="schools.php"><button class="btn bg-indigo btn-lg waves-effect btn-block"><i class="material-icons left">keyboard_backspace</i><span>VISSZA</span></button></a>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if(!isset($borderless)){ ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
|
|
|
|
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
|
|
|
|
crossorigin=""></script>
|
|
|
|
<script>
|
|
|
|
var map = L.map('map').setView([<?php $nomjson = json_decode(file_get_contents("http://open.mapquestapi.com/nominatim/v1/search.php?key=FFle08zQAR5FjrmbTFyblegtAptAhMRU&format=json&q=".urlencode($mjson[$mid]["postalcode"]." ".$mjson[$mid]["location"]." ".$mjson[$mid]["locationspec"])."&addressdetails=1&limit=1"), true); echo $nomjson[0]["lat"].", ".$nomjson[0]["lon"]; ?>], 13);
|
|
|
|
|
|
|
|
L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png ', {
|
|
|
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
|
|
}).addTo(map);
|
|
|
|
|
|
|
|
L.marker([<?php echo $nomjson[0]["lat"].", ".$nomjson[0]["lon"];?>]).addTo(map)
|
|
|
|
.bindPopup('<?php echo $mjson[$mid]["name"]; ?>')
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<?php include "footer.php"; } ?>
|