Viewing file: v_showRptRis999.php (5.31 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<table width="100%" align="center">
<tr>
<td>
<div align="center">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td colspan="4" align="center"><span class="h error">รายวิชาที่สอน</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td colspan="4">
<?php
echo form_open($this->config->item("rg_folder")."rpt_regis/searchRptRis999");
?>
<table class="szone">
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">ปีการศึกษา</td>
<td><input type="text" name="acY" id="acY" value="<?php echo set_value('acY',$acY)?>" size="4" maxlength="4">
<span class="error">* <?php echo form_error('acY');?></span>
</td>
<td class="coltd_szone">ภาคการศึกษา</td>
<td width="35%">
<?php
echo form_dropdown('tmId', $rs_tm, $tmId);
?>
<span class="error">* <?php echo form_error('tmId');?></span></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">รหัสรายวิชา</td>
<td><input type="text" name="crsCode" id="crsCode" value="<?php echo set_value('crsCode');?>" size="10" maxlength="10">
<span class="error">* <?php echo form_error('crsCode');?></span></td>
<td class="coltd_szone">กลุ่มเรียน</td>
<td><input type="text" name="crsSection" id="crsSection" value="<?php echo (set_value('crsSection'));?>" size="2" maxlength="2">
<span class="error">* <?php echo form_error('crsSection');?></span>
</td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td colspan="4" align="center"><input type="submit" id="btnSearch" name="btnSearch" value="ค้นหา" /></td>
</tr>
</table><?php echo form_close();?></td>
</tr>
<tr>
<td height="22" colspan="4"></td>
</tr>
<tr>
<td colspan="4"><table width="100%" class="headCol">
<tr bgcolor="<?php echo $this->config->item("rg_table_color");?>">
<th width="15%" height="22" align="center" class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>"><b>รหัสรายวิชา</b></font></th>
<th width="45%" align="center" class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อรายวิชา</b></font></th>
<th width="30%" align="center" class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่ออาจารย์ผู้สอน</b></font></th>
<th width="10%" align="center" class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>"><b>พิมพ์</b></font></th>
</tr><?php
$i =0;
if($arr) {
foreach($arr as $key => $karr) { // คู่แรก [279] = array()
$i++;
if(($i%2) == 0)
echo "<tr>";
else
echo "<tr bgcolor=\"".$tr_color_even."\">";
if($key) {
?>
<td><input type="hidden" name="crsId" value="<?php echo $key;?>" />
<?php
}
$strCurName = "";
$strPrsName = "";
$strSection = "";
foreach($karr as $kk => $vv) { // คู่ใน check ว่าเป็น array หรือว่า value
//echo "$kk=$vv";
if("crsCode"==$kk) {
?>
<font size="2"><?php echo $vv;?></font></td>
<?php
}
if("crsName"==$kk) {
?>
<td><font size="2"><?php echo $vv;?></font>
<?php
}
if("coId"==$kk) {
$coId = $vv;
}
if(is_array($vv)) {
foreach($vv as $kvv => $vvv) { // คู่ในสุด เอาค่าออกมา
//echo "$kvv = $vvv<br />"; else echo "$kk = $vv<br />";
if("curName"==$kvv) {
$strCurName .= "[".$vvv."]<br />";
}
if("prsName"==$kvv) {
$prs = explode("||", $vvv);
foreach($prs as $kprs => $pvv) {
$strPrsName .= $pvv.", ";
}
}
if("coSection"==$kvv) {
$strSection .= $vvv.", <br />";
}
}
?>
<?php
}
}
$teacher = substr($strPrsName, 0, -2);
?>
<font size="2" color="<?php echo $font_color_err;?>" /><?php echo "<br />".$strCurName;?></font></td>
<td><font size="2"> <?php echo $teacher;?></font></td>
<td align="center">
<?php $lnk = anchor($this->config->item("rg_folder")."rpt_regis/rptRis999PDF/$acY/$tmId/$coId", "<img src=\"".base_url().$this->config->item("rg_print")."\" align=\"absmiddle\" border=\"0\" />");
echo $lnk;
?>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="4" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายวิชาที่สอนในฐานข้อมูล **</font></td>
</tr>
<?php
}
?> </table></td>
</tr>
<tr>
<td colspan="3"></td>
<td align="right"><font size="2">รวม <?php echo $i;?> รายการ</font></td>
</tr>
</table>
<?php echo form_close();?>
</div>
<br><font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td>
</tr>
</table>
|