hey guys im having error on my online list users have option to add a online msg on the page but it dnt show it it just show their gender i know its really small error can anyone please help out
Code:
///////////online list else if($action=="online") { addonline(getuid_sid($sid),"Online List","index.php?action=$action"); echo "<head>\n"; echo "<title>$sitetitle</title>\n"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">"; echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n"; echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n"; echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n"; echo "</head>"; echo "<body>"; echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"60\" width=\"159\">"; echo "<tr>"; echo "<td id=\"body\" width=\"159\">"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "<small>"; echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">"; echo "<tr>"; echo "<td class=\"boxedTitle\" height=\"20\">"; echo "<h1 align=\"center\" class=\"boxedTitleText\">"; $onu = getnumonline(); echo "Members Online: <b>$onu</b><br/>"; echo "</h1></td>"; echo "</tr>"; echo "<td class=\"boxedContent\">"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $num_items = getnumonline(); //changable $items_per_page= 5; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql $sql = "SELECT a.name, b.place, b.userid, sex, perm FROM ibwf_users a INNER JOIN ibwf_online b ON a.id = b.userid GROUP BY 1,2 LIMIT $limit_start, $items_per_page "; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { if ($item[4]=="1") { // $lnk = "<a class=\"mod\" href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$item[0]</a>"; } elseif ($item[4]=="2") { // $lnk = "<a class=\"admin\" href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$item[0]</a>"; } elseif ($item[4]=="3") { // $lnk = "<a class=\"owner\" href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$item[0]</a>"; } if ($item[4]=="0") { $staff = ""; } else if ($item[4]=="1") { $staff = "[M]"; } else if ($item[4]=="2") { $staff = "[A]"; } else if ($item[4]=="4") { $staff = "[V]"; } else if ($item[4]=="3") { $staff = "[O]"; } if($item[4]=='3') { $name = "<font color=\"red\">$item[0]</font>"; } else if($item[4]=='2') { $name = "<font color=\"blue\">$item[0]</font>"; } else if($item[4]=='4') { $name = "<font color=\"orange\">$item[0]</font>"; } else if($item[4]=='1') { $name = "<font color=\"yellow\">$item[0]</font>"; } else if($item[5]>0) { $name = "<font color=\"lime\">$item[0]</font>"; } else { $name = $item[0]; } $avlink = getavatar($item[2]); if ($avlink!=""){ echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>"; }else{ echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>"; } $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$item[0]'")); if($sex[0]=="M"){$usersex = "I'm Male <img src=\"images/male1.gif\" alt=\"M\"/><br/>";} if($sex[0]=="F"){$usersex = "I'm Female <img src=\"images/female1.gif\" alt=\"F\"/><br/>";} if($sex[0]==""){$usersex = "I'm a dreamerz freak..<img src=\"images/freak.gif\" alt=\"F\"/><br/>";} $text = parsepm($item[3], $sid); $onmsg = "~ <font color=\"blue\">$text</font>~"; $lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$name</a>"; $whereami = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='$item[2]'")); if ($whereami[0]=="") { $myloc = $item[1]; } else { $myloc = "<a href=\"$whereami[0]&sid=$sid\">$item[1]</a>"; } echo " $lnk <b>$staff</b><br/> ᾠ $usersex <br/> <font color=\"green\"><b>» Where : </b>$myloc</font> <br/>$tit<br/>"; echo "<b>± </b> Online Msg : $onmsg<br/>"; echo"<img src=\"images/line.gif\" alt=\"\"/><br/>"; } echo "</td>"; echo "</table>"; echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">"; echo "<tr>"; echo "<td class=\"boxedTitle\" height=\"20\">"; echo "<h1 align=\"center\" class=\"boxedTitleText\">"; echo "Online Stats"; echo "</h1></td>"; echo "</tr>"; echo "<td class=\"boxedContent\">"; echo "<p>"; $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'")); print "Most online: <b>$mols[1]</b><br/>"; $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'")); echo "Online Today: <b>$mols[0]</b><br/>"; echo "<td>"; echo "</table>"; include ("popups.php"); echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">Next»</a>"; } echo "$page/$num_pages<br/>"; if($num_pages>2) { echo getjumper($action, $sid,"index"); } echo "</p>"; ////// UNTILL HERE >> echo "<center>"; echo "<form action=\"index.php?action=uponmsg&sid=$sid\" method=\"post\">"; echo "Text:<input name=\"text\" maxlength=\"100\" value=\"$dmsg\"/><br/>"; echo "<input type=\"submit\" value=\"Save\"/>"; echo "</form><br/>"; echo "</center>"; echo "<p align=\"left\">"; echo "<a href=\"index.php?action=main&sid=$sid\">"; echo "Home</a>"; echo " > "; echo "Online List"; echo "</small></p>"; echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"; echo "<td id=\"footer\">"; echo "<p id=\"legal\">© $sitetitle $year</p>"; echo "</td>"; echo "</table>"; echo "</body>"; echo "</html>"; exit(); }
Comment