<?php
// function sql_connect($host,$user,$pass)
{
	include('../_cfg/config1.php');
    
   
   if(empty($phost)){$phost='vcrxol.com';}
   $hostname=substr($phost,0,strpos($phost,'.'));

   if(empty($pempr)){$pempr=$cfg_empr;}

   $hostip='192.185.41.206';
   if(mb_stristr($phost,'vcrxol')){$hostip='192.185.41.206';}
   if(mb_stristr($phost,'yotefio')){$hostip='108.167.161.55';}

   if(empty($puser)){$puser=$hostname.'_userfull';}
   if(!mb_stristr($puser,$hostname)){$puser=$hostname.'_'.$puser;}

   if(empty($ppass)){$ppass='vicore1976';}
//    if(empty($pass)){$pass='Pulso2020*';}

   $link_data=mysql_connect($phost,$puser,$ppass);
   //   $link_data=mysqli_connect($host,$user,$pass);

   if(!$link_data)
   {$link_data=mysql_connect($hostip,$puser,$ppass);}
   
   if(!$link_data)
   {echo msg_error('ERROR SQLCONNECT : '.$host.' : '.$user);}
   
   if($link_data)
   {mysql_select_db($hostname.'_'.$pempr,$link_data)}
   
   return $link_data;
  
}

?>


