"; echo ""; echo "Address Book Export Page"; echo ""; echo ""; echo "


"; echo "

"; echo "
"; echo "

Please enter your username and password

"; echo "
Username: 
Password: 


"; echo "(This process may take a long time, so please be patient.)"; echo "
"; echo "

"; echo "
"; echo "
"; echo "

INSTRUCTIONS

"; echo "This utility will export your webmail address book into a CSV (comma seperated value) file,
which is a common file format that can be imported by most popular email clients, including
the new webmail service (still in testing), Mozilla Mail, and Eudora.

"; echo "To export your address, enter the above information and select the \"$export_button_string\" button.
"; echo "This will redirect you to a new (and temporarily available) page that contains your
CSV formatted address book entries.

"; echo "Save this contents of this page, either by the \"File->Save as...\" method, or by copying and pasting
the contents of the page into an empty text file. The good name for this file would be \"addressbook.csv\".

"; echo "This file can then be imported into your specific email client. See the client-specific documentation
specific instructions on how to do this.

"; echo "
"; echo "
"; echo "

"; echo "
"; echo "webmaster@engineering"; echo "
"; echo ""; echo ""; } /************* If they've already entered their user/pass, try to authenticate **************/ else { $blessed_consultant = FALSE; $blessed_user = FALSE; $imap_servername = "imap"; session_start(); $sid = session_id(); // Get the session id if ($mbox = imap_open("\{$imap_servername}", $username, $password)) //The username and password are checked against the IMAP server { $script_string = $abook_script . ' ' . $username . ' ' . $sid; //echo "script_string is $script_string"; exec("$script_string"); // We run the script with the username and session ID (for anonymity) header("Location: ./data/$sid.csv"); // We redirect the user to the script } else { echo "
Authentication was unsuccessful. Please go back to the authentication page and try again.



"; } imap_close($mbox); session_destory(); } ?>