|
From: Lo?c C. <lo...@us...> - 2001-04-23 18:22:17
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat
In directory usw-pr-cvs1:/tmp/cvs-serv17381/chat
Modified Files:
input.php3
Log Message:
Improved for js disabled browsers
Index: input.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** input.php3 2001/04/21 19:37:40 1.24
--- input.php3 2001/04/23 18:22:14 1.25
***************
*** 250,258 ****
// Get the value to put in the message box :
// - previous message value for '/!' command;
! // - last submission if it was an erroneous command;
// - else nothing.
$msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : '';
! if (isset($error) && !($isCommand))
! $msgValue = pmcSlashDoubleQuotes($message);
?>
<!-- Message box -->
--- 250,273 ----
// Get the value to put in the message box :
// - previous message value for '/!' command;
! // - last submission if it was an erroneous command (prefixed by the error
! // message if the browser does not know JavaScript);
! // - a success message if a command defined one and the browser does not know
! // JavaScript (this message is also set in the $error variable);
! // message if the bowser does not know JavaScript);
// - else nothing.
$msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : '';
! if (isset($error))
! {
! if (!$isCommand)
! {
! $msgValue = ($dbSessionVars['jsVersion'] == 'noJs')
! ? '< ' . $error . ' > ' . pmcSlashDoubleQuotes($message)
! : pmcSlashDoubleQuotes($message);
! }
! else if ($dbSessionVars['jsVersion'] == 'noJs')
! {
! $msgValue = $error;
! }
! }
?>
<!-- Message box -->
***************
*** 262,266 ****
<?php
// Color of the message
! if ($dbSessionVars['jsVersion'] == 'low')
{
// Drop down list of colors for non-enabled JavaScript1.1+ browsers
--- 277,281 ----
<?php
// Color of the message
! if ($dbSessionVars['jsVersion'] == 'low' || $dbSessionVars['jsVersion'] == 'noJs')
{
// Drop down list of colors for non-enabled JavaScript1.1+ browsers
***************
*** 290,294 ****
<?php
// Define the colors picker for JavaScript1.1+ enabled browsers
! if ($dbSessionVars['jsVersion'] != 'low')
{
?>
--- 305,309 ----
<?php
// Define the colors picker for JavaScript1.1+ enabled browsers
! if ($dbSessionVars['jsVersion'] != 'low' && $dbSessionVars['jsVersion'] != 'noJs')
{
?>
***************
*** 323,326 ****
--- 338,356 ----
<?php
+ /**
+ * Stop parsing the script if the browser do not support javascript
+ */
+ if ($dbSessionVars['jsVersion'] == 'noJs')
+ {
+ ?>
+ </body>
+
+ </html>
+ <?php
+ flush();
+ exit();
+ }
+ echo("\n");
+
/**
* Refresh the messages frame if necessary
|