McGansWebsite/application/views/subject.php

158 lines
4.8 KiB
PHP
Raw 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;
$facultyId=$list->facultyId;
$description=$list->description;
$facultyIds = explode(',', $facultyId);
}
?>
<!-- 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;" src="<?=base_url();?>admin/uploads/subject/<?=$iimage;?>"/>
<h2 style="font-size:18px;"><?=$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>
<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>
</div>
</div>
<h3 class="pr-subtitle"> <?=$name;?></h3>
<p style="font-size:16px;text-align:justify"><?=$description;?></p>
<!--<p> If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. </p>
<div class="clearfix"></div>
<span class="bold-separator"></span>
<ul class="pr-list">
<li><span>Date :</span> 26.05.2014 </li>
<li><span>Client :</span> House Big </li>
<li><span>Status :</span> Completed </li>
<li><span>Location : </span> <a href="https://goo.gl/maps/UzN5m" target="_blank"> Kharkiv Ukraine </a></li>
</ul>
<span class="dec-border fl-wrap"></span>
<a href="#" class="btn float-btn flat-btn" target="_blank">View project</a>-->
</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';?>