Viewing file: v_rpt_attend_sc.php (3.91 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="javascript">
function newXmlHttp(){
var xmlhttp = false;
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
xmlhttp = false;
}
}
if(!xmlhttp && document.createElement){
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function change_sc(mb_type,sc_id,seed){
var url = "<?=site_url("esa/report/get_sc")?>"+"/"+mb_type+"/"+sc_id+"/"+seed;
xmlhttp = newXmlHttp();
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
document.getElementById("sc").innerHTML = xmlhttp.responseText;
}
function report_print() {
document.getElementById("type").value = "print";
document.getElementById("myform_search").action = "attend_sc";
document.getElementById("myform_search").submit();
document.getElementById("type").value = "";
}
</script>
<table width="100%" border="0">
<thead>
<tr>
<td align='center'><h3>รายงานรายชื่อสมาชิกสโมสร/ชมรม</h3></td>
</tr>
<?php
$attributes = array('id' => 'myform_search', 'name' => 'myform_search');
echo form_open("esa/report/attend_sc", $attributes);
?>
<tr>
<td>
<table class='szone2' width="100%" border="0">
<tr class='szone'>
<td width="20%" align="right">ปีงบประมาณ </td>
<td>
<?=form_dropdown('year', $qu_ib ,set_value('year', $mb_year)); ?>
</td>
</tr>
<tr class='szone'>
<td align="right">ประเภท</td>
<td><?php echo form_dropdown('mb_type', $rs_type, set_value('mb_type',$mb_type), "onchange='change_sc(this.value,".mt_rand().")'");?></td>
</tr>
<tr class='szone'>
<td align="right">ชื่อ สโมสร / ชมรม</td>
<td><div id='sc'><?php echo form_dropdown('sc_id', $opt_sc, set_value('sc_id',$sc_id));?></div></td>
</tr>
<tr class='szone'>
<td align="right">รหัส / ชื่อ-สกุลนักศึกษา </td>
<td><input type="text" id="v_search" name="v_search" value="<?=$v_search;?>" size='30' /></td>
</tr>
<tr class='szone2'>
<td height="30" colspan="2" align="center">
<input type="hidden" id="type" name="type" value=""/>
<input type="submit" id="btnSearch" name="btnSearch" value="ค้นหา" />
</td>
</tr>
<?php
echo form_close();
?>
</table>
</td>
</tr>
</table>
<br>
<div align='right'><?=img($this->config->item('sa_image_print'));?></div>
<br>
<table class='tb_1' width="100%" border="0">
<tr>
<th align="center">ลำดับที่</th>
<th align="center">ปีงบประมาณ</th>
<th align="center">รหัสนักศึกษา</th>
<th align="center">ชื่อ - นามสกุล</th>
<th align="center">สโมสร/ชมรม</th>
<th align="center">ปี/ภาคการศึกษา/ชั้นปี ที่เป็นสมาชิก</th>
<th align="center">วันที่เป็นสมาชิก</th>
</tr>
<?php
if ($rs_sc->num_rows > 0) {
$index=1;
foreach ($rs_sc->result() as $row) {
?>
<tr>
<td align="center"><?php echo $index;?></td>
<td align="center"><?php echo $row->mb_year;?></td>
<td align="center"><?php echo $row->stdCode;?></td>
<td ><?php echo $row->prefixName.$row->stdName.' '.$row->stdSurname ;?></td>
<td ><?php echo ($row->smo_name!='')? '[ สโมสร ] '.$row->smo_name : '[ ชมรม ] '.$row->cl_name ;?></td>
<td align="center"><?php echo $row->mb_year.'/'.$row->mb_tmId.'/'.$row->mb_syId;?></td>
<td align="center"><?php echo abbreDate2($row->mb_fr_date);?></td>
</tr>
<?php
$index++;
}
}else{
?>
<tr class='notfound'>
<td colspan="7" align="center"><?php echo $this->config->item('sa_not_found');?></td>
</tr>
<?php
}
?>
</table>
<SCRIPT LANGUAGE="Javascript">
change_sc('<?=$mb_type?>','<?=$sc_id?>','<?=mt_rand()?>');
</script>
|