// // // // 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 . "NSSDropoff.php"; // // This is pretty straightforward; depending upon the form data coming // into this PHP session, creating a new dropoff object will either // display the claimID-and-claimPasscode "dialog" (no form data or // missing/invalid passcode); display the selected dropoff if the // claimID and claimPasscode are valid OR the recipient matches the // authenticate user -- it's all built-into the NSSDropoff class. // if ($theDropbox = new NSSDropbox($NSSDROPBOX_PREFS, TRUE)) { $theDropbox->SetupPage(); if ($thePickup = new NSSDropoff($theDropbox)) { // // Start the page and add some Javascript for automatically // filling-in the download form and submitting it when the // user clicks on a file in the displayed dropoff. // $theDropbox->SetupPage($thePickup->HTMLOnLoadJavascript()); $output = $thePickup->HTMLWrite(); } } $smarty->display($output ? $output : 'error.tpl');
{ global $smarty; $smarty->assign('recipEmailNum', $label); } if ($theDropbox = new NSSDropbox($NSSDROPBOX_PREFS)) { if ($_POST['Action'] == "dropoff") { // // Posted form data indicates that a dropoff form was filled-out // and submitted; if posted from data is around, creating a new // dropoff instance creates a new dropoff using said form data. // $theDropbox->SetupPage(); $template = 'show_dropoff.tpl'; if ($theDropoff = new NSSDropoff($theDropbox)) { // Allow HTMLWrite to over-ride the template file if it wants to $template2 = $theDropoff->HTMLWrite(); if ($template2 != "") { $template = $template2; } } $smarty->display($template); } else { // // We need to present the dropoff form. This page will include some // JavaScript that does basic checking of the form prior to submission // as well as the code to handle the attachment of multiple files. // After all that, we start the page body and write-out the HTML for // the form. // // If the user is authenticated then some of the fields will be // already-filled-in (sender name and email).
NSSError($smarty->getConfigVariable('ErrorNotPerson'), "Test failed"); displayPickupCheck($theDropbox, $smarty, $ayah, $auth); exit(0); } // They have passed the test and we have written their AuthData record. $theDropbox->SetupPage(); $smarty->assign('auth', $auth); // And save their auth key! if ($thePickup = new NSSDropoff($theDropbox)) { // // Start the page and add some Javascript for automatically // filling-in the download form and submitting it when the // user clicks on a file in the displayed dropoff. // $theDropbox->SetupPage($thePickup->HTMLOnLoadJavascript()); $smarty->display($thePickup->HTMLWrite()); } else { $smarty->display('error.tpl'); } } else { // It's not a pickup attempt, it's going to display the CAPTCHA form // instead which will pass us back to me again. displayPickupCheck($theDropbox, $smarty, $ayah, ''); } } else { $smarty->display('error.tpl'); } function displayPickupCheck($theDropbox, $smarty, $ayah, $auth) { $theDropbox->SetupPage(); $claimID = isset($_POST['claimID']) ? $_POST['claimID'] : (isset($_GET['claimID']) ? $_GET['claimID'] : NULL);