2018-07-01 22:21:48 +00:00
|
|
|
<?php
|
|
|
|
function Conectarse(){
|
2020-03-31 11:45:49 +00:00
|
|
|
@session_start();
|
2018-07-01 22:21:48 +00:00
|
|
|
if ( !isset ( $link ) ) {
|
2020-03-17 16:01:12 +00:00
|
|
|
|
2018-07-01 22:21:48 +00:00
|
|
|
@include("includes/datos.php");
|
|
|
|
if(!isset($db)) {
|
|
|
|
@include("milfs/includes/datos.php");
|
|
|
|
if(!isset($db)) {
|
2018-10-13 17:01:33 +00:00
|
|
|
@include("../milfs/includes/datos.php");
|
|
|
|
}
|
|
|
|
if(!isset($db)) {
|
|
|
|
include("../../includes/datos.php");
|
2018-07-01 22:21:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-03 10:31:18 +00:00
|
|
|
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
2018-07-01 22:21:48 +00:00
|
|
|
{
|
2019-05-03 14:27:00 +00:00
|
|
|
echo " Error conectando a la base de datos. ($servidor) ";
|
2018-07-01 22:21:48 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
/* if (!mysqli_select_db($db,$link))
|
|
|
|
{
|
|
|
|
echo "Error seleccionando la base de datos.";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
*/
|
2018-07-12 23:37:02 +00:00
|
|
|
$timestamp =time();
|
2018-07-01 22:21:48 +00:00
|
|
|
$_SESSION['path']= $path_instalacion;
|
|
|
|
$_SESSION['path_images_secure']= $path_images_secure;
|
|
|
|
$_SESSION['url']= $url;
|
|
|
|
$_SESSION['site']= $site;
|
|
|
|
$_SESSION['analizador']= "$codigo_analizador";
|
|
|
|
$_SESSION['upload_size']= $upload_size;
|
2018-07-12 23:37:02 +00:00
|
|
|
|
|
|
|
$_SESSION['timestamp']= $timestamp;
|
2020-03-17 16:01:12 +00:00
|
|
|
|
2018-07-01 22:21:48 +00:00
|
|
|
return $link;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function Conectarse_recursivo(){
|
|
|
|
if ( !isset ( $link ) ) {
|
2020-03-17 16:01:12 +00:00
|
|
|
|
2018-07-01 22:21:48 +00:00
|
|
|
@include("milfs/includes/datos.php");
|
|
|
|
if(!isset($db)) {
|
|
|
|
@include("../milfs/includes/datos.php");
|
|
|
|
if(!isset($db)) {
|
|
|
|
include("../includes/datos.php");
|
2020-03-17 16:01:12 +00:00
|
|
|
|
2018-07-01 22:21:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-03 10:31:18 +00:00
|
|
|
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
2018-07-01 22:21:48 +00:00
|
|
|
{
|
2019-04-29 16:17:06 +00:00
|
|
|
echo "Error conectando a la base de datos. ";
|
2018-07-01 22:21:48 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
/* if (!mysqli_select_db($db,$link))
|
|
|
|
{
|
|
|
|
echo "Error seleccionando la base de datos.";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
*/
|
2018-07-12 23:37:02 +00:00
|
|
|
$timestamp =time();
|
|
|
|
|
2018-07-01 22:21:48 +00:00
|
|
|
$_SESSION['path']= $path_instalacion;
|
|
|
|
$_SESSION['path_images_secure']= $path_images_secure;
|
|
|
|
$_SESSION['url']= $url;
|
|
|
|
$_SESSION['site']= $site;
|
|
|
|
$_SESSION['analizador']= "$codigo_analizador";
|
2018-07-12 23:37:02 +00:00
|
|
|
$_SESSION['timestamp']= $timestamp;
|
|
|
|
setcookie("timestamp",$timestamp);
|
2018-07-01 22:21:48 +00:00
|
|
|
return $link;
|
|
|
|
}
|
|
|
|
}
|
2018-07-12 23:37:02 +00:00
|
|
|
?>
|