Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /srv/vhost/locations-vacances-costabrava.com/home/html/include/conn.php on line 8
/* Datos de acceso para la conexiσn con el servidor MySQL */
// finquesfrigola.com
//$link=mysql_connect("llxe948.servidoresdns.net", "qfi982","Ff258Calella");
//$db ="qfi982";// Elecciσn de la base de datos que se utilizarα en el servidor
//fincasfrigola.com
$link=mysql_connect("mysql.apartvillas.com", "qfi982","Ff258Calella");
$db ="qfi982";// Elecciσn de la base de datos que se utilizarα en el servidor
?>
/* Funciones para una interfaz de base de datos simple */
/* ---------------------------------------------------- */
function send_sql($db, $sql)
{
if (! $res=mysql_db_query($db, $sql))
{
echo mysql_error();
exit;
}
return $res;
}
function tab_out($result)
{
$cant=mysql_num_fields($result);
$ancho=100/$cant."%";
echo "
";
for ($k=0;$k<$cant;$k++)
{
$fn=mysql_field_name($result,$k);
echo "
$row[$fn]
" ;
}
echo "
";
echo "
";
}
echo "
";
}
// Show an error and stop the script
function showerror()
{
if (mysql_error())
die("Error " . mysql_errno() . " : " . mysql_error());
else
die("Could not connect to the DBMS");
}
// Secure the user data by escaping characters
// and shortening the input string
function clean($input, $maxlength)
{
$input = substr($input, 0, $maxlength);
$input = EscapeShellCmd($input);
return ($input);
}
function comprobar_email($email){
$mail_correcto = 0;
//compruebo unas cosas primeras
if ((strlen($email) >= 6) && (substr_count($email,"@") == 1) && (substr($email,0,1) != "@") && (substr($email,strlen($email)-1,1) != "@")){
if ((!strstr($email,"'")) && (!strstr($email,"\"")) && (!strstr($email,"\\")) && (!strstr($email,"\$")) && (!strstr($email," "))) {
//miro si tiene caracter .
if (substr_count($email,".")>= 1){
//obtengo la terminacion del dominio
$term_dom = substr(strrchr ($email, '.'),1);
//compruebo que la terminaciσn del dominio sea correcta
if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,"@")) ){
//compruebo que lo de antes del dominio sea correcto
$antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1);
$caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1);
if ($caracter_ult != "@" && $caracter_ult != "."){
$mail_correcto = 1;
}
}
}
}
}
if ($mail_correcto)
return 1;
else
return 0;
}
?>
GuΓa de Hotels de TOSSA DE MAR, Costa Brava
/* Datos de acceso para la conexiσn con el servidor MySQL */
// finquesfrigola.com
//$link=mysql_connect("llxe948.servidoresdns.net", "qfi982","Ff258Calella");
//$db ="qfi982";// Elecciσn de la base de datos que se utilizarα en el servidor
//fincasfrigola.com
$link=mysql_connect("mysql.apartvillas.com", "qfi982","Ff258Calella");
$db ="qfi982";// Elecciσn de la base de datos que se utilizarα en el servidor
?>