Jump to content

[SOLVED] page not redirecting


jakebur01

Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/SmithsTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Smiths South-Central Sales Company</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {font-size: xx-large}
.style3 {color: #E0DFE3}
.style12 {font-size: 9px; color: #FFFFFF; }
.style13 {
font-size: 9;
color: #FFFFFF;
}
.style17 {color: #0077D4}
.style18 {color: #FFFFFF; font-size: 14px; }
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!-- InstanceBeginEditable name="head" -->
<SCRIPT LANGUAGE="JavaScript1.1">


<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
//  End -->
</script>


<!-- InstanceEndEditable -->
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head><link rel="shortcut icon" href="/favicon.ico" >



<body onload="MM_preloadImages('../Images/homebutton2.gif','../Images/dealerloginbutton2.gif','../Images/productlinesbutton2.gif','../Images/ourstaffbutton2.gif','../Images/custservicebutton2.gif','../Images/orderonlinebutton2.gif','../Images/contactusbutton2.gif','../Images/dealerbutton2.gif')">
<table width="801" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="57" colspan="4" valign="top" background="../Images/header.gif"><div align="right"> 
      <p><FONT COLOR="#FFFFFF"><script language="javascript">
<!-- 
Today = new Date();
TodayDay = Today.getDate();
TodayMon = Today.getMonth();
TodayYear = Today.getYear();
if (TodayYear < 2000) TodayYear += 1900;

if (TodayMon == 0) { TodayMonth = "January"; } 
else if (TodayMon == 1) { TodayMonth = "February"; }
else if (TodayMon == 2) { TodayMonth = "March"; }
else if (TodayMon == 3) { TodayMonth = "April"; }
else if (TodayMon == 4) { TodayMonth = "May"; }
else if (TodayMon == 5) { TodayMonth = "June"; }
else if (TodayMon == 6) { TodayMonth = "July"; }
else if (TodayMon == 7) { TodayMonth = "August"; }
else if (TodayMon ==  { TodayMonth = "September"; }
else if (TodayMon == 9) { TodayMonth = "October"; }
else if (TodayMon == 10) { TodayMonth = "November"; }
else if (TodayMon == 11) { TodayMonth = "December"; }
else { TodayMonth = TodayMon; }

document.write(TodayMonth + " " + TodayDay + ", " + TodayYear);

-->
</script>
        </FONT>
        <span class="style3"></span>  <span class="style1"></span>  <span class="style2"></span>  <span class="style1"></span> 
        <span class="style12"><span class="style17">-----</span>------</span><span class="style13">-----------</span> </p>
    </div></td>
    <td width="1"></td>
  </tr>
  <tr>
    <td colspan="2" rowspan="2" valign="top"><img src="../Images/smith-logo.gif" width="185" height="124" /></td>
    <td width="4" height="7"></td>
    <td width="602"></td>
    <td></td>
  </tr>
  <tr>
    <td rowspan="3" valign="top" bgcolor="#0066FF"><!--DWLayoutEmptyCell--> </td>
    <td rowspan="3" valign="top" bgcolor="#FFFFFF"><div align="left"><!-- InstanceBeginEditable name="body" -->


<div style=" width:600px; height:510px; overflow:auto;">
<table width="580" border="0">
      <tr>
        <td><?php



require_once('zipcode.class.php');      // zip code class

$formzip = $_POST['formzip'];
$find = $_POST['dform'];

$productform = $_POST['productform'];


if($find == 'd5')
$formrange = 5;

elseif($find == 'd15')
$formrange = 15;


elseif($find == 'd25')
$formrange = 25;

elseif($find == 'd50')
$formrange = 50;

else
echo '<p>No Miles.</p>';


if($productform == 'Shinform')
$productselect = Shin;

elseif($productform == 'Littleform')
$productselect = Little;

elseif($productform == 'Manform')
$productselect = Man;

elseif($productform == 'Smithform')
$productselect = Smith;

elseif ($productform == 'Classform')
$productselect = Classin;

elseif($productform == 'OregonOform')
$productselect = OregonO;

elseif($productform == 'OregonFform')
$productselect = OregonF;

elseif($productform == 'Troyform')
$productselect = Troy;

elseif($productform == 'Whiteform')
$productselect = White;

elseif($productform == 'Trenchform')
$productselect = Trench;

else{
header ("Location: http://www.mysite.com/nodealerselect.html");
}

$db = mysql_connect('localhost','','') or die(mysql_error()); 
mysql_select_db('') or die(mysql_error()); 





//echo '<h3>A sample calculating the distance between 2 zip codes: 93001 and 60618</h3>';

$z = new zipcode_class;
$miles = $z->get_distance($formzip, 98501);
  
	  
if ($miles === false) echo 'Error: '.$z->last_error;
else //echo "Zip code <b>97214</b> is <b>$miles</b> miles away from <b>98501</b>.<br />";




//echo '<h3>A sample getting all the zip codes withing a range: 2 miles from 97214</h3>';

$zips = $z->get_zips_in_range($formzip, $formrange, _ZIPS_SORT_BY_DISTANCE_ASC, true); 


if ($zips === false) echo 'Error: '.$z->last_error;
else {
    echo"<table width=580 border=0>";
    echo"<tr>";
            echo"<td width=154 bordercolor=#0066FF bgcolor=#0066FF><div align=center><span class=style1><strong>Dealer</strong></span></div></td>";
           echo" <td width=117 bordercolor=#0066FF bgcolor=#0066FF><div align=center><span class=style1><strong>Address</strong></span></div></td>";
            echo"<td width=100 bordercolor=#0066FF bgcolor=#0066FF><div align=center><span class=style1><strong>City</strong></span></div></td>";
            echo"<td width=66 bordercolor=#0066FF bgcolor=#0066FF><div align=center><span class=style1><strong>State</strong></span></div></td>";
           echo "<td width=58 bordercolor=#0066FF bgcolor=#0066FF><div align=center><span class=style1><strong>Zip</strong></span></div></td>";
          echo"</tr>";
	  echo"</table>";
foreach ($zips as $key => $value) {
"Zip code <b>$key</b> is <b>$value</b> miles away from <b>$formzip</b>.<br />";
  
  //addin
  
  $result = mysql_query("SELECT * FROM smithssc WHERE Zip = '$key'", $db) or die(mysql_error());
  
  
echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10>";

while($myrow = mysql_fetch_array ($result))
{

echo"<tr><TD WIDTH=154><b>";
echo$myrow["Dealer"];
echo"</b></td><TD WIDTH=117>";
echo$myrow["Address"];
echo"</td><TD WIDTH=100 ALIGN = right>";
echo$myrow["City"];
echo ", ";
echo"</td><TD WIDTH=66>";
echo$myrow["State"];

echo"</td><TD WIDTH=58>";
echo$myrow["Zip"];

echo"<td>";
//echo "Zip code <b>$key</b> is <b>$value</b> miles away from <b>97214</b>.<br />";
//echo " This Dealer is <b>$value</b> miles away from <b>97214</>.<br />";


echo"</td></tr>";
}

echo "</table>";
  

  
  

   }
   


   
   echo "<br /><i>Smiths Dealer Access v1.4 executed in <b>".$z->last_time."</b> seconds.</i><br />";
}



echo "<h3>Details about your Zip Code: $formzip</h3>";

$details = $z->get_zip_details($formzip);

if ($details === false) echo 'Error: '.$z->last_error;
else {
   foreach ($details as $key => $value) {
      $key = str_replace('_',' ',$key);
      $key = ucwords($key);
      echo "$key: $value<br />";
  
   } 
}



?>
          <p> </p>          </td></tr>
    </table>
</div>


<!-- InstanceEndEditable --></div>      <div align="center"></div></td>
    <td height="121"></td>
  </tr>
  
  <tr>
    <td height="163" colspan="2" valign="top"><div align="left"><a href="../index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','../Images/homebutton2.gif',1)"><img src="../Images/homebutton1.gif" name="Image1" width="190" height="21" border="0" id="Image1" /></a></div>
      <!--DW<div align="left"></div>LayoutEmptyCell-->
      <a href="http://www.smithsadvantage.com/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','../Images/dealerloginbutton2.gif',1)"><img src="../Images/dealerloginbutton1.gif" name="Image2" width="190" height="21" border="0" id="Image2" /></a>
      <div align="left"><a href="../productlines.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','../Images/productlinesbutton2.gif',1)"><img src="../Images/productlinesbutton1.gif" name="Image3" width="190" height="21" border="0" id="Image3" /></a></div>
      <div align="left"><a href="../ourstaff.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','../Images/ourstaffbutton2.gif',1)"><img src="../Images/ourstaffbutton1.gif" name="Image4" width="190" height="21" border="0" id="Image4" /></a></div>
      <div align="left"><a href="../customerservice.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','../Images/custservicebutton2.gif',1)"><img src="../Images/custservicebutton1.gif" name="Image5" width="190" height="21" border="0" id="Image5" /></a></div>
      <div align="left"><a href="http://www.smithsadvantage.com/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','../Images/orderonlinebutton2.gif',1)"></a></div>
    <div align="left"><a href="../contactus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','../Images/contactusbutton2.gif',1)"><img src="../Images/contactusbutton1.gif" name="Image7" width="190" height="22" border="0" id="Image7" /></a></div>      <div align="left"><a href="../dealerlocator.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../Images/dealerbutton2.gif',1)"><img src="../Images/dealerbutton1.gif" name="Image8" width="190" height="21" border="0" id="Image8" /></a></div></td>
    <td></td>
  </tr>
  
  <tr>
    <td width="186" height="207" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','190','height','210','align','top','src','../flash/logochangerJTH','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../flash/logochangerJTH' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="190" height="210" align="top">
        <param name="movie" value="../flash/logochangerJTH.swf" />
        <param name="quality" value="high" />
        <embed src="../flash/logochangerJTH.swf" width="190" height="210" align="top" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
      </object></noscript></td>
  <td width="8"></td>
    <td></td>
  </tr>
  
  <tr>
    <td height="151" colspan="4" valign="top" bgcolor="#0077D4"><div align="center">
      <table width="790" border="0">
        <tr>
          <td width="255"><div>
            <div align="center"><span class="style1">Get "IN THE KNOW" of the latest products and the hottest deals! Sign up for our future monthly E-Newsletter! </span>            </div>
              <div>
                <form id="form1" name="form1" method="post" action="../newsletter/newsletter.php">
                  <span class="style1">
                    <label>Name
                    <input name="textfield" type="text" />
                    </label>
                    </span>
                  <div align="left"></div>
                  <div> <span class="style1">
                    <label>E-Mail</label>
                    </span>
                    <span class="style1">
                      <label>
                      <input name="textfield2" type="text" />
                      </label>
                      <input type="submit" name="Submit" value="Submit" />
                      </span>
                    <div>
                      <label></label>
                      </div>
                  </div>
                </form>
              </div>
            </div></td>
            <td width="525"><p align="center" class="style18">Copyright (c) 2007 Smiths South-Central Sales Co., Inc. All rights reserved.</p>
              <div>
                <div align="center"><span class="style18"><span class="style17">-</span>Terms of Sale | Privacy | Legal </span> </div>
              </div>
              <p align="center" class="style1"><span class="style17">-------<a href="http://www.adobe.com/products/acrobat/readstep2.html?c=us" ><img src="../Images/get_adobe_reader%5B1%5D.gif" alt="adobe" width="112" height="33" border="0" /></a>-------</span><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW"><img src="../Images/get_flash_player%5B1%5D.gif" alt="flash" width="88" height="31" border="0" /></a><span class="style17">------</span> <font color="#000000" size="2" face="Arial">
                <script>
var txt = "<img src='Images/bookmark.gif' width='112' height='33' border='0'>"
var url = "http://www.smithssc.com";
var who = "Smiths South- Central Sales Company"
var ver = navigator.appName
var num = parseInt(navigator.appVersion)
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
   document.write('<A HREF="javascript:window.external.AddFavorite(url,who);" ');
   document.write('onMouseOver=" window.status=')
   document.write("txt; return true ")
   document.write('"onMouseOut=" window.status=')
   document.write("' '; return true ")
   document.write('">'+ txt + '</a>')
}else{
   txt += "  (Ctrl+D)"
   document.write(txt)
} 
            </script>
            </font></p></td>
          </tr>
        </table>
        <p align="center" class="style1"> </p>
    </div></td>
    <td></td>
  </tr>
  <tr>
    <td height="605"> </td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>

<div align="left"></div>
<div align="center">
  <map name="history" id="history">
    <area shape="rect" coords="112,123,382,149" href="#" />
  </map>
</div>
</body>
<!-- InstanceEnd --></html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.