diff --git a/API/request.php b/API/request.php index 164e909..3a1aa3b 100644 --- a/API/request.php +++ b/API/request.php @@ -41,7 +41,22 @@ if($type == null){ $conn->close(); break; case "events": - echo json_encode(array('events' => "Linamar")); + $list = array(); + if(isset($_GET["ownertype"]) && isset($_GET["ownerid"])){ + $result = $conn->query("SELECT * FROM `events` WHERE `ownertype` = '".$conn->real_escape_string($_GET["ownertype"])."' AND `ownerid` = '".$conn->real_escape_string($_GET["ownerid"])."' "); + }else{ + $result = $conn->query("SELECT * FROM `events`"); + } + if (!empty($result) && $result->num_rows > 0) { + while($row = $result->fetch_assoc()) { + $list[] = $row; + } + echo json_encode($list); + }else{ + echo json_encode(array('response' => "No events connected to specified owner")); + } + $result->close(); + $conn->close(); break; case "image": if(isset($_GET["subtype"])){ @@ -77,6 +92,15 @@ if($type == null){ include "../images/defaultuser.png"; } break; + case "eventcategory": + header('Content-Type: image/png'); + $file = "../images/eventcategory/".$_GET["category"].".png"; + if(file_exists($file)){ + include $file; + }else{ + include "../images/eventcategory/default.png"; + } + break; default: echo json_encode(array('response' => "Invalid subtype specified")); break; diff --git a/admin/dataupload.php b/admin/dataupload.php index 7966559..d689be4 100644 --- a/admin/dataupload.php +++ b/admin/dataupload.php @@ -8,7 +8,7 @@
-

ADATFELTÖLTÉS

+

ADATKEZELÉS

diff --git a/admin/eventupload.php b/admin/eventupload.php index e69de29..77ff551 100644 --- a/admin/eventupload.php +++ b/admin/eventupload.php @@ -0,0 +1,30 @@ + + +
+
+
+

ESEMÉNYKEZELÉS

+
+
+
+ "; + for($i = 0; $i'.$json[$i]["title"].'
'.$json[$i]["description"].''; + } + } + echo "
"; + }else{ + echo "

Még nincsennek események hozzáadva

"; + } + ?> +
+
+
+
+ + \ No newline at end of file diff --git a/css/style.css b/css/style.css index 309f19f..878bc82 100644 --- a/css/style.css +++ b/css/style.css @@ -18,6 +18,18 @@ text-overflow: ellipsis; } +.smallimg{ + height: 24px; + width: 24px; +} + +.container-fluid .innercontainer { + padding-right: 24px; + padding-left: 24px; + margin-right: auto; + margin-left: auto; +} + /* Navbar ====================================== */ @import url(materialize.css); .navbar { diff --git a/header.php b/header.php index f5e05d4..1a2e340 100644 --- a/header.php +++ b/header.php @@ -19,7 +19,8 @@ if(isset($isadmin) && $isadmin == true){ $isadmin = false; } $openpage = basename($_SERVER['PHP_SELF']); -$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); +//$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); +$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST']."/paredu"; include "creds.php"; @@ -530,7 +531,7 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type != Adatkezelés -
  • +
  • > event Eseménykezelés diff --git a/images/eventcategory/default.png b/images/eventcategory/default.png new file mode 100644 index 0000000..e26f16b Binary files /dev/null and b/images/eventcategory/default.png differ diff --git a/images/eventcategory/gepeszet.png b/images/eventcategory/gepeszet.png new file mode 100644 index 0000000..089956e Binary files /dev/null and b/images/eventcategory/gepeszet.png differ diff --git a/images/nodata.png b/images/nodata.png new file mode 100644 index 0000000..80a1b44 Binary files /dev/null and b/images/nodata.png differ diff --git a/images/nodata.png~ b/images/nodata.png~ new file mode 100644 index 0000000..4590517 Binary files /dev/null and b/images/nodata.png~ differ diff --git a/schools.php b/schools.php index 4eb5800..646f402 100644 --- a/schools.php +++ b/schools.php @@ -20,28 +20,4 @@ - - - '; - } -} ?> - \ No newline at end of file