|
|
@ -1,4 +1,4 @@ |
|
|
|
<?php ini_set("allow_url_fopen", 1); $isadmin = true; include "../header.php"; ?> |
|
|
|
<?php ini_set("allow_url_fopen", 1); $isadmin = true; $eventupload = true; include "../header.php"; ?> |
|
|
|
|
|
|
|
<section class="content"> |
|
|
|
<div class="container-fluid"> |
|
|
@ -8,16 +8,23 @@ |
|
|
|
<div class="row clearfix"> |
|
|
|
<div class="container-fluid innercontainer"> |
|
|
|
<div> |
|
|
|
<button type="button" data-toggle="modal" data-target="#addEvent" class="btn bg-teal waves-effect">ESEMÉNY HOZZÁADÁSA</button> |
|
|
|
<button type="button" data-toggle="modal" data-target="#addEvent" class="btn bg-teal waves-effect" style="margin-bottom: 15px;">ESEMÉNY HOZZÁADÁSA</button> |
|
|
|
</div> |
|
|
|
<?php |
|
|
|
if($type == 2){ $ownertype = 2; $ownerid = substr($_SESSION["selectedcompany"], 1); }else{ $ownertype = 1; $ownerid = substr($_SESSION["selectedschool"], 1); } |
|
|
|
if($type == 2){ |
|
|
|
$ownertype = 2; |
|
|
|
$ownerid = substr($_SESSION["selectedcompany"], 1); |
|
|
|
$schjson = json_decode(file_get_contents($url."/API/request.php?type=companies&id=".$ownerid), true); |
|
|
|
}else{ |
|
|
|
$ownertype = 1; |
|
|
|
$ownerid = substr($_SESSION["selectedschool"], 1); |
|
|
|
$schjson = json_decode(file_get_contents($url."/API/request.php?type=schools&id=".$ownerid), true); |
|
|
|
} |
|
|
|
$json = json_decode(file_get_contents($url."/API/request.php?type=events&ownertype=".$ownertype."&ownerid=".$ownerid), true); |
|
|
|
$schjson = json_decode(file_get_contents($url."/API/request.php?type=schools&id=".$ownerid), true); |
|
|
|
$userjson = json_decode(file_get_contents($url."/API/request.php?type=user&id=".$userid), true); |
|
|
|
if(!isset($json["response"])){ |
|
|
|
echo "<div class='list-group'>"; |
|
|
|
for($i = 0; $i<count($json); $i++) { |
|
|
|
for($i = count($json)-1; $i>=0; $i--) { |
|
|
|
if($json[$i]["title"] != ""){ |
|
|
|
#echo '<a class="listitem list-group-item waves-effect"><img class="smallimg listitemimg squircle" src="'.$url.'/API/request.php?type=image&subtype=eventcategory&category='.$json[$i]["category"].'"><b>'.$json[$i]["title"].'</b><br>'.$json[$i]["description"].'</a>'; |
|
|
|
//echo '<a class="listitem list-group-item waves-effect" href="'.$curdir.'event.php?id='.$json[$i]["eventid"].'"><table><td><img class="smallimg listitemimg squircle" src="'.$url.'/API/request.php?type=image&subtype=eventcategory&category='.$json[$i]["category"].'"><td><td><b>'.$json[$i]["title"].'</b><br>'.$selschvals["name"].'<br>'.$json[$i]["description"].'</b><td></table></a>'; |
|
|
@ -27,14 +34,14 @@ |
|
|
|
<div class="media"> |
|
|
|
<div class="media-left"> |
|
|
|
<a href="#">'; |
|
|
|
if($json[$i]["uploadedas_userid"] != ""){ echo '<img src="'.$url.'/API/request.php?type=image&subtype=user&id='.$userid.'">'; |
|
|
|
}else{ echo '<img src="'.$url.'/API/request.php?type=image&subtype=school&id='.$ownerid.'">'; } |
|
|
|
if($json[$i]["uploadedas_userid"] != ""){ echo '<img class="fixsizeimg42" src="'.$url.'/API/request.php?type=image&subtype=user&id='.$userid.'">'; |
|
|
|
}else{ echo '<img class="fixsizeimg42" src="'.$url.'/API/request.php?type=image&subtype=school&id='.$ownerid.'">'; } |
|
|
|
echo'</a> |
|
|
|
</div> |
|
|
|
<div class="media-body"> |
|
|
|
<h4 class="media-heading"> |
|
|
|
<a href="#">'; |
|
|
|
if($json[$i]["uploadedas_userid"] != ""){ echo "stuff"; |
|
|
|
if($json[$i]["uploadedas_userid"] != ""){ echo $userjson["name"]; |
|
|
|
}else{ echo $schjson[0]["name"]; } |
|
|
|
echo '</a> |
|
|
|
</h4> |
|
|
@ -88,16 +95,21 @@ |
|
|
|
<div class="modal-header"> |
|
|
|
<h4 class="modal-title" id="largeModalLabel">ESEMÉNY HOZZÁADÁSA</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="list-group"> |
|
|
|
<input type="text" placeholder="Cím"> |
|
|
|
<textarea id="eventdesceditor"></textarea> |
|
|
|
<form method="POST" action="#"> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="input-group"> |
|
|
|
<span class="form-line"> |
|
|
|
<input type="text" class="form-control" placeholder="Cím" name="title" required> |
|
|
|
</span> |
|
|
|
<textarea id="eventdesceditor" name="description"></textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-link waves-effect">MENTÉS</button> |
|
|
|
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal">MÉGSEM</button> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal">MÉGSEM</button> |
|
|
|
<button type="submit" name="submituser" class="btn btn-link waves-effect col-blue-grey">FELTÖLTÉS (FELHASZNÁLÓKÉNT)</button> |
|
|
|
<button type="submit" name="submit" class="btn btn-link waves-effect">FELTÖLTÉS</button> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|