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/verrassendveel.komma.pro/wwwroot/app/views/partials/backButton.php
<?php

// Default link
$link = '/';
$label = 'Terug naar overzicht';

// Back buttons are on detail pages
// Usually you want to go back to the overview page
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
$sub = isset($_GET['sub']) ? $_GET['sub'] : '';

if($page != 'home') $link = '/' . $page;

// When on a shop detail page, there are multiple ways to get there
// We need to check were we come from
if($page == 'winkels' && isset($_GET['ref']))
{
    $link = '/' . str_replace('-','/',$_GET['ref']);
    $label = 'Terug';
}

// Return output
return '<a class="hover-button" href="' . $link . '">
            <span class="btn-text-back">' . $label . '</span>
            <span class="arrow-back btn-arrow-back"></span>
            <span class="btn-green-288"></span>
            <span class="btn-darkgreen-288 hover"></span>
        </a>';