% ' Dim cnn, rst, sql, rst_aux, rst_mes Set cnn = Server.CreateObject("ADODB.Connection") Set cmd = Server.CreateObject("ADODB.Command") Set rst = Server.CreateObject("ADODB.RecordSet") Set rst_aux = Server.CreateObject("ADODB.RecordSet") Set rst_mes = Server.CreateObject("ADODB.RecordSet") Set saber_mes = Server.CreateObject("ADODB.RecordSet") Set rst_ind = Server.CreateObject("ADODB.RecordSet") Set rst_inf = Server.CreateObject("ADODB.RecordSet") cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=" & bdd Request.ServerVariables("REMOTE_ADDR") server.mappath("/") function si_no(param) if param = 0 then si_no = "No Publicada" else si_no = "Publicada" end if end function function sacar_chr128(txt) aux = "" for i = 1 to len(txt) if (mid(txt, i, 1) = chr(128)) then aux = aux & chr(39) else aux = aux & mid(txt, i, 1) end if next sacar_chr128 = aux end function function industria(id) if (id = 0) then industria = "No clasificado" else sql = "SELECT * FROM industria WHERE ind_id = " & id Set rst_ind = cnn.Execute(sql) industria = rst_ind("ind_des") end if end function function informante(id) if (id = 0) then informante = "No informa" else sql = "SELECT * FROM news WHERE news_id = " & id Set rst_inf = cnn.Execute(sql) informante = rst_inf("news_email") end if end function if (Request.QueryString = "") then annio = year(date) mes = month(date) else annio = Request.QueryString("annio") mes = Request.QueryString("mes") end if function lnk_url(aut, mai) if (mai = "" or mai = " " or isnull(aut)) then lnk_url = aut else if (mid(mai, 1, 7) = "http://") then lnk_url = "Web: " & aut & "" else lnk_url = "Web: " & aut & "" end if end if end function function lnk(aut, mai) if (mai = "" or mai = " " or isnull(mai)) then lnk = aut else if (mid(mai, 1, 4) = "http") then lnk = "" & aut & "" else lnk = "" & aut & "" end if end if end function %>