host, $config->user, $config->password); mysql_select_db($config->db, $link); $nota_id = $_REQUEST['nota_id']; $query = 'SELECT id, alias FROM elx_k2_items WHERE nota_id = ' . mysql_real_escape_string($nota_id) . ';'; $result = mysql_query($query, $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $nota_params_arr = array($row['id'], $row['alias']); $link = 'index.php?option=com_k2&view=item&id=' . implode(':', $nota_params_arr) . '&Itemid=561'; header("Location: http://www.elporvenir.mx/".$link); } else { header("Location: http://www.elporvenir.mx/"); } ?>