<?php

define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

$data = array_merge($_GET, $_POST);

define('JPATH_BASE', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . DS . 'administrator');
require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'helper.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'toolbar.php';
$app = JFactory::getApplication('administrator');

require_once __DIR__ . '/classes/UpagePostManager.php';

$post = new UpagePostManager();
$post->execute($data);