<?php

ini_set('display_errors', 0);

//global varable
include("../public/include_dao.php");
require_once('../library/db_main/rb.php');


$dbhostrb = ConnectionProperty::getHost();
$dbuserrb = ConnectionProperty::getUser();
$dbpasswordrb = ConnectionProperty::getPassword();
$dbnamerb = ConnectionProperty::getDatabase();

R::setup('mysql:host=' . $dbhostrb . ';dbname=' . $dbnamerb . '', '' . $dbuserrb . '', '' . $dbpasswordrb . '');
R::exec('SET NAMES latin1');
//so I can use underscore in table's name
R::ext('xdispense', function ($type) {
    return R::getRedBean()->dispense($type);
});

putenv("api_key=s_vHueL7t@GL~ZvLWj9F;Ztqq{K&NC\w");
putenv("api_user=webApi8");
putenv("api_password=ey8yrw4r");

//echo createJWT();
?>