File Manager
Back to List
| Current Directory: ~/
Editing: rp_thesis_progress_stu_sem2ex.asp
Full path: C:\ict\ICT\rp_thesis_progress_stu_sem2ex.asp
Permissions: rwx
Write test: File appears not directly writable
Current process identity: IIS APPPOOL\DefaultAppPool
<%@ Language=VBScript %> <% 'Option Explicit Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment; filename=report_indi.xls" '<!--#include file="chk_login.asp"--> ' '<!--#include file="inc_cache_control.asp"--> '<!--#include file="inc_access_control.asp"--> %> <!--#include file="chk_permission.asp"--> <style> #customers { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } #customers td, #customers th { border: 0px solid #ddd; padding: 8px; } #customers th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #4CAF50; color: white; } </style> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <!--<link href="bsri2006.css" rel="stylesheet" type="text/css"> Icomoon Icon Fonts <link href="./css/font-awesome.min.css" rel="stylesheet">--> <link rel="stylesheet" href="./css/icomoon.css"> <link rel="stylesheet" href="./css/style.css"> <link href="./css/bootstrap.min.css" rel="stylesheet"> <link href="./css/templatemo-style.css" rel="stylesheet"> <link href="image/favicon.ico" rel="shortcut icon" type="image/x-icon"> <% date1=datepart("d",date) month1=month(now()) y=year(now()) y=543+y y=right(y,2) if date1=1 then date1="01" elseif date1=2 then date1="02" elseif date1=3 then date1="03" elseif date1=4 then date1="04" elseif date1=5 then date1="05" elseif date1=6 then date1="06" elseif date1=7 then date1="07" elseif date1=8 then date1="08" elseif date1=9 then date1="09" end if if month1=1 then month1="01" elseif month1=2 then month1="02" elseif month1=3 then month1="03" elseif month1=4 then month1="04" elseif month1=5 then month1="05" elseif month1=6 then month1="06" elseif month1=7 then month1="07" elseif month1=8 then month1="08" elseif month1=9 then month1="09" end if dcheck=y&""&month1&""&date1 '***************************************************************** %> <% id_stug=request("id_sg") '***************************************************************** 'if session("tb_preview") =2 or session("id_stu1") = id_stu then '���Է��� �����㹰ҹ ��� ����Ңͧ�������ͧ 'pern=session("username") ' per="2" ' tb="student" ' sqlnc="select * from tb_permission where id_staff='"&pern&"' and tb_edit='"&per&"' and tb_name='"&tb&"'" 'set orsnc=server.createobject("adodb.recordset") 'orsnc.open sqlnc,conn,1,3 %> <!-- <div class="templatemo-content-widget orange-bg"> <div class="media"> <div class="media-body"> <h2 class="media-heading text-uppercase">��������´��������˹�� �Ҥ���¹��� --> <% sqlall1="select * from progress_report_thesis where dateend_check<='"&dcheck&"' order by id_progress_report desc" Set orsall1=server.createobject("adodb.recordset") orsall1.open sqlall1,conn,1,3 Response.write sqlall1&"/"&orsall1("id_progress_report") If Not orsall1.eof Then 'Response.write orsall1("semeter")&"/"&orsall1("year_edu") semeter=orsall1("semeter") year_edu=orsall1("year_edu") End if %></h2> <!-- </div> </div> </div> <tr > <td>--> <!--<table border=0 width="100%"><tr> <td colspan=5 bgcolor=#FFCC00>�����Ź��Ե</td> --> <% sql_data="select * from student_group where id_stugroup='"&id_stug&"' " set ors_data=server.createobject("adodb.recordset") ors_data.open sql_data,conn,1,3 if not ors_data.eof Then %> </tr> <%'<tr bgcolor=#e5e5e5><td>�Ԩ������ѡ<td>�Ԩ�������� <td>��<td>��������´ <td>�ѭ������ػ��ä<td>�Ԩ������ѡ<td>�Ԩ�������� sql="select * from student where id_status_edu=1 and id_stugroup='"&id_stug&"' order by id_stu" set ors=server.createobject("adodb.recordset") ors.open sql,conn,1,3 if not ors.eof Then ors.movefirst a=1 do while not ors.eof bg1=a mod 2 if bg1=0 then bg="#f5f5f5" else bg="#ffffff" end If %> <h2 class="media-heading text-uppercase">��������´��������˹�� �Ҥ���¹��� <% 'sqlall1="select * from progress_report_thesis where dateend_check>='"&dcheck&"'" 'Set orsall1=server.createobject("adodb.recordset") 'orsall1.open sqlall1,conn,1,3 'Response.write sqlall1 If Not orsall1.eof Then Response.write orsall1("semeter")&"/"&orsall1("year_edu") 'semeter=orsall1("semeter") 'year_edu=orsall1("year_edu") End if %></h2> <% response.write " <table border=1 class=table table-striped table-bordered><tr bgcolor=#ffcc66><td width='12%' bgcolor=#ffcc66>���ʹ��Ե</td>" Response.write "<td valign=top bgcolor=#ffcc66>"&ors("id_stu")&"("&a&")" 'Response.write "<td>bbb" 'response.write "<td><div align=left>"&ors("id_stu") response.write "<tr><td valign=top>����-ʡ��<td valign=top><div align=left valign=top>"&ors("name_stu")&" "&ors("sur_stu") Response.write "<tr><td>��ѡ�ٵ�<td>" id_stugroup=ors_data("id_stugroup") 'sql_all="select * from student_group where id_stugroup='"&ors_data("id_stugroup")&"' " 'set ors_all=server.createobject("adodb.recordset") 'ors_all.open sql_all,Conn,1,3 if not ors_data.eof Then ys_semeter=ors_data("id_begin_semeter") ys_year_edu=ors_data("id_begin_year") 'response.write "" sql_curri="select * from curriculum where id_curriculum='"&ors_data("id_curriculum")&"'" set ors_curri=server.createobject("adodb.recordset") ors_curri.open sql_curri,conn,1,3 if not ors_curri.eof then id_curriculum=ors_data("id_curriculum") response.write ors_curri("curriculum_full")&" " end If id_type_curri=ors_data("id_type_curri") sqlt="select * from type_curriculum where id_type_curri='"&ors_data("id_type_curri")&"'" set orst=server.createobject("adodb.recordset") orst.open sqlt,conn,1,3 if not orst.eof then response.write orst("type_curri_th") end if response.write " ��� "&ors_data("no_stugroup")&" " id_major=ors_data("id_major") sql_major="select * from major where id_major='"&id_major&"'" set ors_major=server.createobject("adodb.recordset") ors_major.open sql_major,conn,1,3 if not ors_major.eof then response.write ors_major("major_th") end If Response.write " (�ա���֡���á��� "&ors_data("id_begin_year")&")" end if %></p> </td></tr> <% '���ͻ�ԭ�ҹԾ��� ���Ҩҡ thesis_plan_activity ��� id_table=11 ��� id_activity_r �����ѹ������з���ش sql_thesis="select id_stu,id_activity,id_table,id_activity_r from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and id_table=11 and id_status= 0 and id_result=1 order by id_activity_r" Set ors_thesis=server.createobject("adodb.recordset") ors_thesis.open sql_thesis,conn,1,3 If Not ors_thesis.eof Then ors_thesis.movelast id_activity=ors_thesis("id_activity") 'Response.write id_activity sql_thesis1="select thesis_name,id_activity,id_status,date_report,advisor_name1,advisor_name2 from rp_thesis_progress where id_activity='"&ors_thesis("id_activity")&"'" Set ors_thesis1=server.createobject("adodb.recordset") ors_thesis1.open sql_thesis1,conn,1,3 If Not ors_thesis1.eof Then Response.write "<tr><td>���ͻ�ԭ�ҹԾ���<td valign=top>" Response.write ors_thesis1("id_activity") Response.write ors_thesis1("thesis_name") Response.write "<tr><td>����֡��(��ѡ)<td valign=top>" Response.write ors_thesis1("advisor_name1") Response.write "<tr><td>����֡��(����)<td valign=top>" Response.write ors_thesis1("advisor_name2") End If 'ors_thesis1 End If 'ors_thesis 'GRD ����Ѩ�غѹ Response.write "<tr><td>ŧ����¹ GRD ("&semeter&"/"&year_edu&")<td valign=top align=left>" sql_grdn="select id_stu,id_activity,id_table,id_activity_r from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and id_table=14 and id_progress_report="&orsall1("id_progress_report")&"" Set ors_grdn=server.createobject("adodb.recordset") ors_grdn.open sql_grdn,conn,1,3 If Not ors_grdn.eof Then Response.write "ŧ����¹"'&ors_grdn("id_activity") sql_grd3="select * from rp_grd where id_report='"&ors_grdn("id_activity")&"'" Set ors_grd3=server.createobject("adodb.recordset") ors_grd3.open sql_grd3,conn,1,3 If Not ors_grd3.eof Then sql_grd4="select * from rp_grd_grade where id_grade='"&ors_grd3("id_grade")&"'" Set ors_grd4=server.createobject("adodb.recordset") ors_grd4.open sql_grd4,conn,1,3 If Not ors_grd4.eof Then 'Response.write sql_grdn Response.write " "&ors_grd4("grade_name")&" ˹��¡Ե" End If Else Response.write "(-)"'&ors_grdn("id_activity") End If 'ors_grd1 End if 'GRD ���� sql_grd="select id_stu,id_activity,id_table,id_activity_r from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and id_table=14 and id_result=1 and id_status=0" Set ors_grd=server.createobject("adodb.recordset") ors_grd.open sql_grd,conn,1,3 gradsum=0 If Not ors_grd.eof Then ors_grd.movefirst Do While Not ors_grd.eof id_activity=ors_grd("id_activity") 'Response.write id_activity sql_grd1="select * from rp_grd where id_report='"&ors_grd("id_activity")&"'" Set ors_grd1=server.createobject("adodb.recordset") ors_grd1.open sql_grd1,conn,1,3 If Not ors_grd1.eof Then sql_grd2="select * from rp_grd_grade where id_grade='"&ors_grd1("id_grade")&"'" Set ors_grd2=server.createobject("adodb.recordset") ors_grd2.open sql_grd2,conn,1,3 If Not ors_grd2.eof Then gradsum=ors_grd2("grade_name")+gradsum End If End If 'ors_grd1 ors_grd.movenext Loop 'ors_grd Response.write "<tr><td>GRD ����<td valign=top>" Response.write gradsum&" ˹��¡Ե" End if '��ԭ�ҹԾ����������������� Response.write "<tr><td>ʶҹС�÷ӻ�ԭ�ҹԾ���(�����)<td valign=top>" sql_ar="select * from rp_activity_relate where id_table=11 and id_status= 1 order by id_order" Set ors_ar=server.createobject("adodb.recordset") ors_ar.open sql_ar,conn,1,3 If Not ors_ar.eof Then ors_ar.movefirst Do While Not ors_ar.eof sql_thesis="select id_stu,id_activity,id_table,id_activity_r,id_progress_report from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and id_table=11 and id_result=1 and id_activity_r='"&ors_ar("id_activity_r")&"' order by id_progress_report" Set ors_thesis=server.createobject("adodb.recordset") ors_thesis.open sql_thesis,conn,1,3 If Not ors_thesis.eof Then ors_thesis.movelast id_activity=ors_thesis("id_activity") 'Response.write id_activity 'sql_thesis1="select thesis_name,id_activity,id_status,date_report,advisor_name1,advisor_name2 from rp_thesis_progress where id_activity='"&ors_thesis("id_activity")&"'" 'Set ors_thesis1=server.createobject("adodb.recordset") 'ors_thesis1.open sql_thesis1,conn,1,3 'If Not ors_thesis1.eof Then Response.write "-"&ors_ar("activity_name")&"<br>" 'Response.write "<td valign=top>" 'Response.write ors_thesis1("advisor_name1") 'Response.write "<td valign=top>" 'Response.write ors_thesis1("advisor_name2") 'End If 'ors_thesis1 End If ors_ar.movenext loop End If 'ors_ar '///��ԭ�ҹԾ�������������������� '�������ҹ�ҷ�������� + �ѭ������ػ��ä Response.write "<tr><td>�ŢͧἹ<br> ("&semeter&"/"&year_edu&")<td align=left valign=top>" Response.write "<table border=1 class=table table-striped table-bordered>" sqlt="select * from rp_table where id_status=1 order by id_order" Set orst=server.createobject("adodb.recordset") orst.open sqlt,conn,1,3 If Not orst.eof Then Response.write "<tr bgcolor=#ffffcc><td width='20%' valign=top>�Ԩ��������<td width='20%'valign=top>��<td width='20%'valign=top>��������´<td width='20%'valign=top>�ѭ������ػ��ä" 'Response.write "<tr bgcolor=#ffffcc><td width='20%' valign=top>�Ԩ������ѡ<td width='20%' valign=top>�Ԩ��������<td width='20%'valign=top>��<td width='20%'valign=top>��������´<td width='20%'valign=top>�ѭ������ػ��ä" orst.movefirst Do While Not orst.eof 'Response.write sqlt&""&orst("id_order")&"<br>" 'Response.write "<tr><td colspan=5>"&orst("table_sum")&"<br>" sqltpa="select * from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and status_del=1 and id_table = '"&orst("id_table")&"' order by id_activity_r" Set orstpa=server.createobject("adodb.recordset") orstpa.open sqltpa,conn,1,3 If Not orstpa.eof Then aa=1 id_progress_report=orstpa("id_progress_report") orstpa.movefirst Do While Not orstpa.eof 'Response.write sqltpa&"<br>" sqlprt="select * from progress_report_thesis where semeter='"&semeter&"' and year_edu='"&year_edu&"' and id_progress_report='"&orstpa("id_progress_report")&"'" Set orsprt=server.createobject("adodb.recordset") orsprt.open sqlprt,conn,1,3 if not orsprt.eof Then orsprt.movefirst Do while Not orsprt.eof 'Response.write "<tr><td>"&aa&"." Response.write "<tr >" aa=aa+1 'Response.write sqlprt&"<br>" 'Response.write "����relate"&orstpa("id_activity") 'Response.write "<td>"&orstpa("id_activity") sqlrar="select * from rp_activity_relate where id_activity_r='"&orstpa("id_activity_r")&"' and id_status=1" Set orsrar=server.createobject("adodb.recordset") orsrar.open sqlrar,conn,1,3 If Not orsrar.eof Then 'Response.write "<td valign=top>-"&orst("table_sum") Response.write "<td valign=top>"&orsrar("activity_name") If orst("id_table")=14 Then '�����ӹǹ˹��¡Ե sqlrpt1="select * from rp_grd where id_report='"&orstpa("id_activity")&"' " Set orsrpt1=server.createobject("adodb.recordset") orsrpt1.open sqlrpt1,conn,1,3 If Not orsrpt1.eof Then sqlrpt2="select * from rp_grd_grade where id_grade='"&orsrpt1("id_grade")&"' " Set orsrpt2=server.createobject("adodb.recordset") orsrpt2.open sqlrpt2,conn,1,3 If Not orsrpt2.eof Then Response.write " ("&orsrpt2("grade_name")&" ˹��¡Ե)" End if End if ElseIf orst("id_table")=12 Then '������Ԫ� sit in Response.write orstpa("activity_name") End If 'Response.write "</td>" '�š�ô��Թ�ҹ If orstpa("id_status")="0" then sqlres="select * from rp_result2 where id_result='"&orstpa("id_result")&"'" Set orsres=server.createobject("adodb.recordset") orsres.open sqlres,conn,1,3 If Not orsres.eof Then id_activity=orstpa("id_activity") Response.write "<td valign=top>"&orsres("result_name") Response.write "<td valign=top>"&orstpa("activity_result") Response.write "<td valign=top>"&orstpa("activity_problem") End If Else 'Response.write "<td><td>" End if '�š�ô��Թ�ҹ End If 'Response.write "<br>" orsprt.movenext loop End If orstpa.movenext loop End If orst.movenext loop End If Response.write "</tr></table>" '//�������������觻ѭ������ػ��ä�����ҧ�� '����Ѵ价�������� If semeter=1 Then semeter1=semeter+1 year_edu1=year_edu ElseIf semeter= 2 Then semeter1=1 year_edu1=year_edu+1 End if Response.write "<tr><td>Ἱ�Ҥ���¹�Ѵ� ("&semeter1&"/"&year_edu1&")<td align=left valign=top>" Response.write "<table border=1 class=table table-striped table-bordered>" sqlt="select * from rp_table where id_status=1 order by id_order" Set orst=server.createobject("adodb.recordset") orst.open sqlt,conn,1,3 If Not orst.eof Then Response.write "<tr bgcolor=#ffffcc><td width='50%' valign=top>�Ԩ��������" orst.movefirst 'Response.write "<tr bgcolor=#ffffcc><td width='50%' valign=top>�Ԩ������ѡ<td width='50%' valign=top>�Ԩ��������" orst.movefirst Do While Not orst.eof sqltpa="select * from thesis_plan_activity where id_stu='"&ors("id_stu")&"' and status_del=1 and id_table = '"&orst("id_table")&"' order by id_activity_r" Set orstpa=server.createobject("adodb.recordset") orstpa.open sqltpa,conn,1,3 If Not orstpa.eof Then aa=1 id_progress_report=orstpa("id_progress_report") orstpa.movefirst Do While Not orstpa.eof 'Response.write sqltpa&"<br>" sqlprt="select * from progress_report_thesis where semeter='"&semeter1&"' and year_edu='"&year_edu1&"' and id_progress_report='"&orstpa("id_progress_report")&"'" Set orsprt=server.createobject("adodb.recordset") orsprt.open sqlprt,conn,1,3 'Response.write sqlprt&"<br>" if not orsprt.eof Then orsprt.movefirst Do while Not orsprt.eof 'Response.write "<tr><td>"&aa&"." Response.write "<tr >" aa=aa+1 'Response.write sqlprt&"<br>" 'Response.write "����relate"&orstpa("id_activity") 'Response.write "<td>"&orstpa("id_activity") sqlrar="select * from rp_activity_relate where id_activity_r='"&orstpa("id_activity_r")&"' and id_status=1" Set orsrar=server.createobject("adodb.recordset") orsrar.open sqlrar,conn,1,3 If Not orsrar.eof Then ' Response.write "<td valign=top width='50%'>-"&orst("table_sum") Response.write "<td valign=top>"&orsrar("activity_name") End If 'ors_rar 'Response.write "<br>" orsprt.movenext loop End If orstpa.movenext loop End If '����֡�һ�ԭ�ҹԾ��� '������֡�һ�ԭ�ҹԾ��� orst.movenext loop End If Response.write "</table>" '//����Ѵ价�������� Response.write "<tr><td colspan=2>����ʹ��� �ҡ�Ҩ�������֡���Ԫҡ�� /����֡�һ�ԭ�ҹԾ���" Response.write "<tr><td><td>" Response.write "<tr><td colspan=2>����ʹ��� �ҡ �Ţҹء����ѡ�ٵ�" Response.write "<tr><td><td>" Response.write "<tr><td colspan=2>����ʹ��� �ҡ ��иҹ��ѡ�ٵ�" Response.write "<tr><td><td>" Response.write "<tr><td>�š�þԨ�ó�<td>" Response.write "<tr><td><td>" Response.write "<tr><td>S<td>" Response.write "<tr><td><td>" Response.write "<tr><td>U<td>" %> <!--<form method="post" action=""> <div class="templatemo-block margin-bottom-5"> <input type="checkbox" name="ncd2" id="n2" value="1"> <label for="n2" class="font-weight-400"><span></span>S</label> </div> <div class="templatemo-block margin-bottom-5"> <input type="checkbox" name="ncd2" id="n2" value="1"> <label for="n2" class="font-weight-400"><span></span>U</label> </div> </form>--> <br> <br>ŧ���� ........................................................<br><br>�ѹ��� ........................................................... <% Response.write "</td></tr>" Response.write "</table><br><br>" a=a+1 ors.movenext loop End If 'if ors.eof %> <!-- </table>--> <%'<!--#include file="thesis_progress_student_list_ext.asp"--> end if %>