コード例 #1
0
ファイル: pickup_list.php プロジェクト: rakeshmani123/zendto
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 handles the listing of an authenticated user's
    // dropoffs.  If the user is NOT authenticated, then an error
    // is presented.
    //
    $theDropbox->SetupPage();
    if ($theDropbox->authorizedUser()) {
        //
        // Returns an array of all NSSDropoff instances belonging to
        // this user.
        //
        $allDropoffs = NSSDropoff::dropoffsForCurrentUser($theDropbox);
        //
        // Start the web page and add some Javascript to automatically
        // fill-in and submit a pickup form when a dropoff on the page
        // is clicked.
        //
        $iMax = count($allDropoffs);
        $smarty->assign('countDropoffs', $iMax);
        $totalsize = 0;
        if ($allDropoffs && $iMax > 0) {
            $outputDropoffs = array();
            $i = 0;
            foreach ($allDropoffs as $dropoff) {
                $outputDropoffs[$i] = array();
                $outputDropoffs[$i]['claimID'] = $dropoff->claimID();
                $outputDropoffs[$i]['senderName'] = $dropoff->senderName();