%
response.expires=0
response.buffer=True
%>
<%
Set melodia=Server.CreateObject("ADODB.Recordset")
Set operador=Server.CreateObject("ADODB.Recordset")
Set alta=Server.CreateObject("ADODB.Recordset")
Set logo=Server.CreateObject("ADODB.Recordset")
Set logosee=Server.CreateObject("ADODB.Recordset")
Set top=Server.CreateObject("ADODB.Recordset")
Set guardar=Server.CreateObject("ADODB.Recordset")
Set tus=Server.CreateObject("ADODB.Recordset")
Set mot=Server.CreateObject("ADODB.Recordset")
Set contar=Server.CreateObject("ADODB.Recordset")
Set mucho=Server.CreateObject("ADODB.Recordset")
Set alias=Server.CreateObject("ADODB.Recordset")
Set rs5=Server.CreateObject("ADODB.Recordset")
Set poli=Server.CreateObject("ADODB.Recordset")
Set rsvs=Server.CreateObject("ADODB.Recordset")
Set rs=Server.CreateObject("ADODB.Recordset")
conexion.open
fecha=now()
Prefix=Request.querystring("Prefix")
Phone=Request.querystring("Phone")
message=Request.querystring("message")
TypeSms=Request.querystring("tipo") 'Standard o Premium
opera=request.querystring("operator")
desde=request.querystring("from")
alertid=request.querystring("alertid")
if ucase(message)="MONITTODOOK" then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','MONITORIZACION','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="MONITTODOOK"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
if len(message) > 30 then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&prefix&"','MENSAJE LARGO','error','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
if desde ="34615404140" then
TypeSms="Standard"
elseif desde="7747" then
TypeSms="7747"
end if
if TypeSms="" then
TypeSms="Premium"
elseif TypeSms="Standard" then
TypeSms="Standard"
elseif TypeSms="Premium" then
TypeSms="Premium"
elseif TypeSms="7747" then
TypeSms="SIETE"
end if
if Ucase(Prefix)="LM" then
essi="LM "
Prefix=left(Request.querystring("Message"),2)
total_mensaje=len(Request.querystring("Message"))-2
Message=right(Request.querystring("Message"),cint(total_mensaje))
IF LEFT(MESSAGE,1)="." or LEFT(MESSAGE,1)="_" or LEFT(MESSAGE,1)="*" or LEFT(MESSAGE,1)="," then
message=right(message,len(message)-1)
end if
else
Message=ucase(Request.querystring("Message"))
if LEFT(MESSAGE,1)="." or LEFT(MESSAGE,1)="_" or LEFT(MESSAGE,1)="*" or LEFT(MESSAGE,1)="," or LEFT(MESSAGE,1)=" " then
message=right(message,len(message)-1)
end if
end if
if ucase(prefix)="POFUTBOL" THEN
message="278606"
elseif ucase(prefix)="POSINTONIA" then
message="278580"
elseif ucase(prefix)="POLARGUERO" then
message="278603"
elseif ucase(prefix)="POLARGERO" then
message="278603"
elseif ucase(prefix)="POPARTIDO" then
message="278579"
elseif ucase(prefix)="POTINA" then
message="278605"
end if
if message="" or message=" " or message=" " or message=" " then
if ucase(prefix)<> "POLI1" or ucase(prefix)<> "POLI2" or ucase(prefix)<> "POLI3"then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','error','"&fecha&"','"&desde&"')"
conexion.execute sqlg
'pedido="Lo sentimos.No hemos reconocido la marca. Envia mucho seguido de un espacio y la marca. ejemplo mucho alcatel"
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
if ucase(prefix)="BAN" then
if isnumeric(message)=true then
prefix="BAN" & left(message,1)
if ucase(prefix)="BAN1" then
sql_mucho="select tono1 from polis40"
pre="tono1"
elseif ucase(prefix)="BAN2" then
sql_mucho="select tono2 from polis40"
pre="tono2"
elseif ucase(prefix)="BAN3" then
sql_mucho="select tono3 from polis40"
pre="tono3"
end if
mucho.open sql_mucho,conexion
if not mucho.eof then
message= mucho(pre)
end if
else
prefix="BAN" & left(message,1)
message=right(message,len(message)-1)
message=replace(message," ","")
end if
end if
if ucase(prefix)="POLI1" then
prefix="POLI"
message="1"
elseif ucase(prefix)="POLI2" then
prefix="POLI"
message="2"
elseif ucase(prefix)="POLI3" then
prefix="POLI"
message="3"
end if
if ucase(prefix)="POLI" or ucase(prefix)="POLY" then
if ucase(prefix)="POLY" then
prefix="POLI"
end if
if isnumeric(message)=true then
message=replace(message," ","")
prefix=prefix & left(message,1)
if ucase(prefix)="POLI1" then
sqlk="select * from titulos_polifonicas where topten=1"
elseif ucase(prefix)="POLI2" then
sqlk="select * from titulos_polifonicas where topten=2"
elseif ucase(prefix)="POLI3" then
sqlk="select * from titulos_polifonicas where topten=3"
end if
mucho.open sqlk,conexion
if not mucho.eof then
message=mucho("cod_cancion")
end if
else
prefix="POLI" & left(message,1)
message=right(message,len(message)-1)
message=replace(message," ","")
end if
end if
'LOGICA LOGONOMBRES COLOR
if ucase(left(message,5))="COLOR" and ucase(left(message,7))<>"COLORES" then
message=request("message")
message=right(message,len(message)-6)
mirarray = split(message, " ")
spa=ubound(mirarray)
for x=0 to spa
res = mirarray(x)
if x<>spa then
ress=ress & " " & res
end if
next
escenario=res
nombre=ress
if left(nombre,1)=" " then
nombre=right(nombre,len(nombre)-1)
end if
if right(nombre,1)=" " then
nombre=left(nombre,len(nombre)-1)
end if
if left(escenario,1)=" " then
escenario=right(escenario,len(escenario)-1)
end if
if right(escenario,1)=" " then
escenario=left(escenario,len(escenario)-1)
end if
sqlin="INSERT INTO act_polifonicas (telefono, nombre, marca, mensajes, fecha,referencia) VALUES ("& phone & ",'"&nombre&"','"&escenario&"',1,GETDATE(),'111000')"
conexion.execute sqlin
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&Prefix&"','"&Message&"','COLOR','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Ahora envia "&prefix&" seguido de un espacio y la marca de tu movil al " &desde & " para activar tu descarga"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
''LOGICA CUŅA DE LOS 40.COM ENTRADA 1 NOKIA cambiar por 40R 1 NO
if desde="7740" then
if prefix="1" or ucase(prefix)="UNO" then
message="1 " & left(message,2)
prefix="40R"
elseif prefix="2" or ucase(prefix)="DOS" then
message="2 " & left(message,2)
prefix="40R"
elseif prefix="3" or ucase(prefix)="TRES" then
message="3 " & left(message,2)
prefix="40R"
elseif prefix="4" or ucase(prefix)="CUATRO" then
message="4 " & left(message,2)
prefix="40R"
elseif prefix="5" or ucase(prefix)="CINCO" then
message="5 " & left(message,2)
prefix="40R"
elseif prefix="6" or ucase(prefix)="SEIS" then
message="6 " & left(message,2)
prefix="40R"
elseif prefix="7" or ucase(prefix)="SIETE" then
message="7 " & left(message,2)
prefix="40R"
elseif prefix="8" or ucase(prefix)="0CHO" then
message="8 " & left(message,2)
prefix="40R"
elseif prefix="9" or ucase(prefix)="NUEVE" then
message="9 " & left(message,2)
prefix="40R"
elseif prefix="10" or ucase(prefix)="DIEZ" then
message="10 " & left(message,2)
prefix="40R"
elseif prefix="11" or ucase(prefix)="ONCE" then
message="11 " & left(message,2)
prefix="40R"
elseif prefix="12" or ucase(prefix)="DOCE" then
message="12 " & left(message,2)
prefix="40R"
elseif prefix="13" or ucase(prefix)="TRECE" then
message="13 " & left(message,2)
prefix="40R"
elseif prefix="14" or ucase(prefix)="CATORCE" then
message="14 " & left(message,2)
prefix="40R"
elseif prefix="15" or ucase(prefix)="QUINCE" then
message="15 " & left(message,2)
prefix="40R"
elseif prefix="16" or ucase(prefix)="DIECISEIS" then
message="16 " & left(message,2)
prefix="40R"
elseif prefix="17" or ucase(prefix)="DIECISIETE" then
message="17 " & left(message,2)
prefix="40R"
elseif prefix="18" or ucase(prefix)="DIECIOCHO" then
message="18 " & left(message,2)
prefix="40R"
elseif prefix="19" or ucase(prefix)="DIECINUEVE" then
message="19 " & left(message,2)
prefix="40R"
elseif prefix="20" or ucase(prefix)="VEINTE" or ucase(prefix)="VENTE" or ucase(prefix)="BEINTE" or ucase(prefix)="BENTE" then
message="20 " & left(message,2)
prefix="40R"
elseif prefix="21" or ucase(prefix)="VENTIUNO" or ucase(prefix)="BENTIUNO" then
message="21 " & left(message,2)
prefix="40R"
elseif prefix="22" or ucase(prefix)="VENTIDOS" or ucase(prefix)="BENTIDOS" then
message="22 " & left(message,2)
prefix="40R"
elseif prefix="23" or ucase(prefix)="VENTITRES" or ucase(prefix)="BENTITRES" then
message="23 " & left(message,2)
prefix="40R"
elseif prefix="24" or ucase(prefix)="VENTICUATRO" or ucase(prefix)="BENTICUATRO" then
message="24 " & left(message,2)
prefix="40R"
elseif prefix="25" or ucase(prefix)="VENTICINCO" or ucase(prefix)="BENTICINCO" then
message="25 " & left(message,2)
prefix="40R"
elseif prefix="26" or ucase(prefix)="VENTISEIS" or ucase(prefix)="BENTISEIS" then
message="26 " & left(message,2)
prefix="40R"
elseif prefix="27" or ucase(prefix)="VENTISIETE" or ucase(prefix)="BENTISIETE" then
message="27 " & left(message,2)
prefix="40R"
elseif prefix="28" or ucase(prefix)="VENTIOCHO" or ucase(prefix)="BENTIOCHO" then
message="28 " & left(message,2)
prefix="40R"
elseif prefix="29" or ucase(prefix)="VENTINUEVE" or ucase(prefix)="BENTINUEVE" then
message="29 " & left(message,2)
prefix="40R"
elseif prefix="30" or ucase(prefix)="TREINTA" or ucase(prefix)="TRENTA" then
message="30 " & left(message,2)
prefix="40R"
elseif prefix="31" or ucase(prefix)="TREINTAYUNO" or ucase(prefix)="TRENTAYUNO" or ucase(prefix)="TRENTAIUNO" or ucase(prefix)="TREINTAIUNO" then
message="31 " & left(message,2)
prefix="40R"
elseif prefix="32" or ucase(prefix)="TREINTAYDOS" or ucase(prefix)="TRENTAYDOS" or ucase(prefix)="TRENTAIDOS" or ucase(prefix)="TREINTAIDOS" then
message="32 " & left(message,2)
prefix="40R"
elseif prefix="33" or ucase(prefix)="TREINTAYTRES" or ucase(prefix)="TRENTAYTRES" or ucase(prefix)="TRENTAITRES" or ucase(prefix)="TREINTAITRES" then
message="33 " & left(message,2)
prefix="40R"
elseif prefix="34" or ucase(prefix)="TREINTAYCUATRO" or ucase(prefix)="TRENTAYCUATRO" or ucase(prefix)="TRENTAICUATRO" or ucase(prefix)="TREINTAICUATRO" then
message="34 " & left(message,2)
prefix="40R"
elseif prefix="35" or ucase(prefix)="TREINTAYCINCO" or ucase(prefix)="TRENTAYCINCO" or ucase(prefix)="TRENTAICINCO" or ucase(prefix)="TREINTAICINCO" then
message="35 " & left(message,2)
prefix="40R"
elseif prefix="36" or ucase(prefix)="TREINTAYSEIS" or ucase(prefix)="TRENTAYSEIS" or ucase(prefix)="TRENTAISEIS" or ucase(prefix)="TREINTAISEIS" then
message="36 " & left(message,2)
prefix="40R"
elseif prefix="37" or ucase(prefix)="TREINTAYSIETE" or ucase(prefix)="TRENTAYSIETE" or ucase(prefix)="TRENTAISIETE" or ucase(prefix)="TREINTAISIETE" then
message="37 " & left(message,2)
prefix="40R"
elseif prefix="38" or ucase(prefix)="TREINTAYOCHO" or ucase(prefix)="TRENTAYOCHO" or ucase(prefix)="TRENTAIOCHO" or ucase(prefix)="TREINTAIOCHO" then
message="38 " & left(message,2)
prefix="40R"
elseif prefix="39" or ucase(prefix)="TREINTAYNUEVE" or ucase(prefix)="TRENTAYNUEVE" or ucase(prefix)="TRENTAINUEVE" or ucase(prefix)="TREINTAINUEVE" then
message="39 " & left(message,2)
prefix="40R"
elseif prefix="L40" or ucase(prefix)="CUARENTA" then
if isnumeric(left(message,1))=true or isnumeric(left(message,2))=true then
message=message
prefix=prefix
else
message="40 " & left(message,2)
prefix="40R"
end if
end if
end if
'/*/*/*/*////////////////////////****************************************////////////////////////*/*/*/*/
'if ucase(prefix)="AS" or ucase(prefix)="LISTA" then
if ucase(prefix)="LISTA" or ucase(prefix)="LOCALIA" or ucase(prefix)="HIMNO" or ucase(prefix)="HINNO" or ucase(prefix)="HIMMO" or ucase(prefix)="HINMO" or ucase(prefix)="DIAL" then
message=replace(ucase(message),"NOKIA","NO")
message=replace(ucase(message),"SIEMENS","SI")
message=replace(ucase(message),"ALCATEL","AL")
message=replace(ucase(message),"PHILIPS","PH")
message=replace(ucase(message),"PILIPS","PH")
message=replace(ucase(message),"MOTOROLA","MO")
message=replace(ucase(message),"SAGEM","SA")
message=replace(ucase(message),"TRUIM","TR")
message=replace(ucase(message),"TRIUN","TR")
message=replace(ucase(message),"MITSUBISHI","MI")
message=replace(ucase(message),"MISUBISHI","MI")
message=replace(ucase(message),"MISUBISI","MI")
message=replace(ucase(message),"ERICSON","ER")
message=replace(ucase(message),"ERICSSON","ER")
message=replace(ucase(message),"ERICCSSON","ER")
message=replace(ucase(message),"MAXON","MA")
message=replace(ucase(message),"SAMSUNG","SA")
end if
''FIN LOGICA CUŅA DE LOS 40
''/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
''///////////////////////////////////////////////////////////////////////////////////
'LISTAMAXIMA
''FIN LOGICA VIDEO DE LA SEMANA y 40 latino
if ucase(prefix)="MAX" then
if left(message,1)="1" or left(message,1)="2" or left(message,1)="3" then
re=left(message,1)
message=right(message,len(message)-1)
prefix="MAX" & re
message=replace(message," ","")
elseif ucase(left(message,3))="UNO" or ucase(left(message,3))="DOS" then
re=left(message,3)
message=right(message,len(message)-3)
prefix="MAX" & re
message=replace(message," ","")
elseif ucase(left(message,4))="TRES" then
re=left(message,4)
message=right(message,len(message)-4)
prefix="MAX" & re
message=replace(message," ","")
end if
end if
if ucase(prefix)="MAXUNO" then
prefix="MAX1"
elseif ucase(prefix)="MAXDOS" then
prefix="MAX2"
elseif ucase(prefix)="MAXTRES" then
prefix="MAX3"
elseif ucase(prefix)="MAX 1" then
prefix="MAX1"
elseif ucase(prefix)="MAX 2" then
prefix="MAX2"
elseif ucase(prefix)="MAX 3" then
prefix="MAX3"
elseif ucase(prefix)="1MAX" then
prefix="MAX1"
elseif ucase(prefix)="2MAX" then
prefix="MAX2"
elseif ucase(prefix)="3MAX" then
prefix="MAX3"
elseif ucase(prefix)="1 MAX" then
prefix="MAX1"
elseif ucase(prefix)="2 MAX" then
prefix="MAX2"
elseif ucase(prefix)="3 MAX" then
prefix="MAX3"
elseif ucase(prefix)="UNO MAX" then
prefix="MAX1"
elseif ucase(prefix)="DOS MAX" then
prefix="MAX2"
elseif ucase(prefix)="TRES MAX" then
prefix="MAX3"
end if
if ucase(prefix)="MAX1" or ucase(prefix)="MAX2" or ucase(prefix)="MAX3" then
maxm="select "&prefix&" as result from listamaximo"
rs.open maxm,conexion,1,1
if not rs.eof then
message=rs("result") & " " & left(message,2)
end if
'response.write prefix & " " & message
'response.end
end if
if prefix="40" then
if ucase(left(message,3))="POL" then
prefix="40POL"
message=right(message,len(message)-4)
end if
end if
''///////////LOGICA 40POL
if ucase(prefix)="40POL" or ucase(prefix)="POLITONO" then
if message="" then
message=1
end if
if isnumeric(message)=true then
if len(message)=1 or len(message)=2 then
sql="Select * from titulos_polifonicas where topten="&message
top.open sql,conexion
if not top.eof then
message=top("cod_cancion")
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
end if
end if
''LOGICA VIDEO DE LA SEMANA,40 ALTINO Y POLIFONICAS
if ucase(prefix)="PVR" or ucase(prefix)="PVS" or ucase(prefix)="PLT" or ucase(prefix)="POVR" or ucase(prefix)="POVS" or ucase(prefix)="POLT" or ucase(prefix)="LISTA1" or ucase(prefix)="PODIAL" then
mirarray = split(message, " ")
res = mirarray(x)
res=replace(res," ","")
sqlvs="select * from [40latino] where alias='"&res&"'"
rsvs.open sqlvs,conexion,1,1
if not rsvs.eof then
message=rsvs("id_polifonica")
if message="" then
message=0
end if
end if
end if
if ucase(prefix)="VS" or ucase(prefix)="VR" or ucase(prefix)="LT" or ucase(prefix)="DIAL" then
mirarray = split(message, " ")
res = mirarray(i)
lms=len(message)-(len(res)+1)
if lms > 0 then
message=right(message,lms)
end if
if ucase(prefix)="DIAL" then
sqlvs="select * from alias where palabra='"&res&"'"
else
sqlvs="select * from [40latino] where alias='"&res&"'"
end if
rsvs.open sqlvs,conexion,1,1
if not rsvs.eof then
if ucase(prefix)="DIAL" then
message=rsvs("codigo") & " " & left(message,2)
else
message=rsvs("id_cancion") & " " & left(message,2)
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''******************
'*ACTIVAMOS JUEGOS
'*******************
if ucase(left(message,6))="JUEGO1" or ucase(left(message,7))="JUEGO 1" then
sqlcp="select * from act_polifonicas where telefono=" & phone & " and mensajes=3 and marca='JAVA' order by id_act desc"
poli.open sqlcp,conexion,1,1
if not poli.eof then
sqlup="update act_polifonicas set mensajes=2 where id_act="&poli("id_act")
conexion.execute sqlup
pedido="Envia ahora: "&prefix&" seguido de un espacio y la palabra: JUEGO2 al "&desde
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&message&"','JUEGOS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido="Lo sentimos no tienes ninguna descargarga de juegos activada."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&MESSAGE&"','JUEGOS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(left(message,6))="JUEGO2" or ucase(left(message,7))="JUEGO 2" then
sqlcp="select * from act_polifonicas where telefono=" & phone & " and mensajes=2 and marca='JAVA' order by id_act desc"
poli.open sqlcp,conexion,1,1
if not poli.eof then
sqlup="update act_polifonicas set mensajes=1 where id_act="&poli("id_act")
conexion.execute sqlup
pedido="Envia ahora: "&prefix&" seguido de un espacio y la palabra: JUEGO3 al "&desde&" para proceder a la descarga de tu juego."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&message&"','JUEGOS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido="Lo sentimos no tienes ninguna descargarga de juegos activada."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&message&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(left(message,6))="JUEGO3" or ucase(left(message,7))="JUEGO 3" then
sqlcp="select * from act_polifonicas where telefono=" & phone & " and mensajes=1 and marca='JAVA' order by id_act desc"
poli.open sqlcp,conexion,1,1
if not poli.eof then
sqlup="update act_polifonicas set mensajes=0 where id_act="&poli("id_act")
conexion.execute sqlup
referencia=poli("referencia")
'/*************************************************** enviamos el xml a provx content
tipo="micro"
pedido=poli("referencia")
phone=request("phone")
Set XMLhttp = CreateObject("MSXML2.ServerXMLHTTP")
'XMLhttp.Open "POST", "https://secure.provx.net:8445/relay/xmlcodeprovider/v210/", False 'Desarrollo
XMLhttp.Open "POST", "https://secure.provx.net:8445/relay/xmlcodeprovider/v210/", False 'Produccion
sms=""
sms=sms&""
sms=sms&"reverse-sms"
sms=sms&"genexies"
sms=sms&"genexies_cp"
sms=sms&"34htj25"
'sms=sms&"genexies_mp_es_test"
sms=sms&"genexies_mp_es_prod"
sms=sms&""&pedido&""
sms=sms&""&phone&""
sms=sms&""
ivr=""
ivr=ivr&""
ivr=ivr&"ivr"
ivr=ivr&"genexies"
ivr=ivr&"genexies_cp"
ivr=ivr&"34htj25"
'ivr=ivr&"genexies_mp_es_test"
ivr=ivr&"genexies_mp_es_prod"
ivr=ivr&""&pedido&""
ivr=ivr&""&phone&""
ivr=ivr&""
micro=""
micro=micro&""
micro=micro&"micropayment"
micro=micro&"genexies"
micro=micro&"genexies_cp"
micro=micro&"34htj25"
'micro=micro&"genexies_mp_es_test"
micro=micro&"genexies_mp_es_prod"
micro=micro&""&pedido&""
micro=micro&""&phone&""
micro=micro&""
if tipo="sms" then
tipo=sms
tipox="sms"
elseif tipo="ivr" then
tipo=ivr
tipox="ivr"
elseif tipo="micro" then
tipo=micro
tipox="micro"
end if
XMLhttp.Send tipo
on error resume next
'Response.Write "
"
'Response.Write "xmlSvr Server Status:
"
'Response.Write "-----------------------------------------
"
'Response.Write "Status (Value must be 200): " & XMLhttp.status & "
"
'Response.Write "ReadyState (Value must be 4): " & XMLhttp.ReadyState & "
"
'Response.Write "StatusText (Value must be OK): " & XMLhttp.StatusText & "
"
'Response.Write "AllResponseHeaders:
" & XMLhttp.GetAllResponseHeaders & "
"
'/*************************************************** recogemos el xml de respuesta y generamos el push si
Set xmlDoc2 = CreateObject("MSXML2.DOMDocument")
xmlDoc2.setProperty "ServerHTTPRequest", True
xmlDoc2.async = False
xmlDoc2.LoadXML XMLhttp.ResponseXML.xml
Response_Doc2 = xmlhttp.responseXML.xml
Set PathA = xmlDoc2.selectSingleNode("auth-code-response")
status=PathA.selectSingleNode("status").text
if status="success" then
Set PathB= PathA.selectSingleNode("wap-push")
url=PathB.selectSingleNode("url").text
name=PathB.selectSingleNode("name").text
'Response.Write "name: " & name & vbCrLf
'response.write "url: " & url & vbCrLf
'generamos el push si
push="0605040B8423F001060403AE81EA02056A0045C60B03"
turl=len(url)
for x=1 to turl
Ascii = Asc(mid(url,x,turl))
uri = uri & Right("0" & Hex(Ascii), 2)
next
push=push & uri
push=push & "001103314000080103"
tname=len(name)
for x=1 to tname
Ascii = Asc(mid(name,x,tname))
nam = nam & Right("0" & Hex(Ascii), 2)
next
push = push & nam & "000101"
pedido=ucase(push)
tiposms="logoems"
else
'response.write Response_Doc2
pedido="Lo sentimos se ha producido un error en la activacion. Contacte con info@genexies.com"
tiposms="text"
end if
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido="Lo sentimos no tienes ninguna descargarga de juegos activada."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////////////////////////// LOGICA tono ej.TONOx NOKIA
if ucase(prefix)="TONO1" OR ucase(prefix)="TONO2" OR ucase(prefix)="TONO3" then
sql_mucho="select "&ucase(prefix)&" from TONOS40"
mucho.open sql_mucho,conexion
melo_mucho=mucho(ucase(prefix))
marca=ucase(LEFT(message,2))
if marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="SO" or marca="AL" or marca="SI" or marca="PH" then
message=melo_mucho & " " & marca
elseif marca="NO" or marca="LG" or marca="SA" then
message=melo_mucho
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','error','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos.No hemos reconocido la marca. Envia mucho seguido de un espacio y la marca. ejemplo mucho alcatel"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
'************************************
'* ACTIVAMOS POLIFONICAS
'************************************
''*************** logica activacion final de polifonicas
pmsg=message
polires=prefix
if left(ucase(pmsg),3)="ALC" or left(ucase(pmsg),3)="MOV" or left(ucase(pmsg),3)="TSM" or left(ucase(pmsg),3)="ERI" or left(ucase(pmsg),3)="NOK" or left(ucase(pmsg),3)="PHI" or left(ucase(pmsg),3)="PIL" or left(ucase(pmsg),3)="PAN" or left(ucase(pmsg),3)="TRI" or left(ucase(pmsg),3)="MIT" or left(ucase(pmsg),3)="SON" or left(ucase(pmsg),3)="SAG" or left(ucase(pmsg),3)="SAM" or left(ucase(pmsg),3)="SAN" or left(ucase(pmsg),3)="MOT" or left(ucase(pmsg),3)="MAX" or left(ucase(pmsg),3)="SIE" or left(ucase(pmsg),3)="NEC" or left(ucase(pmsg),2)="LG" or left(ucase(pmsg),3)="SHA" THEN
if left(ucase(pmsg),3)="NOK" then
pmarca="8"
ptipo=".mid"
elseif left(ucase(pmsg),3)="SIE" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="SHA" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="PHI" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="PIL" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="TRI" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="SON" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="SAG" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="MIT" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="MAX" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="NEC" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),2)="LG" then
pmarca="5"
ptipo=".mid"
elseif left(ucase(pmsg),3)="ERI" then
pmarca="7"
ptipo=".mid"
elseif left(ucase(pmsg),3)="MOT" then
pmarca="6"
ptipo=".mid"
elseif left(ucase(pmsg),3)="PAN" then
pmarca="4"
ptipo=".mid"
elseif left(ucase(pmsg),3)="ALC" then
pmarca="9"
ptipo=".mid"
elseif left(ucase(pmsg),3)="SAM" then
pmarca="3"
ptipo=".mmf"
elseif left(ucase(pmsg),3)="SAN" then
pmarca="3"
ptipo=".mmf"
elseif left(ucase(pmsg),3)="MOV" then
pmarca="9"
ptipo=".mid"
elseif left(ucase(pmsg),3)="TSM" then
pmarca="9"
ptipo=".mid"
else
pmarca="1"
ptipo=".mid"
end if
'activar telefono y mandar push si
sqlcp="select * from act_polifonicas where telefono=" & phone & " and mensajes=1 order by id_act desc"
poli.open sqlcp,conexion,1,1
if not poli.eof then
sqlup="update act_polifonicas set mensajes=0 where id_act="&poli("id_act")
conexion.execute sqlup
if len(poli("referencia"))=7 then
pcliente=left(poli("referencia"),4)
pmensaje=right(poli("referencia"),3)
elseif len(poli("referencia"))=6 then
if poli("referencia")="111000" then
pmensaje=poli("nombre")
pescenario=poli("marca")
else
pcliente=left(poli("referencia"),3)
pmensaje="10" & right(poli("referencia"),3)
end if
else
if ucase(poli("marca"))="POLIFONICAS" then
pcliente=poli("nombre")
pmensaje=poli("referencia")
ptipo="POLIFONICAS"
elseif ucase(poli("marca"))="SCOLOR" then
pcliente=poli("nombre")
pmensaje=poli("referencia")
ptipo="SCOLOR"
elseif ucase(poli("marca"))="FCOLOR" then
pcliente=poli("nombre")
pmensaje=poli("referencia")
ptipo="FCOLOR"
end if
end if
if poli("referencia")="111000" then
sqlac="insert into push_si (telefono,mensaje,tipo,ruta,descargado,fecha,cliente,marca,nombre) values "
sqlac = sqlac & "("&right(phone,9)&",111000,'.NOM','"&pescenario&"',0,getdate(),111000,"&pmarca&",'"&pmensaje&"')"
else
sqlac="insert into push_si (telefono,mensaje,tipo,ruta,descargado,fecha,cliente,marca) values "
sqlac = sqlac & "("&right(phone,9)&","&pmensaje&",'"&ptipo&"','http://www.genexies.com/descargas/wapush/',0,getdate(),'"&pcliente&"',"&pmarca&")"
end if
'response.write sqlac
'response.end
conexion.execute sqlac
'telefono activado mandar push si
hex_si = "0605040B8423F0"
p0="687474703A2F2F7777772E747570656469646F2E636F6D" '#http://www.tupedido.com/dpoli.php
url=p0
nombre="506F6C69666F6E69636173" '#motomusic
mail="3140747570656469646F2E636F6D" '#1@motomusic
hex_si = hex_si & "01060403AE81EA02056A0045C60B03" & url & "00"
hex_si = hex_si & "11" & "03" & mail & "00"
hex_si = hex_si & "080103" & nombre & "000101"
push=hex_si
tiposms="logoems"
alertid=alertid'"20002"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido=push
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
''mensaje de error
if polires="POLIA" then
polires="POLI"
end if
pedido="Lo sentimos tu telefono no ha sido activado. Envia "&polires&" seguido de un espacio y la referencia."
tiposms="text"
alertid="20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
'/*/*/*/*////////////////////////****************************************////////////////////////*/*/*/*/
'if ucase(prefix)="AS" or ucase(prefix)="LISTA" then
if ucase(prefix)="LISTA" or ucase(prefix)="LOCALIA" or ucase(prefix)="HIMNO" or ucase(prefix)="HINNO" or ucase(prefix)="HIMMO" or ucase(prefix)="HINMO" then
message=replace(ucase(message),"NOKIA","NO")
message=replace(ucase(message),"SIEMENS","SI")
message=replace(ucase(message),"ALCATEL","AL")
message=replace(ucase(message),"PHILIPS","PH")
message=replace(ucase(message),"PILIPS","PH")
message=replace(ucase(message),"MOTOROLA","MO")
message=replace(ucase(message),"SAGEM","SA")
message=replace(ucase(message),"TRUIM","TR")
message=replace(ucase(message),"TRIUN","TR")
message=replace(ucase(message),"MITSUBISHI","MI")
message=replace(ucase(message),"MISUBISHI","MI")
message=replace(ucase(message),"MISUBISI","MI")
message=replace(ucase(message),"ERICSON","ER")
message=replace(ucase(message),"ERICSSON","ER")
message=replace(ucase(message),"ERICCSSON","ER")
message=replace(ucase(message),"MAXON","MA")
message=replace(ucase(message),"SAMSUNG","SA")
end if
if ucase(prefix)="LISTA" then
message=replace(ucase(message),"UNO","1")
message=replace(ucase(message),"DOS","2")
message=replace(ucase(message),"TRES","3")
message=replace(ucase(message),"CUATRO","4")
message=replace(ucase(message),"CINCO","5")
message=replace(ucase(message),"SEIS","6")
message=replace(ucase(message),"SIETE","7")
message=replace(ucase(message),"OCHO","8")
message=replace(ucase(message),"NUEVE","9")
message=replace(ucase(message),"DIEZ","10")
message=replace(ucase(message),"ONCE","11")
message=replace(ucase(message),"DOCE","12")
message=replace(ucase(message),"TRECE","13")
message=replace(ucase(message),"CATORCE","14")
message=replace(ucase(message),"QUINCE","15")
message=replace(ucase(message),"DIECISEIS","16")
message=replace(ucase(message),"DIECISIETE","17")
message=replace(ucase(message),"DIECIOCHO","18")
message=replace(ucase(message),"DIECINUEVE","19")
message=replace(ucase(message),"VEINTE","20")
message=replace(ucase(message),"VENITUNO","21")
message=replace(ucase(message),"VENTIDOS","22")
message=replace(ucase(message),"VENTITRES","23")
message=replace(ucase(message),"VENTICUATRO","24")
message=replace(ucase(message),"VENTICINCO","25")
message=replace(ucase(message),"VENTISEIS","26")
message=replace(ucase(message),"VENTISIETE","27")
message=replace(ucase(message),"VENTIOCHO","28")
message=replace(ucase(message),"VENTINUEVE","29")
message=replace(ucase(message),"TRENTA","30")
message=replace(ucase(message),"TRENTAYUNO","31")
message=replace(ucase(message),"TRENTAYDOS","32")
message=replace(ucase(message),"TRENTAYTRES","33")
message=replace(ucase(message),"TRENTAYCUATRO","34")
message=replace(ucase(message),"TRENTAYCINCO","35")
message=replace(ucase(message),"TRENTAYSEIS","36")
message=replace(ucase(message),"TRENTAYSIETE","37")
message=replace(ucase(message),"TRENTAYOCHO","38")
message=replace(ucase(message),"TRENTAYNUEVE","39")
message=replace(ucase(message),"CUARENTA","40")
end if
if ucase(prefix)="HIMNO" or ucase(prefix)="HINNO" or ucase(prefix)="HIMMO" or ucase(prefix)="HINMO" then
message=replace(ucase(message),"VALENCIA","423")
message=replace(ucase(message),"DEPOR","431")
message=replace(ucase(message),"DEPORTIVO","431")
message=replace(ucase(message),"MADRID","429")
message=replace(ucase(message),"OSASUNA","2588")
message=replace(ucase(message),"VILLAREAL","2660")
message=replace(ucase(message),"BETIS","433")
message=replace(ucase(message),"SEVILLA","425")
message=replace(ucase(message),"ATHLETIC","436")
message=replace(ucase(message),"ATLETIC","436")
message=replace(ucase(message),"VALLADOLID","422")
message=replace(ucase(message),"CELTA","432")
message=replace(ucase(message),"RACING","2659")
message=replace(ucase(message),"MALAGA","428")
message=replace(ucase(message),"ATLETICO","435")
message=replace(ucase(message),"MALLORCA","427")
message=replace(ucase(message),"MURCIA","2650")
message=replace(ucase(message),"ZARAGOZA","2651")
message=replace(ucase(message),"ALBACETE","2649")
message=replace(ucase(message),"ESPAŅOL","430")
message=replace(ucase(message),"ESPANOL","430")
message=replace(ucase(message),"ESPANYOL","430")
end if
if ucase(prefix)="MI" and ucase(left(message,6))="ENTEME" then
prefix="06"
if (len(message)-7)>2 then
meee=right(message,len(message)-7)
mee=left(meee,2)
message="1755" & " " & mee
else
message="1755"
end if
'response.write message
'response.end
end if
message=replace(message,chr(33),"")
message=replace(message,chr(34),"")
message=replace(message,chr(35),"")
message=replace(message,chr(36),"")
message=replace(message,chr(37),"")
message=replace(message,chr(38),"")
message=replace(message,chr(39),"")
message=replace(message,chr(40),"")
message=replace(message,chr(41),"")
message=replace(message,chr(42),"")
message=replace(message,chr(43),"")
message=replace(message,chr(44),"")
message=replace(message,chr(46),"")
message=replace(message,chr(47),"")
message=replace(message,chr(58),"")
message=replace(message,chr(59),"")
message=replace(message,chr(60),"")
message=replace(message,chr(61),"")
message=replace(message,chr(62),"")
message=replace(message,chr(63),"")
''/////////////////////////// LOGICA MARCA espacio MELODIA ej NOKIA DIGALE
if ucase(prefix)="NOK" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="MOT" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " MO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="SAG" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="TRI" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="ERI" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " ER"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="ALC" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " AL"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="SIE" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " SI"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="PHI" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " PH"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="MAX" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="SAM" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " SA"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="EPS" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
'''soyericsson
elseif ucase(prefix)="SON" then
prefix="ER"
IF left(message,8)="YERICSON" OR left(message,8)="IERICSON" OR left(message,9)="YERICSSON" OR left(message,9)="IERICSSON" OR left(message,10)="Y ERICSSON" OR left(message,10)="I ERICSSON" OR left(message,9)="Y ERICSON" OR left(message,9)="I ERICSON" THEN
IF left(message,10)="Y ERICSSON" OR left(message,10)="I ERICSSON" THEN
messa=right(message,len(message)-10)
message=replace(left(message,10)," ","_") & messa
ELSEIF left(message,9)="Y ERICSON" OR left(message,9)="I ERICSON" THEN
messa=right(message,len(message)-9)
message=replace(left(message,9)," ","_") & messa
END IF
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " ER"
alertid="20169"
else
alertid="20075"%>
<% end if
end if
''//sonyericsson
elseif ucase(prefix)="LG" then
cad = Message
mirarray = split(cad, " ")
res = mirarray(i)
res=right(message,len(message)-len(res))
if left(res,1)=" " then
res=right(res,len(res)-1)
end if
if isnumeric(left(res,1))=true then
message=res & " NO"
alertid="20169"
else
alertid="20075"%>
<% end if
elseif ucase(prefix)="PAN" or ucase(prefix)="MIT" then
mov="NoMarca"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Esta marca no esta disponible. Disculpa las molestias"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
''/////////////////////////// LOGICA ALAVES ej. ALAVES ABELARDO
if ucase(prefix)="ALAVES" then
if message="" then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia mjp + el nombre de tu jugador preferido al 7788. Puedes ganar su camiseta firmada. Envia Albichat + tu mensaje al 7788 para ver tu mensaje en la web."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
marca=right(message,3)
if marca=" AL" or marca=" SI" or marca=" NO" then
message=left(message,len(message)-3)
else
''nokia
message=message
marca=""
end if
if ucase(message)="ABELARDO" then
message="9061190" & marca
elseif ucase(message)="ALAVES" then
message="9061191" & marca
elseif ucase(message)="EDU ALONSO" then
message="9061192" & marca
elseif ucase(message)="ASTUDILLO" then
message="9061193" & marca
elseif ucase(message)="ASTUDIYO" then
message="9061193" & marca
elseif ucase(LEFT(message,9))="IBON BEGO" then
message="9061194" & marca
elseif ucase(message)="JORDI CRUYFF" then
message="9061195" & marca
elseif ucase(message)="CRUYFF" then
message="9061195" & marca
elseif ucase(message)="CRUYF" then
message="9061195" & marca
elseif ucase(message)="CRUIFF" then
message="9061195" & marca
elseif ucase(message)="DESIO" then
message="9061196" & marca
elseif ucase(message)="DUTRUEL" then
message="9061197" & marca
elseif ucase(message)="EGGEN" then
message="9061198" & marca
elseif ucase(message)="EGEN" then
message="9061198" & marca
elseif ucase(message)="GELI" then
message="9061199" & marca
elseif ucase(message)="L HELGUERA" then
message="9061200" & marca
elseif ucase(message)="HELGUERA" then
message="9061200" & marca
elseif ucase(message)="ILIE" then
message="9061201" & marca
elseif ucase(message)="IVAN ALONSO" then
message="9061202" & marca
elseif ucase(message)="JUAN PABLO" then
message="9061203" & marca
elseif ucase(message)="KARMONA" then
message="9061204" & marca
elseif ucase(message)="CARMONA" then
message="9061204" & marca
elseif ucase(message)="LLORENS" then
message="9061205" & marca
elseif ucase(message)="MAGNO" then
message="9061206" & marca
elseif ucase(message)="MARA" then
message="9061207" & marca
elseif ucase(message)="R NAVARRO" then
message="9061208" & marca
elseif ucase(message)="NAVARRO" then
message="9061208" & marca
elseif ucase(message)="OCHOA" then
message="9061209" & marca
elseif ucase(message)="PABLO" then
message="9061210" & marca
elseif ucase(message)="TELLEZ" then
message="9061211" & marca
elseif ucase(message)="TURIEL" then
message="9061212" & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia mjp + el nombre de tu jugador preferido al 7788. Puedes ganar su camiseta firmada. Envia Albichat + tu mensaje al 7788 para ver tu mensaje en la web."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
end if
''/////////////////////////// LOGICA RAYAS BLANCA NEGRA ej. BL NOMBRE10 SI
if ucase(prefix)="RA" or ucase(prefix)="NE" or ucase(prefix)="BL" then
marca=right(message,2)
if marca="SI" or marca="AL" then
message=left(message,len(message)-3)
modelo=right(marca,2)
elseif marca="NO" then
message=left(message,len(message)-3)
modelo=""
else
modelo=""
message=message
end if
if ucase(prefix)="RA" then
tipo=1
msgT1=message
'numero
if isnumeric(right(msgT1,2))=true then
numero=right(msgT1,2)
nams=len(msgT1)-2
elname=left(msgT1,nams)
elseif isnumeric(right(msgT1,1))=true then
numero=right(msgT1,1)
nams=len(msgT1)-1
elname=left(msgT1,nams)
else
numero=1
msgn=message
elname=msgn
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/camisetas.php?numero="&numero&"&tipo="&tipo&"&texto="&ucase(elname)&"&modelo="&modelo&"&alertid="&alertid&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&marca="&marca&"&web="&web
elseif ucase(prefix)="NE" then
tipo=2
msgT1=message
if isnumeric(right(msgT1,2))=true then
numero=right(msgT1,2)
nams=len(msgT1)-2
elname=left(msgT1,nams)
elseif isnumeric(right(msgT1,1))=true then
numero=right(msgT1,1)
nams=len(msgT1)-1
elname=left(msgT1,nams)
else
numero=1
msgn=message
elname=msgn
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/camisetas.php?numero="&numero&"&tipo="&tipo&"&texto="&ucase(elname)&"&modelo="&modelo&"&alertid="&alertid&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&marca="&marca&"&web="&web
elseif ucase(prefix)="BL" then
tipo=3
msgT1=message
if isnumeric(right(msgT1,2))=true then
numero=right(msgT1,2)
nams=len(msgT1)-2
elname=left(msgT1,nams)
elseif isnumeric(right(msgT1,1))=true then
numero=right(msgT1,1)
nams=len(msgT1)-1
elname=left(msgT1,nams)
else
numero=1
msgn=message
elname=msgn
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/camisetas.php?numero="&numero&"&tipo="&tipo&"&texto="&ucase(elname)&"&modelo="&modelo&"&alertid="&alertid&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&marca="&marca&"&web="&web
end if
end if
''/////////////////////////// LOGICA LARGUERO ej. LARGUERO NOKIA
if left(ucase(message),8)="POFUTBOL" THEN
message="10606"
prefix="DEP"
elseif left(ucase(message),10)="POSINTONIA" then
message="10580"
prefix="DEP"
elseif left(ucase(message),10)="POLARGUERO" then
message="10603"
prefix="DEP"
elseif left(ucase(message),9)="POLARGERO" then
message="10603"
prefix="DEP"
elseif left(ucase(message),9)="POPARTIDO" then
message="10579"
prefix="DEP"
elseif left(ucase(message),6)="POTINA" then
message="10605"
prefix="DEP"
end if
''/////logica cabeceras larguero
if ucase(prefix)="POFUTBOL" THEN
message="10606"
prefix="DEP"
elseif ucase(prefix)="POSINTONIA" then
message="10580"
prefix="DEP"
elseif ucase(prefix)="POLARGUERO" then
message="10603"
prefix="DEP"
elseif ucase(prefix)="POLARGERO" then
message="10603"
prefix="DEP"
elseif ucase(prefix)="POPARTIDO" then
message="10579"
prefix="DEP"
elseif ucase(prefix)="POTINA" then
message="10605"
prefix="DEP"
end if
''/////////////////////////// LOGICA LARGUERO ej. LARGUERO NOKIA
if left(ucase(message),6)="FUTBOL" THEN
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1585 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia FUTBOL seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),3)="GOL" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1541 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia GOL seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),8)="SINTONIA" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1543 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia SINTONIA seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),8)="LARGUERO" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1540 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia LARGUERO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),7)="LARGERO" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1540 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia LARGUERO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),7)="PARTIDO" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1544 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia PARTIDO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(ucase(message),4)="TINA" then
marca=right(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1584 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia TINA seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////logica cabeceras larguero
if ucase(prefix)="FUTBOL" THEN
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1585 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia FUTBOL seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="GOL" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1541 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia GOL seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="SINTONIA" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1543 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia SINTONIA seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="LARGUERO" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1540 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia LARGUERO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="LARGERO" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1540 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia LARGUERO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="PARTIDO" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1544 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia PARTIDO seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="TINA" then
marca=left(message,2)
if marca="NO" or marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="ES" or marca="SO" or marca="AL" or marca="SI" or marca="PH" or marca="PI" or marca="LG" then
message="1584 " & marca
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Envia TINA seguido de un espacio y la marca de tu movil al 7740."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////////////////////////// LOGICA HINCHA ej.HINCHA MADRID NO
if ucase(prefix)="YO" or ucase(prefix)="HINCHA" or ucase(prefix)="SOY" THEN
marca=right(message,3)
marca=ucase(marca)
if marca=" SI" or marca=" AL" then
message=left(message,len(message)-3)
mar=right(marca,2)
elseif marca=" NO" then
message=left(message,len(message)-3)
mar=""
else
mar=""
message=message
end if
if ucase(prefix)="YO" then
tip="1"
elseif ucase(prefix)="HINCHA" then
tip="2"
elseif ucase(prefix)="SOY" then
tip="3"
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/logoss.php?AlertID="&alertid&"&texto="&message&"&tipo="&tip&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&mar&"&web="&web
end if
''/////////////////////////// LOGICA HINCHA ej.HINCHA MADRID NO
if ucase(prefix)="CT" then
sql_ct="INSERT INTO LYCOS_CT (telefono,mensaje,fecha) VALUES ("&phone&",'"&message&"',getdate())"
conexion.execute sql_ct
pedido="Gracias por utilizar nuestro servicio.Tu mensaje sera publicado en breve."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
''/////////////////////////// LOGICA MUCHO ej.MUCHO NOKIA
if ucase(prefix)="MUCHO" then
sql_mucho="select * from mucho"
mucho.open sql_mucho,conexion
melo_mucho=mucho("melodia")
marca=ucase(LEFT(message,2))
if marca="MO" or marca="SA" or marca="TR" or marca="ER" or marca="SO" or marca="AL" or marca="SI" or marca="PH" then
message=melo_mucho & " " & marca
elseif marca="NO" or marca="LG" or marca="SA" then
message=melo_mucho
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','error','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos.No hemos reconocido la marca. Envia mucho seguido de un espacio y la marca. ejemplo mucho alcatel"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
'''////////////////////////// LOGICA LOCALIA TELEVISION
if ucase(prefix)="LOCALIA" then
'LOCARTISTAMARCADELMOVIL <- MONOFONICAS LOCALIA
marcaloc=right(message,2)
message=left(message,len(message)-3)
message=replace(message," ","")
SQL_LOCALIA="SELECT * FROM LOCALIA WHERE PALABRA='"&message&"'"
rs.open sql_localia,conexion
if not rs.eof then
message=rs("referencia")
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
message=message & " " & marcaloc
'response.end
end if
if ucase(prefix)="POLOCALIA" then
'POLOCARTISTAMARCADELMOVIL <-POLIFONICAS LOCALIA
SQL_LOCALIA="SELECT * FROM LOCALIA WHERE PALABRA='"&message&"'"
rs.open sql_localia,conexion
if not rs.eof then
message=rs("referencia_p")
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
message=replace(message," ","")
end if
if ucase(right(message,3))=" NO" then
tam_messag=len(message)-3
message=left(message,tam_messag)
elseif ucase(right(message,2))="NO" then
tam_messag=len(message)-2
message=left(message,tam_messag)
end if
movi=right(Message,2)
pus=right(message,3)
%>
<%
cad = Message
mirarray = split(cad, " ")
on error resume next
res = mirarray(i)
''/////////////////////////// LOGICA SONIA ej.SONIA
if ucase(prefix)="SONIA" or ucase(prefix)="EROTICO" then
if ucase(prefix)="SONIA" then
if ucase(left(message,4)) <> "BOMB" and ucase(left(message,5)) <> "PLAYA" and ucase(left(message,7)) <> "GALERIA" then
sql_sonia="INSERT INTO LYCOS_SONIA_PIROPOS(piropo,telefono,fecha)VALUES ('"&message&"',"&Phone&",GETDATE())"
conexion.execute sql_sonia
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','PIROPOS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Gracias por participar y Suerte."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
if ucase(left(message,4)) <> "BOMB" then
if ucase(left(message,5)) = "PLAYA" then
categoria=right(message,2)
if isnumeric(categoria)=true then
categoriap=categoria
categoria=categoria + 20
texto="PLAYA"
else
categoria=right(categoria,1)
categoriap=categoria
categoria=categoria + 20
texto="PLAYA"
end if
elseif ucase(left(message,7)) = "GALERIA" then
categoria=right(message,2)
categoria=right(categoria,1)
texto="GALERIA"
categoriap=categoria
end if
sql_sonia="INSERT INTO SONIA(telefono,galeria,activado,fecha)VALUES ("&Phone&","&categoria&",1,'"&now()&"')"
conexion.execute sql_sonia
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','"&texto&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Enhorabuena! Ya tienes tu telefono activado para que te bajes la "& texto &" numero: "&categoriap
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
categoria=right(message,1)
sql_sonia="INSERT INTO lycos_sexbomb(telefono,sexbomb,fecha)VALUES ("&Phone&","&categoria&",GETDATE())"
conexion.execute sql_sonia
pedido="Gracias por participar en el concurso.Suerte con tu candidata."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif ucase(prefix)="EROTICO" then
categoria=right(message,len(message)-5)
sql_sonia="INSERT INTO lycos_erotico(telefono,galeria,activado,fecha)VALUES ("&Phone&","&categoria&",1,'"&now()&"')"
conexion.execute sql_sonia
pedido="Enhorabuena! Ya tienes tu telefono activado para que te bajes los videos eriticos de LYCOS"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////////////////////////// LOGICA APELAR ej.APELAR
if ucase(Prefix)="AP" and ucase(left(message,4))="ELAR" then
response.redirect "40.asp?message="&message&"&phone="&phone&"&alertid="&alertid
elseif ucase(Prefix)="AP" and ucase(left(message,3))="ELO" then
response.redirect "dial.asp?message="&message&"&phone="&phone&"&alertid="&alertid
elseif ucase(Prefix)="AP" and ucase(left(message,4))="LICA" then
response.redirect "40tv.asp?phone="&phone&"&alertid="&alertid
elseif ucase(Prefix)="AP" and ucase(left(message,3))="ELA" then
response.redirect "mucho.php"
end if
''/////////////////////////// LOGICA ej.NOMBREmadrid mihai
if Ucase(Prefix)="NO" then
if ucase(left(message,4))="MBRE" then
total=len(message)-4
mensajet=right(Message,total)
mirarray = split(cad, " ")
res = mirarray(i)
totalc=len(res)
totalcabec=len(res)-4
cabecera=ucase(right(res,totalcabec))
totaln=len(message)-totalc-1
nombre=right(message,totaln)
nombre=lcase(nombre)
sqlg="INSERT INTO xmap_logo_nombre (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & cabecera&"','"&nombre&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/logo_nombre.php?AlertID="&alertid&"&texto="&nombre&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&equipo="&cabecera&"&From="&desde&"&marca="&marca&"&web="&web
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////////////////////////// LOGICA MOTOMUSIC ej.moto codigo
'if Ucase(Prefix)="MOTO" then
'
' if left(phone,2) <> 34 then
' phone="34" & phone
' end if
' sql="Select * from motomusic where id_moto='"&message&"'"
' top.open sql,conexion
' if not top.eof then
' pasw=top("id_moto")
' idp=phone
' idpl=len(idp)
' for x=1 to idpl
' idpx=mid(idp,x,1)
' tlfh="3" & idpx
' telfe=telfe & tlfh
' next
'
' hex_si = "0605040B8423F0"
' p0="687474703A2F2F7777772E747570656469646F2E636F6D2F34302E6173703F743D" '#http://www.genexies.com/
' url=p0 & telfe
'
' desc=top("descargas")
' if desc=5 then
' hexdesc="35"
' elseif desc=4 then
' hexdesc="34"
' elseif desc=3 then
' hexdesc="33"
' elseif desc=2 then
' hexdesc="32"
' elseif desc=1 then
' hexdesc="31"
' elseif desc=0 then
' hexdesc="30"
' else
' hexdesc="39"
' end if
' nombre="6D6F746F6D75736963" & hexdesc '#motomusic
' mail=hexdesc & "406D6F746F6D75736963" '#1@motomusic
' hex_si = hex_si & "01" '# Transaction ID
' hex_si = hex_si & "06" '# PDU Type (push)
' hex_si = hex_si & "04" '# Headers Length (content-type + headers)
' hex_si = hex_si & "03" '# Length of content type
' hex_si = hex_si & "AE" '# Content-Type: application/vnd.wap.sic
' hex_si = hex_si & "81" '# Charset
' hex_si = hex_si & "EA" '# UTF-8
' hex_si = hex_si & "02" '# Version number (wbxml_version)
' hex_si = hex_si & "05" '# Unknown Public Identifier (si_public_id)
' hex_si = hex_si & "6A" '# charset= (sibxml->charset)
' hex_si = hex_si & "00" '# String table length
' hex_si = hex_si & "45" '#
' hex_si = hex_si & "C6" '#
' hex_si = hex_si & "01" '#
' push=hex_si
' tiposms="logoems"
' alertid="20002"
' sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','Motorola','"&fecha&"','"&desde&"')"
' conexion.execute sqlg
' pedido=push
' tipo=tiposms
' xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
' xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
' conexion.execute xmpSQL
' response.write "OK"
' response.end
' else
' mov="error!"
' idp=phone
' idpl=len(idp)
' for x=1 to idpl
' idpx=mid(idp,x,1)
' tlfh="3" & idpx
' telfe=telfe & tlfh
' next
' hex_si = "0605040B8423F0"
' p0="687474703A2F2F7777772E747570656469646F2E636F6D2F34302E6173703F743D" '#http://www.genexies.com/
' url=p0 & telfe
' nombre="6D6F746F6D75736963" '#motomusic
' mail="31406D6F746F6D75736963" '#1@motomusic
' hex_si = hex_si & "01" '# Transaction ID
' hex_si = hex_si & "06" '# PDU Type (push)
' hex_si = hex_si & "04" '# Headers Length (content-type + headers)
' hex_si = hex_si & "03" '# Length of content type
' hex_si = hex_si & "AE" '# Content-Type: application/vnd.wap.sic
' hex_si = hex_si & "81" '# Charset
' hex_si = hex_si & "EA" '# UTF-8
' hex_si = hex_si & "02" '# Version number (wbxml_version)
' hex_si = hex_si & "05" '# Unknown Public Identifier (si_public_id)
' hex_si = hex_si & "6A" '# charset= (sibxml->charset)
' hex_si = hex_si & "00" '# String table length
' hex_si = hex_si & "45" '#
' hex_si = hex_si & "C6" '#
' hex_si = hex_si & "01" '#
' push=hex_si
' tiposms="logoems"
' alertid="20002"
' sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
' conexion.execute sqlg
' pedido=push
' tipo=tiposms
' xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
' xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
' conexion.execute xmpSQL
' response.write "OK"
' response.end
' end if
'end if
'''****************************************************************************************************************************************-
''' POR MENSAJE
'''****************************************************************************************************************************************-
'''logica true tones
if ucase(request("message"))="DESCARGA" then
sqlcp="select * from act_ttones where telefono="&phone&" and mensajes=1"
poli.open sqlcp,conexion,1,1
if not poli.eof then
sqlup="update act_ttones set mensajes=0 where id_act="&poli("id_act")
conexion.execute sqlup
pmensaje=poli("referencia")
sqlac="insert into push_si (telefono,mensaje,tipo,ruta,descargado,fecha,cliente,marca) values "
sqlac = sqlac & "("&right(phone,9)&","&pmensaje&",'TTONE','http://www.genexies.com/descargas/wapush/',0,getdate(),0,0)"
conexion.execute sqlac
'telefono activado mandar push si
hex_si = "0605040B8423F0"
p0="687474703A2F2F7777772E747570656469646F2E636F6D" '#http://www.tupedido.com/dpoli.php
url=p0
nombre="506F6C69666F6E69636173" '#motomusic
mail="3140747570656469646F2E636F6D" '#1@motomusic
hex_si = hex_si & "01060403AE81EA02056A0045C60B03" & url & "00"
hex_si = hex_si & "11" & "03" & mail & "00"
hex_si = hex_si & "080103" & nombre & "000101"
push=hex_si
tiposms="logoems"
alertid=alertid'"20002"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&Prefix&"','"&pmsg&"','TTONES','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido=push
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido="Lo sentimos tu telefono no ha sido activado. Envia "&prefix&" seguido de un espacio y la referencia."
tiposms="text"
alertid="20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','TTONES','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
''/////////////////////////// LOGICA DINAMICOS ej.GX AMOR
ascii=ucase(message)
if left(ascii,4)="AMOR" or left(ascii,7)="ADULTOS" or left(ascii,8)="ANIMALES" or left(ascii,8)="DEPORTES" or left(ascii,6)="BROMAS" or left(ascii,11)="NAVIDADVODA" or left(ascii,6)="VARIOS" then
if desde="4434" then
tablaascii="ascii_anim_portugal"
else
tablaascii="ascii_anim2"
end if
if left(ascii,4)="AMOR" then
categorias="cat1"
elseif left(ascii,7)="ADULTOS" then
categorias="cat2"
elseif left(ascii,8)="ANIMALES" then
categorias="cat3"
elseif left(ascii,8)="DEPORTES" then
categorias="cat4"
elseif left(ascii,6)="VARIOS" then
categorias="cat5"
elseif left(ascii,11)="NAVIDADVODA" then
categorias="cat6"
end if
Set tel=Server.CreateObject("ADODB.Recordset")
Set rs_id=Server.CreateObject("ADODB.Recordset")
sqlat="select * from ascii_tel where telefono=" & phone
tel.open sqlat,conexion
if tel.eof then
sqlgu="INSERT INTO ASCII_TEL(telefono,"&categorias&")VALUES("&phone&",50001)"
conexion.execute sqlgu
sql="select * from " & tablaascii & " where id_anim=50001 and categoria="&right(categorias,1)
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
enviarlogo=replace(logo("text"),"'","'+char(39)+'")
pedido=enviarlogo
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
'response.write xmpSQL
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
if left(ascii,4)="AMOR" then
categ=tel("cat1")
elseif left(ascii,7)="ADULTOS" then
categ=tel("cat2")
elseif left(ascii,8)="ANIMALES" then
categ=tel("cat3")
elseif left(ascii,8)="DEPORTES" then
categ=tel("cat4")
elseif left(ascii,6)="VARIOS" then
categ=tel("cat5")
elseif left(ascii,11)="NAVIDADVODA" then
categ=tel("cat6")
end if
sql_m="SELECT TOP 1 * FROM " & tablaascii & " WHERE categoria = "&right(categorias,1)&" ORDER BY id_anim DESC"
rs_id.open sql_m,conexion
if categ="0" or categ="" then
refer=50001
else
refer=categ + 1
end if
maximo=rs_id("id_anim")
if Clng(refer) > Clng(maximo) then
refer=50001
end if
sql="select * from " & tablaascii & " where id_anim="&refer&" and categoria="&right(categorias,1)
logo.open sql,conexion
if logo.eof then
logo.close
sql="select * from " & tablaascii & " where id_anim=50001 and categoria="&right(categorias,1)
logo.open sql,conexion
sqlac="UPDATE ASCII_TEL SET "&categorias&"=50001 where telefono="&phone
conexion.execute sqlac
end if
if not logo.eof then
sqlac="UPDATE ASCII_TEL SET "&categorias&"="&refer&" where telefono="&phone
conexion.execute sqlac
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
enviarlogo=replace(logo("text"),"'","'+char(39)+'")
pedido=enviarlogo
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
'response.write xmpSQL
'response.end
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
end if
''''-***********************************************************************************************************************************************************************************--
''''- POR LONGITUD
''''-***********************************************************************************************************************************************************************************--
'''////////LOGICA DE MENSAJES : TAMAŅO 1 o 2 = los 40 principales
if len(res)=1 or len(res)=2 then
if ucase(prefix)="CDIAL" then
tablatop="toptendial"
else
tablatop="topten"
end if
if isnumeric(res)=true then
cod_top=res
sql="Select * from titulos_canciones where "&tablatop&"="&cod_top&""
top.open sql,conexion
cod_cancion=top("cod_cancion")
sqls="Select * from canciones_"&mov&" where cod_cancion="&cod_cancion&""
melodia.open sqls,conexion
if not melodia.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&cod_cancion&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
if mov="Motorola" then
pedido=melodia("cancion")
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido=melodia("cancion_sms")
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif len(res)=3 or len(res)=4 and ucase(res) <> "NOME" and ucase(res) <> "MBRE" then
If Ucase(res) = "ALTA" then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&Prefix&"','Activar','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
sqlalt2="INSERT INTO ACCESO_MELODIA_PROVS (telefono,proveedor,afiliado,fecha,activado) VALUES ("&right(Phone,9)&",'5558','"&essi & Prefix&"','"&fecha&"',1)"
conexion.execute sqlalt2
pedido="Su telefono ha sido activado.Gracias por utilizar nuestro servicio."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
cod_top=res
if isnumeric(cod_top)=true then
sqls="Select * from canciones_"&mov&" where cod_cancion="&cod_top&""
melodia.open sqls,conexion
if not melodia.eof then
'cabeceras alias
'########################################
sqlala="select * from alias where palabra='"&ucase(cabeza)&"'"
rs5.open sqlala,conexion
if not rs5.eof then
if ucase(cabeza)=rs5("palabra") then
guarda=ucase(cabeza)
end if
else
guarda=cod_top
end if
'##########################################
if prefpref="MULT" then
prefi="MULT"
else
prefi=prefix
end if
if guarda="" then
guarda=message
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&prefi&"','"&guarda&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
if mov="Motorola" then
pedido=melodia("cancion")
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido=melodia("cancion_sms")
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
elseif len(res)=5 then
cod_logo=right(res,5)
if isnumeric(left(cod_logo,1))= true then
if left(cod_logo,1)=9 then
sql="Select * from logos where ref_logo="&cod_logo&""
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
enviarlogo=logo("logo_nol")
tiposms="logo"
cod_l=right(cod_logo,2)
if isnumeric(cod_l)=False or isnumeric(movi)=false then
tam_envia=len(enviarlogo)-8
enviarlog=right(enviarlogo,tam_envia)
enviarlogo="83128100090E" & enviarlog
tiposms="logoems"
end if
pedido=enviarlogo
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=2 then
'juegos java
if isnumeric(cod_logo)=true then
sqlcom="select * from juegos where cod_juego="&cod_logo
rs.open sqlcom,conexion
if not rs.eof then
cod_logo=rs("ref_wap")
mensajest=3
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha) values "
sqlpo=sqlpo & "("&phone&",'"&cod_logo&"','JAVA',"&mensajest&",GETDATE())"
conexion.execute sqlpo
pedido="Envia ahora "&prefix&" seguido de un espacio y la palabra JUEGO1 al "&desde&"."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&cod_logo&"','JUEGOS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=3 then
''True tones
if isnumeric(cod_logo)=true then
sql="select * from TRUETONES where NOMBRE="&cod_logo
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','TRUETONES','"&fecha&"','"&desde&"')"
conexion.execute sqlg
sqlg="INSERT INTO act_ttones (telefono,referencia,mensajes,fecha) VALUES ("&Phone&",'"&cod_logo&"',1,GETDATE())"
conexion.execute sqlg
pedido="Ahora envia " & prefix & " seguido de un espacio y la palabra DESCARGA al " & desde & " para descargar tu melodia"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
'fondos a color
elseif left(message,1)=4 then
if isnumeric(cod_logo)=true then
sql="select * from fondos_color where cod_fondo='"&right(message,4)&"'"
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','FONDOS_COLOR','"&fecha&"','"&desde&"')"
conexion.execute sqlg
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha,nombre) values "
sqlpo=sqlpo & "("&phone&",'"&cod_logo&"','FCOLOR',1,GETDATE(),'"&prefix&"')"
'sqlg="INSERT INTO PUSH_SI(TELEFONO, MENSAJE, TIPO, DESCARGADO, FECHA, cliente) VALUES ("&right(phone,9)&",'"&cod_logo&"','FCOLOR',0,GETDATE(),'e-com')"
conexion.execute sqlpo
pedido="Ahora envia " & prefix & " seguido de un espacio y la marca de tu movil al " & desde & " para efectuar tu descarga"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
'salvapantallas a color
elseif left(message,1)=6 then
if isnumeric(cod_logo)=true then
sql="select * from animaciones where cod_animacion='"&right(message,4)&"'"
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','SALVA_COLOR','"&fecha&"','"&desde&"')"
conexion.execute sqlg
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha,nombre) values "
sqlpo=sqlpo & "("&phone&",'"&cod_logo&"','SCOLOR',1,GETDATE(),'"&prefix&"')"
'sqlg="INSERT INTO PUSH_SI(TELEFONO, MENSAJE, TIPO, DESCARGADO, FECHA, cliente) VALUES ("&right(phone,9)&",'"&cod_logo&"','FCOLOR',0,GETDATE(),'e-com')"
conexion.execute sqlpo
pedido="Ahora envia " & prefix & " seguido de un espacio y la marca de tu movil al " & desde & " para efectuar la descarga."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=5 then
sql="select * from ascii_anim2 where id_anim="&cod_logo
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
enviarlogo=logo("text")
pedido=enviarlogo
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=7 then
sql="Select * from salvapantallas where ref_logo="&cod_logo&""
logo.open sql,conexion
if not logo.eof then
phonex=right(phone,9)
SQLPSI="INSERT INTO PUSH_SI(telefono,mensaje,tipo,ruta,descargado,fecha,cliente,marca)VALUES ("&phonex&",'"&message&"','.gif','http://www.genexies.com/salvapantallas/gif_send/',0,GETDATE(),'"&prefix&"',99)"
conexion.execute sqlpsi
pedido="Tu descarga ha sido activada. entra mediante el navegador wap de tu movil en http://www.tupedido.com y descarga tu pedido. Intro telef y ref numerica ej:70004"
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=1 then
if isnumeric(cod_logo)=true then
pmsg=cod_logo
sql="Select * from titulos_polifonicas where cod_cancion="&pmsg&""
logo.open sql,conexion
if not logo.eof then
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha,nombre) values "
sqlpo=sqlpo & "("&phone&",'"&pmsg&"','POLIFONICAS',1,GETDATE(),'"&prefix&"')"
conexion.execute sqlpo
pedido="Envia ahora "&prefix&" seguido de un espacio y la marca de tu movil al "&desde&". Ej: "&polires&" SIEMENS"
tiposms="text"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&Prefix&"','0"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
'mandamos mensaje de error el sms esta mal escito
pedido="Lo sentimos no hemos reconocido la referencia. Envia "&polires&" seguido de un espacio y la referencia."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
'mandamos mensaje de error el sms esta mal escito
pedido="Lo sentimos no hemos reconocido la referencia. Envia "&polires&" seguido de un espacio y la referencia."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif left(cod_logo,1)=8 then
cod_logo=right(res,4)
sql="Select * from logo_fotos where id_logofoto="&cod_logo&""
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
enviarlogo=logo("hex_logo")
tiposms="logo"
cod_l=right(cod_logo,2)
if isnumeric(cod_l)=False or isnumeric(movi)=false then
enviarlogo="83128100090E" & enviarlogo
tiposms="logoems"
else
enviarlogo="00480E01" & enviarlogo
tiposms="logo"
end if
pedido=enviarlogo
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif len(res)=6 or ucase(left(res,4)) ="NOME" then
if Ucase(res)= "NOMBRE" or ucase(res)="NOME" then
prefix=replace(prefix," ","_")
if Ucase(res)= "NOMBRE" then
total=len(message)-6
nombre=right(Message,total)
marca=right(nombre,3)
elseif ucase(res)="NOME" then
total=len(message)-4
nombre=right(Message,total)
marca=right(nombre,3)
end if
if ucase(marca)=" NO" then
nombre=left(nombre,len(nombre)-3)
marca=""
elseif ucase(marca)=" SI" or ucase(marca)=" AL" then
nombre=left(nombre,len(nombre)-3)
marca=ucase(marca)
else
marca=""
end if
if right(nombre,1)=" " then
nombre=left(nombre,len(nombre)-1)
end if
elegido=right(nombre,2)
if isnumeric(elegido)=true then
fuente=right(nombre,2)
nombre=left(nombre,len(nombre)-2)
logo=""
else
logo=right(nombre,1)
nombre=left(nombre,len(nombre)-1)
fuente=right(nombre,1)
nombre=left(nombre,len(nombre)-1)
end if
if isnumeric(logo)=true then
nombre=nombre & fuente
fuente=logo
logo="nulo"
end if
response.write "elegido: " & elegido & "
"
response.write "logo: " & logo & "
"
response.write "fuente: " & fuente & "
"
response.write "nombre: " & nombre & "
"
response.write "marca: " & marca & "
"
if logo="nulo" then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect"../nombres/nimg.php?alertid="&alertid&"&texto="&nombre&"&fuente="&fuente&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&marca&"&web="&web
'response.redirect "../nombres/nlogo.php?AlertID="&alertid&"&texto="&nombre&"&fuente="&fuente&"&tipo="&logo&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&marca&"&alertid="&alertid&"&web="&web
response.end
end if
if isnumeric(elegido)=false then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/nameylogo.asp?AlertID="&alertid&"&texto="&nombre&"&fuente="&fuente&"&tipo="&logo&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&marca&"&enviar=SI"
response.end
end if
marca=right(marca,2)
if fuente="01" or fuente="02" or fuente="03" or fuente="04" or fuente="05" or fuente="06" or fuente="07" or fuente="08" or fuente="09" or fuente="10" or fuente="11" or fuente="12" or fuente="13" or fuente="14" or fuente="15" or fuente="16" or fuente="17" or fuente="18" or fuente="19" or fuente="20" or fuente="21" or fuente="22" then
if right(nombre,1)=" " then
tot_name=len(nombre)-1
name=left(nombre,tot_name)
else
name=nombre
end if
else
fuente="01"
name=nombre
end if
if fuente="10" or fuente="11" or fuente="12" or fuente="13" or fuente="14" or fuente="15" or fuente="16" or fuente="17" or fuente="18" or fuente="19" or fuente="20" or fuente="80" or fuente="81" or fuente="82" or fuente="83" or fuente="84" or fuente="85" or fuente="86" or fuente="87" or fuente="88" or fuente="89" then
fuent="02"
if right(nombre,1)=" " then
tot_name=len(nombre)-1
name=left(nombre,tot_name)
else
name=nombre
end if
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect"../nombres/nameylogo.asp?AlertID="&alertid&"&texto="&name&"&fuente="&fuent&"&tipo="&fuente&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&marca&"&enviar=SI"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
response.redirect "../nombres/oldimg.php?alertid="&alertid&"&texto="&name&"&fuente="&fuente&"&phone="&phone&"&op="&opera&"&priority="&TypeSms&"&cabec="&prefix&"&From="&desde&"&modelo="&marca&"&alertid="&alertid&"&web="&web
response.end
end if
'response.end
else
'''----------------------polifonicas de 6 digitos --------------------------'''
pmsg=message
polires=prefix
if isnumeric(pmsg)=true then
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha) values "
sqlpo=sqlpo & "("&phone&",'"&pmsg&"','PENDIENTE',1,GETDATE())"
conexion.execute sqlpo
pedido="Envia ahora "&polires&" seguido de un espacio y la marca de tu movil al "&desde&". Ej: "&polires&" SIEMENS"
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
end if
elseif len(res)=7 then
If Ucase(res) = "ACTIVAR" then
sqlalt="INSERT INTO ACCESO_MELODIA_PROVS (telefono,proveedor,afiliado,fecha,activado) VALUES ("&right(Phone,9)&",'5558','"&Prefix&"','"&fecha&"',1)"
conexion.execute sqlalt
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','Activar','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Su telefono ha sido activado.Gracias por utilizar nuestro servicio."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
if isnumeric(left(res,1))=true then
if left(res,1)=9 then
if movi <> "" then
message= res & " " &movi
end if
marc=right(message,2)
if IsNumeric(marc)=True then
midemess=len(message)-3
message=left(message,midemess)
cod_logotipo=(left(right(Message,7),3))
cod_logo=(left(right(Message,4),4))
marca=""
tiposms="logo"
else
marca=(right(message,2))
midemess=len(message)-3
message=left(message,midemess)
cod_logotipo=(left(right(Message,7),3))
cod_logo=(left(right(Message,4),4))
tiposms="logoems"
end if
sql="Select * from logos where cod_logotipo="&cod_logotipo&" and cod_logo="&cod_logo&""
logo.open sql,conexion
if not logo.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&Message&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
if marca="" then
envialogo=logo("logo_nol")
else
envialogo=logo("logo_nol")
tam_envia=len(envialogo)-8
envialog=right(envialogo,tam_envia)
envialogo="83128100090E" & envialog
end if
pedido=envialogo
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
'''----------------------polifonicas de 7 digitos --------------------------'''
pmsg=message
polires=prefix
if isnumeric(pmsg)=true then
sqlpo="insert into act_polifonicas (telefono,referencia,marca,mensajes,fecha) values "
sqlpo=sqlpo & "("&phone&",'"&pmsg&"','PENDIENTE',1,GETDATE())"
conexion.execute sqlpo
pedido="Envia ahora "&polires&" seguido de un espacio y la marca de tu movil al "&desde&". Ej: "&polires&" SIEMENS"
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
'mandamos mensaje de error el sms esta mal escito
pedido="Lo sentimos no hemos reconocido la referencia. Envia "&polires&" seguido de un espacio y la referencia."
tiposms="text"
alertid=alertid'"20002""20000"
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&pmsg&"','POLIFONICAS','"&fecha&"','"&desde&"')"
conexion.execute sqlg
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
''----------------------------------fin polifonicas de 7 digitos--------------------------''
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
elseif len(res)=8 then
melo=right(res,4)
if isnumeric(melo)=true then
sqls="Select * from canciones_"&mov&" where cod_cancion="&melo&""
melodia.open sqls,conexion
if not melodia.eof then
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"&essi & Prefix&"','"&melo&"','"&mov&"','"&fecha&"','"&desde&"')"
conexion.execute sqlg
if mov="Motorola" then
pedido=melodia("cancion")
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
else
pedido=melodia("cancion_sms")
tipo=tiposms
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"','"&TypeSms&"','"&prefix&"','"&desde&"','0')"
conexion.execute xmpSQL
response.write "OK"
response.end
end if
else
sqlg="INSERT INTO xmap_myalert (telefono,cabecera,mensaje,modelo,fecha,desde) VALUES ("&Phone&",'"& Prefix&"','"&Message&"','Error!','"&fecha&"','"&desde&"')"
conexion.execute sqlg
pedido="Lo sentimos. No hemos reconocido la referencia que has solicitado."
tipo="text"
xmpSQL= "INSERT INTO XMAP_ENVIOS (AlertID, Phone, MsgText, Type, op, Priority, Prefix,Ffrom,Status) VALUES "
xmpSQL= xmpSQL & "("&alertid&","&phone&",'"&pedido&"','"&tipo&"','"&opera&"'