Example #1
0
<?php

define('BASE_PATH', dirname(__FILE__));
include_once 'functions/export.php';
$export = new Export();
$url = 'index.php';
if (isset($_GET['customers']) && $_GET['customers']) {
    $result = $export->getCustomers();
    $export->finishExport();
    $url .= '?customers=' . $result;
} elseif (isset($_GET['links']) && $_GET['links']) {
    $result = $export->fetchLinks();
    $export->finishExport();
    $url .= '?links=' . $result;
} elseif (isset($_GET['products']) && $_GET['products']) {
    $result = $export->getProducts();
    $export->finishExport();
    $url .= '?products=' . $result;
} elseif (isset($_GET['categories']) && $_GET['categories']) {
    $result = $export->getCategories();
    $export->finishExport();
    $url .= '?categories=' . $result;
}
header('Location: ' . $url);