Exemplo n.º 1
0
            $cursor =& $cursor[$key];
        }
        return $cursor;
    }
}
if (!function_exists('include_files')) {
    function include_files($dir = NULL, $ext = NULL)
    {
        if (!$dir or !$ext) {
            return;
        }
        $last_symbol = substr($dir, -1);
        if ($last_symbol != '/') {
            $dir .= '/';
        }
        $include_files = scandir($dir);
        foreach ($include_files as $name) {
            if (!is_file($dir . $name) or strpos($name, $ext) === FALSE or $name[0] === '_' or in_array($name, array('.', '..'))) {
                continue;
            }
            if (is_dir($dir . $name)) {
Exemplo n.º 2
0
$GLOBALS['db']->selectDb($GLOBALS['cfg']['db']);
header('Content-Type: text/html; charset=utf-8');
# gettext configuration
$gettext_domain = 'messages';
$gettext_lang = 'de_AT';
putenv('LANG=' . $gettext_lang);
setlocale(LC_ALL, $gettext_lang);
bindtextdomain($gettext_domain, './locale');
bind_textdomain_codeset($gettext_domain, 'UTF-8');
textdomain($gettext_domain);
include 'includes/auth.inc.php';
# limonade micro php framework - http://www.limonade-php.net
include 'lib/limonade.php';
# include the 'controllers'
$arrControllers = array('access', 'clients', 'daemons', 'daemons_servers', 'people', 'people_roles', 'ports', 'roles', 'servers');
include_files($arrControllers);
# limonade configuration
function configure()
{
    option('env', ENV_DEVELOPMENT);
    option('debug', true);
}
# execute before page rendering
function before()
{
    layout('layouts/default.html.php');
    /*set('header', '
          <a href="'.url_for().'">Home</a>
          <a href="'.url_for('people').'">Personen</a>
          <a href="'.url_for('roles').'">Rollen</a>
          <a href="'.url_for('access').'">Zugriff</a>
Exemplo n.º 3
0
<?php

function include_files($folder)
{
    foreach (glob($folder . "/*.php") as $file) {
        include_once $file;
    }
}
include_files("API");
include_files("Extra");