[eluser]draconus[/eluser]
Just in case its needed, here is the view code in question:
Code:
<?php
if ($this->session->flashdata('message')){
echo "<div class='status_box'>".$this->session->flashdata('message')."</div>";
}
?>
<table id="calendar" cellspacing="0">
<thead>
<tr>
<th>
<?php echo anchor('calendar/index/'.$previous_month,'«', array('title'=>$previous_month_text));?>
</th>
<th id="month" colspan="5"><?=$current_month_text?></th>
<th>
<?php echo anchor('calendar/index/'.$next_month,'»', array('title'=>$next_month_text));?>
</th>
</tr>
<tr>
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
</tr>
</thead>
<tr>
<?php
for($i=0; $i< $total_rows; $i++)
{
for($j=0; $j<7;$j++)
{
$day++;
if($day>0 && $day<=$total_days_of_current_month)
{
//YYYY-MM-DD date format
$date_form = "$current_year/$current_month/$day";
echo '<td';
//check if the date is today
if($date_form == $today)
{
echo ' id="today"';
}
//check if any event stored for the date
if(array_key_exists($day,$events))
{
//adding the date_has_event class to the <td> and close it
echo ' class="date_has_event"> ';
echo anchor("calendar/dayevents/".$current_year."-".$current_month."-".$day,$day);
//adding the eventTitle and eventContent wrapped inside <span> & <li> to <ul>
echo '<div class="events"><ul>';
foreach ($events as $key=>$event){
if ($key == $day){
foreach ($event as $single){
echo '<li>';
echo anchor("calendar/edit/$single->id",'<span class="title">'.$single->eventTitle.'</span><span class="desc">'.$single->eventContent.'</span>');
echo '</li>';
} // end of for each $event
}
} // end of foreach $events
echo '</ul></div>';
} // end of if(array_key_exists...)
else
{
//if there is not event on that date then just close the <td> tag
echo '> '.$day;
}
echo "</td>";
}
else
{
//showing empty cells in the first and last row
echo '<td class="padding"> </td>';
}
}
echo "</tr><tr>";
}
?>
</tr>
</table>
</div>
Any help would be appreciated, since it makes no sense to me why the passing of the variables into the function is causing the routing issue...