Changeset 21441 for branches/version-2_12-dev/data/class/pages/admin/order
- Timestamp:
- 2012/02/06 11:05:15 (12 years ago)
- Location:
- branches/version-2_12-dev/data/class/pages/admin/order
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order.php
r21420 r21441 98 98 $this->arrForm = $objFormParam->getFormParamList(); 99 99 100 switch ($this->getMode()) {100 switch ($this->getMode()) { 101 101 // 削除 102 102 case 'delete': … … 119 119 $where = "del_flg = 0"; 120 120 foreach ($arrParam as $key => $val) { 121 if ($val == "") {121 if ($val == "") { 122 122 continue; 123 123 } … … 130 130 * 処理を実行 131 131 * ----------------------------------------------- */ 132 switch ($this->getMode()) {132 switch ($this->getMode()) { 133 133 // CSVを送信する。 134 134 case 'csv': … … 290 290 case 'search_order_sex': 291 291 $tmp_where = ""; 292 foreach ($objFormParam->getValue($key) as $element) {293 if ($element != "") {294 if (SC_Utils_Ex::isBlank($tmp_where)) {292 foreach ($objFormParam->getValue($key) as $element) { 293 if ($element != "") { 294 if (SC_Utils_Ex::isBlank($tmp_where)) { 295 295 $tmp_where .= " AND (order_sex = ?"; 296 296 } else { … … 301 301 } 302 302 303 if (!SC_Utils_Ex::isBlank($tmp_where)) {303 if (!SC_Utils_Ex::isBlank($tmp_where)) { 304 304 $tmp_where .= ")"; 305 305 $where .= " $tmp_where "; … … 316 316 case 'search_payment_id': 317 317 $tmp_where = ""; 318 foreach ($objFormParam->getValue($key) as $element) {319 if ($element != "") {320 if ($tmp_where == "") {318 foreach ($objFormParam->getValue($key) as $element) { 319 if ($element != "") { 320 if ($tmp_where == "") { 321 321 $tmp_where .= " AND (payment_id = ?"; 322 322 } else { … … 327 327 } 328 328 329 if (!SC_Utils_Ex::isBlank($tmp_where)) {329 if (!SC_Utils_Ex::isBlank($tmp_where)) { 330 330 $tmp_where .= ")"; 331 331 $where .= " $tmp_where "; … … 417 417 function doOutputCSV($where, $arrVal, $order) { 418 418 require_once CLASS_EX_REALDIR . 'helper_extends/SC_Helper_CSV_Ex.php'; 419 if ($where != "") {419 if ($where != "") { 420 420 $where = " WHERE $where "; 421 421 } -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r21420 r21441 152 152 $this->arrSearchHidden = $objFormParam->getSearchArray(); 153 153 154 switch ($this->getMode()) {154 switch ($this->getMode()) { 155 155 case 'pre_edit': 156 156 case 'order_id': … … 564 564 $totalpoint = 0; 565 565 $totaltax = 0; 566 for ($i = 0; $i < $max; $i++) {566 for ($i = 0; $i < $max; $i++) { 567 567 // 小計の計算 568 568 $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrValues['price'][$i]) * $arrValues['quantity'][$i]; … … 665 665 $k = 0; 666 666 $arrStockData = array(); 667 for ($i = 0; $i < $max; $i++) {667 for ($i = 0; $i < $max; $i++) { 668 668 if (!empty($arrDetail[$i]['product_id'])) { 669 669 $arrPreDetail = $objQuery->select('*', "dtb_order_detail", "order_id = ? AND product_class_id = ?", array($order_id, $arrDetail[$i]['product_class_id'])); -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
r21420 r21441 84 84 $this->arrSearchHidden = $objFormParam->getSearchArray(); 85 85 86 switch ($this->getMode()) {86 switch ($this->getMode()) { 87 87 case 'pre_edit': 88 88 break; … … 91 91 case 'send': 92 92 $sendStatus = $this->doSend($objFormParam); 93 if ($sendStatus === true){93 if ($sendStatus === true) { 94 94 SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH); 95 95 exit; 96 } else{96 } else { 97 97 $this->arrErr = $sendStatus; 98 98 } 99 99 case 'confirm': 100 100 $status = $this->confirm($objFormParam); 101 if ($status === true){101 if ($status === true) { 102 102 $this->arrHidden = $objFormParam->getHashArray(); 103 103 return ; 104 } else{104 } else { 105 105 $this->arrErr = $status; 106 106 } … … 111 111 } 112 112 113 if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('order_id'))) {113 if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('order_id'))) { 114 114 $this->arrMailHistory = $this->getMailHistory($objFormParam->getValue('order_id')); 115 115 } … … 185 185 */ 186 186 function changeData(&$objFormParam){ 187 if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) {187 if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) { 188 188 $objQuery =& SC_Query_Ex::getSingletonInstance(); 189 189 $where = "template_id = ?"; 190 190 $mailTemplates = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($objFormParam->getValue('template_id'))); 191 if (!is_null($mailTemplates )){192 foreach (array('subject','header','footer') as $key){191 if (!is_null($mailTemplates )) { 192 foreach (array('subject','header','footer') as $key) { 193 193 $objFormParam->setValue($key,$mailTemplates[$key]); 194 194 } 195 195 } 196 196 $objFormParam->setParam($mailTemplates[0]); 197 } else{198 foreach (array('subject','header','footer') as $key){197 } else { 198 foreach (array('subject','header','footer') as $key) { 199 199 $objFormParam->setValue($key,""); 200 200 } -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php
r21420 r21441 66 66 function action() { 67 67 $send_id = $_GET['send_id']; 68 if (SC_Utils_Ex::sfIsInt($send_id)) {68 if (SC_Utils_Ex::sfIsInt($send_id)) { 69 69 $mailHistory = $this->getMailHistory($send_id); 70 70 $this->tpl_subject = $mailHistory[0]['subject']; -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php
r21420 r21441 94 94 // どんな状態の時に isset($arrRet) == trueになるんだ? これ以前に$arrRet無いが、、、、 95 95 if (!isset($arrRet)) $arrRet = array(); 96 switch ($this->getMode()) {96 switch ($this->getMode()) { 97 97 case 'confirm': 98 98 $status = $this->createPdf($this->objFormParam); 99 if ($status === true){99 if ($status === true) { 100 100 exit; 101 } else{101 } else { 102 102 $this->arrErr = $status; 103 103 } … … 131 131 132 132 // 注文番号があったら、セットする 133 if (SC_Utils_Ex::sfIsInt($order_id)) {133 if (SC_Utils_Ex::sfIsInt($order_id)) { 134 134 $arrForm['order_id'][0] = $order_id; 135 135 } elseif (is_array($pdf_order_id)) { … … 164 164 $objFpdf->createPdf(); 165 165 return true; 166 } else{166 } else { 167 167 return $arrErr; 168 168 } … … 211 211 212 212 $year = $objFormParam->getValue('year'); 213 if (!is_numeric($year)){213 if (!is_numeric($year)) { 214 214 $arrErr['year'] = "発行年は数値で入力してください。"; 215 215 } 216 216 217 217 $month = $objFormParam->getValue('month'); 218 if (!is_numeric($month)){218 if (!is_numeric($month)) { 219 219 $arrErr['month'] = "発行月は数値で入力してください。"; 220 }else if (0 >= $month && 12 < $month){220 }else if (0 >= $month && 12 < $month) { 221 221 222 222 $arrErr['month'] = "発行月は1〜12の間で入力してください。"; … … 224 224 225 225 $day = $objFormParam->getValue('day'); 226 if (!is_numeric($day)){226 if (!is_numeric($day)) { 227 227 $arrErr['day'] = "発行日は数値で入力してください。"; 228 }else if (0 >= $day && 31 < $day){228 }else if (0 >= $day && 31 < $day) { 229 229 230 230 $arrErr['day'] = "発行日は1〜31の間で入力してください。"; -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php
r21424 r21441 205 205 $bind = array(); 206 206 foreach ($arrForm as $key => $val) { 207 if ($val == "") {207 if ($val == "") { 208 208 continue; 209 209 } … … 216 216 case 'search_category_id': 217 217 list($tmp_where, $tmp_bind) = $objDb->sfGetCatWhere($val); 218 if ($tmp_where != "") {218 if ($tmp_where != "") { 219 219 $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 220 220 $bind = array_merge((array)$bind, (array)$tmp_bind); … … 241 241 */ 242 242 function getNo($globalParams){ 243 foreach ($globalParams as $params) {244 if (isset($params['no']) && $params['no']!= ''){243 foreach ($globalParams as $params) { 244 if (isset($params['no']) && $params['no']!= '') { 245 245 return intval($params['no']); 246 246 } … … 256 256 function sortProducts($arrProduct_id,$productList){ 257 257 $products = array(); 258 foreach ($productList as $item) {258 foreach ($productList as $item) { 259 259 $products[ $item['product_id'] ] = $item; 260 260 } 261 261 $arrProducts = array(); 262 foreach ($arrProduct_id as $product_id) {262 foreach ($arrProduct_id as $product_id) { 263 263 $arrProducts[] = $products[$product_id]; 264 264 } -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php
r21420 r21441 87 87 $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 88 88 89 switch ($this->getMode()) {89 switch ($this->getMode()) { 90 90 case 'update': 91 91 switch ($objFormParam->getValue('change_status')) { … … 144 144 $arrRet = $objFormParam->getHashArray(); 145 145 $arrErr = $objFormParam->checkError(); 146 if (is_null($objFormParam->getValue('search_pageno'))){146 if (is_null($objFormParam->getValue('search_pageno'))) { 147 147 $objFormParam->setValue('search_pageno', 1); 148 148 } 149 149 150 if ($this->getMode() == 'change'){151 if (is_null($objFormParam->getValue('change_status'))){150 if ($this->getMode() == 'change') { 151 if (is_null($objFormParam->getValue('change_status'))) { 152 152 $objFormParam->setValue('change_status',""); 153 153 }
Note: See TracChangeset
for help on using the changeset viewer.