<%
'send the right MIME type
Response.ContentType = "text/vnd.wap.wml"%><?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "
http://www.wapforum.org/DTD/wml_1.1.xml"> <wml>
<!--include file="../common/template.txt"-->
<%
dag = request.querystring("dag")
%>
<card id="bands" title="Login">
<p>
<fieldset title="login">
Begge felter skal udfyldes.<br/>
<% If(strMobilStatus=1 OR strPasswordStatus=1) Then %>
Tegnet - betyder at du ikke har udfyldt dette felt korrekt.<br/>
<% End If %>
<% If(strMobilStatus=1) Then %>- <% End If %>Mobil: <input type="text" format="*N" name="mobil"/>
<% If(strPasswordStatus=1) Then %>- <% End If %>Password: <input type="password" format="*N" name="password"/>
</fieldset>
<anchor>Ok<go href="checkLogin.asp?txtMobil=$(mobil)&txtPassword=$(password)"/><br /></anchor>
<anchor>Tilbage til forsiden<go href="default.asp"/></anchor>
</p>
</card>
</wml>
Her kommer siden som du poster til:
<%
'send the right MIME type
Response.ContentType = "text/vnd.wap.wml"%><?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "
http://www.wapforum.org/DTD/wml_1.1.xml"> <%
strMobil = Request.Querystring("txtMobil")
strPassword = Request.Querystring("txtPassword")
If(strMobil<>"") Then
set conn = server.createobject("ADODB.Connection")
conn.connectionstring = "DRIVER=SQL Server;Server=192.168.1.6;uid=sa;pwd=;database=tips"
conn.Open
set rs = Conn.execute("select * from users WHERE vc_mobil = " & strMobil)
End If
%>
<%
If(strMobil<>"") Then
If not rs.eof Then
If(strPassword = rs("vc_password")) Then
' response.Write("Bruger/Pass OK")
' Response.Redirect("logged/default.asp?txtMobil=" & strMobil)
%>
<wml>
<card id="index" ontimer="logged/default.asp?txtMobil=<%= strMobil %>">
<timer value="15"/>
<p>
Checker login...
</p>
</card>
</wml>
<%
Else
%>
<wml>
<card id="index" ontimer="login.asp">
<timer value="50"/>
<p>
Oplysningerne er ikke korrekte...<br/>
Du bliver nu stillet tilbage til login-siden.
</p>
</card>
</wml>
<%
End If
Else
%>
<wml>
<card id="index" ontimer="login.asp">
<timer value="50"/>
<p>
Oplysningerne er ikke korrekte...<br/>
Du bliver nu stillet tilbage til login-siden.
</p>
</card>
</wml>
<%
End If
End If
If(strMobil="") Then
%>
<wml>
<card id="index" ontimer="login.asp">
<timer value="50"/>
<p>
Oplysningerne er ikke korrekte...<br/>
Du bliver nu stillet tilbage til login-siden.
</p>
</card>
</wml>
<%
End If
%>
<%
If(strMobil<>"") Then
conn.Close
set conn = nothing
End If
%>
//>Rune