View file wap/rangall.php

File size: 1.21Kb
<?php
 echo "<left>";
    $sql = "SELECT id, uid, imageurl, info FROM mx_usergallery ORDER BY RAND()  LIMIT 3";

    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {

      $id = $item[0];
	$img = $item[2];
 $cname = cname($item[1]);
 if(($cname == "000000")||($cname == "")){ $fonto = "";
 $fontc = ""; }else{ $fonto = "<font color=\"$cname\">";
 $fontc = "</font>"; }
      $whonick = getnick_uid($item[1]);
   $ext = getext($img);
        $foto = "<img src=\"thumb.php?image=$img&amp;w=30&amp;h=40&amp;type=$ext\" alt=\"$whonick\"/>";
        $text1 = htmlspecialchars($item[3]);
 $ctext = ctext($item[1]);
 if(($ctext == "000000")||($ctext == "")){ $texto = "";
 $textc = ""; }else{ $texto = "<font color=\"$ctext\">";
 $textc = "</font>"; }
    $online = mysql_fetch_array(mysql_query("SELECT sex, uicon FROM mx_users WHERE id='".$item[1]."'"));

 if($online[1]=="")
 {
 $seximg = "";
}else{
 $seximg = "<img src=\"$online[1]\" alt=\"*\"/>";
 }
        echo "<table><tr><td>$foto</td><td>$seximg<b>$fonto$whonick$fontc</b><br/>$texto$text1$textc</td></tr></table>";

    }
    }
 echo "</left>"; 
?>