home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / calendar / add_client.php < prev    next >
PHP Script  |  2004-03-08  |  1KB  |  35 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.  
  13. require("../../Group-Office.php");
  14. require($GO_CONFIG->class_path."addressbook.class.inc");
  15. $ab = new addressbook();
  16.  
  17. if(isset($_REQUEST['clicked_value']))
  18. {
  19.     $contact = $ab->get_contact($_REQUEST['clicked_value']);
  20. }
  21. unset($_SESSION['GO_HANDLER']);
  22. $middle_name = $contact['middle_name'] == '' ? '' : $contact['middle_name'].' ';
  23. $contact_name = $contact['first_name'].' '.$middle_name.$contact['last_name'];
  24. ?>
  25. <html>
  26. <body>
  27. <script language="javascript" type="text/javascript">
  28.     opener.document.forms[0].contact_id.value = '<?php echo $contact['id']; ?>';
  29.     opener.document.forms[0].contact_name.value = "<?php echo $contact_name; ?>";
  30.     opener.document.forms[0].contact_name_text.value = "<?php echo $contact_name; ?>";
  31.     window.close();
  32. </script>
  33. </body>
  34. </html>
  35.