hi guys how can i do this to my code to nxt page jumper [1]<234>[20]
this is my online list code
this is my online list code
PHP Code:
else if($do=="online")
{
echo "<head>";
echo "<title>Online List</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/$theme[0]\" />";
echo "</head>";
echo "<meta http-equiv=\"refresh\" content=\"30; URL= index.php?do=$do&sid=$sid&page=$page\"/>";
addonline(getuid_sid($sid),"Online List","index.php?do=$do");
addplace(getuid_sid($sid),"index.php?do=$do","");
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/$theme[0]\" />";
echo "<div class=\"all\"><div class=\"top\"><div class=\"right\">";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_private WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_private WHERE touid='".$uid."'"));
$unrd="".$unreadinbox[0]."";
if ($unreadinbox[0]>0)
{
echo "<a accesskey=\"1\" href=\"inbox.php?do=main&sid=$sid\">Inbox(<font color=\"red\">$unrd</font>)</a>";
}else{
echo "<a accesskey=\"1\" href=\"inbox.php?do=main&sid=$sid\">Inbox</a>";
}
$onbuds = getonbuds($uid);
echo " <a href=\"lists.php?do=buds&sid=$sid\">Friends($onbuds)</a>";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_alerts WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_alerts WHERE touid='".$uid."'"));
$unrd="".$unreadinbox[0]."";
if ($unreadinbox[0]>0)
{
echo "<a accesskey=\"1\" href=\"alerts.php?do=main&sid=$sid\">Alerts(<font color=\"red\">$unrd</font>)</a>";
}else{
echo "<a accesskey=\"1\" href=\"alerts.php?do=main&sid=$sid\">Alerts</a>";
}
echo " <a accesskey=\"3\" href=\"index.php?do=cpanel&sid=$sid\">User CP</a></div></div>";
echo "<div class='lowtop'><div align=\"left\"> <img src='images/an.png'alt='*'/><b> Shout Box:</b></div></div><div class='b'>";
echo getshoutbox4($sid);
$timeout = 3000;
$timeon = time()-$timeout;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_users WHERE janitor='1' AND lastact>'".$timeon."'"));
echo "<div class='lowtop'><b>Online Members - ".getnumonline()."</b></div>";
echo "<b><a href=\"janitor.xhtml?sid=$sid\">Online Staffs - ".$noi[0]."</a></b><hr class='separator'/>";
///////////echo "<div class='partner'><div align=\"center\"><a href='http://hitcoins.com/in.php?sid=170203'><img src=\"http://coding-talk.com/images/ad.gif\" alt=\"*\"/></a><br/><a href='http://hitcoins.com/in.php?sid=170203'><b>101%</b> FREE Downloads!!</a></div></div>";
$cou = $limit_start+1;
//////ALL LISTS SCRIPT <<
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yeh_users WHERE janitor='0' AND lastact>'".$timeon."'"));
if($page=="" || $page<=0)$page=1;
$num_items = getnumonline(); //changable
$items_per_page= 10;
$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, a.rango, b.userid FROM yeh_users a
INNER JOIN yeh_online b ON a.id = b.userid WHERE janitor='0'
ORDER BY a.perm DESC, a.plusses DESC, a.name
LIMIT $limit_start, $items_per_page
";
echo "<div align=\"left\">";
$shnick = getnick_uid($item[1]);
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
$uidnk = getuid_nick($item[0]);
$lnk = "<a href=\"user.php-$item[2]-$sid\"><font color=\"".ncolor($uidnk)."\">$item[0]</font></a>";
if($item[1]==1)
{
$item[1] = "<a href=\"user.php-$item[2]-$sid\"><font color=\"".ncolor($uidnk)."\">(v.i.p)$item[0]</font></a>";
}else if($item[1]==3)
{
$item[1] = "<a href=\"user.php-$item[2]-$sid\"><font color=\"".ncolor($uidnk)."\">(Princess)$item[0]</font></a>";
}else if($item[1]==4)
{
$item[1] = "<a href=\"user.php-$item[2]-$sid\"><font color=\"".ncolor($uidnk)."\">(Prince)$item[0]</font></a>";
}else if($item[1]==6)
{
$item[1] = "<a href=\"user.php-$item[2]-$sid\"><font color=\"".ncolor($uidnk)."\">(Modifier)$item[0]</font></a>";
}else if($item[1]==0)
{
$item[1] = "$lnk";
}
$sex = mysql_fetch_array(mysql_query("SELECT sex FROM yeh_users WHERE id='".$item[2]."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{
$usex = "";
}else if($nopl[0]==''){
$usex = "";
}else{
$usex = "";
}
{
$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<div class='avatar'>";
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}else{
echo "<div class='avatar'>";
echo "<img src=\"http://coding-talk.com/images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}
if ($item[3]=="M"){
$icon = "<img src=\"http://coding-talk.com/images/male.gif\" alt=\"\"/>";
}else
if ($item[3]=="F"){
$icon = "<img src=\"http://coding-talk.com/images/female.gif\" alt=\"\"/>";
}
}
$plc = mysql_fetch_array(mysql_query("SELECT place FROM yeh_online WHERE userid='".$item[2]."'"));
echo "$usex1$usex $item[1] - <small>$plc[0]</small></div><br/>";
}
if($page>1)
{
$ppage = $page-1;
echo " <div class=\"nav\"><a href=\"index.php?do=online&page=$ppage&sid=$sid\">prev</a>";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"index.php?do=online&page=$npage&sid=$sid\">next</a>";
}
echo " $page of $num_pages";
echo "</div>";
if($num_pages>2)
{
$rets = "<form action=\"index.php\" method=\"get\">";
$rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
$rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
$rets .= "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</div>";
////// UNTILL HERE >>
echo "<div class=\"box\">";
include("ads.php");
//////<a href='http://click.buzzcity.net/click.php?partnerid=44756&bn=3'><img src='http://ads.buzzcity.net////////show.php?partnerid=44756&bn=3' alt='' /></a>
echo "</div>";
echo "<div class=\"footop\">
<a accesskey=\"4\" href=\"index.php?do=main&sid=$sid\">Home</a>
| <a accesskey=\"5\" href=\"index.php?do=forums&sid=$sid\">Forum</a>
| <a accesskey=\"6\" href=\"index.php?do=chat&sid=$sid\">Chat</a>
| <a accesskey=\"7\" href=\"index.php?do=files&sid=$sid\">Download</a>
| <a accesskey=\"8\" href=\"index.php?do=signoff&sid=$sid\">Logout</a>
</div>";
echo "<div class=\"foot\">$mysite</div>";
echo "</div>";
echo "</body>";
}
Comment