2015-07-11 14:50:39 +00:00
|
|
|
<?php
|
|
|
|
function Conectarse(){
|
|
|
|
if ( !isset ( $link ) ) {
|
|
|
|
|
2015-11-21 11:24:53 +00:00
|
|
|
@include("includes/datos.php");
|
2015-07-11 14:50:39 +00:00
|
|
|
if(!isset($db)) {
|
2015-12-04 00:41:25 +00:00
|
|
|
include("milfs/includes/datos.php");
|
2015-07-11 14:50:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!($link=mysql_connect($servidor,$usuario,$password)))
|
|
|
|
{
|
|
|
|
echo "Error conectando a la base de datos.";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
if (!mysql_select_db($db,$link))
|
|
|
|
{
|
|
|
|
echo "Error seleccionando la base de datos.";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
$_SESSION['path']= $path_instalacion;
|
|
|
|
$_SESSION['path_images_secure']= $path_images_secure;
|
|
|
|
$_SESSION['url']= $url;
|
2015-11-21 11:24:53 +00:00
|
|
|
$_SESSION['site']= $site;
|
|
|
|
$_SESSION['analizador']= "$codigo_analizador";
|
2015-07-11 14:50:39 +00:00
|
|
|
$_SESSION['upload_size']= $upload_size;
|
|
|
|
return $link;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|