/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-pager/lib/Skeleton/Pager/Pager.php
'conditions' => [],
'sort' => null,
'direction' => 'asc',
'page' => 1,
'jump_to' => Config::$jump_to,
'joins' => [],
'sort_permissions' => [],
'classname' => null,
'per_page' => Config::$items_per_page,
];
}
if (isset($options['conditions']) and is_array($options['conditions'])) {
$conditions = [];
foreach ($options['conditions'] as $condition_key => $condition) {
foreach ($condition as $setting_key => $setting) {
if ($condition_key === '%search%') {
$conditions[$condition_key][$setting_key] = $setting;
} else {
$conditions[$condition_key][$setting_key] = new Condition($setting['local_field'], $setting['comparison'], $setting['value'], $setting['local_function']);
}
}
}
$options['conditions'] = $conditions;
}
if (isset($options['joins']) and is_array($options['joins'])) {
$joins = [];
foreach ($options['joins'] as $join) {
$joins[] = new Join($join['remote_table'], $join['remote_id'], $join['local_field'], $join['conditions']);
}
$options['joins'] = $joins;
}
return $options;
}
/**
Arguments
"Undefined array key "local_function""
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-pager/lib/Skeleton/Pager/Pager.php
'conditions' => [],
'sort' => null,
'direction' => 'asc',
'page' => 1,
'jump_to' => Config::$jump_to,
'joins' => [],
'sort_permissions' => [],
'classname' => null,
'per_page' => Config::$items_per_page,
];
}
if (isset($options['conditions']) and is_array($options['conditions'])) {
$conditions = [];
foreach ($options['conditions'] as $condition_key => $condition) {
foreach ($condition as $setting_key => $setting) {
if ($condition_key === '%search%') {
$conditions[$condition_key][$setting_key] = $setting;
} else {
$conditions[$condition_key][$setting_key] = new Condition($setting['local_field'], $setting['comparison'], $setting['value'], $setting['local_function']);
}
}
}
$options['conditions'] = $conditions;
}
if (isset($options['joins']) and is_array($options['joins'])) {
$joins = [];
foreach ($options['joins'] as $join) {
$joins[] = new Join($join['remote_table'], $join['remote_id'], $join['local_field'], $join['conditions']);
}
$options['joins'] = $joins;
}
return $options;
}
/**
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-pager/lib/Skeleton/Pager/Web/Pager.php
$template->assign('options', $this->options);
$template->assign('field_name', $field_name);
$template->assign('header', $header);
$template->assign('pager', $this);
return $template->render(\Skeleton\Pager\Config::$header_template, false);
}
/**
* Paginate the results
*
* @access private
*/
public function page($all = false) {
$pager_uri_key = $this->get_pager_uri_key();
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
if (!isset($_GET['q']) AND isset($_SESSION['pager'][$pager_uri_key]) AND Config::$sticky_pager) {
$this->options = array_replace_recursive($this->options, $this->get_options_from_hash($_SESSION['pager'][$pager_uri_key]));
} elseif (isset($_GET['q'])) {
$query_options = $this->get_options_from_hash($_GET['q']);
// If multiple pagers exist on the same page, only load the options of the one with the same classname
if ($query_options['classname'] == $this->classname) {
unset($this->options['conditions']);
$this->options = array_replace_recursive($this->options, $this->get_options_from_hash($_GET['q']));
}
}
}
if (isset($_GET['p'])) {
$this->set_page($_GET['p']);
}
parent::page($all);
$this->generate_links();
$this->generate_per_page_links();
$hash = $this->create_options_hash($this->options['conditions'], $this->options['page'], $this->options['sort'], $this->options['direction'], $this->options['joins']);
if (Config::$sticky_pager) {
$_SESSION['pager'][$pager_uri_key] = $hash;
/web/pierke/flytobiggs.com/v3/app/front/module/Plane.php
* @access public
*/
public function display(): void {
if (isset($_GET['slug'])) {
$this->detail();
return;
}
$template = Template::get();
$pager = new Pager('plane');
$pager->add_condition('archived', 'IS', NULL);
if (isset($_GET['type'])) {
$plane_type = \Plane_Type::get_by_slug($_GET['type']);
$pager->add_condition('plane_type_id', $plane_type->id);
$template->assign('selected_plane_type', $plane_type);
}
$pager->page();
$template->assign('pager', $pager);
}
/**
* Plane details
*
* @access private
*/
private function detail() {
$slug = $_GET['slug'];
$plane = \Plane::get_by_slug($slug);
$template = Template::get();
$template->assign('plane', $plane);
$template->assign('selected_plane_type', $plane->plane_type);
$template->assign('action', 'detail');
}
}
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-application-web/lib/Skeleton/Application/Web/Module.php
/**
* Handle the request
*
* @access public
*/
public function handle_request(): void {
// Find out which method to call, fall back to calling display()
if (
isset($_REQUEST['action']) === true
&& is_string($_REQUEST['action']) === true
&& method_exists($this, 'display_' . $_REQUEST['action']) === true
) {
if (class_exists('\Skeleton\Template\Template') === true) {
$template = \Skeleton\Application\Web\Template::Get();
$template->assign('action', $_REQUEST['action']);
}
call_user_func([$this, 'display_' . $_REQUEST['action']]);
} else {
$this->display();
}
// If the module has defined a template, render it
if ($this->template !== null && $this->template !== false) {
$template = \Skeleton\Application\Web\Template::Get();
$template->display($this->template);
}
}
/**
* Is login required?
*
* @access public
*/
public function is_login_required(): bool {
return $this->login_required;
}
/**
* Get the classname of the current module
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-application-web/lib/Skeleton/Application/Web/Module.php
$template->add_environment('sticky_session', $sticky->get_as_array());
}
// Call our magic secure() method before passing on the request
$allowed = true;
if (method_exists($this, 'secure') === true) {
$allowed = $this->secure();
}
// If the request is not allowed, make sure it gets handled properly
if ($allowed === false) {
$application->call_event('module', 'access_denied', [$this]);
} else {
// Call the bootstrap method if it exists
if (method_exists($this, 'bootstrap') === true) {
$this->bootstrap();
}
// Handle request
$this->handle_request();
}
// Call the teardown event if it exists
$application->call_event('module', 'teardown', [$this]);
}
/**
* get module_path
*
* @access public
* @return string $path
*/
public function get_module_path(): string {
$reflection = new \ReflectionClass($this);
$application = Application::Get();
$path = '/' . str_replace($application->module_path, '', $reflection->getFileName());
$path = strtolower($path);
return str_replace('.php', '', $path);
}
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-application-web/lib/Skeleton/Application/Web.php
/**
* Validate CSRF
*/
$csrf = \Skeleton\Application\Web\Security\Csrf::get();
if ($session_properties['resumed'] === true && !$csrf->validate()) {
$this->call_event('security', 'csrf_validate_failed');
}
/**
* Check for replays
*/
$replay = \Skeleton\Application\Web\Security\Replay::get();
if ($replay->check() === false) {
$this->call_event('security', 'replay_detected');
}
if ($module !== null) {
$this->call_event('module', 'bootstrap', [ $module ]);
$module->accept_request();
$this->call_event('module', 'teardown', [ $module ]);
}
}
/**
* Search module
*
* @access public
*/
public function route(string $request_uri): object {
/**
* Remove leading slash
*/
if ($request_uri[0] === '/') {
$request_uri = substr($request_uri, 1);
}
if (substr($request_uri, -1) === '/') {
$request_uri = substr($request_uri, 0, strlen($request_uri) - 1);
}
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-core/lib/Skeleton/Core/Application.php
*/
public function accept(): void {
/**
* If this application is launched while another application has been
* set, we need to take over the request_relative_uri
* This happens when whitin an application, another application is
* started.
*/
$application = self::get();
$this->request_relative_uri = $application->request_relative_uri;
$this->hostname = $application->hostname;
\Skeleton\Core\Application::set($this);
$continue = $this->call_event('application', 'bootstrap', []);
register_shutdown_function([$this, 'call_event'], 'application', 'teardown', []);
if ($continue) {
$this->run();
}
}
/**
* Run the application
*
* @access public
*/
abstract public function run(): void;
/**
* Load all events
*
* @access public
*/
public function load_event(string $requested_context): object {
if (isset($this->events[$requested_context])) {
return $this->events[$requested_context];
}
/web/pierke/flytobiggs.com/v3/lib/external/packages/tigron/skeleton-core/lib/Skeleton/Core/Http/Handler.php
} elseif (isset($_SERVER['SERVER_NAME'])) {
$hostname = $_SERVER['SERVER_NAME'];
} elseif (isset($_SERVER['SERVER_ADDR'])) {
$hostname = $_SERVER['SERVER_ADDR'];
} else {
throw new \Exception('Not a web request');
}
// Remove port number from host
$hostname = preg_replace('/:\d+$/', '', $hostname);
/**
* Define the application
*/
try {
$application = Application::detect($hostname, $request_uri);
} catch (\Skeleton\Core\Exception_Unknown_Application $e) {
Status::code_404('application');
}
$application->accept();
}
}
/web/pierke/flytobiggs.com/v3/webroot/handler.php
<?php
declare(strict_types=1);
ini_set('pcre.recursion_limit', 10000000);
ini_set('pcre.backtrack_limit', 10000000);
ini_set('pcre.jit', 0);
/**
* Handler file
*
* Calls the Handler class
*/
require_once '../lib/base/Bootstrap.php';
Bootstrap::boot();
\Skeleton\Core\Http\Handler::Run();