Zihin Geliştirme Merkezi

KOOLPA

Zihin Geliştirme Merkezi

 

ziyaretçi defteri kodları

 Programlama Katagorisinde ve  Asp,Perl,Php,Html Forumunda Bulunan  ziyaretçi defteri kodları Konusunu Görüntülemektesiniz.=>Bu kodlar ile istediğiniz sayfayı ziyaretçinizin arkadaşına tavsiye etmesini sağlayabilirsiniz. <H3>Tavsiye </H3> <% Dim objCDONTS Dim strFromName Dim strFromEmail, strToEmail ...


Geri git   Zihin Geliştirme Merkezi > KooLpa Webmaster / Grafik / Programlama > Programlama > Asp,Perl,Php,Html

Üye ol Bloglar Yardım Üye Listesi Ajanda Forumları Okundu Kabul Et

Cevapla

 

LinkBack Seçenekler Stil
Alt 31-05-2007, 20:06   #1 (permalink)
KooooLpa
 
pReNsEs - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Dec 2006
Mesajlar: 2,639
Tecrübe Puanı: 7 pReNsEs is on a distinguished road
Arrow ziyaretçi defteri kodları


Bu kodlar ile istediğiniz sayfayı ziyaretçinizin arkadaşına tavsiye etmesini sağlayabilirsiniz.

<H3>Tavsiye </H3>
<%
Dim objCDONTS
Dim strFromName
Dim strFromEmail, strToEmail
Dim strSubject, strBody
Dim strThisPage
Dim strReferringPage
Dim bValidInput

strThisPage = Request.ServerVariables("SCRIPT_NAME")
strReferringPage = Request.ServerVariables("HTTP_REFERER")

' Debugging lines:
'Response.Write strThisPage & "<BR>" & vbCrLf
'Response.Write strReferringPage & "<BR>" & vbCrLf

' Read in and set the initial values of our message parameters
strFromName = Trim(Request.Form("txtFromName"))
strFromEmail = Trim(Request.Form("txtFromEmail"))
strToEmail = Trim(Request.Form("txtToEmail"))
strSubject = "Check out ASP 101!"
strBody = Trim(Request.Form("txtMessage"))


' I set the body message to a message that referenced the page the
' user arrived from. This makes it great if you place a link to it
' from your different articles, but can be weird if people link in
' from other web sites.
If strBody = "" Then
If strReferringPage = "" Or InStr(1, strReferringPage, "www.prowww.net", 1) = 0 Then
strBody = ""
strBody = strBody & "Bu site harika bir site.Mutlaka gez..." & vbCrLf
strBody = strBody & vbCrLf
strBody = strBody & " http://www.prowww.net" & vbCrLf
Else
strBody = ""
strBody = strBody & "Bu siteyi mutlaka gezmelisin" & vbCrLf
strBody = strBody & vbCrLf
strBody = strBody & " " & strReferringPage & vbCrLf
End If
End If

' Quick validation just to make sure our parameters are somewhat valid
bValidInput = True
bValidInput = bValidInput And strFromName <> ""
bValidInput = bValidInput And IsValidEmail(strFromEmail)
bValidInput = bValidInput And IsValidEmail(strToEmail)

' If valid send email and show thanks, o/w show form
If bValidInput Then
' Set up our email object and send the message
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.From = strFromName & " <" & strFromEmail & ">"
objCDONTS.To = strToEmail
objCDONTS.Subject = strSubject
objCDONTS.Body = strBody
objCDONTS.Send
Set objCDONTS = Nothing

' Show our thank you message
ShowThanksMsg
Else
If "http://" & Request.ServerVariables("HTTP_HOST") & strThisPage = strReferringPage Then
Response.Write "Lutfen bos alan birakmayin.Mail adreslerini dogru yazin" & "<BR>" & vbCrLf
End If
' Show our information retrieval form
ShowReferralForm strThisPage, strFromName, strFromEmail, strToEmail, strBody
End If
' End of page logic... subs and functions follow!
%>


<%
' Subroutines and Functions that encapsulate some functionality
' and make the above code easier to write... and read.

' A quick email syntax checker. It's not perfect,
' but it's quick and easy and will catch most of
' the bad addresses than people type in.
Function IsValidEmail(strEmail)
Dim bIsValid
bIsValid = True

If Len(strEmail) < 5 Then
bIsValid = False
Else
If Instr(1, strEmail, " ") <> 0 Then
bIsValid = False
Else
If InStr(1, strEmail, "@", 1) < 2 Then
bIsValid = False
Else
If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then
bIsValid = False
End If
End If
End If
End If

IsValidEmail = bIsValid
End Function

' I made this a function just to get it out of the
' logic and make it easier to read. It just shows the
' form that asks for the input
Sub ShowReferralForm(strPageName, strFromName, strFromEmail, strToEmail, strBody)
' I use script_name so users can rename this script witout having to change the code.
%>
<FORM ACTION="<%= strPageName %>" METHOD="post" name=frmReferral>
<TABLE BORDER="0">
<TR>
<TD VALIGN="top" ALIGN="right"><STRONG>Adiniz:</STRONG></TD>
<TD><INPUT TYPE="text" NAME="txtFromName" VALUE="" SIZE="30"></TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="right"><STRONG>Sizin Mailiniz:</STRONG></TD>
<TD><INPUT TYPE="text" NAME="txtFromEmail" VALUE="" SIZE="30"></TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="right"><STRONG>Arkadasinizin Maili:</STRONG></TD>
<TD><INPUT TYPE="text" NAME="txtToEmail" VALUE="" SIZE="30"></TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="right"><STRONG>Mesaj:</STRONG></TD>
<TD><TEXTAREA NAME="txtMessage" COLS="50" ROWS="5" WRAP="virtual" READONLY></TEXTAREA>
</TR>
<TR>
<TD></TD>
<TD><INPUT TYPE="reset" VALUE="SİL" name=rstReferral> <INPUT TYPE="submit" VALUE="GÖNDER" name=subReferral></TD>
</TR>
</TABLE>
</FORM>
<%
'<P>The Message to be sent:</P>
'<P><B>Subject:</B> < %= strSubject % ></P>
'<P><B>Body:</B> < %= strBody % ></P>
End Sub

' This just shows our thank you message... probably didn't d to
' be a function, but since I made the form one I figured I'd do this
' for consistency.
Sub ShowThanksMsg()
%>
<P></P>
<%
End Sub
__________________
pReNsEs isimli üyemiz çevrimdışıdır. (Offline)  
Digg this Post!Add Post to del.icio.usStumble this Post!Reddit!Google Bookmark this Post!Live Bookmark this Post!Propeller this post!
Alıntı ile Cevapla

Sponsor Linkler
Cevapla


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)

 
Seçenekler
Stil

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Benzer Konular

Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Online Ziyaretçi Saysı efe Asp,Perl,Php,Html 0 20-01-2008 04:56
ziyaretçi sayısını öğrenmek için..(kod) pReNsEs Asp,Perl,Php,Html 0 31-05-2007 20:38
Ziyaretçi uğurlama mesajı pReNsEs Asp,Perl,Php,Html 0 31-05-2007 19:32
MSN Spaces Alanınıza Ziyaretçi Defteri Eklemek İster Misiniz? lifeandeath Msn,Icq,Yahoo Messenger Yardım 0 17-03-2007 12:56
Not Defteri 1.1 KöTü KeDi ŞeRaFeTTiN Eğitim Programları 0 23-02-2007 19:07


Bütün Zaman Ayarları WEZ +3 olarak düzenlenmiştir. Şu Anki Saat: 05:40 .


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

Gizlilik Politikası | KooLpa üyeleri onay gerektirmeksizin mesaj yazabilmektedir. KooLpa' da yasalara aykırı unsurlar bulursanız buraya yazınız. En kısa zamanda gereği yapılacaktır.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206