Give plusses to online users

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

1 reply · 334 views · started 16 years ago · 1 min read

2 participants
hunter-x-hunter Junior · 29 posts #1

Any one here give me the code for giving plusses to all online users, it tool for admin for adding plusser to all online users, thank you,..

CreativityKills Lead · 833 posts #2

Should be Sumfin like this...

/**
 * Substitute 'ibwf_online' with your online table name.
 */
$olist = 'none';
$on_users = mysql_fetch_array(mysql_query('SELECT uid FROM ibwf_online'));

// Update each users plusses
if(count($on_users) > 0){
 foreach($on_users as $user){
  // Update plusses. Substitute 50 with amount of plusses
  mysql_query('UPDATE ibwf_users SET plusses=plusses+50 WHERE id='.$user[0]);
 }

 $olist = implode(', ', $on_users);
}
echo 'Updated online users plusses by 50. <br/>List updated: '.$olist;

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