File Manager
Back to List
|
Up to Parent Directory
| Current Directory: ~/grade
Editing: grade/index.asp
Full path: C:\ict\ICT\grade\index.asp
Permissions: rwx
Write test: File appears not directly writable
Current process identity: IIS APPPOOL\DefaultAppPool
<!--#include file="connectdb.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>���͡�ա���֡��</title> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> </head> <body> <form id="form1" name="form1" method="post" action="add_grade_form.asp"> <table width="362" border="0" align="center" cellpadding="0" cellspacing="0"> <tr bgcolor=#FFCCFF> <td align=center colspan=2>���͡�Ҥ����֡������ <strong>����</strong> ���� <strong>���</strong> ������</td> </tr> <tr><td><div align="center">�Ҥ���¹���</div></td> <td><label> <div align="left"> <select name="semeter" id="semeter"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </div> </label></td> </tr> <tr> <td><div align="center">�ա���֡��</div></td> <td><label> <div align="left"> <select name="id_year" id="id_year"> <% mydate=date myyear=year(mydate) mym=month(mydate) if mym>4 then yearbegin=myyear+542 myyear=myyear+543 else yearbegin=myyear+550 myyear=myyear+543 end if i=0 do while i<5 %> <option <% if yearbegin=myyear then %> value=<%=myyear%> selected <%else%> <%end if%>> <%=yearbegin%> </option> <%i=i+1 yearbegin=yearbegin+1 loop %> </select> </div> </label></td> </tr> <tr bgcolor=#FFCCFF> <td> </td> <td><label> <div align="left"> <input type="submit" name="Submit" value="Submit" /> </div> </label></td> </tr> </table> </form> <p align="center">��������´�š�����¹ <br>�͡Ẻ�� �ҧ�����ʹ� ǧ��ྪ� ITM24.2 ���� 53660756 </p> <p align="right">[<a href=index_course.asp>����Ԫ�</a>] </p> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <% sqlall="select * from semeter order by re_year,semeter" set orsall=server.CreateObject("adodb.recordset") orsall.open sqlall,conn,1,3 if not orsall.eof then orsall.movefirst tcredit=0 gpa=0 stype1=0 stype2=0 stype3=0 stype4=0 do while not orsall.eof semeter=orsall("semeter") id_year=orsall("re_year") %> <p align="center"><tr><td colspan="4">��Ш��Ҥ���¹ <%=semeter%>�ա���֡�� <%=id_year%>[<a href=del_semeyear.asp?semeter=<%=semeter%>&id_year=<%=id_year%> onClick="return confirm('�س��ͧ���ź�Ҥ����֡��?');">Del</a>]</p> <tr bgcolor="#ffffcc"> <td width="124"><div align="center" >�����Ԫ�</div></td> <td width="613"><div align="center">�����Ԫ�</div></td> <td width="100"><div align="center">˹��¡Ե</div></td> <td width="100"><div align="center">�ô</div></td> </tr> <% scredit=0 gps=0 'gpa=0 'gpa1=0 'tcredit=0 sqlse="select * from register where re_year="&id_year&" and semeter="&semeter&"" set orsse=server.CreateObject("adodb.recordset") orsse.open sqlse,conn,1,3 if not orsse.eof then orsse.movefirst do while not orsse.eof %> <tr> <% response.write "<td>"&orsse("id_course") id_course=orsse("id_course") grade=orsse("grade") sqlco="select * from course where id_course='"&id_course&"'" set orsco=server.CreateObject("adodb.recordset") orsco.open sqlco,conn,1,3 if not orsco.eof then response.write "<td>"&orsco("course_thai")&"<td>"&orsco("credit") else response.write "<td><td>" end if sqlg="select * from grade where grade_value='"&grade&"'" set orsg=server.CreateObject("adodb.recordset") orsg.open sqlg,conn,1,3 if not orsg.eof then response.write "<td align=center>"&orsg("grade_name") end if %> </tr> <% grade=orsse("grade") '��÷Ѵ������Ͷ���� �� �����Դ˹��¡Ե��� if grade="U" then '���Դ˹��¡Ե������� credit=0 else credit=orsco("credit") end if '��÷Ѵ������� �� ���� �� �����Դ�ô if grade="P" or grade="U" then grade=0 creditForGrade=credit end if gps1=grade*credit ' scredit=scredit+credit gps=gps+gps1 gpa1=gpa1+gps1 'response.write scredit&"gps"&gps 'response.write "gpa1="&gpa1 ' response.write "scredit="&gps orsse.movenext loop if scredit>0 and gps>0 then gps=gps/(scredit-creditForGrade) end if 'response.write tcredit&"-"&scredit&"-"&creditForGrade tcredit=tcredit+scredit tcredit_gradesum=tcredit_gradesum+(scredit-creditForGrade) response.write "<tr bgcolor=#ffffcc>" response.write "<td colspan=2 align=right>˹��¡Ե������<td ><td>"&scredit response.write "<tr bgcolor=#FFFF99><td colspan=2 align=right>GPS<td ><td>" response.write FormatNumber(gps,2) gpa=gpa1/tcredit_gradesum response.write "<tr bgcolor=#F7FE6B><td colspan=2 align=right>GPA<td ><td>" response.write FormatNumber(gpa,2) if gpa>=3 then ystatus="Stable" elseif gpa>=2.5 then ystatus="Pro" else ystatus="Retire" end if response.write "<tr bgcolor=#F5FE54><td colspan=2 align=right>ʶҹТͧ�س<td>"&ystatus&"<td>" else response.write "<tr bgcolor=#F4FE43><td colspan=4>No Register" end if orsall.movenext loop 'gpa=gpa1/tcredit_gradesum end if%> <tr><td colspan=4> <p> <% if gpa>=3 then ystatus="Stable" elseif gpa>=2.5 then ystatus="Pro" else ystatus="Retire" end if 'response.write " ʶҹТͧ�س"&ystatus '&",gpa1="&gpa1&"<br>" response.write "<form action=save_genglish.asp method=post name=form3>" response.write "<br>�ô�����ѧ���= " sqleng="select * from genglish" set orseng=server.CreateObject("adodb.recordset") orseng.open sqleng,conn,1,3 if not orseng.eof then 'response.write "<input name=genglish type=text value="&orseng("english_g")&" size=3/>" genglish=orseng("english_g") sqlne="select * from ngenglish" set orsne=server.createobject("adodb.recordset") orsne.open sqlne,conn,1,3 if not orsne.eof then %> <select name="genglish"> <% orsne.movefirst do while not orsne.eof gradee=orsne("ng") %> <option <% if genglish=gradee then%> value=<%=genglish%> selected <%else%> value=<%=gradee%><%end if%>> <%=orsne("ng")%> </option> <% orsne.movenext loop %> </select> <% end if 'else 'response.write "<input name=genglish type=text size=3/>" end if response.write "<input type=submit name=Submit value=Edit /></form></table>" ' response.write "<form action=save_thesis.asp method=post name=form4>" ' response.write "<br>�š���ͺ�Է�ҹԾ���= " 'sqlthe="select * from thesis where gthesis='P' and gthesis='O' and gthesis='G'" ' sqlthe="select * from thesis " ' set orsthe=server.CreateObject("adodb.recordset") ' orsthe.open sqlthe,conn,1,3 ' if not orsthe.eof then 'response.write "<input name=gthesis type=text size=3 value="&orsthe("gthesis")&"></input>" ' gthesis=orsthe("gthesis") ' if gthesis="P" or gthesis="O" or gthesis="G" then ' sqlng="select * from ngthesis" ' set orsng=server.createobject("adodb.recordset") ' orsng.open sqlng,conn,1,3 ' if not orsng.eof then %> <!-- <select name="gthesis">--> <% ' orsng.movefirst ' do while not orsng.eof ' gradec=orsng("ng") %> <!-- <option --> <%' if gthesis=gradec then%> <!-- value=--> <%'=gthesis%> <!-- selected--> <%'else%> <!-- value=--> <%'=gradec%> <%'end if%> <!-- >--> <%'=orsng("ng")%> <!-- </option>--> <% ' orsng.movenext 'loop %> <!-- </select>--> <% 'end if 'tcredit=tcredit+12 'else ' sqlng="select * from ngthesis" ' set orsng=server.createobject("adodb.recordset") ' orsng.open sqlng,conn,1,3 ' if not orsng.eof then %> <!-- <select name="gthesis">--> <% ' orsng.movefirst 'do while not orsng.eof 'gradec=orsng("ng") %> <!-- <option --> <%' if gthesis=gradec then%> <!-- value=--> <%'=gthesis%> <!-- selected--> <%'else%> <!-- value=--> <%'=gradec%> <%'end if%> <!-- > --> <%'=orsng("ng")%> <!-- </option> --> <% ' orsng.movenext ' loop %> <!-- </select> --> <% 'end if 'end if ' end if ' response.write "<input type=submit name=Submit value=Edit /></form>" %> </p> <p align="center">��ػ��§ҹ�š���֡��</p> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="81" bgcolor="#3399CC"><div align="center" class="style1">[<a href="detail_group.asp" class="style1">������</a>]</div></td> <td width="65" bgcolor="#3399CC"><div align="center" class="style1">ࡳ��</div></td> <td width="26" bgcolor="#3399CC"><div align="center" class="style1">����</div></td> <td width="28" bgcolor="#3399CC" align="cener"><div align="center">status</div></td> </tr> <% sqlct="select * from type_course" set orsct=server.CreateObject("adodb.recordset") orsct.open sqlct,conn,1,3 if not orsct.eof then orsct.movefirst do while not orsct.eof std=orsct("credit_total") 'response.write sqlct response.write "<tr><td>"&orsct("typecourse")&"<td align=center>"&orsct("credit_total") id_typecourse=orsct("id_typecourse") sqlr="select * from course where id_typecourse="&id_typecourse&"" set orsr=server.CreateObject("adodb.recordset") orsr.open sqlr,conn,1,3 credit_s=0 if not orsr.eof then orsr.movefirst 'response.write sqlr do while not orsr.eof id_course=orsr("id_course") sqlco="select * from register where id_course='"&id_course&"'" 'response.write sqlco 'response.write id_course set orsco=server.CreateObject("adodb.recordset") orsco.open sqlco,conn,1,3 if not orsco.eof then grade1=orsco("grade") if grade1="U" then credit=0 else credit=orsr("credit") end if credit_s=credit_s+credit end if orsr.movenext loop response.write "<td align=center>"&credit_s if credit_s>=std then cre_check="G" else cre_check="F" end if ' response.write "<td align=center>"&cre_check&"-"&credit_s&"-"&std cre_checks=cre_checks+cre_check end if orsct.movenext loop end if %> <tr> <td bgcolor="#66CCFF">�ô�����</td> <td bgcolor="#66CCFF"><div align="center">>=3.00</div></td> <td bgcolor="#66CCFF" align="center"><%=formatnumber(gpa,2)%></td> <td bgcolor="#66CCFF"> </td> </tr> <tr> <td bgcolor="#66FF99">�����ѧ���</td> <td bgcolor="#66FF99"><div align="center">P</div></td> <td bgcolor="#66FF99" align=center><%=genglish%></td> <td bgcolor="#66FF99"> </td> </tr> <tr> <td>˹��¡Ե����</td> <td ><div align="center">>=37</div></td><td><div align="center"> <% response.write tcredit %> </div> <td>˹��� </tr> <tr> <td>��ػʶҹ�</td> <td colspan="3"><%=ystatus%></td> </tr> <tr> <td bgcolor="#FFFF00">������稡���֡��</td> <td colspan="3" bgcolor="#FFFF00"><% 'response.write "<br>�š������稡���֡��= " if gpa>=3 and genglish="P" and tcredit>=37 and cre_checks="GGGG" then ' if gthesis="O" or gthesis="G" or gthesis="P" then response.write "You are Finish Congratulation Naja" 'response.write gps&""&genglish&""&tcredit&""&cre_checks 'response.write tcredit ' end if else response.write "You are Not Finish" 'response.write gpa&""&genglish&""&tcredit&""&cre_checks end if ' response.write gpa&"gpa<br>" ' response.write genglish&"genglish<br>" ' response.write tcredit&"gcredit<br>" %></td> </tr> </table> <p align="center"> </p> <p align="center"></p> </body> </html>