Admin Private Messages For All Female Members

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

14 replies · 1,280 views · started 18 years ago · 1 min read

TL;DR · summary of 14 replies
  • -The code needs to filter messages for female members based on the sex column in the ibwf_users table.
  • -The loop should be outside of any array, as indicated by rukiya's suggestion to use a for loop instead of a while loop.
  • -The issue was resolved when srecnica added a condition within the loop to only insert messages for female members (sex='F').
  • -srecnica thanked rukiya and mentioned that the code now works, though she expressed frustration about women being problematic.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
srecnica Developer · 174 posts #1

Admin as I would like to send PM avin female members and that this message does not get men. I have done it this way and gives me info that the message is sent, but members of the Ladies do not receive, not winning is no one ... where is the bug? CODEif($action=="ppzene") { echo "<card id="main" title="PP svima">"; echo " "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); str_replace("$","$",$poruka);

$tm = time()+(76060);

$sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE sex='F'")); $sex = $sex[0]; $text = "$poruka [br/]PS:Ovo je automatska poruka i poslao je Admin.Ne treba odgovarati na nju!"; for ($i=1; $i <= $sex; $i++) {

$ppzene = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$i."', timesent='".$tm."'");

} please help ...This code I put in inboxproc.php file. This of course would like to do and for male members ... that does not send pm all members but especially male and especially female .....

something else Fellow · 2,296 posts #2

$ppzene = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$i."', timesent='".$tm."' WHERE sex='F'");

srecnica Developer · 174 posts #5

that ... ibwf private no sex .... I think that the problem in ibwf users .... but I do not know what I have the bug this is code for all PM .... only need to define sex ... how?

CODEif($action=="ppzasve") { echo "<card id="main" title="PP svima">"; echo " "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); str_replace("$","$",$poruka);

$tm = time()+(76060);

$max = mysql_fetch_array(mysql_query("SELECT MAX(id) FROM ibwf_users")); $maxid = $max[0]; $text = "$poruka [br/]PS:Ovo je automatska poruka i poslao je Admin.Ne treba odgovarati na nju!"; for ($i=1; $i <= $maxid; $i++) {

$ppsvima = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$i."', timesent='".$tm."'");

} echo "PP je uspešno poslana za sve članove

"; echo parsepm($poruka, $sid);

echo "<a href="index.php?action=admincp&sid=$sid">Admin CP</a> "; in this code should only determine the sex "F" ... but I was not successful .... you attempt

rukiya Lead · 569 posts #6

like this

$sex = mysql_fetch_array(mysql_query("SELECT id  FROM ibwf_users WHERE sex='F'"));
$sex = $sex[0];
$tm = time();
$text = "$poruka [br/]PS:Ovo je automatska poruka i poslao je Admin.Ne treba odgovarati na nju!";
for ($i=1; $i <=$sex; $i++)
{

  $ppzene = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$sex."', timesent='".$tm."'");

}
srecnica Developer · 174 posts #8

QUOTE (rukiya @ Oct 18 2008, 04:25 PM) <{POST_SNAPBACK}>

like this

$sex = mysql_fetch_array(mysql_query("SELECT id  FROM ibwf_users WHERE sex='F'"));
$sex = $sex[0];
$tm = time();
$text = "$poruka [br/]PS:Ovo je automatska poruka i poslao je Admin.Ne treba odgovarati na nju!";
for ($i=1; $i =<$sex; $i++)
{

  $ppzene = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$sex."', timesent='".$tm."'");

}

error for ($i=1; $i =<$sex; $i++) copy-paste : Parse error: syntax error, unexpected '<' in /home/srecnica/domains/srecnica.com/public_html/happy/inbxproc.php on line 78

rukiya Lead · 569 posts #12

then for loop is not looping outside Array so do it

$sex = mysql_query("SELECT id  FROM ibwf_users WHERE sex='F'");
$tm = time();
$text = "$poruka [br/]PS:Ovo je automatska poruka i poslao je Admin.Ne treba odgovarati na nju!";
while($f = mysql_fetch_array($sex))
{

  $ppzene = mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='".$byuid."', touid='".$f[0]."', timesent='".$tm."'");

}
Domux Junior · 10 posts #14

Thanx rukiya can someone Give Me This Code with all send stuff or just give your index or where is that code Thanx im really need it 😊 for Wapdesire/lavalair

djdevil89 Senior · 287 posts #15

SQL-- -- Table structure for table wap_benutzer --

CREATE TABLE wap_benutzer ( id int(100) NOT NULL auto_increment, name varchar(30) NOT NULL default '', pass varchar(60) NOT NULL default '', birthday varchar(50) NOT NULL default '', sex char(1) NOT NULL default 'F', location varchar(100) NOT NULL default '', perm char(1) NOT NULL default '0', posts int(100) NOT NULL default '0', plusses int(100) NOT NULL default '700', signature varchar(100) NOT NULL default '', avatar varchar(100) NOT NULL default '', email varchar(50) NOT NULL default '', browserm varchar(50) NOT NULL default '', ipadd varchar(30) NOT NULL default '', lastact int(100) NOT NULL default '0', regdate int(100) NOT NULL default '0', chmsgs int(100) NOT NULL default '0', chmood int(100) NOT NULL default '0', shield char(1) NOT NULL default '0', gplus int(100) NOT NULL default '700', budmsg varchar(100) NOT NULL default '', lastpnreas varchar(100) NOT NULL default '', lastplreas varchar(100) NOT NULL default '', shouts int(100) NOT NULL default '0', pollid int(100) NOT NULL default '0', rbcid varchar(255) NOT NULL default '', hvia char(1) NOT NULL default '1', lastvst int(100) NOT NULL default '0', battlep int(100) NOT NULL default '700', popmsg char(1) NOT NULL default '1', automsgs char(1) NOT NULL default '1', validated char(1) NOT NULL default '0', theme varchar(100) NOT NULL default 'white_medium.css', hidden char(1) NOT NULL default '0', quiz_score varchar(20) NOT NULL default '0', quiz_easy char(3) NOT NULL default 'no', quiz_medium char(3) NOT NULL default 'no', quiz_hard char(3) NOT NULL default 'no', total_score varchar(10) NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY name (name) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- -- Dumping data for table wap_benutzer --

here is ibwf_users with sex just rename it to ibwf_users

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}

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