
<?php 
session_start();
$xkd_aplikasi = $_SESSION['xkd_aplikasi'];
echo $xkd_aplikasi ;

if ($xkd_aplikasi = 'MITRAKOP') {
    // deklarasi parameter koneksi database
        $koneksi = mysqli_connect("mitrakoperasi.com", "mitrakop_kopdes_us_01_001_001", "Paktris4464100%" ,"mitrakop_kopdes_01_001_001");
        $mysqli = mysqli_connect("mitrakoperasi.com", "mitrakop_kopdes_us_01_001_001", "Paktris4464100%" ,"mitrakop_kopdes_01_001_001");
        
        // deklarasi parameter koneksi database
        $server   = "mitrakoperasi.com";
        $username = "mitrakop_kopdes_us_01_001_001";
        $password = "Paktris4464100%";
        $database = "mitrakop_kopdes_01_001_001";
        
        // koneksi database
        $mysqli = new mysqli($server, $username, $password, $database);
        
        // cek koneksi
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
        }
        
        $username = "mitrakop_kopdes_us_01_001_001";
        $password = "Paktris4464100%";
        $hostname = "mitrakoperasi.com";
        $dbname   = "mitrakop_kopdes_01_001_001";
        
        $koneksi = mysqli_connect($hostname, $username, $password ,$dbname);   
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
            
            echo $xkd_aplikasi ;
            
            die('Koneksi Database Gagal ke SERVER database '.$kodene.'');
        }       
    $_SESSION['hosting']=$server;    
}

if ($xkd_aplikasi = 'KAPAGUSW') {
    // deklarasi parameter koneksi database
        $koneksi = mysqli_connect("kapaguswahjono.com", "kapagusw_kopdes_us_02_002_002", "Paktris4464100%" ,"kapagusw_kopdes_02_002_002");
        $mysqli = mysqli_connect("kapaguswahjono.com", "kapagusw_kopdes_us_02_002_002", "Paktris4464100%" ,"kapagusw_kopdes_02_002_002");
        
        // deklarasi parameter koneksi database
        $server   = "kapaguswahjono.com";
        $username = "kapagusw_kopdes_us_02_002_002";
        $password = "Paktris4464100%";
        $database = "kapagusw_kopdes_02_002_002";
        
        // koneksi database
        $mysqli = new mysqli($server, $username, $password, $database);
        
        // cek koneksi
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
        }
        
        $username = "kapagusw_kopdes_us_02_002_002";
        $password = "Paktris4464100%";
        $hostname = "kapaguswahjono.com";
        $dbname   = "kapagusw_kopdes_02_002_002";
        
        $koneksi = mysqli_connect($hostname, $username, $password ,$dbname);   
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
            
            echo $xkd_aplikasi ;
            
            die('Koneksi Database Gagal ke SERVER database '.$kodene.'');
        }     
        $_SESSION['hosting']=$server;   
}


if ($xkd_aplikasi = 'SS123456789') {
    // deklarasi parameter koneksi database
        $koneksi = mysqli_connect("mitrakoperasi.com", "mitrakop_kopdes_us_01_001_001", "Paktris4464100%" ,"mitrakop_kopdes_01_001_001");
        $mysqli = mysqli_connect("mitrakoperasi.com", "mitrakop_kopdes_us_01_001_001", "Paktris4464100%" ,"mitrakop_kopdes_01_001_001");
        
        // deklarasi parameter koneksi database
        $server   = "mitrakoperasi.com";
        $username = "mitrakop_kopdes_us_01_001_001";
        $password = "Paktris4464100%";
        $database = "mitrakop_kopdes_01_001_001";
        
        // koneksi database
        $mysqli = new mysqli($server, $username, $password, $database);
        
        // cek koneksi
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
        }
        
        $username = "mitrakop_kopdes_us_01_001_001";
        $password = "Paktris4464100%";
        $hostname = "mitrakoperasi.com";
        $dbname   = "mitrakop_kopdes_01_001_001";
        
        $koneksi = mysqli_connect($hostname, $username, $password ,$dbname);   
        if ($mysqli->connect_error) {
            die('Koneksi Database Gagal : '.$mysqli->connect_error);
            
            echo $xkd_aplikasi ;
            
            die('Koneksi Database Gagal ke SERVER database '.$kodene.'');
        }   
        $_SESSION['hosting']=$server;   
}        
?>


