İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

asp tavsiye yardım

yozgatlı

0
İyinet Üyesi
Katılım
4 Aralık 2004
Mesajlar
1,428
Reaction score
0
Konum
yakında.com.tr
selam

elimde şöyle bir tavsiye kodu var bune bir özellik eklememe yardım edermisiniz istedigim olay hangi sayfadan gönderiliyorsa o sayfanın url adresinide göndermesini istiyorum teşekkürler.

PHP:
<!--#include file="headerinc.asp"-->
<%
' #### This script Copyright (c) 2002 dreamcity.cjb.net All Rights Reserved.
' #### You need CDONTS installed to be able to send mail
' #### Your sites information starts here ####
' Email Subject
EmailSubject="Check out this website!!"
' Footer Messages sent with each email
EmailFooter1="This message was sent to you by a vistor to our site at:"
EmailFooter2="www.sizinsiteniz.com"
EmailFooter3="Where everything is great!"

' Sitenizden birisi tavsiyede bulunursa sizede mail gelmesişni istermisiniz? YES or NO
WebmasterMail="YES"
' Lütfen aşağıya geçerli bir mail adresi girin.
sYourEmail="[email protected]"

' Heading font color
FontColor="#5e007f"
' Heading Background Color
HeadColor="#ffc500"
' Form Font Color
FormFontColor="#ffc500"
' Form Background Color
FormBackColor="#5e007f"
'Error Message Color
ErrorColor="red"
' Burayı kendinize göre düzenleyin...
' ####################################################################################

Function ValidateField(sFieldValue, sFieldType)
Dim bFieldIsOkay, Email, Friend, Message
bFieldIsOkay = true
Select Case LCase(sFieldType)
Case "uemail"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
		Case "name"
		If Len(sFieldValue) = 0 Then bFieldIsOkay = False
		Case "fname"
		If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "email"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
Case "message"
If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "else"
bFieldIsOkay = False
End Select
ValidateField = bFieldIsOkay
End Function
Sub ShowFormField(Bert)
%>
<center><form action="<%= Request.ServerVariables("Script_Name") %>" METHOD="post">
<table border="0" CELLSPACING="0" WIDTH="230">
<tr bgcolor="<%=HeadColor%>"><td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>
  İsminiz:</B> </td></tr>
<tr><td><input name="name" TYPE="text" VALUE="<%= Request.Form("name") %>" size="40" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"></INPUT></td>
</tr><tr><td><%
		If dictFields(LCase("name")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>İsminizi girmediniz</font>"
	Else		
		Response.Write " "
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>"><td align="left"><b>
  <font face="verdana,arial,sans-serif" size="-1">Mail Adresiniz</font></b><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>:</B> </td></tr>
<tr><td><input name="uemail" TYPE="text" VALUE="<%= Request.Form("uemail") %>" size="40" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"></INPUT></td>
		</tr><tr><td><%
		If dictFields(LCase("uemail")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>Mail adresinizi girmediniz..</font>"
	Else		
		Response.Write " "
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>"><td align="left"><b>
  <font face="verdana,arial,sans-serif" size="-1">Arkadaşınızın İsmi:</font></b><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"> </td></tr><tr><td><input name="fname" TYPE="text" VALUE="<%= Request.Form("fname") %>" size="40" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"></INPUT></td>
</tr>
<tr><td><%
		If dictFields(LCase("fname")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>lütfen arkadaşınızın ismini girin</font>"
	Else		
		Response.Write " "
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>"><td align="left"><b>
  <font face="verdana,arial,sans-serif" size="-1">Arkadaşınızın Mail Adresi</font></b><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>:</B> </td></tr><tr><td><input name="email" TYPE="text" VALUE="<%= Request.Form("email") %>" size="40" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"></INPUT></td>
</tr>
<tr><td><%
		If dictFields(LCase("email")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>lütfen geçerli bir mail adresi girin</font>"
	Else		
		Response.Write " "
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>"><td align="left"><b>
  <font face="verdana,arial,sans-serif" size="-1">Mejazınız</font></b><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>:</B> </td></tr>
</tr><tr><td><TEXTAREA NAME="message" WRAP=VIRTUAL COLS="40" ROWS="6" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"><%= Request.Form("message") %></TEXTAREA></td><tr><td><%
		If dictFields(LCase("message")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2> mesajınızı girmediniz</font>"
	Else		
		Response.Write " "
		End If
%>
</td></tr></table><p><INPUT TYPE="submit" VALUE="<Yolla>"></INPUT></FORM><P>
<%
End Sub
Sub Send
sPunterFriend = Request.Form("name")
sPunterEmail = Request.Form("uemail")
fName = Request.Form("fname")
femail= Request.Form("email")
Message = Request.Form("message")

sSubject = "Check out all this Free Stuff"
sMessage = "Dear " & fName & vbcrlf _
        & "We received a message from your friend " & sPunterFriend & " ( " & sPunterEmail & " ) which said:" & vbcrlf _
		& vbcrlf _
		& Message & vbcrlf _
		& vbcrlf _
		& "_____________________________________________ " & vbcrlf _
		& EmailFooter1 & vbcrlf _
		& EmailFooter2 & vbcrlf _
		& EmailFooter3 & vbcrlf
		
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, femail, EmailSubject, sMessage
Set objNewMail = Nothing
If WebmasterMail="YES" then
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, sYourEmail, EmailSubject, sMessage
Set objNewMail = Nothing
End IF
Response.Write sPunterEmail
End Sub
Dim Field
Dim dictFields
Set dictFields = Server.CreateObject("Scripting.Dictionary")
For Each Field in Request.Form
If ValidateField(Request.Form(Field), Field) = False Then
dictFields.Add LCase(Field), true
End If
Next
If Request.Form.Count <> 0 And dictFields.Count  = 0 Then
%><%
Else
ShowFormField("Bert")
End If
%><!--#include file="footerinc.asp"-->
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst