0 ); }*/ function checkEmail($email) { // Create the syntactical validation regular expression $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"; // Presume that the email is invalid $valid = 0; // Validate the syntax if (eregi($regexp, $email)) { list($username,$domaintld) = split("@",$email); // Validate the domain if (getmxrr($domaintld,$mxrecords)) $valid = 1; } else { $valid = 0; } return $valid; } ?> 1) { $pagination .= "
1) $pagination .= "Precedente"; else $pagination .= "Precedente"; //pages if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination .= "$counter"; else $pagination .= "$counter"; } } elseif($lastpage >= 7 + ($adjacents * 2)) //enough pages to hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 3)) { for ($counter = 1; $counter < 5 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination .= "$counter"; else $pagination .= "$counter"; } $pagination .= "..."; $pagination .= "$lpm1"; $pagination .= "$lastpage"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination .= "1"; $pagination .= "2"; $pagination .= "..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination .= "$counter"; else $pagination .= "$counter"; } $pagination .= "..."; $pagination .= "$lpm1"; $pagination .= "$lastpage"; } //close to end; only hide early pages else { $pagination .= "1"; $pagination .= "2"; $pagination .= "..."; for ($counter = $lastpage - (1 + ($adjacents * 3)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination .= "$counter"; else $pagination .= "$counter"; } } } //next button if ($page <= $counter) if($page == $lastpage) { $pagination .= "Successiva"; } else { $pagination .= "Successiva"; } else $pagination .= "Successiva"; $pagination .= "
\n"; } return $pagination; } ?>