File "gallery.php"
Full path: /var/www/krbed.in/application618/views/gallery.php
File size: 2.35 KiB (2410 bytes)
MIME-type: text/html
Charset: utf-8
<!-- Gallery -->
<div class="gallery content">
<div class="gallery_top">
<div class="gallery_heading">
<h2>Our College Gallery</h2>
</div>
<div class="select_gallery">
<a class="photo pactive" href="#"> </a>
<a class="movie " href="#"> </a>
</div>
<div class="clear"></div>
</div>
<!-- Col1 -->
<div class="categorydiv">
<?php
$cat_name = $this->uri->segment('3');
$data = $this->g->getCategory();
foreach($data as $row) {
$name=ucwords($row->category_name);
$id = $row->id;
?>
<ul>
<li><a class="<?php if($row->category_name === $cat_name) echo 'selected' ?>" href="<?php echo base_url("additional/gallery/$row->category_name") ?>"><span><?php echo $name; ?></span></a></li>
</ul>
<?php }
?>
</div>
<div class="thumbdiv">
<ul>
<?php
$cat_name = $this->uri->segment('3');
$this->db->join('category c', 'c.id = g.category_id', 'left');
$this->db->where('c.category_name', $cat_name);
$sql = $this->db->get('gallery g');
if($sql->num_rows() > 0){
foreach($sql->result_array() as $row){
$id = $row['id'];
$image=$row['image'];
$imgSrc =$this->g->path.$image;
?>
<li> <a href="<?php echo $imgSrc; ?>" rel="galleryimg" class="galleryimg" title="" ><img src="<?php echo $imgSrc; ?>" alt="" style="width:178px;height:109px;"> </a></li>
<?php } }
?> </ul>
<div class="hdiv"> </div>
</div>
</div>