<?php

function __autoload($class_name){
    $class_name = str_replace('\\','/', $class_name);
    include_once( "count_form.php" );

}


if(isset($_GET)){

    $page    = !empty($_GET['p']) ? $_GET['p'] : 'form';

    $subpage = !empty($_GET['sp']) ? $_GET['sp'] : 'index';

    $action = !empty($_GET['a']) ? $_GET['a'] : $subpage;

    $class   = __DIR__ .'\count_form\app\data\\'.$page;

    $object = new $class();

    $data = $object->$action();

}


include_once 'count_form/app/view/main_page.php';