I'm working on a datingsite with the possibility for members to use the chatbox.
I had it installed with a previous version of a script i was working on and it worked ok.
Since i had the new version of the script installed i'm getting several errors in my php.
can someone take a look at it and maybe help me on this ??
Go to http://www.mon-amour.be and click for chat.
You will get the errors i'm dealing with.
The code of the page that gives the error is here.
Thanks!
Marc
<?php
$query = "select id from ".$db_table_prefix."members where last_activity < ".time()." - $user_timeout";
$rst = mysql_query($query);
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);
$query = "delete from ".$db_table_prefix."room_members where user_id in ($wh)";
mysql_query($query);
}
$query = "select id from ".$db_table_prefix."chat_messages where message_time < ".time()." - $message_expiration_time";
$rst = mysql_query($query);
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);
$query = "delete from ".$db_table_prefix."recipients where message_id in ($wh)";
mysql_query($query);
$query = "delete from ".$db_table_prefix."chat_messages where id in ($wh)";
mysql_query($query);
}
if($auto_delete_admins_rooms)
{
$query = "select id from ".$db_table_prefix."rooms where last_activity < ".time()." - $room_expiration_time";
}
else
{
$query = "select r.id from ".$db_table_prefix."rooms r, ".$db_table_prefix."members m
where r.last_activity < ".time()." - $room_expiration_time and
m.id = r.creator_id and ((m.user_rights = ".$user_permissions["users"].") or (r.private_partner_id > 0))";
}
$rst = mysql_query($query);
echo mysql_error();
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);
$query = "delete from ".$db_table_prefix."room_members where room_id in ($wh)";
mysql_query($query);
$query = "delete from ".$db_table_prefix."rooms where room_id in ($wh)";
mysql_query($query);
}
?>