JezK
Edit File: dairy_data.php(23-11-2016)
<?php session_start(); include_once("school_admin_access.php"); include_once("school_admin_student.php"); include_once("encription_key.php"); $admin=new adminaccess(); $encry=new Encryption(); $student=new studentacess(); $class_id = $_REQUEST['classid']; $section_id = $_REQUEST['sec_id']; $dairy_date = $_REQUEST['dairy_date']; $dairy_type = $_REQUEST['dairy_type']; $studentids = $_REQUEST['stuids']; $studentids =ltrim($studentids,','); //$studentids =rtrim($studentids,','); $_SESSION['child']['dairy_section_id'] = $section_id; $_SESSION['child']['dairy_class_id'] = $class_id; $_SESSION['child']['dairy_date'] = $dairy_date; $classid = $_SESSION['child']['general_class']; $sectionid = $_SESSION['child']['general_section']; $classname =$admin->get_classname($classid); $sectioname =$admin->get_sectionsname($sectionid); $_SESSION['child']['general_classname'] = $classname['class_name']; $_SESSION['child']['general_sectioname'] = $sectioname['section_name']; $school_id = $_SESSION['child']['log_school_id']; $acadamic_year = $_SESSION['child']['choosen_academic_id']; $dairy_details=$student->dairy_data($class_id,$section_id,$dairy_date,$school_id,$dairy_type,$acadamic_year,$studentids); ?> <table id="myTable" class="table table-condensed table-hover" style="margin-top:-10px;"> <thead> <tr class="info"> <th class="col-md-1 text-center">Sl.No</th> <th>Subject</th> <th style="width:900px;">Description</th> <th style="width:900px;">Attachment</th> <th>Actions</th> </tr> </thead> <tbody> <?php if($dairy_details){ $i=1; foreach($dairy_details as $key=>$val){ ?> <tr> <td class="col-sm-1 text-center" style=" font-size:14px;"><?php echo $i?></td> <td style=" font-size:14px;"><?php echo $val['subject_name']?></td> <td style=" font-size:14px;width:900px;"><?php echo $val['description']?></td> <td style=" font-size:14px;width:900px;"><?php echo substr($val['attachment'],5);?></td> <td class="center"> <a class="buttonn" href="edit_comment.php?id=<?php echo $val['School_diary_id']?>" style="margin:4px;"> <i class="glyphicon glyphicon-pencil" title ="Edit" style="font-size: 13px; color:#01aee6;"></i> </a> <a class=" buttonn" onclick="return confirm('Do you want to delete the Comment ?')" href="delete_comment.php?id=<?php echo $val['School_diary_id']?>" style="margin:4px;"> <i class=" glyphicon glyphicon-remove" title="Delete" style="font-size: 14px; color:#01aee6;"></i> </a> </td> </tr> <?php $i++; } }else{ ?> <tr> <td></td> <td></td> <td>No data available in table</td> <td></td> </tr> <?php } ?> </tbody> </table>