Hey guys ive found this code on hostpayne added to my script but this also not working
where did i go worng
Added after 7 minutes:
this is the code where ive gotten it from
Code:
////////////////////////////////////////////////////////////////////////////////////////////// else if($who=="online") { $pmtou = $_POST["pmtou"]; $who = getuid_nick($pmtou); $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM private WHERE byuid='".$byuid."'")); echo "<p align=\"center\">"; echo "All online users where sent this pm<br/>"; $pms = mysql_query("SELECT userid FROM online"); $tm24 = time() - (24*60*60); $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM rmembers WHERE lastact>'".$tm24."'")); echo "All users that has been Active the in the next 24 hours has been send a pm<br/>"; $forums = mysql_query("SELECT id, name, email FROM rmembers WHERE lastact>'".$tm24."'"); $tm = time(); while($pm=mysql_fetch_array($pms)) { mysql_query("INSERT INTO private SET text='[b]Public Anouncment:[/b][br/]".$pmtou."[br/][i]This message was sent to online users at this moment in time[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'"); $umsg = getunreadpm($forums[1]); $mail = $forum[2]; if(isonline($forum[1])) {}else{ if($forum[2]=="") { } else { $from_head .= "From:noreply@retrivewap.co.za"; $subject = "$umsg unread PMS in your inbox"; $content .= "Your name $email[0]@retrivewap got $umsg unread PMS in your in you inbox.\Retrivewap getting better every day\n"; $content .= "http://retrivewap.co.za\n"; $content .= "http://retrivewap.co.za\n"; mail($mail, $subject, $content, $from_head);} } } }
Added after 7 minutes:
this is the code where ive gotten it from
Code:
else if($action=="sendto") { echo "<p align=\"center\">"; $pmtou = $_POST["pmtou"]; $who = getuid_nick($pmtou); $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); $tm24 = time() - (24*60*60); $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'")); echo "All users that has been Active the in the next 24 hours has been send a pm<br/>"; $forums = mysql_query("SELECT id, name, email FROM ibwf_users WHERE lastact>'".$tm24."'"); $tm = time(); while($forum=mysql_fetch_array($forums)) { mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."[br/][small][i]p.s: this is a pm for all members that have been online the next 24 hours[/i][/small]', byuid='".$byuid."', touid='".$forum[0]."', timesent='".$tm."'"); $umsg = getunreadpm($forums[1]); $mail = $forum[2]; if(isonline($forums[1])) {}else{ if($forum[2]=="") { } else { $from_head .= "From:noreply@hostpayne.co.za"; $subject = "$umsg unread PMS in your inbox"; $content .= "Your name $email[0]@hospayne got $umsg unread PMS in your in you inbox.\nHostPayne getting better every day\n"; $content .= "http://wap.hostpayne.co.za\n"; $content .= "http://hostpayne.co.cc\n"; mail($mail, $subject, $content, $from_head);} } } echo "<br/><br/><a href=\"inbox.php?action=main&sid=$sid\">Back to inbox</a><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</body>"; }
Comment