Foreaching only the a href data - php

I am using simple_html_dom to gather data from another website and I am wondering how I can do a foreach for only the data as an a element.
$url = 'example.com';
html2 = file_get_html($url);
$download2 = $html2->find('table',1);
$data['ep_table'] = $download2->outertext;
The above code returns the following.
<table style="height: 341px;">
<tbody>
<tr style="height: 31px;">
<td style="height: 31px; width: 26px;">#</td>
<td style="height: 31px; width: 196px;">Song</td>
<td style="text-align: right; height: 31px; width: 82px;">Download</td>
</tr>
<tr style="height: 62px;">
<td style="height: 62px; width: 26px;">1</td>
<td style="height: 62px; width: 196px;">미쳐가지고 (I’m Crazy)</td>
<td style="text-align: right;height: 62px;width: 82px;">
<a href="http://example.com/South-Club-im-crazy/"
target="_blank"
rel="noopener">
<strong>
<button class="button_rbox" title="" type="button">
<span class="cnt">Download</span>
</button>
</strong>
</a>
</td>
</tr>
<tr style="height: 31px;">
<td style="height: 31px; width: 26px;">2</td>
<td style="height: 31px; width: 196px;">Someday</td>
<td style="text-align: right; height: 31px; width: 82px;">
<a href="http://example.com/South-Club-someday/"
target="_blank"
rel="noopener">
<strong>
<button class="button_rbox" title="" type="button">
<span class="cnt">Download</span>
</button>
</strong>
</a>
</td>
</tr>
<tr style="height: 93px;">
<td style="height: 93px; width: 26px;">3</td>
<td style="height: 93px; width: 196px;">안녕 (Hi/Bye)</td>
<td style="text-align: right; height: 93px; width: 82px;">
<a href="http://example.com/South-Club-hi/"
target="_blank"
rel="noopener">
<strong>
<button class="button_rbox" title="" type="button">
<span class="cnt">Download</span>
</button>
</strong>
</a>
</td>
</tr>
<tr style="height: 31px;">
<td style="width: 26px; height: 31px;">4</td>
<td style="width: 196px; height: 31px;">빗방울 (Raindrop)</td>
<td style="text-align: right; width: 82px; height: 31px;">
<a href="http://example.com/South-Club-raindrop/"
target="_blank" rel="noopener">
<strong>
<button class="button_rbox" title="" type="button">
<span class="cnt">Download</span></button>
</strong>
</a>
</td>
</tr>
</tbody>
</table>
How can I do a foreach, which searches only the html of $data['ep_table'] and not the entire page we're parsing for a a element?
I've tried this, with no luck.
foreach($data['ep_table']->find('a') as $track){
print $link = $track->href;
}

You're trying to use find() on plaintext, not a DOM object. You should do this:
$url = 'example.com';
html2 = file_get_html($url);
foreach( $html2->find('table', 1)->find('a') as $track)
{
echo $track->href;
}
It's also worth pointing out that find('table', 1) assumes the target table is the second <table> element in the retrieved markup.

Related

How to Apply CSS based on variable

we have created a table (6x2) with column 2 containing a FA circle followed by a database field (environment in the example below) which contains the value (Outstanding, Very Good, Good, Needs Improvement & Adequate).
I want the colour of the fa-circle (traffic light colours) to be set depending on the value of field that is in that line with an arbitrary map (the correspondence between color and value will be arbitrary and set upfront).
I'm both available to have it solved server side or client side but I wish the document to have that feature where each value in the second column will have a fa-circle with a color depending on that value.
</h2>
<table class="tableag" style="width: 80%;">
<tbody>
<tr>
<td style="width: 40.0000%;background-color: #ffffff;color: #f2a34f;border-top: 3px solid #ffffff;
border-left: 3px solid #ffffff;"><b>Category</b></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #f2a34f;border-top: 3px solid #ffffff;
border-left: 3px solid #ffffff;"><b>Rating</b></td>
</tr>
<tr>
<td style="width: 40.0000%;">Overall<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000; class = "outcome"; "><i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['rating']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Care & Support<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;class = "outcome";"> <i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['care_and_support']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Environment<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;class = "outcome";"><i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['environment']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Leadership<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;class = "outcome";"><i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['leadership']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Staff & team</td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;class = "outcome";"><i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['staff_team']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Wellbeing<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;class = "outcome";"><i class="fa fa-circle" aria-hidden="true"></i> <br><?php echo $user['wellbeing']?></td>
</tr>
<tr>
<td style="width: 40.0000%;">Full report<br></td>
<td style="width: 60.0000%;background-color: #ffffff;color: #000000;"><a class="btn btn-warning btn-rg" href=<?php echo $user['cqc_url_report_english']?> target="_blank">Full Report</a></td>
</tr>
</tbody>
</table>
Assuming you want 5 different colors, I suggest you to use a custom PHP function within your script
<?php
function getColor($rank)
{
switch($rank)
{
case 'Outstanding': return 'green';
case 'Very Good' : return 'yellow';
case 'Good': return 'orange';
case 'Needs Improvement' : return 'red';
case 'Adequate' : return 'grey';
default : return 'black';
}
}
?>
<i class="fa fa-circle" aria-hidden="true" style="color:<?php getColor(rank)?>"></i>
For a more cleaner approch, you can return a CSS class name within your function instead of a color
This solution will use a javascript strategy that will run client side.
You have a map defining which css class corresponds to each ranking value as mapOfColors.
When the page will be loaded in the browser, the code will loop through all the table rows, looking for the value of each second column and changing color of the nested i.fa element assigning a css class to it corresponding to its text value.
I chose arbitrary colours for each (decided upfront) ranking value.
I also took the chance to better refactor the styling of your table so that it's defined as css rules.
const mapOfColors =
{
'0' : 'rank0',
'1' : 'rank1',
'2' : 'rank2',
'3' : 'rank3',
'4' : 'rank4',
'5' : 'rank5',
'6' : 'rank6',
/*...*/
}
const rows = document.querySelectorAll('.tableag tbody tr');
for(const row of rows){
const field = row.querySelector('td:nth-child(2)');
const value = field.textContent.trim();
if(mapOfColors.hasOwnProperty(value)){
const className = mapOfColors[value];
field.querySelector('i.fa').classList.add(className);
}
}
.tableag{
width: 80%;
}
/*style for the header first col*/
.tableag > thead > tr > th:nth-child(1){
width: 40%;
background-color: #ffffff;
color: #f2a34f;
border-top: 3px solid #ffffff;
border-left: 3px solid #ffffff;
text-align: left;
}
/*style for the header second col*/
.tableag > thead > tr > th:nth-child(2){
width: 60%;
background-color: #ffffff;
color: #f2a34f;
border-top: 3px solid #ffffff;
border-left: 3px solid #ffffff;
text-align: left;
}
/*style for the table content first col*/
.tableag > tbody > tr > td:nth-child(1){
width: 40%;
}
/*style for the table content second col*/
.tableag > tbody > tr > td:nth-child(2){
width: 60%;
background-color: #ffffff;
color: #000000;
}
/*Ranking styles*/
.rank0{ color: red; }
.rank1{ color: orange; }
.rank2{ color: green; }
.rank3{ color: blue; }
.rank4{ color: pink; }
.rank5{ color: black; }
.rank6{ color: gray; }
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<table class="tableag">
<thead>
<tr>
<th><b>Category</b></th>
<th><b>Rating</b></th>
</tr>
</thead>
<tbody>
<tr>
<td>Overall<br></td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
1<br>
</td>
</tr>
<tr>
<td>Care & Support<br></td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
2<br>
</td>
</tr>
<tr>
<td>Environment<br></td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
3<br>
</td>
</tr>
<tr>
<td>Leadership<br></td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
4<br>
</td>
</tr>
<tr>
<td>Staff & team</td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
5<br>
</td>
</tr>
<tr>
<td>Wellbeing<br></td>
<td>
<i class="fa fa-circle" aria-hidden="true"></i>
6<br>
</td>
</tr>
<tr>
<td>Full report<br></td>
<td>
<a class="btn btn-warning btn-rg" href="" target="_blank">Full Report</a>
</td>
</tr>
</tbody>
</table>

How to fix the value from php to use bootstrap?

I am using bootstrap accordion style to show the list of speakers in our website.
For that, I have a list of speakers table in my database. And I am getting the fields using php. In the following way.
<?php
global $wpdb;
$result = $wpdb->get_results( "SELECT * FROM `Invited_Speakers`");
foreach ( $result as $print ) { ?>
<tr style="width:100%">
<div class="maindrop" style="float: left; text-align: justify;">
<a class="bar" style="text-decoration: none;" href="#<?php echo $print->Last_Name;?>"> <?php echo $print->First_Name; ?> <?php echo $print->Last_Name; ?>, <?php echo $print->Institue_Address; ?>
</a>
<div id="<?php echo $print->Last_Name;?>" class="dropbox">
<img style="border-radius: 10%; padding: 10px; float: left;" src="<?php echo $print->Image_link;?>" alt="" width="20%" align="left" />
<table style="width:79%;float: right;">
<tbody>
<td > <?php echo $print->Designation;?> </td>
</tr>
<tr>
<td ><?php echo $print->Department_Address;?></td>
</tr>
<tr>
<td> Email Id: <?php echo $print->Email_Id;?></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td >Research Interests</td>
<td>:</td>
<td> <?php echo $print->Research_Interests;?> </td>
</tr>
<tr>
<td>
Achievements
</td>
<td> : </td>
<td><?php echo $print->Acheivements;?>
<button style="float:right;"><a style="color: white;" href="<?php echo $print->Home_page_Link;?>" target="_blank" rel="noopener"> More Info </a> </button>
</td>
</tr>
</tbody>
</table>
</div>
<?php }
?>
It has given me as expected, but the problem is,
when I click the bar, it should show me the dropbox which contains the details of the speaker. But it is not showing.
It seems like the link is not available.
How to rectify this??
I have around 60 speakers and for everybody, writing html code manually does not sound like good idea.
Link of the page is given here: Click here
In the above link, the problem is with the invited speakers list.
Thanks in advance
CSS:
.maindrop {
width: 100%;
}
.bar {
padding: 0px;
display: block;
border-bottom:1px solid #06394D;
text-decoration: none;
font-family: "Times New Roman", Times, serif;
font-size: 18px;
font-weight:300;
transition: .5s ease-out;
}
.bar:hover {
background: #F6F7F7;
padding: 15px;
text-decoration: none;
}
.dropbox {
max-height: 0;
transition: .2s ease-out;
overflow: hidden;
width: 100%;
}
.dropbox:target {
max-height: 5000px;
}
Assuming you're using Bootstrap 3, '.dropbox' does not exist as a class. What I believe you're looking for is an Accordion, which can be found under the Collapse documentation section.
Here is a little sample that should get you started in the right direction. The $count is there to make sure each row has a unique identifier to open it's associated accordion. I simplified the markup from which you have but you should be fine replacing with what you need.
<table style="width:100%">
<?php
$count = 0;
foreach($result as $print): ?>
<tr data-toggle="collapse" href="#collapseExample-<?php echo $count; ?>" aria-expanded="false" aria-controls="collapseExample-<?php echo $count; ?>">
<td>Speaker Name</td>
<td>Speaker Description</td>
</tr>
<tr class="collapse" id="collapseExample-<?php echo $count?>">
<td>This should be hidden</td>
</tr>
<?php $count++; endforeach; ?>
</table>

Alignment Issues With Headers [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am having trouble with my alignment issues for my headers on my website,
http://questdesign.com.au/index.php/folio
Here is the code for my Folio page.
<table>
<tbody>
<tr>
<td><img src="images/quest_design_folio_web_header.png" alt="" width="954" height="51" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="985">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_websites_subheader.png" alt="" width="895" height="45" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="981">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_allison_driscoll_author_ebook_website.jpg" alt="" width="144" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_ironmonger_heavy_metal_rock_music_website.jpg" alt="" width="160" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_website.jpg" alt="" width="160" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_silence_no_more_music_website.jpg" alt="" width="160" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="983">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="images/quest_design_folio_social_media_subheader.png" alt="" width="895" height="45" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="984">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_emmerson_legal_social_media_branding.jpg" alt="" width="180" height="89" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_social_media_branding.jpg" alt="" width="180" height="89" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_lifestyle_maximiser_social_media_branding.jpg" alt="" width="180" height="85" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rock_solid_personal_training_social_media_branding.jpg" alt="" width="180" height="85" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="982">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="images/quest_design_folio_online_marketing_material_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="982">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_adam_quinn_social_media_marketing.jpg" alt="" width="180" height="97" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_allison_driscoll_author_ebook_social_media_marketing.jpg" alt="" width="180" height="122" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_emmerson_legal_social_media_marketing.jpg" alt="" width="180" height="113" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_social_media_marketing.jpg" alt="" width="180" height="135" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<p> </p>
<table>
<tbody>
<tr>
<td><img src="images/quest_design_folio_design_header.png" alt="" width="954" height="51" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="981">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_logos_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="981">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_australian_academy_kung_fu_logo.jpg" alt="" width="180" height="141" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kettlebell_strength_logo.jpg" alt="" width="180" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rawgasm_logo.jpg" alt="" width="180" height="57" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rock_solid_personal_training_logo.jpg" alt="" width="180" height="90" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_business_cards_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="978">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_emmerson_legal_business_card.jpg" alt="" width="180" height="110" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_mickyfit_training_business_card.jpg" alt="" width="180" height="110" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rawgasm_business_card.jpg" alt="" width="180" height="110" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rock_solid_personal_training_business_card.jpg" alt="" width="180" height="110" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="980">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_flyers_brochures_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td style="text-align: center;"><img src="http://www.questdesign.com.au/images/headers/quest_design_emmerson_legal_flyer.jpg" alt="" width="180" height="85" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_fifth_dimension_music_rave_flyer.jpg" alt="" width="85" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_flyer.jpg" alt="" width="180" height="85" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_rawgasm_flyer.jpg" alt="" width="85" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_book_covers_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_beginners_guide_to_bodybuilding_book_cover.jpg" alt="" width="124" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_blades_of_the_fae_book_cover.jpg" alt="" width="127" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_carpentry_bible_book_cover.jpg" alt="" width="127" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_drifter_book_cover.jpg" alt="" width="120" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_album_covers_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="978">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_earth_rhythm_album_cover.jpg" alt="" width="180" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_glasgow_kiss_album_cover.jpg" alt="" width="180" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_ironmonger_album_cover.jpg" alt="" width="180" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_sarah_cooper_album_cover.jpg" alt="" width="180" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="978">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_posters_banners_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="978">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_adam_quinn_music_promotional_poster.jpg" alt="" width="119" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_bitten_by_productions_beyond_babylon_theatre_poster.jpg" alt="" width="127" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_ironmonger_heavy_metal_music_promotional_poster.jpg" alt="" width="180" height="127" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_mickyfit_training_boot_camp_fitness_poster.jpg" alt="" width="127" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="977">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_stationary_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="976">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_emmerson_legal_stationery.jpg" alt="" width="180" height="98" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_letterhead_stationery.jpg" alt="" width="127" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_kate_brock_personal_trainer_membership_card_stationery.jpg" alt="" width="180" height="102" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/rawgasm_stationary_example_quest_design.jpg" alt="" width="127" height="180" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<p> </p>
<table>
<tbody>
<tr>
<td><img src="images/quest_design_folio_image_header.png" alt="" width="954" height="51" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="983">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_retouching_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="982">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images//headers/quest_design_luke_glamour_retouching.jpg" alt="" width="180" height="135" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_matt_monica_glamour_retouching.jpg" alt="" width="180" height="117" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_monica_glamour_retouching.jpg" alt="" width="180" height="105" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_tegan_glamour_retouching.jpg" alt="" width="180" height="135" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<table style="height: 23px;" width="981">
<tbody>
<tr>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/quest_design_folio_restoration_subheader.png" alt="" /></td>
</tr>
</tbody>
</table>
<table style="height: 23px;" width="979">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_family_image_restoration.jpg" alt="" width="125" height="180" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_little_girl_image_restoration.jpg" alt="" width="180" height="131" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_soldier_image_restoration.jpg" alt="" width="180" height="128" /></td>
<td><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.questdesign.com.au/images/headers/quest_design_toddler_image_restoration.jpg" alt="" width="180" height="56" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<p> </p>
Any chance you can let me know what I might have missed out on. They show up centered on Mozilla firefox but in Chrome it aligns more to the right hand side.
You can change width: 982px; TO width="100%".
You can refer attached image.
If you want more details on what width: 100% do, you can refer this link :-
http://www.impressivewebs.com/width-100-percent-css/
It seems that Chrome is setting the width=985px, as per the attribute on the HTML element, whereas Safari (and Firefox) are respecting the max-width: 100% (960) value in the CSS. Remove that attribute to fix!

php html table based gallery grid loop

I am trying make a gallery in a html template using PHP loop.
But I having to write the gallery as a fixed table, so using <td> for each image and spacing element. And then on a new row, it creates a new table.
I guess I'm doing this to avoid any issues in old Outlook.
I've created my solid html layout, this is how I need it to output, see below...
<!-- 1st row -->
<table border="0" cellspacing="0" cellpadding="0" style="width: 579px;" align="center">
<tr>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-1.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-2.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-3.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-4.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
</tr>
</table>
<!-- 2nd row -->
<table border="0" cellspacing="0" cellpadding="0" style="width: 579px;" align="center">
<tr>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-5.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-6.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-7.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<td style="width: 135px; height: 148px;" valign="top">
<img src="img/image-8.jpg" height="135" width="135" style="width: 135px; height: 135px; background: red;" alt="" />
</td>
</tr>
</table>
Which outputs this...
My problem I am having is that I can have from 1 to a unlimited amount of images in my gallery.
So my PHP is little more complicated to write.
This is my attempt below but is a bit ropey.
<?php
$images = get_field('image_thumbnails');
if( $images ): ?>
<?php $count = 0; ?>
<table border="0" cellspacing="0" cellpadding="0" style="width: 579px;" align="center">
<tr>
<?php foreach( $images as $image ): $count++ ?>
<td style="width: 135px; height: 148px;" valign="top">
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" height="135" width="135" style="width: 135px; height: 135px; border: none;" />
</td>
<?php if ($count %4 == 0) { ?>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" style="width: 579px;" align="center">
<tr>
<?php } else { ?>
<td style="width: 13px; height: 148px;"><!-- space --></td>
<?php } ?>
<?php endforeach; ?>
</tr>
</table>
<?php endif;
?>
Please see my testings using this code with:
4 images
I get this error: end tag for "tr" which is not finished
3 images
Valid no errors but looks weird cause it spaces out
6 images
Valid no errors but looks weird cause it spaces out
1 image
Valid and aligns to the left... weird.
My question can any one help me come with a PHP loop at works better than mine and does not leave any syntax errors with any given image count?
use array_chunk:
$images = get_field('image_thumbnails');
if( $images ) {
$count = count( $images );
for( $i =0; $i < $count % 4; $i++ ) {
// align array
array_push($images, array());
}
$rows = array_chunk($images, 4);
?>
<table border="0" cellspacing="0" cellpadding="0" style="width: 579px;" align="center">
<?
foreach( $rows as $row ) {
?><tr><?
foreach ($row as $image) {
?>
<td style="width: 135px; height: 148px;" valign="top">
<? if ( empty( $image ) ) {
?> <?
} else {
?><img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" height="135" width="135" style="width: 135px; height: 135px; border: none;" /><?
}
?>
</td>
<?
}
?></tr><?
}
?>
</table>
<?
}
Try this solution,..
I am not writing the whole code but giving you some logic to implement your desired layout..
<?php
$count = ceil(mysql_num_rows($query)); //number of tables
for($i=0;$i<$count;$i++)
{
?>
<table>
<tr>
<?php
$num = $j*4;
for($j=($num);$j<($num+3);$j++)
{
echo "<td><img src='".$image."'></td>"
}
</tr>
</table>
}
?>

DOMPDF hangs when table spans pages

I updated from dompdf 0.5 to 0.6 b3 in order to get better support of some CSS I'd like to
use when generating a PDF in an application.
In the old code version, my current page generation worked fine - one table spanned multiple pages with no problem.
But in the new version, DOMPDF hangs once the code tries to generate a PDF where a table spans onto another page.
My error logs give me
PHP Fatal error: Maximum execution time of 60 seconds exceeded in
../sfDomPDFPlugin/lib/dompdf/include/frame.cls.php on line 374...
I figure it's a CSS rule, but I'm not clear on what it might be. Suggestions?
Update: Here's some example code that fails. I had to cut it down a bit,
but it includes you all of the relevant tags.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>PDF</title>
<style type="text/css">
body
{
font-family: Helvetica, Arial, sans-serif;
background-image: url('/images/draft_watermark_small.png');
}
th {
font-size: 8pt;
}
#sf_admin_container ul, #sf_admin_container ol, #sf_admin_container li, #sf_admin_container h1, #sf_admin_container h2, #sf_admin_container h3, #sf_admin_container h4, #sf_admin_container h5, #sf_admin_container h6, #sf_admin_container pre, #sf_admin_container form, #sf_admin_container body, #sf_admin_container html, #sf_admin_container p, #sf_admin_container blockquote, #sf_admin_container fieldset, #sf_admin_container input { margin: 0; padding: 0; }
#sf_admin_container a img,:link img,:visited img { border: none; }
#sf_admin_container td
{
margin: 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 8px;
background-color: #fff;
padding: 2px;
}
#sf_admin_container p
{
margin-bottom: 5px;
}
#sf_admin_container h1
{
margin: 2px 0pt;
padding: 3px;
padding-left: 0px;
color: #555;
font-family: Helvetica, Arial, Verdana, sans-serif;
font-size: 22px;
}
#sf_admin_container .sf_admin_default_action
{
background-color: #fc6 !important;
font-weight: bold !important;
}
#sf_admin_container .sf_admin_list
{
width: 100%;
border: 1px solid #000;
border-bottom: 1px;
border-right: 1px;
border-collapse: collapse;
}
#sf_admin_container .sf_admin_list th
{
color: #fff;
padding: 2px;
background-color: #900;
text-align: left;
}
#sf_admin_container .sf_admin_list th a
{
color: #333;
}
#sf_admin_container .sf_admin_list td
{
padding: 2px;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
#sf_admin_container .sf_admin_filters li
{
list-style-type: none;
}
#sf_admin_container .sf_admin_row_0 td
{
background-color: #eee;
}
#sf_admin_container .sf_admin_row_1 td
{
border-bottom: 1px solid #FFF;
background-color: #EEF;
}
#sf_admin_container .sf_admin_row_2 td
{
}
#sf_admin_container .sf_admin_row_total td
{
border: 2px solid #000;
}
#sf_admin_container #heading
{
color: #fff;
background-color: #900;
padding: 3px;
font-size: 14pt;
font-weight: bold;
text-align: center;
}
#sf_admin_container #heading-bold
{
font-weight: bold;
}
#sf_admin_container #heading-total
{
color: #fff;
padding: 2px;
background-color: #900;
text-align: left;
}
div.wysiwyg-view h1
{
font-size: 2em; margin: .67em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view h2
{
font-size: 1.5em; margin: .75em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view h3
{
font-size: 1.17em; margin: .83em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view ol, ul, dir,
menu, dd { margin-left: 40px !important;}
div.wysiwyg-view ol { list-style-type: decimal !important; }
div.wysiwyg-view ol ul, ul ol,
ul ul, ol ol { margin-top: 0; margin-bottom: 0; }
div.wysiwyg-view blockquote { margin-left: 40px !important; margin-right: 40px !important;}
#watermark { position: fixed; bottom: 0px; right: 0px; width: 200px; height: 200px; opacity: .5; }
</style>
</head>
<body>
<div id="sf_admin_container">
<table width="100%">
<tbody>
<tr>
<td>
<img width="500" src="https://test-quote.expedient.com/images/expedient-logo-010313.png">
</td>
<td width="40%" style="border: 1px solid #000;vertical-align: top;padding: 0px;">
<div id="heading" style="font-size: 14pt;vertical-align: top;"> Quotation # 40414 </div>
<br>
<div style="left: 2px;position: relative;">
1050 Hull Street
<br>
Baltimore, MD 21230
<br>
Phone: 410-209-6700
<br>
www.datapointinc.com
<br>
<br>
Date: 03/14/13
</div>
</td>
</tr>
<tr>
<td colspan="2">
<table class="sf_admin_list" width="100%">
<tbody>
<tr>
<td id="heading" width="100%" colspan="6">
<b>Sample Quote</b>
</td>
</tr>
<tr>
<td id="heading-bold" width="40%">
<center> QUOTED FOR </center>
</td>
<td id="heading-bold" width="12%">
<center> SALES REP </center>
</td>
<td id="heading-bold" width="12%">
<center> SALES ENGINEER </center>
</td>
<td id="heading-bold" width="12%">
<center> CONTRACT TERM </center>
</td>
<td id="heading-bold" width="12%">
<center> TERMS </center>
</td>
<td id="heading-bold" width="12%">
<center> EST. DELIVERY </center>
</td>
</tr>
<tr>
<td>
<center> CeraTech (Kim Shumaker) </center>
</td>
<td>
<center> Geoffrey Maddock </center>
</td>
<td>
<center> Brian Willis </center>
</td>
<td>
<center> 36 Months</center>
</td>
<td>
<center> Net 30</center>
</td>
<td>
<center> 3.00 weeks </center>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table class="sf_admin_list">
<tbody>
<tr>
<th style="width: 1em;">
<center>SKU</center>
</th>
<th style="width: 1em;">
<center>Type</center>
</th>
<th style="width: 1em;">
<center>Quantity</center>
</th>
<th>Name</th>
<th style="width: 4em;">
<center>Unit</center>
</th>
<th style="width: 4em;">
<center>One Time Costs</center>
</th>
<th style="width: 4em;">
<center>Monthly Recurring Cost</center>
</th>
</tr>
<tr>
<td id="topmenu" style="background-color: #ccc;text-align:center;" colspan="7">Cleveland (151)</td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Managed Virtualization</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 1</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396047">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396047">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396047">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396047" style="color:#333; text-indent: 10px;"> 1Ghz Peak, .5Ghz Average CPU; 1GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 1</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396051">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396051">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396051">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396051" style="color:#333; text-indent: 10px;"> 1Ghz Peak, .5Ghz Average CPU; 1GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 2 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 1 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396048">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396048">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396048">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396048" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 2 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 1 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396049">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396049">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396049">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396049" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 4 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 2 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396050">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396050">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396050">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396050" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 5 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 3</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396052">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396052">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396052">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396052" style="color:#333; text-indent: 10px;"> 3Ghz Peak, 1.5Ghz Average CPU; 3GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="topmenu" style="background-color: #ccc;text-align:center;" colspan="7">Baltimore - 1050 Hull St.</td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Managed Virtualization</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 7 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 4</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396024">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396024">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396024">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396024" style="color:#333; text-indent: 10px;"> 4Ghz Peak, 2Ghz Average CPU; 4GB RAM (File)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 8 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 4 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396025">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396025">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396025">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396025" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 396 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 8</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396045">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396045">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396045">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396045" style="color:#333; text-indent: 10px;"> 8Ghz Peak, 4Ghz Average CPU; 8GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Shared Managed Firewall</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 168 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Managed Firewall - Level 2</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396030">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396030">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396030">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396030" style="color:#333; text-indent: 10px;"> 3 Mbps Sustained Bandwidth, 2 VLAN's, Up to 20 Rules</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 169 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Managed Firewall - Level 2 - Setup and Configuration</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396018">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396018">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396018">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396018" style="color:#333; text-indent: 10px;"> Managed Firewall Configuration (2 hours maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Colocation and Data Center Connectivity</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 221 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 3 </div>
</td>
<td>
<div>
<b>Mbps Dedicated Internet Access to Colocation - Burstable</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396020">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396020">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396020">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396020" style="color:#333; text-indent: 10px;"> Sustained Internet Access burstable to 10Mbps ($150/Mbps)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td colspan="4"></td>
<td width="50px">
<center>
<b>TOTAL</b>
</center>
</td>
<td id="heading-total" width="50px" style="text-align: right;">
<div id="lineitem_nrp_grand">$0.00</div>
</td>
<td id="heading-total" width="50px" style="text-align: right;">
<div id="lineitem_mrp_grand">$0.00</div>
</td>
</tr>
</tbody>
</table>
<div style="border: 1px solid #000;padding: 5px; margin-right: 3px; font-size: 8px;">
<div class="wysiwyg-view"> </div>
All product, service and pricing information is based on latest information available.
<br>
Subject to change without notice or obligation. Quote subject to, and not inclusive of, applicable shipping, handling and tax.
</div>
</div>
</body>
</html>
Thanks to Brian S. He mentioned that it worked for him with 0.6.0 beta 3, but not the latest, unreleased code. That made me double check, and it looks like I HAD swapped in the latest code to test something. Reverting back to that release version, I got this working.

Categories