Ignore:
Timestamp:
2010/10/12 11:55:47 (16 years ago)
Author:
eccuore
Message:

#792(ダウンロード販売機能) 大容量ファイル対策、Safari対応、オンライン決済時のお届け先非表示

Location:
branches/version-2_5-dev/data/class/pages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php

    r18824 r18851  
    2121 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    2222 */ 
    23 ini_set("memory_limit","100M"); 
    2423// {{{ requires 
    2524require_once(CLASS_PATH . "pages/LC_Page.php"); 
    … …  
    7675        //ログインしている場合 
    7776            //DBから商品情報の読込 
    78  
    7977            $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id); 
    80  
    8178            //ステータスが支払済み以上である事 
    8279            if ($arrForm["status"] < ORDER_DELIV){ 
    … …  
    9289                SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND,"",true); 
    9390            } 
    94             //ファイル名をエンコードする 
    95             $sdown_filename = mb_convert_encoding($arrForm["down_filename"], "Shift_JIS", "auto"); 
     91            //ファイル名をエンコードする Safariの対策はUTF-8で様子を見る 
     92            $encoding = "Shift_JIS"; 
     93            if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'Safari')) { 
     94                $encoding = "UTF-8"; 
     95            } 
     96            $sdown_filename = mb_convert_encoding($arrForm["down_filename"], $encoding, "auto"); 
    9697            //タイプ指定 
    9798            header("Content-Type: Application/octet-stream"); 
    … …  
    111112            ob_end_flush(); 
    112113            flush(); 
    113  
    114114            //ファイル読み込み 
    115             readfile($realpath); 
     115            $handle = fopen($realpath, "rb"); 
     116            while (!feof($handle)) { 
     117                echo(fread($handle, DOWNLOAD_BLOCK*1024)); 
     118                ob_flush(); 
     119                flush(); 
     120            } 
     121            fclose($handle); 
    116122        } 
    117123    } 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Complete.php

    r18829 r18851  
    476476 
    477477        // 合計金額が0円の場合、もしくはオンライン決済の場合は、注文ステータスをORDER_PRE_END[入金済み]にする 
    478         if ( ( $sqlval['total'] == 0 ) or ( in_array($sqlval['payment_id'], split(",", CREDIT_PAYMENT)) == true ) ){ 
     478        if ( ( $sqlval['total'] == 0 ) or ( in_array($sqlval['payment_id'], split(",", ONLINE_PAYMENT)) == true ) ){ 
    479479            $sqlval = $this->lfchgPreEndStatus($sqlval); 
    480480        } 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php

    r18782 r18851  
    370370        if($this->cartdown != 0){ 
    371371            //ダウンロード商品を含む場合は、オンライン決済以外は選択できない。 
    372             $arrval = explode(",", CREDIT_PAYMENT); 
     372            $arrval = explode(",", ONLINE_PAYMENT); 
    373373            $tmp_where = ""; 
    374374            foreach ($arrval as $val) { 
Note: See TracChangeset for help on using the changeset viewer.