File "single_notice.php"

Full Path: /home/ichhrkpd/public_html/application/single_notice.php
File size: 2.7 KB
MIME-type: text/plain
Charset: utf-8

<!-- Start main-content 
http://www.ichhamatidegreecollege.edu.bd/idcm/files/notice/10.pdf

if(file_exists($physical_link)){
    $file_exists = 'Y';
    
}
echo $file_exists;
?> 

-->

  <div class="main-content">
   <!-- Section: inner-header -->
    <section style="background-color: #dcebf5">
      <div class="container pt-10 pb-10" style="min-height:400px;">
        <!-- Section Content -->
        <div class="section-content">
          <div class="row">
            <div class="col-md-12">
                
                     <?php echo "<h4>".$notice_data->title .'<br>'."</h4>"."<p style='margin-top:10px;'>".date('d-M-Y ', strtotime($notice_data->org_date))."</p>"; ?>
			         
			         <?php if (!empty($notice_data->description)){ ?>
			         <p>
			             <b>Description: </b>
			             <?php echo $notice_data->description; ?>  
			         </p>
			         <?php } ?>
			         
			        <?php
                      $file_exists = 'N';
                      $base_url='https://www.ichhamatidegreecollege.edu.bd/idcm/';
                      $base_path='/home/ichrkpd/public_html/idcm/system/';
                     
                      $folder_name = $base_url.'files/notice/';
        				$down_link = $folder_name . $notice_data->id .'.pdf';
        				$down_file_name = $notice_data->id.'.pdf';
        				$physical_link = $base_path."../files/notice/$down_file_name";
        				
        				$physical_link2=FCPATH .'idcm/files/notice/'.$down_file_name;
        				
        				//echo $physical_link2;
        				//echo $down_link;
        				//echo $_SERVER['DOCUMENT_ROOT'];
        				
        				if(file_exists($physical_link2)){
        				    $file_exists = 'Y';
        				}
        		
        		        if($file_exists == 'Y'){ 
			         ?>
			          <object
                        data='<?php echo $down_link; ?>'
                        type="application/pdf"
                        width="500"
                        height="578" >
                
                        <iframe
                          src='<?php echo $down_link; ?>'
                          width="500"
                          height="578">
                            
                        <p>This browser does not support PDF!</p>
                        
                        </iframe>
                      </object>
                      <?php } ?>
                    
			            
             </div>
             
             
              
              
          
          </div>
        </div>
      </div>
    </section>
    
    
    
	
    
  
    
    

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