• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating week

#15
[eluser]darky84[/eluser]
the calendar_week.php its the same you gave me
and here is the controller

Code:
<?php

class Week extends CI_Controller {

    function index($year='', $month='', $day=''){
        if ($year==null) {
            $year = date('Y');
        }
        
        if ($month==null) {
            $month = date('m');
        }
        
        if ($day==null) {
            $day = date('d');        
        }    

        $calendarPreference = array (
                        'start_day'    => 'saturday',
                        'month_type'   => 'long',
                        'day_type'     => 'long',
                        'date'     => date(mktime(0, 0, 0, $month, $day, $year))
                    );        
        $this->load->library('calendar_week', $calendarPreference);

        // I need to feed my calndar week with some data
        // for the example data are empty
        $weeks = $this->calendar_week->get_week();
        $arr_Data = Array();
        for ($i=0;$i<count($weeks);$i++){
            $arr_Data[$weeks[$i]] = '';
        }

        $content['data'] = $arr_Data;      
        $this->load->view('show_week', $content);
      
    }
}
?&gt;


Messages In This Thread
Generating week - by El Forum - 11-30-2008, 06:03 PM
Generating week - by El Forum - 12-01-2008, 12:53 AM
Generating week - by El Forum - 12-01-2008, 01:38 AM
Generating week - by El Forum - 01-28-2009, 05:09 AM
Generating week - by El Forum - 01-28-2009, 06:23 AM
Generating week - by El Forum - 01-28-2009, 10:41 AM
Generating week - by El Forum - 01-30-2009, 03:47 AM
Generating week - by El Forum - 01-30-2009, 03:49 AM
Generating week - by El Forum - 04-24-2013, 06:09 AM
Generating week - by El Forum - 04-24-2013, 06:20 AM
Generating week - by El Forum - 04-24-2013, 06:33 AM
Generating week - by El Forum - 04-24-2013, 06:36 AM
Generating week - by El Forum - 04-24-2013, 06:50 AM
Generating week - by El Forum - 04-24-2013, 07:03 AM
Generating week - by El Forum - 04-24-2013, 07:05 AM
Generating week - by El Forum - 04-24-2013, 07:09 AM
Generating week - by El Forum - 04-24-2013, 07:11 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.