Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 PHP Code: Quick calendar example Jump to:  
Category: >> PHP Code >> Quick calendar example Bookmark and Share

<< lastnext >>

Snippet Name: Quick calendar example

Description: Very easy calendar generating code.

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009

<?PHP
 
        INCLUDE( 'pccalendar.php3' ); 
 
        CLASS myCalendar EXTENDS pcCalendar 
        { 
                FUNCTION myCalendar() 
                { 
                        /* Override the constructor function.  Default is to use long names for the days 
                           of the week, but we want a small and cute calendar. */ 
 
                        $this->gaWeekTitles[] = "Su"; 
                        $this->gaWeekTitles[] = "Mo"; 
                        $this->gaWeekTitles[] = "Tu"; 
                        $this->gaWeekTitles[] = "We"; 
                        $this->gaWeekTitles[] = "Th"; 
                        $this->gaWeekTitles[] = "Fr"; 
                        $this->gaWeekTitles[] = "Sa"; 
                } 
 
                FUNCTION intStartTable() 
                { 
                        /* define how the table should be presented */ 
 
                        ECHO '<table border=3>'; 
                } 
 
                FUNCTION intDisplayWeekTitle( $intWeekDay ) 
                { 
                        /* define how titles of the week are to be displayed */ 
 
                        ECHO '<td><font class="font-family: Arial; font-size: 9pt; color: #000000"><b>'; 
                        ECHO $this->gaWeekTitles[ $intWeekDay ]; 
                        ECHO '</b></font></td>'; 
                } 
 
                FUNCTION intDisplayDay( $intDay ) 
                { 
                        /* define how the days of the month are to be displayed */ 
 
                        ECHO '<td><font class="font-family: Arial; font-size: 8pt; color: #000000">'; 
                        ECHO $intDay; 
                        ECHO '</font></td>'; 
                } 
        } 
 
        /* no other functions in the pcCalendar need to be overridden. */ 
 
        /* create new Calendar instance */ 
        $cal = NEW myCalendar; 
 
        /* display calendar for current month & year */ 
        $cal->intShowCalendar(); 
 
?>
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 97 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?