<link href="https://fonts.googleapis.com/css2?family=Peddana&display=swap" rel="stylesheet"> 
<style>
.content-div{box-shadow:0 0 2px silver;padding:10px;}    
.content-div h1{font-weight:600; font-size:18px; }
body{font-family: 'Peddana', serif;font-size:16x;}
</style>

<?php
$tid=$this->uri->segment(4);
$content_id=$this->uri->segment(3);
$staff_name='';

$content_title='';
$staff_data=$this->EContentModel->staff_data($tid);
if($staff_data){
foreach($staff_data as $staff){
$staff_name= $staff['name'];
}
}


$subject='';
$class='';
$section='';
$chapter_title='';
$subject_id='';

$get_content_detail=$this->EContentModel->get_content_detail($content_id);
if($get_content_detail){
foreach($get_content_detail as $detail){
$subject_id=$detail['subject_id'];
$chapter_id=$detail['chapter_id'];
$content_title=$detail['title'];
$subject_data=$this->EContentModel->subject_data($subject_id);
if($subject_data){
foreach($subject_data as $data){
$subject =$data['subject'];    
$class=$data['class'];
$section=$data['section'];
}    
}


$chapter_data=$this->EContentModel->chapter_data($chapter_id);
if($chapter_data){
foreach($chapter_data as $chapter){
$chapter_title=$chapter['chapter_title'];    
}    
}


}    
}
?>
<div class="container mt-3 mb-3">
<div class="row">
<div class="col-sm-12">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo base_url();?>Welcome">Home</a></li>
<li class="breadcrumb-item"><a href="<?php echo base_url();?>ContentManagement">E-Content</a></li>
<li class="breadcrumb-item"><a href="<?php echo base_url();?>ContentManagement/subjects/<?php echo $tid;?>"><?php echo $staff_name;?></a></li>
<li class="breadcrumb-item "><a href="<?php echo base_url();?>ContentManagement/subject_chapters/<?php echo $subject_id; echo "/"; echo $tid;?>"><?php echo $subject; echo ","; echo $class; echo "-"; echo $section; ?> </a></li>
<li class="breadcrumb-item active"><a href="<?php echo base_url();?>ContentManagement/content/<?php echo $subject_id; echo "/"; echo $tid;echo "/"; echo $chapter_id;?>"><?php echo htmlspecialchars_decode($chapter_title); ?></a></li>

</ul>  

<div class="content-div">
<h1><?php echo htmlspecialchars_decode($content_title);?></h1>   
<?php 
if($get_content_detail){
foreach($get_content_detail as $content_detail){
?>
<p><?php echo htmlspecialchars_decode($content_detail['content']);?></p>
<p></p>
<?php 
}
}
?>
</div>

</div>    
</div>    
</div>