File "news.php"

Full Path: /home/ichhrkpd/public_html/application/views/news.php
File size: 3.17 KB
MIME-type: text/html
Charset: utf-8

<!-- Start main-content -->
  <div class="main-content">
   <!-- Section: inner-header -->
    <section style="background-color: #dcebf5">
      <div class="container pt-10 pb-10">
        <!-- Section Content -->
        <div class="section-content">
          <div class="row">
            <div class="col-md-12 text-center">
              <h4 class="title">News and Events</h4>
              <br>
              
            </div>
            <div class="col-md-12">
                <?php 
                  $i=0;
                  
                  foreach ($events_data as $ev){ 
                    $file_exists = 'N';
                    $base_url='https://www.ichhamatidegreecollege.edu.bd/idcm/';
                    $base_path='/home/nmpms9gg1ok0/public_html/idcm/system/';
                    $folder_name = $base_url.'img/event/';
				    $image_link="";
        			$image_link = $folder_name .$ev->ev_id.'.jpg';
        			
        			$down_file_name = $ev->ev_id.'.jpg';
    				$physical_link = $base_path."../img/event/$down_file_name";
    				
    				if(file_exists($physical_link)){
    				    $file_exists = 'Y';
    				}
        		
        			?>
        			
    	            <div class="col-sm-6 col-md-3 col-lg-3">
    	              <article class="post clearfix maxwidth600 mb-30 border-1px">
    	                <div class="entry-header-new" style='margin-bottom: unset !important;'>
    	                  <div class="post-thumb thumb">
    	                     <?php  if($file_exists == 'Y'){ 
			                            ?>
    	                      <img  src="<?php echo $image_link;?>" alt="" class="img-responsive img-fullwidth">
    	                      <?php 
							    }else {										
							 ?> 
							 <img  src="https://www.ichhamatidegreecollege.edu.bd/idcm/img/event/event.png" alt="" class="img-responsive img-fullwidth">
							 <?php } ?>
    	                  </div>
    	                  <div class="blog-overlay"></div>
    	                </div>
    	                <div class="p-10">
    	                  <h5 class="event-title media-heading font-weight-700 mb-0 pt-5"><a href="<?php echo base_url()."home/single_event/id/". $ev->ev_id;?>" class='text-theme-colored '><?php echo $ev->ev_title; ?></a></h5>
    	                  <i class="fa fa-clock-o mr-5 text-theme-colored"></i><span  class="date-color"><b> <?php echo date('d-F-Y ', strtotime($ev->ev_date)); ?> </b></span >
    	                  
    	                  <a class="btn btn-theme-colored btn-lg btn-flat mt-0 text-white mt-10" href="<?php echo base_url()."home/single_event/id/". $ev->ev_id;?>">Read more <i class="fa fa-angle-double-right text-theme-colored2"></i></a>
    	                </div>
    	              </article>
    	            </div>
	            
	            <?php
	            
	                $i++;
	                
	                if($i==4)
                        break;
                  }
                  
                  ?>
                
            </div>
          </div>
        </div>
      </div>
    </section>
    
    
    
	
    
  
    
    

  </div>
  <!-- end main-content -->