Welcome Guest, Not a member yet? Register   Sign In
Library class problem
#1

[eluser]Todlerone[/eluser]
Hello all and ty for any help/suggestions. I'm new to codeigniter but not to PHP/MySql. I'm trying to use the calendar class to make a simple calendar with previous/next month. The calendar is created and displayed ok, however, if I click on either prev/next link I get a 404 error..page not found. Here is my code.

Controller
Code:
class Radoncs extends Controller{
        function Radoncs(){
            // load controller parent
            parent::Controller();
        }
        
        
        function index($year = null, $month = null){
            $this->load->model('Mycal_model');
            $this->load->model('Radoncs_model');
            $data['result']=$this->Radoncs_model->getData();
            $data['page_title']="JCC Rad Oncs!";
            $data['calendar']=$this->Mycal_model->generate($year, $month);
            $this->load->view('header');
            $this->load->view('content', $data);
            $this->load->view('footer');
        
        }
        
    }

Calendar model
Code:
class Mycal_model extends Model{
    function Mycal_model(){
        // call the model constructor
        parent::Model();
    }
    
    function generate ($year, $month){
        $prefs = array(
            'start_day' => 'monday',
            'show_next_prev'  => TRUE,
            'next_prev_url'   => 'http://localhost/CI/index.php/radoncs/index.php');
        
        $this->load->library('calendar', $prefs);
        return $this->calendar->generate($year, $month);
    }

}
TY
#2

[eluser]n0xie[/eluser]
Code:
'next_prev_url'   => 'http://localhost/CI/index.php/radoncs/index.php');
#3

[eluser]Todlerone[/eluser]
Even if I remove the index.php from the end it gives me the same error. I have tried many url's for this and nothing works. When I hover over the next arrows I can see at the bottom of the browser window the link to "http://localhost/CI/index.php/radoncs/2010/09" and for the previous month "http://localhost/CI/index.php/radoncs/2010/07". So the variables are correct just a 404 page not found.

Anyone...TY




Theme © iAndrew 2016 - Forum software by © MyBB