PHP 8.1.33
Preview: class_routine.php Size: 4.39 KB
/home/jambtst2015/public_html/app/application/views/backend/parent/class_routine.php

<?php 
    $child_of_parent = $this->db->get_where('enroll' , array(
        'student_id' => $student_id , 'year' => $running_year
    ))->result_array();
    foreach ($child_of_parent as $row):
        $class_id = $this->db->get_where('enroll' , array(
            'student_id' => $row['student_id'] , 'year' => $running_year
        ))->row()->class_id;
        $section_id = $this->db->get_where('enroll' , array(
            'student_id' => $row['student_id'] , 'year' => $running_year
        ))->row()->section_id;
?>
<hr />
<div class="label label-primary pull-right" style="font-size: 14px; font-weight: 100;">
    <i class="entypo-user"></i> <?php echo $this->db->get_where('student' , array('student_id' => $row['student_id']))->row()->name;?>
</div>
<br><br>
<div class="row">
    
    <div class="col-md-12">

        <div class="panel panel-default" data-collapsed="0">
            <div class="panel-heading" >
                <div class="panel-title" style="font-size: 16px; color: white; text-align: center;">
                    <?php echo get_phrase('class');?> - <?php echo $this->db->get_where('class' , array('class_id' => $class_id))->row()->name;?> : 
                    <?php echo get_phrase('section');?> - <?php echo $this->db->get_where('section' , array('section_id' => $row['section_id']))->row()->name;?>
                    <a href="<?php echo base_url();?>index.php?parents/class_routine_print_view/<?php echo $class_id;?>/<?php echo $row['section_id'];?>" 
                        class="btn btn-primary btn-xs pull-right" target="_blank">
                            <i class="entypo-print"></i> <?php echo get_phrase('print');?>
                    </a>
                </div>
            </div>
            <div class="panel-body">
                
                <table cellpadding="0" cellspacing="0" border="0"  class="table table-bordered">
                    <tbody>
                        <?php 
                        for($d=1;$d<=7;$d++):
                        
                        if($d==1)$day='sunday';
                        else if($d==2)$day='monday';
                        else if($d==3)$day='tuesday';
                        else if($d==4)$day='wednesday';
                        else if($d==5)$day='thursday';
                        else if($d==6)$day='friday';
                        else if($d==7)$day='saturday';
                        ?>
                        <tr class="gradeA">
                            <td width="100"><?php echo strtoupper($day);?></td>
                            <td>
                                <?php
                                $this->db->order_by("time_start", "asc");
                                $this->db->where('day' , $day);
                                $this->db->where('class_id' , $class_id);
                                $this->db->where('section_id' , $section_id);
                                $this->db->where('year' , $running_year);
                                $routines   =   $this->db->get('class_routine')->result_array();
                                foreach($routines as $row2):
                                ?>
                                <div class="btn-group">
                                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                        <?php echo $this->crud_model->get_subject_name_by_id($row2['subject_id']);?>
                                        <?php
                                            if ($row2['time_start_min'] == 0 && $row2['time_end_min'] == 0) 
                                                echo '('.$row2['time_start'].'-'.$row2['time_end'].')';
                                            if ($row2['time_start_min'] != 0 || $row2['time_end_min'] != 0)
                                                echo '('.$row2['time_start'].':'.$row2['time_start_min'].'-'.$row2['time_end'].':'.$row2['time_end_min'].')';
                                        ?>
                                        <span class="caret"></span>
                                    </button>
                                </div>
                                <?php endforeach;?>

                            </td>
                        </tr>
                        <?php endfor;?>
                        
                    </tbody>
                </table>
                
            </div>
        </div>

    </div>

</div>
<?php endforeach;?>

Directory Contents

Dirs: 0 × Files: 24

Name Size Perms Modified Actions
1.73 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.02 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.10 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.39 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
3.89 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.33 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
3.22 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.30 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.70 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
3.65 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.60 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
702 B lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.95 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.74 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.15 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.78 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.75 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.54 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.49 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.03 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
5.14 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.76 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.40 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.52 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).