Update of /cvsroot/phpmychat/phpMyChat - 0.14/chat
In directory usw-pr-cvs1:/tmp/cvs-serv19328/chat
Modified Files:
loader.php3
Log Message:
Fixed a bad js syntax a optimized a little bit
***** Bogus filespec: -
***** Bogus filespec: 0.14/chat
Index: loader.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat - 0.14/chat/loader.php3,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** loader.php3 2001/04/03 11:07:44 1.5
--- loader.php3 2001/04/23 18:28:48 1.6
***************
*** 152,155 ****
--- 152,156 ----
{
$i = "1";
+ $today = date('j', time() + C_TMZ_OFFSET*60*60);
while(list($Time, $User, $Latin1, $Dest, $Message) = $DbLink->next_record())
{
***************
*** 158,162 ****
// Separator between messages sent before today and other ones
! if (!isset($day_separator) && date("j", $Time + C_TMZ_OFFSET*60*60) != date("j", time() + C_TMZ_OFFSET*60*60))
{
$Messages[] = "<P CLASS=\"msg\"><SPAN CLASS=\"notify\">--------- ".L_TODAY_DWN." ---------<\/SPAN><\/P>";
--- 159,163 ----
// Separator between messages sent before today and other ones
! if (!isset($day_separator) && date("j", $Time + C_TMZ_OFFSET*60*60) != $today)
{
$Messages[] = "<P CLASS=\"msg\"><SPAN CLASS=\"notify\">--------- ".L_TODAY_DWN." ---------<\/SPAN><\/P>";
***************
*** 279,288 ****
{
// doubles backslashes except the ones for closing HTML tags
! $toPush = str_replace('\\', '\\\\', $Messages[$message_nb - 1 - $i]);
! $toPush = str_replace('<\\\\/', '<\\/', $toPush);
// slashes the quotes that should be displayed
! $toPush = str_replace("\"","\\\"",$toPush);
?>
! window.parent.frames['messages'].window.document.write("<?php echo($toPush); ?>\n");
<?php
};
--- 280,288 ----
{
// doubles backslashes except the ones for closing HTML tags
! $ToSend = ereg_replace("([^<]+)[\]","\\1\\\\",$Messages[$message_nb-1-$i]);
// slashes the quotes that should be displayed
! $ToSend = str_replace("\"","\\\"",$ToSend);
?>
! window.parent.frames['messages'].window.document.write("<?php echo($ToSend); ?>\n");
<?php
};
***************
*** 299,308 ****
with (window.parent.frames['messages'].window)
{
! if (typeof(scrollBy(0, 0)) != 'undefined')
{
scrollBy(0, 65000);
scrollBy(0, 65000);
}
! else
{
scroll(0, 65000);
--- 299,308 ----
with (window.parent.frames['messages'].window)
{
! if (typeof(scrollBy) != 'undefined')
{
scrollBy(0, 65000);
scrollBy(0, 65000);
}
! else if (typeof(scroll) != 'undefined')
{
scroll(0, 65000);
|