<?php

if (isset($_REQUEST['for'])) {
    switch ($_REQUEST['for']) {
        case 'client':
            require_once 'client.html';
            break;
        case 'clientregister':
            require_once 'client.register.html';
            break;
        case 'acceptor':
            require_once 'acceptor.html';
            break;
        case 'visitor':
            require_once 'client.html';
            break;
        default:
            page404();
            break;
    }
} else {
    page404();
}

function page404()
{
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Object not found!</title>
        <link rev="made" href="mailto:postmaster@kashan"/>
        <style type="text/css"><!-- /*--><![CDATA[/*><!--*/
            body {
                color: #000000;
                background-color: #FFFFFF;
            }

            a:link {
                color: #0000CC;
            }

            p, address {
                margin-left: 3em;
            }

            span {
                font-size: smaller;
            }
        </style>
    </head>
    <body>
    <h1>Object not found!</h1>
    <p>
        The requested URL was not found on this server.
        If you entered the URL manually please check your
        spelling and try again.
    </p>
    <p>
        If you think this is a server error, please contact
        the <a href="mailto:postmaster@kashan">webmaster</a>.
    </p>
    <h2>Error 404</h2>
    <address>
        <a href="/">kashan</a><br/>
        <span>Apache/2.4.38 (Win64) OpenSSL/1.1.1b PHP/7.3.3</span>
    </address>
    </body>
    </html>
    <?php
}

?>