コード例 #1
0
function is_available_e($section_id, $subject_code, $teacher_id, $class_id)
{
    $sy_id = get_active_sy();
    //echo $sy_id; AND teacher_id={$teacher_id}
    $query = mysql_query("SELECT * FROM class_t \n\t\t\t\t\t\t\t\t   WHERE subject_code={$subject_code}\n\t\t\t\t\t\t\t\t   AND section_id={$section_id}\n\t\t\t\t\t\t\t\t   AND sy_id={$sy_id}\n\t\t\t\t\t\t\t\t   AND class_id<>{$class_id}") or die("hello");
    $row = mysql_fetch_assoc($query);
    return mysql_num_rows($query) < 1 ? true : false;
}
コード例 #2
0
ファイル: sched_teacher.php プロジェクト: jackieramos/pnhs
    $emp_id = $_GET['emp_id'];
}
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Schedule for</title>

<link rel="stylesheet" href="css/tables.css" type="text/css" media="screen"/>


<?php 
$color = array("#C6D9F0", "#DBE5F1", "#F2DCDB", "#EBF1DD", "#E5E0EC", "#DBEEF3", "#FDEADA", "#FBD5B5");
include '../db/db.php';
$sy_id = get_active_sy();
$query = mysql_query("SELECT * FROM class_t WHERE teacher_id={$_GET['emp_id']} AND sy_id={$sy_id}");
$class = array();
$i = 0;
while ($row = mysql_fetch_assoc($query)) {
    $class_id = $row['class_id'];
    $class_color[$class_id] = $color[$i % 8];
    $i++;
}
?>


</head>

<body>
コード例 #3
0
      <!--</widget>-->
      </div>
      <!--</span>-->
      <div class="span4">
      <a class="btn btn-large btn-success" href="report_section.php?section_id=<?php 
echo $_GET['section_id'];
?>
&sy_id=<?php 
echo isset($_GET['sy_id']) ? $_GET['sy_id'] : get_active_sy();
?>
"><i class="icon-print"></i> PRINT </a>
      <a class="btn btn-large btn" target="_blank" href="pdf_section.php?section_id=<?php 
echo $_GET['section_id'];
?>
&sy_id=<?php 
echo isset($_GET['sy_id']) ? $_GET['sy_id'] : get_active_sy();
?>
"><i class="icon-print"></i> PDF </a>

      </div>
    <!-- InstanceEndEditable -->
    
    
    
      
    <!-- /span6 -->
    </div>
    <!-- /row -->
  </div>
  <!-- /container -->
</div>
コード例 #4
0
ファイル: sections.php プロジェクト: jackieramos/pnhs
        ?>
">
										  <td><?php 
        echo $row['section_no'];
        ?>
</td>
										  <td><?php 
        echo $row['section_name'];
        ?>
</td>
										  <td><?php 
        echo $row['section_size'];
        ?>
</td>
                                          <td><?php 
        echo section_students($section_id, get_active_sy());
        ?>
</td>
										  <td><?php 
        echo $row['curriculum_code'];
        ?>
</td>
										  <td align="center">
                                             <!--<a class='btn btn-mini' href='section_edit.php?section_id=<?php 
        echo $section_id;
        ?>
'> EDIT </a>-->
                                             <a class='btn btn-mini' onClick="fillEditForm(<?php 
        echo $section_id;
        ?>
)" data-toggle="modal" href='#editSection'> <i class="icon-cog" ></i> EDIT </a>
コード例 #5
0
ファイル: report_teacher.php プロジェクト: jackieramos/pnhs
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php 
if (isset($_GET['emp_id'])) {
    $emp_id = $_GET['emp_id'];
}
include "actions/class_functions.php";
include "actions/subject_functions.php";
if (!isset($_GET['sy_id'])) {
    $school_yr = get_active_sy();
} else {
    $school_yr = $_GET['sy_id'];
}
?>

<html xmlns="http://www.w3.org/1999/xhtml" style="background-color:#FFF">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Teacher Report</title>

<link type="text/css" rel="stylesheet" href="../css/bootstrap1.css"  />
</head>

<body style="background-color:#FFF">
<div style="width:95%; margin:10px auto;">
  <div id="header" style="margin-bottom:20px; height:100px; overflow:hidden;">
    <img style=" display:inline-block" src="../images/pnhs_logo.png" align="top" >
    <div style="display:inline-block;; border:0px solid black; height:100%; width:500px;font-weight:bold; padding-top:20px; padding-left:20px;"><h4>PAGASA NATIONAL HIGH SCHOOL</h4></div>
  </div>
  <div>
    <table width="100%" style="border:1px solid black;" cellmargin="0">
      <tr>
コード例 #6
0
ファイル: pdf_list_subject.php プロジェクト: jackieramos/pnhs
                                          
										  <td><center><?php 
        echo $row['section_name'];
        ?>
</center></td>
										  <td><center><?php 
        echo $row['section_no'];
        ?>
</center></td>
										  <td><center><?php 
        echo $row['section_size'];
        ?>
</center></td>
                                          <td><center><?php 
        echo section_students($section_id, get_active_sy());
        $total_students += section_students($section_id, get_active_sy());
        ?>
</center></td>
										  <td><center><?php 
        echo $row['curriculum_code'];
        ?>
</center></td>
										  
										</tr>
										
									  <?php 
    }
    ?>
                                    	
                                    </tbody>
                                    <tfoot>
コード例 #7
0
ファイル: sched_functions.php プロジェクト: jackieramos/pnhs
function is_faculty_loaded_e($class_id, $start, $end, $days, $schedule_id)
{
    $query = mysql_query("SELECT * FROM class_t WHERE class_id={$class_id}");
    $row = mysql_fetch_assoc($query);
    $emp_id = $row['teacher_id'];
    if ($emp_id == NULL) {
        return "";
    }
    $sy_id = get_active_sy();
    foreach ($days as $day) {
        $query = mysql_query("SELECT * FROM class_schedule_t WHERE schedule_id <> {$schedule_id} AND day='{$day}' AND class_id IN (SELECT class_id FROM class_t WHERE teacher_id='{$emp_id}' AND sy_id={$sy_id}) ") or die(mysql_error() . "  yeh");
        while ($row = mysql_fetch_assoc($query)) {
            $db_start = $row['time_start'];
            $db_end = $row['time_end'];
            $t_start = strtotime($start);
            $t_end = strtotime($end);
            $t_db_start = strtotime($db_start);
            $t_db_end = strtotime($db_end);
            if ("conflict" == conflict_check($t_start, $t_end, $t_db_start, $t_db_end)) {
                $class_id = $row['class_id'];
                $query_subject = mysql_query("SELECT subject_t.subject_title FROM subject_t, class_t WHERE class_t.class_id={$class_id} AND subject_t.subject_code=class_t.subject_code");
                $row_subject = mysql_fetch_assoc($query_subject);
                $subject = $row_subject['subject_title'];
                $st = date('h:i A', $t_db_start);
                $en = date('h:i A', $t_db_end);
                return "Teacher has conflicting schedule {$subject} @ {$st} - {$en}.";
                //$row_subject['subject_title'];
            }
        }
    }
    return "";
}
コード例 #8
0
function is_teacher_max_e($emp_id, $subject_code_2add, $class_id)
{
    if ($emp_id == "NULL") {
        return NULL;
    }
    $query = mysql_query("SELECT * FROM teacher_t WHERE emp_id='{$emp_id}'") or die("error selecting teach");
    $row = mysql_fetch_assoc($query);
    $max_load = $row['max_load'];
    //insert codes for getting the current school year
    $sy_id = get_active_sy();
    $total_units = 0;
    $query2 = mysql_query("SELECT * FROM class_t WHERE teacher_id='{$emp_id}' AND sy_id='{$sy_id}' AND class_id<>'{$class_id}'") or die(mysql_error());
    while ($row2 = mysql_fetch_assoc($query2)) {
        $subject_code = $row2['subject_code'];
        $total_units += get_units($subject_code);
    }
    $total_units += get_units($subject_code_2add);
    if ($total_units > $max_load) {
        return "Teaching load exceeded the maximum allowed value ({$total_units}/{$max_load})";
    } else {
        return NULL;
    }
}