<?php
    include_once "../../load.php";
    $requested_url = str_replace("/admin/common/api/", '', urldecode($_SERVER["REQUEST_URI"]));
    if(substr($requested_url, 0, 1 ) === "?"){
        $requested_url = '';
    }
    $requested_url = strtok($requested_url, '?');

    switch($requested_url) {
        case "product/upload-image":
            require 'product/upload-image.php';
        break;
        case "product/delete-image":
            require 'product/delete-image.php';
        break;
        case "product/review":
            require 'product/review.php';
        break;
        case "order/latest-orders-count":
            require 'order/latest-orders-count.php';
        break;
        case "order/total-sales":
            require 'order/total-sales.php';
        break;
        case "order/orders-per-month":
            require 'order/orders-per-month.php';
        break;
        case "cron/job-details":
            require 'cron/job-details.php';
        break;
        case "cron/job-history":
            require 'cron/job-history.php';
        break;
        case "common/towns":
            require 'common/towns.php';
        break;
        case "cimri/update-products":
            require 'cimri/update-products.php';
        break;
        case "cimri/update-prices":
            require 'cimri/update-prices.php';
        break;
        case "akakce/update-products":
            require 'akakce/update-products.php';
        break;
        case "akakce/update-prices":
            require 'akakce/update-prices.php';
        break;
        case "paytr/list":
            require 'paytr/list.php';
        break;
        case "paytr/return":
            require 'paytr/return.php';
        break;
    }