Update of /cvsroot/phpmychat/phpMyChat-0.15/chat
In directory usw-pr-cvs1:/tmp/cvs-serv18257/chat
Modified Files:
save.php3
Log Message:
Improved messages 'download' system (it should now woks with all major browsers and even with SSH server)
Index: save.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/save.php3,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** save.php3 2001/11/29 22:00:56 1.10
--- save.php3 2001/11/30 00:19:59 1.11
***************
*** 195,210 ****
/**
! * "Displays" the frame
*/
$messagesCnt = count($newMessages);
if ($messagesCnt > 0)
{
! // Save messages to a file ('application/octet-stream' is the registered
! // IANA type but MSIE only knows 'application/octetstream')
! $contentType = (ereg('MSIE [56789]', $HTTP_USER_AGENT))
! ? 'application/octetstream'
! : 'application/octet-stream';
! header('Content-Type: ' . $contentType);
! header('Content-Disposition: attachement; filename="chat_save_' . date('mdY') . '.htm"');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
--- 195,222 ----
/**
! * Save messages to a file
*/
$messagesCnt = count($newMessages);
if ($messagesCnt > 0)
{
! // loic1: 'application/octet-stream' is the registered IANA type but
! // MSIE and Opera seems to prefer 'application/octetstream'
! $mime_type = (ereg('(MSIE [56789])|(Opera(/| )([0-9].[0-9]{1,2}))', $HTTP_USER_AGENT))
! ? 'application/octetstream'
! : 'application/octet-stream';
!
! // Send headers
! header('Content-Type: ' . $mime_type);
! // lem9 (from the phpMyAdmin project) & loic1: IE need specific headers
! if (ereg('MSIE [56789]', $HTTP_USER_AGENT)) {
! header('Content-Disposition: inline; filename="chat_save_' . date('mdY') . '.htm"');
! header('Expires: 0');
! header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
! header('Pragma: public');
! } else {
! header('Content-Disposition: attachment; filename="chat_save_' . date('mdY') . '.htm"');
! header('Expires: 0');
! header('Pragma: no-cache');
! }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|