Exemplo n.º 1
0
litepublisher::init();
//ob_start();
if (litepublisher::$domain == 'fireflyblog.ru') {
    define('dbversion', false);
}
if (litepublisher::$debug) {
    require_once litepublisher::$paths->lib . 'data.class.php';
    require_once litepublisher::$paths->lib . 'events.class.php';
    require_once litepublisher::$paths->lib . 'items.class.php';
    require_once litepublisher::$paths->lib . 'classes.php';
    require_once litepublisher::$paths->lib . 'options.class.php';
} else {
    require_once litepublisher::$paths->lib . 'kernel.php';
}
litepublisher::$classes = tclasses::instance();
litepublisher::$options = toptions::instance();
if (!litepublisher::$options->installed) {
    require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php';
}
if (dbversion) {
    litepublisher::$db = new tdatabase();
}
litepublisher::$options->admincookie = litepublisher::$options->cookieenabled && litepublisher::$options->authcookie();
litepublisher::$urlmap = turlmap::instance();
if (!defined('litepublisher_mode')) {
    litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']);
}
litepublisher::$options->cache = false;
litepublisher::$options->savemodified();
litepublisher::$options->showerrors();
if (dbversion && !preg_match('/(^\\/rpc\\.xml|\\/rss|\\/comments\\.)|(\\.xml$)/', $_SERVER['REQUEST_URI'])) {
Exemplo n.º 2
0
                $class = $this->mobileclasses[$class];
            }
            return parent::getinstance($class);
        }
        public function newinstance($class)
        {
            if (isset($this->mobileclasses[$class])) {
                $class = $this->mobileclasses[$class];
            }
            return parent::newinstance($class);
        }
    }
    //class
    litepublisher::$classes = new tmobileclasses();
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mobile.classes.php';
    litepublisher::$options = tmobileoptions::instance();
    if (!litepublisher::$options->installed) {
        require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php';
    }
    if (dbversion) {
        litepublisher::$db = new tdatabase();
    }
    litepublisher::$options->admincookie = litepublisher::$options->cookieenabled && litepublisher::$options->authcookie();
    litepublisher::$urlmap = tmobileurlmap::instance();
    if (!defined('litepublisher_mode')) {
        litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']);
    }
} catch (Exception $e) {
    echo $e->GetMessage();
}
litepublisher::$options->savemodified();
Exemplo n.º 3
0
        require_once litepublisher::$paths->lib . 'options.class.php';
        require_once litepublisher::$paths->lib . 'site.class.php';
    } else {
        require_once litepublisher::$paths->lib . 'kernel.php';
    }
    define('dbversion', true);
    /*
    if (class_exists('Memcache')) {
      tfilestorage::$memcache =  new Memcache;
      tfilestorage::$memcache->connect('127.0.0.1', 11211);
    }
    */
    if (!tstorage::loaddata()) {
        if (file_exists(litepublisher::$paths->data . 'storage.php') && filesize(litepublisher::$paths->data . 'storage.php')) {
            die('Storage not loaded');
        }
        require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php';
    }
    litepublisher::$classes = tclasses::i();
    litepublisher::$options = toptions::i();
    litepublisher::$db = tdatabase::i();
    litepublisher::$site = tsite::i();
    litepublisher::$urlmap = turlmap::i();
    if (!defined('litepublisher_mode')) {
        litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']);
    }
} catch (Exception $e) {
    litepublisher::$options->handexception($e);
}
litepublisher::$options->savemodified();
litepublisher::$options->showerrors();
Exemplo n.º 4
0
 private function loadlang()
 {
     litepublisher::$options = $this;
     require_once litepublisher::$paths->lib . 'filer.class.php';
     require_once litepublisher::$paths->lib . 'local.class.php';
     require_once litepublisher::$paths->lib . 'htmlresource.class.php';
     $ini = litepublisher::$paths->languages . litepublisher::$options->language . '.ini';
     tlocal::loadini($ini);
     //tlocal::loadlang('admin');
     $ini = litepublisher::$paths->languages . 'admin' . litepublisher::$options->language . '.ini';
     tlocal::loadini($ini);
     date_default_timezone_set(tlocal::$data['installation']['timezone']);
 }