Jump to content
Fórum Script Brasil
  • 0

Páginas .asp Não Abrem Nos Frames.


DeathMask
 Share

Question

boa tarde pessoal, estou com um problema relativo a frames, toda vez que tento abrir uma página .asp no mainframe ela aparece só os códigos, quando eu coloco os comandos html iniciais ela abre mostrando grande parte do meu código como texto e não funciona o sistema de login, alguém pode me ajudar?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

esse é o codigo da pagina que estou tentando abrir, minhas outras paginas também começam assim:

<%@ Language=VBScript %>

<%

Response.Buffer=true

Response.Expires=0

%>

<!--#include file="Connections/SSRPG2.asp" -->

<%

Dim consultas

Dim consultas_numRows

Set consultas = Server.CreateObject("ADODB.Recordset")

consultas.ActiveConnection = MM_SSRPG2_STRING

consultas.Source = "SELECT * FROM usuarios"

consultas.CursorType = 0

consultas.CursorLocation = 2

consultas.LockType = 1

consultas.Open()

consultas_numRows = 0

%>

<%

' *** Validate request to log in to this site.

MM_LoginAction = Request.ServerVariables("URL")

If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString

MM_valUsername=CStr(Request.Form("usuario"))

If MM_valUsername <> "" Then

MM_fldUserAuthorization=""

MM_redirectLoginSuccess="sucesso.htm"

MM_redirectLoginFailed="falhou.htm"

MM_flag="ADODB.Recordset"

set MM_rsUser = Server.CreateObject(MM_flag)

MM_rsUser.ActiveConnection = MM_SSRPG2_STRING

MM_rsUser.Source = "SELECT LOGIN, SENHA"

If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization

MM_rsUser.Source = MM_rsUser.Source & " FROM usuarios WHERE LOGIN='" & Replace(MM_valUsername,"'","''") &"' AND SENHA='" & Replace(Request.Form("senha"),"'","''") & "'"

MM_rsUser.CursorType = 0

MM_rsUser.CursorLocation = 2

MM_rsUser.LockType = 3

MM_rsUser.Open

If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then

' username and password match - this is a valid user

Session("MM_Username") = MM_valUsername

If (MM_fldUserAuthorization <> "") Then

Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)

Else

Session("MM_UserAuthorization") = ""

End If

if CStr(Request.QueryString("accessdenied")) <> "" And false Then

MM_redirectLoginSuccess = Request.QueryString("accessdenied")

End If

MM_rsUser.Close

Response.Redirect(MM_redirectLoginSuccess)

End If

MM_rsUser.Close

Response.Redirect(MM_redirectLoginFailed)

End If

%>

<html>

<head>

<title>SSRPG</title>

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_validateForm() { //v4.0

var i,p,que,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;

for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);

if (val) { nm=val.name; if ((val=val.value)!="") {

if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';

} else if (test!='R') { num = parseFloat(val);

if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';

if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

min=test.substring(8,p); max=test.substring(p+1);

if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }

} if (errors) alert('The following error(s) occurred:\n'+errors);

document.MM_returnValue = (errors == '');

}

//-->

</script>

</head>

<body bgcolor="#000000" text="#FFFF00" link="#FFFF00" vlink="#FFFF00" alink="#FFFFFF">

<p align="center">

<font color="#FFFF00" size="3" face="Brandegoris">FA<font face="Celticmd">&Ccedil;</font></font><font size="3" face="Brandegoris">A

SEU LOGIN</font></p>

<form action="<%=MM_LoginAction%>" method="POST" name="form1" onSubmit="MM_validateForm('usuario','','R','senha','','R');return document.MM_returnValue">

<p align="center"><font face="Brandegoris">NOME<font face="Celticmd">:

</font><br>

<input name="usuario" type="text" id="usuario" size="20" maxlength="50">

</font></p>

<p align="center"><font face="Brandegoris">SENHA<font face="Celticmd">:</font><br>

<input name="senha" type="password" id="senha" size="20" maxlength="8">

</font></p>

<p align="center"><font face="Brandegoris">

<input type="submit" name="Submit" value="LOGAR">

</font> </p>

</form>

<p align="center"><font size="2" face="Brandegoris">SE VOC<font face="Celticmd">&Ecirc;</font> AINDA

N<font face="Celticmd">&Atilde;</font>O <font face="Celticmd">&Eacute;</font> CADASTRADO

CLIQUE <a href="cadastro.asp">AQUI</a><font face="Celticmd">.</font></font></p>

</body>

</html>

<%

consultas.Close()

Set consultas = Nothing

%>

Link to comment
Share on other sites

  • 0

já que tu está usando o dreamweaver para gerar cod.... so vou te contar o que ele faz....]

poe os codigos no lugar errado dentro do codigo e acaba fazendo com que não funcione como esperado te recomendo fazer manualmente sem o auxilio dele...você ira aprender mais seu codigo ficara menor e mais limpo...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...