// The for worked, go for it! $theDropbox->SetupPage(); $authFullName = $theDropbox->authorizedUserData("displayName"); $authEmail = $theDropbox->authorizedUserData("mail"); $authOrganization = paramPrepare($_POST['senderOrganization']); $authOrganization = preg_replace('/[^a-zA-Z0-9\\.\\-\\_\\+\\"\'\\@\\/\\:\\&\\, ]/', '', $authOrganization); $smarty->assign('senderName', $authFullName); $smarty->assign('senderOrg', $authOrganization); $smarty->assign('senderEmail', strtolower($authEmail)); $smarty->assign('recipEmailNum', 1); $smarty->assign('addressbook', $theDropbox->getAddressbook()); # Generate unique ID required for progress bars status $smarty->assign('progress_id', uniqid("")); $smarty->assign('useRealProgressBar', $theDropbox->useRealProgressBar()); $smarty->assign('note', ''); $smarty->assign('maxBytesForFileInt', $theDropbox->maxBytesForFile()); $smarty->assign('maxBytesForDropoffInt', $theDropbox->maxBytesForDropoff()); // If we are using a library of files, fill the structures it needs. if ($theDropbox->authorizedUser() && $theDropbox->usingLibrary()) { $library = $theDropbox->getLibraryDescs(); $smarty->assign('library', $library); $smarty->assign('usingLibrary', $library === '[]' ? FALSE : TRUE); } else { $smarty->assign('usingLibrary', FALSE); $smarty->assign('library', '[]'); } $smarty->display('new_dropoff.tpl'); } } else { $smarty->display('error.tpl'); }
// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // // // Include the dropbox preferences -- we need this to have the // dropbox filepaths setup for us, beyond simply needing our // configuration! // require "../config/preferences.php"; require_once NSSDROPBOX_LIB_DIR . "MyZendTo.Smartyconf.php"; require_once NSSDROPBOX_LIB_DIR . "NSSDropbox.php"; if ($theDropbox = new NSSDropbox($NSSDROPBOX_PREFS, TRUE)) { $theDropbox->SetupPage(); $smarty->assign('maxFileSize', NSSFormattedMemSize($theDropbox->maxBytesForFile())); $smarty->assign('maxDropoffSize', NSSFormattedMemSize($theDropbox->maxBytesForDropoff())); $smarty->assign('keepForDays', $NSSDROPBOX_PREFS['numberOfDaysToRetain']); $smarty->display('about.tpl'); }