<%@LANGUAGE="VBSCRIPT" codepage=1256 %> <% Response.Charset="ar-sa" %> <% session.CodePage=1256 %> <% pStr = "private, no-cache, must-revalidate" Response.ExpiresAbsolute = #2000-01-01# Response.AddHeader "pragma", "no-cache" Response.AddHeader "cache-control", pStr %> المكتبة الإلكترونية للمنظمة العربية للتنمية الزراعية

الرئيسية   التسجيل للدخول بحث بسيط بحث متقدم

إستعراض  التصنيف

روابط مطبق المكتبة إهداءات للمنظمة
<%'============================CODE Start Here======================================================================%> <%checkPostBack = Request.ServerVariables("REQUEST_METHOD") 'response.write "checkPostBack===" & checkPostBack set conn=server.createObject("Adodb.connection") 'Conn.Open Application("dsn") 'Initiating connection from global.asa Set Conn = Server.CreateObject("ADODB.Connection") dbPath = Server.MapPath( "./AOAD-Library.mdb") 'session.timeout =100 connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" Conn.Open connString + dbPath set rs=server.createobject("Adodb.recordset") set rs_Sub_Systems=server.createobject("Adodb.recordset") set rs_E_File=server.createobject("Adodb.recordset") sql_Sub_Sys="select * from TBL_Sub_Systems_Info where 1=1" rs_Sub_Systems.open sql_Sub_Sys,conn,1 if request.form("Sys_Id")<>"" then Sys_Id=request.form("Sys_Id") else Sys_Id=request.querystring("Sys_Id") end if 'Check_Empty Sys_Id,"Sys_Id" 'Errcount=request.querystring("Errcount") sql=" select * from TBL_Library_Data where 1=1" if request.form("id")<>"" then id=request.form("id") else id=request.querystring("id") end if if request.form("Doc_Title")<>"" then Doc_Title=request.form("Doc_Title") else Doc_Title=request.querystring("Doc_Title") end if if request.form("Bookid")<>"" then Book_id=request.form("Bookid") else Book_id=request.querystring("Bookid") end if if request.form("action")<>"" then action=request.form("action") else action=request.querystring("action") end if Function Get_F_name(str) dim str1,str2 str1=str If (str1 <> "") Then str1=str str2 = Right(str1, 1) For j = Len(str1) - 1 To 1 Step -1 If Right(Left(str1, j), 1) <> "\" Then str2 = Right(Left(str1, j), 1) & str2 str3 = str3 & str2 Else j = 1 Get_F_name=str2 End If Next Get_F_name=str2 End If end Function %> <%''---------------------------Constants to open recordset for paging-----------------------------------------------%> <%Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adCmdText = &H0001 Const PAGE_SIZE =10' 10The size of our pages. rs.PageSize = PAGE_SIZE rs.CacheSize = PAGE_SIZE%> <%''---------------------------Constants to open recordset for paging-----------------------------------------------%>

<% ' Create a command object. This object serves to run our queries Set Cm = Server.CreateObject("ADODB.Command") ' Specify the system DSN path 'Cm.ActiveConnection = "Oman_Sub_Systems" ' Now it's time for the query. We need to check the user information ' against the table tUsers %>
<%if request.form("B1")<>"إرسال" then%> <%''if (request.form("country")<>"") then If Session("ErrMsg")<>"" Then ''if ErrCount>0 then 'ShowError Session("ErrMsg")="" end if ''End If ''End If 'response.write "Session==" & Session("userid") session("userid")="" %>
" size="20" />

التسجيل للدخول

إسم المستخدم " /><%'+++++++++++response.write "action ===" & action %>
 كلمة السر

" />" />" />

المستخدم غير مسجل:التسجيل كمستخدم جديد" />

<%else%> <%if request.form("Login")<>"" then Login=request.form("Login") else Login=request.querystring("Login") end if if request.form("password")<>"" then password=request.form("password") else password=request.querystring("password") end if if request.form("Sys_Id")<>"" then Sys_Id=request.form("Sys_Id") else Sys_Id=request.querystring("Sys_Id") end if 'Check_Empty Sys_Id,"Sys_Id" 'CheckErrorStatus("Login.asp?login="+login+"&password="+password+"&Sys_Id="&Sys_Id&"&Errcount="&Errcount) strSQL= "SELECT * FROM TBL_Member_Login WHERE " & _ "UserName='" & Request.Form("login") & "' AND " & _ "Password='" & Request.Form("password") &"'" & " and Status='" & "Confirmed" & "'" '++++++++++++++++++++++++++++response.write "strSQL+++++" & strSQL ' Set the query type. 1 means it is a SQL statement 'Cm.CommandType = 1 ' Retrieve the results in a recordset object 'Set Rs = cm.Execute rs.open strSQL,conn,1 'set rs=conn.Execute(strSQL) 'response.write "subsys===" & rs.fields("Sys_Id") ' We now check if the user is valid. If user is valid, the recordset MUST ' haverecord. Otherwise it is empty. If user exists, we set authentication ' status to 1 and send the user to appropriate page, say welcome.asp. ' Else send the user back to login.asp If Rs.EOF Then Session("Authenticated") = 0%> '

"> خطأ في الدخول - الرجاء التأكد من كتابة كلمة المرور و إسم المستخدم بصورة صحيحة

<%Else 'str= user(rs.fields("Sys_Id")) response.write "userid======" & rs.fields(0) Session("Authenticated") = userid Session("userid") = rs.fields(0) 'response.Redirect ("Data_Entry.asp?Authen="& Session("Authenticated")&"&Sys_id="&rs.fields("Sys_Id")) 'response.Redirect ("http://localhost/oman_admin/"&str&"?Authen="& Session("Authenticated")&"&Sys_id="&rs.fields("Sys_Id")) 'response.Redirect ("http://localhost"&str&"?userid="&rs.fields(0)) user1=rs.fields("username") userid=rs.fields(0) if user1<>"cpanel" then if Book_id="" then 'response.Redirect ("http://localhost/Library-Final/system_admin.asp") 'response.Redirect ("http://localhost/Library_Win7/" & str +"" ) response.write "--------------" & "Bookid" & request.form("Bookid") & "action=" & request.form("action") if (request.form("Bookid")<>"" and request.form("action")="Loan") then response.redirect("Loan_Book.asp?userid="&userid&"&Book_id="&Book_id&"&Doc_Title="+Doc_Title) end if if user_Auth(Session("userid")) then response.Redirect ("Data_Entry.asp") end if else sql=sql & " and id=" & Book_id rs_E_File.open sql,conn,1 '++++++++++str=rs_E_File.fields("Eng_File") str=rs_E_File.fields("E_File") response.write "sql====" & sql response.write "str====" & str if action<>"Loan" then response.Redirect ("Linked_Studies/" & str +"" ) end if if (request.form("Bookid")<>"" and request.form("action")="Loan") then response.redirect("Loan_Book.asp?userid="&userid&"&Book_id="&Book_id&"&Doc_Title="+Doc_Title) end if end if response.write "**********" response.Redirect ("index.htm") else if (id="" or user1="cpanel") then response.Redirect ("system_admin.asp") else response.write "&&&&&&&&&&" response.Redirect ("index.htm") end if end if 'Server.URLEncode("http://localhost/Forms_Sys/S_R_2011.doc") 'call urlopen() 'HTTPDownload "http://www.aoad.org/Forms_Sys/Food_Fep_2011/S_R_2011.doc","C:\" 'response.write "sub_sys===" & "تم تحميل الإستمارة بنجاح" %> <%end if%> <%end if%> <%response.end%>