home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / email / notify.php < prev    next >
PHP Script  |  2004-03-08  |  2KB  |  57 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12. require("../../Group-Office.php");
  13.  
  14. require_once($GO_CONFIG->class_path.'email.class.inc');
  15.  
  16.  
  17. $GO_SECURITY->authenticate();
  18. $GO_MODULES->authenticate('email');
  19. require($GO_LANGUAGE->get_language_file('email'));
  20. require($GO_THEME->theme_path."header.inc");
  21. echo '<embed src="'.$GO_THEME->sounds['reminder'].'" hidden="true" autostart="true"><noembed><bgsound src="'.$GO_THEME->sounds['reminder'].'"></noembed>';
  22.  
  23. echo '<a class="normal" href="javascript:show_email()"><img style="margin: 10px;" align="absmiddle" width="32" height="32" src="'.$GO_THEME->images['email_notify'].'" border="0" />';
  24.  
  25. echo $ml_you_have.' '.$_SESSION['new_mail'].' ';
  26.  
  27. if ($_SESSION['new_mail'] > 1)
  28. {
  29.     echo $ml_new_mail_multiple;
  30. }else
  31. {
  32.     echo $ml_new_mail_single;
  33. }
  34. echo '</a><br /><br />';
  35. $_SESSION['notified_new_mail'] = $_SESSION['new_mail'];
  36.  
  37. $button = new button($cmdClose, "javascript:window.close()");
  38. echo '</td></tr></table>';
  39. ?>
  40. <script type="text/javascript">
  41.  
  42. function show_email()
  43. {
  44.     if (opener.parent.main)
  45.     {
  46.         opener.parent.main.location="<?php echo $GO_MODULES->url; ?>";
  47.         opener.parent.main.focus();
  48.     }else
  49.     {
  50.         window.open('<?php echo $GO_CONFIG->full_url.'/index.php?return_to='.urlencode($GO_MODULES->url); ?>', '_blank','scrollbars=yes,resizable=yes,status=yes');
  51.     }
  52.     window.close();
  53. }
  54. </script>
  55. <?php
  56. require($GO_THEME->theme_path."footer.inc");
  57. ?>