Exemple #1
0
 function __construct($url, $path)
 {
     self::$url = $url;
     self::$path = $path;
     self::$load = $this;
     // CLM Klassen automatisch einbinden
     spl_autoload_register("clm_core::autoload");
     self::$cms = clm_class_cms::init();
     self::$id = new clm_class_id();
     // Grundlegende Konfiguration
     require self::$path . "/includes/database.php";
     require self::$path . "/includes/table.php";
     require self::$path . "/includes/config.php";
     self::$db = new clm_class_db($database, $table, $config);
     self::$lang = new clm_class_lang();
     // Weitere Initialisierung nur bei abgeschlossener Installation
     if (!defined("clm_install")) {
         self::$access = new clm_class_access();
         self::$api = new clm_class_api();
         // Erzeugung von Beispieldaten nach Installation / Korrektur bei inkonsistenter Datenbank
         if (self::$access->getId() == -1 && self::$access->getType() == "admin") {
             if (self::$access->getSeason() == -1) {
                 $lang = self::$lang->designation;
                 self::$api->direct("db_season_save", array(-1, 1, 0, $lang->ExampleSeason, "", "", "0000-00-00 00:00:00"));
             } else {
                 self::$api->direct("db_season_enable", array(self::$access->getSeason()));
             }
         }
         self::$cms->afterBoot();
         // Log prinzipiell aktiv?
         if (clm_core::$db->config()->log) {
             self::$log = new clm_class_log();
             set_error_handler('clm_core::errorHandler');
             set_exception_handler('clm_core::exceptionHandler');
             register_shutdown_function('clm_core::shutdown');
         }
     } else {
         self::$api = new clm_class_api();
         self::$api->check(false);
         // Rechtekontrolle deaktivieren
     }
 }
 public function logout()
 {
     if (clm_core::$access->getJid() != -1) {
         ob_start();
         $this->initJoomla();
         $mainframe = JFactory::getApplication();
         $mainframe->logout();
         ob_end_clean();
         return parent::logout();
     } else {
         return false;
     }
 }
Exemple #3
0
<?php

defined('clm') or die('Restricted access');
// **** Datenbank Verbindung **** //
//
// Eigene Verbindungsdaten:
// $database = array('host','db-name','name','pas','db-prefix');
//
// Joomla Verbindungsdaten übernehmen
// $database = clm_class_cms::joomla_config($joomla_path);
$database = clm_class_cms::joomla_config();
Exemple #4
0
 public function logout()
 {
     if (clm_core::$access->getJid() != -1) {
         $mainframe = JFactory::getApplication();
         $mainframe->logout();
         return parent::logout();
     } else {
         return false;
     }
 }