コード例 #1
0
                                          <?php 
// $i === time interval
// $j === sections
for ($i = 0; $i < count($times) - 1; $i++) {
    ?>
                                              <tr bgcolor='#F2F2F2'>
                                                        <th bgcolor='#EDEEFE' font="Arial"><font face='Arial, Helvetica, sans-serif' size='1'><?php 
    echo date('h:i A', strtotime($times[$i]));
    ?>
</th>
                                              <?php 
    for ($j = 0; $j < $day_count; $j++) {
        $loaded_day_ID = $j + 1;
        $start = $times[$i];
        $end = $times[$i + 1];
        $schedule_id = student_loaded($reg_no, $start, $end, $loaded_day_ID, 1);
        //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        $loaded_class_id = get_class_id($schedule_id, 1);
        //to retrieve from actual table
        if ($loaded_class_id != "") {
            $slots = get_slots($schedule_id);
            if (is_first($schedule_id, $start)) {
                ?>
 <th bgcolor="#dadada" class="loaded" rowspan="<?php 
                echo $slots;
                ?>
" onclick="show_ticket(<?php 
                echo $schedule_id;
                ?>
コード例 #2
0
      	<?php 
// $i === time interval
// $j === sections
for ($i = 0; $i < count($times) - 1; $i++) {
    ?>
            <tr bgcolor='#F2F2F2'>
                      <th bgcolor='#EDEEFE' font="Arial"><font face='Arial, Helvetica, sans-serif' size='1'><?php 
    echo date('h:i A', strtotime($times[$i]));
    ?>
</th>
            <?php 
    for ($j = 0; $j < $day_count; $j++) {
        $loaded_day_ID = $j + 1;
        $start = $times[$i];
        $end = $times[$i + 1];
        $schedule_id = student_loaded($student_id, $start, $end, $loaded_day_ID, semester());
        //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        //$schedule_id = block_loaded($block_id, $start, $end, $loaded_day_ID,1); //1 is current semester
        $loaded_class_id = get_class_id($schedule_id, 1);
        //to retrieve from actual table
        if ($loaded_class_id != "") {
            $slots = get_slots($schedule_id);
            if (is_first($schedule_id, $start)) {
                ?>
 <th bgcolor="#dadada" class="loaded" rowspan="<?php 
                echo $slots;
                ?>
"  onclick="show_ticket(<?php 
                echo $schedule_id;
                ?>