<% Set Connect2 = Server.CreateObject("ADODB.Connection") strConnMySql2 = "DRIVER=MySQL ODBC 3.51 Driver;SERVER=localhost;db=Z08149_bl15001_blacklemon_35b; uid=Z0814_wppcnight;pwd=nrVg4?26" Connect2.Open strConnMySql2 Session.Lcid = 1040 Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "SELECT * FROM `wp_term_relationships`, wp_posts WHERE wp_posts.ID = wp_term_relationships.object_id AND term_taxonomy_id = 31901 AND post_status = 'publish' ORDER BY `object_id` DESC LIMIT 1" 'modelle RecSet.open SQL, Connect2 IF NOT RecSet.EOF THEN id_modella = RecSet("ID") Set RecSet2 = Server.CreateObject("ADODB.Recordset") SQL2 = "SELECT * FROM wp_posts WHERE ID = "&id_modella&"" 'recupero nome pagina RecSet2.open SQL2, Connect2 IF NOT RecSet2.EOF THEN post_date = RecSet2("post_date") post_name = RecSet2("post_name") anno_post = Year(post_date) mese_post = Month(post_date) if len(mese_post)=1 then mese_post = "0"&mese_post end if giorno_post = Day(post_date) if len(giorno_post)=1 then giorno_post = "0"&giorno_post end if path = "/index.php/"&anno_post&"/"&mese_post&"/"&giorno_post&"/"&post_name&"/" END IF RecSet2.Close Set RecSet2 = nothing END IF RecSet.Close Set RecSet = nothing Connect2.Close Set Connect2 = nothing IF path="" THEN Response.Redirect "/?p="&id_modella ELSE Response.Redirect path END IF %>