Viewing file: v_ttArrangedSchedule.php (30.56 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php echo ini_set("memory_limit", "256M");?> <script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.6.2.min.js"></script> <script language="javascript" > var view = ""; var url_co = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable2/courseInYear"; var url_co_sec = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable2/sectionInCourse"; var url_del = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable2/loadDelTb"; var pp = null; $(document).ready(function(){ $('#edit').hide(); $('#del').hide(); $('#onedy').hide(); $('#prs').hide(); <? if($mode!="default"){ echo "$('#tbadd').hide();"; } ?> $("#tmcAcY").val($("#tbtmcAcY").val()); get_option(); chooseCourse2(); chooseSec(); <? if($mode=="teacher"){ echo "ChangeView('t');"; }else{ echo "ChangeView('c');"; } ?> loadDelTable(url_del); $("input[name='place']").click(function () { var place = $("input[name='place']:checked").val(); if (place == 1){ $('#bd').show(); $('#rmerror').show(); $('#mep').hide(); $('#sep').hide(); $('#meperror').hide(); $('#seperror').hide(); }else{ $('#rmerror').hide(); $('#bd').hide(); $('#mep').show(); $('#sep').show(); $('#meperror').show(); $('#seperror').show(); } }); $(document).delegate("#btdel", 'click', function() { if(confirm("คุณต้องการลบใช่หรือไม่") == false){ return false; } });
$("#btedit").click(function () { $("#tmcAcY").removeAttr("disabled"); $("#tbtmcAcY").removeAttr("disabled"); $("#tmId").removeAttr("disabled"); $("#curId").removeAttr("disabled"); $("#syId").removeAttr("disabled"); $("#crsId").removeAttr("disabled"); $("#coSection").removeAttr("disabled"); $("#wdAcYWeekNo").removeAttr("disabled"); }); $(document).delegate("button[name='selectall']", 'click', function() { $('input:checkbox[name*=delId[]]').attr('checked',true); checkSubmit(); }); $(document).delegate("button[name='cancel']", 'click', function() { $('input:checkbox[name*=delId[]]').attr('checked',false); checkSubmit(); }); checkSubmit(); $('#title').keyup(checkSubmit); $(':radio[name=place]').change(function(){ checkSubmit(); }); }); /*function checkall(){ $('input:checkbox[name*=delId[]]').attr('checked',true); } function nocheckall(){ $('input:checkbox[name*=delId[]]').attr('checked',true); }*/ function back(){ $('#tbh').text("จัดตารางสอน"); $('#edit').hide(); $('#add').show(); $('#del').hide(); $('#tb').show(); $("#hidval").html(""); $("#prsset").html(""); $('#prs').hide(); $('#box').show(); $('#onedy').hide(); $('#muldy').show(); $('.amo').show(); $("#tmcAcY").removeAttr("disabled"); $("#tbtmcAcY").removeAttr("disabled"); $("#tmId").removeAttr("disabled"); $("#curId").removeAttr("disabled"); $("#syId").removeAttr("disabled"); $("#crsId").removeAttr("disabled"); $("#coSection").removeAttr("disabled"); $("#wdAcYWeekNo").removeAttr("disabled"); } function getExam(){ var url = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable2/getExam"; $.ajax({ url: url, global: false, type: "POST", data: { tbtmcAcY : $("#tbtmcAcY option:selected").val(), up : $("#tbprsId option:selected").val() }, async:false, dataType: 'json',//"html", success: function(data) { //alert(data.qry); $("#tbexam").html(data.tbexam); } }); } function validForm(mode){ var value = $(':radio[name=place]:checked').val(); if(parseInt(value)==1){ if($('#rmId').val()==""){ return true; } } if(parseInt(value)==2){ if($('#mepId').val()=="" || $('#sepId').val()=="%"){ return true; } } if($('#curId').val()=="" || $('#syId').val()=="" || $('#crsId').val()=="" || $('#coSection').val()=="" || $('#coSection').val()==""){ return true; } if(mode==1){ if($(":checkbox[name='dyId[]']:checked").length<=0 || $('#prsbox').val()==""){ return true; } } if(mode==3){ if($(":checkbox[name='delId[]']:checked").length<=0){ return true; } } return false; } function checkSubmit() { if(pp=='Y'){ $('#btadd').attr( 'disabled', validForm(1)); $('#btedit').attr( 'disabled', validForm(2)); $('#btdel').attr( 'disabled', validForm(3)); $('.pp').hide(); }else{ $('#btadd').attr( 'disabled', true); $('#btedit').attr( 'disabled', true); $('#btdel').attr( 'disabled', true); $('.pp').show(); } } function chooseCourse2(){ chooseCourse({tmcAcY :$("#tmcAcY option:selected").val() },url_co,'tbcrsId'); } function chooseSec(){ chooseCourse({tmcAcY :$("#tmcAcY option:selected").val(),tbcrsId :$("#tbcrsId option:selected").val() },url_co_sec,'tbcoSection'); }
function get_option(){ var url = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable/get_option"; $.ajax({ url: url, global: false, type: "POST", data: { tbsyId : $("#tbsyId option:selected").val() , tbcurId : $("#tbcurId option:selected").val() , tmcAcY : $("#tmcAcY option:selected").val() , tmId : $("#tmId option:selected").val() , curId : $("#curId option:selected").val() , syId : $("#syId option:selected").val() , crsId : $("#crsId option:selected").val() , coSection : $("#coSection option:selected").val() , rmId : $("#rmId option:selected").val() , mepId : $("#mepId option:selected").val() , sepId : $("#sepId option:selected").val() , wdAcYWeekNo : $("#wdAcYWeekNo option:selected").val() , dyId : $("#dyId option:selected").val() , numWeek : $("#numWeek option:selected").val() , prdFrTime : $("#prdFrTime option:selected").val() , prdToTime : $("#prdToTime option:selected").val() , prsId : $("#prsId option:selected").val() , stId : $("#stId option:selected").val() }, // data: ({id : this.getAttribute('id')}), dataType: 'json',//"html", async: false, success: function(json) { //alert("success"+data); if (json.error) alert(json.html); else{ /* alert(json.tt); */ pp = json.pp; checkSubmit(); $('#cur').html(json.cur); $('#sy').html(json.sy); $('#crs').html(json.crs); $('#sec').html(json.coSection); $('#rm').html(json.rm); $('#mep').html(json.mep); $('#sep').html(json.sep); $('#wd').html(json.wd); $('#numWeek').html(json.numWeek); $('#prdTo').html(json.prdTo); $('#prs').html(json.prs); $('#st').html(json.st); //karn $('#tbwd').html(json.tbwd); $('#tbcur').html(json.tbcur); $('#tbsy').html(json.tbsy); $('#tbmep').html(json.tbmep); $('#tbsep').html(json.tbsep); $('#tbprs').html(json.tbprs); } } }); } function timeTable(){ var url = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"timetable2/timeTable"; $.ajax({ url: url, global: false, type: "POST", data: { tbtmcAcY : $("#tbtmcAcY option:selected").val() , tbcurId : $("#tbcurId option:selected").val() , tbsyId : $("#tbsyId option:selected").val() , tbwdAcYWeekNo : $("#tbwdAcYWeekNo option:selected").val() , tbcrsId : $("#tbcrsId option:selected").val() , tbcoSection : $("#tbcoSection option:selected").val() , tbprsId : $("#tbprsId option:selected").val() , tbrmId : $("#tbrmId option:selected").val() , tbmepId : $("#tbmepId option:selected").val() , tbsepId : $("#tbsepId option:selected").val() , view : view, lnk : <? if($mode=="default"){echo "'mng'";}else if($mode=="view" or $mode=="teacher"){ echo "'excell'";}?> }, // data: ({id : this.getAttribute('id')}), dataType: 'json',//"html", async:false, success: function(data) { $("#showTable").html(data.timetable); $("#tbnsd").html(data.tbnsd); } }); } function Sync(id){ switch(id){ case "tbtmcAcY": $("#tmcAcY").val($("#"+id).val()); get_option(); chooseCourse2(); chooseSec(); timeTable(); break; case "tmcAcY": $("#tbtmcAcY").val($("#tmcAcY").val()); get_option(); chooseCourse2(); chooseSec(); timeTable(); break; case "curId": $("#tbcurId").val($("#"+id).val()); break; case "syId": $("#tbsyId").val($("#"+id).val()); timeTable(); break; case "tbwdAcYWeekNo": $("#wdAcYWeekNo").val($("#"+id).val()); get_option(); timeTable(); break; case "tbmepId": $("#mepId").val($("#"+id).val()); get_option(); timeTable(); break; case "tbsepId": $("#sepId").val($("#"+id).val()); get_option(); timeTable(); break; case "tbprsId": $("#prsId").val($("#"+id).val()); timeTable(); break; case "tbrmId": $("#rmId").val($("#"+id).val()); timeTable(); break; case "rmId": $("#tbrmId").val($("#"+id).val()); timeTable(); break; case "rmId": $("#tbrmId").val($("#"+id).val()); timeTable(); break; } } function changeWeek(oprator){ if(oprator=="+"){ if(parseInt($("#tbwdAcYWeekNo").val())!=52){ $("#tbwdAcYWeekNo").val(parseInt($("#tbwdAcYWeekNo").val())+1); $("#wdAcYWeekNo").val($("#tbwdAcYWeekNo").val()); timeTable(); } }else{ $("#tbwdAcYWeekNo").val(parseInt($("#tbwdAcYWeekNo").val())-1); $("#wdAcYWeekNo").val($("#tbwdAcYWeekNo").val()); timeTable(); } } function ChangeView(type){ view = type; switch(type){ case "c": $(".w").show(); $(".r").hide(); $(".p").hide(); $(".t").hide(); $(".s").hide(); $(".c").show(); $("#tbexam").hide(); timeTable(); break; case "r": $(".w").show(); $(".c").hide(); $(".p").hide(); $(".t").hide(); $(".s").hide(); $(".r").show(); $("#tbexam").hide(); timeTable(); break; case "p": $(".w").show(); $(".c").hide(); $(".r").hide(); $(".t").hide(); $(".s").hide(); $(".p").show(); $("#tbexam").hide(); get_option(); timeTable(); break; case "t": $(".w").show(); $(".c").hide(); $(".r").hide(); $(".p").hide(); $(".s").hide(); $(".t").show(); <?echo (!empty($per))? "$(\"#tbprsId\").val(".$per.");":NULL;?> timeTable(); <? if($mode=="teacher" or $mode=="view"){ echo "getExam();"; echo "$(\"#tbexam\").show();"; } ?> break; case "s": $(".w").hide(); $(".c").hide(); $(".r").hide(); $(".t").hide(); $(".p").hide(); $(".s").show(); $("#tbexam").hide(); timeTable(); break; } } <? if(isset($dt) and isset($dt['tt-btadd'])){ $ct_dy = count($dt['tt-dyId']); $ct_prs = count($dt['tt-prs']); $ct_tmc = count($dt['tt-tmc']); ?> $(document).ready(function(){ $("#tmcAcY").val('<?echo $dt['tt-tmcAcY'];?>'); Sync('tmcAcY'); $("#tmId").val('<?echo $dt['tt-tmId'];?>'); get_option(); $("#curId").val('<?echo $dt['tt-curId'];?>'); Sync('curId'); get_option(); checkSubmit(); timeTable(); $("#syId").val('<?echo $dt['tt-syId'];?>'); Sync('syId'); get_option(); checkSubmit(); $("#crsId").val('<?echo $dt['tt-crsId'];?>'); get_option(); checkSubmit(); $("#coSection").val('<?echo $dt['tt-coSection'];?>'); get_option(); checkSubmit(); $('input:radio[name=place]:nth(<?echo $dt['tt-place']-1;?>)').attr('checked',true); var place = <?echo $dt['tt-place'];?>; if (place == 1){ $('#bd').show(); $('#rmerror').show(); $('#mep').hide(); $('#sep').hide(); $('#meperror').hide(); $('#seperror').hide(); }else{ $('#rmerror').hide(); $('#bd').hide(); $('#mep').show(); $('#sep').show(); $('#meperror').show(); $('#seperror').show(); } $("#mepId").val('<?echo $dt['tt-mepId'];?>'); get_option(); checkSubmit(); $("#sepId").val('<?echo $dt['tt-sepId'];?>'); get_option(); checkSubmit(); $("#wdAcYWeekNo").val('<?echo $dt['tt-wdAcYWeekNo'];?>'); get_option(); $("select:[name=numWeek]").val('<?echo $dt['tt-numWeek'];?>'); get_option(); <? for($i=0;$i<$ct_dy;$i++){ ?> $('input:checkbox[name=dyId[]]:nth(<?echo $dt['tt-dyId'][$i]-1;?>)').attr('checked',true); <? } ?> $("#prdFrTime").val('<?echo $dt['tt-prdFrTime'];?>'); get_option(); $("#prdToTime").val('<?echo $dt['tt-prdToTime'];?>'); get_option(); $("#stId").val('<?echo $dt['tt-stId'];?>'); get_option(); checkSubmit(); $("#title").val('<?echo $dt['tt-title'];?>'); }); <?}?> </script> <div id="tbadd"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <div align="center">
<?php $attributes = array('name' => 'myform', 'id' => 'myform'); echo form_open($this->config->item("rg_folder")."timetable2/insert_update_TimeTable",$attributes); $j2p = ''; ?> <table class="szone"> <tr> <td height="22" width="15%"></td> <td height="22" width="25%"></td> <td height="22" width="15%"></td> <td height="22" width="45%"></td> </tr> <tr> <td align="center" height="22" colspan="4"><span class="h error"><span id="tbh">จัดตารางสอน</span></span></td> </tr> <tr> <td align="center" height="22" colspan="4"></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ปีการศึกษา/ภาคการศึกษา</td> <td colspan="3"> <?php $tmc_attr = 'id="tmcAcY" onChange="Sync(this.id);"'; $tm_attr = 'id="tmId" onChange="get_option();"'; ?> <?=form_dropdown('tmcAcY', $tmc, (setValue('tmcAcY',$tmc) == '')? $this->session->userdata('acY') : setValue('tmcAcY',$tmc),$tmc_attr); ?> / <?=form_dropdown('tmId', $tm, (setValue('tmId',$tm) == '')? $this->session->userdata('tmId') : setValue('tmId',$tm),$tm_attr); ?> <span class="error">*</span> </td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">หลักสูตร</td> <td colspan="3"><span id='cur'></span> <span class="error">*</span> <?php echo form_error('curId');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ชั้นปี </td> <td colspan="3"><span id='sy'></span> <span class="error">*</span> <?php echo form_error('syId');?> <b>รายวิชา <span id='crs'></span> </b><span class="error">*</span> <?php echo form_error('crsId');?> <b>กลุ่ม <span id='sec'></span> </b><span class="error">*</span> <?php echo form_error('coSection');?> </td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="4"> <?php echo form_radio('place', 1, TRUE).nbs(2).'<b>อาคาร : ห้อง </b>';echo form_radio('place', 2, FALSE).nbs(2).'<b>สถานที่ฝึกงาน </b>'; echo nbs(3); $rm_attr = 'id="rmId" onChange="Sync(this.id);"' ?> <span id='bd' ><? if(isset($rm)){ echo form_dropdown('rmId', $rm, setValue('rmId',$rm),$rm_attr); }?></span><span id="rmerror"><?php echo form_error('rmId');?></span> <span id='mep' style="display:none"></span><span id="meperror" style="display:none"><?php echo form_error('mepId');?></span> <span id='sep' style="display:none"></span><span class="error">*</span> <span id="seperror" style="display:none"><?php echo form_error('sepId');?></span> </td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">สัปดาห์ที่ </td> <td colspan="1"><span id='wd' ></span></td> <td colspan="1" align="right"><span class="amo"><b>จำนวน<?=nbs(1);?></b></span></td> <td colspan="1" align="left"><span class="amo"><span id='numWeek' ></span> <b>สัปดาห์ </b></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="1" class="coltd_szone">วัน </td> <td colspan="3" align = 'abmiddle'> <?php if($dy->num_rows() > 0){ echo "<span id=\"muldy\">"; foreach($dy->result() as $row){ $data = array( 'name' => 'dyId[]', 'id' => 'dy[]', 'value' => $row->dyId, 'checked' => FALSE, 'onClick' => 'checkSubmit();', ); $sel[$row->dyId] = $row->dyName;
echo form_checkbox($data).nbs(1).$row->dyName.nbs(2); ?> <!-- <input type="checkbox" name="dyId" id="dy" value="<?=$row->dyName;?>" style="margin:10px" /> --> <?php }//end for echo ' <span class="error">*</span></span> '.form_error('dyId[]'); echo "<span id=\"onedy\">"; echo form_dropdown('day', $sel); echo ' *</span>'; }else{ echo 'ไม่พบข้อมูลวันในระบบ'; } ?> </td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone" colspan="1">เวลาเรียน </td> <td colspan="1"> <?php $prdFr_attr = 'id="prdFrTime" onChange="get_option();"'; echo nbs(1).form_dropdown('prdFrTime', $prdFr, setValue('prdFrTime',$prdFr), $prdFr_attr); ?> - <span id='prdTo'></span> <span class="error">*</span> </td> <td colspan="1" align="right"><b>ชื่ออาจารย์ผู้สอน<?=nbs(1);?></b></td> <td align="left"><span id='prs'></span><span id="box"><?php $data = array( 'name' => 'prsbox', 'id' => 'prsbox', 'value' => (isset($dt) and isset($dt['tt-btadd']))? $dt['tt-prsbox']:"", 'rows' => '1', 'cols' => '30%', 'readonly' => 'true', ); echo form_textarea($data).nbs(2); echo anchor_popup($this->config->item("rg_folder")."timetable/prs_popup", "<img src=\"".base_url()."images/".$this->config->item("rg_folder")."picture/search.gif\" width=\"15\" height=\"19\" align=\"abmiddle\" border=\"0\" />", array("width" => "500", "height" => "450")); ?></span><span id='prsset'> <? if(isset($dt) and isset($dt['tt-btadd'])){ for($i=0;$i<$ct_prs;$i++){ echo "<input type=\"hidden\" name=\"prs[]\" value=\"".$dt['tt-prs'][$i]."\">"; } } ?> </span> <span class="error">*</span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="1" class="coltd_szone">ประเภทการสอน </td> <td colspan="1"> <span id='st'></span> <span class="error">*</span> </td> <td colspan="1" align="right"><b>วิธีการสอน<?=nbs(1);?></td> <td align="left"> <?php $data = array( 'name' => 'tcmName', 'id' => 'tcmName', 'value' => (isset($dt) and isset($dt['tt-btadd']))? $dt['tt-tcmName']:"", 'maxlength' => '255', 'rows' => '1', 'cols' => '30%', 'readonly' => 'true', ); echo form_textarea($data).nbs(2); echo anchor_popup($this->config->item("rg_folder")."timetable/tcm_popup", "<img src=\"".base_url()."images/".$this->config->item("rg_folder")."picture/search.gif\" width=\"15\" height=\"19\" align=\"abmiddle\" border=\"0\" />", array("width" => "500", "height" => "450")); ?> <span id='inp'> <? if(isset($dt) and isset($dt['tt-btadd'])){ for($i=0;$i<$ct_tmc;$i++){ echo "<input type=\"hidden\" name=\"tmc[]\" value=\"".$dt['tt-tmc'][$i]."\">"; } } ?> </span> <?php echo form_error('tcmName');?></td> </tr>
<tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="1" class="coltd_szone">บท/เรื่อง/หัวข้อสอน</td> <td colspan="3"> <?php $data = array( 'name' => 'title', 'id' => 'title', 'value' => set_value('title'), 'maxlength' => '255', 'size' => '50', 'style' => 'width:50%', ); echo form_input($data); ?> <span id='hidval'></span><span id="add"><input type="submit" value="บันทึก" name="btadd" id="btadd"></span><span id="edit"><input type="submit" value="บันทึก" name="btedit" id="btedit"> <input type="button" onClick="back();" name="can" value="ย้อนกลับ"></span> <span class="pp"><span class="error">คุณไม่มีสิทธิ์ในการจัดการตารางสอน</span></span></td></tr> </table> <?php echo form_close(); $tmc_attr = 'id="tbtmcAcY" onChange="Sync(this.id);getExam();"'; $tbrm_attr = 'id="tbrmId" onChange="Sync(this.id);"' ?>
</div> </td> </tr> </table> <br /> </div> <div id='tb'><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td align="center" colspan="2"><span class="h error"> <? if($mode=="view" or $mode=="teacher"){ echo "ตารางสอน"; }?> </span></td></tr> <tr><td align="center" colspan="2"><br></td></tr> <tr height="30"><td width="50%">ปีการศึกษา <?=form_dropdown('tbtmcAcY', $tmc, (setValue('tmcAcY',$tmc) == '')? $this->session->userdata('acY') : setValue('tmcAcY',$tmc),$tmc_attr); ?></td> <td width="50%"><div class="w"><a href="javascript:void(0)" onClick="changeWeek('-')">สัปดาห์ก่อน</a> <b>สัปดาห์ที่</b> <span id='tbwd' ></span> <a href="javascript:void(0)" onClick="changeWeek('+')">สัปดาห์ถัดไป</a></div></td> </tr> <!--start เลือก view !--> <tr height="30"><td><?echo "ดูตาม>>".nbs(3)."<a href=\"javascript:ChangeView('c')\"><img src=\"".base_url().$this->config->item("rg_curriculum")."\" align=\"absmiddle\" border=\"0\" width=\"20\" height=\"20\" /> หลักสูตร</a>".nbs(1)."|".nbs(1)."<a href=\"javascript:ChangeView('r')\"><img src=\"".base_url().$this->config->item("rg_room")."\" align=\"absmiddle\" border=\"0\" width=\"20\" height=\"20\" /> ห้อง</a>".nbs(1)."|".nbs(1)."<a href=\"javascript:ChangeView('p')\"><img src=\"".base_url().$this->config->item("rg_hospital")."\" align=\"absmiddle\" border=\"0\" width=\"20\" height=\"20\" /> สถานที่ฝึกงาน</a>".nbs(1)."|".nbs(1)."<a href=\"javascript:ChangeView('t')\"><img src=\"".base_url().$this->config->item("rg_teacher")."\" align=\"absmiddle\" border=\"0\" width=\"20\" height=\"20\" /> อาจารย์ผู้สอน</a>".nbs(1)."|".nbs(1)."<a href=\"javascript:ChangeView('s')\"><img src=\"".base_url().$this->config->item("rg_subject")."\" align=\"absmiddle\" border=\"0\" width=\"20\" height=\"20\" /> รายวิชา</a>";?></td></tr> <!--end เลือก view !-->
<!--start เลือกหลักสูตร--> <tr height="30" class="c"><td width="100%" colspan="2">หลักสูตร <span id='tbcur'></span> ชั้นปี <span id='tbsy'></span> <!--start excell เลือกหลักสูตร--><span class="hand" onClick="sendPost('hidform',<? echo "{'view':'c','acY':$('#tbtmcAcY').val(),'curId':$('#tbcurId').val(),'syId':$('#tbsyId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span><!--end excell เลือกหลักสูตร !--></td> </tr> <!--end เลือกหลักสูตร !-->
<!--start เลือกห้อง--> <tr height="30" class="r"><td width="50%">ห้อง <?if(isset($rm)){ echo form_dropdown('tbrmId', $rm, setValue('rmId',$rm),$tbrm_attr); }?> <!--start excell เลือกห้อง--><span class="hand" onClick="sendPost('hidform2',<? echo "{'view':'r','acY':$('#tbtmcAcY').val(),'rmId':$('#tbrmId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span><!--end excell เลือกห้อง--></td> <td width="50%"></td> </tr> <!--end เลือกห้อง-->
<!--start เลือกสถานที่ฝึกงาน--> <tr height="30" class="p"><td width="50%">สถานที่ฝึกงานหลัก <span id='tbmep'></span> * สถานที่ฝึกงานย่อย <span id='tbsep'></span> <!--start excell เลือกสถานที่ฝึกงาน--> <span class="hand" onClick="sendPost('hidform3',<? echo "{'view':'p','acY':$('#tbtmcAcY').val(),'mepId':$('#tbmepId').val(),'sepId':$('#tbsepId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span><!--end excell เลือกสถานที่ฝึกงาน--></td> <td width="50%"></td> </tr> <!--end เลือกสถานที่ฝึกงาน-->
<!--start เลือกอาจารย์--> <tr height="30" class="t"><td width="50%">อาจารย์ผู้สอน <span id='tbprs'></span> <!--start excell เลือกอาจารย์--> <span class="hand" onClick="sendPost('hidform4',<? echo "{'view':'t','acY':$('#tbtmcAcY').val(),'prsId':$('#tbprsId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span><!--end excell เลือกอาจารย์--><? if($this->session->userdata('UsPsCode')){?> <!--start ปุ่มแสดงชั่วโมง--> <span class="hand" onClick="sendPost('hidform5',<? echo "{'prsId':$('#tbprsId').val(),'acY':$('#tmcAcY').val(),'tmId':$('#tmId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."timetable2/showTeachHoursT");?>',{width:700,height:500})"><img <?echo "src=\"".base_url().$this->config->item("rg_alarm")."\"";?> align="absmiddle" border="0" title="แสดงชั่วโมง" width="18" height="18"></span><?}?><!--end ปุ่มแสดงชั่วโมง--></td> <td width="50%"></td> </tr> <!--end เลือกอาจารย์-->
<!--start เลือกรายวิชา--> <tr height="30" class="s"><td width="100%" colspan="2">รายวิชา <select id="tbcrsId" name="tbcrsId" onChange="chooseSec(this.value);timeTable();"></select> กลุ่ม <select id="tbcoSection" name="tbcoSection" onChange="timeTable();"><option value="">-- ไม่พบ --</option></select> <!--start excell เลือกรายวิชา--> <span class="hand" onClick="sendPost('hidform6',<? echo "{'view':'s','acY':$('#tbtmcAcY').val(),'crsId':$('#tbcrsId').val(),'coId':$('#tbcoSection').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span> <span class="hand" onClick="sendPost('hidform7',<? echo "{'acY':$('#tbtmcAcY').val(),'crsId':$('#tbcrsId').val()}";?>,'<?echo site_url($this->config->item("rg_folder")."rpt_tt/rptTt2");?>')"><img <?echo "src=\"".base_url().$this->config->item("rg_excel_exp")."\"";?> align="absmiddle" border="0"></span> <!--end excell เลือกรายวิชา--> </td> </tr> <!--end เลือกรายวิชา-->
<tr><td width="100%" colspan="2"><div id="showTable"></div></td></tr> <tr height="50"><td width="100%" colspan="2"><span class="error"><b>หมายเหตุ :</b> สีเทา = ห้อง วัน เวลาเรียน ไม่ซ้ำกัน, สีชมพู = ห้อง วัน เวลาเรียน ซ้ำกัน, สีเขียว = วันที่ไม่ให้จัดการเรียนการสอน</span></td></tr> <tr><td width="100%" colspan="2"><span id="tbnsd"></span></td></tr> </table> </div> <? if($mode=="teacher" or $mode=="view"){ ?> <div id="tbexam"></div> <?}else if($mode=="default"){?> <div id="del"></div> <?}?>
|