I have a view that shows no. of urgent letters in the header as follows.
I used the following lines within my code and that is working fine. $UrgentLetters is defined in the Controller and that got from the model properly.
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li class="dropdown user user-menu">
<h4><i class="fa fa-refresh fa-spin fa-3x fa-fw" style="font-size:24px;color:white"></i>
You have <span class="label label-danger" > <?php echo $UrgentLetters ? $UrgentLetters[0]['no_of_urgent']:0 ?> </span> No(s) of Urgent / Important Letters</h4>
</li>
</ul>
</div>
Controller
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller
{
function __construct() {
parent::__construct();
$this->load->model('Welcome_Model');
}
public function index()
{
$where=Null;
$meta=array(
'letterCount'=>$this->Welcome_Model->getLetterCount(),
'branchCount'=>$this->Welcome_Model->getBranchCount(),
'methodCount'=>$this->Welcome_Model->getMethodCount(),
'classificationCount'=>$this->Welcome_Model->getClassificationCount(),
'plCount'=>$this->Welcome_Model->getpendingLettersCount(),
'letterFigures'=>$this->Welcome_Model->getLetterFigures($where),
'pendingLetterCount'=>$this->Welcome_Model->getPendingCount(),
'UrgentLetters'=>$this->Welcome_Model->getUrgentLetters()
);
//echo '<pre>'; print_r($meta);
$this->load->view('header',$meta);
$this->load->view('dashboard');
$this->load->view('footer');
}
}
?>
But if I click on the green block, red block, pupal block or any other menu link that referred to other pages in my project, the following message outs.
I can't captured the issue with me. Can anyone help ?
You have No(s) of Urgent / Important Letters
, no error outs – MCIT Trends Aug 05 '20 at 05:03