scripten er her...
<%
\' *******************************************************************************************
\' * SMS Sender with support for sending multiple messages at one time, allowing one to send *
\' * a long message cut into smaller messages that fit on a mobile phone. Uses a WordWrap *
\' * function to ensure it won\'t cut off in the middle of a word. *
\' * *
\' * v1.1 - Option to use either the JMail or ASPMail SMTP mail component. *
\' * v1.2 - Optional IP, Date/Time, Number sent to and \"from\" logging. *
\' *******************************************************************************************
\' * Eksperten.dk Reference: 38893 *
\' *******************************************************************************************
\' *** SMTP mail component choice ***
\' 0 = JMail
\' 1 = ASPMail
intMailer = 0 \' Default: 0 - JMail
\' *** Logging function setting ***
\' NOTE: Requires access to the FileSystemObject and that there is writing rights in the directory
\' where this script resides.
intLog = True \' Default: True
\' *** SMTP server & afsender mail instillinger ***
trSMTP = \"mail.web-zone.dk\" \' SMTP server
strAfs = \"webmaster@web-zone.dk\" \' En gyldig POP3 konto
\' *** Variables passed by submission of form *** {DO NOT ALTER}
strNummer = Request(\"nummer\")
strFra = Request(\"fra\")
strBesked = Request(\"besked\")
\' *** Script name w/o extension ***
strScriptName = Request.ServerVariables(\"SCRIPT_NAME\")
strScriptName = Right(strScriptName, Len(strScriptName) - InStrRev(strScriptName, \"/\"))
strScriptName = Left(strScriptName, Len(strScriptName) - 4)
Function Wrap(ByVal Text, ByVal WrapChar, ByVal WrapAt)
\' *****************************************************************************************************
\' * WordWrap v1.2 - WordWraps a string off as near as possible to the specified max character amount *
\' * By Thomas Daugaard, December 11th, 2000. *
\' * *
\' * Arguments: Text : The string to wordwrap *
\' * WrapChar : A string specifying how/with what to wrap the string. Default is <br> *
\' * WrapAt : Numeric value specifying the maximum amount of characters allowed in a *
\' * string. Wraps backwards in the string to ensure that the max value is meet. *
\' * *
\' * Note: Arguments are passed By Value, not reference. *
\' *****************************************************************************************************
Text = Trim(CStr(Text))
If Len(Text) =< WrapAt Or Len(Text) = 0 Or InStr(Text, \" \") = 0 Then Wrap = \"\" & Text: Exit Function
If Len(WrapChar) = 0 Then WrapChar = \"<br>\"
Do
If Len(Text) < WrapAt Then strFinal = strFinal & Text: Exit Do
strPart = Left(Text, WrapAt): intOff = WrapAt
If Not Right(strPart, 1) = \" \" Then
intOff = InStrRev(strPart, \" \")
If intOff = 0 Then intOff = InStr(Text, WrapAt, \" \")
If intOff = 0 Then strPart = Text
End If
strPart = Left(Text, intOff)
Text = Right(Text, Len(Text) - Len(strPart))
strFinal = strFinal & strPart & WrapChar
Loop
Wrap = strFinal
End Function
If Len(strNummer) > 0 And Len(strFra) > 0 And Len(strBesked) > 0 Then
strTeleDK = \"@sms.tdm.dk\"
strSonofon = \"@note.sonofon.dk\"
strTelia = \"@gsm1800.telia.dk\"
strMobilix = \"@sms.mobilix.dk\"
bolValid = False
If Len(strNummer) = 8 And IsNumeric(strNummer) Then
If CInt(Left(strNummer, 4)) > 2010 Then
If CInt(Left(strNummer, 4)) => 2010 And CInt(Left(strNummer, 4)) =< 2059 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 2060 And CInt(Left(strNummer, 4)) =< 2099 Then strDom = strSonofon
If CInt(Left(strNummer, 4)) => 2110 And CInt(Left(strNummer, 4)) =< 2199 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 2210 And CInt(Left(strNummer, 4)) =< 2299 Then strDom = strSonofon
If CInt(Left(strNummer, 4)) => 2310 And CInt(Left(strNummer, 4)) =< 2399 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 2610 And CInt(Left(strNummer, 4)) =< 2699 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) => 2810 And CInt(Left(strNummer, 4)) =< 2899 Then strDom = strTelia
If CInt(Left(strNummer, 4)) => 3010 And CInt(Left(strNummer, 4)) =< 3689 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 3690 And CInt(Left(strNummer, 4)) =< 3309 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) => 3810 And CInt(Left(strNummer, 4)) =< 4049 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 4050 And CInt(Left(strNummer, 4)) =< 4099 Then strDom = strSonofon
If CInt(Left(strNummer, 4)) => 4320 And CInt(Left(strNummer, 4)) =< 4679 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) => 4690 And CInt(Left(strNummer, 4)) =< 4709 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) => 4710 And CInt(Left(strNummer, 4)) =< 4979 Then strDom = strTeleDK
If CInt(Left(strNummer, 4)) = 6910 Or CInt(Left(strNummer, 4)) = 6911 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) = 6912 Or CInt(Left(strNummer, 4)) = 6966 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) => 6960 And CInt(Left(strNummer, 4)) =< 6964 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) = 6969 Or CInt(Left(strNummer, 4)) = 6996 Then strDom = strMobilix
If CInt(Left(strNummer, 4)) => 6980 And CInt(Left(strNummer, 4)) =< 6989 Then strDom = strMobilix
If strDom > \"\" Then
strFra = \"(\" & strFra & \") \"
intSubtract = Len(strFra) + Len(srtAfs) + 24
intMsgSize = (160 - intSubtract)
If intMailer = 0 Then
Set JMail = Server.CreateObject(\"JMail.SMTPMail\")
JMail.ServerAddress = strSMTP
JMail.Sender = strAfs
JMail.AddRecipient (strNummer & strDom)
Else
Set ASPMail = Server.CreateObject(\"SMTPsvg.Mailer\")
ASPMail.RemoteHost = strSMTP
ASPMail.FromAddress = strAfs
ASPMail.AddRecipient \"\", (strNummer & strDom)
End If
If Len(strBesked) > intMsgSize then
strWrapped = Split(Wrap(strBesked, \"|\", intMsgSize), \"|\")
For Index = 0 To UBound(strWrapped)
Select Case intMailer
Case 0: JMail.Body = strFra & strWrapped(Index): JMail.Execute
Case 1: ASPMail.BodyText = strFra & strWrapped(Index): ASPMail.SendMail
End Select
Next
intMsgSize = UBound(strWrapped) + 1
Else
Select Case intMailer
Case 0: JMail.Body = strFra & strBesked: JMail.Execute
Case 1: ASPMail.BodyText = strFra & strBesked: ASPMail.SendMail
End Select
intMsgSize = 1
End If
Set JMail = Nothing
bolValid = True
Select Case (intMsgSize > 1)
Case True: strSendt = \"<font face=\'Tahoma\' size=2 color=#008000>Din besked blev sendt af <b>\" & intMsgSize & \"</b> SMS´er til <b>\" & strNummer & \"</b>.</font>\"
Case False: strSendt = \"<font face=\'Tahoma\' size=2 color=#008000>Din besked blev sendt til <b>\" & strNummer & \"</b>!</font>\"
End Select
Else
strSendt = \"<font face=\'Tahoma\' size=2 color=#800000>Beskeden kunne ikke sendes da det indtastede tlf.<br>nummer ikke er et gyldigt mobil nummer!</font>\"
End If
Set fsoSystem = Server.CreateObject(\"Scripting.FileSystemObject\")
Set fsoFile = fsoSystem.OpenTextFile(Server.MapPath(strScriptName & \".log\"), 8, True)
fsoFile.WriteLine \"At \" & Now & \" a message to \" & strNummer & \" (\" & Len(strBesked) & \" chars long) was sent by \" & strFra & \" (\" & Request.ServerVariables(\"REMOTE_ADDR\") & \")\"
fsoFile.Close
Set fsoFile = Nothing
Set fsoSystem = Nothing
strBesked = \"\"
strNummer = \"\"
strFra = \"\"
End If
End If
End If
%>
<html>
<head>
<title>Send SMS</title>
<script language=\"JavaScript\">
<!--
function showleft() {
document.frmSms.count.value=800-(document.frmSms.besked.value.length+document.frmSms.fra.value.length);
}
function checklength() {
if (document.frmSms.besked.value.length+document.frmSms.fra.value.length > 800) {
alert(\"Din besked må max. være på 800 tegn!\");
document.frmSms.besked.focus();
return (false);
} else if (document.frmSms.nummer.value.length !=8) {
alert(\"Du skal skrive et gyldigt 8-cifret tlf. nummer!\");
document.frmSms.nummer.focus();
return (false);
} else if (document.frmSms.fra.value.length == 0) {
alert(\"Du skal skrive et afsender navn/tlf. nummer!\");
document.frmSms.fra.focus();
return (false);
}
return (true)
}
-->
</script>
</head>
<body bgcolor=\"#FFFFFF\">
<center>
<p><a href=\"
http://www.web-zone.dk/2001/\" target=\"_blank\"><img src=\"test1.gif\" width=\"468\" height=\"60\" border=\"0\" align=\"top\"></a>
</p>
<table width=\"75%\" border=\"1\">
<tr>
<td valign=\"top\" align=\"left\">
<center>
<form method=\"post\" action=\"<%=strScriptName%>.asp\" name=\"frmSms\" onSubmit=\"return checklength();\">
<table border=0 cellspacing=0 cellpadding=5 bgcolor=#ffffff>
<tr>
<td align=\"center\"><font face=\"Tahoma\" size=4><b>SendSMS</b></font></td>
</tr>
<tr>
<td>
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr>
<td valign=\"top\" align=\"left\" colspan=4> </td>
</tr>
<tr>
<td valign=\"top\" align=\"left\">
<p align=\"center\"><font face=\"Tahoma\" size=2>Tlf nummer:</font>
</td>
<td valign=\"top\" align=\"left\">
<input type=\"text\" name=\"nummer\" size=8 maxlength=8 style=\"font-family: tahoma; size: 8pt;\" value=\"<%=strNummer%>\">
</td>
<td valign=\"top\" align=\"left\">
<p align=\"center\"><font face=\"Tahoma\" size=2>Afsender:</font>
</td>
<td valign=\"top\" align=\"left\">
<input type=\"text\" name=\"fra\" size=10 style=\"font-family: tahoma; size: 8pt;\" onKeyDown=\"showleft();\" value=\"<%=strFra%>\">
</td>
</tr>
<tr>
<td valign=\"top\" align=\"center\" colspan=4>
<textarea rows=5 name=\"besked\" border=0 onKeyDown=\"showleft();\" style=\"font-family: tahoma; size: 8pt; width: 300px;\"><%=strBesked%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=\"top\" align=\"center\">
<input type=\"submit\" value=\"Send\" style=\"position: relative; left: 10px; top: -10px; font-family: tahoma; size: 8pt; color: #008000; font-weight: 700;\" name=\"submit\">
<input type=\"text\" name=\"count\" value=\"800\" style=\"position: relative; left: 111px; top: -10px; font-family: tahoma; size: 8pt; color: #000080; width: 28px;\" readonly>
</tr>
</table>
<%=strSendt%>
</form>
</center>
<p> </p>
</td>
<td valign=\"top\" align=\"left\">
<p><span class=\"small\"><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=27481\"><b><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=27481&style=5\" height=\"1\" width=\"1\"></b></a><b><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=27481\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=24157&style=5\" height=\"1\" width=\"1\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=27510\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=27510&style=5\" height=\"1\" width=\"1\"></a></b></span><b>
Bemærk. </b>Web-Zone.dk logger enhver brug af denne SMS-service.
Dette sker for om nødvendigt at kunne samarbejde med politiet
i de tilfælde hvor denne service benyttes til eksempelvis chikane,
spammer, afsendelse af trusler mv. </p>
<p><b>Web-Zone.dk</b> videregiver normalt aldrig kundeoplysninger til
tredjepart. Politiet kan dog få udleveret sådanne oplysninger,
hvis de har en dommerkendelse. <br>
</p>
</td>
</tr>
</table>
<!-- START PEAKCOUNTER KODE -->
<div align=\"center\"><a target=\"_blank\" href=\"
http://www.peak.dk/cgi-bin/peakcounter/toplist.cgi?id=442\"> <img title=\"PeakCounter\" border=\"0\" src=\"
http://www.peak.dk/grafik/peakcounter1.gif\"></a> <script language=\"JavaScript1.1\">
<!--
url = \"
http://www.peak.dk/cgi-bin/peakcounter/peakcounter.cgi?id=442&from=\";log = document.referrer;
cgi = new Image();
cgi.src = url+escape(log);
// -->
</script>
<!-- SLUT PEAKCOUNTER KODE -->
<!-- HitCounter.nu - start -->
<script src=\"
http://hitserver.hitcounter.nu/show.php?s=251\" type=\"text/javascript\" language=\"JavaScript\"></script>
<noscript><a href=\"
http://www.hitcounter.nu/clickhere.php?s=251\"><img src=\"
http://hitserver.hitcounter.nu/im/im.gif?s=251\" border=0></a></noscript>
<!-- HitCounter.nu - slut -->
<a href=\"
http://www.peak.dk/cgi-bin/topsites/topsites.cgi?ID=jamal\" target=\"_blank\"><img src=\"
http://www.peak.dk/grafik/topsites.gif\" border=0 width=80 height=16 alt=\"Peak´s Top 50\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=24157\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=24157&style=7\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=28075\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=28075&style=7\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=28076\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=28076&style=7\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=28077\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=28077&style=7\"></a><a target=\"_blank\" href=\"
http://www.chart.dk/ref.asp?id=28078\"><img alt=\"chart.dk\" border=\"0\" src=\"
http://cluster.chart.dk/chart.asp?id=28078&style=7\"></a></div></center>
<p> </p>
</body>
</html>