} //echo "<div class=\"chat ".$row["order"]."\">".$row["data"]."</div>"; $lastCount = $row["order"]; } } mysql_free_result($result); include "chatSession.php"; $cSess = new chatSession(); $cSess->useSession($_POST["session"]); if ($_POST["wmessage"] == "true") { $cSess->setWritingMessage($uid . ":" . $utype, 1); } else { $cSess->setWritingMessage($uid . ":" . $utype, 0); } $writeMessage = array(); $writeMessage = $cSess->getWritingMessage(); $isWritingM = false; //print_r($writeMessage); foreach ($writeMessage as $arrWM) { $arrWM2 = explode(":", $arrWM); if (!empty($arrWM) && $arrWM2[0] != $uid && $arrWM2[1] != $utype) { $isWritingM = true; } } if ($isWritingM) { if (!$_SESSION["chat_isWriting_" . $_POST["session"]]) { $_SESSION["chat_isWriting_" . $_POST["session"]] = true; echo "<script type=\"text/javascript\">enableWritingIcon();</script>"; } //echo "Enabled"; } else {