elseif ( count ( $category_path ) == 2 ) { go('/posters/' . implode('/',$category_urlnames)); } // Otherwise go ahead and render the root category (rarity) else { site()->visit('posters'); return array('posters', [ 'category_path' => $category_path ] ); } } ), // Having redirected as necessary, go ahead and render array( 'pattern' => [ 'posters/(:any)/(:any)','posters/(:any)/(:any)/(:any)','posters/(:any)/(:any)/(:any)/(:any)' ], 'action' => function($u1,$u2,$u3 = null,$u4 = null) { $urlname_path = func_get_args(); $category_path = []; foreach ( $urlname_path as $urlname ) { $parent = count($category_path) ? ' = ' . end($category_path)->{'id'} : ' < 1'; $category_path[] = db::query('SELECT * FROM `categories` WHERE `urlname` = ? AND `parent` ' . $parent . ' LIMIT 1',[$urlname])->first(); } site()->visit('posters'); return array('posters', [ 'category_path' => $category_path ] ); } ) ));
/** * Facepalm typo alias * @see csrf() */ function csfr() { return call('csrf', func_get_args()); } /** * Shortcut for call_user_func_array with a better handling of arguments * * @param mixed $function * @param mixed $arguments * @return mixed */ function call($function, $arguments = array()) { if(!is_callable($function)) return false; if(!is_array($arguments)) $arguments = array($arguments); return call_user_func_array($function, $arguments); } /** * Parses yaml structured text * * @param $string * @return array */ function yaml($string) { return yaml::decode($string); } /** * Simple email sender helper * * @param array $params * @return Email */ function email($params = array()) { return new Email($params);
// load all plugins $this->plugins(); // start the router $this->router = new Router($this->routes()); $this->route = $this->router->run(trim($this->path(), '/')); // check for a valid route if(is_null($this->route)) { header::status('500'); header::type('json'); die(json_encode(array( 'status' => 'error', 'message' => 'Invalid route or request method' ))); } // call the router action with all arguments from the pattern $response = call($this->route->action(), $this->route->arguments()); // load all language variables // this can only be loaded once the router action has been called // otherwise the current language is not yet available $this->localize(); // build the response $this->response = $this->component('response')->make($response); // store the current language in the session if( $this->option('language.detect') && $this->site()->multilang() && $this->site()->language() ) { s::set('kirby_language', $this->site()->language()->code()); } return $this->response;
<?php define('DS', DIRECTORY_SEPARATOR); // load kirby require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php'); // check for a custom site.php if(file_exists(__DIR__ . DS . 'site.php')) { require(__DIR__ . DS . 'site.php'); } else { $kirby = kirby(); } // render echo $kirby->launch();
Key | Value |
Kirby Toolkit | v2.5.14 |
Kirby CMS | v2.5.14 |
Key | Value |
PATH | /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin |
PWD | /usr/home/chisholm/public_html/fcgi-bin |
ORIG_SCRIPT_NAME | /fcgi-bin/php7_wrapper.sh |
ORIG_PATH_TRANSLATED | /usr/home/chisholm/public_html/vintagepostersnyc.com/app/index.php |
ORIG_PATH_INFO | /index.php |
ORIG_SCRIPT_FILENAME | /usr/home/chisholm/public_html/fcgi-bin/php7_wrapper.sh |
HTTP_CONNECTION | close |
SCRIPT_NAME | /index.php |
REQUEST_URI | /posters/small_format_various/posters/online_shows/ |
QUERY_STRING | |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_URL | /index.php |
REMOTE_PORT | 43176 |
SCRIPT_FILENAME | /usr/home/chisholm/public_html/vintagepostersnyc.com/app/index.php |
SERVER_ADMIN | webmaster@vintagepostersnyc.com |
CONTEXT_DOCUMENT_ROOT | /usr/home/chisholm/public_html/fcgi-bin/ |
CONTEXT_PREFIX | /fcgi-bin/ |
REQUEST_SCHEME | https |
DOCUMENT_ROOT | /usr/home/chisholm/public_html/vintagepostersnyc.com/app |
REMOTE_ADDR | 3.90.255.22 |
REMOTE_HOST | 3.90.255.22 |
SERVER_PORT | 443 |
SERVER_ADDR | 216.92.35.91 |
SERVER_NAME | www.vintagepostersnyc.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | |
HTTP_HOST | www.vintagepostersnyc.com |
HTTP_REFERER | http://www.vintagepostersnyc.com/posters/small_format_various/posters/online_shows/ |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
SSL_TLS_SNI | www.vintagepostersnyc.com |
HTTPS | on |
UNIQUE_ID | Zgakkz26AFvrMGZLaY98fQAAAhA |
REDIRECT_STATUS | 200 |
REDIRECT_HANDLER | application/x-httpd-php |
REDIRECT_SSL_TLS_SNI | www.vintagepostersnyc.com |
REDIRECT_HTTPS | on |
REDIRECT_UNIQUE_ID | Zgakkz26AFvrMGZLaY98fQAAAhA |
REDIRECT_REDIRECT_STATUS | 200 |
REDIRECT_REDIRECT_SSL_TLS_SNI | www.vintagepostersnyc.com |
REDIRECT_REDIRECT_HTTPS | on |
REDIRECT_REDIRECT_UNIQUE_ID | Zgakkz26AFvrMGZLaY98fQAAAhA |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711379.2774 |
REQUEST_TIME | 1711711379 |