Ir para conteúdo
Fórum Script Brasil
  • 0

Porta


marcos_804

Pergunta

8 respostass a esta questão

Posts Recomendados

  • 0

ué?

como assim porta?

se o codigo é enviado por formulario, o padrão é 80 .. pois é a porta da web ...

Link para o comentário
Compartilhar em outros sites

  • 0

VOU MOSTRAR O CODIGO AGORA

<%

'Insert your mailserver name and port (usually 25)

mailserver="mail.1asphost.com:25"

AQUI QUE TEM DE CONFIGURAR, alguém SABE COMO?

%>

<html>

<head>

<title>Sakki's digital postcards</title>

<%

Flag = request.form("Flag")

If IsEmpty(Flag) or Flag = "" then

%>

</head>

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

<font size="6" face="arial">

Send a digital postcard</font>

<br><hr><br>

<form action="skrifa.asp" method="POST" >

<font size="5" face="arial">Choose your heading</font><br><br>

<font size="3" face="arial">

<input type="text" name="fsogn" size="50" value="Merry christmas ! ! ! "><br><hr><br>

<font size="5" face="arial">Chooser your image</font><br><br>  

<input type="radio" checked name="mynd" value="1.jpg">

<img src="1.jpg" width="130" height="90">

<input type="radio" name="mynd" value="2.jpg">

<img src="2.jpg" width="130" height="90">

<input type="radio" name="mynd" value="3.jpg">

<img src="3.jpg" width="130" height="90">

<br>

<input type="radio" name="mynd" value="4.jpg">

<img src="4.jpg" width="130" height="90">

<input type="radio" name="mynd" value="5.jpg">

<img src="5.jpg" width="130" height="90">

<input type="radio" name="mynd" value="6.jpg">

<img src="6.jpg" width="130" height="90">

<hr>

<table border="0">

<tr><td>&nbsp;</td><td>Message:</td><td>&nbsp;</td><td>&nbsp;</td></tr>

<tr><td>&nbsp;</td><td rowspan="4"><textarea name="kvedja" rows="8" cols="20"></textarea></td><td>To:</td><td><input type="text" size="20" name="nafn1" Value="<%= Request.QueryString("nafn") %>"></td></tr>

<tr><td>&nbsp;</td><td>Email</td><td><input type="text" size="20" name="netfang1" Value="<%= Request.QueryString("send") %>"></td></tr>

<tr><td>&nbsp;</td><td>From</td><td><input type="text" size="20" name="nafn2"></td></tr>

<tr><td>&nbsp;</td><td>Email</td><td><input type="text" size="20" name="netfang2"></td></tr>

</table><br><br>

<input type="hidden" name="Flag" value=1>

<input type="submit" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Preview postcard&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">

</form>

<%

end if

if flag = 1 then

anafn1 = request.form("nafn1")

anetfang1 = request.form("netfang1")

anafn2 = request.form("nafn2")

anetfang2 = request.form("netfang2")

akvedja = request.form("kvedja")

afsogn = request.form("fsogn")

amynd = request.form("mynd")

akvedja = server.HTMLencode(Request.form("kvedja"))

akvedja = Replace(akvedja, vbCrLf, "<br>")

%>

</head>

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

<center><font size="5">Postcard preview...</font><br>

<table border="1" width="700">

   <tr>

       <td rowspan="2" width="500"><font size="5"><em><b><%= afsogn %>

       </b></em></font><br>

       <br>

       <center><img src="<%= amynd %>"></center><br><b><%= akvedja %></b>

       </td>

       <td width="200">&nbsp;</td>

   </tr>

   <tr>

       <td width="200" rowspan="2"><font color="#FFFF00"><b>To:<br>

       <%= anafn1 %><br>

       </b></font><a href="<%= anetfang1 %>"><font

       color="#FFFF00"><b><%= anetfang1 %></b></font></a><font

       color="#FFFF00"><b><br>

       <br>

       From:<br>

<%= anafn2 %><br>

</b></font><a href="<%= anetfang2 %>"><font

color="#FFFF00"><b><%= anetfang2 %></b></font></a><font

color="#FFFF00"><b> </b></font></td>

</tr>

</table>

<form action="skrifa.asp" method="POST">

<input type="hidden" name="nafn1" value="<%= anafn1 %>">

<input type="hidden" name="netfang1" value="<%= anetfang1 %>">

<input type="hidden" name="nafn2" value="<%= anafn2 %>">

<input type="hidden" name="netfang2" value="<%= anetfang2 %>">

<input type="hidden" name="kvedja" value="<%= akvedja %>">

<input type="hidden" name="mynd" value="<%= amynd %>">

<input type="hidden" name="fsogn" value="<%= afsogn %>">

<input type="hidden" name="flag" value="2">

<input type="submit" value="Send postcard">

<input type="button" value="Fix it" OnClick="javascript:history.go(-1)">

</center>

<br>

<%

End If

If Flag = 2 then

Randomize

apass = int(rnd*99999)+1

adags = now()

anafn1 = request.form("nafn1")

anetfang1 = request.form("netfang1")

anafn2 = request.form("nafn2")

anetfang2 = request.form("netfang2")

akvedja = request.form("kvedja")

afsogn = request.form("fsogn")

amynd = request.form("mynd")

set conn = server.createobject("adodb.connection")

DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "

DSNtemp=dsntemp & "DBQ=" & server.mappath("kort.mdb")

conn.Open DSNtemp

SQLstmt = "INSERT INTO kort (pass,dags,nafn1,netfang1,nafn2,netfang2,kvedja,fsogn,mynd)"

SQLstmt = SQLstmt & " VALUES ("

SQLstmt = SQLstmt & "'" & apass & "',"

SQLstmt = SQLstmt & "'" & adags & "',"

SQLstmt = SQLstmt & "'" & anafn1 & "',"

SQLstmt = SQLstmt & "'" & anetfang1 & "',"

SQLstmt = SQLstmt & "'" & anafn2 & "',"

SQLstmt = SQLstmt & "'" & anetfang2 & "',"

SQLstmt = SQLstmt & "'" & akvedja & "',"

SQLstmt = SQLstmt & "'" & afsogn & "',"

SQLstmt = SQLstmt & "'" & amynd & "'"

SQLstmt = SQLstmt & ")"

Set RS = conn.execute(SQLstmt)

If err.number>0 then

response.write "VBScript error:" & "<P>"

response.write "Number=" & err.number & "<P>"

response.write "Explanation.=" & err.description & "<P>"

response.write "Help Context=" & err.helpcontext & "<P>"

response.write "Help Path=" & err.helppath & "<P>"

response.write "Native Error=" & err.nativeerror & "<P>"

response.write "Source=" & err.source & "<P>"

response.write "SQLState=" & err.sqlstate & "<P>"

end if

IF conn.errors.count> 0 then

response.write "Access database error" & "<P>"

response.write SQLstmt & "<P>"

for counter= 0 to conn.errors.count

response.write "Error #" & conn.errors(counter).number & "<P>"

response.write "Explanation. -> " & conn.errors(counter).description & "<P>"

next

Conn.Close

set conn = nothing

else

Conn.Close

set conn = nothing

set conn = server.createobject("adodb.connection")

DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "

DSNtemp=dsntemp & "DBQ=" & server.MapPath("kort.mdb")

conn.Open DSNtemp

sqlstmt = "SELECT * FROM kort WHERE nafn1 = "

sqlstmt = sqlstmt & "'" & anafn1 & "'"

sqlstmt = sqlstmt & " AND pass = "

sqlstmt = sqlstmt & apass

sqlstmt = sqlstmt & " ORDER BY id DESC;"

'rs.Open sqlstmt,conn,3,3

set rs = conn.Execute(sqlstmt)

id = rs("id")

Conn.Close

Set conn = nothing

dim mailbody

scriptname = Request.servervariables("script_name")

scriptname = Replace(scriptname,"skrifa.asp","skoda.asp")

scriptname = "http://" & request.servervariables("server_name") & scriptname

mailbody = anafn2 & " has sent you a postcard" & Vbcrlf & vbcrlf

mailbody = mailbody & "You can pick your postcard up at the address :" & vbcrlf

mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass

mailbody = mailbody & vbcrlf & vbcrlf

mailbody = mailbody & "Or visit " & scriptname & vbcrlf

mailbody = mailbody & "And enter" & vbcrlf

mailbody = mailbody & "Postcard Id = " & id & vbcrlf

mailbody = mailbody & "Postcard Password = " & apass & vbCrlf & vbcrlf

mailbody = mailbody & "Written by Sakki - http://www.welcome.to/sakki"

blabla = "Postcard from " & anafn2

'Response.Write mailbody

set SMTP=Server.CreateObject("Jmail.SMTPMail")

SMTP.ServerAddress= mailserver

SMTP.Sender=anetfang2

SMTP.AddRecipient anetfang1

SMTP.Subject=blabla

SMTP.Body=mailbody

SMTP.Execute

%>

</head>

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

<b>

Thank you !!<br>

Postcard has been sent to : <a href="mailto:<%= anetfang1 %>"><%= anafn1 %></a><br>

Sender is : <a href="mailto:<%= anetfang2 %>"><%= anafn2 %></a><br>

<BR><A href="javascript:history.go(-3)">Back</A>

<%

end if

end if

%>

</body>

</html>

Editado: Para usar TAGS de formatação de texto em códigos, utilize a tag QUOTE!

Editado por dark0
Link para o comentário
Compartilhar em outros sites

  • 0

tenta isso:

<%

mailserver="mail.1asphost.com"

%>
<html>
<head>
<title>Sakki's digital postcards</title>
<%
Flag = request.form("Flag")
If IsEmpty(Flag) or Flag = "" then
%>
</head>
<body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff">
<font size="6" face="arial">
Send a digital postcard</font>
<br><hr><br>
<form action="skrifa.asp" method="POST" >
<font size="5" face="arial">Choose your heading</font><br><br>
<font size="3" face="arial">
<input type="text" name="fsogn" size="50" value="Merry christmas ! ! ! "><br><hr><br>
<font size="5" face="arial">Chooser your image</font><br><br>   
<input type="radio" checked name="mynd" value="1.jpg">
<img src="1.jpg" width="130" height="90">
<input type="radio" name="mynd" value="2.jpg">
<img src="2.jpg" width="130" height="90">
<input type="radio" name="mynd" value="3.jpg">
<img src="3.jpg" width="130" height="90">
<br>
<input type="radio" name="mynd" value="4.jpg">
<img src="4.jpg" width="130" height="90">
<input type="radio" name="mynd" value="5.jpg">
<img src="5.jpg" width="130" height="90">
<input type="radio" name="mynd" value="6.jpg">
<img src="6.jpg" width="130" height="90">
<hr>
<table border="0">
<tr><td>&nbsp;</td><td>Message:</td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td rowspan="4"><textarea name="kvedja" rows="8" cols="20"></textarea></td><td>To:</td><td><input type="text" size="20" name="nafn1" Value="<%= Request.QueryString("nafn") %>"></td></tr>
<tr><td>&nbsp;</td><td>Email</td><td><input type="text" size="20" name="netfang1" Value="<%= Request.QueryString("send") %>"></td></tr>
<tr><td>&nbsp;</td><td>From</td><td><input type="text" size="20" name="nafn2"></td></tr>
<tr><td>&nbsp;</td><td>Email</td><td><input type="text" size="20" name="netfang2"></td></tr>
</table><br><br>
<input type="hidden" name="Flag" value=1>
<input type="submit" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Preview postcard&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">
</form>
<%
end if
if flag = 1 then
anafn1 = request.form("nafn1")
anetfang1 = request.form("netfang1")
anafn2 = request.form("nafn2")
anetfang2 = request.form("netfang2")
akvedja = request.form("kvedja")
afsogn = request.form("fsogn")
amynd = request.form("mynd")
akvedja = server.HTMLencode(Request.form("kvedja"))
akvedja = Replace(akvedja, vbCrLf, "<br>")
%>
</head>
<body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff">
<center><font size="5">Postcard preview...</font><br>

<table border="1" width="700">
   <tr>
       <td rowspan="2" width="500"><font size="5"><em><b><%= afsogn %>
       </b></em></font><br>
       <br>
       <center><img src="<%= amynd %>"></center><br><b><%= akvedja %></b>
       </td>
       <td width="200">&nbsp;</td>
   </tr>
   <tr>
       <td width="200" rowspan="2"><font color="#FFFF00"><b>To:<br>
       <%= anafn1 %><br>
       </b></font><a href="<%= anetfang1 %>"><font
       color="#FFFF00"><b><%= anetfang1 %></b></font></a><font
       color="#FFFF00"><b><br>
       <br>
       From:<br>
<%= anafn2 %><br>
</b></font><a href="<%= anetfang2 %>"><font
color="#FFFF00"><b><%= anetfang2 %></b></font></a><font
color="#FFFF00"><b> </b></font></td>
</tr>
</table>
<form action="skrifa.asp" method="POST">
<input type="hidden" name="nafn1" value="<%= anafn1 %>">
<input type="hidden" name="netfang1" value="<%= anetfang1 %>">
<input type="hidden" name="nafn2" value="<%= anafn2 %>">
<input type="hidden" name="netfang2" value="<%= anetfang2 %>">
<input type="hidden" name="kvedja" value="<%= akvedja %>">
<input type="hidden" name="mynd" value="<%= amynd %>">
<input type="hidden" name="fsogn" value="<%= afsogn %>">
<input type="hidden" name="flag" value="2">
<input type="submit" value="Send postcard">
<input type="button" value="Fix it" OnClick="javascript:history.go(-1)">
</center>
<br>
<%
End If
If Flag = 2 then
Randomize
apass = int(rnd*99999)+1
adags = now()
anafn1 = request.form("nafn1")
anetfang1 = request.form("netfang1")
anafn2 = request.form("nafn2")
anetfang2 = request.form("netfang2")
akvedja = request.form("kvedja")
afsogn = request.form("fsogn")
amynd = request.form("mynd")
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("kort.mdb")
conn.Open DSNtemp
SQLstmt = "INSERT INTO kort (pass,dags,nafn1,netfang1,nafn2,netfang2,kvedja,fsogn,mynd)"
SQLstmt = SQLstmt & " VALUES (" 
SQLstmt = SQLstmt & "'" & apass & "',"
SQLstmt = SQLstmt & "'" & adags & "',"
SQLstmt = SQLstmt & "'" & anafn1 & "',"
SQLstmt = SQLstmt & "'" & anetfang1 & "',"
SQLstmt = SQLstmt & "'" & anafn2 & "',"
SQLstmt = SQLstmt & "'" & anetfang2 & "',"
SQLstmt = SQLstmt & "'" & akvedja & "',"
SQLstmt = SQLstmt & "'" & afsogn & "',"
SQLstmt = SQLstmt & "'" & amynd & "'"
SQLstmt = SQLstmt & ")"
Set RS = conn.execute(SQLstmt)
If err.number>0 then
response.write "VBScript error:" & "<P>"
response.write "Number=" & err.number & "<P>"
response.write "Explanation.=" & err.description & "<P>"
response.write "Help Context=" & err.helpcontext & "<P>" 
response.write "Help Path=" & err.helppath & "<P>"
response.write "Native Error=" & err.nativeerror & "<P>"
response.write "Source=" & err.source & "<P>"
response.write "SQLState=" & err.sqlstate & "<P>"
end if
IF conn.errors.count> 0 then
response.write "Access database error" & "<P>"
response.write SQLstmt & "<P>"
for counter= 0 to conn.errors.count
response.write "Error #" & conn.errors(counter).number & "<P>"
response.write "Explanation. -> " & conn.errors(counter).description & "<P>"
next
Conn.Close
set conn = nothing
else
Conn.Close
set conn = nothing
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.MapPath("kort.mdb")
conn.Open DSNtemp
sqlstmt = "SELECT * FROM kort WHERE nafn1 = "
sqlstmt = sqlstmt & "'" & anafn1 & "'"
sqlstmt = sqlstmt & " AND pass = "
sqlstmt = sqlstmt & apass
sqlstmt = sqlstmt & " ORDER BY id DESC;"
'rs.Open sqlstmt,conn,3,3
set rs = conn.Execute(sqlstmt)
id = rs("id")
Conn.Close
Set conn = nothing
dim mailbody
scriptname = Request.servervariables("script_name")
scriptname = Replace(scriptname,"skrifa.asp","skoda.asp")
scriptname = "http://" & request.servervariables("server_name") & scriptname
mailbody = anafn2 & " has sent you a postcard" & Vbcrlf & vbcrlf
mailbody = mailbody & "You can pick your postcard up at the address :" & vbcrlf
mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass
mailbody = mailbody & vbcrlf & vbcrlf
mailbody = mailbody & "Or visit " & scriptname & vbcrlf
mailbody = mailbody & "And enter" & vbcrlf
mailbody = mailbody & "Postcard Id = " & id & vbcrlf
mailbody = mailbody & "Postcard Password = " & apass & vbCrlf & vbcrlf
mailbody = mailbody & "Written by Sakki - http://www.welcome.to/sakki"
blabla = "Postcard from " & anafn2
'Response.Write mailbody
set SMTP=Server.CreateObject("Jmail.Message")
SMTP.ServerAddress= mailserver
SMTP.Sender=anetfang2
SMTP.AddRecipient anetfang1
SMTP.Subject=blabla
SMTP.Body=mailbody
SMTP.Execute
%>
</head>
<body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff">
<b>
Thank you !!<br>
Postcard has been sent to : <a href="mailto:<%= anetfang1 %>"><%= anafn1 %></a><br>
Sender is : <a href="mailto:<%= anetfang2 %>"><%= anafn2 %></a><br>
<BR><A href="javascript:history.go(-3)">Back</A>
<%
end if
end if
%>
</body>
</html>

viu esse server é gratis num é?????????

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...