McGansWebsite/application/views/subject_list.php

116 lines
4.7 KiB
PHP
Raw Normal View History

2023-01-10 09:41:20 +00:00
<?php $this->load->view('include/header.php')?>
<?php
$CI=& get_instance();
$CI->load->model('WelcomeModel');?>
2023-01-10 09:41:20 +00:00
<!-- sidebar-menu end-->
<!--=============== wrapper ===============-->
<div id="wrapper">
<!-- content-holder -->
<div class="content-holder">
<!--Content -->
<div class="content">
<!--section -->
<section id="sec2">
<div class="container">
<?php
$depId = $this->uri->segment(2);
$getNames=$CI->WelcomeModel->getName($depId);
if($getNames->num_rows()>0)
{
$list=$getNames->row();
$depName=$list->name;
}
?>
<h1 style="font-size:30px;margin-bottom:30px;"><?=$depName?></h1>
2023-01-10 09:41:20 +00:00
<!-- gallery-items -->
<div class="gallery-items border-folio-conteainer vis-por-info three-coulms">
2023-01-10 09:41:20 +00:00
<?php
if(isset($subject_list) && $subject_list->num_rows()>0)
{
foreach($subject_list->result() as $subject)
{
$id=$subject->id;
$degName=$subject->degName;
$name=$subject->name;
$code=$subject->code;
$facultyId=$subject->facultyId;
$facultyIds = explode(',', $facultyId);
//print_r($facultyIds);
2023-01-10 09:41:20 +00:00
?>
<div class="gallery-item houses apartments">
<div class="grid-item-holder">
<a href="<?=base_url();?>subject-detail/<?=$id;?>">
2023-01-10 09:41:20 +00:00
<div class="box-item">
<img src="<?=base_url();?>images/folio/2.png" alt="">
<div class="overlay"></div>
</div>
<h3 style="width: 250px;position: fixed;font-size:18px;margin-top:120px;margin-left:87px" class=""><?=$name?></h3>
2023-01-10 09:41:20 +00:00
<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>
2023-01-10 09:41:20 +00:00
</div>
</a>
</div>
</div>
<?php }}?>
2023-01-10 09:41:20 +00:00
</div>
<!-- end gallery items -->
</div>
<div class="partcile-dec" data-parcount="200"></div>
</section>
<!--section end -->
</div>
<!-- content end -->
<div class="height-emulator"></div>
2023-01-10 09:41:20 +00:00
</div>
<!-- content-holder end -->
</div>
<!-- wrapper end -->
<!--search-form-holder -->
<div class="search-form-holder fixed-search">
<div class="search-form-bg"></div>
<div class="search-form-wrap">
<div class="container">
<form class="searchform" method="get" >
<input type="text" autocomplete="off" name="s" placeholder="Type and Enter to Search">
</form>
<div class="close-fixed-search"></div>
</div>
<div class="dublicated-text"></div>
</div>
</div>
<?php $this->load->view('include/footer.php')?>
2023-01-10 09:41:20 +00:00
<!-- Main end -->
<!--=============== scripts ===============-->
<script type="text/javascript" src="<?=base_url();?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/plugins.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/scripts.js"></script>
</body>
</html>