File "forms.php"

Full Path: /home/ichhrkpd/public_html/application/cache/forms.php
File size: 3.33 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">Forms</h4>
              
            </div>
          </div>
          <div class="row" style="margin-bottom: 60px">
                   			<table class="table table-striped table-bordered table-hover no-footer">
                                
                                <thead>
                                        <tr role="row" >
											<th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="First Name: activate to sort column ascending" style="width: 164px; border-top: unset !important">Date</th>
											<th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Last Name: activate to sort column ascending" style="width: 219px;">Title</th>
											<th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="TEAM NAME: activate to sort column ascending" style="width: 200px;">Download Link</th>
										</tr>
                                </thead>
                                
                                <tbody>
                                    <?php foreach ($res_data as $n){
                                            $file_exists = 'N';
                                            $base_url='https://www.ichhamatidegreecollege.edu.bd/idcm/';
                                            $base_path='/home/nmpms9gg1ok0/public_html/idcm/system/';
                                        	$folder_name = $base_url.'files/res_forms/';
                            				$down_link = $folder_name . $n->rid .'.pdf';
                            				$down_file_name = $n->rid.'.pdf';
                            				$physical_link = $base_path."../files/res_forms/$down_file_name";
                            				
                            				if(file_exists($physical_link)){
                            				    $file_exists = 'Y';
                            				}
                                    ?>
                                	<tr class="gradeC odd">
                                		<td class=""><?php echo date('d-M-Y ', strtotime($n->rdate)); ?></td>
										<td class=" "><?php echo $n->rtitle; ?></td>
										<?php  if($file_exists == 'Y'){ 
			                            ?>
										 <td class=" "><a href="<?php echo $down_link; ?>" target="_blank" style="color:blue">Click Here</a></td>
										 <?php 
										    }else {										
										 ?> 
										 <td class=" "><a href="#" target="_blank" style="color:blue">Click Here</a></td>
										 <?php } ?>
                                	</tr>
                                	
                                	<?php } ?>
                                	
                                </tbody>
                                
                            </table>           
         </div> 
        </div>
      </div>
    </section>
    
    
    
	
    
  
    
    

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