<% ' ## function safestr(strx) strx=replace(strx,chr(8),"") strx=replace(strx,chr(9),"") strx=replace(strx,chr(10),"") strx=replace(strx,chr(11),"") strx=replace(strx,chr(12),"") strx=replace(strx,chr(13),"
") strx=replace(strx,chr(34),""") strx=replace(strx,chr(39),"’") safestr=strx end function ' ## miniweb = request.queryString("pk_empresas") if miniweb <> "" and not isNull(miniweb) then cadenaError = "" ' creo la conexion on error resume next set conntemp=server.createobject("adodb.connection") conntemp.open cadena_conexion if err then cadenaError = "Ocurrió un error cargando la web. Consulte al administrador." & err.Description else ' recupero los datos de la web sql = "SELECT te_tituloweb, te_fotocabecera, te_foros FROM TEMPRESAS WHERE pk_empresas = "& miniweb &" AND te_activo = 1 AND te_estado = 1" on error resume next set rs = conntemp.execute(sql) if err then cadenaError = "Ocurrió un error cargando la web. Consulte al administrador." & err.Description else if rs.eof then cadenaError = "Ocurrió un error cargando la web. Consulte al administrador." & err.Description else te_tituloweb = rs("te_tituloweb") te_fotocabecera = rs("te_fotocabecera") if not isNull(te_fotocabecera) then fondoCabecera = "background-image: url(../actualizer/miniwebs/fotos/"& te_fotocabecera &");" if te_fotocabecera = "1" then fondoCabecera = "background-image: url(images/cabecera-1.jpg);" if te_fotocabecera = "2" then fondoCabecera = "background-image: url(images/cabecera-2.jpg);" if te_fotocabecera = "3" then fondoCabecera = "background-image: url(images/cabecera-3.jpg);" if te_fotocabecera = "4" then fondoCabecera = "background-image: url(images/cabecera-4.jpg);" if te_fotocabecera = "5" then fondoCabecera = "background-image: url(images/cabecera-5.jpg);" if te_fotocabecera = "6" then fondoCabecera = "background-image: url(images/cabecera-6.jpg);" if te_fotocabecera = "7" then fondoCabecera = "background-image: url(images/cabecera-7.jpg);" if te_fotocabecera = "8" then fondoCabecera = "background-image: url(images/cabecera-8.jpg);" if te_fotocabecera = "9" then fondoCabecera = "background-image: url(images/cabecera-9.jpg);" if te_fotocabecera = "10" then fondoCabecera = "background-image: url(images/cabecera-10.jpg);" if te_fotocabecera = "11" then fondoCabecera = "background-image: url(images/cabecera-11.jpg);" if te_fotocabecera = "12" then fondoCabecera = "background-image: url(images/cabecera-12.jpg);" else fondoCabecera = "background-image: url(../images/cabecera-1.jpg);" end if te_foros = rs("te_foros") end if end if if cadenaError = "" then sqlAP1 = "SELECT numero, referencia FROM MW_TAP1 WHERE activa = 1 AND fk_empresas = "& miniweb &" ORDER BY orden DESC" on error resume next set rsAP1 = conntemp.execute(sqlAP1) if err then cadenaError = "Ocurrió un error cargando la web. Consulte al administrador." & err.Description end if end if end if else cadenaError = "Ocurrió un error cargando la web. Consulte al administrador." & err.Description end if if cadenaError = "" then if request.form("contacto") = "si" then envioError = "" ' <- guardaremos si hay algun error quesec="X01|VER+CORREOS" sec_code=ucase(mid(quesec,1,instr(quesec,"|")-1)) lafecha=date() d=day(lafecha) if d<10 and len(d)=1 then d="0" & d m=month(lafecha) if m<10 and len(m)=1 then m="0" & m lafecha=d & "/" & m & "/" & year(lafecha) lahora=cstr(time) if ((instr(lahora,":"))<=2) then lahora="0" & lahora end if fechahora=lafecha & " " & lahora enter="
" emailContacto=request.form("email") if emailContacto="null" then emailContacto="" end if on error resume next set conntemp=server.createobject("adodb.connection") conntemp.Open cadena_conexion if err then envioError = "Error :: creando la conexion :: " 'Response.End end if ' Obtenemos el email de destino mySQL="SELECT * FROM MW_TFS_DIREC WHERE fk_empresas=" & miniweb on error resume next set rstemp=conntemp.execute(mySQL) if err then envioError = "Error :: recuperando los datos para el envio " ' Response.End end if if rstemp("campo1") = "" then envioError = "Error :: recuperando los datos para el envio " else emailDestino=rstemp("campo1") end if set rstemp=nothing ' Captura de campos del formulario ' variables recogidas de flash ' nombre ' empresa ' email ' telefono ' mensaje nombre = safestr(request.form("nombre")) 'empresa = safestr(request.form("empresa")) apellidos = safestr(request.form("apellidos")) 'direccion=safestr(request.("direccion")) 'poblacion = safestr(request.form("ciudad")) 'provincia=safestr(request("provincia")) 'pais = safestr(request.form("pais")) 'cp=safestr(request("cp")) 'telefono1=safestr(request("telefono")) 'telefono2=safestr(request("telefono2")) 'fax=safestr(request("fax")) comentarios=safestr(request("comentario")) cor_campos="" cor_campos=cor_campos & "" & "Nombre: " & "" & "" & nombre & "" & "|" & enter cor_campos=cor_campos & "" & "Apellidos: " & "" & "" & apellidos & "" & "|" & enter 'cor_campos=cor_campos & "" & "Empresa " & "" & "" & empresa & "" & "|" & enter 'cor_campos=cor_campos & "" & "Población: " & "" & "" & poblacion & "" & "|" & enter 'cor_campos=cor_campos & "" & "País: " & "" & "" & pais & "" & "|" & enter 'cor_campos=cor_campos & "" & "Dirección: " & "" & "" & direccion & "" & "|" & enter 'cor_campos=cor_campos & "" & "Provincia: " & "" & "" & provincia & "" & "|" & enter 'cor_campos=cor_campos & "" & "CP: " & "" & "" & cp & "" & "|" & enter 'cor_campos=cor_campos & "" & "Teléfono : " & "" & "" & telefono1 & "" & "|" & enter 'cor_campos=cor_campos & "" & "Teléfono 2: " & "" & "" & telefono2 & "" & "|" & enter 'cor_campos=cor_campos & "" & "Fax: " & "" & "" & fax & "" & "|" & enter hora=time fecha=date() xdia=day(fecha) if xdia<10 and len(xdia)=1 then xdia="0" & xdia xmes=month(fecha) if xmes<10 and len(xmes)=1 then xmes="0" & xmes fecha=year(fecha) & "/" & xmes & "/" & xdia mySQL = "INSERT INTO MW_TFS_ENVIO (cor_fecha,cor_hora,cor_campos,cor_email,cor_info,cor_enviado,cor_sec_code, fk_empresas) VALUES (" &_ "'" & fecha & "','" & hora & "','" & cor_campos & "','" & emailContacto & "','" & comentarios & "','" & emailDestino &_ "','" & sec_code & "', "& miniweb &")" on error resume next conntemp.execute(mySQL) if err then Response.write "Error 3 " Response.End else if envioError = "" then ' Envio de email contenido="Formulario de contacto del ADEIT - "& te_tituloweb & enter & enter contenido=contenido & "Nombre: " & nombre & enter 'contenido=contenido & "Empresa: " & empresa & enter contenido=contenido & "Apellidos: " & apellidos & enter 'contenido=contenido & "Dirección: " & direccion & enter 'contenido=contenido & "Población: " & poblacion & enter 'contenido=contenido & "Provincia: " & provincia & enter 'contenido=contenido & "CP: " & cp & enter 'contenido=contenido & "Teléfono : " & telefono1 & enter 'contenido=contenido & "Teléfono 2: " & telefono2 & enter 'contenido=contenido & "Fax: " & fax & enter 'contenido=contenido & "País: " & pais & enter contenido=contenido & "Email: " & emailContacto & enter contenido=contenido & "Comentario: " & comentarios & enter titulo="Formulario de contacto de ADEIT - "& te_tituloweb & " enviado el: " & fechahora 'Titulo de mensaje e=envio(emailDestino,emailDestino,titulo,contenido) if e=0 then ' respuesta al flash envioError = "respuesta=Ocurrio un error en el envio" else envioError = "Su mensaje se envió con éxito. Gracias." end if end if end if end if %> ADEIT - <%=te_tituloweb%>
<%'=te_tituloweb%>
<% if rsAP1.eof then %> No dispone de contenido <% else do while not rsAP1.eof %> ')" class='enlaceMenu'><%=rsAP1("referencia")%> <% rsAp1.movenext loop end if if te_foros <> "" and not isNull(te_foros) then %> FORO <% end if %>
<% if envioError = "" or isNull(envioError) then %> <% sqlAP1 = "SELECT contenido FROM MW_TAP1 WHERE activa = 1 AND fk_empresas = "& miniweb &" ORDER BY orden DESC" on error resume next set rsAP1 = conntemp.execute(sqlAP1) if err then contenido = "Ocurrió un error cargando el contenido." else contenido = rsAP1("contenido") contenido = replace(contenido,""","'") contenido = replace(contenido,"./fotos/","gestion/ap1/fotos/") contenido = arreglaCadenaAjax(contenido) end if response.write(contenido) %> <% else %> <%=envioError%> <% end if %>
ADEIT, Fundación Universidad-Empresa de Valencia
<% else %> Error en los parámetros






<%=cadenaError%>
<% end if %>