can anybody make it in page format becuase i am failed to do that

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

6 replies · 387 views · started 17 years ago · 1 min read

4 participants
bijaybd Developer · 178 posts #1

like per page it will show 10 buddies only i tried but i failed and confused so anybody help

$user = mysql_fetch_assoc($q);

$q = @mysql_query("select * from `buddylist` where `test`='$dblogin' and ci='".$ci."' and agreed='1';");
while($man = @mysql_fetch_array($q)) {

$rs = @mysql_query("select * from `chat_users` where login='".$man['name']."' and `ltime`>'".intval(time()-$offline)."';");
$d = @mysql_fetch_array($rs);

$rr = @mysql_query("select * from `chat_users` where login='".$man['name']."';");
$r = @mysql_fetch_array($rr);
echo "".$man['name'].",
<a href=\"./user.php?".SID."&nocache=$nocache&room=$room&m=$n&dblogin=".$man['name']."\"><br/>Pm</a>,";

$qr = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM `buddylist` where `name`='".$man['name']."' AND `test`='".$user['login']."' AND ci= '$ci'"));

if ($qr[0]!=0) {
}
else {
echo "<a href=\"addbud.php?".SID."&nocache=$nocache&moo=".$man['name']."&rid=$rid&am=z&ap=0\"> Add as Friend</a><br/>";
}
bijaybd Developer · 178 posts #3

not lyk dat bro i want like every page it will come 10 not only 10 desc limit not dat like next page prev page like list view becuase anybody can have 100 friends so it will be a big page to load so each 10 when click next 10 i have that thing but couldn't code this one actually

Mysterio Lead · 630 posts #4

i will tell you how did i learned to do that myself: i had a look at indifun forum script, and i saw the limit was not 10, but, something like $limit, $limit_per_page. So, download a working script where is what you looking for, and see how the other guys did that. Good luck bro!

mysterio.al - programming is a functional art

bijaybd Developer · 178 posts #5

yes i have done that in many of my pages and it works fine for me but for this one i am failed to do that thats why i am asking for help

brand Senior · 391 posts #6

bijaybd wrote: like per page it will show 10 buddies only i tried but i failed and confused so anybody help

$user = mysql_fetch_assoc($q);


$q = @mysql_query("select * from `buddylist` where `test`='$dblogin' and ci='".$ci."' and agreed='1';");
while($man = @mysql_fetch_array($q)) {

$rs = @mysql_query("select * from `chat_users` where login='".$man['name']."' and `ltime`>'".intval(time()-$offline)."';");
$d = @mysql_fetch_array($rs);

$rr = @mysql_query("select * from `chat_users` where login='".$man['name']."';");
$r = @mysql_fetch_array($rr);
echo "".$man['name'].",
<a href=\"./user.php?".SID."&nocache=$nocache&room=$room&m=$n&dblogin=".$man['name']."\"><br/>Pm</a>,";

$qr = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM `buddylist` where `name`='".$man['name']."' AND `test`='".$user['login']."' AND ci= '$ci'"));

if ($qr[0]!=0) {
}
else {
echo "<a href=\"addbud.php?".SID."&nocache=$nocache&moo=".$man['name']."&rid=$rid&am=z&ap=0\"> Add as Friend</a><br/>";
}

please post the full page for this

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

bijaybd Developer · 178 posts #7
echo "<card title=\"Buddies\">";
echo "<p align=\"$align\">";
echo "<small>";

$user = mysql_fetch_assoc($q);

$q = @mysql_query("select * from `buddylist` where `test`='".$user['login']."' and ci='".$ci."' and agreed='".$p."';");
while($man = @mysql_fetch_array($q)) {

$rs = @mysql_query("select * from `chat_users` where login='".$man['name']."' and `ltime`>'".intval(time()-$offline)."';");
$d = @mysql_fetch_array($rs);

$rr = @mysql_query("select * from `chat_users` where login='".$man['name']."';");
$r = @mysql_fetch_array($rr);
echo "".$man['name'].",
<a href=\"./user.php?".SID."&nocache=$nocache&room=$room&m=$n&dblogin=".$man['name']."\">Pm</a>";

 
$rss = @mysql_query("select `name` from `chat_rooms` where id='".$d['room']."';");

$dd = @mysql_fetch_array($rss);

if ($d['room']=="") { echo " Offline<br/>"; } else { echo " <b>Online</b><br/>"; } }
if($rid)echo "<a href=\"room.php?".SID."&nocache=$nocache&room=$room&rid=$rid\">Back To Chatroom</a><br/>";
print "<a href=\"hall.php?".SID."&nocache=$nocache\">Back</a>";
echo "<br/>$copyright";
wml_foot();

HERE IS THE FULL PAGE

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close