Ejemplo n.º 1
0
        $zig_config_obj = new zig_config();
        $config_value = $zig_config_obj->config("config", "zig_action");
        $default_action = $config_value['value'];
        $config_theme = $zig_config_obj->config("config", "theme");
        $config_template = $zig_config_obj->config("config", "template");
        $config_timezone = $zig_config_obj->config("config", "timezone");
        $theme = $config_theme['value'];
        $template = $config_template['value'];
        switch ($config_timezone['value'] != "") {
            case true:
                date_default_timezone_set($config_timezone['value']);
        }
    }
}
require_once "../zig-api/lib/hash.lib.php";
$zig_hash_obj = new zig_hash();
//-- zig's directory structure
$GLOBALS['zig']['dir'] = array('gui', 'lib', 'sql');
//-- zig's default settings
$GLOBALS['zig']['default']['template'] = $template ? $template : "default";
// template
$GLOBALS['zig']['default']['theme'] = $theme ? $theme : "default";
// theme
$GLOBALS['zig']['default']['value'] = 1;
// 0 = no return value, 2 = return 'return value'
$GLOBALS['zig']['default']['cookie'] = time() + 1800;
// default cookie lifetime
//-- zig's current settings
$ripped_url = explode("/", $_SERVER['PHP_SELF']);
$url_size = sizeof($ripped_url);
$zig_hash = isset($_GET['zig_hash']) ? $_GET['zig_hash'] : (isset($_POST['zig_hash']) ? $_POST['zig_hash'] : NULL);
Ejemplo n.º 2
0
 function group_id()
 {
     if (isset($_SESSION['zig_hash'])) {
         require_once "../zig-api/lib/hash.lib.php";
         $zig_hash_obj = new zig_hash();
         $zig_hash = $zig_hash_obj->hash_vars_decode($_SESSION['zig_hash']);
         $zig_group = $zig_hash['username'];
         if ($zig_user) {
             $sql = "SELECT `id` FROM `zig_groups` WHERE `groupname`='{$zig_group}' LIMIT 1";
             $result = zig("query", $sql);
             $fetch = $result->fetchRow();
             $zig_return = $fetch['id'];
         }
         return $zig_return;
     }
 }