Ejemplo n.º 1
0
        }
    } else {
        if (file_exists(SYSTEM_ROOT . '/helper/' . $raw_file)) {
            require_once SYSTEM_ROOT . '/helper/' . $raw_file;
            @class_alias("{$name}_Helper", "{$name}");
        } else {
            if (file_exists(SYSTEM_ROOT . '/library/' . $raw_file)) {
                require_once SYSTEM_ROOT . '/library/' . $raw_file;
                if (!$force_core) {
                    @class_alias("{$name}_Core", "{$name}");
                }
            } else {
                throw new Exception("Class Not Found: {$name}");
            }
        }
    }
}
// __autoload()
// Tricky bugger. If we have documents stored in session, and this is pre-autoloader we can't find any classes.
session_start();
if (false === strpos($_SERVER['REQUEST_URI'], Config::get('xoket.location'))) {
    die('Configuration Error - xoket.location is invalid.');
}
$uri = substr($_SERVER['REQUEST_URI'], strlen(Config::get('xoket.location')));
$uri = URI::route($uri);
Request::load($uri);
$context = Context::instance();
$context->headers();
echo $context->execute();
Flash::update();
Ejemplo n.º 2
0
        Common::jumpUrl("flash/manage.php");
    }
} else {
    if (isset($_GET['edit'])) {
        $id = intval($_GET['id']);
        if ($id < 1) {
            Common::jumpUrl("flash/manage.php");
        }
        if (isset($_POST['name'])) {
            $name = strip_tags($_POST['name']);
            $title = strip_tags($_POST['title']);
            $url = strip_tags($_POST['url']);
            $status = intval($_POST['status']);
            $status > 1 && ($status = 0);
            $sort = intval($_POST['sort']);
            Flash::update($id, array('name' => $name, 'title' => $title, 'url' => $url, 'status' => $status, 'sort' => $sort));
            Common::jumpUrl("flash/manage.php");
        } else {
            $item = Flash::getById($id);
            Template::assign('item', $item);
            Template::display('flash/edit.tpl');
        }
    } else {
        if (isset($_GET['del'])) {
            $id = intval($_GET['id']);
            if ($id < 1) {
                Common::jumpUrl("flash/manage.php");
            }
            Flash::del($id);
            Common::jumpUrl("flash/manage.php");
        } else {