yeah has ANYBODY got anything at all to do with wapdesire v_2 script coz lavalair script really dnt help me pmpl x
pm all online members ONLY! for owners
Collapse
X
-
all that mess could be replaced by a neater looking...Originally posted by arg0s12 View PostPHP Code:$who = $_POST["who"]; $pmtou = $_POST["pmtou"]; $byuid = getuid_sid($sid); $tm = time(); if($who=="all"){ $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); echo "All users has been send a pm<br/>"; $pms = mysql_query("SELECT id, name FROM ibwf_users WHERE lastact>'".$tm24."'"); $tm = time(); while($pm=mysql_fetch_array($pms)) { mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou."[br/]This message was sent to all the members', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'"); } }else if($who=="staff"){ $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); echo "All users has been send a pm<br/>"; $pms = mysql_query("SELECT id, name FROM ibwf_users WHERE perm>0"); $tm = time(); while($pm=mysql_fetch_array($pms)) { mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou."[br/]This message was sent to all staff', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'"); } }else if($who=="males"){ $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); echo "All users has been send a pm<br/>"; $pms = mysql_query("SELECT id, name FROM ibwf_users WHERE sex='M'"); $tm = time(); while($pm=mysql_fetch_array($pms)) { mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou."[br/]This message was sent to all male members', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'"); } }else if($who=="females"){ $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); echo "All users has been send a pm<br/>"; $pms = mysql_query("SELECT id, name FROM ibwf_users WHERE sex='F'"); $tm = time(); while($pm=mysql_fetch_array($pms)) { mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou."[br/]This message was sent to all female members', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'"); } }
PHP Code:$who = $_POST["who"]; $pmtou = $_POST["pmtou"]; $byuid = getuid_sid($sid); if(in_array($who, array("all", "staff", "males", "females"))) { $sendres = mysql_query("SELECT id, name FROM ibwf_users".($who != "all" ? " WHERE ".($who == "males" ? "sex='M'" : ($who == "females" : "sex='F'" : "perm > 0")):"")); if(mysql_num_rows($sendres) > 0) { $ins = array(); switch($who) { case "all": $whotxt = "members"; break; case "males": $whotxt = "male members"; break; case "females": $whotxt = "female members"; break; default: $whotxt = "staff"; } $txt = "'".mysql_real_escape_string("Public Anouncment:[br/]$pmtou[br/]This message was sent to all $whotxt")."'"; while($sendarr = mysql_fetch_assoc($sendres)) { $ins[] = "($txt,$byuid,".$sendarr['id'].", ".time().")"; } mysql_query("INSERT INTO ibwf_private (text, byuid, touid, timesent) VALUES ".implode(",",$ins)); echo "Message was sent to ".count($ins)." $whotxt. <br />"; } else echo "No one matching your criteria was found, no PMs were sent."; } else echo "Unknown send to param.";
Comment
-
I recoded this in WML but ut dosnt want to work..... If any 1 has it in WML it would be much appreciatedBakGat
Code:class Counter { public: void Count(); int ReadDisplay(); private: int CurrentCount; };



Back up my hard drive? How do I put it in reverse?My Community
BakGat
sigpic
Comment
Comment