";
//if ($_POST ['votar']){
$id=$_POST['id'];
if ($id!=''){
$db="db392722897";
$link =mysqli_connect ("db392722897.db.1and1.com", "dbo392722897", "Lklu&&5g5ti87Y6t_@*77$$") or die ('I cannot connect to the database because: ' . mysqli_error());
mysqli_select_db($link,$db);
$url=$_SERVER['REMOTE_ADDR'];
$ver2="SELECT votos FROM agenda WHERE id='$id'" ;
$vervotos2=mysqli_query($cnx,$ver2, $link);
while($row=mysqli_fetch_array($vervotos2)){
$totalvoto=$row['votos'];
}
//if($votar){
//$ida=$_POST['ida'];
//$urlnueva=$REMOTE_ADDR;
$voto=$_POST['voto'];
$fecha=Date("d");
$tiempo=Date("H");
$ver="SELECT web,id_web,votos,dia,hora FROM votosweb WHERE id_web='$id'";
$vervotos=mysqli_query($cnx,$ver, $link);
while($row=mysqli_fetch_array($vervotos)){
$id_web=$row['id_web'];
$web=$row['web'];
$dia=$row['dia'];
$hora=$row['hora'];
$votos=$row['votos'];
if (($fecha==$dia)&&($id_web==$id)&&($web==$url)){
$error="+ $totalvoto Un voto al Dia!";
$error=$error;
$separacion="
";
echo $error;
exit;
// Devuelvo el valor de la variable "error".
//echo "Usted Volvio a votar a la Imagen: "; echo $ida; echo"
";
}else{
$votost=$totalvoto+1;
$actualizar="UPDATE votosweb SET web='".$_SERVER['REMOTE_ADDR']."', votos=$votost,dia=$fecha, hora=$tiempo WHERE id_web=$id" ;
mysqli_query($cnx,$actualizar, $link);
$ver="SELECT id,votos FROM agenda WHERE id='$id'";
$vervotos=mysqli_query($cnx,$ver, $link);
$row=mysqli_fetch_array($vervotos);
$votos=$row['votos'];
$votost=$totalvoto+1;
$actualizarsys="UPDATE agenda SET votos=$votost WHERE id=$id" ;
mysqli_query($cnx,$actualizarsys, $link);
// Devuelvo el valor de la variable "error".
$ver2="SELECT votos FROM agenda WHERE id='$id'" ;
$vervotos2=mysqli_query($cnx,$ver2, $link);
while($row=mysqli_fetch_array($vervotos2)){
$totalvoto=$row['votos'];
}
$separacion="
";
$error1="+ $totalvoto";
echo $error1;
}
}
mysqli_close($link);
}
?>
Rental Apartments in Benidorm. In Benidorm you can find many offers to rent apartments with one or two bedrooms for example that comes in handy if you're going to take the kids on vacation. There are rental apartments with hotel services where you can have lunch, dinner and even go to the club if you're renting an apartment. The apartments in Benidorm that are close to the Levante beach are ideal for a holiday with children and that near the apartments are cone Aqualand theme parks, Terra Mitica and MundoMar. Enjoy with the family in the rental apartments in Benidorm and spends a great holiday.