|
From: Lo?c C. <lo...@us...> - 2001-03-24 15:14:55
|
Update of /cvsroot/phpmychat/phpMyChat - 0.14/chat
In directory usw-pr-cvs1:/tmp/cvs-serv31682/chat
Modified Files:
input.php3 handle_inputH.php3
Log Message:
Trully exclude the red color for non-administrators & fix a refreshing problem under Netscape
***** Bogus filespec: -
***** Bogus filespec: 0.14/chat
Index: input.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat - 0.14/chat/input.php3,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** input.php3 2001/03/24 11:29:06 1.5
--- input.php3 2001/03/24 15:14:49 1.6
***************
*** 171,176 ****
if (isset($C) and $C != "")
{
! // Red color is reserved to the admin or a moderator for the current room
! if ($C == "#FF0000" && !($status == "a" || $status == "m")) $C = "#000000";
$M = "<FONT COLOR=\"".$C."\">".$M."</FONT>";
};
--- 171,178 ----
if (isset($C) and $C != "")
{
! // Red colors are reserved to the admin or a moderator for the current room
! if ((ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $C))
! && !($status == "a" || $status == "m"))
! $C = "#000000";
$M = "<FONT COLOR=\"".$C."\">".$M."</FONT>";
};
***************
*** 189,196 ****
$C = "#000000";
}
! elseif ($CookieColor == "#FF0000")
{
! // Red color is reserved to the admin or a moderator for the current room
! if (!(isset($status) && ($status == "a" || $status == "m"))) $C = "#000000";
}
else
--- 191,199 ----
$C = "#000000";
}
! elseif (ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $CookieColor))
{
! // Red colors are reserved to the admin or a moderator for the current room
! if (!(isset($status) && ($status == "a" || $status == "m")))
! $C = "#000000";
}
else
***************
*** 276,280 ****
<INPUT TYPE="hidden" NAME="ST" VALUE="<?php echo($ST); ?>">
<INPUT TYPE="hidden" NAME="NT" VALUE="<?php echo($NT); ?>">
! <INPUT TYPE="hidden" NAME="PWD_Hash" VALUE="<?php echo($PWD_Hash); ?>">
<!-- Ignored users list -->
--- 279,283 ----
<INPUT TYPE="hidden" NAME="ST" VALUE="<?php echo($ST); ?>">
<INPUT TYPE="hidden" NAME="NT" VALUE="<?php echo($NT); ?>">
! <INPUT TYPE="hidden" NAME="PWD_Hash" VALUE="<?php echo(isset($PWD_Hash) ? $PWD_Hash : ''); ?>">
<!-- Ignored users list -->
***************
*** 357,365 ****
$wichImage = "unselColor.gif";
}
! ?>
! <td bgcolor="<?php echo($ColorCode); ?>"><a href="#" onClick="window.parent.ChangeColor('<?php echo($ColorCode); ?>','<?php echo("C${i}"); ?>'); return false;"><img src="images/<?php echo($wichImage); ?>" alt="<?php echo($ColorCode); ?>" name="<?php echo("C${i}"); ?>" border="0" width="2" height="20" /></a></td>
! <?php
};
unset($TextColors);
?>
</TR>
--- 360,368 ----
$wichImage = "unselColor.gif";
}
! echo("\n\t\t\t");
! echo('<td bgcolor="' . $ColorCode . '"><a href="#" onclick="window.parent.ChangeColor(\'' . $ColorCode . '\',\'C' . $i .'\'); return false;"><img src="images/' . $wichImage . '" alt="' . $ColorCode . '" name="C' . $i . '" border="0" width="2" height="20" /></a></td>');
};
unset($TextColors);
+ echo("\n");
?>
</TR>
***************
*** 410,416 ****
if ($Ver == "H")
{
! if ($First) echo("window.parent.frames['messages'].window.document.close();\n\twindow.parent.connect = '0';\n");
?>
! if (window.parent.connect == '0')
{
window.parent.refresh_query = "<?php echo("From=".urlencode($From)."&L=$L&U=".urlencode(stripslashes($U))."&R=".urlencode(stripslashes($R))."&T=$T&D=$D&N=$N&ST=$ST&NT=$NT".$Tmp."&First=$First"); ?>";
--- 413,419 ----
if ($Ver == "H")
{
! if ($First) echo("window.parent.frames['messages'].window.document.close();\n\twindow.parent.connect = 0;\n");
?>
! if (window.parent.connect == 0)
{
window.parent.refresh_query = "<?php echo("From=".urlencode($From)."&L=$L&U=".urlencode(stripslashes($U))."&R=".urlencode(stripslashes($R))."&T=$T&D=$D&N=$N&ST=$ST&NT=$NT".$Tmp."&First=$First"); ?>";
Index: handle_inputH.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat - 0.14/chat/handle_inputH.php3,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** handle_inputH.php3 2001/03/24 11:29:06 1.2
--- handle_inputH.php3 2001/03/24 15:14:50 1.3
***************
*** 175,180 ****
if (isset($C) and $C != "")
{
! // Red color is reserved to the admin or a moderator for the current room
! if ($C == "#FF0000" && !($status == "a" || $status == "m")) $C = "#000000";
$M = "<FONT COLOR=\"".$C."\">".$M."</FONT>";
};
--- 175,182 ----
if (isset($C) and $C != "")
{
! // Red colors are reserved to the admin or a moderator for the current room
! if ((ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $C))
! && !($status == "a" || $status == "m"))
! $C = "#000000";
$M = "<FONT COLOR=\"".$C."\">".$M."</FONT>";
};
***************
*** 192,198 ****
$C = "#000000";
}
! elseif ($CookieColor == "#FF0000")
{
! // Red color is reserved to the admin or a moderator for the current room
if (!(isset($status) && ($status == "a" || $status == "m"))) $C = "#000000";
}
--- 194,200 ----
$C = "#000000";
}
! elseif (ereg('#(FF0000|fc403f|fc4b34|fa582a|f66421|f27119|ec7e11|ec117f|f21971|f62164|fa2a58|fc344b)', $CookieColor))
{
! // Red colors are reserved to the admin or a moderator for the current room
if (!(isset($status) && ($status == "a" || $status == "m"))) $C = "#000000";
}
***************
*** 274,280 ****
/* Refresh the message frame or append messages to it */
<?php
! if ($First) echo("window.parent.frames['messages'].window.document.close();\n\twindow.parent.connect = '0';\n");
?>
! if (window.parent.connect == '0')
{
window.parent.refresh_query = "<?php echo("From=".urlencode($From)."&L=$L&U=".urlencode(stripslashes($U))."&R=".urlencode(stripslashes($R))."&T=$T&D=$D&N=$N&ST=$ST&NT=$NT".$Tmp."&First=$First"); ?>";
--- 276,282 ----
/* Refresh the message frame or append messages to it */
<?php
! if ($First) echo("window.parent.frames['messages'].window.document.close();\n\twindow.parent.connect = 0;\n");
?>
! if (window.parent.connect == 0)
{
window.parent.refresh_query = "<?php echo("From=".urlencode($From)."&L=$L&U=".urlencode(stripslashes($U))."&R=".urlencode(stripslashes($R))."&T=$T&D=$D&N=$N&ST=$ST&NT=$NT".$Tmp."&First=$First"); ?>";
***************
*** 294,299 ****
?>
- var isC1 = (window.parent.frames['input'].window.document.images.item ? window.parent.frames['input'].window.document.images.item("C1") : window.parent.frames['input'].window.document.images["C1"]);
-
<?php
$posted_var_list = "From=$From&Ver=$Ver&L=$L&U=$U&R=$R&T=$T&D=$D&N=$N&O=$O&ST=$ST&NT=$NT";
--- 296,299 ----
***************
*** 305,309 ****
?>
/* Add the red color when the user has been promoted to moderator */
! if (!isC1) window.parent.frames['input'].window.location.replace("input.php3?<?php echo($posted_var_list); ?>");
<?php
}
--- 305,313 ----
?>
/* Add the red color when the user has been promoted to moderator */
! if (!window.parent.isModerator)
! {
! window.parent.frames['input'].window.location.replace("input.php3?<?php echo($posted_var_list); ?>");
! window.parent.isModerator = 1;
! }
<?php
}
***************
*** 312,316 ****
?>
/* Remove the red color when the user has became a 'simple user */
! if (isC1) window.parent.frames['input'].window.location.replace("input.php3?<?php echo($posted_var_list); ?>");
<?php
};
--- 316,324 ----
?>
/* Remove the red color when the user has became a 'simple user */
! if (window.parent.isModerator)
! {
! window.parent.frames['input'].window.location.replace("input.php3?<?php echo($posted_var_list); ?>");
! window.parent.isModerator = 0;
! }
<?php
};
|