Changeset 18851 for branches/version-2_5-dev/data/class
- Timestamp:
- 2010/10/12 11:55:47 (16 years ago)
- Location:
- branches/version-2_5-dev/data/class
- Files:
-
- 5 edited
-
SC_CartSession.php (modified) (1 diff)
-
helper/SC_Helper_DB.php (modified) (2 diffs)
-
pages/mypage/LC_Page_Mypage_DownLoad.php (modified) (4 diffs)
-
pages/shopping/LC_Page_Shopping_Complete.php (modified) (1 diff)
-
pages/shopping/LC_Page_Shopping_Payment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_CartSession.php
r18833 r18851 317 317 return $arrRet; 318 318 } 319 // カート内にある商品ID+カテゴリIDを全て取得する320 function getAllProductClassID($key) {321 $this->addKey($key);322 $max = $this->getMax($key);323 for($i = 0; $i <= $max; $i++) {324 if($_SESSION[$key][$i]['cart_no'] != "") {325 $arrRet[] = $_SESSION[$key][$i]['id'];326 }327 }328 return $arrRet;329 }330 319 331 320 function delAllProducts($key) { -
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r18833 r18851 1911 1911 * 1912 1912 * @param $objCartSess SC_CartSession カートセッション 1913 * @return bool 0: ダウンロード販売無 1:ダウンロード販売無2:全てダウンロード販売1913 * @return bool 0:実商品のみ 1:ダウンロード販売と実商品混在 2:全てダウンロード販売 1914 1914 */ 1915 1915 function chkCartDown($objCartSess) { … … 1918 1918 $nodown = false; 1919 1919 $ret = 0; 1920 $arrID = $objCartSess->getAllProductClassID(); 1921 $table = <<< __EOS__ 1922 dtb_products_class pc LEFT JOIN dtb_class_combination cc1 ON pc.class_combination_id = cc1.class_combination_id 1923 LEFT JOIN dtb_class_combination cc2 ON cc1.parent_class_combination_id = cc2.class_combination_id 1924 __EOS__; 1925 $where = <<< __EOS__ 1926 pc.product_id = ? AND 1927 ( cc2.classcategory_id = ? OR cc2.classcategory_id IS NULL ) AND 1928 ( cc1.classcategory_id = ? OR cc1.classcategory_id IS NULL ) 1929 __EOS__; 1920 $arrID = $objCartSess->getAllProductID(); 1921 $table = "dtb_products_class pc"; 1922 $where = "pc.product_class_id = ?"; 1930 1923 if(!is_null($arrID)){ 1931 1924 //カート内のIDから販売方法を取得 1932 1925 foreach ($arrID as $rec) { 1933 $arrRet = $objQuery->select("pc.down AS down", $table, $where, array($rec [0],$rec[1],$rec[2]));1926 $arrRet = $objQuery->select("pc.down AS down", $table, $where, array($rec)); 1934 1927 if ($arrRet[0]['down'] == "2"){ 1935 1928 $down = true; -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php
r18824 r18851 21 21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 22 */ 23 ini_set("memory_limit","100M");24 23 // {{{ requires 25 24 require_once(CLASS_PATH . "pages/LC_Page.php"); … … 76 75 //ログインしている場合 77 76 //DBから商品情報の読込 78 79 77 $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id); 80 81 78 //ステータスが支払済み以上である事 82 79 if ($arrForm["status"] < ORDER_DELIV){ … … 92 89 SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND,"",true); 93 90 } 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"); 96 97 //タイプ指定 97 98 header("Content-Type: Application/octet-stream"); … … 111 112 ob_end_flush(); 112 113 flush(); 113 114 114 //ファイル読み込み 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); 116 122 } 117 123 } -
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Complete.php
r18829 r18851 476 476 477 477 // 合計金額が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 ) ){ 479 479 $sqlval = $this->lfchgPreEndStatus($sqlval); 480 480 } -
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php
r18782 r18851 370 370 if($this->cartdown != 0){ 371 371 //ダウンロード商品を含む場合は、オンライン決済以外は選択できない。 372 $arrval = explode(",", CREDIT_PAYMENT);372 $arrval = explode(",", ONLINE_PAYMENT); 373 373 $tmp_where = ""; 374 374 foreach ($arrval as $val) {
Note: See TracChangeset
for help on using the changeset viewer.
