{source}<?php
//Initialize
{
header ('Content-type: text/html; charset=UTF-8');
header ('Content-type: text/html; charset=ISO-8859-1');
//connect to database
include("./libraries/dbconnect.php");
//Functies
{
function ECHO_ARRAY($message,$array)
{
ECHO "$message <pre>";
print_r($array);
ECHO "</pre>";
}
function debug($var) //display varname and content for debugging
{
ECHO "<br>$".$var.": ";
$variable=$GLOBALS[$var];
ECHO $variable=is_bool($variable)?($variable==TRUE?'True':'False'):$variable;
ECHO "<br><br>";
}
}
//Styles
{
ECHO "
<style>
*
{
font-family: Arial, Helvetica, sans-serif;
}
#table_details
{
border-collapse: collapse;
width: 100%;
table-layout:fixed;
font-size: 16px;
tr:nth-child(even)
{
background-color: #D6EEEE;
}
th, td
{
padding: 5px;
}
tr
{
border-bottom: 1px solid black;
border-top: 1px solid black;
border-collapse: collapse;
}
}
#table_overview
{
border-collapse: collapse;
width: 100%;
table-layout:auto;
font-size: 16px;
tr:nth-child(even)
{
background-color: #D6EEEE;
}
th, td
{
padding: 5px;
}
tr
{
border-bottom: 1px solid black;
border-top: 1px solid black;
border-collapse: collapse;
}
}
#table_beste
{
border-collapse: collapse;
width: 100%;
table-layout:fixed;
color: #000000;
font-size: 12px;
background-color: #D6EDDD;
tr:nth-child(even)
{
}
tr
{
border-bottom: 1px solid black;
border-top: 1px solid black;
border-collapse: collapse;
}
th, td
{
padding: 15px;
}
}
.navigeertext
{
background-color: initial;
background: #ffffff;
border-radius: 10px;
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px;
color: #000000;
cursor: pointer;
display: inline-block;
font-family: Inter,-apple-system,system-ui,Roboto,'Helvetica Neue',Arial,sans-serif;
height: 34px;
line-height: 34px;
outline: 0;
overflow: hidden;
padding: 0 10px;
pointer-events: none;
position: sticky;
top: 22px;
text-align: left;
touch-action: manipulation;
user-select: none;
-webkit-user-select: none;
vertical-align: center;
white-space: nowrap;
width: 11em;
z-index: 9;
border: 0;
resize: none;
}
.buttonstart
{
background-color: initial;
border-radius: 10px;
border: 2px solid #36bef1;
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px;
color: #000000;
cursor: pointer;
display: inline-block;
font-family: Inter,-apple-system,system-ui,Roboto,'Helvetica Neue',Arial,sans-serif;
height: 34px;
line-height: 34px;
outline: 0;
overflow: hidden;
padding: 0 10px;
pointer-events: auto;
position: relative;
text-align: center;
touch-action: manipulation;
user-select: none;
-webkit-user-select: none;
vertical-align: top;
white-space: nowrap;
width: 100%;
z-index: 9;
border: 0;
}
.button
{
background-color: initial;
background: #36bef1;
border-radius: 10px;
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-family: Inter,-apple-system,system-ui,Roboto,'Helvetica Neue',Arial,sans-serif;
height: 34px;
line-height: 34px;
outline: 0;
overflow: hidden;
padding: 0 10px;
pointer-events: auto;
position: relative;
text-align: center;
touch-action: manipulation;
user-select: none;
-webkit-user-select: none;
vertical-align: top;
white-space: nowrap;
z-index: 9;
border: 0;
}
.button:hover
{
background: #1b93c0;
}
.currentbutton
{
background-color: initial;
background: #1e3aeb;
border-radius: 10px;
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-family: Inter,-apple-system,system-ui,Roboto,'Helvetica Neue',Arial,sans-serif;
height: 34px;
line-height: 34px;
outline: 0;
overflow: hidden;
padding: 0 10px;
pointer-events: auto;
position: relative;
text-align: center;
touch-action: manipulation;
user-select: none;
-webkit-user-select: none;
vertical-align: top;
white-space: nowrap;
width: 100%;
z-index: 9;
border: 0;
}
.pagination
{
list-style-type: none;
padding: 10px 0;
display: inline-flex;
justify-content: space-between;
box-sizing: border-box;
}
.pagination li
{
box-sizing: border-box;
padding-right: 10px;
}
.pagination li a
{
box-sizing: border-box;
background-color: #e2e6e6;
padding: 8px;
text-decoration: none;
font-size: 12px;
font-weight: bold;
color: #616872;
border-radius: 4px;
}
.pagination li a:hover
{
background-color: #d4dada;
}
.pagination .next a, .pagination .prev a
{
text-transform: uppercase;
font-size: 12px;
}
.pagination .currentpage a
{
background-color: #518acb;
color: #fff;
}
.pagination .currentpage a:hover
{
background-color: #518acb;
}
{
padding: 0 18px;
display: none;
overflow: hidden;
background-color: #f1f1f1;
}
.bin
{
width: 30px;
height: 30px;
background-image: url('../images/bin.png');
background-size: cover;
background-color: Transparent;
border: none;
cursor: pointer;
text-indent: -9999px;
}
.wijzig
{
width: 20px;
height: 20px;
background-image: url('/../images/pencil.png');
background-size: cover;
background-color: Transparent;
border: none;
cursor: pointer;
text-indent: -9999px;
}
</style>
";
}
}
//SQL query
{$qry_films=
"
SELECT
zh12joodb_filmarchief_makers.id AS makers_id,
zh12joodb_filmarchief_makers.makers AS maker,
(
SELECT GROUP_CONCAT(concat(Jaar,' - ',Titel,' (',Festival,')') SEPARATOR ',<br>')
FROM zh12joodb_filmarchief_films
JOIN zh12joodb_filmarchief_tussentabel ON zh12joodb_filmarchief_tussentabel.index_titel=zh12joodb_filmarchief_films.id
WHERE zh12joodb_filmarchief_tussentabel.index_makers=zh12joodb_filmarchief_makers.id
) AS titel
FROM zh12joodb_filmarchief_makers
LEFT JOIN zh12joodb_filmarchief_tussentabel
ON zh12joodb_filmarchief_tussentabel.index_makers=zh12joodb_filmarchief_makers.id
LEFT JOIN zh12joodb_filmarchief_films
ON zh12joodb_filmarchief_films.id=zh12joodb_filmarchief_tussentabel.index_titel
GROUP BY zh12joodb_filmarchief_makers.id
ORDER BY zh12joodb_filmarchief_makers.achternaam";
$res_films = $conn->query($qry_films);
}
//Table and headings
{echo
"
<table id='table_overview'>
<tr>
<th align='left'>Maker</th>
<th align='left'>Titel</th>
</tr>
";
}
//Display list of films
{WHILE ($row = MYSQLI_FETCH_ASSOC($res_films)) //For each film
{
echo
"
<tr>
<td>".$row['maker']."</td>
<td>".$row['titel']."</td>
</tr>
";
}
echo "</table>";
}
?>{/source}