<?php
function conectaPDO()
{
    include 'config.php';

    return new PDO(
        'mysql:host='.$credenciales_db['host'].';dbname='.$credenciales_db['database'].';charset=utf8',
        $credenciales_db['user'],
        $credenciales_db['password']
    );
}

function conectaPDO_migracion()
{
    $hostname2 	= "200.35.156.219";
    $database2 	= "softnet_conta_historica";
    $username2 	= "softnet_felipel";
    $password2 	= "p}2ISdotMAmZ";

    return new PDO(
        'mysql:host='.$hostname2.';dbname='.$database2.';charset=utf8',
        $username2,
        $password2
    );
}

function conectaPDOWsdtepro()
{
    return new PDO(
        'mysql:host=cl-abstrahere-cluster.cluster-ro-cyh8fbbdaonz.us-east-1.rds.amazonaws.com;dbname=wsdtepro;charset=utf8',
        'user_softnet',
        'NEpI6EMaQiNi'
    );
}
/*
host antiguo abstrahere
replicaabstra2.ctwdgoejhyfw.us-east-1.rds.amazonaws.com
*/

function conectaPDOWsdteCertificacion()
{
    return new PDO(
        'mysql:host=replicaabstra2.ctwdgoejhyfw.us-east-1.rds.amazonaws.com;dbname=wsdte;charset=utf8',
        'user_softnet',
        'NEpI6EMaQiNi'
    );
}

function conecta_dev()
{

    return new PDO(
        'mysql:host=desarrollo.softnet.cl;dbname=softnet_conta;charset=utf8',
        'softnet',
        'softnet_conta'
    );
}

function conecta_local()
{

    return new PDO(
        'mysql:host=localhost;dbname=solucion_corre_folios;charset=utf8',
        'root',
        'softnet_admin'
    );
}

/*function conectaPDO_OLD()
{

    return new PDO(
        'mysql:host=200.35.156.218;dbname=bdsoftne_conta;charset=utf8',
        'bdsoftne_fcastro',
        '%JWvIV*gSMJ!'
    );
}
*/
function conectaPDO_temporal()
{

    return new PDO(
        'mysql:host=desarrollo.softnet.cl;dbname=softnet_temporal;charset=utf8',
        'root',
        'P3eMdGVG'
    );
}

function conectaPDO_ErpRespaldo()
{
    return new PDO(
        'mysql:host=desarrollo.softnet.cl;dbname=respaldo_erp_old;charset=utf8',
        'respaldo_erp_old',
        'respaldo_erp_old'
    );
}
?>
