Browse Source

Start implementation of events,add language option

master
OliverParoczai 4 years ago
parent
commit
2ce71b53fc
  1. 44
      admin/dataupload.php
  2. 4
      css/style.css
  3. 1
      css/style.min.css
  4. 18
      header.php

44
admin/dataupload.php

@ -1,8 +1,8 @@
<?php <?php
$isadmin = true; $load_inputs = true; $data_upload = true; include "../header.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.'); //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(); //$conn->close();
?> ?>
<section class="content"> <section class="content">
@ -15,6 +15,18 @@
<form class="col-lg-12 col-md-12 col-sm-12 col-xs-12" method="POST" action="#"> <form class="col-lg-12 col-md-12 col-sm-12 col-xs-12" method="POST" action="#">
<div class="card"> <div class="card">
<div class="header"> <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> <h2>
INTÉZMÉNY ADATAI INTÉZMÉNY ADATAI
</h2> </h2>
@ -161,7 +173,33 @@
</div> </div>
</div> </div>
</div> </div>
<button type="submit" name="submit" class="btn bg-green waves-effect"> <?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> <i class="material-icons">send</i>
<span>FELTÖLTÉS</span> <span>FELTÖLTÉS</span>
</button> </button>

4
css/style.css

@ -7583,7 +7583,7 @@ fieldset[disabled] .form-control {
position: relative; position: relative;
border-bottom: 1px solid #e9e9e9; border-bottom: 1px solid #e9e9e9;
background: url("../images/user-img-background.jpg") no-repeat no-repeat; background: url("../images/user-img-background.jpg") no-repeat no-repeat;
height: 135px; } height: 155px; }
.sidebar .user-info .image { .sidebar .user-info .image {
margin-right: 12px; margin-right: 12px;
display: inline-block; } display: inline-block; }
@ -7607,7 +7607,7 @@ fieldset[disabled] .form-control {
font-size: 14px; font-size: 14px;
max-width: 200px; max-width: 200px;
color: #fff; } color: #fff; }
.sidebar .user-info .info-container .email { .sidebar .user-info .info-container .misc {
white-space: nowrap; white-space: nowrap;
-ms-text-overflow: ellipsis; -ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;

1
css/style.min.css vendored

File diff suppressed because one or more lines are too long

18
header.php

@ -1,4 +1,7 @@
<?php <?php
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
//session_cache_limiter('private');session_cache_expire(0); //session_cache_limiter('private');session_cache_expire(0);
session_start(); session_start();
if(isset($_SESSION["login"])) { if(isset($_SESSION["login"])) {
@ -60,10 +63,17 @@ if(!isset($liteload) && !$loggedin && $isadmin){
if(isset($_POST["submit"])){ if(isset($_POST["submit"])){
$modsql = "UPDATE `schools` SET `name` = '".$conn->real_escape_string($_POST['schoolname'])."', `type` = '".$conn->real_escape_string($_POST['schooltype'])."', `postalcode` = '".$conn->real_escape_string($_POST['postcode'])."', `spec` = '".str_replace(', ', ',', preg_replace('/\s+/', ' ', trim($conn->real_escape_string($_POST['spec']))))."', `location` = '".$conn->real_escape_string($_POST['loc'])."', `locationspec` = '".$conn->real_escape_string($_POST['locspec'])."', `phonenumber` = '".$conn->real_escape_string($_POST['phnnum'])."', `emailaddress` = '".$conn->real_escape_string($_POST['email'])."' WHERE `schools`.`id` = ".substr($_SESSION["selectedschool"], 1); $modsql = "UPDATE `schools` SET `name` = '".$conn->real_escape_string($_POST['schoolname'])."', `type` = '".$conn->real_escape_string($_POST['schooltype'])."', `postalcode` = '".$conn->real_escape_string($_POST['postcode'])."', `spec` = '".str_replace(', ', ',', preg_replace('/\s+/', ' ', trim($conn->real_escape_string($_POST['spec']))))."', `location` = '".$conn->real_escape_string($_POST['loc'])."', `locationspec` = '".$conn->real_escape_string($_POST['locspec'])."', `phonenumber` = '".$conn->real_escape_string($_POST['phnnum'])."', `emailaddress` = '".$conn->real_escape_string($_POST['email'])."' WHERE `schools`.`id` = ".substr($_SESSION["selectedschool"], 1);
if ($conn->query($modsql) === TRUE) { if ($conn->query($modsql) === TRUE) {
echo "Adat feltöltve"; header("Location: dataupload.php?uploaded=1");
} else { } else {
echo "Error: " . $sql . "<br>" . $conn->error; //echo "Error: " . $modsql . "<br>" . $conn->error;
header("Location: dataupload.php?uploaded=0");
} }
die();
}elseif(isset($_POST["addfaculty"]) && $_POST['schooltype'] == "uni"){
$modsql = "INSERT INTO `faculties` (`schoolid`, `facultyname`, `facultyspec`) VALUES ('".substr($_SESSION["selectedschool"], 1)."', '', '')";
$conn->query($modsql);
header("Location: dataupload.php");
die();
} }
} }
@ -274,6 +284,7 @@ if(!isset($liteload) && !$loggedin && $isadmin){
<ul class="menu"> <ul class="menu">
<form method="POST" action="#"> <form method="POST" action="#">
<?php <?php
$ssname = "Nincs iskola kiválasztva";
for($i = 0; $i < count($connctdschids); $i++){ for($i = 0; $i < count($connctdschids); $i++){
$sql = "SELECT * FROM `schools` WHERE `id` = ".$connctdschids[$i]; $sql = "SELECT * FROM `schools` WHERE `id` = ".$connctdschids[$i];
$result = $conn->query($sql); $result = $conn->query($sql);
@ -289,6 +300,7 @@ if(!isset($liteload) && !$loggedin && $isadmin){
$sname = $sqlvals["name"]; $sname = $sqlvals["name"];
} }
if(("s".$sqlvals["id"]) == $_SESSION["selectedschool"]){ if(("s".$sqlvals["id"]) == $_SESSION["selectedschool"]){
$ssname = $sname;
$sname = "(<b>Kiválasztott</b>) ".$sname; $sname = "(<b>Kiválasztott</b>) ".$sname;
} }
echo '<button type="submit" name="selectedschool" value="s'.$sqlvals["id"].'" class="btn bg-transparent waves-effect" style="width: 100%; box-shadow: 0 0 0 0 !important; -webkit-border-radius: 0px;"> echo '<button type="submit" name="selectedschool" value="s'.$sqlvals["id"].'" class="btn bg-transparent waves-effect" style="width: 100%; box-shadow: 0 0 0 0 !important; -webkit-border-radius: 0px;">
@ -326,7 +338,7 @@ if(!isset($liteload) && !$loggedin && $isadmin){
</div> </div>
<div class="info-container"> <div class="info-container">
<div class="name" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><?php echo $username; ?></div> <div class="name" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><?php echo $username; ?></div>
<div class="email"><?php echo $fulltype; ?></div> <div class="misc"><?php echo $fulltype."<br>".$ssname; ?></div>
<?php if($loggedin){ ?> <?php if($loggedin){ ?>
<div class="btn-group user-helper-dropdown"> <div class="btn-group user-helper-dropdown">
<i class="material-icons" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">keyboard_arrow_down</i> <i class="material-icons" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">keyboard_arrow_down</i>

Loading…
Cancel
Save