Prześlij pliki do ''
This commit is contained in:
parent
9ca42f6e42
commit
b5a58ad2dc
204
join_page_style.php
Normal file
204
join_page_style.php
Normal file
@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
|
||||
<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"pl-PL\">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Event Manager</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="Piotr Szefler">
|
||||
<meta http-equiv="X-Ua-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="style/style.css">
|
||||
|
||||
<link rel="stylesheet" href="style/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin-ext" rel="stylesheet">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" href="style/font-all.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION['zalogowany']))
|
||||
{
|
||||
header('Location: index.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
ini_set("display_errors", 0);
|
||||
require_once "dbconnect.php";
|
||||
$polaczenie = mysqli_connect($host, $db_user, $db_password);
|
||||
mysqli_query($polaczenie, "SET CHARSET utf8");
|
||||
mysqli_query($polaczenie, "SET NAMES 'utf8' COLLATE 'utf8_polish_ci'");
|
||||
mysqli_select_db($polaczenie, $db_name);
|
||||
|
||||
$numevent = $_SESSION['numevent'];
|
||||
$zapytanietxt = "SELECT * FROM events WHERE id_events=".$numevent;
|
||||
$rezultat = mysqli_query($polaczenie, $zapytanietxt);
|
||||
$ile = mysqli_num_rows($rezultat);
|
||||
$row2 = mysqli_fetch_assoc($rezultat);
|
||||
|
||||
$_SESSION['e_title'] = $row2['title'];
|
||||
$_SESSION['e_descr'] = $row2['description'];
|
||||
$_SESSION['e_dtstr'] = $row2['date_start'];
|
||||
$_SESSION['e_dtstp'] = $row2['date_stop'];
|
||||
$_SESSION['e_tmstr'] = $row2['time_start'];
|
||||
$_SESSION['e_tmstp'] = $row2['time_stop'];
|
||||
$_SESSION['e_loc'] = $row2['location'];
|
||||
$_SESSION['id_eve'] = $row2['id_events'];
|
||||
$_SESSION['e_slots'] = $row2['quantity'];
|
||||
$_SESSION['e_slots_min'] = $row2['quantity_min'];
|
||||
|
||||
$a1 = $_SESSION['e_title'];
|
||||
$a2 = $_SESSION['e_descr'];
|
||||
$a3 = $_SESSION['e_dtstr'];
|
||||
$a4 = $_SESSION['e_dtstp'];
|
||||
$a5 = $_SESSION['e_tmstr'];
|
||||
$a6 = $_SESSION['e_tmstp'];
|
||||
$a7 = $_SESSION['e_loc'];
|
||||
$a8 = $_SESSION['e_slots'];
|
||||
$akt_date = date("Y-m-d");
|
||||
$a5 = substr($a5,0,strlen($a5)-3);
|
||||
$a6 = substr($a6,0,strlen($a6)-3);
|
||||
|
||||
echo<<<END
|
||||
<div class="container">
|
||||
<div class="title"><h1>$a1<h1></div>
|
||||
<div class="description">$a2</div>
|
||||
|
||||
|
||||
<div class="infoblock col-sm-6 col-md-3">
|
||||
<div class="infoelem"><b>Data pocz.</b></div>
|
||||
<div class="infoelem">$a3</div>
|
||||
</div>
|
||||
END;
|
||||
|
||||
|
||||
if($_SESSION['e_dtstr'] != $_SESSION['e_dtstp']){
|
||||
|
||||
echo<<<END
|
||||
<div class="infoblock col-sm-6 col-md-3">
|
||||
<div class="infoelem"><b>Data koń.</b></div>
|
||||
<div class="infoelem">$a4</div>
|
||||
</div>
|
||||
END;
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo<<<END
|
||||
<div class="infoblock col-sm-6 col-md-3">
|
||||
<div class="infoelem"><b>Godzina</b></div>
|
||||
<div class="infoelem">$a5 - $a6</div>
|
||||
</div>
|
||||
END;
|
||||
|
||||
echo<<<END
|
||||
<div class="infoblock col-sm-6 col-md-3">
|
||||
<div class="infoelem"><b>Lokalizacja</b></div>
|
||||
<div class="infoelem">$a7</div>
|
||||
</div>
|
||||
<div class="infoblock col-sm-6 col-md-3">
|
||||
<div class="infoelem"><b>Ilość miejsc</b></div>
|
||||
<div class="infoelem">$a8</div>
|
||||
</div>
|
||||
|
||||
<div style="padding:70px;"></div>
|
||||
|
||||
<div class="button">
|
||||
END;
|
||||
|
||||
|
||||
if($_SESSION['controller'] =="false"&& $akt_date <= $a3 )
|
||||
{
|
||||
echo<<<END
|
||||
<a href="join.php" style="text-decoration: none; color:black;"><div class="button1 col-sm-2">
|
||||
<b>✚ Dołącz</b>
|
||||
</div></a>
|
||||
END;
|
||||
}
|
||||
elseif($_SESSION['controller'] =="true" && $akt_date <= $a3 )
|
||||
{
|
||||
echo<<<END
|
||||
<a href="leave.php" style="text-decoration: none; color:black;"><div class="button1 col-sm-2">
|
||||
<b>☓ Opuść</b>
|
||||
</div></a>
|
||||
<a href="calendar.php?arg1=$a1&arg2=$a2&arg3=$a3&arg4=$a4&arg5=$a5&arg6=$a6&arg7=$a7" style="text-decoration: none; color:black;"><div class="button3 col-sm-2">
|
||||
<b>✉ Eksport</b>
|
||||
</div></a>
|
||||
|
||||
END;
|
||||
}
|
||||
|
||||
if(($_SESSION['perm']=='modder' || $_SESSION['perm']=='admin')&& $akt_date <= $a3 ){
|
||||
echo<<<END
|
||||
<a href="edit_page.php" style="text-decoration: none; color:black;"><div class="button2 col-sm-2">
|
||||
<b>✎ Edytuj</b>
|
||||
</div></a>
|
||||
END;
|
||||
}
|
||||
echo<<<END
|
||||
<a href="events.php" style="text-decoration: none; color:black;"><div class="button3 col-sm-2">
|
||||
<b>➥ Powrót</b>
|
||||
</div></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="padding:70px;"></div><div class="nonespace col-lg" style="padding:70px;"></div>
|
||||
|
||||
|
||||
END;
|
||||
|
||||
|
||||
|
||||
ini_set("display_errors", 0);
|
||||
require_once "dbconnect.php";
|
||||
$polaczenie2 = mysqli_connect($host, $db_user, $db_password);
|
||||
mysqli_query($polaczenie2, "SET CHARSET utf8");
|
||||
mysqli_query($polaczenie2, "SET NAMES 'utf8' COLLATE 'utf8_polish_ci'");
|
||||
mysqli_select_db($polaczenie2, $db_name);
|
||||
|
||||
$zapytanietxt2 = "SELECT manager.employeeID, events.id_events, users.name, users.surnname FROM manager, events, users WHERE events.id_events = manager.id_events AND manager.id_events = ".$numevent." AND users.employeeID = manager.employeeID";
|
||||
$rezultat2 = mysqli_query($polaczenie2, $zapytanietxt2);
|
||||
$ile2 = mysqli_num_rows($rezultat2);
|
||||
$_SESSION['quantity_controller'] = $ile2;
|
||||
echo<<<END
|
||||
|
||||
<div class="list"><div class="infolist" style="background-color: #e5e5e5;"><b>Imie</b></div><div class="infolist" style="background-color: #e5e5e5;"><b>Nazwisko</b></div><div style="clear:both;"></div>
|
||||
END;
|
||||
for ($i = 1; $i <= $ile2; $i++)
|
||||
{
|
||||
$row2 = mysqli_fetch_assoc($rezultat2);
|
||||
$f1 = $row2['name'];
|
||||
$f2 = $row2['surnname'];
|
||||
#$f1 = $_SESSION['name'];
|
||||
#$f2 = $_SESSION['surnname'];
|
||||
|
||||
echo<<<END
|
||||
<div class="infolist"><i>$f1</i></div><div class="infolist"><i>$f2</i></div><div style="clear:both;"></div>
|
||||
END;
|
||||
}
|
||||
|
||||
echo '</div><div class="col-sm-6" style="padding:70px;"></div>';
|
||||
if(isset($_SESSION['id_log'])){
|
||||
echo "<span style='color:red'>".$_SESSION['id_log']."</span>";
|
||||
unset($_SESSION['id_log']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user