Contact_AddressBook
[ class tree: Contact_AddressBook ] [ index: Contact_AddressBook ] [ all elements ]

Source for file action-export.php

Documentation is available at action-export.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3.  
  4. // Load the Contact_AddressBook.
  5. require_once 'Contact/AddressBook.php';
  6.  
  7. // Include our records.
  8. include_once 'include/records.php';
  9.  
  10. if (isset($_POST['submit'])) {
  11.     if (!empty($_POST['format'])) {
  12.         // Create a new instance of Contact_AddressBook object.
  13.         $cab = new Contact_AddressBook;
  14.  
  15.         if ($_POST['mode'== 'print'{
  16.             include_once 'include/head.php';
  17.             print '<pre>';
  18.  
  19.             // Call export to print method.
  20.             $cab->exportToPrint($_POST['format'],
  21.                                 $GLOBALS['_Contact_AddressBook_records']);
  22.  
  23.             print '</pre>';
  24.             include_once 'include/footer.php';
  25.         else {
  26.             // Call export to file method.
  27.             $cab->exportToFile('addressbook'$_POST['format'],
  28.                                $GLOBALS['_Contact_AddressBook_records']);
  29.         }
  30.     }
  31. }
  32.  
  33. /*
  34.  * Local variables:
  35.  * mode: php
  36.  * tab-width: 4
  37.  * c-basic-offset: 4
  38.  * c-hanging-comment-ender-p: nil
  39.  * End:
  40.  */
  41. ?>

Documentation generated on Mon, 11 Mar 2019 15:40:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.