<br />// Find out how many are browsing this forum <br />$query = " <br />SELECT t1.O_Username,t1.O_Extra,t1.O_Type,t2.U_Status,t2.U_Visible,t2.U_Number <br />FROM {$config['tbprefix']}Online AS t1, <br /> {$config['tbprefix']}Users AS t2 <br />WHERE t1.O_Username = t2.U_Username <br />AND t1.O_Board = '$Board_q' <br />ORDER BY t1.O_Last DESC <br />"; <br />$sth = $dbh -> do_query($query); <br />$r = ""; <br />while (list($Who,$Extra,$Type,$Status,$Visible,$Uid) = $dbh -> fetch_array($sth)) { <br /> <br />if ( ($user['U_Status'] != "Administrator") && ($Visible == "no") ) { <br /> $a++; <br /> continue; <br />} <br /> if ( ($user['U_Status'] == "Administrator" || $user['U_Status'] == "Moderator") && ($Visible == "no")) { <br /> if ( $Type == "r" ) { <br /> if ( empty($r) ) $r = "<strong><em><a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o\">$Who</a></em></strong>"; <br /> else $r .= ", <strong><em><a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o\">$Who</a></em></strong>"; <br /> } <br /> continue; <br /> } <br /> <br /> if ( $Type == "r" ) { <br /> if ( empty($r) ) $r = "<a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o\">$Who</a>"; <br /> else $r .= ", <a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o\">$Who</a>"; <br /> } <br />} <br /> <br />if ( !empty($r) ) $r = "Browsing: $r"; <br /> <br />