Exemplo n.º 1
0
 function __construct($ser = NULL, $user = NULL)
 {
     parent::__construct();
     //echo ( "<br>function LoadPrefs ( $ser=NULL, $user=NULL ) {" );
     $this->prefs = new Preferences();
     // Make sure that we have the correct server
     $server = $ser == NULL ? Cfg::get("server") : $ser;
     // Load up thi s domain information from
     // the user information If there is no information
     // in the user, check the alternate domain
     $sql = "SELECT * FROM tblUser WHERE ";
     if ($user != NULL) {
         $sql .= "fldUser='******'";
     } else {
         if ($server != NULL) {
             $sql .= "'{$server}' LIKE fldDomain";
         }
     }
     $sql .= " LIMIT 1";
     if ($this->_loadUserTable($sql)) {
         $this->_loadGroupTable();
     } else {
         $sql = "SELECT * FROM tblUser WHERE '{$server}' LIKE fldAltDomain LIMIT 1";
         if ($this->_loadUserTable($sql)) {
             // If it is in the alternate domain the
             // use these preferences
             $server = $this->prefs->userPrefs["fldDomain"];
             Cfg::set('server', $server);
             $this->_loadGroupTable();
         }
     }
 }
Exemplo n.º 2
0
 public static function addDB($name, $host, $user, $password, $database, $options = '', $driver = 'mongodb')
 {
     Cfg::set($name . '-host', $host);
     Cfg::set($name . '-db', $database);
     Cfg::set($name . '-user', $user);
     Cfg::set($name . '-pass', $password);
     Cfg::set($name . '-options', $options);
     Cfg::set($name . '-driver', $driver);
 }
Exemplo n.º 3
0
<?php

use Jackbooted\Admin\Admin;
use Jackbooted\Admin\Login;
use Jackbooted\Config\Cfg;
use Jackbooted\DB\DBManager;
use Jackbooted\Admin\SuperAdmin;
require_once dirname(__FILE__) . '/config.php';
Cfg::set('accesslevel', 0);
$pageTimer = new \Jackbooted\Time\Stopwatch('Page Load');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
    <head>
        <meta name="description" content="Super Administration" />
        <meta name="keywords"    content="Super Administration" />
        <title>Super Administration</title>
        <link rel="shortcut icon" href="<?php 
echo Cfg::get('favicon');
?>
" type="image/x-icon">
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" >
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    </head>
    <body>
        <table width="100%" cellpadding="5" cellspacing="0" class="table table-bordered">
            <tr>
                <td width="100%">
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="100" nowrap="nowrap" valign="top" height="50">