forked from qwerty/milfs
74 lines
1.7 KiB
PHP
74 lines
1.7 KiB
PHP
<?php
|
|
function Conectarse(){
|
|
if ( !isset ( $link ) ) {
|
|
|
|
@include("includes/datos.php");
|
|
if(!isset($db)) {
|
|
@include("milfs/includes/datos.php");
|
|
if(!isset($db)) {
|
|
include("../milfs/includes/datos.php");
|
|
}
|
|
}
|
|
|
|
|
|
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
|
{
|
|
echo "Error conectando a la base de datos. ";
|
|
exit();
|
|
}
|
|
/* if (!mysqli_select_db($db,$link))
|
|
{
|
|
echo "Error seleccionando la base de datos.";
|
|
exit();
|
|
}
|
|
*/
|
|
$timestamp =time();
|
|
$_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;
|
|
|
|
$_SESSION['timestamp']= $timestamp;
|
|
|
|
return $link;
|
|
}
|
|
}
|
|
function Conectarse_recursivo(){
|
|
if ( !isset ( $link ) ) {
|
|
|
|
@include("milfs/includes/datos.php");
|
|
if(!isset($db)) {
|
|
@include("../milfs/includes/datos.php");
|
|
if(!isset($db)) {
|
|
include("../includes/datos.php");
|
|
|
|
}
|
|
}
|
|
|
|
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
|
{
|
|
echo "Error conectando a la base de datos. $servidor,$usuario,$password,$db ";
|
|
exit();
|
|
}
|
|
/* if (!mysqli_select_db($db,$link))
|
|
{
|
|
echo "Error seleccionando la base de datos.";
|
|
exit();
|
|
}
|
|
*/
|
|
$timestamp =time();
|
|
|
|
$_SESSION['path']= $path_instalacion;
|
|
$_SESSION['path_images_secure']= $path_images_secure;
|
|
$_SESSION['url']= $url;
|
|
$_SESSION['site']= $site;
|
|
$_SESSION['analizador']= "$codigo_analizador";
|
|
$_SESSION['timestamp']= $timestamp;
|
|
setcookie("timestamp",$timestamp);
|
|
return $link;
|
|
}
|
|
}
|
|
?>
|