McGansWebsite/application/controllers/Welcome.php

42 lines
1.0 KiB
PHP
Raw Normal View History

2023-01-05 12:19:39 +00:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function __construct()
{
parent::__construct();
2023-01-10 09:41:20 +00:00
$this->load->model('Subject_model');
2023-01-05 12:19:39 +00:00
}
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
2023-01-10 09:41:20 +00:00
$data['dep']=$this->Department_model->dep_list();
$this->load->view('index',$data);
2023-01-05 12:19:39 +00:00
}
2023-01-10 09:41:20 +00:00
public function subjectList($id)
2023-01-05 12:19:39 +00:00
{
2023-01-10 09:41:20 +00:00
$data['subject_list']=$this->Subject_model->subject_list($id);
$this->load->view('subject_list',$data);
2023-01-05 12:19:39 +00:00
}
2023-01-10 09:41:20 +00:00
public function about()
2023-01-05 12:19:39 +00:00
{
2023-01-10 09:41:20 +00:00
$this->load->view('about');
2023-01-05 12:19:39 +00:00
}
}