public function __construct() { $this->setFile(Path::getRoot() . 'System/Config.txt'); $handle = fopen($this->file, 'a+'); $data = fread($handle, filesize($this->file)); fclose($handle); if (!empty($data)) { $this->setData(json_decode($data, true)); } }
protected function __construct() { $this->skins = Path::getRoot() . 'Skins/' . Session::getAccountId() . '/'; $this->default = Path::getRoot() . 'Skins/' . Session::getGuestAccountId() . '/'; }
<?php echo __FILE__ . '(' . __LINE__ . ') __FILE__: <pre>' . print_r(__FILE__, true) . '</pre>'; /** * @todo this code should check to see if the file exists first, and if not get the file from the default account */ include '../System/BootStrap.php'; use System\Functions\Path; header("Content-type: text/css; charset: UTF-8"); $file = str_replace('|', '/', $_GET['file']); $css = Path::getRoot() . 'Skins/' . $_GET['accountId'] . '/Css/' . $file; include $css;
<?php /** * @todo allow this to open gif's & jpg's as well * @todo this code should check to see if the file exists first, and if not get the file from the default account */ include '../System/BootStrap.php'; use System\Functions\Path; $file = str_replace('|', '/', $_GET['file']); $png = Path::getRoot() . 'Skins/' . $_GET['accountId'] . '/Images/' . $file; $imgPng = imageCreateFromPng($png); header("Content-type: image/png"); imagePng($imgPng);