|
Posted by caine on 02/08/07 08:58
I wanted to add current date and shade the day with different color.
However, I've tried and it works when the $_POST['month']) and
$_POST['year'] are empty. I added these:
$currentday = $components['mday'];
if($currentday == $counter)
$rip_currentday = "$year-$month-$currentday 22:36:40";
//construct new row if 7th column is reached
if($firstweekday == 0)
{
//$firstweekday =0;
$output .="</tr><tr>";
echo "skjsksl";
if (in_array($ripdate, $eventday))
{
if (in_array($rip_currentday, $eventday) && $currentday ==
$counter)
{
echo "today";
$output .="<td class=\"today\"><a href=\"viewnews.php?d=$year-
$month-$counter\" target=\"_blank\">$counter</a>";
$output .="<input name=\"d\" type=\"text\" type=\"hidden\" value=
\".$d.\"></td>\n";
}
else
{
echo "2iuwiruo";
$output .="<td class=\"event\"><a href=\"viewnews.php?d=$year-
$month-$counter\" target=\"_blank\">$counter</a>";
$output .="<input name=\"d\" type=\"text\" type=\"hidden\" value=
\".$d.\"></td>\n";
}
}
else
{
if ($currentday == $counter)
{
echo "else_today";
$output .="<td class=\"today\">$counter</td>\n";
}
else
{
echo "qoiwwo";
$output .="<td>$counter</td>\n";
}
}
}
I hope to get current day displayed althought the $_POST['month']) and
$_POST['year'] are "isset". I inserted the $currentday =
$components['mday']; in the isset loop, but it appears to have the
similar number shaded with different color whenever I change to next
month or previous month. Can anybody help?
Navigation:
[Reply to this message]
|