McGansWebsite/application/views/subject_list.php
dotwingssoftware f2a40c268b 20230207
1. Have to test and deploy in server.  2. add faculty detail into employee table and student detail  into employee table, 3. Change Teaching Assistant into multiple select 4. User Profile
2023-02-07 18:41:26 +05:30

149 lines
4.0 KiB
PHP

<?php $this->load->view('include/header.php')?>
<?php
$CI=& get_instance();
$CI->load->model('WelcomeModel');
?>
<!-- sidebar-menu end-->
<!--=============== wrapper ===============-->
<div id="wrapper">
<!-- content-holder -->
<div class="content-holder">
<!--Content -->
<div class="content">
<!--section -->
<section >
<div class="container">
<?php
$depId = $this->uri->segment(2);
$getNames=$CI->WelcomeModel->getName($depId);
//echo $this->db->last_query();exit;
if(isset($getNames) && $getNames->num_rows()>0)
{
foreach($getNames->result() as $view)
{
$degreeId=$view->id;
$degreeName=$view->name;
$getSubject=$CI->WelcomeModel->getSubject($degreeId);
?>
<h1 style="font-size:30px;margin-bottom:30px;text-align: start;"><?=$degreeName?></h1>
<!-- gallery-items -->
<div class="gallery-items border-folio-conteainer vis-por-info three-coulms" style="margin-bottom: 50px;">
<?php
if(isset($getSubject) && $getSubject->num_rows()>0)
{
foreach($getSubject->result() as $subject)
{
$id=$subject->id;
$degName=$subject->degName;
$name=$subject->name;
$code=$subject->code;
$image=$subject->image;
$facultyId=$subject->facultyId;
$facultyIds = explode(',', $facultyId);
//print_r($facultyIds);
?>
<div class="gallery-item houses apartments">
<div class="grid-item-holder">
<a href="<?=base_url();?>subject-detail/<?=$id;?>">
<div class="box-item">
<img style="height:450px;" src="<?=base_url();?>admin/uploads/subject/<?=$image;?>" alt="">
<div class="overlay">
<h3 style="color: white;font-size: 20px; position: inherit;top: 50%;left: 50%;-webkit-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);transform: translate(-50%, -50%);text-align: center;" class=""><?=$name?></h3>
</div>
</div>
<div class="grid-item">
<h3><a><?=$code;?></a></h3>
<span>
<?php
//$numRows=$getFac->num_rows();
$i=0;
foreach($facultyIds as $faculty){
$getFac=$CI->WelcomeModel->get_faculty($faculty);
//echo $facultyIds[$faculty];
if($getFac->num_rows()>0)
{
$list=$getFac->row();
$facName=$list->name;
} ?>
<?=$facName?>
<?php
} $i++
?>
</span>
</div>
</a>
</div>
</div>
<?php }} else { ?><p>No Data Found</p> <?php }?>
</div>
<br>
<!-- end gallery items -->
<?php }}?>
</div>
<div class="partcile-dec" data-parcount="200"></div>
</section>
<!--section end -->
</div>
<!-- content end -->
<div class="height-emulator"></div>
</div>
<!-- content-holder end -->
</div>
<!-- wrapper end -->
<?php include 'include/footer.php';?>
<script>
var base_path=$('body').attr('data-path');
$( document ).ready(function() {
var semesterId1=$('.setValue').attr('data-id');
var semesterId=$('.setValue').attr('data-id1');
var semesterName=$('.setValue').attr('data-name1');
var semesterYear=$('.setValue').attr('data-year1');
var dataSession=$('.setValue').attr('data-session');
var sessionData=semesterName+"-"+semesterYear;
if(dataSession==""){$('.setValue').html(sessionData);}else{$('.setValue').html(dataSession);
}
var url=base_path+"Welcome/getDepartment";
$.post(url,{sessionData:sessionData,semesterId:semesterId,csrf_test_name:$.cookie('csrf_cookie_name')},function(departmentResult)
{
var result=departmentResult;
$(".getDepartment").show();
$('.getDepartment').html(result);
});
});
</script>
<script>
var base_path=$('body').attr('data-path');
$(".semesterEvent").on('click', function() {
var currentPage=window.location.href;
if(currentPage!=base_path){
window.location.href=base_path;
}
});
</script>