Changeset 17110
- Timestamp:
- 2008/03/07 10:44:54 (16 years ago)
- Location:
- branches/comu-ver2
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_UploadFile.php
r17095 r17110 42 42 // ファイル管理クラス 43 43 function SC_UploadFile($temp_dir, $save_dir) { 44 $this->temp_dir = $temp_dir;45 $this->save_dir = $save_dir;44 $this->temp_dir = (preg_match("|/$|", $temp_dir) == 0) ? $temp_dir. "/" : $temp_dir; 45 $this->save_dir = (preg_match("|/$|", $save_dir) == 0) ? $save_dir. "/" : $save_dir; 46 46 $this->file_max = 0; 47 47 } … … 109 109 } 110 110 $result = copy($_FILES[$keyname]['tmp_name'], $this->temp_dir . $this->temp_file[$cnt]); 111 GC_Utils_Ex::gfPrintLog($_FILES[$keyname]['name']." -> ". $this->temp_dir . $this->temp_file[$cnt]); } 111 GC_Utils_Ex::gfPrintLog($_FILES[$keyname]['name']." -> ". $this->temp_dir . $this->temp_file[$cnt]); 112 } 112 113 } 113 114 } -
branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Delivery.php
r16582 r17110 64 64 $objView = new SC_SiteView(); 65 65 $objCustomer = new SC_Customer(); 66 $objQuery = new SC_Query();67 $objConn = new SC_DBConn();68 66 69 67 //ログイン判定 … … 81 79 $objLayout->sfGetPageLayout($this, false, "mypage/index.php"); 82 80 83 if (!isset($_POST['mode'])) $_POST['mode'] = ""; 81 $mode = isset($_POST['mode']) ? $_POST['mode'] : ''; 82 $customerId = $objCustomer->getValue('customer_id'); 84 83 85 //削除 86 if($_POST['mode'] == 'delete') { 87 //不正アクセス判定 88 $flag = $objQuery->count("dtb_other_deliv", "customer_id=? AND other_deliv_id=?", array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id'])); 89 if($flag > 0) { 90 //削除 91 $objQuery->delete("dtb_other_deliv", "other_deliv_id=?", array($_POST['other_deliv_id'])); 92 } else { 84 switch($mode) { 85 86 // お届け先の削除 87 case 'delete': 88 $objForm = $this->initParam(); 89 if ($objForm->checkError()) { 93 90 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 91 exit; 94 92 } 93 94 $this->deleteOtherDeliv($customerId, $objForm->getValue('other_deliv_id')); 95 break; 96 97 // お届け先の表示 98 default: 99 break; 95 100 } 96 101 97 $this->tpl_pageno = isset($_POST['pageno']) ? $_POST['pageno'] : ""; 102 //別のお届け先情報 103 $this->arrOtherDeliv = $this->getOtherDeliv($customerId); 98 104 99 $from = "dtb_other_deliv"; 100 $where = "customer_id=?"; 101 $arrval = array($objCustomer->getValue('customer_id')); 102 $order = "other_deliv_id DESC"; 103 104 //お届け先登録件数取得 105 $linemax = $objQuery->count($from, $where, $arrval); 106 107 $this->tpl_linemax = $linemax; 108 109 // 表示順序 110 $objQuery->setorder($order); 111 112 //別のお届け先情報表示 113 $this->arrOtherDeliv = $objQuery->select("*", $from, $where, $arrval); 114 115 //お届け先登録数をテンプレートに渡す 116 $objPge->deliv_cnt = count($this->arrOtherDeliv); 105 //お届け先登録数 106 $this->tpl_linemax = count($this->arrOtherDeliv);; 117 107 118 108 $objView->assignobj($this); … … 128 118 parent::destroy(); 129 119 } 120 121 /** 122 * フォームパラメータの初期化 123 * 124 * @return SC_FormParam 125 */ 126 function initParam() { 127 $objForm = new SC_FormParam(); 128 $objForm->addParam('お届け先ID', 'other_deliv_id', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); 129 $objForm->setParam($_POST); 130 $objForm->convParam(); 131 return $objForm; 132 } 133 134 /** 135 * お届け先の取得 136 * 137 * @param integer $customerId 138 * @return array 139 */ 140 function getOtherDeliv($customerId) { 141 $objQuery = new SC_Query; 142 $objQuery->setorder('other_deliv_id DESC'); 143 $arrRet = $objQuery->select('*', 'dtb_other_deliv', 'customer_id = ?', array($customerId)); 144 return empty($arrRet) ? array() : $arrRet; 145 } 146 147 /** 148 * お届け先の削除 149 * 150 * @param integer $customerId 151 * @param integer $delivId 152 */ 153 function deleteOtherDeliv($customerId, $delivId) { 154 $where = 'customer_id = ? AND other_deliv_id = ?'; 155 $objQuery = new SC_Query; 156 $objQuery->delete("dtb_other_deliv", $where, array($customerId, $delivId)); 157 } 130 158 } 131 159 ?> -
branches/comu-ver2/html/require.php
r16994 r17110 86 86 // 携帯端末の場合は mobile 以下へリダイレクトする。 87 87 if (SC_MobileUserAgent::isMobile()) { 88 $url = ""; 89 if (SC_Utils_Ex::sfIsHTTPS()) { 90 $url = MOBILE_SSL_URL; 91 } else { 92 $url = MOBILE_SITE_URL; 93 } 94 88 95 if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) { 89 96 $path = $matches[1]; … … 91 98 $path = ''; 92 99 } 93 94 $url = ""; 95 if (SC_Utils_Ex::sfIsHTTPS()) { 96 $url = SSL_URL; 97 } else { 98 $url = SITE_URL; 99 } 100 header("Location: " 101 . SC_Utils_Ex::sfRmDupSlash($url . URL_DIR . "mobile/" . $path)); 100 101 header("Location: ". SC_Utils_Ex::sfRmDupSlash($url . $path)); 102 102 exit; 103 103 }
Note: See TracChangeset
for help on using the changeset viewer.