Viewing file: v_showRepRis111.php (4.43 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><br><fieldset>
<div align="center"><br />
<?php echo form_open($this->config->item("rg_folder")."", array("name" => "myform", "id" => "myform"));?>
<table width="90%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td colspan="2"><br /></td>
</tr>
<tr>
<td colspan="2" align="center"><font size="3" color="<?php echo $font_color_err;?>"><b>รายวิชาที่สอน</b></font></td>
</tr>
<tr>
<td height="22" colspan="4"></td>
</tr>
<tr>
<td width="20%" height="22"><font size="2"><b>ภาค/ปีการศึกษา</b></font></td>
<td width="80%"><font size="2"> <?php echo $tmId."/".$acY;?></font>
<input type="hidden" name="acY" id="acY" value="<?php echo $acY;?>" />
<input type="hidden" name="tmId" id="tmId" value="<?php echo $tmId;?>" /></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td height="22"><font size="2"><b>รหัสรายวิชา</b></font></td>
<td><font size="2">*<?php echo $crsCode;?>*</font>
<input type="hidden" name="crsCode" id="crsCode" value="<?php echo $crsCode;?>" /></td>
</tr>
<tr>
<td height="22" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="0">
<tr bgcolor="<?php echo $this->config->item("rg_table_color");?>">
<td width="10%" height="22" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>รหัสรายวิชา</b></font></td>
<td width="45%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อรายวิชา</b></font></td>
<td width="35%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่ออาจารย์ผู้สอน</b></font></td>
<td width="5%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>พิมพ์</b></font></td>
</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("coSectionClass"==$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" color="<?php echo $font_color_err;?>" /><?php echo $teacher;?></font></td>
<td align="center">
<?php $lnk = anchor($this->config->item("rg_folder")."rpt_misc/repRis111/$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="4" align="right"><font size="2">รวม <?php echo $i;?> รายการ</font></td>
</tr>
</table></form></div>
</fieldset><br></td>
</tr>
</table>
|