Changeset 21926
- Timestamp:
- 2012/06/19 18:01:38 (12 years ago)
- Location:
- branches/version-2_12-dev/data/class
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Fpdf.php
r21867 r21926 64 64 65 65 // PDFを読み込んでページ数を取得 66 $ pageno = $this->setSourceFile($this->tpl_pdf);66 $this->pageno = $this->setSourceFile($this->tpl_pdf); 67 67 } 68 68 … … 81 81 if (SC_Utils_Ex::sfIsInt($arrData['order_id'])) { 82 82 $this->disp_mode = true; 83 $order_id = $arrData['order_id'];84 83 } 85 84 … … 141 140 142 141 function setOrderData() { 142 $arrOrder = array(); 143 143 // DBから受注情報を読み込む 144 144 $this->lfGetOrderData($this->arrData['order_id']); -
branches/version-2_12-dev/data/class/SC_Image.php
r21867 r21926 85 85 86 86 //拡張子取得 87 if (!$ext) { 88 $array_ext = explode('.', $FromImgPath); 89 $ext = $array_ext[count($array_ext) - 1]; 90 } 87 $array_ext = explode('.', $FromImgPath); 88 $ext = $array_ext[count($array_ext) - 1]; 91 89 92 90 $MW = $ThmMaxWidth; -
branches/version-2_12-dev/data/class/SC_MobileEmoji.php
r21867 r21926 56 56 } 57 57 58 static $arrMap ;59 if ( !isset($arrMap)) {58 static $arrMap = array(); 59 if (empty($arrMap)) { 60 60 $arrMap = @include_once dirname(__FILE__) . "/../include/mobile_emoji_map_$carrier.inc"; 61 61 } -
branches/version-2_12-dev/data/class/SC_MobileImage.php
r21867 r21926 48 48 49 49 // HTML中のIMGタグを取得する 50 $images = array(); 50 51 $pattern = '/<img\s+[^<>]*src=[\'"]?([^>"\'\s]+)[\'"]?[^>]*>/i'; 51 52 $result = preg_match_all($pattern, $buffer, $images); -
branches/version-2_12-dev/data/class/SC_Product.php
r21867 r21926 548 548 */ 549 549 function setPriceTaxTo($arrProducts) { 550 foreach ( $arrProducts as $key => $val) {550 foreach (array_keys($arrProducts) as $key) { 551 551 $arrProducts[$key]['price01_min_format'] = number_format($arrProducts[$key]['price01_min']); 552 552 $arrProducts[$key]['price01_max_format'] = number_format($arrProducts[$key]['price01_max']); … … 599 599 */ 600 600 function alldtlSQL($where_products_class = '') { 601 $where_clause = '';602 601 if (!SC_Utils_Ex::isBlank($where_products_class)) { 603 602 $where_products_class = 'AND (' . $where_products_class . ')'; -
branches/version-2_12-dev/data/class/SC_SelectSql.php
r21867 r21926 122 122 // checkboxなどで同一カラム内で単一、もしくは複数選択肢が有る場合 例: AND ( sex = xxx OR sex = xxx OR sex = xxx) AND ... 123 123 function setItemTerm($arr, $ItemStr) { 124 124 $return = array(); 125 125 foreach ($arr as $data) { 126 126 … … 147 147 // NULL値が必要な場合 148 148 function setItemTermWithNull($arr, $ItemStr) { 149 150 $item = " ${ItemStr} IS NULL ";149 $return = array(); 150 $item = " {$ItemStr} IS NULL "; 151 151 152 152 if ($arr) { 153 153 foreach ($arr as $data) { 154 154 if ($data != '不明') { 155 $item .= " OR ${ItemStr} = ?";155 $item .= " OR {$ItemStr} = ?"; 156 156 $return[] = $data; 157 157 } … … 159 159 } 160 160 161 $item = "( ${item}) ";161 $item = "({$item}) "; 162 162 $this->setWhere($item); 163 163 return $return; … … 165 165 // NULLもしくは''で検索する場合 166 166 function setItemTermWithNullAndSpace($arr, $ItemStr) { 167 $return = array(); 167 168 $count = count($arr); 168 $item = " ${ItemStr} IS NULL OR ${ItemStr} = '' ";169 $item = " {$ItemStr} IS NULL OR {$ItemStr} = '' "; 169 170 $i = 1; 170 171 if ($arr) { 171 172 foreach ($arr as $data) { 172 173 if ($i == $count) break; 173 $item .= " OR ${ItemStr} = ?";174 $item .= " OR {$ItemStr} = ?"; 174 175 $return[] = $data; 175 176 $i ++; 176 177 } 177 178 } 178 $item = "( ${item}) ";179 $item = "({$item}) "; 179 180 $this->setWhere($item); 180 181 return $return; -
branches/version-2_12-dev/data/class/SC_SendMail.php
r21867 r21926 200 200 function getBaseHeader() { 201 201 //-- 送信するメールの内容と送信先 202 $arrHeader = array(); 202 203 $arrHeader['MIME-Version'] = '1.0'; 203 204 $arrHeader['To'] = $this->to; -
branches/version-2_12-dev/data/class/SC_UploadFile.php
r21894 r21926 218 218 // 一時ファイルを保存ディレクトリに移す 219 219 function moveTempFile() { 220 $cnt = 0;221 220 $objImage = new SC_Image_Ex($this->temp_dir); 222 221 223 for each ($this->keyname as $val) {222 for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 224 223 if (isset($this->temp_file[$cnt]) && $this->temp_file[$cnt] != '') { 225 224 … … 235 234 } 236 235 } 237 $cnt++;238 236 } 239 237 } … … 241 239 // ダウンロード一時ファイルを保存ディレクトリに移す 242 240 function moveTempDownFile() { 243 $cnt = 0;244 241 $objImage = new SC_Image_Ex($this->temp_dir); 245 for each ($this->keyname as $val) {242 for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 246 243 if (isset($this->temp_file[$cnt]) && $this->temp_file[$cnt] != '') { 247 244 $objImage->moveTempImage($this->temp_file[$cnt], $this->save_dir); … … 254 251 } 255 252 } 256 $cnt++;257 253 } 258 254 } … … 347 343 function getFormDownFile() { 348 344 $arrRet = ''; 349 $cnt = 0; 350 foreach ($this->keyname as $val) { 345 for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 351 346 if (isset($this->temp_file[$cnt]) && $this->temp_file[$cnt] != '') { 352 347 $arrRet = $this->temp_file[$cnt]; … … 354 349 $arrRet = $this->save_file[$cnt]; 355 350 } 356 $cnt++;357 351 } 358 352 return $arrRet; … … 375 369 function getDBFileList() { 376 370 $cnt = 0; 371 $dbFileList = array(); 377 372 foreach ($this->keyname as $val) { 378 373 if (isset($this->temp_file[$cnt]) && $this->temp_file[$cnt] != '') { 379 $ arrRet[$val] = $this->temp_file[$cnt];374 $dbFileList[$val] = $this->temp_file[$cnt]; 380 375 } else { 381 $ arrRet[$val] = isset($this->save_file[$cnt]) ? $this->save_file[$cnt] : '';382 } 383 $cnt++; 384 } 385 return $ arrRet;376 $dbFileList[$val] = isset($this->save_file[$cnt]) ? $this->save_file[$cnt] : ''; 377 } 378 $cnt++; 379 } 380 return $dbFileList; 386 381 } 387 382 … … 405 400 406 401 // DBで保存されたダウンロードファイル名をセットする(setDBDownFileと統合予定) 407 function setPostFileList($arrPost,$arrVal) { 408 $cnt = 0; 409 foreach ($this->keyname as $val) { 402 function setPostFileList($arrPost) { 403 for ($cnt = 0;$cnt < count($this->keyname); $cnt++) { 410 404 if (isset($arrPost['temp_down_realfilename:' . ($cnt+1)])) { 411 405 $this->temp_file[$cnt] = $arrPost['temp_down_realfilename:' . ($cnt+1)]; 412 406 } 413 $cnt++;414 407 } 415 408 } -
branches/version-2_12-dev/data/class/SC_View.php
r21867 r21926 78 78 79 79 // テンプレートの処理結果を取得 80 function fetch($template , $no_error=false) {80 function fetch($template) { 81 81 return $this->_smarty->fetch($template); 82 82 } … … 192 192 /* サイト初期設定 */ 193 193 function initpath() { 194 194 $array = array(); 195 195 $array['tpl_mainnavi'] = realpath(dirname(__FILE__)) . '/../Smarty/templates/frontparts/mainnavi.tpl'; 196 196 -
branches/version-2_12-dev/data/class/helper/SC_Helper_FPDI.php
r21829 r21926 164 164 // Data 165 165 $fill = 0; 166 $h = 4; 166 167 foreach ($data as $row) { 167 168 $h = 4;
Note: See TracChangeset
for help on using the changeset viewer.