Hay 13192 invitados y ningún miembro en línea

Por orden alfabético:

ABCDEFGHIJKLMNÑOPQRSTUVWXYZ


Por búsqueda en el formulario:

{source}

<?php
if ( empty ( $_GET['var'] ) ) {
$apellido = $_POST['apellido'];
}
else {
$apellido = $_GET['var'];
}

$servername = 'db5012480943.hosting-data.io';
$username = 'dbu2161534';
$password = 'Javier09Madrid87';
$dbname = 'dbs10493308';
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo '<div align="justify">';

echo '<a name="res"></a>';
$sql = "SELECT * FROM jju6_escudos WHERE Apellido LIKE '$apellido%' ORDER BY Apellido ASC";
$result = $conn->query($sql);

echo "<p><b>Resultados exactos o más aproximados: ";
$row_cnt = $result->num_rows;
printf(" %d \n", $row_cnt);

echo "</b></p>";

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<font color="#CC0000"><b> &#8226;&nbsp;</b></font>';
echo '<a href="/escudos?var='.$row['Apellido'].'#res">'.$row['Noms'].'</a>';
}

echo "</div>";
} else {

//echo "Puede usar solo las primeras letras del apellido, el buscador mostrará el primer apellido que empiece con esas letras";
echo "</div>";
}

$sql = "SELECT * FROM jju6_escudos WHERE Apellido < '$apellido' ORDER BY apellido DESC LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {

echo '<table width="100%" height="20" border="0"><tr><td width="33%" align="top"><div align="left">';

if ( empty ( $_GET['var'] ) ) {
$apellido = $_POST['apellido'];

}

//ANTERIOR, Aleatorio y SIGUIENTE


echo "<b>ANTERIOR</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png" title="ESCUDO PRECEDENTE" width="100" height="120">';
echo '</td>';

//Aleatorio superior
//____________________________________________________________________

echo '<td><div align="center">';

$sql = "SELECT * FROM jju6_escudos ORDER BY RAND() LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {

echo "<b>Aleatorio&nbsp;";
echo $row["id"] ."</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png" title="ESCUDO ALEATORIO" width="100" height="120">';

echo '<a href="/escudos?var='.$row['Apellido'].'#res"></a>';
echo "</a><br>";
}

} else {

echo "<br><b>No disponible</b><br>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo 'xy.png" width="100" height="120"></a><br>';
}
echo '</div</td>';

//____________________________________________________________________
echo '<td width="33%"<div align="right">';
$sql = "SELECT * FROM jju6_escudos WHERE Apellido > '$apellido' ORDER BY apellido ASC LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<b>SIGUIENTE</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png"  title="ESCUDO SIGUIENTE" width="100" height="120">';
echo "</a></td>";
echo "<hr>";
}
} else {
//echo "mensaje si necesario";
}
echo "</div>";
echo "</tr></table>";
}
} else {
//echo "mensaje si necesario";
}

//PRINCIPAL
$sql = "SELECT Apellido, Noms, Vers, Imagen, Lambreq FROM jju6_escudos WHERE Apellido LIKE '$apellido%' ORDER BY Apellido ASC LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<hr><table width=415 height=452 border=0 align="center" cellspacing=1 background=/images/lambrequines/';
echo $row["Lambreq"];
echo '.png bgcolor="#FFFFFF">';
echo  '<tbody><tr><td colspan=3 height=167>&nbsp; </td></tr><tr>';
echo '<td width=102 height=40 rowspan="2"> </td>';
echo '<td>';
//echo '<img src="/images/png/';

//echo '.png" width="211" height="253">';

echo '<a href="/soloescudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png"  title="ABRIR SIN LAMBREQUINES" width="211" height="253">';

//echo 'alt=$row["Noms"]';


//echo $row["Imagen"];
//echo '.png" width="211" height="253">';
//echo 'alt=$row["Noms"]';
echo '</a></td>';
echo '<td width=93 height=40 rowspan="2"></td>';
echo '<tr><td height=14 align=center valign=top><font size="1" face="Verdana"><font color="#4F0000" size="1">&copy; heraldicahispana 1995-2027</font></td></tr>';
echo '</tbody></table>';
echo '<div align="center">';
echo "<h3>" . $row["Noms"] . "</h3></div>";
//echo "</div>";
echo '<table align ="center" width="100%" height="8" border="2" cellpadding="10" bordercolor="#33CC33"><tr><td bgcolor="#F8FFF4"><font color="#4F0000">';
echo '<div align="justify">';
include("Vers/" . $row["Vers"] . ".txt");
echo "</div>";
echo "</td></tr></table>";
}
} else {
echo "<hr>";
echo '<table width="100%" cellpadding="10"  border="2" bordercolor="#CC0000"><tr><td><div align="justify">';
echo '<font color="CC0000">El resultado para el apellido buscado <b>según usted lo ha escrito</b>, debería encontrarse alfabéticamente entre el <b>ANTERIOR</b> y el <b>SIGUIENTE</b>, pero <b>NO</b> aparece  registrado en nuestra base de datos. Revise su grafía; el formulario admite mayúsculas, minúsculas, eñes, tildes y acentos pero no permite apóstrofes ni otros signos especiales.</font><br>';
echo '<font color="CC0000">Puede optar por usar solo<b> las primeras letras del apellido</b>, el buscador encontrará todos los apellidos registrados en nuestra base de datos que empiezan con esas letras.</font></div></td></tr></table>';
echo "<hr>";
}

//ANTERIOR, Aleatorio y SIGUIENTE
$sql = "SELECT * FROM jju6_escudos WHERE Apellido < '$apellido' ORDER BY apellido DESC LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<table width="100%" border="0"><tr><td width="33%"><div align="left">';
echo "<b>ANTERIOR</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png" title="PRECEDENTE" width="100" height="120">';
echo "</a>";
echo "</div></td>";

//Aleatorio inferior
//_________________________________________________________________

echo '<td><div align="center">';

$sql = "SELECT * FROM jju6_escudos ORDER BY RAND() LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {

echo "<b>Aleatorio&nbsp;";
echo $row["id"] ."</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png" title="ALEATORIO" width="100" height="120">';

echo '<a href="/escudos?var='.$row['Apellido'].'#res"></a>';
echo "</a><br>";
}

} else {

echo "<br><b>No disponible</b><br>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo 'xy.png" width="100" height="120"></a><br>';
}
echo '</div</td>';
//____________________________________________________________________

echo '<td width="33%"><div align="right">';
$sql = "SELECT * FROM jju6_escudos WHERE Apellido > '$apellido' ORDER BY apellido ASC LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<b>SIGUIENTE</b>";
echo "<h6>" . $row["Noms"] . "</h6>";
echo '<a href="/escudos?var='.$row['Apellido'].'#res"><img src="/images/png/';
echo $row["Imagen"];
echo '.png" title="SIGUIENTE" width="100" height="120">';
echo "</a></td>";
//echo "<br>";
}
} else {
//echo "Sin resultados para este apellido. ". $row["Apellido"] . " Examine su grafía y <b>NO use acentos ni ñ</b>, use <b>n</b> en su lugar.<br>";
//echo "Puede usar solo las primeras letras del apellido, el buscador mostrará el primer apellido registrado que empiece con esas letras.";
}
echo "</div>";
echo "</tr></table>";
//echo "<br>" . $row["RTF"];
//echo "<hr>";
}
} else {
//echo "Sin resultados para este apellido. ". $row["Apellido"] . " Examine su grafía y <b>NO use acentos ni ñ</b>, use <b>n</b> en su lugar.<br>";
//echo "Puede usar solo las primeras letras del apellido, el buscador mostrará el primer apellido que empiece con esas letras.";
}

//Cargar numero de registros en BD
$mysqli = new mysqli('db5012480943.hosting-data.io', 'dbu2161534', 'Javier09Madrid87', 'dbs10493308');
/* verificar la conexión */
if (mysqli_connect_errno()) {
printf("Conexión fallida: %s\n", mysqli_connect_error());
exit();
}
if ($result = $mysqli->query("SELECT * FROM `jju6_escudos`")) {
/* determinar el número de filas del resultado */
$row_cnt = $result->num_rows;
printf("<hr>Registros en la base de datos:<b> %d </b>\n", $row_cnt);
/* cerrar el resultset */
$result->close();
}
?>

<?php
$conn->close();
?>

{/source}