Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
/**
 * function autoLoader
 *
 * @param string $name the namespace of the class
 * @return void
 *
 */
function autoLoader($class)
{
    $path = Path::getPackageRoot();
    $dirs = explode("\\", $class);
    $className = $dirs[count($dirs) - 1] . '.php';
    array_pop($dirs);
    if (!empty($dirs)) {
        $path .= '/' . implode('/', $dirs);
        $path = implode('/', array_unique(explode('/', $path))) . '/';
    }
    if (file_exists($path . $className)) {
        require_once $path . $className;
    }
}
Exemplo n.º 3
0
 protected function __construct()
 {
     $this->skins = Path::getRoot() . 'Skins/' . Session::getAccountId() . '/';
     $this->default = Path::getRoot() . 'Skins/' . Session::getGuestAccountId() . '/';
 }
Exemplo n.º 4
0
<?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;
Exemplo n.º 5
0
<?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);