FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » show events in calendar
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: show events in calendar [message #174756 is a reply to message #174755] Sun, 03 July 2011 17:56 Go to previous messageGo to previous message
Co is currently offline  Co
Messages: 75
Registered: May 2011
Karma:
Member
On 3 jul, 19:43, Luuk <L...@invalid.lan> wrote:
> On 03-07-2011 19:32, Co wrote:
>
>
>
>
>
>
>
>
>
>> On 3 jul, 19:24, Luuk <L...@invalid.lan> wrote:
>>> On 03-07-2011 18:52, Co wrote:
>
>>>> I thought a newsgroup was about people with knowledge helping those
>>>> without.
>>>> Apparently you are only here to humiliate people.
>
>>> This place is here to help people to learn,
>
>>> Not to write code for people who are too lazy to learn.
>
>>> --
>>> Luuk
>
>> and who are you to judge people?
>> don't pretend you know people after a few lines of text.
>> people like you get us killed in battle.
>
>> Marco
>
> Have a nice life,
> I will try to stop doing anything with questions you ask...
>
> ;)
>
> --
> Luuk

I managed to highlight the days on which an event is planned by
querying the database:

if(($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset))
{
$datecount=mktime(0, 0, 0, $month -1, $d, $year);
$day_link = "<A href=\"javascript:popWin('editcalendar.php?ID=
$datecount', 350, 400)\">$d</a>";
$query = "SELECT * FROM bl_calender";
$r = mysql_query ($query) or die ("Query error: ".mysql_error());
while($row=mysql_fetch_array($r)) {//Array or records stored in
$row
if($row['dateclass']==$datecount) {
$day_link = "<A href=\"javascript:popWin('editcalendar.php?ID=
$datecount', 350, 400)\"><FONT style='BACKGROUND-COLOR: yellow'>$d</
font></a>";}
}

if($date == mktime(0, 0, 0, $month, $d, $year)){
echo "<td><A href=\"javascript:popWin('editcalendar.php?
ID=$datecount', 350, 400)\"><font color='red'><b>$d</b></font></a></
td>\n";
} else {
echo "<td class=\"days\">$day_link</td>\n";
}
} elseif(($outset > 0)) {
if(($i >= ($num_weeks * 7) - $outset)){
$day_link = "";
echo "<td class=\"nonmonthdays\">$day_link</td>\n";
}
}
$i++;
}
echo "</tr>\n";
}

// Close out your table and that's it!
echo "<tr class='headline'><td colspan='7' class='days'>&nbsp;</td></
tr>";
echo '</table>';

The strange thing is that the current day should be red but only in
July in this case.
However when I browse to another month there day 3 is also in red.

Marco
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Get day and month part from date
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:24:22 GMT 2024

Total time taken to generate the page: 0.03148 seconds