Пример #1
0
 public function logoutAction()
 {
     $this->doQoolHook('pre_logout_action');
     $_SESSION = array();
     givemeGuestRights();
     $this->doQoolHook('post_logout_action');
     $params = array("message" => $this->t("Logout Success"), "msgtype" => 'success');
     $this->addMessage($params);
     $this->_helper->redirector('index', 'index', 'default');
 }
Пример #2
0
if (!($dirs = readDirFile())) {
    include "install/install.php";
    $installer = new QoolInstaller();
    $installer->start();
} else {
    setIncludePath($dirs);
    //d(get_include_path());
    require_once "Zend/Session.php";
    $namespace = new Zend_Session_Namespace('Qool');
    if ($namespace->isLocked()) {
        $namespace->unLock();
    }
    //get the folder if needed
    amiInAfolder($dirs);
    //if the user is not logged in we just set some typical rights
    givemeGuestRights();
    //set the include path
    //now read configuration
    require_once "Zend/Config/Xml.php";
    $config = new Zend_Config_Xml('config/config.xml');
    //just a simple definition to make things readable
    define('DIR_SEP', $config->host->separator);
    define('APPL_PATH', $config->host->absolute_path);
    $_SESSION['SITE_URL'] = $config->host->http . $config->host->subdomain . $config->host->domain . $config->host->folder;
    //read the database table names and prefix
    $database = new Zend_Config_Xml('config' . DIR_SEP . 'database.xml');
    $database = $database->toArray();
    $database = normalizeDbTables($database);
    //read the routes
    $routes = new Zend_Config_Xml('config' . DIR_SEP . 'routes.xml');
    //read the application addons