/beta/home/furlough.asp
ASP | 127 lines | 104 code | 13 blank | 10 comment | 4 complexity | adc895116aabdffccfb1fbae9a4d54f1 MD5 | raw file
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><% 2'Home (0) 3PageTitle= " ������� �����" 4SubmenuItem=4 5 6if not Auth(0 , 4) then NotAllowdToViewThisPage() 7 8sendTo = session("id") 9%> 10<!--#include file="top.asp" --> 11<!--#include File="../include_farsiDateHandling.asp"--> 12<!--#include File="../include_JS_InputMasks.asp"--> 13<% 14 15function sqlSafe (s) 16 st=s 17 st=replace(St,"'","`") 18 st=replace(St,chr(34),"`") 19 sqlsafe=st 20end function 21 22'----------------------------------------------------------------------------------------------------- 23'------------------------------------------------------------------------------------ Send New Message 24'----------------------------------------------------------------------------------------------------- 25if request.form("Submit")="��� �������" then 26 27' MsgTo = "4" '=====> 4 = Mr. Kavakeb 28' Changed by kid 840727 29 MsgTo = "6" '=====> 1 = Mr. Vazehi 30 msgTitle = "request for furlough" 31 msgDate = sqlSafe(request.form("msgDate")) 32 msgBody = sqlSafe(left(request.form("msgBody"),1999)) 33 fromTime = sqlSafe(request.form("fromTime")) 34 toTime = sqlSafe(request.form("toTime")) 35 RelatedTable = "NaN" 36 relatedID = "0" 37 replyTo = "0" 38 IsReply = "0" 39 MsgFrom = session("ID") 40 MsgTime = currentTime10() 41 MsgDate = shamsiToday() 42 43 'msgBody2 = "������� ����� ���� ����� <span dir=ltr>" & msgDate & "</span> �� ���� " & fromTime & "�� ���� " & toTime & "<hr noshade style=''height:1''>" & msgBody 44 msgBody2 = "������� ����� ���� ����� " & msgDate & " �� ���� " & fromTime & "�� ���� " & toTime & "----------- �������: " & msgBody 45 46 47 MySQL = "INSERT INTO Messages (MsgFrom, MsgTo, MsgTime, MsgDate, IsRead, MsgTitle, MsgBody, replyTo, IsReply, relatedID, RelatedTable) VALUES ( "& MsgFrom & ", "& MsgTo & ", N'"& MsgTime & "', N'"& MsgDate & "', 0, N'"& MsgTitle & "', N'"& MsgBody2 & "', "& replyTo & ", "& IsReply & ", "& relatedID & ", '"& RelatedTable & "')" 48 49 conn.Execute MySQL 50 response.write "<center><br><br>������� ��� ���� ������ ����� ��</center>" 51 52end if 53 54'----------------------------------------------------------------------------------------------------- 55'------------------------------------------------------------------------------------ New Message Form 56'----------------------------------------------------------------------------------------------------- 57%> 58<SCRIPT LANGUAGE="JavaScript"> 59<!-- 60function hideIT() 61{ 62//alert(document.all.RelatedTable.value) 63if(document.all.RelatedTable.value!="no") 64 { 65 document.all.relatedIDSpan.style.visibility= 'visible' 66 document.all.relatedID.value = "0" 67 document.all.relatedID.focus() 68 } 69 else 70 { 71 document.all.relatedIDSpan.style.visibility= 'hidden' 72 document.all.relatedID.value = "0" 73 } 74} 75//--> 76</SCRIPT> 77 78<center><BR><BR><BR> 79<FORM METHOD=POST ACTION="furlough.asp"> 80<INPUT TYPE="hidden" name="replyTo" value="0"> 81<INPUT TYPE="hidden" name="IsReply" value="0"> 82<TABLE> 83<TR> 84 <TD colspan=2 align=center><H3>������� �����</H3></TD> 85</TR> 86<!--TR> 87 <TD align=left>���: </TD> 88 <TD align=right> 89 <select name="kind" class=inputBut > 90 <option value="0">�� ��� �� ����</option> 91 <option value="1">��� ����</option> 92 </select> <BR> 93 </TD> 94</TR--> 95<TR> 96 <TD align=left>�����</TD> 97 <TD align=right> 98 <INPUT TYPE="text" NAME="msgDate" value="<%=shamsiDate(date()+1)%>" onKeyPress="return maskDate(this);" onblur="acceptDate(this)" dir=ltr class=inputBut size=31> 99 </TD> 100</TR> 101<TR> 102 <TD align=left>�� ����</TD> 103 <TD align=right> 104 <INPUT TYPE="text" NAME="fromTime" class=inputBut size=8 onKeyPress="return maskTime(this);" dir=ltr> 105 ������: 106 <INPUT TYPE="text" NAME="toTime" class=inputBut size=9 onKeyPress="return maskTime(this);" dir=ltr> 107 </TD> 108</TR> 109<TR> 110 <TD align=left>�����</TD> 111 <TD align=right> 112 <TEXTAREA NAME="msgBody" ROWS="4" class=inputBut COLS="32"></TEXTAREA> 113 </TD> 114</TR> 115<TR> 116 <TD align=left></TD> 117 <TD align=center><br><INPUT TYPE="submit" name="submit" value="��� �������"></TD> 118</TR> 119<TR> 120 <TD align=left></TD> 121 <TD align=right> 122 </TD> 123</TR> 124</TABLE> 125</FORM> 126 127<!--#include file="tah.asp" -->