Ejemplo n.º 1
0
 function getMysqlDbAdmin(&$alist)
 {
     if (!$this->isLocalhost('mysqldbsyncserver')) {
         $fqdn = getFQDNforServer($this->mysqldbsyncserver);
         //$dbadminUrl =  "http://$fqdn:7778/thirdparty/phpMyAdmin/";
         if (http_is_self_ssl()) {
             $dbadminUrl = "https://{$fqdn}:7777/thirdparty/phpMyAdmin/";
         } else {
             $dbadminUrl = "http://{$fqdn}:7778/thirdparty/phpMyAdmin/";
         }
     } else {
         $dbadminUrl = "/thirdparty/phpMyAdmin/";
     }
     try {
         $dbad = $this->getPrimaryDb();
         if (!$dbad) {
             return;
         }
         $user = $dbad->nname;
         $pass = $dbad->dbpassword;
         if (if_demo()) {
             //$pass = "******";
         }
         $alist[] = create_simpleObject(array('url' => "{$dbadminUrl}?pma_username={$user}&pma_password={$pass}", 'purl' => "c=mysqldb&a=updateform&sa=phpmyadmin", 'target' => "target='_blank'"));
     } catch (Exception $e) {
     }
 }
Ejemplo n.º 2
0
 function getMysqlDbAdmin(&$alist)
 {
     if (!$this->isLocalhost('nname')) {
         $fqdn = getFQDNforServer($this->nname);
         //$dbadminUrl =  "http://$fqdn:7778/thirdparty/phpMyAdmin/";
         if (http_is_self_ssl()) {
             $dbadminUrl = "https://{$fqdn}:7777/thirdparty/phpMyAdmin/";
         } else {
             $dbadminUrl = "http://{$fqdn}:7778/thirdparty/phpMyAdmin/";
         }
     } else {
         $dbadminUrl = "/thirdparty/phpMyAdmin/";
     }
     //$pass = urlencode($pass);
     $server = $_SERVER['SERVER_NAME'];
     if (csa($server, ":")) {
         list($server, $port) = explode(":", $server);
     }
     try {
         $dbad = $this->getFromList('dbadmin', "mysql___{$this->syncserver}");
         $user = $dbad->dbadmin_name;
         $pass = $dbad->dbpassword;
         if (if_demo()) {
             $pass = "******";
         }
         $alist[] = create_simpleObject(array('url' => "{$dbadminUrl}?pma_username={$user}&pma_password={$pass}", 'purl' => "c=mysqldb&a=updateform&sa=phpmyadmin", 'target' => "target='_blank'"));
     } catch (Exception $e) {
     }
 }
Ejemplo n.º 3
0
function redirect_to_https()
{
    global $gbl, $sgbl, $login, $ghtml;
    if ($sgbl->is_this_slave()) {
        print "Slave Server\n";
        exit;
    }
    include_once "htmllib/phplib/lib/generallib.php";
    $port = db_get_value("general", "admin", "ser_portconfig_b");
    $port = unserialize(base64_decode($port));
    if (http_is_self_ssl()) {
        return;
    }
    if (!is_object($port)) {
        return;
    }
    if (!$port->isOn('redirectnonssl_flag')) {
        return;
    }
    $sslport = $port->sslport;
    if (!$sslport) {
        $sslport = $sgbl->__var_prog_ssl_port;
    }
    $host = $_SERVER['HTTP_HOST'];
    if (csa($host, ":")) {
        $ip = strtilfirst($host, ":");
    } else {
        $ip = $host;
    }
    header("Location: https://{$ip}:{$sslport}");
    exit;
}
Ejemplo n.º 4
0
 function getDbAdminUrl()
 {
     if (!$this->isLocalhost()) {
         $fqdn = getFQDNforServer($this->syncserver);
         if (http_is_self_ssl()) {
             return "https://{$fqdn}:7777/thirdparty/phpMyAdmin/";
         } else {
             return "http://{$fqdn}:7778/thirdparty/phpMyAdmin/";
         }
     } else {
         return "/thirdparty/phpMyAdmin/";
     }
 }