%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Admin_Dashboard_Model extends CI_Model { function __construct(){ parent::__construct(); if(! $this->session->userdata('elib_adminloggedin')) redirect('admin/login'); } /* * Function : getCommonQuery */ public function getCommonNumrowsQuery($tbl_name = 'tbl_schools', $col = ' * ', $condition='') { $this->db->select($col); //$this->db->where('is_deleted', '0'); if(!empty($condition)) { foreach($condition as $key=>$val) { $this->db->where($key, $val); } } $query = $this->db->get($tbl_name); //echo $this->db->last_query(); die; return $query->num_rows(); } /* * Function : getCommonQuery */ public function getCommonQuery($tbl_name = 'tbl_schools', $col = ' * ', $condition='') { $this->db->select($col); //$this->db->where('is_deleted', '0'); if(!empty($condition)) { foreach($condition as $key=>$val) { $this->db->where($key, $val); } } $query = $this->db->get($tbl_name); //echo $this->db->last_query(); die; return $query->result_array(); } /* * Function: getGrievanceList * Parameters: * Purpose: * CreatedOn: * CreatedBy: * ModifiedOn: * Modified By: * Return: */ public function getCommonIdArray($tbl_name='tbl_schools', $col = ' * ', $condition=null) { $time = time(); $this->db->select($col); $this->db->where('is_deleted', '0'); if(!empty($condition)) { foreach($condition as $key=>$val) { $this->db->where($key, $val); } } //$this->db->order_by('id', 'asc'); $query = $this->db->get($tbl_name); $results = array(); foreach($query->result_array() as $row) { $results[$row['id']] = $row; } return $results; } /* * function : countlastsevendays * */ public function countlastsevendays(){ $query2=$this->db->select('id') ->where('regDate >= DATE(NOW()) - INTERVAL 10 DAY') ->get('tblusers'); return $query2->num_rows(); } /* * function : countthirtydays * */ public function countthirtydays(){ $query3=$this->db->select('id') ->where('regDate >= DATE(NOW()) - INTERVAL 30 DAY') ->get('tblusers'); return $query3->num_rows(); } }