Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2429
| From | Co <vonclausowitz@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | show events in calendar |
| Date | 2011-07-03 08:13 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <18841eca-e34d-47e6-91ca-eec95b035948@fv14g2000vbb.googlegroups.com> (permalink) |
Hi All,
I got me some code to show a month calendar and I have a database with
events.
Now I want to show the events on the calendar. When there is an event
on day X I want
the number to be bold and on a mouse over display the details of the
event.
Can anyone help me with this?
here is my code:
<< I didn't put all the code which builds the calendar >>
// Build the heading portion of the calendar table
echo "<table class=\"maintable\">\n".
"<tr class='headline'>\n".
"<td colspan=\"7\">\n".
"<table align=\"center\">\n".
"<tr class='headline'>\n".
"<td colspan=\"2\" width=\"75\" align=\"left\">$previous_link</td>
\n".
"<td colspan=\"3\" width=\"150\" align=\"center\">$month_name
$year</td>\n".
"<td colspan=\"2\" width=\"75\" align=\"right\">$next_link</td>
\n".
"</tr>\n".
"</table>\n".
"</td>\n".
"<tr class='mainrow'>\n".
"<td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</
td><td>S</td>\n".
"</tr>\n";
// Now we break each key of the array
// into a week and create a new table row for each
// week with the days of that week in the table data
$i = 0;
while (list(, $week) = each($weeks))
{
echo "<tr class='mainrow'>\n";
while (list(, $d) = each($week)){
if($i < $offset_count){
//$day_link = "<a href=\"".$_SERVER['PHP_SELF']."?
date=".mktime(0, 0, 0, $month -1, $d, $year)."\">$d</a>";
echo "<td class=\"nonmonthdays\">$day_link</td>\n";
}
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>";
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'> </td></
tr>";
echo '</table>';
Regards
Marco
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 08:13 -0700
Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 18:40 +0200
Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 09:52 -0700
Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 19:24 +0200
Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 10:32 -0700
Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 19:43 +0200
Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 10:56 -0700
Re: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 14:19 -0400
Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 12:00 -0700
Re: show events in calendar The Natural Philosopher <tnp@invalid.invalid> - 2011-07-03 21:22 +0100
Re: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 17:02 -0400
Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 14:43 -0700
tRe: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 17:01 -0400
csiph-web