|
|
File: g:\Work\WWW\php\tbox\lib/ccalendar.phps
PHP Documentation - PHP/Toolbox
CCalendar
CSnippet | +-- CCalendar
Calendar class.
|
private class CCalendar extends CSnippet
Calendar class.
|
| ...
|
| render(getdate(), array(
| array (
| "year" => 2001, "mon" => 5, "mday" => 1,
| "href" => "http://events.com/may/party.html",
| "text" => "Welcome to Funny Party!"
| ),
| ...
| ));
| ?>
|
The presentation is controlled by CSS:
- .calmonth - month class
- .calweek - weekday class
- .calempty - 'empty' day class
- .calday - ordinary day class
- .caltoday - today's class
- .calhref - link a-tag class
- .caltext - link text class
|
|
|
|
|
|
Fields inherited from CSnippet |
$id |
|
|
Public Method Details |
CCalendar |
public void CCalendar( array $weekdays, string $empcell )
|
|
No additional comments.
|
Parameter |
|
array |
$weekdays |
|
|
No additional comments. |
string |
$empcell |
|
|
No additional comments. |
|
Returns |
void |
|
|
Private Method Details |
render_month |
private void render_month( [ integer $thedate, array $linkdays ] )
|
|
Renders specified month.
|
Parameter |
|
integer |
$thedate |
= >>0<<
|
|
- the date (e.g. getdate($thedate));
the current date (getdate()) is used if it's not specified (0). |
array |
$linkdays |
= >>array()<<
|
|
- array of links to specified dates; each link is:
array (
"year" => 2001, // event year
"mon" => 5, // event month
"mday" => 1, // event day in the month
"href" => "http://events.com/may/party.html", // the link
"text" => "Welcome to Funny Party!" // the link text
);
The link text can be omitted, if not then template tag will be
substituted with the link's date.
It's also possible to assign several links to one date -- they all will be listed. |
|
Returns |
void |
|
render |
private void render( integer $thedate, array $linkdays )
|
|
No additional comments.
|
Parameter |
|
integer |
$thedate |
|
|
No additional comments. |
array |
$linkdays |
|
|
No additional comments. |
|
Returns |
void |
|
|
Private Field Details |
$empcell |
private string $empcell
>>" " <<
|
|
$weekdays |
private array $weekdays
>>array("Mo","Tu","Wd","Th","Fr","St","Su") <<
|
|
$monthdays |
private array $monthdays
>>array(0,31,28,31,30,31,30,31,31,30,31,30,31) <<
|
|
|
|
|
PHPDoc 1.0beta |