Viewing file: v_pieis_ftes.php (8.53 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script>
function change(flag){
if ($('#cur'+flag).is(':checked')) {
$(".crs_ch"+flag).attr('disabled','');
$(".crs_ch"+flag).attr('checked','checked');
}
else if($('#cur'+flag).is(':checked') == false)
{
$(".crs_ch"+flag).attr('checked','');
$(".crs_ch"+flag).attr('disabled','disabled');
}
}
function check_all(flag){
if ($('#checkall'+flag).is(':checked')) {
$(".crs_ch"+flag).attr('checked','checked');
}
else if($('#checkall'+flag).is(':checked') == false)
{
$(".crs_ch"+flag).attr('checked','');
}
}
function calftes(chk){
var crsCredit = chk;//$('.crsCredit[40][1451]');
alert(chk);
alert(crsCredit.val());
}
</script>
<table width="100%" align="center">
<tr>
<td>
<div align="center">
<table width="100%" border="0">
<!--tr>
<td height="22" colspan="2" align="right"><font size="2" color="<?=$font_color_err; ?>">ส่งออกเป็น</font>
<a onClick="document.printReport.submit();" class="hand"><img src="<?php echo base_url().$this->config->item("rg_excel_exp");?>" border="0"></a></td>
</tr-->
<tr>
<td colspan="2" align="center"><span class="h error">นักศึกษาเวลาเต็มเทียบเท่า (FTES)</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr><?php
//echo form_open($this->config->item("rg_folder")."rpt_level/rptRis118");
echo form_open($this->config->item("rg_folder")."regist2pieis/rpt_ftes",'id = "yearSelected"');
?>
<td>ปีการศึกษาที่ <select name="year" onchange="document.getElementById('yearSelected').submit();">
<option value="" ></option>
<?php
foreach($year as $row){
echo '<option ';
if($postYear == $row->rdAcY){
echo " selected ";
}
echo 'value="'.$row->rdAcY.'">'.$row->rdAcY.'</option>';
}
?>
</select>
<?php echo form_close();?>
</td>
</tr>
<tr>
<td colspan="2">
<?php
//echo form_open($this->config->item("rg_folder")."rpt_level/rptRis118");
echo form_open($this->config->item("rg_folder")."regist2pieis/rpt_ftes");
?>
<table width="100%">
<?php
if($nums) {
$sumCredit =0;
$sumTotal = 0;
$sumCreditxTotal = 0;
echo '<input type="hidden" name="year" value="'.$postYear.'"/>';
for($j=0;$j<$nums;$j++){
$checked = '';
if(isset($curId[$co_obj[$j]->curId])){
$checked = 'checked';
}else{
$checked = '';
}
// echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
//echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<tr><td><br /></td></tr>
<tr>
<td align="left" > <font size="2"><b>
<input type="checkbox" name="cur_select[<?=$co_obj[$j]->curId?>]" value="<?=$co_obj[$j]->curId?>" id="cur<?=$j;?>" onchange="change(<?=$j;?>)" <?php echo $checked; ?> >
<?php echo $co_obj[$j]->curName;?>
</b></font>
</td>
</tr>
<tr>
<td align="left" > <font size="2"><b>
จำนวนหน่วยกิตต่อปีการศึกษาตามเกณฑ์มาตรฐาน <input type="textbox" name="credit[<?=$co_obj[$j]->curId?>]" value="<?php if(isset($credit[$co_obj[$j]->curId])){ echo $credit[$co_obj[$j]->curId]; }else{ echo '36';} ?>" size="3">
</b></font>
</td>
</tr>
<tr><td>
<table class="headCol">
<tr >
<th rowspan="2"><font size="2" color="#000000"><b></b></font></th>
<th rowspan="2"><font size="2" color="#000000"><b>ลำดับ</b></font></th>
<th rowspan="2"><font size="2" color="#000000"><b>รหัสวิชา</b></font></th>
<th rowspan="2"><font size="2" color="#000000"><b>ชื่อวิชา</b></font></th>
<th rowspan="2"><font size="2" color="#000000"><b>ชั้นปี/ภาคการศึกษา</b></font></th>
<th colspan="2"><font size="2" color="#000000"><b>จำนวน</b></font></th>
</tr>
<tr >
<th ><font size="2" color="#000000"><b>หน่วยกิต</b></font></th>
<th ><font size="2" color="#000000"><b>นักศึกษา</b></font></th>
<!-- <th ><font size="2" color="#000000"><b>หน่วยกิตxนักศึกษา</b></font></th> -->
</tr>
<!-- <td align="center" >
<input type="checkbox" id="checkall<?=$j;?>" onchange="check_all(<?=$j;?>)" class="crs_ch<?=$j;?>" checked>
</td> -->
<td colspan="5"></td>
<?php
$Credit = 0;
$Total = 0;
$CreditxTotal = 0;
$index=0;
foreach($rs_array[$j]->result() as $row) {
$index++;
$checked = '';
if(isset($crsId[$row->coCrsId])){
$checked = 'checked';
}else{ $checked = '';}
//echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?> <tr>
<td align="center"><font size="2"><input type="checkbox" name="crs_select[<?=$row->coCrsId;?>]" value="<?=$row->coCrsId;?>" class="crs_ch<?=$j;?>" <?php echo $checked; ?> ></font></td>
<td align="center"><font size="2"><?php echo $index;?></font></td>
<td align="center"><font size="2"><?php echo $row->crsCode;?></font></td>
<td align="left"><font size="2"><?php echo $row->crsName;?></font>
<td align="center"><font size="2"><?php echo $row->coSyId.'/'.$row->coTmId;?></font>
<td align="center"><font size="2"><?php echo $row->crsUnit;?></font> </td>
<td align="center"><font size="2"><?php echo $row->total;?></font></td>
<!-- <td align="center"><font size="2"><?php //echo $row->crsCreditTotal*$row->total;?></font></td> -->
</tr><?php
if($checked != ''){
$Credit += $row->crsCreditTotal;
$Total += $row->total;
$CreditxTotal += ($row->crsCreditTotal*$row->total);
$sumCredit += $row->crsCreditTotal;
$sumTotal += $row->total;
$sumCreditxTotal += $row->crsCreditTotal*$row->total;
}
} //end foreach
?>
<?php echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" colspan="5"><font size="2"></font></td>
<td align="center" colspan="2"><font size="2"><b><?php echo 'SCH = '.$CreditxTotal;?><b/></font></td>
</tr>
<?php if($CreditxTotal != 0){ ?>
<?php echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" colspan="5"><font size="2"></font></td>
<td align="center" colspan="2"><font size="2" text-align="left"><b><?php echo ' FTES = '.intval($CreditxTotal/$credit[$co_obj[$j]->curId]);?><b/></font></td>
</tr>
<?php } ?>
</table>
</td></tr>
<?php
}//end for ?>
<!-- <tr><td>
<table class="headCol">
<?php //echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" colspan="3"><font size="2">รวม</font></td>
<td align="center"><font size="2"><?php //echo $sumCredit;?></font></td>
<td align="center"><font size="2"><?php //echo $sumTotal;?></font></td>
<td align="center"><font size="2"><?php //echo $sumCreditxTotal;?></font></td>
</tr>
</table>
</td></tr> -->
<?php
}else{
?>
<tr>
<td colspan='0' align="center"><span class="error"> ** ไม่ปรากฏรายการในฐานข้อมูล ** </span></td>
</tr>
<?php
}
?>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td align="center" colspan="0">
<input type="submit" name="add" id="add" value="ตกลง"/>
<input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" />
</td>
</tr>
</table><?php echo form_close();?>
</td>
</tr>
</table>
|