 |
// SISTEMA DE CARETOS
function caretos($texto) {
// SALTOS DE L?NEA
$texto = str_replace("","",$texto) ;
$texto = str_replace("\n"," ",$texto) ;
// texto en negrita
$texto = str_replace("[b]","",$texto) ;
$texto = str_replace("[/b]","",$texto) ;
// texto en Cursiva
$texto = str_replace("[i]","",$texto) ;
$texto = str_replace("[/i]","",$texto) ;
// texto en subrayado
$texto = str_replace("[u]","",$texto) ;
$texto = str_replace("[/u]","",$texto) ;
// texto tachado
$texto = str_replace("[s]","",$texto) ;
$texto = str_replace("[/s]","",$texto) ;
// alinear texto a la izquierda
$texto = str_replace("[qe]","",$texto) ;
$texto = str_replace("[/qe]","",$texto) ;
// alinear texto al centro
$texto = str_replace("[qq]","",$texto) ;
$texto = str_replace("[/qq]","",$texto) ;
// alinear texto a la derecha
$texto = str_replace("[qw]","",$texto) ;
$texto = str_replace("[/qw]"," ",$texto) ;
// --> Inicio caretos
$texto = str_replace(":)","[sonrisa.gif]",$texto) ;
$texto = str_replace(":D","[sonrisagrande.gif]",$texto) ;
$texto = str_replace(":d","[devy.gif]",$texto) ;
$texto = str_replace(":(","[triste.gif]",$texto) ;
$texto = str_replace(":0","[sorpresa.gif]",$texto) ;
$texto = str_replace(":o","[sorpresa.gif]",$texto) ;
$texto = str_replace("xD","[xd.gif]",$texto) ;
$texto = str_replace(";)","[guino.gif]",$texto) ;
$texto = str_replace("(1)","[1.gif]",$texto) ;
$texto = str_replace("(2)","[2.gif]",$texto) ;
$texto = str_replace("(3)","[3.gif]",$texto) ;
$texto = str_replace("(4)","[4.gif]",$texto) ;
$texto = str_replace("(5)","[5.gif]",$texto) ;
$texto = str_replace("(6)","[6.gif]",$texto) ;
$texto = str_replace("(7)","[7.gif]",$texto) ;
$texto = str_replace("(8)","[8.gif]",$texto) ;
$texto = str_replace("(9)","[9.gif]",$texto) ;
$texto = str_replace("(10)","[10.gif]",$texto) ;
$texto = str_replace("(11)","[11.gif]",$texto) ;
$texto = str_replace("(12)","[12.gif]",$texto) ;
$texto = str_replace("(13)","[13.gif]",$texto) ;
$texto = str_replace("(14)","[14.gif]",$texto) ;
$texto = str_replace("(15)","[15.gif]",$texto) ;
$texto = str_replace("(16)","[16.gif]",$texto) ;
$texto = str_replace("(17)","[17.gif]",$texto) ;
$texto = str_replace("(18)","[18.gif]",$texto) ;
$texto = str_replace("(19)","[19.gif]",$texto) ;
$texto = str_replace("(20)","[20.gif]",$texto) ;
$texto = str_replace("(21)","[21.gif]",$texto) ;
$texto = str_replace("(22)","[22.gif]",$texto) ;
$texto = str_replace("(23)","[23.gif]",$texto) ;
$texto = str_replace("(24)","[24.gif]",$texto) ;
$texto = str_replace("(25)","[25.gif]",$texto) ;
$texto = str_replace("(26)","[26.gif]",$texto) ;
$texto = str_replace("(27)","[27.gif]",$texto) ;
$texto = str_replace("(28)","[28.gif]",$texto) ;
$texto = str_replace("(29)","[29.gif]",$texto) ;
$texto = str_replace("(30)","[30.gif]",$texto) ;
$texto = str_replace("(31)","[31.gif]",$texto) ;
$texto = str_replace("(32)","[32.gif]",$texto) ;
$texto = str_replace("(33)","[33.gif]",$texto) ;
$texto = str_replace("(34)","[34.gif]",$texto) ;
$texto = str_replace("(35)","[35.gif]",$texto) ;
$texto = str_replace("(36)","[36.gif]",$texto) ;
$texto = str_replace("(37)","[37.gif]",$texto) ;
$texto = str_replace("["," ",$texto) ;
return $texto ;
}
// FIN DEL SISTEMA DE LOS CARETOS
$resp = mysqli_query("select id from habbofotos_noticias where activo='1'") ;
$noticiastotales = mysqli_num_rows($resp) ;
mysqli_free_result($resp) ;
$resp = mysqli_query("select * from habbofotos_noticias where activo='1' order by id desc limit 5") ;
echo '';
while($datos = mysqli_fetch_array($resp)) {
$noticia = $datos[noticia];
$notic = caretos($noticia) ;
$topico = $datos[imagen];
if ($datos[ladoimagen]=="1") {
$lado ="left"; } else {
$lado ="right"; }
echo "
$datos[titulo] $notic |
| ";
}
echo " ";
mysqli_free_result($resp) ;
?> |
|
 |
|
|