File "page-20260225162629.php"

Full Path: /home/ichhrkpd/public_html/application/controllers/res_forms/page-20260225162629.php
File size: 4.65 KB
MIME-type: text/x-php
Charset: utf-8

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Page extends GSController {
	
	
	function __construct() {
		parent::__construct ();
		//$this->CheckSession(true);
	}
	
	
	
	public function about(){
		$pdata = array();
		$content_all = array();
		$this->load->model("database/Mcontent");
		$this->Mcontent->cid(1);
		if($this->Mcontent->Select()){
		    $content_all = $this->Mcontent;
		}
	
		if(empty($content_all)){
			$content_all = array();
		}
	
		$pdata['content_all'] = $content_all;
		//GPrint($content_all);die;
		
		$pdata['LoadViews'] = "about";
		$this->LoadView($pdata);	
		
	}
	
	public function set_language(){
	    $uriData = $this->GetUriArray();
		$type = '';
		if(isset($uriData['type'])){
			$type = $uriData['type'];
		}
		$accept_type = array('bn','en');
		
		if(!in_array($type,$accept_type)){
			redirect("");die;
		}
		$this->session->set_flashdata('language_type', array('url' => 'home','type' => $type));
		redirect("");die;
	}
	
	
	
	public function administration(){
		$pdata = array();
		
		$query_tr_data = "SELECT * FROM teachers WHERE type='A' ORDER BY rank ASC;";
		$records_tr_data = $this->db->query($query_tr_data);
		$tr_data = $records_tr_data->result();
		
		if (is_array($tr_data) || is_object($tr_data)){
			$pdata['tr_data'] = $tr_data;
		}else{
			$pdata['tr_data'] = array();
		}
		//GPrint($tr_data);die;
		
		$pdata['LoadViews'] = "administration";
		$this->LoadView($pdata);	
		
	}
	
	public function results(){
		$pdata = array();
		
		$res_data = array();
		$this->load->model("database/Mres_and_forms");
		$this->Mres_and_forms->rtype('R');
		$this->Mres_and_forms->status('A');
		$res_data = $this->Mres_and_forms->SelectAll("","rid","desc");
	
		if(empty($res_data)){
			$res_data = array();
		}
	
		$pdata['res_data'] = $res_data;
		//GPrint($res_data);die;
		
		$pdata['LoadViews'] = "results";
		$this->LoadView($pdata);	
		
	}
	
	public function notices(){
	$pdata = array();
		
		
		$notice_data = array();
		$this->load->model("database/Mcommon_notice");
		$this->Mcommon_notice->status('A');
		
		$notice_data = $this->Mcommon_notice->SelectAll("","id","desc");
	
		if(empty($notice_data)){
			$notice_data = array();
		}
	
		$pdata['notice_data'] = $notice_data;
		
		$pdata['LoadViews'] = "notices";
		$this->LoadView($pdata);	
		
	}
	
	public function news_events(){
		$pdata = array();
		
			$events_data = array();
		$this->load->model("database/Mevents");
		$this->Mevents=new Mevents();
		$events_data = $this->Mevents->SelectAll("","ev_id","desc");
	    //GPrint($events_data);die;
		if(empty($events_data)){
			$events_data = array();
		}
	
		$pdata['events_data'] = $events_data;
		
		$pdata['LoadViews'] = "news";
		$this->LoadView($pdata);	
		
	}
	
	public function library(){
		$pdata = array();
		
		$content_all = array();
		$this->load->model("database/Mcontent");
		$this->Mcontent->cid(1);
		if($this->Mcontent->Select()){
		    $content_all = $this->Mcontent;
		}
	
		if(empty($content_all)){
			$content_all = array();
		}
	
		$pdata['content_all'] = $content_all;
		
		$pdata['LoadViews'] = "library";
		$this->LoadView($pdata);	
		
	}
	public function gallery(){
		$pdata = array();
		
		$img_data = array();
		$this->load->model("database/Mimages");
		$this->Mimages = new Mimages();
		$this->Mimages->status('A');
		$img_data = $this->Mimages->selectAll("","img_id","desc");
	
		if(empty($img_data)){
			$img_data = array();
		}
		$pdata['img_data'] = $img_data;
		
		$pdata['LoadViews'] = "gallery";
		$this->LoadView($pdata);	
		
	}
	public function forms(){
		$pdata = array();
		
		$res_data = array();
		$this->load->model("database/Mres_and_forms");
		$this->Mres_and_forms->rtype('F');
		$res_data = $this->Mres_and_forms->SelectAll("","rid","desc");
	
		if(empty($res_data)){
			$res_data = array();
		}
	
		$pdata['res_data'] = $res_data;
		//GPrint($res_data);die;
		
		$pdata['LoadViews'] = "forms";
		$this->LoadView($pdata);	
		
	}
	public function contact(){
		$pdata = array();
		
		$content_all = array();
		$this->load->model("database/Mcontent");
		$this->Mcontent->cid(1);
		if($this->Mcontent->Select()){
		    $content_all = $this->Mcontent;
		}
	
		if(empty($content_all)){
			$content_all = array();
		}
	
		$pdata['content_all'] = $content_all;
		
		$pdata['LoadViews'] = "contact";
		$this->LoadView($pdata);	
		
	}
	
		
	private function LoadView($rData) {
		$this->load->view("common_view",$rData);
	}
	
	private  function LoadPanel($rData){
		$this->load->view("userBody",$rData);
	}
	


}
?>