// 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"; if ($theDropbox = new NSSDropbox($NSSDROPBOX_PREFS, TRUE)) { // // This page handles the listing of an authenticated user's // dropoffs. If the user is NOT authenticated, then an error // is presented. // $theDropbox->SetupPage(); // Read the sort order from the page $cookieName = $theDropbox->cookieName() . 'MyDropoffsSortOrder'; $sortOrder = $_POST['sortOrder']; if (!$sortOrder) { $sortOrder = $_COOKIE[$cookieName]; } if (!$sortOrder) { $sortOrder = "ffile"; } setcookie($cookieName, $sortOrder, time() + 120 * 24 * 60 * 60, '/', '', FALSE); if ($theDropbox->authorizedUser()) { // // Returns an array of all NSSDropoff instances belonging to // this user. // $allDropoffs = NSSDropoff::dropoffsForCurrentUser($theDropbox); if ($sortOrder == "rdate" && count($allDropoffs) > 0) {