Jump to content

jakebur01

Members
  • Posts

    885
  • Joined

  • Last visited

Everything posted by jakebur01

  1. yea it is large. 80,000 products. I just took that default and function off for now. I don't need to add any more products I just need to move it into my mysql database so I can use it with my php shopping basket. `Jake
  2. DROP TABLE IF EXISTS `CommerceInsight_dbo`.`Item`; CREATE TABLE `CommerceInsight_dbo`.`Item` ( `CompanyNo` CHAR(2) NOT NULL, `No` CHAR(20) NOT NULL, `Descn1` VARCHAR(30) NOT NULL, `Descn2` VARCHAR(30) NOT NULL, `ItemClassCode` CHAR(3) NOT NULL, `SeqNo` VARCHAR(5) NOT NULL, `UomSmallest` CHAR(2) NOT NULL, `Uom2` CHAR(2) NOT NULL, `Uom3` CHAR(2) NOT NULL, `UomSt` CHAR(2) NOT NULL, `UomPr` CHAR(2) NOT NULL, `UomSl` CHAR(2) NOT NULL, `UomCt` CHAR(2) NOT NULL, `UomBy` CHAR(2) NOT NULL, `Cf2Sm` CHAR(10) NOT NULL, `Cf3Sm` CHAR(10) NOT NULL, `Alpha` CHAR(10) NOT NULL, `StdPack` INT(10) NOT NULL, `ManualCost` DECIMAL(19, 4) NOT NULL, `ManualCostBasis` CHAR(1) NOT NULL, `ManualCostMultiplier` DECIMAL(8, 3) NOT NULL, `CfMask` CHAR(10) NOT NULL, `GlTable` CHAR(3) NOT NULL, `VendorNo` CHAR(10) NOT NULL, `VendorItemNo` VARCHAR(30) NOT NULL, `DateLastSale` DATETIME NOT NULL, `DateLastPurchase` DATETIME NOT NULL, `DateLastPrice` DATETIME NOT NULL, `DateLastCost` DATETIME NOT NULL, `DateEstablished` DATETIME NOT NULL, `Taxable` CHAR(1) NOT NULL, `UpdateInventory` CHAR(1) NOT NULL, `SerialLots` CHAR(1) NOT NULL, `MiscSales` CHAR(1) NOT NULL, `ManufacturedItem` CHAR(1) NOT NULL, `Active` CHAR(1) NOT NULL, `MultipleUom` CHAR(1) NOT NULL, `DfltPrices` CHAR(1) NOT NULL, `WeightUom1` DECIMAL(18, 0) NOT NULL, `WeightUom2` DECIMAL(18, 0) NOT NULL, `WeightUom3` DECIMAL(18, 0) NOT NULL, `FreightClass` CHAR(3) NOT NULL, `MsdsId` CHAR(20) NOT NULL, `StdComm` DECIMAL(5, 3) NOT NULL, `SubItem1` CHAR(20) NOT NULL, `SubItem2` CHAR(20) NOT NULL, `SubItem3` CHAR(20) NOT NULL, `NotUsed2` VARCHAR(15) NOT NULL, `ModelNo` CHAR(15) NOT NULL, `DotCode` CHAR(6) NOT NULL, `ItemPriceClassCode` CHAR(3) NOT NULL, `ListPrice` DECIMAL(19, 4) NOT NULL, `Service` CHAR(1) NOT NULL, `MeteredItem` CHAR(1) NOT NULL, `Uom_Meter` CHAR(2) NOT NULL, `Track` CHAR(1) NOT NULL, `NotUsed1` CHAR(5) NOT NULL, `ModelCode` CHAR(15) NOT NULL, `SalesSvrItem` CHAR(20) NOT NULL, `PricingType` CHAR(1) NOT NULL, `PartsWtyDays` CHAR(4) NOT NULL, `LaborWtyDays` CHAR(4) NOT NULL, `Fltr` TINYINT(1) NOT NULL, `Icmun1` VARCHAR(1) NOT NULL, `Icmun2` VARCHAR(1) NOT NULL, `Icmun3` VARCHAR(1) NOT NULL, `Icmun4` VARCHAR(1) NOT NULL, `Icmun5` VARCHAR(1) NOT NULL, `Udf1` VARCHAR(50) NOT NULL, `Udf2` VARCHAR(50) NOT NULL, `Udf3` VARCHAR(50) NOT NULL, `Udf4` VARCHAR(50) NOT NULL, `Udf5` VARCHAR(50) NOT NULL, `TS` TIMESTAMP NOT NULL, `rowguid` VARCHAR(64) NOT NULL DEFAULT newid(), PRIMARY KEY (`CompanyNo`, `No`), INDEX `IX_Item_Alpha` (`CompanyNo`, `Alpha`), INDEX `IX_Item_ClassCode` (`CompanyNo`, `ItemClassCode`), INDEX `IX_Item_ModelNumber` (`CompanyNo`, `ModelNo`), INDEX `IX_Item_MsdsId` (`CompanyNo`, `MsdsId`), INDEX `IX_Item_SearchNoDescn1` (`CompanyNo`, `No`, `Descn1`), INDEX `IX_Item_VendorItemNo` (`CompanyNo`, `VendorItemNo`), INDEX `IX_Item_VendorNo` (`CompanyNo`, `VendorNo`), INDEX `IX_Item_VendorNo_ClassCode` (`CompanyNo`, `VendorNo`, `ItemClassCode`) ) ENGINE = INNODB; Here is the message it is giving me: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'newid(), PRIMARY KEY('companyNo', 'No'), INDEX 'IX_Item_Alpha'('CompanyNo' at line 76
  3. Thank you.
  4. I am migrating data from a ms sql table into mysql. I keep getting an error with this: newid() Is there another way to write this? Thanks, `Jake
  5. I want to copy a table from my ms sql database into my mysql database. If I use the migration tool to do this will this change or effect the data in my ms sql table in any way? I need to leave the data in my mssql table untouched. `Jake
  6. Thank you. I will play with that and see what happens. `Jake
  7. I will be using php and mysql alone for the shopping basket. I just need a way to retrieve the quanities out of the mssql database and update them into the mysql database regularly. There has to be a way to do it.
  8. Ok, I have two different servers in two different locations. One server has a microsoft sql database "this is at the location of the business" the database has a table of about 80,000 different products. The second server has a mysql database, this is where the shopping basket will be located. The myql database will have the same table as the microsoft sql table has with all of the products. My problem is that I need to update the quanities in the mysql database regularly. The product item table on the microsoft sql is located at the place of business and the quanities are changing all the time. My question is: Is it possible for me to take the quanities from the microsoft sql table and update them into my myql table on a regular basis? If so, any suggestions on what would be a good way to do this? `Jake
  9. This helps me see what's going on a little more clearly. I guess I just need to put some of this to use to really see what's going on. What about _get() and _set()?
  10. I have sort of hit a little wall in learning php. I have been going throught a great book called php and mysql web development. I have gotten to the part about creating classes, attributes, and operations. I was really confused about constructors and destructors. Could someone please break down for me the structure of a class? `Jake
  11. I see what your saying. Thank you for taking the time to help me. `Jake
  12. This is what it returned when I did echo(base64_decode( around the content in functions.php: DKdbz<^IJBBYNLL[iWMBH^^@E]Iu}YVB' ]N8t=@G5YLTEQBXY;?DVL<@WS;$UH6%CXCNEUCT+7R _aeZZCQMGIW[ RC VCQUBPC@E4TX_YMfx_XO1^>QM KDBVS\ OWP[A]PMCO{eJJMB\UZL]WCCYNIUWycX[ MVV) FBWBCJVBZYFOLC ]GbfS \RGAK iZXT EF HUZAMGREL(ZETTE _\wixBX;Rl_HPQBB]RKJ*\AZUW @RH {gcJ_ XH#U]DYMV VP@VC AVJVQhoL?:=hB\UZL]WCCYNIUW[FGX^IJBB9|NLC:WX\mU=IWW2 QC]VCHYWWb@XP&DPUGVKBU[ABOBZKX}9CBS+ E 2[ELTRUGTD.................
  13. heres what it echoed back. What do I need to do from here to break it down? ob_start(); $codelock_l = "FLYU-I3XT-PA9AUS1HYJHR"; $codelock_t = base64_decode("JSA4Jl5pUDcwSDwuWip1KEcpK2psJSo1PDFCIlVjIkwiYR0nJSRWOjAsIWkwLSt1CTtQPzNBPStReiMyQ2h9IisxPCcxPU5yRTkmDXQqVigiMkMsKHE+MzRsfT9LOUIqJ1k/el80OzBFITYkaDEpKDw5QipYeHwJITNbOD0+VSxwajN2MiQwJgB3QTszSjwsUyl1bhFsKDgqKy4hPTEWbUcwPV59f04tLDZVJzIsaG9mbjEhWTkJd3taJzYXNT06XyttJToxI2I6OkBmRyo1TjskS3N6J0MpOiEtIGg8MSUPchcsPEQjbAcnJSRWOjAsIXJ7bHsTYRBmdR0eCBUUERRqcB0KewALDAQLdxZtRzA9Xn1/USI2KVogMSlo b2ZoBgZoG2UdBnZ3EnwTAxZjFxcLBRdhEXdxchp2CgJoAhoeExACZA0KHhcHFAV+CBZtRzA9Xn1/Ui48JFA6PTtob2ZoBhZiBngREXZ3IlYlMD9eKzJtFWliODE8XmQNMjJdITNKNTpzDGh9FQ8XEnckM1gnUCw9Qj5hVjQhI0Q8eWJhcj0lP3UFL1o0MXI1OVAyISAZbC0iISFrcis2Si5fNT5FeWgZOnEmUzgyPz41JGxkdUsmQz06BXQ1USgmfg86Oi0vPismMXkNa0F6fRY5JxlpcSZTODI/PjUkZXkuCT5HLyNBKi9PYWhzE2pibi4xKjssM0Y5E2V0SzckTTJ9d0QqKSE9JCEudXUZeQpufRY5JxlpOD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g6Nm51dQ87EXFvRDZhEWUgMUEjLDwvMG9sIiJFIF89dAVxJ1wuM3sVPTs6IycwKzt8BGlIfCNZJzZVOzslEWZkai41IzgqfQk8USg/WCYmW211ZwFxb2NzLzsqOjlCOlZwcFgyMVI0IzRTYWJuMDAuLSgmSj8TZXRANHQRZSInRj81MCYkb3d9I0gqWyo8XClhBGFxJ1khKmd2JSo1PDFCIlV2dhI4NU0xb3weanduP DovP3RrRSpQIj9FOCIXY3M/WCs8JCs3e253cVkhWit5EzYxTiYnOlchd2huMS4pOj5ePF5ldgN0OVspNCJCLy9xIDcnKDwnBWt/NzdMJChWL29zE2Z9PC0xLj4xJFRgCCUpXzU1TDM7cxUnPCktPygpMG5QNA=="); for ($codelock_x=0; $codelock_x < strlen($codelock_t); $codelock_x++) { $codelock_y = substr($codelock_t, $codelock_x, 1); $codelock_z = substr($codelock_l, $codelock_x % strlen($codelock_l), 1); $codelock_c .= chr(ord($codelock_y) ^ ord($codelock_z)); } eval($codelock_c);
  14. I bought some script from a lady when I was first starting out learning php. A few of the files have a lot of encoded junk in it. I cannot see any of the functions. Is there any way I could get around this or sort of convert all this encoded stuff to something I can look at and work with? Example: codelock.php <?php eval(base64_decode("b2Jfc3RhcnQoKTsgJGNvZGVsb2NrX2wgPSAiRkxZVS1JM1hULVBBOUFVUzFIWUpIUiI7ICRjb2RlbG9ja190ID0gYmFzZTY0X2RlY29kZSgiSlNBNEpsNXBVRGN3U0R3dVdpcDFLRWNwSzJwc0pTbzFQREZDSWxWaklrd2lZUjBuSlNSV09qQXNJV2t3TFN0MUNUdFFQek5CUFN0UmVpTXlRMmg5SWlzeFBDY3hQVTV5UlRrbURYUXFWaWdpTWtNc0tIRStNelJzZlQ5TE9VSXFKMWsvZWw4ME96QkZJVFlrYURFcEtEdzVRaXBZZUh3SklUTmJPRDArVlN4d2FqTjJNaVF3SmdCM1FUc3pTandzVXlsMWJoRnNLRGdxS3k0aFBURVdiVWN3UFY1OWYwNHRMRFpWSnpJc2FHOW1iakVoV1RrSmQzdGFK.................................... functions.php <?php if(file_exists('codelock.php')) {require_once('codelock.php'); $codelock_lock = new codelock(__FILE__); eval($codelock_lock->output());} return 1;?> REtkYno8XkkdSkJCHRtZTkxMW0lXHU0ZF0IdSF5eH0BFXRhJdX1ZVkInCg4JXU4dFjgHHQYBEhMWdD0cQEc1WUwdVBZFURkHA0JYWTs/RFZMPBVAD1dTOyQXFFUGBEgZAhU2JUNYQ04ERVUeQ1QrN1IGFwpfFRlhZR9aFFpDUU1HSVdbCgRSHxtDCVYBQwMDURcVHhlVQlAdFkMFEEBFFjRUWBYFEF9Z............................................... Thank you, Jake
  15. $values = "'$cat'"; $cols = "category"; $id = db_insert ("cats", $cols, $values);
  16. How do I pass a variable from one page to the other? I have information stored in a variable on one page and I need it passed to the next. I am already passing one variable through the url echo "<a href=\"maptest.php?id=".$myrow[id]."\"><img src='../Images/globe.gif'/></a>"; but i need to pass another `Jake
  17. I got my google map working here. I was trying to add an info window to it. When I enter my variable $Address in all I get back is null. I had to do that urlencode on my variable earlier in the script. How can I pass my variable down correctly so I will be able to display my info in the info window? <?php // Your Google Maps API key $key = "mykey"; // Connect to the MySQL database $conn = mysql_connect("localhost", "myuser", "mypass"); // Select the database $db = mysql_select_db("mydb"); // Query the table $query = "SELECT id, Address, City, State FROM smithssc WHERE id=$id"; $result = mysql_query($query) or die(mysql_error()); // Loop through each row, submit HTTP request, output coordinates while (list($id, $Address, $City, $State) = mysql_fetch_row($result)) { $mapaddress = urlencode("$Address $City $State"); // Desired address $url = "http://maps.google.com/maps/geo?q=$mapaddress&output=xml&key=$key"; // Retrieve the URL contents $page = file_get_contents($url); // Parse the returned XML file $xml = new SimpleXMLElement($page); // Parse the coordinate string list($longitude, $latitude, $altitude) = explode(",", $xml->Response->Placemark->Point->coordinates); // Output the coordinates //echo "latitude: $latitude, longitude: $longitude <br />"; } ?> <script src="http://maps.google.com/maps?file=api&v=2&key=mykey" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GMapTypeControl()); map.addControl(new GLargeMapControl()); map.setCenter(new GLatLng(<?php echo"$latitude"; ?>,<?php echo "$longitude"; ?>), 14); map.openInfoWindow(map.getCenter(), document.createTextNode(<?php echo"$Address"; ?>)); } } //]]> </script>
  18. OHMAN! It worked like a charm! Thanks for taking the time to help me. `Jake
  19. still no view with this map.setCenter(new GLatLng(<?php = $latitude ?>, <?php = $longitude ?>), 13);
  20. i'm trying to get my google map to work. I'm passing variables to this page so i will get a map for the correct user. I've never tried to put php inside javascript. I'm not getting a view of the map with this yet. I need some help. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps JavaScript API Example</title> <?php $key = "mykey"; $conn = mysql_connect("localhost", "myuser", "mypass"); $db = mysql_select_db("jhearnsberger"); $query = "SELECT id, Address, City, State FROM smithssc WHERE id=$id"; $result = mysql_query($query) or die(mysql_error()); while (list($id, $Address, $City, $State) = mysql_fetch_row($result)) { $mapaddress = urlencode("$Address $City $State"); $url = "http://maps.google.com/maps/geo?q=$mapaddress&output=xml&key=$key"; $page = file_get_contents($url); $xml = new SimpleXMLElement($page); list($longitude, $latitude, $altitude) = explode(",", $xml->Response->Placemark->Point->coordinates); //echo "latitude: $latitude, longitude: $longitude <br />"; } ?> <script src="http://maps.google.com/maps?file=api&v=2&key=mykey" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(<?php $latitude ?>, <?php $longitude ?>), 13); } } //]]> </script> </head> <body onload="load()" onunload="GUnload()"> <div id="map" style="width: 500px; height: 300px"></div> </body> </html>
  21. I can't keep my columns at a fixed width. About every five rows that are returned the last couple of columns will scrunch in. How do I keep everything perfectly aligned? foreach ($zips as $key => $value) { "Zip code <b>$key</b> is <b>$value</b> miles away from <b>$formzip</b>.<br />"; echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5>"; $result = mysql_query("SELECT * FROM smithssc WHERE Zip = '$key' AND $productselect = 1", $db) or die(mysql_error()); while($myrow = mysql_fetch_array ($result)) { //<img src='../Images/globe.gif'/> echo"<tr><TD WIDTH=154><bold><small>"; echo$myrow["Dealer"]; echo"</small></bold></td><TD WIDTH=117><small>"; echo$myrow["Address"]; echo"</small></td><TD WIDTH=50 ALIGN = right><small>"; echo$myrow["City"]; echo ", "; echo"</small></td><TD WIDTH=20><small>"; echo$myrow["State"]; echo"</small></td><TD WIDTH=30><small>"; echo$myrow["Zip"]; echo"</small><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>"; }
  22. <!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>
  23. It's still not redirecting. I don't know what the deal is. I am not getting any errors back.
  24. if my user does not select a radio button i want to redirect them to another page. But, it's not redirecting. Is it because its within html tags? else $URL="http://www.mysite.com/nodealerselect.html"; header ("Location: $URL");
  25. Thank you.
×
×
  • 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.