As of right now it shows current and next month, and I want it to show next month and month after next.
I've tried skipping first item in array, but then it only shows one month instead of two (yes, I've raised array limit to 3).
Anyways, I'd really appreciate some help with this.
Here is the code:
<?php
$oneMonth = VarsItem::getVarsValue('oneMonthTravel');
$oneMonth == ($oneMonth == '') ? 1 : $oneMonth;
$monthAll = TravelItem::getAllMount(array('limit' => 2, 'start' => $oneMonth));
if (sizeof($monthAll) > 0)
{
$i = 0; ?>
<!-- распорка -->
<table border="0" cellspacing="0" cellpadding="0" width="520" align="center">
<tr valign="top">
<td width="100%"><img src="/image/0.gif" width="1" height="15" border="0" /></td>
</tr>
</table>
<a name="inquirer"></a>
<table border="0" cellspacing="0" cellpadding="0" width="520" align="center">
<tr valign="top">
<td align="center" colspan="2"><img src="/image/where.gif" width="505" height="16" border="0" /></td>
</tr>
<tr valign="top">
<?
foreach ($monthAll as $onemonth)
{
$i++;
?>
<td width="260">
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="latestmain">
<tr><td colspan="2"><h3><%= strtoupper(monthAll($onemonth["month_id"],'namer')) %></h3></td></tr>
<?
$rowTravel = TravelItem::SelectAll(array('month_id' => $onemonth["month_id"], 'is_show' => 1));
foreach ($rowTravel as $onerowTravel)
{
$style ='style="padding-left:5px;"';
$partArray = checkEmptyPartitions($part, CountryItem::getCountryWorkName($onerowTravel['country_id']));
$hrefTravel = CountryItem::getCountryWorkName($onerowTravel['country_id'])."/".(($partArray["$part"] == 1) ? $part.'/' : ""); ?>
<tr valign="top">
<td><img src="/image/bullet-a.gif" width="9" height="9" border="0" style="margin-top:2px;" /></td>
<td width="100%" <%= $style %>><b><span id="orange"><%= CountryItem::getCountryName($onerowTravel['country_id']) %>:</span></b> <small><%= $onerowTravel['title'] %> <a href="<%= $hrefTravel %>">more...</a></small></td>
</tr>
<?
} ?>
</table>
</td>
<?
} ?>
</tr>
<tr valign="top">
<td colspan="<%= $i+1 %>">
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="latestmain">
<tr><td><a href="travel.htm">where to go another month</a></td></tr>
</table>
</td>
</tr>
</table>
<?
} ?>
