McGansWebsite/application/views/subject.php

186 lines
5.0 KiB
PHP
Raw Permalink Normal View History

<?php $this->load->view('include/header.php')?>
<style>
.row{
margin-top: 58px;
}
</style>
<?php
$CI=& get_instance();
$CI->load->model('WelcomeModel');?>
<div id="wrapper">
<!-- content-holder -->
<div class="content-holder">
<div class="content">
<!-- section -->
<section class="pr-der-pad">
<!-- container-->
<div class="container">
<?php
if(isset($subject_Det)&& $subject_Det->num_rows()>0)
{
$list=$subject_Det->row();
$id=$list->id;
$code=$list->code;
$name=$list->name;
$subtitle=$list->subtitle;
$facultyId=$list->facultyId;
$teachingAssistant=$list->teachingAssistant;
$description=$list->description;
$facultyIds = explode(',', $facultyId);
$taId = explode(',', $teachingAssistant);
}
?>
<!-- det-wrap-->
<div class="fl-wrap det-wrap">
<div class="row">
<div class="col-md-8">
<!--Image List-->
<?php
$getSubjectImage=$CI->WelcomeModel->getSubjectImage($id);
//echo $this->db->last_query();exit;
if(isset($getSubjectImage) && $getSubjectImage->num_rows()>0)
{
foreach($getSubjectImage->result() as $view)
{
$imageid=$view->id;
$imagetitle=$view->title;
$iimage=$view->image;
?>
<div>
<img style="width:750px;height:auto;margin-bottom:100px;" src="<?=base_url();?>admin/uploads/subject/<?=$iimage;?>"/>
<h2 style="font-size:25px;margin-bottom:100px;"><?=$imagetitle;?></h2>
</div>
<?php
}}
?>
<!--Image List-->
<?php
$getProjectList=$CI->WelcomeModel->getProjectList($id);
//$numRows=$getFac->num_rows();
if(isset($getProjectList) && $getProjectList->num_rows()>0)
{
foreach($getProjectList->result() as $list)
{
$projectId=$list->id;
$projectName=$list->projectName;
$studentName=$list->studentName;
$image=$list->image;
?>
<div class="gallery-item" style="width: 50%;">
<a href="<?=base_url();?>project-detail/<?=$projectId;?>">
<div class="grid-item-holder">
<div class="box-item">
<img style="width:400px;height:208px;"src="<?=base_url();?>admin/uploads/project/<?=$image;?>" alt="">
<div class="overlay"></div>
</div>
<div class="grid-item">
<h3><?=$projectName;?></h3>
<span><?=$studentName;?></span>
</div>
</div>
</a>
</div>
<!-- 1 end -->
<?php
}} else {?>
<img style="width:500px;height:500px;" src="<?=base_url();?>images/500.png"/>
<h1 style="font-size:30px;margin-top: 3%;">No Projects Found</h1><?php }
?>
</div>
<div class="col-md-4">
<h3 class="bold-title"><?=$code;?></h3>
<div class="pr-tags fl-wrap">
<span style="font-size: 15px;">Faculty : </span>
<div>
<ul>
<li>
<a style="font-size: 15px;" href="#">
<?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++
?>
</a>
</li>
</ul>
</div>
</div>
<div class="pr-tags fl-wrap">
<span style="font-size: 15px;">TA : </span>
<div>
<ul>
<li>
<a style="font-size: 15px;" href="#">
<?php
//$numRows=$getFac->num_rows();
$i=0;
foreach($taId 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++
?>
</a>
</li>
</ul>
</div>
</div>
<h3 style="padding-bottom:0px;" class="pr-subtitle"> <?=$name;?>
</h3>
<p style="font-size:17px;padding-bottom:10px;"><?=$subtitle;?></p>
<p style="font-size:16px;text-align:justify"><?=$description;?></p>
</div>
</div>
</div>
</div>
<!-- container end -->
<div class="partcile-dec" data-parcount="120"></div>
</section>
<!-- section end -->
</div>
<!-- content end -->
<!--=============== content-footer ===============-->
<div class="height-emulator"></div>
</div>
<!-- content-holder end -->
</div>
<!-- wrapper end -->
<?php include 'include/footer.php';?>