function getLensParamHTMLforRow($lens) { $html = "<p> </p>"; $html .= "<p><table border='1' cellspacing='0' width='400px' bordercolor='#cae0eb'>"; $html .= "<tr><td colspan='2'><h2>" . $lens['name'] . "</h2></td></tr>"; if ($lens['images'] != "") { $images = explode(",", $lens['images']); $html .= "<tr><td colspan='2'>"; foreach ($images as $image) { $image = trim($image, " \\s"); $html .= "<img src='http://www.eyedock.com/modules/Lenses/pnimages/lens_images/" . $image . "' />"; } $html .= "</td></tr>"; } else { $html .= "<tr><td colspan='2'>[No images available for this lens]</td></tr>"; } $html .= "<tr><td>Material</td><td>" . $lens['material'] . "<br/>"; $html .= " - FDA group: " . checkForNull($lens['fda']) . "<br/>"; $html .= " - Water content: " . checkForNull($lens['h2o']) . "<br/>"; $html .= " - Modulus: " . checkForNull($lens['modulus']) . "<br/>"; $html .= " - dk:"; if ($lens['polydk'] > 0) { $html .= checkForNull($lens['polydk']); } else { $html .= checkForNull($lens['dk']); } $html .= "</td></tr>"; $html .= "<tr><td>Visibility Tint?</td><td> " . yesOrNo($lens['visitint']) . "</td></tr> "; $html .= "<tr><td>OK for extended wear?</td><td> " . yesOrNo($lens['ew']) . "</td></tr> "; $html .= "<tr><td>Center thickness: </td><td> " . checkForNull($lens['ct']) . "</td></tr> "; $html .= "<tr><td>DK: </td><td> " . checkForNull($lens['dk']) . "</td></tr> "; $html .= "<tr><td>OZ:</td><td> " . checkForNull($lens['oz']) . "</td></tr> "; $html .= "<tr><td>Quantity : </td><td> " . checkForNull($lens['qty']) . "</td></tr> "; $html .= "<tr><td>Replacement: </td><td> " . checkForNull($lens['replace_text']) . "</td></tr> "; $html .= "<tr><td>Wear type: </td><td> " . checkForNull($lens['wear']) . "</td></tr> "; $html .= "<tr><td>Wholesale price :</td><td> " . checkForNull($lens['price']) . "</td></tr> "; $html .= "<tr><td>Appearance: </td><td> " . checkForNull($lens['markings']) . "</td></tr> "; $html .= "<tr><td>Fitting guide:</td><td> <a href='" . $lens['fitting_guide'] . "'>" . $lens['fitting_guide'] . " </a></td></tr> "; $html .= "<tr><td>Lens Website:</td><td> <a href='" . $lens['website'] . "'>" . $lens['website'] . " </a></td></tr> "; $html .= "<tr><td>Other info:</td><td> " . checkForNull($lens['other_info']) . "</td></tr>"; $html .= "<tr><td colspan='2'>Parameters:<br/>"; $html .= getPowerHTMLforLens($lens); $html .= "</td></tr>"; $html .= "</table></p>"; return $html; }
function getLensParamHTMLforRow($lens) { $html = "\n\n"; $html .= "\n_____________________________________________\n\n"; $html .= $lens['name']; $html .= "\n_____________________________________________\n\n"; $html .= "EyeDock listing: http://www.eyedock.com/index.php?option=com_pnlenses#view=detail&id=" . $lens['tid'] . "\n"; $html .= "Fitting guide: " . $lens['fitting_guide'] . "\n"; $html .= "Lens Website: " . $lens['website'] . " \n "; $html .= "Image: "; if ($lens['images'] != "") { $images = explode(",", $lens['images']); $html .= "image on file (see listing)\n"; } else { $html .= "no image - could you provide one?\n"; } $html .= "Material: " . $lens['material']; $html .= "\n --> (FDA group: " . checkForNull($lens['fda']); $html .= ", Water content: " . checkForNull($lens['h2o']); $html .= ", Modulus: " . checkForNull($lens['modulus']); $html .= ", dk: "; if ($lens['polydk'] > 0) { $html .= checkForNull($lens['polydk']); } else { $html .= checkForNull($lens['dk']); } $html .= ")\n"; $html .= "Visibility Tint? " . yesOrNo($lens['visitint']) . "\n"; $html .= "Extended wear? " . yesOrNo($lens['ew']) . "\n"; $html .= "Center thickness: " . checkForNull($lens['ct']) . "\n"; $html .= "DK: " . checkForNull($lens['dk']) . "\n"; $html .= "OZ: " . checkForNull($lens['oz']) . "\n"; $html .= "Quantity : " . checkForNull($lens['qty']) . "\n"; $html .= "Replacement: " . checkForNull($lens['replace_text']) . "\n"; $html .= "Wear type: " . checkForNull($lens['wear']) . "\n"; $html .= "Appearance: " . checkForNull($lens['markings']) . "\n"; if ($lens['toric'] == 1) { $html .= "Toric type: " . checkForNull($lens['toric_type']) . "\n"; } if ($lens['bifocal'] == 1) { $html .= "Bifocal type: " . checkForNull($lens['bifocal_type']) . "\n"; } $html .= "\n------Parameters--------\n"; $html .= getPowerHTMLforLens($lens); $html .= "\n-- Wholesale price -- \n" . clearHTML(checkForNull($lens['price'])); $html .= "\n -> note: wholesale prices are not visible to the public"; $html .= "\n\n-- Other info: --\n" . clearHTML(checkForNull($lens['other_info'])) . "\n"; //$html .= "\n"; return $html; }
echo $lens['fitting_guide']; ?> "><?php echo $lens['fitting_guide']; ?> </a></td></tr> <tr><td>Lens Website:</td><td> <a href="<?php echo $lens['website']; ?> "><?php echo $lens['website']; ?> </a></td></tr> <tr><td>Other info:</td><td> <?php echo checkForNull($lens['other_info']); ?> </td></tr> <tr><td colspan='2'>Parameters:<br/> <?php $powers = $lens['powers']; $variation = 1; $pwrCount = count($powers); foreach ($powers as $power) { echo "<p><table border='1' cellspacing='0' style='margin:7px; width:90%;' bordercolor='#f1f6fa'>"; $variationLabel = $power['variation'] != "" ? $power['variation'] : $variation; if ($pwrCount > 1) { echo "<tr><td>Variation:</td><td> " . $variationLabel . "</td></tr>"; }
if ($lens['polydk'] > 0) { $infoText .= " : - dk: " . checkForNull($lens['polydk']) . "</td></tr>"; } $infoText .= "<tr><td>Visibility Tint?</td><td> " . yesOrNo($lens['visitint']) . "</td></tr>"; $infoText .= "<tr><td>OK for extended wear?</td><td> " . yesOrNo($lens['ew']) . "</td></tr>"; $infoText .= "<tr><td>Center thickness: </td><td>" . checkForNull($lens['ct']) . "</td></tr>"; $infoText .= "<tr><td>DK: </td><td>" . checkForNull($lens['dk']) . "</td></tr>"; $infoText .= "<tr><td>OZ:</td><td> " . checkForNull($lens['oz']) . "</td></tr>"; $infoText .= "<tr><td>Quantity : </td><td>" . checkForNull($lens['qty']) . "</td></tr>"; $infoText .= "<tr><td>Replacement: </td><td>" . checkForNull($lens['replace_text']) . "</td></tr>"; $infoText .= "<tr><td>Wear type: </td><td>" . checkForNull($lens['wear']) . "</td></tr>"; $infoText .= "<tr><td>Wholesale price :</td><td> " . checkForNull($lens['price']) . "</td></tr>"; $infoText .= "<tr><td>Appearance: </td><td>" . checkForNull($lens['markings']) . "</td></tr>"; $infoText .= "<tr><td>Fitting guide:</td><td> <a href='" . $lens['fitting_guide'] . "'>" . $lens['fitting_guide'] . " </a></td></tr>"; $infoText .= "<tr><td>Lens Website:</td><td> <a href='" . $lens['website'] . "'>" . $lens['website'] . " </a></td></tr>"; $infoText .= "<tr><td>Other info:</td><td> " . checkForNull($lens['other_info']) . "</td></tr>"; $infoText .= "<tr><td colspan='2'>Parameters:<br/>"; $powers = $lens['powers']; $variation = 1; $pwrCount = count($powers); foreach ($powers as $power) { $infoText .= "<p><table border='1' cellspacing='0' style='margin:7px; width:90%;' bordercolor='#f1f6fa'>"; $variationLabel = $power['variation'] != "" ? $power['variation'] : $variation; if ($pwrCount > 1) { $infoText .= "<tr><td>Variation:</td><td> " . $variationLabel . "</td></tr>"; } $infoText .= "<tr><td width='25%'>Base Curve:</td><td> " . $power['baseCurve'] . "</td></tr>"; $infoText .= "<tr><td>Diameter:</td><td> " . $power['diameter'] . "</td></tr>"; $infoText .= "<tr><td>Sphere:</td><td> " . $power['sphere'] . "</td></tr>"; if ($lens['toric'] == 1) { $infoText .= "<tr><td>Cyl Power:</td><td> " . $power['cylinder'] . "</td></tr>";