Been tweaking our website and have run into wall!
Cannot get copy to flow around vertical image that is placed with Java. Works perfectly with horizontal images, but have had no luck in finding the problem. I know the issue resides within the PHP view file, but I can't find it. Hopefully, someone can help. It's a cosmetic issue, but it would be greatly appreciated!!!!
Here's a web page example...
http://www.banners4churches.com/banners/view.php?imagecode=7201
AND the offending code...
<div id="interiorcontent">
<div class="title"><!-- InstanceBeginEditable name="Page Title" -->God's Love (#7201)<!-- InstanceEndEditable --></div>
<!-- InstanceBeginRepeat name="Page Content" --><!-- InstanceBeginRepeatEntry -->
<!-- InstanceBeginEditable name="Content Section" -->
<div id="placingOrder">Please wait as we prepare your order...</div>
<form onsubmit="com_banners4safety_doSubmit(); return false" id="viewForm">
<div class="bannerSortSection vertical"><p class="left"><img class="thumb" src="/_images/products/200/7201-O.jpg" width="125" height="250" border="0" onClick="this.parentNode.className='enlarge'" /><span class="caption">(Click to enlarge)</span><img class="enlarge" src="/_images/products/500/7201-L.jpg" width="250" height="500" border="0" onClick="this.parentNode.className='left'" /></p> <p class="right">
<p class="right"> </p>
<p class="right"> </p>
<p class="right"><span class="grey"><br />
© 2012 Caldwell Marketing International</span><br /><br />
<input type="submit" name="submit" value="Add to cart" /><br /><br />
Personalize ANY BANNER DZINE! by inserting your information in form at checkout. Vinyl Banners are finished with hems on all four sides plus grommets. Fabric Material Banners come standard with pole pockets top & bottom.
</p>
Many thanks!
Mike
Also, here's the native php file...
<?php
$block = array("70.92.152.200");
if (in_array ($_SERVER['REMOTE_ADDR'], $block)) {
header("Location: http://www.rr.com/rdrun/");
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><!-- InstanceBegin template="/Templates/skin_2007_nosidebar_basic.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Banners4Churches.com</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="Keywords" -->
<meta name="Keywords" content="church banners,church banner,chruch banner, chruch banners,praise banners,worship banners,religious banners,religious banner,christian banners,christian banner,church worship,church christian,catholic church,fabric banners,church posters,church team,team banners,sponsor banners" />
<meta name="description" content="America's Superstore for Church Banners, Banners Stands & Inspirational Products. Easy ordering online, Fast service & low prices.">
<meta name="robots" content="index,follow"> <!-Banners4Churches.com - Unparalleled Quality Church & Religious Banners for praise, worship and outreach. -->
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script language="JavaScript" type="text/javascript" src="/jsx/com/gorad/lang/use.js"></script>
<script language="javascript" type="text/javascript" src="/_ui/2007/js/_parent.js"></script>
<script language="javascript" type="text/javascript" src="/_ui/2007/js/security.js"></script>
<!-- InstanceBeginEditable name="Javascript" -->
<script type="text/javascript" language="JavaScript" src="/_ui/2007/js/jquery.js"></script>
<script type="text/javascript" language="JavaScript"><!--
var com_banners4safety_baseCartUrl = 'https://order.store.yahoo.net/cgi-bin/wg-order?yhst-129624843121182';
// add event handlers to quantity inputs
var qtys = [];
var inWarning = false;
$(document).ready(function() {
qtys = $('#viewForm//input[@type=text]');
qtys.keydown(function() {
if (com_banners4safety_getNumTypes(this) >= 1) {
com_banners4safety_doShowTooManyTypesWarning();
$(this).val('');
return false;
}
});
});
function com_banners4safety_doShowTooManyTypesWarning() {
if (!inWarning) {
inWarning = true;
alert('We\'re sorry. You may only add one product to the cart at a time.');
}
inWarning = false;
}
function com_banners4safety_getNumTypes(ignore) {
var types = 0;
for (q in qtys) {
var qty = qtys[q];
if (parseInt(qty.value) > 0 && ignore != qty) {
++types;
}
else {
qty.value = (new String(qty.value)).replace(/[^0-9]*/g,'');
}
}
return types;
}
function com_banners4safety_doSubmit() {
switch (com_banners4safety_getNumTypes()) {
case 0:
alert('Nothing to add: no product selected.');
return false;
case 1:
// get product and quantity
var productId;
var quantity;
for (q in qtys) {
var qty = qtys[q];
if (parseInt(qty.value) > 0) {
productId = qty.name;
quantity = qty.value;
break;
}
}
// submit to cart
$('#pfProductId')[0].value = productId;
$('#pfQuantity')[0].value = quantity;
var pf = $('#postForm')[0];
pf.action = com_banners4safety_baseCartUrl + '+' + productId;
pf.target = '_self';
pf.submit();
break;
default:
com_banners4safety_doShowTooManyTypesWarning();
return false;
}
}
// var interPostDelay = 2500;
// var perPostDelay = 2500;
// var additionalDelay = 2000;
// var els = $('#viewForm')[0].elements;
//
// // determine number of types and, if there is only one, record as singleType
// var productId;
// var quantity;
// for (q in qtys) {
// var qty = qtys[q];
// if (parseInt(qty.value) > 0) {
// productId = qty.name;
// quantity = qty.value;
// break;
// }
// }
//
// for (var i = 0; i < els.length; ++i) {
// if (parseInt(els[i].value) > 0) {
// ++numTypes;
// singleType.productId = els[i].name;
// singleType.quantity = els[i].value;
// }
// }
//
//
// $('#pfProductId')[0].value = productId;
// $('#pfQuantity')[0].value = quantity;
// var pf = $('#postForm')[0];
// pf.action = com_banners4safety_baseCartUrl + '+' + productId;
// pf.target = target;
// pf.submit();
//
//
// if (numTypes == 1) { // single type
// com_banners4safety_doIframePost(singleType.productId, singleType.quantity, 1, '_self');
// }
// else { // multiple types
// var itemCount = 0;
//
// for (var i = 0; i < els.length; ++i) {
// if (parseInt(els[i].value) > 0) {
// var productId = els[i].name;
// var quantity = els[i].value;
// ++itemCount;
// setTimeout('com_banners4safety_doIframePost("' + productId + '", ' + quantity + ', ' + itemCount + ', "iframe_' + itemCount + '")', (itemCount - 1) * interPostDelay);
// }
// }
// setTimeout('document.location.href = "' + com_banners4safety_baseCartUrl + '";', (itemCount * perPostDelay + additionalDelay));
// $('#placingOrder').show();
//// setTimeout('alert("going to cart NOW")', (itemCount * perPostDelay + additionalDelay));
// }
//}
//function com_banners4safety_doIframePost(productId, quantity, count, target) {
// $('<iframe name="iframe_' + count + '" style="position: absolute; left: -1000px; top: -300px; width: 900px; height: 275px" />').appendTo("body");
//// $('<iframe name="iframe_' + count + '" style="position: absolute; left: 0px; top: ' + ((count - 1)*300) + 'px; width: 900px; height: 275px" />').appendTo("body");
//
// $('#pfProductId')[0].value = productId;
// $('#pfQuantity')[0].value = quantity;
// var pf = $('#postForm')[0];
// pf.action = com_banners4safety_baseCartUrl + '+' + productId;
// pf.target = target;
// pf.submit();
//}
//--></script>
<!-- InstanceEndEditable -->
<script type="text/javascript"></script>
<style type="text/css" media="all">
@import "/_ui/2007/css/skin_2007_.css";
body {
background-color: #FFF;
}
</style>
<!--[if lt IE 7]>
<style type="text/css" media="all">
@import "/_ui/2007/css/skin_2007_.ie6.css";
</style>
<![endif]-->
<!-- InstanceBeginEditable name="Head" --><style type="text/css">
<!--
body {
background-color: #FFF;
}
.gray {
color: #666;
}
.italic {
font-style: italic;
}
.grey {
color: #999;
}
.blue {
color: #03C;
}
-->
</style><!-- InstanceEndEditable -->
</head>
<body>
<div id="adjustBlackLeft"></div>
<div id="main">
<a href="/" id="mainLink"></a>
<div id="rightlinks">
<div align="right">
<a href="/banners/list.php"><img src="/_ui/2007/img/nav_banners.gif" alt="Visual Search" width="93" height="33" border="0" /></a>
<a href="/current/index.php"><img src="/_ui/2007/img/nav_home.gif" alt="Home" width="30" height="33" border="0" /></a>
<a href="/current/contact_us.php"></a> </div>
</div>
<div id="leftlinks"></div>
<div id="viewcart"><a href="http://order.store.yahoo.net/cgi-bin/wg-order?yhst-129624843121182"> <img src="/_ui/2007/img/viewcart1.gif" alt="View Cart" name="Image18" width="78" height="26" border="0" id="Image18" /></a></div>
<div id="bottomcontent"><a href="/current/help.php"></a></div>
<div id="left">
<div id="sidebar_orderonline" class="title"><img src="../_ui/2007/img/sidebar_orderonline.gif" width="169" height="24" alt="sidebarorder" /></div>
<ul class="sidebar">
<li><a href="/current/banners/custom_banners.php"><strong>CUSTOM CHURCH BANNERS</strong></a></li>
<li></li>
<li><a href="/banners/list.php?category[]=custom_stands">Personalized Banner/Stand</a></li>
<li><a href="/banners/list.php?category[]=ready_designs">Stock Church Banners</a></li>
<li><a href="/banners/list.php?category[]=flowers_inspirational">Inspiration al Banners</a></li>
<li><a href="/banners/list.php?category[]=holidays_events">Holiday Banners</a></li>
<li><a href="/banners/list.php?category[]=nature_landscapes">Nature Banners</a></li>
<li><a href="/banners/list.php?category[]=people">Congregational Banners</a></li>
<li><a href="/banners/list.php?category[]=sky_water">Sky & Water Banners</a></li>
<li><a href="/banners/list.php?category[]=horizontal">Horizontal Church Banners</a></li>
<li><a href="/banners/list.php?category[]=vertical">Vertical Church Banners</a></li>
<li><a href="/banners/list.php">SEE ALL CHURCH BANNERS</a></li>
</ul>
<div id="sidebar_descriptions" class="title"></div>
<ul class="sidebar">
<li><a href="../current/stands/powerframe_stands.php">Powerframe™ COMBOS</a></li>
<li><a href="../current/stands/retractable_stands.php">Retractable™Sta nd COMBO</a></li>
<li><a href="../current/stands/tstand_stands.php">T Stand™ COMBO</a></li>
<li><a href="../current/banners/cloth.php">Fabric Church Banners</a></li>
<li><a href="../current/banners/vinyl.php">Vinyl Church Banners</a></li>
<li><a href="../current/banners/fabric_walldecals.php">Fabric Wall Decals</a></li>
<li><a href="../current/banners/posters.php">Church Posters</a></li>
<li><a href="../current/banners/educational.php">Unit Circle for Mathematics</a></li>
<li><a href="../current/banners/dzine_own.php">DZINE! Your Banner</a></li>
<li><a href="../current/custom_designshelp.php">DZINE! Custom Design Help</a></li>
<li><a href="../current/banners/custom_banners.php">Custom Order Help</a></li>
<li><a href="../current/banners/marketing_church.php">Promote Your Church</a></li>
<li><a href="../current/banners/logos_printcollateral.php">Logo DZINE!</a></li>
<li><a href="../current/banners/cmi_imagebank.php">Image Bank</a></li>
<li></li>
</ul>
<div id="sidebar_info" class="title"></div>
<ul class="sidebar">
<li><a href="/media/Banners4Churches-Catalog.pdf">Download 2012 Catalog</a></li>
<li><a href="../current/production_shipping.php">PRODUCTION/SHIPPING</a></li >
<li><a href="../current/rush_service.php">Rush Print Service</a></li>
<li><a href="../current/customer_feedback.php">Customer Feedback</a></li>
<li><a href="../current/terms_returns.php">Terms & Returns</a></li>
<li><a href="../current/privacy_policy.php">Privacy Policy</a></li>
<li><a href="../current/banners/caldwell_mktintl.html" class="strong">Caldwell Marketing Int'l</a></li>
<li><a href="../current/contact_us.php">Contact Us</a></li>
<li></li>
</ul>
<p> </p>
</div>
<div id="mainContent">
<div id="interiorcontent">
<div class="title"><!-- InstanceBeginEditable name="Page Title" --><?php
function arr_comb($h, $t) {
$h = array_values($h);
$t = array_values($t);
$r = Array();
foreach ($h as $k => $v) {
$r[$v] = $t[$k];
}
return $r;
}
$orientation_exclusion = null;
$imagecode = $_GET['imagecode'];
$fp = fopen('images.csv', 'r');
$headers = fgetcsv($fp, 4096);
while (!feof($fp)) {
$td = fgetcsv($fp, 4096);
if (!is_array($td) || empty($td)) {
break;
}
while (count($td) < count($headers)) {
$td[] = '';
}
$td = arr_comb($headers, $td);
if ($td['code'] == $imagecode) {
echo $td['text'] . ' (#' . $_GET['imagecode'] . ')';
if (!empty($td['horizontal']))
$orientation_exclusion = 'vertical';
else if (!empty($td['vertical']))
$orientation_exclusion = 'horizontal';
else
$orientation_exclusion = null;
break;
}
}
fclose($fp);
?><!-- InstanceEndEditable --></div>
<!-- InstanceBeginRepeat name="Page Content" --><!-- InstanceBeginRepeatEntry -->
<!-- InstanceBeginEditable name="Content Section" -->
<div id="placingOrder">Please wait as we prepare your order...</div>
<form onsubmit="com_banners4safety_doSubmit(); return false" id="viewForm">
<?php
if(!empty($td['horizontal'])) {
echo '<div class="bannerSortSection horizontal">';
echo '<p class="left">';
echo '<img class="thumb" src="/_images/products/200/' . $imagecode . '-O.jpg" width="250" height="125" border="0" onClick="this.parentNode.className=\'enlarge\'" /><span class="caption">(Click to enlarge)</span>';
echo '<img class="enlarge" src="/_images/products/500/' . $imagecode . '-L.jpg" width="500" height="250" border="0" onClick="this.parentNode.className=\'left\'" />';
echo '</p>';
}
if(!empty($td['vertical'])) {
echo '<div class="bannerSortSection vertical">';
echo '<p class="left">';
echo '<img class="thumb" src="/_images/products/200/' . $imagecode . '-O.jpg" width="125" height="250" border="0" onClick="this.parentNode.className=\'enlarge\'" /><span class="caption">(Click to enlarge)</span>';
echo '<img class="enlarge" src="/_images/products/500/' . $imagecode . '-L.jpg" width="250" height="500" border="0" onClick="this.parentNode.className=\'left\'" />';
echo '</p>';
}
?>
<p class="right">
<p class="right"> </p>
<p class="right"> </p>
<p class="right"><span class="grey"><br />
© 2012 Caldwell Marketing International</span><br /><br />
<input type="submit" name="submit" value="Add to cart" /><br /><br />
Personalize ANY BANNER DZINE! by inserting your information in form at checkout. Vinyl Banners are finished with hems on all four sides plus grommets. Fabric Material Banners come standard with pole pockets top & bottom.
<?php if($td['vertical']) { ?>
<?php } ?>
</p>
</div>
<table cellpadding="0" cellspacing="0" border="0" class="bannerSortTable">
<tr>
<th>Product</th>
<th>Size</th>
<!--<th colspan="3" style="text-align:right">List Price </th>-->
<th colspan="3" style="text-align:right">Your Discounted Price </th>
<th>Qty</th>
</tr>
<?php
// List price = 1.5 of spreadsheet price
$fp = fopen('products.csv', 'r');
$headers = fgetcsv($fp, 4096);
$prev = null;
while (!feof($fp)) {
$td = fgetcsv($fp, 4096);
if (!is_array($td) || empty($td)) {
break;
}
$td = arr_comb($headers, $td);
if (!is_null($prev) && ($prev != $td['prod_type'])) {
$class = ' class="bordertop"';
}
else {
$class = '';
}
$prev = $td['prod_type'];
if (!is_null($orientation_exclusion))
if (strpos(strtolower($td['product']), $orientation_exclusion) !== false)
continue;
if ($orientation_exclusion == 'vertical' && $td['prod_type'] == 'APP')
continue; // Don't show "Add Pole Pockets Top & Bottom - No Charge" for horizontal banners
$dim = ($td['dimensions'] == '0') ? 'N/A' : $td['dimensions'];
echo "<tr$class><td>$td[product]</td>".
"<td>$dim</td>".
// "<td> </td>".
// "<td width=\"5\" class=\"gray\"></td>".
// "<td width=\"50\" class=\"gray\">" . ceil($td['price_list']) . ".00</td>".
"<td> </td>".
"<td width=\"5\"><strong>$</strong></td>".
"<td width=\"40\" class=\"price\"><strong>" . ceil($td['price']) . ".00</strong></td>".
"<td><input type=\"text\" size=\"2\" name=\"$imagecode-$td[suffix]\" /></td>".
"</tr>";
}
fclose($fp);
?>
<tr class="submit">
<td colspan="3"><div id="placingOrderBottom">Please wait as we prepare your order...</div></td>
<td colspan="3"><input type="submit" name="submit" value="Add to cart" /></td>
</tr>
</table>
</form>
<form id="postForm" method="post">
<input id="pfProductId" name="vwitem" type="hidden" />
<input id="pfQuantity" name="vwquantity" type="hidden" />
<!--<input name=".autodone" type="hidden" value="http://www.banners4safety.com">-->
</form>
<script> var _l = 1167; var _p = 1440; var _f = 1; var _ta = (document.domain).split ("."); var psd = (_ta.length > 1 ? "." + _ta[_ta.length - 2] + "." + _ta[_ta.length - 1] : document.domain); var _cn = "L" + _l + "="; var _call = document.cookie.indexOf (_cn); var _il = 1; var _tl = 0; var _ex; var _rnd = (new Date ()).getTime (); if (_call >= 0) { _pos = document.cookie.substring (_call).indexOf (';'); if (_pos > 0) _val = document.cookie.substring (_call + _cn.length, _call + _pos); else _val = document.cookie.substring (_call + _cn.length); if (_val.indexOf ('.') > 0) { _il = _val.substring (0, _val.indexOf ('.')); _ex = _val.substring (_val.indexOf ('.') + 1); _tl = _ex - (new Date ()).getTime (); } if (_tl <=0) document.cookie = _cn + "; domain=" + psd + "; path=/; expires=" + (new Date ((new Date ()).getTime () - 1000000)).toGMTString () + ";"; } if (_il < _f || _tl <= 0) { var expiry = (new Date((new Date()).getTime()+_p*2*60*1000)).toGMTString(); if (document.cookie.indexOf(_cn) < 0 ) document.cookie=_cn+''+(1)+'.'+((new Date()).getTime()+_p*60*1000)+'; domain='+psd+';path=/;expires='+expiry; else document.cookie=_cn+''+(_il-0+1)+'.'+_ex+';domain='+psd+'; path=/;expires='+expiry; document.write ("<sc" + "ript language='javascript' src='http://adopt.specificclick.net/Custom/bht.jsp?px=" + _l + "&v=1&rnd=" + _rnd + "'>"); document.write ("</sc" + "ript>"); } </script>
<!--VISISTAT SNIPPET//-->
<script type="text/javascript">var DID=18397;</script>
<script src="http://sniff.visistat.com/sniff.js" type="text/javascript"></script>
<!--VISISTAT SNIPPET//-->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-145607-6";
urchinTracker();
</script>
<!-- InstanceEndEditable --><br />
<!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat --> </div>
</div>
<div id="bottomcontent"><!-- InstanceBeginEditable name="Parent_Content2" --><!-- InstanceEndEditable --></div>
<div id="footer"></div>
</div>
</body>
<!-- InstanceEnd --></html>
in the header
<script language="javascript" type="text/javascript" src="/_ui/2007/js/security.js"></script>
North America
Europe, Middle East and Africa
Asia Pacific