Weather Watcher OCX
Placing this control on a form will allow you to retrieve current weather conditions for any city in the United States.. Based on my Weather Watch Program I submitted yesterday. You can contact me on AOL Instant Messanger, my username is Itchiban J
AI
AI-sammanfattning: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Källkod
Upload '############################################ '# this script ist programmed by Andre Schlinkmeier# '#use it for noncommercial # '#questions to [email protected] # '########################################### <% Function quotes(x) quotes = Replace(x, "'", "''") End Function %> <html> <head> <title>Newsletter</title> <script type="text/javascript"> <!-- function chkFormular() { if(document.user.name.value== "") { alert("Bitte Ihren Namen eingeben !"); document.user.name.focus(); return false; } if(document.user.email.value == "") { alert("Bitte Ihre E-Mail-Adresse eingeben !"); document.user.email.focus(); return false; } if(document.user.email.value.indexOf('@') == -1) { alert("Keine gültige E-MAil Adresse !"); document.user.email.focus(); return false; } } //--> </script> </head> <body> <H2>Newsletter</H2> <% If request.form("Button")="Newsletter" Then '...erst ausfuehren wenn der Button gedrückt wird 'SQL erzeugen sql = "Insert INTO user ( email)" sql = sql & " Values ('" sql = sql & quotes(Request.Form("email")) & "')" '..und an die Datenbank schicken Set conn = Server.CreateObject("ADODB.Connection") '....datenbankverbindung herstellen conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../database/user.mdb") conn.Execute sql Response.Write "E-Mail Adresse gespeichert<br>E-Mail bestätigung wird zugesandt<HR>" conn.Close ' ..daten an email übergeben und ausfuehren. Set conn = Nothing Set Jmail = Server.CreateObject("Jmail.SMTPMail") JMail.ServerAddress = "youremailserver-ip:25" JMail.Sender ="[email protected]" JMail.AddRecipient request.form("email") JMail.Subject = "Newsletter www.yourhost.de" JMail.Body = "In das Newsletterabo aufgenommen" Jmail.Execute Set Jmail = Nothing response.write ("E-Mail gesendet") Else %> E-Mail Adresse eingeben! <Form Method="post" name="user" onSubmit="return chkFormular()"> <table width="" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="left">E-Mail</td> <td align="right"> <input type="text" name="email" size="25" value="[email protected]"> </td> </tr> <br> <td align="left"> </td> <td align="right"> <input type="Submit" name="Button" Value="Newsletter"> </table> </Form> <% %> <% End If %> </body> </html>
Originalkommentarer (3)
Återställd från Wayback Machine