From: p d. t. <pdo...@an...> - 2002-10-22 05:22:54
|
Greets, I just finished coding an enhancement to the file manager plugin that allows users to save attachments locally and send files on the server as attachments. I was hoping someone would have a minute to review what I did to initiate a new message with a file attachment, since I am not entirely familiar with how compose.php works. I modified some of the code from that file which seems to work well, but did I miss anything?... 1. I needed to set up new session stuff with these ($session was always empty): if (!isset($composesession)) { $composesession = 0; sqsession_register($composesession, 'composesession'); } if (!isset($session)) { sqsession_unregister('composesession'); $session = "$composesession" +1; $composesession = $session; sqsession_register($composesession, 'composesession'); } 2. This is how I set up the attachments array and put it in the session (the filenames and mime type are done elsewhere and are not a problem): $newAttachment['session'] = $session; sqsession_unregister('attachments'); $attachments[] = $newAttachment; sqsession_register($attachments, 'attachments'); 3. And the call to compose.php: header('Location: ../../src/compose.php?mailbox=INBOX&startMessage=1&attachedmessages=true &session=' . $composesession); Thanks for any advice/comments!! Cheers, paul |