File Manager
Back to List
| Current Directory: ~/
Editing: equipment_search.asp.bak
Full path: C:\ict\ICT\equipment_search.asp.bak
Permissions: rwx
Write test: File appears not directly writable
Current process identity: IIS APPPOOL\DefaultAppPool
<%response.cachecontrol="private"%> <!--#INCLUDE FILE="ConnectDB.asp"--> <%'<!--#include file="chk_login.asp"--> pern=session("username") per="2" tb="equipment" 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 'if not orsnc.eof then %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><!-- InstanceBegin template="/Templates/ICT.dwt" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>�к����ʹ�����͡�ú�����</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> <link href="bsri2006.css" rel="stylesheet" type="text/css"> <link href="image/favicon.ico" rel="shortcut icon" type="image/x-icon"> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" border="0"> <tr> <td colspan="2"><div align="right"><img src="Image/head1.gif" width="800" height="61"></div></td> </tr> <tr> <td colspan="2" background="Image/bghead1.gif"><div align="right"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><strong>| <a href="http://www.swu.ac.th">SWU</a> | <a href="http://bsri.swu.ac.th">BSRI</a> |<a href="log_out.asp">Log Out </a></strong></font>|</div></td> </tr> <tr> <td width="20%" align="left" valign="top" bgcolor="#FFCCCC"><!-- InstanceBeginEditable name="EditRegion5" --><!--#include file="chk_menu.asp"--><!-- InstanceEndEditable --></td> <td width="77%" align="left" valign="top"><!-- InstanceBeginEditable name="EditRegion3" --> <div align="center"> <p><strong>����ѳ���������������ػ�ó��ʵ�<br> </strong></p> <table width="100%" border="0" cellspacing="0"> <tr> <td height="21" colspan="6"><div align="center">[<a href=equipmentindex.asp>����</a>]</div></td> </tr> <tr> <td height="21" colspan="6"><div align="center">�š�ä��Ҥ���ѳ���������������ػ�ó��ʵ</div></td> </tr> <% id_owner=request("id_owner") id_search=request("id_search") key_word=request.form("key_word") id_type_budget=request.form("id_type_budget") id_type=request.form("id_type") year_budget=request.form("year_budget") year_budget2=request.form("year_budget2") myyear=year(date) myyear=myyear+543 if year_budget="" then year_budget=myyear end if if year_budget2="" then year_budget2=myyear end if if id_search="0" then sql1="select * from equipment order by date_purchase asc, id_equipment asc" a="all" id_search=1 elseif id_owner<>"" then sql1="select * from equipment where id_owner="&id_owner&" order by date_purchase asc, id_equipment asc" a="owner" 'sql1="select * from equipment where id_owner='71477' order by id_equipment desc" elseif key_word="" and id_type_budget=99 and id_type=99 then '�ҷء���ҧ㹪�ǧ�ա�˹� sql1="select * from equipment where year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=1 elseif key_word="" and id_type_budget=99 then '�һ���������ѳ�� sql1="select * from equipment where id_type='"&id_type&"' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=2 elseif key_word="" and id_type=99 then '�һ������� sql1="select * from equipment where id_type_budget='"&id_type_budget&"' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=3 elseif key_word="" then '�һ���������ѳ����Ч� sql1="select * from equipment where id_type='"&id_type&"' and id_type_budget='"&id_type_budget&"' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=4 elseif id_type_budget=99 and id_type=99 then '�Ҥ�������촵������㹻է�����ҳ����˹� sql1="select * from equipment where id_equipment like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' or id_brand like '%"&key_word&"%' or number like '%"&key_word&"%' or id_brand like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=5 elseif id_type_budget=99 then '�Ҥ�������촵������㹻է�����ҳ����˹� sql1="select * from equipment where id_equipment like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' or id_brand like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' and id_type='"&id_type&"' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=6 elseif id_type=99 then '�Ҥ�������촵������㹻է�����ҳ����˹� sql1="select * from equipment where id_equipment like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' or id_brand like '%"&key_word&"%' or serial_eq like '%"&key_word&"%' and id_type_budget='"&id_type_budget&"' and year_budget between '"&year_budget&"' and '"&year_budget2&"' order by date_purchase asc, id_equipment asc" a=7 end if 'response.write key_word&"-"&id_type&"-"&id_type_budget&"-"&year_budget&"-"&year_budget2 '������繡�����ѹ���ͧ˹ѧ��� set orsall=server.CreateObject("adodb.recordset") orsall.open sql1,conn,1,3 'response.write sql1 ' response.write a ' response.write id_search response.write "<tr><td height=21 colspan=6>" response.write "��觷����� ���" response.write " Keyword ="&key_word sqlt="select * from equipment_budget where id_type_budget='"&id_type_budget&"'" set orst=server.CreateObject("adodb.recordset") orst.open sqlt,conn,1,3 if not orst.eof then response.write ", ������������ҳ ="&orst("type_budget") else response.write ", ������������ҳ = ����к�" end if ' response.write "<tr><td height=21 colspan=6>" sqlt="select * from equipment_type where id_type='"&id_type&"'" set orst=server.CreateObject("adodb.recordset") orst.open sqlt,conn,1,3 if not orst.eof then response.write ", ����������ѳ�� ="&orst("type_name") else response.write ", ����������ѳ�� ����к�" end if ' response.write "</td></tr>" ' response.write "<tr><td height=21 colspan=6>" ' response.write "���Ҩҡ "&typet ' response.write "</td></tr>" ' response.write "<tr><td height=21 colspan=6>" ' response.write "���Ӥѭ "&keyword ' response.write "</td></tr>" ' response.write "<tr><td height=21 colspan=6>" response.write "<br>�ҡ�է�����ҳ "&year_budget ' response.write "</td></tr>" ' response.write "<tr><td height=21 colspan=6>" response.write " �֧ "&year_budget2 ' response.write "Keyword"&key_word&" ������������ҳ "&id_type_budget&" ����������ѳ�� "&id_type response.write "</td></tr>" %> <table width="100%" border="1" cellspacing="0"> <tr> <td >�����Ţ����ѳ��</td> <td>������</td> <td>�ѹ���շ�����</td> <td>���ء����ҹ</td> <!-- <td>AssureY</td>--> <!-- <td>���</td>--> <td>����Ѻ�Դ�ͺ</td> <% '<option>===���˹�ҷ��===</option>%> <% %> <td>����������ѳ��</td> <% %> <td>ʶҹФ���ѳ��</td> <% ' set orsl=server.createobject("adodb.recordset") 'sqll="select * from equipment_status" 'orsl.open sqll,Conn,1,3 ' if not orsl.eof then 'orsl.movefirst 'do while not orsl.eof ' response.write "<option value="&orsl("id_status")&">"&orsl("status_name")&"</option>" ' orsl.movenext ' loop ' end if %> <td>Action</td> </tr> <% if not orsall.eof then orsall.movefirst do while not orsall.eof response.write "<tr><td><a href=equipment_detail.asp?id_equipment="&orsall("id_equipment")&">"&orsall("id_equipment")&"</a></td>" response.write "<td>"&orsall("id_brand")&"</td>" 'response.write "<td>"&orsall("date_purchase")&"</td>" response.write "<td>"&orsall("d_purchase")&"/"&orsall("m_purchase")&"/"&orsall("y_purchase") '�ӹdz���ء����ҹ 'response.write "<td>"&x& " �� "&e&" ���Ѩ�غѹ "&month1&"�Ѩ�غѹy="&y&"m1��������="&m1&"y1�շ�����="&y1&"m�����ӹdz��="&m&"</td>" month1=month(now()) y=year(now()) y=543+y m1=cint(orsall("m_purchase")) y1=cint(orsall("y_purchase")) aa=0 if cint(y)>cint(y1) then x=cint(y)-cint(y1) aa=1 if cint(m1)<=cint(month1) then e=cint(month1)-cint(m1) aa=4 elseif cint(m1)>cint(month1) then if cint(y)-1=cint(y1) then x=0 'else aa=5 end if e=12-cint(m1)+cint(month1) x=cint(y)-cint(y1)-1 aa=2 end if elseif cint(y)=<cint(y1) then x=0 aa=6 if cint(m1)<=cint(month1) then e=cint(month1)-cint(m1) aa=7 elseif cint(m1)>cint(month1) then e=12-cint(m1)+cint(month1) aa=8 end if aa=3 end if response.write "<td>"&x& " �� "&e&" ��</td>" ' response.write "<td>"&orsall("time_assure")&"</td>" ' response.write "<td>"&orsall("time_assure")&"</td>" 'response.write "<td>"&x& " �� "&e&" ���Ѩ�غѹ "&month1&"�Ѩ�غѹy="&y&"m1��������="&m1&"y1�շ�����="&y1&"m�����ӹdz��="&m&"</td>" ' response.write "<td>"&orsall("time_assure")&"</td>" ' response.write "<td>"&orsall("ram")&"</td>" id_owner=orsall("id_owner") set orsl=server.createobject("adodb.recordset") sqll="select * from lecturer where id_lecturer='"&id_owner&"'" orsl.open sqll,Conn,1,3 if not orsl.eof then response.write "<td><a href=equipment_search.asp?id_owner="&id_owner&">"&orsl("name_lec")&" "&orsl("sur_lec")&"</a></td>" else set orso=server.createobject("adodb.recordset") sqlo="select * from staff where id_staff='"&id_owner&"'" orso.open sqlo,Conn,1,3 if not orso.eof then response.write "<td><a href=equipment_search.asp?id_owner="&id_owner&">"&orso("name_st")&" "&orso("sur_st")&"</a></td>" end if end if id_type=orsall("id_type") set orsl=server.createobject("adodb.recordset") sqll="select * from equipment_type where id_type='"&id_type&"'" orsl.open sqll,Conn,1,3 if not orsl.eof then response.write "<td>"&orsl("type_name")&"</td>" end if id_status=orsall("id_status") set orss=server.createobject("adodb.recordset") sqls="select * from equipment_status where id_status='"&id_status&"'" orss.open sqls,Conn,1,3 if not orss.eof then response.write "<td>"&orss("status_name")&"</td>" end if response.write "<td>[<a href=equipment_edit_form.asp?id_equipment="&orsall("id_equipment")&">Edit</a>]" orsall.movenext loop end if %> </table> </div> <!-- InstanceEndEditable --></td> </tr> <tr> <td colspan="2" background="Image/bghead1.gif">Contact Admin:: wassanaw@swu.ac.th tel.02-649-5000 ext 17600</td> </tr> </table> </body> <!-- InstanceEnd --></html> <% 'else 'response.write "No Permission" 'response.write "<a href=index_academic.asp>Return</a>" 'end if %>