for example if you need to tell them some important info about site and it must be read by everyone.
is it possible to send a inbox to everyone on the site in one go .
using lava script.
cheers
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
for example if you need to tell them some important info about site and it must be read by everyone.
is it possible to send a inbox to everyone on the site in one go .
using lava script.
cheers
hmmm you could put the autopm function on the login page.... on my site i do something like this
function textall($text)
{
$sql= mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mc_users "));
for($i=0;$i<$sql[0];$i++)
{
mysql_query("INSERT INTO mc_text SET bywho='1' , towho='".$i."' text='".$text."' new='1'");
}}
just edit it to work with the lava script
PHP Adovocate B)
for example if you need to tell them some important info about site and it must be read by everyone.
is it possible to send a inbox to everyone on the site in one go .using lava script.
cheers
Its easy but becarefull not to overload the database with a function like that. You can rather change it to send the message to everybody that was online say in the past week. That way, you wont inbox people who is not active.
function textall($text)
{
$sql= mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users "));
for($i=0;$i<$sql[0];$i++)
{
mysql_query("INSERT INTO ibwf_private SET bywho='1' , towho='".$i."' text='".$text."' new='1'");
}}
What should i do next after inseting this into login.php
shouldnt that go in core? its a function
sending to all users is a bad idea as oondocksaint said it also use cpu power.
if you own your server meaning buy for
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!
SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…
echo "<card id=\"main\" title=\"Inbox\">";
echo "<p align=\"center\">";
$pmtou = $_POST["pmtou"];
$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);
echo "All users that has been Active the in the next 24 hours has been send a pm
";
$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='".$pmtext."', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
}
echo "
<a href=\"inbox.php?action=main&sid=$sid\">Back to inbox</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
try this one u can send a pm to all the users that has been active the next 24 hours