コード例 #1
0
                                          <td><?php 
        echo $row['subject_title'];
        ?>
</td>
                                          <td>
										  <div align="center">
										  <?php 
        echo $row['credit_unit'];
        ?>
                                          </div>
                                          </td>
                                          <td>
                                          <div align="center">
                                          <?php 
        $total_unit += $row['credit_unit'];
        $time = unit_to_time($row['credit_unit']);
        $time = round($time * 4) / 4;
        $whole1 = (int) $time;
        $frac1 = $time * 100 % 100 * 0.6;
        printf("%02d:%02d", $whole1, $frac1);
        ?>
                                          </div>
                                          </td>
                                          <td>
										    <?php 
        $category_id = $row['category_id'];
        $query2 = mysql_query("SELECT * FROM subject_category_t WHERE category_id={$category_id}");
        $row2 = mysql_fetch_assoc($query2);
        echo $row2['category_name'];
        ?>
                                          </td>
コード例 #2
0
echo $row_section['curriculum_code'];
?>
 <br /></td>
            </tr>
            <tr >
              <td>Total Units: </td>
			  <td><?php 
echo $total_unit;
?>
 <br /></td>
            </tr>
            <tr >
              <td>Hours/Week: </td>
			  <td>
			  <?php 
$time = unit_to_time($total_unit);
$time = round($time * 4) / 4;
$whole1 = (int) $time;
$frac1 = $time * 100 % 100 * 0.6;
printf(" %02d:%02d", $whole1, $frac1);
?>
 
              </td>
            </tr>
            <tr >
              <td>School Year: </td>
              <td> <?php 
//echo $row_sy['sy_start']." - ".$row_sy['sy_end'];
?>
                  <select name="sy_id" id="sy_id" style="width:auto;">
                  <?php 
コード例 #3
0
ファイル: scheduler.php プロジェクト: jackieramos/pnhs
    if ($teacher_id != NULL) {
        $query_teacher = mysql_query("SELECT * FROM employee_t WHERE emp_id={$teacher_id}");
        $row_teacher = mysql_fetch_assoc($query_teacher);
        $teacher = $row_teacher['f_name'];
    } else {
        $teacher = "";
    }
    $query_room = mysql_query("SELECT * FROM class_room_t WHERE section_assigned='{$_GET['section_id']}'");
    $row_room = mysql_fetch_assoc($query_room);
    $room_no = $row_room['room_no'];
    $class[$i]['subject'] = $subject;
    $class[$i]['teacher'] = $teacher;
    $class[$i]['units'] = $units;
    $class[$i]['room'] = $room_no;
    $class_time = total_hours($class_id);
    $class_units = unit_to_time($units);
    $class_units = round($class_units * 4) / 4;
    $total_time += $class_time;
    $total_units += $class_units;
    //==============================fractionalizing
    $whole2 = (int) $class_units;
    $frac2 = $class_units * 100 % 100 * 0.6;
    $whole1 = (int) $class_time;
    $frac1 = $class_time * 100 % 100 * 0.6;
    $class_color[$class_id] = $i % 7 + 1;
    ?>
                      <script type="text/javascript">
					     var classes = <?php 
    echo json_encode($class);
    ?>
;
コード例 #4
0
ファイル: scheduler.php プロジェクト: jackieramos/pnhs
                      </script>
    
                      <tr class="color<?php 
    echo $i;
    ?>
">
                        <td ><?php 
    echo $subject;
    ?>
</td>
                        <td><?php 
    echo $teacher;
    ?>
</td>
                        <td><?php 
    printf("%.2f/%.2f", total_hours($class_id), unit_to_time($units));
    ?>
                          <!--<input value="#FFFFFF" style="padding:0; width:20px; height:20px; line-height:100%; " type="color"> -->
                        </td>
                      
                      </tr>
                    
                    <?php 
}
?>
                </tbody>
            </table>
            
          </div>
        </div>
コード例 #5
0
ファイル: teachers.php プロジェクト: jackieramos/pnhs
</td>
                      <td><?php 
    echo $emp_row['f_name'] . " " . $emp_row['l_name'];
    ?>
</td>
                      <td><?php 
    ?>
</td>
                      <td class="center"> <?php 
    echo $row['max_load'];
    ?>
</td>
                      <td class="center">
					  <?php 
    //echo $row['max_load'];
    $time = unit_to_time($row['max_load']);
    $time = round($time * 4) / 4;
    $whole1 = (int) $time;
    $frac1 = $time * 100 % 100 * 0.6;
    printf("%02d:%02d", $whole1, $frac1);
    ?>
                      </td>
                      <td class="center">
                        <a class="btn btn-mini" href="actions/teacher_del.php?emp_id=<?php 
    echo $row['emp_id'];
    ?>
"><i class=" icon-remove"></i> DELETE</a>
                        <a class="btn btn-mini" href="#editTeacher" onClick="fillEditForm(<?php 
    echo $row['emp_id'];
    ?>
)" data-toggle="modal"><i class="icon-cog"></i> EDIT</a>
コード例 #6
0
ファイル: sched_functions.php プロジェクト: jackieramos/pnhs
function print_time($units)
{
    $time = unit_to_time($units);
    $time = round($time * 4) / 4;
    $whole1 = (int) $time;
    $frac1 = $time * 100 % 100 * 0.6;
    //printf("Total Tims: %02d:%02d", $whole1, $frac1);
    return sprintf("%02d:%02d", $whole1, $frac1);
}
コード例 #7
0
function is_subj_max_e($class_id, $add_hours, $schedule_id)
{
    $query = mysql_query("SELECT subject_t.credit_unit AS credit_unit FROM subject_t, class_t WHERE subject_t.subject_code=class_t.subject_code\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t AND class_t.class_id={$class_id}") or die("error selecting subject");
    $row = mysql_fetch_assoc($query);
    $credit_unit = $row['credit_unit'];
    $total_hours = unit_to_time($credit_unit);
    //insert codes for getting the current school year
    $query_sched = mysql_query("SELECT * FROM class_schedule_temp_t WHERE schedule_id='{$schedule_id}'") or die("subj_func " . mysql_error());
    $row_sched = mysql_fetch_assoc($query_sched);
    $start = $row_sched['time_start'];
    $end = $row_sched['time_end'];
    $deduction = get_duration($start, $end);
    $curr_hours = total_hours($class_id) - $deduction;
    $curr_hours += $add_hours;
    if ($total_hours < $curr_hours) {
        return "Section has exceeded the maximum no. of load for the subject ({$curr_hours}/{$total_hours})";
    } else {
        return NULL;
    }
}