fresh msg alert

Started by BamBam0077, November 21, 2017, 06:51:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xblade

why is this in 08 should be 09

BamBam0077

Deprecated Version

    if ($TBDEV['msg_alert'] && $msgalert && $CURUSER)
    {
      $res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or sqlerr(__FILE__,__LINE__);
      $arr = mysql_fetch_row($res);
      $unread = $arr[0];
    }


new version [=
   
  if ( isset($CURUSER) ) {
   if ( isset($TBDEV['msg_alert']) && $msgalert ) {
$res = mysqli_query("SELECT new_msg FROM messages WHERE receiver=".sqlesc($CURUSER['id'])." && unread_msg='yes') or mysqli_error(__FILE__, __LINE__);
while ( $arr = mysqli_fetch_row($res) ) {
$unread = $arr[0];
    }
   }
  }
"When Darkness Shadows Your Doubts, Deep Within Us Is Our Key, Not Success But Everything" ~ Anonymous