コード例 #1
0
ファイル: install.php プロジェクト: alex-k/velotur
<?php

chdir(dirname(__DIR__));
if (!defined('PHPBEE_VAR_DIR')) {
    if (getenv('PHPBEE_VAR_DIR') !== FALSE) {
        define('PHPBEE_VAR_DIR', getenv('PHPBEE_VAR_DIR'));
    } else {
        define('PHPBEE_VAR_DIR', '/tmp/velotur/var/');
    }
}
require "vendor/phpbee/phpbee/libs/config.lib.php";
$gs_node_id = 1;
$init = new gs_init();
$cfg = gs_config::get_instance();
set_time_limit(300);
$cfg->check_install_key();
$init->init(LOAD_CORE | LOAD_STORAGE | LOAD_TEMPLATES | LOAD_EXTRAS);
gs_eventer::clean_subscribes();
$init->clear_cache();
$init->compile_modules();
$init->load_modules();
# $init->install_modules();
$init->save_handlers();
gs_fkey::update_fkeys();
gs_logger::dump();
echo "install done";
コード例 #2
0
ファイル: init.php プロジェクト: alex-k/velotur
$smarty->assign('_CONF', $_CONF);
$DBCLASS = new DbMysqlLayer();
if ($_CONF[system_maintene] && strpos($_SERVER[REQUEST_URI], '/admin/') === false) {
    $smarty->display($_CONF[root_dir] . "public_html/templates/maintene.html");
    exit;
}
loadclass('Trips');
loadclass('Tours');
loadclass('Guides');
loadclass('Users');
loadclass('Partners');
session_start();
header("Cache-control: private");
if (!empty($_POST['formLoginSubmit'])) {
    $_SESSION['user'] = NULL;
}
if (isset($_POST['logout'])) {
    $_SESSION['user'] = NULL;
}
$user = $_SESSION['user'];
if (is_object($user) && $user->getID()) {
    $user = new Users($user->getID());
    $_SESSION['user'] = $user;
    $smarty->assign('User', $user->getValues());
}
require_once './vendor/phpbee/phpbee/libs/config.lib.php';
$init = new gs_init('auto');
cfg_set('tpl_data_dir', array(cfg('tpl_data_dir'), realpath(cfg('root_dir') . 'html')));
$init->init(LOAD_CORE | LOAD_STORAGE | LOAD_TEMPLATES | LOAD_EXTRAS);
cfg_set('init_data', $init->data);
cfg_set('www_dir', '');
コード例 #3
0
ファイル: database.php プロジェクト: alex-k/velotur
<?php

chdir(dirname(__DIR__));
if (!defined('PHPBEE_VAR_DIR')) {
    if (getenv('PHPBEE_VAR_DIR') !== FALSE) {
        define('PHPBEE_VAR_DIR', getenv('PHPBEE_VAR_DIR'));
    } else {
        define('PHPBEE_VAR_DIR', '/tmp/velotur/var/');
    }
}
require "vendor/phpbee/phpbee/libs/config.lib.php";
$gs_node_id = 1;
$init = new gs_init();
$cfg = gs_config::get_instance();
set_time_limit(300);
$cfg->check_install_key();
$init->init(LOAD_CORE | LOAD_STORAGE | LOAD_TEMPLATES | LOAD_EXTRAS);
$init->load_modules();
$init->install_modules();
gs_logger::dump();
echo "Database update done";
コード例 #4
0
ファイル: bee_index.php プロジェクト: alex-k/velotur
chdir(dirname(__DIR__));
if (getenv('PHPBEE_DEBUG') !== FALSE && !defined('DEBUG')) {
    define('DEBUG', getenv('PHPBEE_DEBUG'));
}
if (!defined('PHPBEE_VAR_DIR')) {
    if (getenv('PHPBEE_VAR_DIR') !== FALSE) {
        define('PHPBEE_VAR_DIR', getenv('PHPBEE_VAR_DIR'));
    } else {
        define('PHPBEE_VAR_DIR', '/tmp/velotur/var/');
    }
}
require_once 'vendor/phpbee/phpbee/libs/config.lib.php';
$gs_node_id = 1;
$cfg = gs_config::get_instance();
mlog('1');
$init = new gs_init('auto');
cfg_set('tpl_data_dir', array(cfg('tpl_data_dir'), realpath(cfg('root_dir') . '../html')));
$init->init(LOAD_CORE);
$init->load_modules();
include_once 'classes/base.php';
include_once 'classes/Users_class.php';
include_once 'classes/Guides_class.php';
session_start();
if (stripos($_SERVER['REQUEST_URI'], '/admin') === 0) {
    if (isset($_SESSION['guide'])) {
        $guide = $_SESSION['guide'];
        $tpl = gs_tpl::get_instance();
        $tpl->assign('Guide', get_object_vars($guide));
    } else {
        header('Location: /admin/');
        exit;