We have an issue with the redirect javascript that opens links to websites on our directories. For example, if you go to http://www.paontheweb.com/search/?query=wood+stoves&limit=10 and then click AES Hearthplace it opens a blank window (will not complete the redirect) in Chrome and Firefox. Works fine on I.E. and Safari. Pasting in our redirect.php to see if anyone can help. Lost our programmer years ago. PS we took out the email notification thing years back so I'm sure that is not needed. Just don't know exactly what to remove. Any help would be appreciated.
"; print "window.location = 'http://www.paontheweb.com' "; print ""; } $id = $_GET['id']; $referer = $_SERVER['HTTP_REFERER']; $referer = explode("?",$referer); $GET = explode("&",$referer[1]); $cat = $GET[0]; $loc = $GET[1]; $cat = explode("=",$cat); $loc = explode("=",$loc); $catID = $cat[1]; $locID = $loc[1]; $backlink = $_SERVER['HTTP_REFERER']; if (!isset($ad)) { $ad = false; } $host="localhost"; $Sqluser="paonthew_web"; $Sqlpass="paonthe#@"; $Sqldb="paonthew_data"; $db = mysql_connect($host,$Sqluser,$Sqlpass) or die("The DataBase is Down!"); mysql_select_db($Sqldb,$db) or die("I Can't connect to database!"); function validateEmail($email) { $email=strtolower($email); $regexp ="[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}"; if(ereg($regexp,$email)) { return true; } else { return false; } } if ($r==1) { $ip = $_SERVER['REMOTE_ADDR']; $date = date("m/d/Y h:i:s A"); $q = "INSERT INTO return_hits (companyID,date,ip) VALUES ('$id','$date','$ip')"; $r = mysql_query($q); header ("Location:http://www.PAontheweb.com"); } else if ($sponsor=="true") { $query = "SELECT * FROM sponsors WHERE id='$id'"; $result=mysql_query($query); while ($rows=mysql_fetch_array($result)) { $clicks=$rows['clicks']; $address = $rows['web']; $email = $rows['email']; $mail = $rows['mail']; $company = $rows['Company']; } if ($email!="") { if ($mail != "1") { if (validateEmail($email)) { $subject = "PAontheweb.com // Email Notification for ".$company; $from = "PAontheweb.com [noreply@PAontheweb.com]"; $message = "This message is from PAontheweb.com to inform you that you had a visitor at ".$address; $message.= " from your sponsored link in the PAontheweb.com online website directory.
"; $message .= "Please note: You will receive this message every time your site is visited using PAontheweb.com to show you the value of your sponsored link.
"; $message .= "Add your events to the new PAontheweb.com events calendar or look for something to do this weekend.
"; if ($type!="1") { $message .= "Consider upgrading your membership for more qualified traffic by visiting http://www.PAontheweb.com/advertising.
"; } $message .= "To stop these notifications, reply to this email with 'Remove' in the subject line.
"; $message .= "Thanks,
The PAontheweb.com Team"; // mail($email,$subject,$message,"From: " . $from . "\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1"); } else { echo $email; } } } $newclicks=$clicks+1; if ($id!="") { $ip = $_SERVER['REMOTE_ADDR']; $date = date("m/d/Y h:i:s A"); $q = "INSERT INTO hits (companyID,company,date,ip) VALUES ('$id','$company','$date','$ip')"; $r =mysql_query($q); } $query="UPDATE sponsors SET clicks='$newclicks' WHERE id = '$id'"; $result=mysql_query($query); header ("Location:$address"); } else { $query = "SELECT * FROM directory WHERE id='$id'"; $result=mysql_query($query); $rows=mysql_fetch_array($result); $id = $rows['id']; $hits=$rows['hits']; $company = $rows['company']; $address=$rows['web']; $type = $rows['type']; $email = $rows['email']; $child = $rows['child']; $mail = $rows['mail']; if ($id!="") { $ip = $_SERVER['REMOTE_ADDR']; $date = date("m/d/Y h:i:s A"); $q = "INSERT INTO hits (companyID,company,date,ip,location,catagory) VALUES ('$id','$company','$date','$ip','$locID','$catID')"; $r =mysql_query($q); } if ($type=="1") { $typeName = "Exclusive"; } else if ($type == "2") { $typeName = "Premium"; } else if ($type == "3") { $typeName = "Standard"; } else if ($type == "4") { $typeName = "Free"; } if ($email!="") { if ($mail != "1") { if (validateEmail($email)) { $subject = "PAontheweb.com // Email Notification for ".$company; $from = "PAontheweb.com [forms@PAontheweb.com]"; $message = "This message is from PAontheweb.com to inform you that you had a visitor at ".$address; $message.= " from your ".$typeName." listing in the PAontheweb.com online website directory.
"; $message .= "Please note: You will receive this message every time your site is visited using PAontheweb.com to show you the value of your ".$typeName." listing.
"; $message .= "Add your events to the new PAontheweb.com events calendar or look for something to do this weekend.
"; if ($type!="1") { $message .= "Consider upgrading your membership for more qualified traffic by visiting http://www.PAontheweb.com/advertising.
"; } $message .= "To stop these notifications, reply to this email with 'Remove' in the subject line.
"; $message .= "Thanks,
The PAontheweb.com Team"; //mail($email,$subject,$message,"From: " . $from . "\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=iso-8859-1"); } else { echo $email; } } } if ($child!='') { $query = "SELECT * FROM directory WHERE company LIKE '%$company%' AND web LIKE '$address%' AND child'true'"; $result=mysql_query($query); while ($rows=mysql_fetch_array($result)) { $id2 = $rows['id']; $hits=$rows['hits']; $newhits=$hits+1; $query="UPDATE directory SET hits='$newhits' WHERE id = '$id2'"; $result=mysql_query($query); } } else { $newhits=$hits+1; $query="UPDATE directory SET hits='$newhits' WHERE id = '$id'"; $result=mysql_query($query); } if ($type != '') { print ""; print "window.location = '{$address}' "; print ""; } else { $company=stripslashes($company); ?> " name="topFrame" scrolling="NO" noresize > " name="mainFrame"> _qoptions={ qacct:"p-e46O2_29tW__g" };
Aucun commentaire:
Enregistrer un commentaire