-Karl- Posted July 5, 2010 Share Posted July 5, 2010 Okay, here's my code: if (($_GET['page']=='dedi') && $_GET['plan']=='10tb') { echo '<table style="-moz-border-radius:10px;"><thead><tr><td class="Features">Features</td>'; for ($i=0; $i<$Cols; $i++) { echo '<td>'.$Products[$i]['Name'].'</td>'; } echo '</tr></thead>'; $titlesded100 = array('CPU','HDD','RAM','IP\'s','Bandwidth','Uplink Port','OS'); $count = count($titlesded100); foreach ($titlesded100 as $value) { echo '<tr><td class="Features">'.$titlesded100[$t].'</td>'; $plan = explode('<br/>', $Features[0]); foreach($features as $feature) { echo '<td>' . $feature[$t] . '</td>'; } $t++; echo '</tr>'; } } echo '</tr><tr><td></td>'; for ($i=0; $i<$Cols; $i++) { if ($Products[$i]['Price']=='free') echo '<td><span class="PlanPrice">Free</span><br/><a href="http://test.fibrenetworks.org/clients/cart.php?a=add&pid='.$Products[$i]['Id'].'"><img src="/images/ordernow.png" /></a></td>'; else echo '<td><span class="PlanPrice">€'.$Products[$i]['Price'].'</span>/month<br/><a href="http://test.fibrenetworks.org/clients/cart.php?a=add&pid='.$Products[$i]['Id'].'"><img src="/images/ordernow.png" /></a></td>'; } echo '</tr></table>'; This works fine, it outputs the appropriate packages in the table. However, the list is 13 (horizontally) and that's too wide for the page, I've been tried to split it to show 6 results, per table. Then it will do another table. However, I can't get my head around it, I won't show what I've tried as they've turned out to be useless, this is fully working as a standalone. Any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/ Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 http://www.phpfreaks.com/forums/index.php/topic,95426.0.html Its the same concept/idea... You will find your anwer there. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081518 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 That's the basic concept I tried, but I couldn't get my head around it. Not with the layout of my code anyway. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081540 Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 That's the basic concept I tried, but I couldn't get my head around it. Not with the layout of my code anyway. I am quite sure if you understand the basics of that you should have no problem applying it to your own code. Try doing it on a new page and doing a simple mysql fetch and integrating that code.. then go on to use it in your code up there.. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081546 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 You'd assume so wouldn't you. But since the headings are separate to the rest of it, it's annoying. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081552 Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 You'd assume so wouldn't you. WE cant write the code for you, THATS a perfectly clear example provided, I dont know what you dont understand about it. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081553 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 Excuse me? Try talking to people with a bit of damn courtesy. I'm simply asking for help, not asking for anyone to write it for me. If you knew a thing about me, you'd notice I post here frequently and I've helped a lot of people. Don't turn this into a flame fest. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081555 Share on other sites More sharing options...
ignace Posted July 5, 2010 Share Posted July 5, 2010 Drop the <table> and use a <div> instead. Float all child <div>'s, they'll auto cut-off on 6 elements. <div id="main"> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> <div class="box"> </div> </div> #main { width: 720px; } .box { float: left; margin-left: 20px; width: 100px; } Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081556 Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 Excuse me? Try talking to people with a bit of damn courtesy. I'm simply asking for help, not asking for anyone to write it for me. If you knew a thing about me, you'd notice I post here frequently and I've helped a lot of people. Don't turn this into a flame fest. Please don't get offended or anything, I didn't mean to come off like that. You asked for help and I simply directed you to a page where there is a perfectly CLEAR example of what you need to know. Spend some time practicing it and you'll eventually get the hang of it, then you can try it again on your own code. You could have posted the attempt you made also and we coulda have helped you based on that.. Again pardon me if I came off like a jerk. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081560 Share on other sites More sharing options...
ignace Posted July 5, 2010 Share Posted July 5, 2010 Again pardon me if I came off like a jerk. You can haz no cheezburger Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081566 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 The problem I'm facing is the first part does the headings for all of the products it finds, in this case there's 11. Then it displays the information for each of the 11 headings. so: heading1 heading2 heading3 then it shows content1 content2 content3 These are two separate foreach's, so creating this to end the <tr> and the <table> then create a new table underneath the first lot of headings and content is pretty annoying. If it was all displaying together, it would be far easier. But it doesn't. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081568 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 Looks to me that I need to recode if (($_GET['page']=='dedi') && $_GET['plan']=='10tb') { echo '<table style="-moz-border-radius:10px;"><thead><tr><td class="Features">Features</td>'; for ($i=0; $i<$Cols; $i++) { echo '<td>'.$Products[$i]['Name'].'</td>'; } echo '</tr></thead>'; $titlesded100 = array('CPU','HDD','RAM','IP\'s','Bandwidth','Uplink Port','OS'); $count = count($titlesded100); foreach ($titlesded100 as $value) { echo '<tr><td class="Features">'.$titlesded100[$t].'</td>'; $plan = explode('<br/>', $Features[0]); foreach($features as $feature) { echo '<td>' . $feature[$t] . '</td>'; } $t++; echo '</tr>'; } } That in order to get it to work, I can't think of any work around to it. Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081574 Share on other sites More sharing options...
-Karl- Posted July 5, 2010 Author Share Posted July 5, 2010 Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/206797-whmcs-integration-problem/#findComment-1081594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.