Help Me.

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

13 replies · 1,133 views · started 18 years ago · 1 min read

3 participants
edysor92 Junior · 14 posts #1

How can i send a pm to users online or all users or staff users 😕 Help me pls 😢

WhiteWarrior Principal · 1,419 posts #2

How can i send a pm to users online or all users or staff users 😕 Help me pls 😢

Use the search tool, its already been posted about 10 times 🙂

edysor92 Junior · 14 posts #3

Use the search tool, its already been posted about 10 times :-)

I search but i don'd found nothing:( u can help me? u can give me a link to a topic or something pls 🙁

Guest #4

try this CODEfunction PMtoALL($text){ $sql = @mysql_query("SELECT id FROM ibwf_users"); while ($id = @mysql_fetch_array($sql)){ @mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'"); } } //// this is the id of the owner, if u are the owner put your id here byuid = '1'

edysor92 Junior · 14 posts #5

try this CODE function PMtoALL($text){ $sql = @mysql_query("SELECT id FROM ibwf_users"); while ($id = @mysql_fetch_array($sql)){ @mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'"); } } //// this is the id of the owner, if u are the owner put your id here byuid = '1' Does not work:( where have to put this? in core i think but give me one erros:( help me 🙁 uffff

WhiteWarrior Principal · 1,419 posts #6

I search but i don'd found nothing:( u can help me? u can give me a link to a topic or something pls :(

type in search

PM to all members

or

just code it.. it would work like...

create the inbox thinggy where you enter the text, in the other part select all the members ids then insert it into the inbox as a unred message... look how the inbox works, study the coding, think how it would work then try and do it..

nothing can go wrong if you just try.. download soething called xampp and test everything offline

Guest #7

JUST FOLLOW THESE STEPS:

  1. put this in core.php
function PMtoALL($text){
$sql = @mysql_query("SELECT id FROM ibwf_users");
while ($id = @mysql_fetch_array($sql)){
@mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'");
}
}
//// this is the id of the owner, if u are the owner put your id here
byuid = '1'
  1. in admincp.php put this:
else if ($action=="pmtoall"){

echo '<card id="main" title="Send pm to all">

';

echo 'Send pm to all:
';
echo '<input type="text" name="msg"/>
';
echo '<anchor>send';
echo "<go href=\"adminproc.php?action=pmtoall&sid=$sid\" method=\"post\">";
echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
echo '</go></anchor>';

echo '</p></card>';

}
  1. and in adminproc.php put this:
else if ($action=="pmtoall"){

echo '<card id="main" title="Send pm to all">

';

$msg = $_POST['msg'];
PMtoALL($msg);
echo 'Pm sent to all users!
';
echo "<a href=\"index.php?action=main&sid=$sid\">index</a>";

echo '</p></card>';
}
edysor92 Junior · 14 posts #8

JUST FOLLOW THESE STEPS:

  1. put this in core.php
function PMtoALL($text){
$sql = @mysql_query("SELECT id FROM ibwf_users");
while ($id = @mysql_fetch_array($sql)){
@mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'");
}
}
//// this is the id of the owner, if u are the owner put your id here
byuid = '1'
  1. in admincp.php put this:
else if ($action=="pmtoall"){

echo '<card id="main" title="Send pm to all">

';

echo 'Send pm to all:
';
echo '<input type="text" name="msg"/>
';
echo '<anchor>send';
echo "<go href=\"adminproc.php?action=pmtoall&sid=$sid\" method=\"post\">";
echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
echo '</go></anchor>';

echo '</p></card>';

}
  1. and in adminproc.php put this:
else if ($action=="pmtoall"){

echo '<card id="main" title="Send pm to all">

';

$msg = $_POST['msg'];
PMtoALL($msg);
echo 'Pm sent to all users!
';
echo "<a href=\"index.php?action=main&sid=$sid\">index</a>";

echo '</p></card>';
}

thenks kosty a lot 😀 u are my man..it work 😀 😮

Guest #9

Can v use the same code for Pm to Online user. . i tried but failed.. .I replace core function ibwf_users to ibwf_online. but pm didnt send to online members. . Plz post the actual code

Guest #10

Dude u just have to get the userid's from the online table.. and modify codes accordingly...

Guest #11

Bro even i try id, userid in ibwf_online. . . but didnt work. . . Could u give me the code for pm to online users

Anshul Senior · 296 posts #12

Can v use the same code for Pm to Online user. . i tried but failed.. .I replace core function ibwf_users to ibwf_online. but pm didnt send to online members. . Plz post the actual code

Its maybe like this

function PMtoALL($text){
$offline = 300;
$sql = @mysql_query("select * from `ibwf_users` WHERE lastvst>'".intval(time()-$offline)."'");
while ($id = @mysql_fetch_array($sql)){
@mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'");
}
}
Guest #13

Ansh bro thanks for giving me this code. . But it didnt work. . . online users didnt get pm which i sent to them

Guest #14

Its maybe like this

function PMtoALL($text){
$offline = 300;
$sql = @mysql_query("select * from `ibwf_users` WHERE lastvst>'".intval(time()-$offline)."'");
while ($id = @mysql_fetch_array($sql)){
@mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'");
}
}

Bro it will Btw thanks for reply ..tc function PMtoALL($text){ $offline = 300; $sql = @mysql_query("SELECT * from ibwf_users WHERE lastact>'".intval(time()-$offline)."'"); while ($id = @mysql_fetch_array($sql)){ @mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$text."', timesent = '".time()."'"); } }

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