?
Current Path : /home1/savoy/public_html/savoyglobal.net/koolkids/school/application/views/Settings/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/koolkids/school/application/views/Settings/viewalert.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> <script type="text/javascript"> function load(id) { if(confirm('Remove this student from alert list?')) { $.ajax({ type: "POST", url: "<?= site_url()?>"+'/settings/addalert/'+ id +'/', success: function(msg) { if(msg==0) { } else { viewdata('settings','viewinsettingssearch','searchalert','viewalert','1'); } } }); } } </script> <span class="section_content_top"></span> <div class="section_content_inner"> <?php $attributes=array('class'=>'search_form','id'=>'validateform'); echo form_open('settings/addinsettings/insertalert/viewalert/',$attributes); ?> <fieldset> <?php $value=$this->mastermodel->getdatas('schoolsetup','name'); foreach($value as $row) { $days=$row['alert_days']; } ?> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table cellpadding="0" cellspacing="0" width="100%" border="1"> <tbody><tr> <th style="width: 17px;">Sl No.</th> <th><span>Reg. No.</span></th> <th><span>Name in Full</span></th> <th>Surname</th> <th>Gender</th> <th>Date of birth</th> <th>Age</th> <th style="width: 100px;">Remove</th> </tr> <?php $slno=1; foreach($viewinfo->result() as $row) { $date1=date("Y-m-d",strtotime(date("Y-m-d").'+'.$days.' day')); $date2=$row->dob; $diff = abs(strtotime($date2) - strtotime($date1)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); if($years>=4) { $date1=$this->mastermodel->convertdatenormalformat($row->dob); $date2 = date("Y-m-d"); $diff = abs(strtotime($date2) - strtotime($date1)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); ?> <tr> <td><?=$slno++;?></td> <td><?=$row->reg_no;?></td> <td><a href="#" onclick="viewformdata('student','singlestudent','<?=$row->student_id;?>')"><?=$row->first_name;?></a></td> <td><?=$row->last_name;?></td> <td><?=$row->gender;?></td> <td><?=$this->mastermodel->convertdatenormalformat($row->dob);?></td> <td><?=$years?> yrs <?=$months?> months</td> <td><a class="delete" href="#" onclick="load(<?=$row->student_id;?>)">Remove</a></td> </tr> <?php } } ?> </tbody> </table> </div> </div> <input type="hidden" name="limit" value="<?=$slno?>"/> </fieldset> <?php echo form_close(); ?> </div> <span class="section_content_bottom"></span>