Restaurante 'Valparaiso' - Mijas (Malaga-Costa del Sol)-SPAIN - (Tel.: 0034-952 48 59 96)
<%
' BEGIN MOBILE PHONE CHECK
' ========================
Dim user_agent, mobile_browser, Regex, match, mobile_agents, mobile_ua, i, size
user_agent = Request.ServerVariables("HTTP_USER_AGENT")
mobile_browser = 0
Set Regex = New RegExp
With Regex
.Pattern = "(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|windows ce|pda|mobile|mini|palm)"
.IgnoreCase = True
.Global = True
End With
match = Regex.Test(user_agent)
If match Then mobile_browser = mobile_browser+1
If InStr(Request.ServerVariables("HTTP_ACCEPT"), "application/vnd.wap.xhtml+xml") Or Not IsEmpty(Request.ServerVariables("HTTP_X_PROFILE")) Or Not IsEmpty(Request.ServerVariables("HTTP_PROFILE")) Then
mobile_browser = mobile_browser+1
end If
' // Now you're going through the list of devices,
' // this is an array so as time moves on, just add
' // more that come to the marketplace into here
mobile_agents = Array("alcatel", "amoi", "android", "avantgo", "blackberry", "benq", "cell", "cricket", "docomo", "elaine", "htc", "iemobile", "iphone", "ipad", "ipaq", "ipod", "j2me", "java", "midp", "mini", "mmp", "mobi", "motorola", "nec-", "nokia", "palm", "panasonic", "philips", "phone", "sagem", "sharp", "sie-", "smartphone", "sony", "symbian", "t-mobile", "telus", "up\.browser", "up\.link", "vodafone", "wap", "webos", "wireless", "xda", "xoom", "zte")
size = Ubound(mobile_agents)
mobile_ua = LCase(Left(user_agent, 4))
' // You've previously set mobile_browser as 0,
' // now loop through the array set above and
' // if one or more is matched, add 1 to this variable
For i = 0 To size
If mobile_agents(i) = mobile_ua Then
mobile_browser = mobile_browser+1
Exit For
End If
Next
' // Check that full website has not been requested
' // (you can have a link in the page for this like:
' // View Full Site
If request.querystring("v")="full" then session("fullsite")=true
' // Check to see if the var mobile_browser is greater
' // than 0, if so it's a mobile device, act accordingly.
If mobile_browser>0 and session("fullsite")=false then
' // redirect the user to a mobile appropriate page you've written
response.redirect(""& url &"/mobile")
End If
' END MOBILE PHONE SCRIPT
' =======================
%>
Closed & For Sale - Cerrado y en venta (Tel.: [0034] 639 81 55 85)
<%
conn=StrAdminProvider
sqltext = "select nombre from clientes WHERE birth_day=" & day(date) & " AND birth_month=" & month(date) & ""
Set rs=Server.CreateObject("ADODB.Recordset")
'response.write sqltext
rs.open sqltext, conn
if rs.eof then
else
do until rs.eof
response.write "" & " " & rs("nombre") & " "
rs.movenext
loop
end if
%>
<%
' show TripAdvisor Logo & Certificate
if session("lang")="es" then
''' espanol
%>
<% else
if session("lang")="en" then
%>
<% else
if session("lang")="de" then
%>
<% if request.querystring("mailinglist")="yes" then
response.write ""
else
%>
<% end if %>
<% =life_music_daily %>
<% =new_events %>
<% if session("lang")="en" OR session("lang")="fr" OR session("lang")="ru" OR session("lang")="ar" OR session("lang")="es" OR session("lang")="de" then %>
<% ' here was the weekly program %>
<% else
end if %>
Press REVIEWS
<% =right_table_header %>
<%
xdate=Year(Now) & "-" & month(Now) & "-" & Day(Now)-1
' database connection
conn=StrAdminProvider
'sqltext = "select * from events_big WHERE active='yes' ORDER by event_date ASC"
sqltext22 = "select * from events_big WHERE active='yes' AND event_date > '" & xdate & "' ORDER by event_date ASC"
sqltext22 = "select * from events_big WHERE active='yes' AND event_date > '" & xdate & "' ORDER by event_date ASC LIMIT 5"
Set rs=Server.CreateObject("ADODB.Recordset")
'response.write sqltext22
rs.open sqltext22, conn
'response.end
if rs.eof then
response.write "No hay enlaces en la base de datos"
response.end
else
do until rs.eof
if rs("event_date")<>"" then
request_datum=rs("event_date")
xdatum=rs("event_date")
' the date here has to be mm/dd/yyy to show correct day of the week
xdatum=day(xdatum)&"/"&month(xdatum)&"/"&year(xdatum)
weekdaynumber=Weekday(xdatum)
xwochentag = WeekdayName(weekdaynumber)
anzeigedatum=day(xdatum)&"/"&month(xdatum)&"/"&year(xdatum)
else
end if
%>
<% 'Create Our ServerVariables and Store them to a variable %>
<% 'Create Our ServerVariables and Store them to a variable %>
<% site = Request.ServerVariables("HTTP_REFERER")%>
<% ip = Request.ServerVariables("REMOTE_ADDR")%>
<% host = Request.ServerVariables("REMOTE_HOST")%>
<% strNothing = "Unknown"
thehour=Hour(now) + 7 ' Here we will add 6 to hour in server
if thehour>12 then
thehour=thehour-12
end if
Theminute=minute(now)
if Theminute<10 then
Theminute="0" & Theminute
end if
Thesecond=second(now)
if Thesecond<10 then
Thesecond="0" & Thesecond
end if
local_time=thehour & ":" & Theminute & ":" & Thesecond
%>
<%
'Create a connection to our database
conn = strImageProvider
Set rst = Server.CreateObject("ADODB.Recordset")
sqltext = "INSERT into besucher (site,ip,host,date) VALUES ('" & site & "','" & ip & "','" & kost & "','" & date() & "')"
rst.Open sqltext,conn
%>
<%
' ----------------------- Besucher zählen -----------------------
'Create a connection to our database
'conn = strImageProvider
Set rs = Server.CreateObject("ADODB.Recordset")
sqltext = "select * FROM besucher"
rs.Open sqltext,conn
strCount = 0
If NOT rs.EOF AND NOT rs.BOF then
while not rs.eof
strCount = strCount + 1
rs.MoveNext
Wend
end if
rs.close
set rs = nothing
response.write "
" & visitor & strCount+25000 & "
"
response.write ""
%>
<%
zahl=0
conn = StrAdminProvider
Set rs2=Server.CreateObject("ADODB.Recordset")
Stmt2="select diners from reservations"
'response.write Stmt2
rs2.open Stmt2, conn
if rs2.eof then
else
do until rs2.eof
diners=rs2("diners")
zahl=zahl+diners
rs2.movenext
loop
end if
response.write "Online bookings: " & zahl
%>
<%
' BIRTHDAY WISHES
birth_day2= (day(date()))
birth_month2= (month(date()))
response.write "|" & (day(date()))
response.end
' send birthday wishes
conn = StrAdminProvider
Set rs2=Server.CreateObject("ADODB.Recordset")
' the brithday is in the db as character
' Cint converts character to number
Stmt2="select * from clientes WHERE birth_day='"& birth_day2 & "' AND birth_month ='"& birth_month2 & "' AND birthdaywishes_sent<>'"&year(date())&"'"
response.write Stmt2
rs2.open Stmt2, conn
if rs2.eof then
else
do until rs2.eof
'response.write "Apellidos:"&rs2("apellidos")
id_birthdaychild=rs2("id")
nombre=rs2("nombre")
apellidos=rs2("apellidos")
birthday_email=rs2("email")
%>
<%
' adapt bithday sent - this year
Set rs4=Server.CreateObject("ADODB.Recordset")
SQL4="update clientes SET birthdaywishes_sent = "&year(date())&" "
SQL4=SQL4 & " WHERE id=" & id_birthdaychild
'response.write sql4
rs4.open SQL4, conn
rs2.movenext
loop
end if
%>
<%
' ANNIVERASRY INVITATIONS
zdate=year(date())&"-"&month(date())&"-"&(day(date()-7))
zdate=CDate(Left(year(date())&"-"&month(date())&"-"&(day(date())),10))
' 7 Tage vom Datum abziehen
zdate=DateAdd("d", -7, zdate)
if len(day(zdate))=1 then
tag="0" & day(zdate)
else
tag=day(zdate)
end if
if len(month(zdate))=1 then
monat="0" & month(zdate)
else
monat=month(zdate)
end if
zdate=year(zdate)&"-"&monat&"-"&tag
'zdate=Date(Date(zdate,"YYYYMMDD")+7,"YYYYMMDD")
'zdate=DateAdd(zdate, interval 7 days)
'zdate=DateTime.zdate.AddDays(7).ToShortDateString()
'zdate=zdate.AddDays(-7)
'zdate=date(zdate)+7
' send birthday wishes
conn = StrAdminProvider
Set rs2=Server.CreateObject("ADODB.Recordset")
' the brithday is in the db as character
' Cint converts character to number
Stmt2="select * from reservations WHERE xdate='"&zdate&"' AND reservation='6' AND anniversarywishes_sent<>'"& (year(date())) & "' AND left(xdate,4)<>'"& (year(date())) & "'"
response.write Stmt2
rs2.open Stmt2, conn
if rs2.eof then
else
do until rs2.eof
response.write "Apellidos:"&rs2("apellidos")
id_birthdaychild=rs2("id")
nombre=rs2("nombre")
apellidos=rs2("apellidos")
birthday_email=rs2("email")
anniversary_date=rs2("xdate")
anniversary_date=day(anniversary_date)&"-"&month(anniversary_date)&"-"&year(anniversary_date)
%>
<%
' adapt bithday sent - this year
Set rs4=Server.CreateObject("ADODB.Recordset")
SQL4="update reservations SET anniversarywishes_sent = " & year(date()) & " "
SQL4=SQL4 & " WHERE id=" & id_birthdaychild
'response.write sql4
rs4.open SQL4, conn
rs2.movenext
loop
end if
%>