Ir para conteúdo
Fórum Script Brasil

prog_alan

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre prog_alan

prog_alan's Achievements

0

Reputação

  1. prog_alan

    Acl No Recurso

    Passoal não consigo carrregar uma pagina asp, apresenta "HTTP 401.3 - Acesso negado devido à ACL no recurso Internet Information Services" no browser !!! o que pode ser ?? Valeuu!!
  2. prog_alan

    Logon

    O código asp de login esta assim: percebi efetuando teste com response que esta aprando neste bloco: '=============================== ' Login Form Action '------------------------------- response.Write ("passou") Sub LoginAction(sAction) sQueryString = GetParam("querystring") sPage = GetParam("ret_page") Select case sAction Case "login" '=============================== <% ' Filename: Login.asp '------------------------------- ' Login CustomIncludes begin %> <!-- #INCLUDE FILE="Common.asp" --> <!-- #INCLUDE FILE="Header.asp" --> <!-- #INCLUDE FILE="Footer.asp" --> <% ' Login CustomIncludes end '------------------------------- '=============================== ' Save Page and File Name available into variables '------------------------------- sFileName = "login.asp" sTemplateFileName = "login.html" '=============================== '=============================== ' Login PageSecurity begin ' Login PageSecurity end '=============================== '=============================== ' Login Open Event begin ' Login Open Event end '=============================== '=============================== ' Login OpenAnyPage Event begin ' Login OpenAnyPage Event end '=============================== '=============================== 'Save the name of the form and type of action into the variables '------------------------------- sAction = GetParam("FormAction") sForm = GetParam("FormName") '=============================== ' Login Show begin '=============================== ' Perform the form's action '------------------------------- ' Initialize error variables '------------------------------- sLoginErr = "" '------------------------------- ' Select the FormAction '------------------------------- Select Case sForm Case "Login" LoginAction(sAction) end select '=============================== '=============================== ' Display page '------------------------------- ' Load HTML template for this page '------------------------------- LoadTemplate sAppPath & sTemplateFileName, "main" '------------------------------- ' Load HTML template of Header and Footer '------------------------------- LoadTemplate sHeaderFileName, "Header" LoadTemplate sFooterFileName, "Footer" '------------------------------- SetVar "FileName", sFileName '------------------------------- ' Step through each form '------------------------------- Menu_Show FooterForm_Show Login_Show '------------------------------- ' Process page templates '------------------------------- Parse "Header", False Parse "Footer", False Parse "main", False '------------------------------- ' Output the page to the browser '------------------------------- Response.write PrintVar("main") ' Login Show end '------------------------------- ' Destroy all object variables '------------------------------- ' Login Close Event begin ' Login Close Event end cn.Close Set cn = Nothing UnloadTemplate '=============================== '=============================== ' Login Form Action '------------------------------- response.Write ("passou") Sub LoginAction(sAction) sQueryString = GetParam("querystring") sPage = GetParam("ret_page") Select case sAction Case "login" '------------------------------- ' Login Login begin '------------------------------- sLogin = GetParam("Login") sPassword = GetParam("Password") bPassed = CLng(DLookUp("users", "count(*)", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text"))) '------------------------------- ' Login OnLogin Event begin ' Login OnLogin Event end '------------------------------- if bPassed > 0 then '------------------------------- ' Login and password passed '------------------------------- Session("UserID") = CStr(DLookUp("users", "user_id", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text"))) Session("UserRights") = CLng(DLookUp("users", "security_level", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text"))) cn.Close Set cn = Nothing if not(sPage = request.serverVariables("SCRIPT_NAME")) and not(isEmpty(sPage)) then response.redirect(sPage & "?" & sQueryString) end if response.redirect("Default.asp") else sLoginErr = "Usuario ou Senha estão incorretos" end if '------------------------------- ' Login Login end '------------------------------- Case "logout" '------------------------------- ' Logout action '------------------------------- '------------------------------- ' Login Logout begin '------------------------------- '------------------------------- ' Login OnLogout Event begin ' Login OnLogout Event end '------------------------------- Session("UserID") = Empty Session("UserRights") = Empty cn.Close Set cn = Nothing if not isEmpty(sPage) then response.redirect(sPage & "?" & sQueryString) response.redirect(sFileName) '------------------------------- ' Login Logout end '------------------------------- End Select End Sub '=============================== '=============================== ' Display Login Form '------------------------------- Sub Login_Show() Dim sFormTitle: sFormTitle = "Login de Acesso" '------------------------------- ' Login Show begin '------------------------------- '------------------------------- ' Login Open Event begin ' Login Open Event end '------------------------------- SetVar "FormTitle", sFormTitle SetVar "sLoginErr", sLoginErr SetVar "querystring", GetParam("querystring") SetVar "ret_page", GetParam("ret_page") '------------------------------- ' Login BeforeShow Event begin ' Login BeforeShow Event end '------------------------------- if Session("UserID") = "" then '------------------------------- ' User is not logged in '------------------------------- SetVar "LogoutAct", "" SetVar "UserInd", "" SetVar "Login", ToHTML(GetParam("Login")) if sLoginErr = "" then SetVar "LoginError", "" else SetVar "sLoginErr", sLoginErr Parse "LoginError", False End if Parse "LoginAct", false else '------------------------------- ' User logged in '------------------------------- SetVar "LoginError", "" SetVar "LoginAct", "" SetVar "UserID", DLookUp("users", "login", "user_id =" & Session("UserID")) Parse "UserInd", False end if Parse "FormLogin", False '------------------------------- ' Login Close Event begin ' Login Close Event end '------------------------------- '------------------------------- ' Login Show end '------------------------------- End Sub '=============================== %>
  3. prog_alan

    Logon

    Pessoal é seguinte, tenho um programa de Helpdesk, este sistema roda com banco SQL, no entanto, fiz todos os procedimentos no IIS, criação de usuario no banco, String de conexão e tudo funcionou perfeitamente, entretanto, a página inicial é a de login solicitando Usuario e Senha e no banco de dados existe somente o usuario administrador "ADMIN", e quando tento fazer login no sistema não acontece nada apenas o campo password fica em branco e não passa para outra tela. Por favor pessoal preciso dessa força!!!
×
×
  • Criar Novo...