Changeset 21926 for branches/version-2_12-dev/data/class/SC_UploadFile.php
- Timestamp:
- 2012/06/19 18:01:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.