Example #1
0
             $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
             $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.
Example #2
0
         $smarty->display('new_dropoff.tpl');
         exit;
     }
     if ($authExpiry < time()) {
         $theDropbox->SetupPage();
         NSSError($smarty->getConfigVariable('ErrorSessionExpired'), "Session Expired");
         $smarty->display('new_dropoff.tpl');
         exit;
     }
 }
 $theDropbox->SetupPage();
 # Bug "dropoff.recipName_1");
 $smarty->assign('maxBytesForFileInt', $theDropbox->maxBytesForFile());
 $smarty->assign('maxBytesForDropoffInt', $theDropbox->maxBytesForDropoff());
 if ($theDropbox->authorizedUser()) {
     $authFullName = $theDropbox->authorizedUserData("displayName");
     $authOrganization = $theDropbox->authorizedUserData("organization");
     $authEmail = $theDropbox->authorizedUserData("mail");
     $smarty->assign('addressbook', $theDropbox->getAddressbook());
     if ($theDropbox->usingLibrary()) {
         // This is the only situation in which we allow the library to work
         $library = $theDropbox->getLibraryDescs();
         $smarty->assign('library', $library);
         $smarty->assign('usingLibrary', $library === '[]' ? FALSE : TRUE);
     }
 }
 $smarty->assign('senderName', $authFullName);
 $smarty->assign('senderOrg', $authOrganization);
 $smarty->assign('senderEmail', strtolower($authEmail));
 $smarty->assign('note', '');
 $smarty->assign('subject', '');
Example #3
0
//
//
//
// 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 . "Smartyconf.php";
require_once NSSDROPBOX_LIB_DIR . "NSSDropoff.php";
if ($theDropbox = new NSSDropbox($NSSDROPBOX_PREFS)) {
    //
    // This page displays usage graphs for the system.
    //
    $theDropbox->SetupPage();
    if ($theDropbox->authorizedUser() && $theDropbox->authorizedUserData('grantStatsPriv')) {
        switch (isset($_GET['period']) ? $_GET['period'] : NULL) {
            case 'month':
                $period = 30;
                break;
            case '90days':
                $period = 90;
                break;
            case 'year':
                $period = 365;
                break;
            case 'decade':
                $period = 3650;
                break;
            case 'week':
            default:
Example #4
0
// 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)) {
    $theDropbox->SetupPage();
    if ($theDropbox->authorizedUser() && $theDropbox->authorizedUserData('grantAdminPriv')) {
        if ($_POST['action'] == 'unlock') {
            // Unlock the ticked users
            $output = array();
            for ($i = 0; $i <= $_POST['unlockMax']; $i++) {
                $user = $_POST['unlocktick_' . $i];
                if ($user) {
                    // Unlock the user
                    $theDropbox->database->DBDeleteLoginlog($user);
                    $output[] = $user;
                }
            }
            if ($output) {
                NSSError("Unlocked " . implode(', ', $output) . ".");
            }
        }
Example #5
0
            }
            if (!$req->sendReqEmail()) {
                $theDropbox->SetupPage();
                NSSError("Sending the request email failed.", "Email error");
                $smarty->display('error.tpl');
                exit;
            }
            $wordList[] = $req->words();
            $emailList[] = $req->recipEmail();
        }
        // Set up the output page
        $theDropbox->SetupPage();
        //$smarty->assign('autoHome', TRUE);
        $smarty->assign('toEmail', implode(', ', $emailList));
        $smarty->assign('reqKey', implode(', ', $wordList));
        //$smarty->assign('reqKey', $req->words());
        $smarty->display('request_sent.tpl');
        exit;
    }
    // It got presented with nothing except a user who should be logged in,
    // so present the form.
    $senderName = $theDropbox->authorizedUserData("displayName");
    $senderEmail = $theDropbox->authorizedUserData("mail");
    $senderOrg = $theDropbox->authorizedUserData("organization");
    $theDropbox->SetupPage('req.recipName');
    $smarty->assign('senderName', $senderName);
    $smarty->assign('senderEmail', $senderEmail);
    $smarty->assign('senderOrg', $senderOrg);
    $smarty->assign('addressbook', $theDropbox->getAddressBook());
    $smarty->display('request.tpl');
}