Packageindex Classtrees Modulegroups Elementlist Report XML Files

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.
| <?php | $calendar = new CCalendar(); | ?> | ... | <table> | <?php | $calendar->render(getdate(), array( | array ( | "year" => 2001, "mon" => 5, "mday" => 1, | "href" => "http://events.com/may/party.html", | "text" => "Welcome to Funny Party!" | ), | ... | )); | ?> | </table> 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

 

Methods inherited from CSnippet

csnippet, append, qualify, getglobal, setglobal, write, flush, writecode

Public Method Summary

void

CCalendar(array $weekdays, string $empcell)

No additional comments.

Private Method Summary

void

render_month([ integer $thedate, array $linkdays ])

Renders specified month.
void

render(integer $thedate, array $linkdays)

No additional comments.

Fields inherited from CSnippet

$id

Private Field Summary

string

$empcell

array

$weekdays

array

$monthdays

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

>>"&nbsp;"<<



$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)<<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta