HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/promic.komma.pro/wwwroot/app/views/partials/employeesList.php
<?php

// Contains all configuration for employees
include_once $_SERVER['DOCUMENT_ROOT'] . '/app/config/employees.php';

function slugify($text)
{
    // replace non letter or digits by -
    $text = preg_replace('~[^\pL\d]+~u', '_', $text);

    // transliterate
    $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);

    // remove unwanted characters
    $text = preg_replace('~[^-\w]+~', '', $text);

    // trim
    $text = trim($text, '-');

    // remove duplicate -
    $text = preg_replace('~-+~', '-', $text);

    // lowercase
    $text = strtolower($text);

    if (empty($text)) {
        return 'n-a';
    }

    return $text;
}

// Language variable should be set
if(isset($taalVar))
{
    $count = 0;
    foreach($employees as $key => $employee)
    {
        $break = false;
        // First enter is after 3 employees
        if($count == 3) $break = true;
        if(($count-3) % 4 == 0) $break = true;

        ?>
            <li <?php if($break){ ?> class="leftSide" <?php } ?> >

                <?php if($count == 0){ ?> <div class="shadowMiddle"></div> <?php } ?>
                <?php if($break){ ?> <div class="shadow"></div> <?php } ?>
                <div class='content' style='background-image: url("/img/employees/<?php echo slugify($employee['first_name']. '_'.$employee['last_name']); ?>.jpg");'></div>
                <div class="info">
                    <span class="name"> <?php echo $employee['first_name']; ?> <?php echo $employee['last_name']; ?></span>
                    <span class="function">
                            <?php echo $employee['function']; ?>
                        <?php if(isset($employee['days_available']) && $employee['days_available'] != '' ){ ?>
                            <br/>
                            (<?php echo $employee['days_available']; ?>)
                        <?php } ?>
                        </span>
                </div>
            </li>
        <?



        $count++;
    }

}