Пример #1
0
 public static function rum($dados)
 {
     $db = Confgs::getFile(BASE_PATH . '/opt/instal/base/db.confg.ll');
     $db['basetype'] = $dados['type'];
     $db['hostName'] = $dados['host'];
     $db['userName'] = $dados['user'];
     $db['password'] = $dados['pass'];
     $db['tableName'] = $dados['table'];
     $confg = Confgs::getFile(BASE_PATH . '/opt/instal/base/confg.ll');
     $confg['defines']['PREFIXO'] = $dados['prefixo'];
     Instal::confgFiles($confg, $db);
     return array_merge(array('files' => array('confg.ll' => array('arquivo' => BASE_PATH . '/opt/instal/base/db.confg.ll', 'status' => 'OK'), 'db.confg.ll' => array('arquivo' => BASE_PATH . '/opt/instal/base/confg.ll', 'status' => 'OK'))), array('querys' => Instal::sql(BASE_PATH . '/opt/instal/base/db.sql', PREFIXO, $dados['prefixo'])));
 }
Пример #2
0
$_ll['url']['home'] = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $bptw . '/';
$_ll['url']['path'] = $bsgt;
$_ll['url']['base'] = $_ll['url']['home'] . $_ll['url']['path'];
$_ll['url']['full'] = $_ll['url']['base'] . $qyst;
$_ll['url']['get'] = !empty($bsgt) ? explode('/', $bsgt) : array();
unset($file, $bptw, $qyst, $rdtu, $bsgt);
/** Carregando e configunado o Autoload */
require_once BASE_PATH . DS . 'usr' . DS . 'AutoLoad.php';
AutoLoad::setPath(BASE_PATH . DS . 'usr');
AutoLoad::setPath(BASE_PATH . DS . 'api');
AutoLoad::setPath(BASE_PATH . DS . 'app');
/** Verifica a existemcia do inicialozador (confg.php) */
if (!file_exists($f = BASE_PATH . DS . 'etc' . DS . 'confg.ll')) {
    die('file: ' . $f . '; não existemte.');
} else {
    $_ll = array_merge($_ll, Confgs::getFile($f));
}
/** starta todas os difines configurados */
foreach ($_ll['defines'] as $name => $value) {
    if (!defined($name)) {
        define($name, $value);
    }
}
/** retorna os dados processados/carregados pelo start */
if (str_replace('/', DS, trim($_SERVER['DOCUMENT_ROOT'], DS) . $_SERVER['SCRIPT_NAME']) !== trim(str_replace('/', DS, __FILE__), DS)) {
    return $_ll;
}
$_ll['operation_types'] = array('opt', 'api', 'app');
$_ll['operation_mode'] = 'start';
$_ll['operation_type'] = false;
$_ll['enter_mode'] = 'start';