<?php

/**
 *          ****************************************************************************
 *          **********************||  PORTALES PANEL ADMINISTRATIVO ||******************
 *          ****************************************************************************
 * 
 *          @date               2019-11-15
 *          @author             Bayman Burton <bayman@burtonservers.com>
 *          @copyright          2019-2020 Burton Technology https://burtonservers.com
 *          @license            https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License (GPL v3)
 *          International Registered Trademark & Property of Burton Technology  https://burtonservers.com
 * 
 *          This source file is subject to the GNU General Public License (GPL v3)
 *          that is bundled with this package in the file LICENSE.txt.
 *          It is also available through the world-wide-web at this URL:
 *          https://www.gnu.org/licenses/gpl-3.0.en.html
 *          If you did not receive a copy of the license and are unable to
 *          obtain it through the world-wide-web, please send an email
 *          to dev@burtonservers.com so we can send you a copy immediately.
 *          This software is built and distributed by Burton Technology https://burtonservers.com
 *          By using this software you are Aware it is strictly prohibited its comercial distribution or 
 *          modification of any aspect of the aplication
 *
 *          Desc:
 *          Custom admin dashboard for easy lightweight SPA deployment.
 * 
 *          WARNING
 *          Please do not edit this file or the aplication could stop working as intended, also
 *          any modifications will be overwritten by newer versions in the future
 *          
 */

////////////////////////////////////////////////////////////////////////////////////DEBUG EN PANTALLA
//error_reporting(E_ALL);
//ini_set('display_errors', 1);

//// Conexion a la base de datos LOCAL
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'joinventory');

//CONEXION A DB
$c = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
if (!$c) {
    echo "Error: No hay conexión a la Base de Datos." . PHP_EOL;
    echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
    echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
    exit;
}

date_default_timezone_set('America/Guayaquil');
$svr_servidor = "PVENTADB_SRV";
$svr_base = "AGORA_2020";
$svr_usuario = "SA";
$svr_contrasena = "masterkey";
$conectioninfo = array("Database" => $svr_base, "UID" => $svr_usuario, "PWD" => $svr_contrasena, "CharacterSet" => "UTF-8");
$conexion = sqlsrv_connect($servername, $conectioninfo);
if ($conexion == false) {
    $mensaje = "Existe un error al intentar conectarse con el servidor SQLSERVER";
    exit;
}
