$smarty->display('error.tpl'); } else { if (!$theVerify->sendVerifyEmail()) { NSSError("Sending the verification email failed.", "Email error"); } $smarty->assign('autoHome', TRUE); $smarty->display('verify_sent.tpl'); } exit; } // If they reached here, they failed the Captcha test $smarty->assign('verifyFailed', TRUE); } else { // They are an authorised user so don't need a Captcha if ($theVerify = new Verify($theDropbox)) { if ($theVerify->formInitError() != "") { NSSError($theVerify->formInitError(), "Verify error"); $smarty->display('error.tpl'); } else { // 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