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.
 
 
 
 
 

223 lines
14 KiB

<?php
$isadmin = true; $load_inputs = true; $data_upload = true; $sqldependent = true; include "../header.php";
//INSERT INTO `schools` (`id`, `name`, `type`, `spec`, `postalcode`, `location`, `locationspec`, `email`) VALUES ('1', 'Békéscsabai SZC Nemes Tihamér Technikum és Kollégium', 'high', 'IT, Gépész, Rendész', 'Békéscsaba', 'Kazinczy u. 7.');
//$conn->close();
?>
<section class="content">
<div class="container-fluid">
<div class="block-header">
<h2>ADATFELTÖLTÉS</h2>
</div>
<!-- Input Group -->
<div class="row clearfix">
<form class="col-lg-12 col-md-12 col-sm-12 col-xs-12" method="POST" action="#">
<div class="card">
<div class="header">
<?php
if(isset($_GET["uploaded"])){
if($_GET["uploaded"] == 0){ echo '<div id="uploadsuccess" class="alert alert-danger text-center"><strong>Sikertelen feltöltés.</strong> Kérjük <a href="mailto:admin@paredu.hu" style="color: white;">vegye fel a kapcsolatot az adminisztrátorokkal</a>.</div>';
}elseif($_GET["uploaded"] == 1){ echo '<div id="uploadsuccess" class="alert alert-success text-center">Sikeres feltöltés</div>';}
?>
<script>
setTimeout(function(){
document.getElementById('uploadsuccess').style.display ='none';
}
,3000);
</script>
<?php } ?>
<h2>
INTÉZMÉNY ADATAI
</h2>
<ul class="header-dropdown m-r--5">
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">more_vert</i>
</a>
<ul class="dropdown-menu pull-right">
<li><a href="javascript:void(0);">Action</a></li>
<li><a href="javascript:void(0);">Another action</a></li>
<li><a href="javascript:void(0);">Something else here</a></li>
</ul>
</li>
</ul>
</div>
<div class="body">
<h2 class="card-inside-title">Azonosíthatóság</h2>
<div class="row clearfix">
<div class="col-md-2">
<b>Egyedi Azonosító (ID)</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">fact_check</i>
</span>
<div class="form-line">
<input type="text" class="form-control text-center" name="id" value="#<?php echo $selschvals["id"]; ?>" readOnly>
</div>
</div>
</div>
<div class="col-md-7">
<b>Intézmény Neve</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">edit</i>
</span>
<div class="form-line">
<input type="text" class="form-control" name="schoolname" placeholder="Név" value="<?php echo $selschvals["name"]; ?>">
</div>
</div>
</div>
<div class="col-md-3">
<b>Intézmény Típusa</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">school</i>
</span>
<div class="form-line">
<select class="form-control show-tick" name="schooltype">
<option value="high" <?php if($selschvals["type"] == "high"){ echo "selected"; } ?>>Középiskola</option>
<option value="uni" <?php if($selschvals["type"] == "uni"){ echo "selected"; } ?>>Egyetem</option>
<option value="college" <?php if($selschvals["type"] == "college"){ echo "selected"; } ?>>Főiskola</option>
</select>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-md-2">
<b>Intézmény fotója</b>
<div class="input-group">
<span class="input-group-addon">
<img class="squircle" src="<?php echo $curdir; ?>API/request.php?type=image&subtype=school&id=<?php echo $selschvals["id"]; ?>" height="100px" width="100px">
</span>
<div>
<button type="button" class="btn bg-indigo waves-effect">
<i class="material-icons">replay</i>
</button>
<button type="button" class="btn bg-green waves-effect" style="vertical-align: text-top;">
<i class="material-icons">download</i>
</button>
</div>
</div>
</div>
<div class="col-md-10">
<b>Intézmény által oktatott szakok</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">assignment</i>
</span>
<div class="form-line">
<input type="text" class="form-control" data-role="tagsinput" value="<?php echo $selschvals["spec"]; ?>" name="spec">
</div>
</div>
</div>
<div class="col-md-3">
<b>Intézmény telefonszáma</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">phone</i>
</span>
<div class="form-line masked-input">
<input type="text" class="form-control phone-number" name="phnnum" placeholder="Pl.: +36 00/000-0000" value="<?php echo $selschvals["phonenumber"]; ?>">
</div>
</div>
</div>
<div class="col-md-4">
<b>Intézmény e-mail címe</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">email</i>
</span>
<div class="form-line">
<input type="text" class="form-control" name="email" placeholder="Pl.: iroda@intezmeny.hu" value="<?php echo $selschvals["emailaddress"]; ?>">
</div>
</div>
</div>
</div>
</div>
<div class="body">
<h2 class="card-inside-title">Elhelyezkedés</h2>
<div class="row clearfix">
<div class="col-md-2">
<b>Irányítószám</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">local_post_office</i>
</span>
<div class="form-line masked-input">
<input type="text" class="form-control postal-code" name="postcode" placeholder="Pl.: 1011" value="<?php echo $selschvals["postalcode"]; ?>">
</div>
</div>
</div>
<div class="col-md-5">
<b>Város</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">location_city</i>
</span>
<div class="form-line">
<input type="text" class="form-control" name="loc" placeholder="Pl.: Budapest" value="<?php echo $selschvals["location"]; ?>">
</div>
</div>
</div>
<div class="col-md-5">
<b>Utca, házszám</b>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">label</i>
</span>
<div class="form-line">
<input type="text" class="form-control" name="locspec" placeholder="Pl.: Egyetem tér 1-3" value="<?php echo $selschvals["locationspec"]; ?>">
</div>
</div>
</div>
</div>
<?php if($selschvals["type"] == "uni"){ ?>
<h2 class="card-inside-title">Egyetemi karok</h2>
<?php
$viewsql = "SELECT * FROM `faculties` WHERE `schoolid` = ".substr($_SESSION["selectedschool"], 1);
$result = $conn->query($viewsql);
if ($result == TRUE) {
if (!empty($result) && $result->num_rows > 0) {
for($i = 0; $i < $result->num_rows; $i++){
$facvals = $result->fetch_assoc();
echo "<div>s".$facvals["facultyid"]."</div>";
}
}else{
echo "Még nincsennek karok hozzáadva.";
}
}else{
echo $conn->error;
}
mysqli_free_result($result);
?>
<br>
<button type="submit" name="addfaculty" class="btn bg-teal waves-effect" style="margin-top: 5px;">
<i class="material-icons">add</i>
<span>KAR HOZZÁADÁSA</span>
</button>
<br>
<?php } ?>
<button type="submit" name="submit" class="btn bg-green waves-effect" style="margin-top: 15px;">
<i class="material-icons">send</i>
<span>FELTÖLTÉS</span>
</button>
</div>
</div>
</form>
</div>
<!-- #END# Input Group -->
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function() {
$('.colorpicker').colorpicker();
$('.masked-input').find('.phone-number').inputmask('+36 99/999-9999', { placeholder: '+__ __/___-____' });
$('.masked-input').find('.postal-code').inputmask('9999', { placeholder: '____' });
});
</script>
<?php mysqli_free_result($result); include "../footer.php"; ?>