Jump to content

jaxdevil

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by jaxdevil

  1. Actually I figured what the call was, but I can't get it to work. Here is what I am trying now. It doesn't work, it just breaks the script and causes a blank screen: <?php $path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if ($path=="http://".$_SERVER['HTTP_HOST']) { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://$_SERVER['HTTP_HOST']/index.php?region=en\">"; } ?> <?php $path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if ($path=="http://".$_SERVER['HTTP_HOST']."/index.php") { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://$_SERVER['HTTP_HOST']/index.php?region=en\">"; } ?> <?php $path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if ($path=="http://".$_SERVER['HTTP_HOST']."/") { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://$_SERVER['HTTP_HOST']/index.php?region=en\">"; } ?> <?php $path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if ($path=="http://".$_SERVER['HTTP_HOST']."/index.php?region=") { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://$_SERVER['HTTP_HOST']/index.php?region=en\">"; } ?>
  2. I am making a function to redirect the page to http://www.myserver.com/index.php?region=en if the page is http://www.myserver.com/index.php , but I want the function to determine the url and page itself automatically, so if I change sites or urls with the script it will still verify that page. Here is what I have now... <?php if ($region=="") { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://$_SERVER['HTTP_HOST']/index.php?region=en\">"; } ?> But see, I need whatever that is thats like $_SERVER['HTTP_HOST'] but pulls up the actual pages full path, so it will check and redirect ONLY is the page is the root page, the main page. What is that thing?
  3. <?php require( $_SERVER['DOCUMENT_ROOT']."/configs/connection.php"); ?> <font style="font-size: 0.7em;" face="Tahoma"> <?php $str = file_get_contents("http://".$_SERVER['HTTP_HOST']."/text/about_us.txt"); $chunkSize = 400; $chunkedArr = str_split($str, $chunkSize); $about_us0 = print_r($chunkedArr[0]); ?> <?=$about_us0?><br> This sends back the first 400 results AND adds a numeral 1 to the end. Anyone know why that is?
  4. never mind. I figured it out: print_r($chunkedArr[0]);
  5. I found a code to do what I need but I do not know how to call each split chunk. What I need to do is split each chunk into 500 character segments and then call each section individually. Here is the code I found, but how can I call each section (i.e. [0],[1],[2], etc.)? <?php // define string $str = “The mice jumped over the cat, giggling madly ? as the moon exploded into green and purple confetti”; // define chunk size $chunkSize = 11; // split string into chunks // result: [0] = The mice ju [1] = mped over t [2] = he cat, gig // [3] = gling madly … $chunkedArr = str_split($str, $chunkSize); print_r($chunkedArr); ?>
  6. I figured it out. I needed to use the full server path on the pages I was calling via get_file_contents. Ex. below... <?php require("/home/temp/public_html/configs/connection.php"); ?> ;D
  7. I have a site setup to work off of one single page, with the individual pages as included files called based on a variable. An example is I have the header and footer, and one index.php page that includes the header and footer. The index.php page then uses if statements to pull the other pages (about us, contact, etc.) as in if the page is index.php?page=AboutUs the index.php page pulls the aboutus.php page data and displays it. Now I have a page that pulls data from the database. It works fine when i put the connection string on the page that is pulled, but I have added the connection string via a require statement on the header and removed the connection string from the actual page. When I do that it no longer works. Below is how I include the connection settings into my header.php: <?php require("configs/connection.php"); ?> The header is pulled onto the index page with the following code: <?php include "skins/1/header.php"; ?> And here is the index.php page pulling the data from the sub-pages: <? include "skins/1/header.php"; if ( $medical == "") { include "pages/en/main.php"; } if ( $medical == "AboutUs") { include "pages/en/aboutus.php"; } if ( $medical == "PrivacyPolicy") { include "pages/en/privacy.php"; } if ( $medical == "TermsofUse") { include "pages/en/termsofuse.php"; } if ( $medical == "Disclaimer") { include "pages/en/disclaimer.php"; } if ( $medical == "ContactUs") { include "pages/en/contactus.php"; } if ( $medical == "ThankYou") { include "pages/en/thankyou.php"; } if ( $medical == "ShowCat") { echo file_get_contents("http://".$_SERVER['HTTP_HOST']."/pages/en/showcat.php?cat=".$cat); } if ( $medical == "ShowSub") { echo file_get_contents("http://".$_SERVER['HTTP_HOST']."/pages/en/showsub.php?sub=".$sub."&page=".$page."&perpage=".$perpage."&orderby=".$orderby); } if ( $medical == "Shop") { echo file_get_contents("http://".$_SERVER['HTTP_HOST']."/pages/en/products.php"); } if ( $medical == "Product") { echo file_get_contents("http://".$_SERVER['HTTP_HOST']."/pages/en/product.php?code=".$code."&region=".$region); } include "skins/1/footer.php"; ?> Now when I pull the ShowSub page the script doesn't connect to the database. If I add the connection string directly to the showsub.php file it works, but when i remove it (expecting the headers require statement pulling the connection.php script to do the connecting to the database) it doesn't connect. I want to have all the scripts use on single connection string so I can modify it if needed in one place instead of all over the site. Am I doing something wrong maybe with echo'ing file_get_contents instead of including those or requiring those pages?
  8. Does that mean that there isn't any PHP in the file? I am guessing there is (in which case you DO NEED the php tags) because it seems to me that there is a fatal error in the included file that is aborting the script processing (Something like "The XML page cannot be displayed," but is being suppressed by the server?). Could you post the code in your included file? On the other hand, if there is no parsable php in your included file, you should use echo file_get_contents() instead because it is much more efficient when it knows it doesn't need to parse the file. YOU ARE A GOD! The get contents worked (see the 3rd test page http://globalrestaurantequip.com/product3.php?restaurant_equipment=GDM-3 ) THAT WAS TOO MUCH!! Thank you lemmin!!
  9. No PHP in it at all. The plain file for the link I posted is this... <tr style="" class="mfgInfo"> <td class="productDetails" width="20%"><b>Product Name:</b> </td> <td class="productDetails" align="left"><b>Glass Door Refrigerator - Radius Front - 26 Cu. Ft.</b></td> </tr> <tr style=""> <td class="productDetails" width="20%"><b>Manufacturer Name:</b> </td> <td class="productDetails" align="left">True Mfg</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product ID:</b> </td> <td class="productDetails">GDM-26RF</td> </tr> <tr style=""> <td class="productDetails"><b>Equivalents:</b> </td> <td class="productDetails">GDM26RF, FTC10, FTC-10, 9196, 598-GDM26RF, 200-GDM-26RF</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Manufacturer Part Number:</b> </td> <td class="productDetails">GDM-26RF</td> </tr> <tr style=""> <td class="productDetails"><b>Vendor Description:</b> </td> <td class="productDetails"><b>Refrigerator</b>/Merchandisers - <b>Radius</b> <b>Front</b> - 1 <b>Glass</b> <b>Door</b> - <b>26</b> <b>Cu.</b> <b>Ft.</b></td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product Notes:</b> </td> <td class="productDetails"><b>Glass</b> <b>Door</b> <b>Refrigerator</b> - <b>Radius</b> <b>Front</b> - <b>26</b> <b>Cu.</b> <b>Ft.</b></td> </tr> <tr style=""> <td class="productDetails"><b>Voltage:</b> </td> <td class="productDetails">120V/1PH</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Dimension (L x W x H):</b> </td> <td class="productDetails"> 30 x 31.25 x 78.63 </td> </tr> <tr style=""> <td class="productDetails"><b>Shipping Weight:</b> </td> <td class="productDetails">321 lbs.</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product Weight:</b> </td> <td class="productDetails">325 lbs.</td> </tr> <tr style=""> <td class="productDetails"><b>Product Cube:</b> </td> <td class="productDetails">42.66</td> </tr> But remember, I posted this with all the " with the preceding forward slashes, and still no good, and I tried with just the word "one" with no quotes and that still no good. I am sure it has something to do with how I am calling the included file, where the variable is in the code.
  10. Never mind my last response, I had the equals sign still on after the php opening tag.
  11. I *MIGHT* be getting somewhere. I did a print also, using the same full string as in the include and received an odd result back. That page is http://globalrestaurantequip.com/product3.php?restaurant_equipment=GDM-3 Now that prints out the url, but it also added a numeral 1 on the end?? What the heck is that about?? Probably the source of the problem, maybe? <?= print "http://globalrestaurantequip.com/specs/".$restaurant_equipment.".php";?>
  12. No, the php tag is not in the included file. http://globalrestaurantequip.com/product.php?restaurant_equipment=GDM-3 is a link to the page that works a duplicate page with the exact code including the include statement is at http://globalrestaurantequip.com/product2.php?restaurant_equipment=GDM-3 I also echoed the $restaurant_equipment on that page just above it.
  13. Nope. I tried with or without the table settings, it should still not break it. If I arbitrarily threw in a tr outside of its element I would have had a skewed page, not a broken page, but still, I tried adding the table beginning and table ending tags around the include which didn't change it at all. I have also tried no table tags and including a simple text file that has just one word of text contained in it, it still breaks. Trust me also, I would LOVE to have time to code properly, but I am one person handling 4 sites here, each with between 5k and 8k items on them, and constantly being changed, I don't have time to redo code or write it properly. I even do this from home (you can probably tell some of my post times are at night and in the evening) its ridiculous, for sure, but I have to work with what I have. Sorry about that.
  14. I have the trs and tds in the include file. I didn't choose to post my entire code, someone on here asked for it. Its all irrelevant actually, only line 306 is of consequence. Something is wrong with the way I am including it.
  15. <?php require('/home/global/public_html/speed_racer/php_speedy.php'); ?> <?php $db_host = "localhost"; $db_user = "xxx_xxx"; $db_pwd = "xxxxxxx"; $db_name = "xxx_xxx"; mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name) or die(mysql_error()); $query = "SELECT * FROM `products` WHERE `mod` = '$restaurant_equipment' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { $man = $row['man']; ?> <?php $unformated_price = $row['price']; $price = number_format($unformated_price, 2, '.', ','); ?> <html> <head> <title><?=$row['man'];?> <?=$restaurant_equipment?> at Global Restaurant Equipment and Supplies, Inc.</title> <script language="JavaScript" type="text/JavaScript" src="/livehelp/include/javascript.php"></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style> a { color: blue; text-decoration: none; } </style> <script language="javascript" type="text/javascript"> //<![CDATA[ var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" : "http://www.trustlogo.com/trustlogo/javascript/cot.js"; document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>'); //]]> </script> <link rel="stylesheet" href="/css/slide-out-menu-new.css" media="screen" type="text/css"></link> <script type="text/javascript" src="/js/slide-out-menu-new.js"></script> <script type="text/javascript" src="/clickcall/globalswap.js"></script> <style type="text/css"> li a {display:inline-block;} li a {display:block;} li {zoom: 1} li {align: left;} </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div id="floatLayer" align="left" style="position:absolute; left:10px; top:10px; visibility:hidden; z-index:5000;"><map name="LiveHelpInitiateChatMap" id="LiveHelpInitiateChatMap"><area shape="rect" coords="50,210,212,223" href="http://livehelp.stardevelop.com" target="_blank" alt="stardevelop.com Live Help"/><area shape="rect" coords="113,183,197,206" href="#" onclick="openLiveHelp();acceptInitiateChat();return false;" alt="Accept"/><area shape="rect" coords="206,183,285,206" href="#" onclick="declineInitiateChat();return false;" alt="Decline"/> <area shape="rect" coords="263,86,301,104" href="#" onclick="declineInitiateChat();return false;" alt="Close"/></map> <div id="InitiateText" align="center" style="position:relative; left:30px; top:145px; width:275px; height:35px; z-index:5001; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold;">Do you have any questions that I can help you with?</div><img src="/livehelp/locale/en/images/InitateChat.gif" alt="stardevelop.com Live Help" width="323" height="229" border="0" usemap="#LiveHelpInitiateChatMap"/></div> <center> <table id="Table_01" width="800" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"> <img src="images/used-restaurant-equipment.gif" width="800" height="136" alt="Used Restaurant Equipment" usemap="#Used-Restaurant-Equipment" border="0"></td> </tr> <tr> <td background="images/stretchy-back.gif" valign="top"> <table cellpadding="0" cellspacing="0" border="0"> <tr background="/images/free-live-help.gif" height="30" width="201"> <td width="201"> </td> </tr> <tr background="/images/side-box-back.gif" width="201"> <td width="201"> <div style="padding-left: 50px; padding-top: 20px; pading-bottom: 0px;"> <a href="http://www.ringcentral.com" target="Callback_RingMe" onclick='var wind = window; var winop = wind.open; winop("http://www.ringcentral.com/ringme/?uc=56594644,0,&s=no&v=2", "Callback_RingMe", "resizable=no,width=380,height=240"); return false;'><img src="/clickcall/clicktocall_bttn.gif" alt="click to call" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','/clickcall/clicktocall_bttn_over.gif',1)" id="Image13" border="0" height="59" width="59"></a> <a href="#" target="_blank" onclick="openLiveHelp(); return false"><img src="/clickcall/clicktochat_bttn.gif" alt="click to chat" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','/clickcall/clicktochat_bttn_over.gif',1)" id="Image18" border="0" height="59" width="59"></a> </div> </td> </tr> <tr background="/images/side-box-bottom.gif" height="25" width="201"> <td width="201"> </td> </tr> </table><br> <div id="leftContainer"><div id="dhtmlgoodies_menu"><img src="/images/side_menu_top.gif" border="0"><ul><?php mysql_connect('localhost','xxx_xxx','xxxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT DISTINCT `cat` FROM products ORDER BY `cat` ASC"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ ?><li><font face="Tahoma,Arial,Verdana" size="2"><a href="categories.php?action=Subcats&subcats=<?=$row['cat']?>" style="padding-left:50px;"><? $string = $row['cat']; $replacement = ' '; $pattern = '/_/'; echo preg_replace($pattern, $replacement, $string); $cat = $row['cat']; ?></a></font><ul><?php $sql2_make2 = "SELECT DISTINCT `subcat` FROM products WHERE `cat` = '$cat' ORDER BY `subcat` ASC"; $query2_make2 = mysql_query($sql2_make2); while($row2 = mysql_fetch_array($query2_make2)){ ?><li><font face="Tahoma,Arial,Verdana" size="2"><a href="restaurant.php?equipment=<?=$row2['subcat']?>"><? $string2 = $row2['subcat']; $replacement2 = ' '; $pattern2 = '/_/'; echo preg_replace($pattern2, $replacement2, $string2); ?></a></font></li><? } ?></ul><? } ?><li><font face="Tahoma,Arial,Verdana" size="2"><a href="/used.refurbished.restaurant.equipment.php" style="padding-left:50px;">Used Equipment</a></font></li><li><font face="Tahoma,Arial,Verdana" size="2"><a href="/restaurant.equipment.search.php" style="padding-left:50px;">Search Equipment</a></font></li> <img src="/images/side_menu_bottom.gif" border="0"> <br><img src="/images/contact_side_box.gif" alt="Contact Restaurant Equipment" usemap="#contact_side_box" border="0"> </div> </ul> </div> <script type="text/javascript"> document.getElementById('dhtmlgoodies_menu').style.visibility='hidden'; // Because the ads make it a little slow </script> </td> <td bgcolor="#FFFFFF" width="572" valign="top"> <table cellpadding="0" cellspacing="0" border="0" align="left"> <tr align="left"> <td align="left"> <font face="Tahoma,Arial,Verdana" size="2" STYLE="text-decoration; underline; "><a href="/">Home</a></font> | <?php mysql_connect('localhost','xxx_xxx','xxxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT DISTINCT `cat` FROM products WHERE `mod`='$restaurant_equipment' ORDER BY `cat` ASC"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ ?><font face="Tahoma,Arial,Verdana" size="2" STYLE="text-decoration; underline; "><a href="categories.php?action=Subcats&subcats=<?=$row['cat']?>"><? $string = $row['cat']; $replacement = ' '; $pattern = '/_/'; echo preg_replace($pattern, $replacement, $string); } ?></a></font> | <?php mysql_connect('localhost','xxx_xxx','xxxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT DISTINCT `subcat` FROM products WHERE `mod`='$restaurant_equipment' ORDER BY `cat` ASC"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ ?><font face="Tahoma,Arial,Verdana" size="2" STYLE="text-decoration; underline; "><a href="categories.php?action=Subcats&subcats=<?=$row['subcat']?>"><? $string = $row['subcat']; $replacement = ' '; $pattern = '/_/'; echo preg_replace($pattern, $replacement, $string); } ?></a></font> | <?php mysql_connect('localhost','xxx_xxx','xxxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT DISTINCT `man` FROM products WHERE `mod`='$restaurant_equipment' ORDER BY `cat` ASC"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ ?><font face="Tahoma,Arial,Verdana" size="2" STYLE="text-decoration; underline; "><a href="restaurant.equipment.search.results.php?searchstring=<?=$row['man']?>"><? $string = $row['man']; $replacement = ' '; $pattern = '/_/'; echo preg_replace($pattern, $replacement, $string); } ?></a></font> | <font face="Tahoma,Arial,Verdana" size="2" STYLE="text-decoration; underline; "><a href="product.php?restaurant_equipment=<?=$restaurant_equipment?>"><? $string = $restaurant_equipment; $replacement = ' '; $pattern = '/_/'; echo preg_replace($pattern, $replacement, $string); ?></a> </font> </td> </tr> </table> <br> <div style="padding-left: 3px;"> <font face=Tahoma style="font-size: 0.70em;"> <div style="padding-left: 3px; padding-right: 3px; padding-top: 5px; padding-bottom: 5px;"> <table width="380" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"> <td width="380" valign="top"> <table width="380" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="380"> <font style="font:bold 1.6em Arial, Helvetica, sans-serif; color:#94200d;"> <?=$row['mod'];?> <?=$row['name']?></font><br> <font style="font:bold 1.1em Arial, Helvetica, sans-serif; color:#0b7ecc;"> Manufactured by <?=$row['man']?></font><br> <font style="font:bold 1.1em Arial, Helvetica, sans-serif; color:#fb0909;">THIS ITEM INCLUDES WARRANTY</font><br> <font style="font:bold 1.1em Arial, Helvetica, sans-serif; color:#000000;">SPECIAL INTERNET ONLY PRICING</font> </td> </tr> <tr> <td height="3"> </td> </tr> <tr> <td width="380" background="/images/pdpricing.gif" style="background-repeat: no-repeat;" valign="middle" height="28"> <table width="380" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="100" align="left" valign="middle"> <img src="/images/blank.gif" width="10" height="1"><font style="font:bold 1.25em Arial, Helvetica, sans-serif; color:#1b3975;"> <script language="JavaScript1.2"> /* Neon Lights Text By JavaScript Kit (http://javascriptkit.com) Over 400+ free scripts here! */ var message="$<?=$price?>" var neonbasecolor="black" var neontextcolor="red" var flashspeed=100 //in milliseconds ///No need to edit below this line///// var n=0 if (document.all||document.getElementById){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>') document.write('</font>') } else document.write(message) function crossref(number){ var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number) return crossobj } function neon(){ //Change all letters to base color if (n==0){ for (m=0;m<message.length;m++) //eval("document.all.neonlight"+m).style.color=neonbasecolor crossref(m).style.color=neonbasecolor } //cycle through and change individual letters to neon color crossref(n).style.color=neontextcolor if (n<message.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",1500) return } } function beginneon(){ if (document.all||document.getElementById) flashing=setInterval("neon()",flashspeed) } beginneon() </script> </font> </td> <td width="198" align="right" valign="middle"> <font style="font:bold 0.70em Arial, Helvetica, sans-serif; color:#1b3975;"><a href="#restaurant-equipment-spec-sheet">See comparision rates below</a></font><img src="/images/blank.gif" width="30" height="1"> <?php mysql_connect('localhost','xxx_xxx','xxxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT `price` FROM products WHERE `mod`='$restaurant_equipment'"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ $raw_price = $row['price']; } ?> </td> </tr> <tr> <td colspan="2"> <br> </td> </tr> <tr> <td align="right" colspan="2"> <div class="pad5tb"><iframe src='http://globalrestaurantequip.com/eBay_Sniper_API.php?QueryKeywords=<?=$restaurant_equipment?>&PriceMin=<?=$raw_price?>' width='380' height='66' frameborder='0' scrolling='no' border='0'></iframe></div> </td> </tr> <tr> <td align="right" colspan="2"> <div class="pad5tb"><iframe src='http://globalrestaurantequip.com/Yahoo_Shop_API.php?QueryKeys=<?=$restaurant_equipment?>&MinPrice=<?=$raw_price?>' width='380' height='66' frameborder='0' scrolling='no' border='0'></iframe></div> </td> </tr> </table> </td> </tr> <tr> <td> <div style="padding-left: 2px; padding-right: 2px; padding-top: 5px;"> <font style="font:0.75em Arial, Helvetica, sans-serif; color:#000000;"> <?php $query = "SELECT `details` FROM `manufacturers` WHERE `name` = '$man' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['details']; } ?> <?php $query = "SELECT * FROM `products` WHERE `mod` = '$restaurant_equipment' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { ?> </font><br><br> <font style="font:bold 1.1em Arial, Helvetica, sans-serif; color:#94200d;"><a name="restaurant-equipment-spec-sheet">Product Specifications</a></font><br><br> <font style="font:0.75em Arial, Helvetica, sans-serif; color:#000000;"><?=$row['specs']; } ?></font> <br><br> <table> <?php include ("http://globalrestaurantequip.com/specs/".$restaurant_equipment.".php"); ?> </table <?php $query = "SELECT * FROM `products` WHERE `mod` = '$restaurant_equipment' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { ?> </div> </td> </tr> <tr> <td> <div style="padding-top: 25px;"> <a href="mailto:?&subject=Check this out&body=I found this item and thought you would be interested.%0D%0Ahttp://www.globalrestaurantequip.com/product.php?restaurant_equipment=<?=$restaurant_equipment?>"><img src="images/tellafriend.gif" border="0"></a> </div> </td> </tr> <tr> <td width="174"> <div style="display: inline;"> <form method="post" action="https://globalrestaurantequip.com/shipping.php" style="display: inline;"> <input name="Title" type="hidden" value="<?=$row['name']?>"> <input name="SerialNum" type="hidden" value="<?=$row['mod']?>"> <input name="Price" type="hidden" value="<?=$row['price']?>"> <input name="Shipping1" type="hidden" value="0.00> <input name="Shipping2" type="hidden" value="0.00"> <input name="cmd" type="hidden" id="cmd" value="1"> <input type="image" src="images/addtocart.gif" name="submit"> </form> </div> </td> </tr> <tr valign="top"> <td valign="top"> <div style="display: inline;"> <a href="mailto:&#115;&#101;&#108;&#108;&#064;&#103;&#108;&#111;&#098;&#097;&#108;&#114;&#101;&#115;&#116;&#097;&#117;&#114;&#097;&#110;&#116;&#101;&#113;&#117;&#105;&#112;&#046;&#099;&#111;&#109;?&subject=Website Inquiry"><img src="images/getmoreinfo.gif" border="0" style="display: inline;"></a> </div> </td> </tr> </table> </td> <td width="174" align="center" valign="top"> <table width="174" cellpadding="0" cellspacing="0" border="0"> <tr> <td height="10" width="174"> </td> </tr> <tr> <td> <a href="javascript: void(0)" onclick="window.open('/lpgua.gif', 'windowname3', 'width=525, height=725'); return false;"><img src="/lowpriceguarantee.gif" border="0"></a> </td> </tr> <tr> <td width="174"> <table cellpadding="0" cellspacing="0" border="0" width="174"> <tr valign="top" background="/images/mainimageerror.gif"> <td width="174" height="225" background="/productimages/<?=$restaurant_equipment?>_tn.jpg" style="background-repeat: no-repeat;"> <a href="/productimages/<?=$restaurant_equipment?>.jpg"><img src="/productimages/overlay.png" border="0" width="174"></a> </td> </tr> </td> </tr> <tr> <td height="3" width="174"> </td> </tr> <?php if ($row['pdf']=='yes') { ?> <tr> <td width="174"> <div style="padding-left:2px;"> <font style="font:bold 1em Arial, Helvetica, sans-serif; color:#8a8a8a;">PRODUCT DOCUMENTS:</font> <a href="/productdocs/<?=$row['mod']?>.pdf"><img src="/images/docs.gif" border="0" width="174"></a> </div> </td> </tr> <?php } ?> <?php if ($row['pdf']=='Yes') { ?> <tr> <td width="174"> <div style="padding-left:2px;"> <font style="font:bold 1em Arial, Helvetica, sans-serif; color:#8a8a8a;">PRODUCT DOCUMENTS:</font> <a href="/productdocs/<?=$row['mod']?>.pdf"><img src="/images/docs.gif" border="0" width="174"></a> </div> </td> </tr> <?php } ?> <tr> <td width="174"> <div style="padding-left:2px;"> <img src="/images/orderhelper1.gif" border="0" usemap="#orderhelper" width="174"><br> <form name"form2" method="post" action="https://globalrestaurantequip.com/shipping.php" style="display: inline;"> <input name="Title" type="hidden" value="<?=$row['name']?>" /> <input name="SerialNum" type="hidden" value="<?=$row['mod']?>" /> <input name="Price" type="hidden" value="<?=$row['price']?>" /> <input name="Shipping1" type="hidden" value="0.00" /> <input name="Shipping2" type="hidden" value="0.00" /> <input name="cmd" type="hidden" id="cmd" value="1" /> <input type="image" src="images/orderhelper2.gif" name="submit"> </form> </div> </td> </tr> </table> </td> </tr> <tr align="center"> <td align="center"> <a href="javascript: void(0)" onclick="window.open('/sgua.gif', 'windowname4', 'width=525, height=725'); return false;"><img src="/satisfaction.gif" border="0"></a> </td> </tr> <tr align="center"> <td align="center"> <a href="javascript: void(0)" onclick="window.open('https://secure.comodo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname=SC2&v_search=globalrestaurantequip.com&x=6&y=5', 'windowname1', 'width=550, height=700'); return false;"><img src="/SSLSeal5.gif" border="0"></a> </td> </tr> </table> </td> </tr> </table> </div> </font> </div> <br> </td> <td background="images/used-restaurant-equipment-side.gif" width="27" height="643"> </td> </tr> <tr> <td colspan="3"> <img src="images/related-restaurant-equipment.gif" width="800" height="34" alt="Featured Used Restaurant Equipment"></td> </tr> <tr> <td colspan="3" background="images/featured-restaurant-equipment-back.gif" width="800" align="center" valign="top"> <div style="padding-left: 6px;"> <center> <?php // Select total results for pagination $result = mysql_query("SELECT count(*) FROM products WHERE `specs` LIKE '%$restaurant_equipment%' OR `man` LIKE '%$restaurant_equipment%' OR `mod` LIKE '%$restaurant_equipment%' OR `name` LIKE '%$restaurant_equipment%'") or die(mysql_error()); $num_records = mysql_result($result,0,0); // Set maximum number of rows and columns $max_num_rows = 1; $max_num_columns = 4; $per_page = $max_num_columns * $max_num_rows; // Work out how many pages there are $total_pages = ceil($num_records / $per_page); // Get the current page number if (isset($_GET['page'])) $page = $_GET['page']; else $page = 1; // Work out the limit offset $start = ($page - 1) * $per_page; // Select the results we want including limit and offset $result = mysql_query("SELECT `mod` FROM products WHERE `specs` LIKE '%$restaurant_equipment%' OR `man` LIKE '%$restaurant_equipment%' OR `mod` LIKE '%$restaurant_equipment%' OR `name` LIKE '%$restaurant_equipment%' ORDER BY `mod` LIMIT $start, $per_page") or die(mysql_error()); $named = mysql_query("SELECT `name` FROM products WHERE `specs` LIKE '%$restaurant_equipment%' OR `man` LIKE '%$restaurant_equipment%' OR `mod` LIKE '%$restaurant_equipment%' OR `name` LIKE '%$restaurant_equipment%' ORDER BY `mod` LIMIT $start, $per_page") or die(mysql_error()); $maker = mysql_query("SELECT `man` FROM products WHERE `specs` LIKE '%$restaurant_equipment%' OR `man` LIKE '%$restaurant_equipment%' OR `mod` LIKE '%$restaurant_equipment%' OR `name` LIKE '%$restaurant_equipment%' ORDER BY `mod` LIMIT $start, $per_page") or die(mysql_error()); $cost = mysql_query("SELECT `price` FROM products WHERE `specs` LIKE '%$restaurant_equipment%' OR `man` LIKE '%$restaurant_equipment%' OR `mod` LIKE '%$restaurant_equipment%' OR `name` LIKE '%$restaurant_equipment%' ORDER BY `mod` LIMIT $start, $per_page") or die(mysql_error()); $num_columns = ceil(mysql_num_rows($result)/$max_num_rows); $num_rows = ceil(mysql_num_rows($result)/$num_columns); // Echo the results ?> <br> <? echo "<center><table width=\"700\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n"; for ($r = 0; $r < $max_num_rows; $r++){ echo "<tr>\n"; for ($c = 0; $c < $max_num_columns; $c++){ // 1 $x = $r * $max_num_columns + $c; if ($x < mysql_num_rows($result)){ // $y = mysql_result($result, $x, 0); // Commented out so I could show your example $num = mysql_result($result, $x, 0); $name = mysql_result($named, $x, 0); $make = mysql_result($maker, $x, 0); $price = mysql_result($cost, $x, 0); $unformated_price = $price; $price = number_format($unformated_price, 2, '.', ','); $y = <<<HTML <table cellpadding="0" cellspacing="0" border="0" width="174"> <tr valign="top" background="/images/mainimageerror.gif"> <td width="174" height="225" background="/productimages/{$num}_tn.jpg"> <a href="/productimages/{$num}.jpg"><img src="/productimages/overlay.png" border="0"></a> </td> </tr> <tr valign="top"> <td height="40"> <font face="Tahoma" color="#2b86c5" style="font-size:0.75em"><b> {$name} </font></b> </td> </tr> <tr> <td height="10"> <font face="Tahoma" color="#000000" style="font-size:0.60em"><b> {$make} </font></b> </td> </tr> <tr> <td height="10"> <font face="Tahoma" color="#000000" style="font-size:0.60em"><b> Model # {$num} </font></b> </td> </tr> <tr> <td height="10"> <font face="Tahoma" color="#94200d" style="font-size:0.70em"><b> $ {$price} </font></b> </td> </tr> <tr> <td> <a href="/product.php?restaurant_equipment={$num}"><img src="images/details.gif" border="0"></a> </td> <td> <img src="/images/spacer.gif" width="8"> </td> </tr> <tr> <td> <br style="line-height:3px;"> <form method="post" action="shipping.php" style="display: inline;"> <input name="Title" type="hidden" value="{$name}" /> <input name="SerialNum" type="hidden" value="{$num}" /> <input name="Price" type="hidden" value="{$unformated_price}" /> <input name="Shipping1" type="hidden" value="0.00" /> <input name="Shipping2" type="hidden" value="0.00" /> <input name="cmd" type="hidden" id="cmd" value="1" /> <input type="image" src="images/addtocart.gif" name="submit"> </form> </div> </td> <td> <img src="/images/spacer.gif" width="8"> </td> </tr> <tr> <td> <img src="images/spacer.gif" height="10"> </td> </tr> </table> HTML; } else { $y = '<table align="center" border="0" cellpadding="0" cellspacing="0" width="145"> <tr> <td width="16" align="center"><center></center></td> </tr> </table>'; } echo "<td>"; echo "$y"; echo "</td>"; } echo "</tr>\n"; } // Echo page numbers echo "</table></center>\n"; ?> </center> </div> </td> </tr> <tr> <td colspan="3"> <a name="ship"><img src="images/used-restaurant-equipment-shipping.gif" width="800" height="45" alt="Shipping Used Restaurant Equipment"></a></td> </tr> <tr> <td colspan="3" background="images/used-restaurant-equipment-shipping-back.gif" width="800" align="center" valign="top"> <center> <table width="720" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"> <center> <font face=Tahoma size=2> Buyer to pay all shipping costs. All merchandise is shipped FOB Miami, Florida 33168. Global Restaurant Equipment & Supply, Inc. will do their best to ship within the 24 hours of receipt of a completed order. If a completed order is being shipped directly from a manufacturer, lead times may vary based on their shipping policies. If Global Restaurant Equipment & Supplies, Inc. becomes aware of a delay in your order, we will notify you via email. We do not accept responsibility for any equipment after it leaves our warehouse. Please check the equipment(s) when you receive them and note any concealed damage on the bill of landing, so that it will ease your claim with the freight carrier if needed. Inside delivery and lift gate services are available at a premium, customer must request this service if needed. P.O. Box will not suffice as a valid shipping address. Additional handling and freight charges may be apply to each order. We use the most cost efficient means of freight, normally freightquote.com handles our shipments. You can also arrange shipping using your own carrier or you can pick your item(s) up from our factory warehouse. Our location has loading docks for efficient loading for you or your carrier. </font> <br><br> </center> </td> </tr> </table> </center> </td> </tr> <tr> <td colspan="3"> <a name="location"><img src="images/used-restaurant-equipment-location.gif" width="800" height="47" alt="Used Restaurant Equipment Location"></a></td> </tr> <tr> <td colspan="3" background="images/used-restaurant-equipment_10.gif" width="800" align="center" valign="top"> <center> <table width="720" border="0" cellpadding="0" cellspacing="0"> <td width="400" valign="top" align="center"> <div style="padding-right: 4px;"> <font face=Tahoma size=2> <b>Click the map below for driving directions</b> <br> <a href="http://maps.google.com/maps?q=650+NW+123rd+St,+Miami,+FL+33168,+USA&sa=X&oi=map&ct=title" target="_blank"><img src="/images/mapdata.gif" border="0"></a> <br><br> <b>650 NW 123rd Street, Miami, FL 33168</b> <br> Our 1 full city block factory warehouse is conveniently located right off of Interstate 95 in Miami, Florida. Take I-95 from anywhere, exit at NW 125th Street in Miami, go west and make the first left onto NW 7th Avenue. 2 blocks down you will reach 123rd Street, make another left and you will be entering the Global Restaurant Equipment and Supplies factory warehouse. Click the map above for visual and/or printable driving directions. </font> </div> </td> <td align="center"> <a href="images/location.jpg"><img src="images/location_tn.jpg" border="0"></a> <br><br> <a href="images/location.jpg"><img src="images/view.gif" border="0" alt="View Image"></a><br> <a href="images/location_hr.jpg"><img src="images/viewhr.gif" border="0" alt="View High Resolution Image"></a> <br><br> </td> </tr> </table> <table width="720"> <tr> <td width=220" align="center"> <a href="images/showroom1.jpg"><img src="images/showroom1_tn.jpg" border="0"></a> <br><br> <a href="images/showroom1.jpg"><img src="images/view.gif" border="0" alt="View Image"></a><br> <a href="images/showroom1_hr.jpg"><img src="images/viewhr.gif" border="0" alt="View High Resolution Image"></a> </td> <td width="30"> </td> <td width=220" align="center"> <a href="images/showroom2.jpg"><img src="images/showroom2_tn.jpg" border="0"></a> <br><br> <a href="images/showroom2.jpg"><img src="images/view.gif" border="0" alt="View Image"></a><br> <a href="images/showroom2_hr.jpg"><img src="images/viewhr.gif" border="0" alt="View High Resolution Image"></a> </td> <td width="30"> </td> <td width=220" align="center"> <a href="images/showroom3.jpg"><img src="images/showroom3_tn.jpg" border="0"></a> <br><br> <a href="images/showroom3.jpg"><img src="images/view.gif" border="0" alt="View Image"></a><br> <a href="images/showroom3_hr.jpg"><img src="images/viewhr.gif" border="0" alt="View High Resolution Image"></a> </td> </tr> </table> </center> </td> </tr> <tr> <td colspan="3"> <img src="images/used-restaurant-equipment-line.gif" width="800" height="23" alt="Used Restaurant Equipment Line"></td> </tr> <tr> <td colspan="3" background="images/used-restaurant-equipment-stock.gif" width="800" height="29"> <div style="padding-left: 35px;"> <font face="Tahoma,Verdana,Arial" size="2"> &copy 2005-2008 Global Restaurant Equipment and Supplies, Inc. </font> </div> </td> </tr> </center> <MAP NAME="Used-Restaurant-Equipment"> <AREA SHAPE=RECT COORDS="572,101,742,132" HREF="restaurant.equipment.search.php"> <AREA SHAPE=CIRCLE COORDS="718,49,45" href="javascript: void(0)" onclick="window.open('https://secure.comodo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname=SC2&v_search=globalrestaurantequip.com&x=6&y=5', 'windowname1', 'width=550, height=700'); return false;"> <AREA SHAPE=CIRCLE COORDS="599,47,43" href="javascript: void(0)" onclick="window.open('/lpgua.gif', 'windowname2', 'width=525, height=725'); return false;"> <AREA SHAPE=RECT COORDS="42,110,81,126" HREF="/"> <AREA SHAPE=RECT COORDS="99,112,190,124" HREF="http://stores.ebay.com/Global-Restaurant-Equipment"> <AREA SHAPE=RECT COORDS="212,112,262,124" HREF="/products.php"> <AREA SHAPE=RECT COORDS="291,111,360,124" HREF="mailto:&#115;&#101;&#108;&#108;&#064;&#103;&#108;&#111;&#098;&#097;&#108;&#114;&#101;&#115;&#116;&#097;&#117;&#114;&#097;&#110;&#116;&#101;&#113;&#117;&#105;&#112;&#046;&#099;&#111;&#109;?Subject=Website Inquiry"> <AREA SHAPE=RECT COORDS="386,110,464,123" HREF="#location"> </MAP> <MAP NAME="contact_side_box"> <AREA SHAPE=RECT COORDS="33,259,194,268" HREF="mailto:&#115;&#101;&#108;&#108;&#064;&#103;&#108;&#111;&#098;&#097;&#108;&#114;&#101;&#115;&#116;&#097;&#117;&#114;&#097;&#110;&#116;&#101;&#113;&#117;&#105;&#112;&#046;&#099;&#111;&#109;"> </MAP> <MAP NAME="orderhelper"> <AREA SHAPE=RECT COORDS="16,47,164,59" HREF="mailto:&#115;&#101;&#108;&#108;&#064;&#103;&#108;&#111;&#098;&#097;&#108;&#114;&#101;&#115;&#116;&#097;&#117;&#114;&#097;&#110;&#116;&#101;&#113;&#117;&#105;&#112;&#046;&#099;&#111;&#109;?&subject=Website Inquiry"> <AREA SHAPE=RECT COORDS="67,61,158,74" HREF="#ship"> <AREA SHAPE=RECT COORDS="67,75,159,88" HREF="#ship"> </MAP> <MAP NAME="Used-Restaurant-Equipment"> <AREA SHAPE=RECT COORDS="572,101,742,132" HREF="restaurant.equipment.search.php"> <AREA SHAPE=CIRCLE COORDS="718,49,45" href="javascript: void(0)" onclick="window.open('https://secure.comodo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname=SC2&v_search=globalrestaurantequip.com&x=6&y=5', 'windowname1', 'width=550, height=700'); return false;"> <AREA SHAPE=CIRCLE COORDS="599,47,43" href="javascript: void(0)" onclick="window.open('/lpgua.gif', 'windowname2', 'width=525, height=725'); return false;"> <AREA SHAPE=RECT COORDS="42,110,81,126" HREF="/"> <AREA SHAPE=RECT COORDS="99,112,190,124" HREF="http://stores.ebay.com/Global-Restaurant-Equipment"> <AREA SHAPE=RECT COORDS="212,112,262,124" HREF="/products.php"> <AREA SHAPE=RECT COORDS="291,111,360,124" HREF="mailto:&#115;&#101;&#108;&#108;&#064;&#103;&#108;&#111;&#098;&#097;&#108;&#114;&#101;&#115;&#116;&#097;&#117;&#114;&#097;&#110;&#116;&#101;&#113;&#117;&#105;&#112;&#046;&#099;&#111;&#109;?Subject=Website Inquiry"> <AREA SHAPE=RECT COORDS="386,110,464,123" HREF="#location"> </MAP> <a href="http://www.instantssl.com" id="comodoTL">SSL</a> <script language="JavaScript" type="text/javascript"> COT("http://globalrestaurantequip.com/cornertrust.gif", "SC2", "none"); </script></body> </html> <? } } ?> <?php $compressor->finish(); ?>
  16. I just tried like this as well, still breaks the page... <?php include ("http://globalrestaurantequip.com/specs/".$restaurant_equipment.".php"); ?>
  17. I actually just tried taking out the $row element, I used the direct page variable since the page variable and the model number and the $row['mod'] are the same. So now it is just as it is below, so its no longer using the sql query. <?php include "/specs/".$restaurant_equipment.".php"; ?>
  18. I have a file for each 'model' that gets pulled in my page with the the name of modelnumber.php (where modelnumber is the actual model number), I am trying to include that file in my pages, but instead it just breaks the page (the html of the page stops where the include is used. What am I doing wrong? <?php include "/specs/".$row[mod].".php"; ?>
  19. That code above is much more efficient than mine but the result is still the same. It is simply adding 75 to nothing if the results is not Load_Dock_Yes. In the else area it seems to be marking the $rate as nothing, not zero, just non-existent. Like it has it in the first part of the if statement and it losses it half way through.
  20. The problem is in this line here... $str2 = ($rate+75); Which I have tried as $str2 = $rate+75; and $str2 = '$rate'+'75';
  21. It has to equal either one. If it is nothing then it will not equal $load_dock, so in any event, it will either equal that value or it will not equal it.
  22. Its supposed to add $75 if the $load_dock value is not Load_Dock_Yes it adds 75 to the $rate value, if it does equal Load_Dock_Yes the $rate value remains unchanged.
  23. <?php if ($load_dock=='Load_Dock_Yes') { $str2 = $rate; list ($str2) = explode('.',ltrim($str2,'$')); $str=$str2*1.13; } ?> <?php if ($load_dock!='Load_Dock_Yes') { $str2 = ($rate+75); list ($str2) = explode('.',ltrim($str2,'$')); $str=$str2*1.13; } ?> What the did I do wrong here?
  24. I fixed it, here is the fix.... <SELECT NAME="location" style="width:180px; border:0px solid; height:17px; padding:0px 3px; position:relative;"> <OPTION VALUE="NONE">-----Select Category----- <?php mysql_connect('localhost','xxx_xxx','xxxxxx'); mysql_select_db('xxx_xxx') or die(mysql_error()); $sql_make = "SELECT DISTINCT `subcat` FROM products"; $query_make = mysql_query($sql_make); while($row = mysql_fetch_array($query_make)){ ?> <OPTION VALUE="<?=$row['subcat']?>"><?=$row['subcat']?> <? } ?> </SELECT>
×
×
  • 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.