<!DOCTYPE html>
<html>
<head>
<title> Combigoods - Werknemerslijst</title>
<?php require_once('private/connection.inc.php');?>
<?php
session_start();
if(isset($_SESSION['CPANEL_ID'])){
$usr_id = $_SESSION['CPANEL_ID'];
$qy_rs_login = mysql_query("SELECT name FROM tbl_users WHERE id='".mysql_real_escape_string($usr_id)."'", $conn_db_flash) or die(mysql_error());
$row_rs_login = mysql_fetch_assoc($qy_rs_login);
if($row_rs_login == NULL){
header("Location: /");
exit();
}
mysql_free_result($qy_rs_login);
}else{
header("Location: /");
exit();
}
define('DEBUG_MODE',true); // true == aan, false == uit
function showSQLError($sql,$error,$text='Error')
{
if (DEBUG_MODE)
{
return '<pre>Error: ' . $error . '<br />' . $sql . '</pre>';
}
else
{
return $text;
}
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="lib/jquery/jquery-1.8.3.min.js"></script>
<link href="css/werk.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
include ('header.php');
include ('private/connect.php');
?>
<div id="main">
<?php
if (isset($_GET['werknemer'])) {
$naam = $_GET['werknemer'];
$result = mysql_query("SELECT id, Naam, Adres, Postcode, Woonplaats, Telefoon, Nood, Email, BSN, Herkomst, Contact, contacttel, contactemail, contracturen, functie, vrijeuren FROM WERKNEMERS WHERE NAAM='".$naam."'");
while($row = mysql_fetch_array($result)) {
if (!empty($row['Naam'])) {
echo "<table class = 'pinfo'>";
echo '<div id="naam">'.$row['Naam'].'</div>';
//Naam
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Naam</td>";
echo "<td class = 'row'>".$row['Naam']."</td>";
echo "</tr>";
//Adres
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Adres</td>";
echo "<td class = 'row'>".$row['Adres']."</td>";
echo "</tr>";
//Postcode
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Postcode</td>";
echo "<td class = 'row'>".$row['Postcode']."</td>";
echo "</tr>";
//Woonplaats
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Woonplaats</td>";
echo "<td class = 'row'>".$row['Woonplaats']."</td>";
echo "</tr>";
//Telefoon
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Telefoon</td>";
echo "<td class = 'row'>".$row['Telefoon']."</td>";
echo "</tr>";
//Telefoon Nood
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Telefoon nood</td>";
echo "<td class = 'row'>".$row['Nood']."</td>";
echo "</tr>";
//Email
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Email</td>";
echo "<td class = 'row'>".$row['Email']."</td>";
echo "</tr>";
//BSN
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>BSN</td>";
echo "<td class = 'row'>".$row['BSN']."</td>";
echo "</tr>";
//Herkomst
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Herkomst</td>";
echo "<td class = 'row'>".$row['Herkomst']."</td>";
echo "</tr>";
//Contactpersoon
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Contactpersoon</td>";
echo "<td class = 'row'>".$row['Contact']."</td>";
echo "</tr>";
//Contactpersoon telefoon
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Contactpersoon telefoon</td>";
echo "<td class = 'row'>".$row['contacttel']."</td>";
echo "</tr>";
//Contactpersoon email
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Contactpersoon email</td>";
echo "<td class = 'row'>".$row['contactemail']."</td>";
echo "</tr>";
//Contracturen
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Contacturen</td>";
echo "<td class = 'row'>".$row['contracturen']."</td>";
echo "</tr>";
//Functie
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Functie</td>";
echo "<td class = 'row'>".$row['functie']."</td>";
echo "</tr>";
//Vrije uren
echo "<tr class = 'head'>";
echo "<td class = 'tdhead'>Uren</td>";
echo "<td class = 'row'>".$row['vrijeuren']."</td>";
echo "</tr>";
echo "</table>";
echo "<div class = 'box-right'>";
echo "<div class = 'box-right-b1'>";
echo "<ul class = 'box-right'>";
echo "<li class = 'box-right'><a href = '#'>Dossier</a></li>";
echo "<li class = 'box-right'><a href='#wijzig_rooster' id='join_pop'>Werktijden</a></li>";
echo "<li class = 'box-right'><a href = '#'>Dossier</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
}
}
echo '<div id="geschiedins">Geschiedenis</div>';
echo '<div class = "geschiedenis">';
echo "<table class = 'geschiedenis'>";
//Telaat geschiedenis
$result = mysql_query("SELECT * FROM archief WHERE Status='Telaat' AND Naam='".$naam."'");
$count = 0;
while ($row = mysql_fetch_array($result)) {
$count++;
}
if ($count > 0) {
echo '<tr>';
echo '<td class = "ul"><a href = "#telaat" class = "al">Te laat</a></td>';
echo '<td class = "li">'.$count.'</td>';
echo '</tr>';
}
//Ziek geschiedenis
$result = mysql_query("SELECT * FROM archief WHERE Status='Ziek' AND Naam='".$naam."'");
$count = 0;
while ($row = mysql_fetch_array($result)) {
$count++;
}
if ($count > 0) {
echo '<tr>';
echo '<td class = "ul"><a href = "#ziek" class = "al">Ziek</td>';
echo '<td class = "li">'.$count.'</td>';
echo '</tr>';
}
//Vakantie geschiedenis
$result = mysql_query("SELECT * FROM archief WHERE Status='Vakantie' AND Naam='".$naam."'");
$count = 0;
while ($row = mysql_fetch_array($result)) {
$count++;
}
if ($count > 0) {
echo '<tr>';
echo '<td class = "ul">Vakantie</td>';
echo '<td class = "li">'.$count.'</td>';
echo '<td class = "ul">Vakantie</td>';
echo '</tr>';
}
echo '</table>';
echo '</div>';
echo ' <a href="#x" class="overlay" id="join_form"></a>';
echo ' <div class="popup">';
echo ' <h2>Werktijden</h2>';
echo ' <a class="close" href="#close"></a>';
echo ' </div>';
echo ' <a href="#x" class="overlay" id="wijzig_rooster"></a>';
echo ' <div class="popup">';
echo ' <h2>Werktijden</h2>';
$result = mysql_query("SELECT id, Naam, fromma, endma, fromdi, enddi, fromwo, endwo, fromdo, enddo, fromvr, endvr, fromza, endza, fromzo, endzo FROM werktijden WHERE NAAM='".$naam."'");
echo '<table id="table-6">';
echo '<tr>';
echo '<td id = "wd">Maandag</td>';
echo '<td id = "wd">Dinsdag</td>';
echo '<td id = "wd">Woensdag</td>';
echo '<td id = "wd">Donderdag</td>';
echo '<td id = "wd">Vrijdag</td>';
echo '<td id = "wd">Zaterdag</td>';
echo '<td id = "wd">Zondag</td>';
echo '</tr>';
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td>'.$row['fromma'].' - '.$row['endma'].'</td>';
echo '<td>'.$row['fromdi'].' - '.$row['enddi'].'</td>';
echo '<td>'.$row['fromwo'].' - '.$row['endwo'].'</td>';
echo '<td>'.$row['fromdo'].' - '.$row['enddo'].'</td>';
echo '<td>'.$row['fromvr'].' - '.$row['endvr'].'</td>';
echo '<td>'.$row['fromza'].' - '.$row['endza'].'</td>';
echo '<td>'.$row['fromzo'].' - '.$row['endzo'].'</td>';
echo '</tr>';
}
echo '</table>';
echo ' <a class="close" href="#close"></a>';
echo '</div>';
$result = mysql_query("SELECT * FROM archief2 WHERE Naam='".$naam."'");
echo '<br><br><div id="telaat">Afspraken</div>';
echo '<table class = "table">';
echo '<tr>';
echo '<th class = "head">Wie</th>';
echo '<th class = "head">Naam</th>';
echo '<th class = "head">Datum</th>';
echo '<th class = "head">Tijd</th>';
echo '<th class = "head">Afspraak</th>';
echo '</tr>';
while ($row = mysql_fetch_array($result)){
echo '<tr>';
echo ' <th class = "column">'.$row['wie'].'</th>';
echo ' <th class = "column">'.$row['Naam'].'</th>';
echo ' <th class = "column">'.$row['Datum'].'</th>';
echo ' <th class = "column">'.$row['tijd'].'</th>';
echo ' <th class = "column">'.$row['Afspraak'].'</th></tr>';
}
echo '</table>';
$result = mysql_query("SELECT id, Datum, aankomst, Rede FROM archief WHERE Status='Telaat' AND Naam='".$naam."'");
echo '<br><br><div id="telaat">Te laat</div>';
echo '<table class = "table">';
echo '<tr>';
echo '<th class = "head">Datum</th>';
echo '<th class = "head">Aankomst</th>';
echo '<th class = "head">Reden</th>';
echo '</tr>';
while ($row = mysql_fetch_array($result)){
echo '<tr>';
echo '<th class = "column">'.$row['Datum'].'</th>';
echo '<th class = "column">'.$row['aankomst'].'</th>';
echo '<th class = "column">'.$row['Rede'].'</th>';
}
echo '</table><br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
//Vakantie
$result = mysql_query("SELECT id, Datum, Rede FROM archief WHERE Status='Ziek' AND Naam='".$naam."'");
echo '<div id="ziek">Ziek</div>';
echo '<table class = "table">';
echo'<tr>';
echo'<th class = "head">Datum</th>';
echo'<th class = "head">Reden</th>';
echo'</tr>';
while ($row = mysql_fetch_array($result)){
echo '<tr>';
echo '<th class = "column">'.$row['Datum'].'</th>';
echo '<th class = "column">'.$row['Rede'].'</th>';
}
echo '</table><br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
$result = mysql_query("SELECT id, Rede, vakantieduur, Datum FROM archief WHERE Status='Vakantie' AND Naam='".$naam."'");
echo '<div id="vakantie">Vakantie</div>';
echo '<table class = "table">';
echo'<tr>';
echo '<th class = "head">Reden</th>';
echo '<th class = "head">Datum</th>';
echo '<th class = "head">Vakantie tot</th>';
echo ' </tr>';
while ($row = mysql_fetch_array($result)){
echo '<tr>';
echo ' <th class = "column">'.$row['Rede'].'</th>';
echo ' <th class = "column">'.$row['Datum'].'</th>';
echo ' <th class = "column">'.$row['vakantieduur'].'</th>';
}
echo '</table><br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
$result = mysql_query("SELECT * FROM WERKNEMERS WHERE NAAM='".$naam."'");
while ($row = mysql_fetch_array($result)) {
echo '<div id="foto">';
echo '<img src="/images/foto/' . $row['mrl'] . '.png" width="150" height="150" alt="' . $row['mrl'] . '" />';
echo '</div>';
}
}else {
echo "<p style='color:red;'>Geen werknemer geselecteerd!</p>";
}
?>
<br>
<br>
<br>
</div>
<?php include ('footer.php'); ?>
</body>
</html>