Changeset 21444 for branches/version-2_12-dev/data/class/util/SC_Utils.php
- Timestamp:
- 2012/02/06 21:27:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/util/SC_Utils.php
r21442 r21444 550 550 /* 1.開始年月日 (YYYY/MM/DD 000000) 551 551 /* 2.終了年月日 (YYYY/MM/DD 235959) 552 /* 3.エラー ( 0 = OK, 1 = NG 552 /* 3.エラー ( 0 = OK, 1 = NG) 553 553 /*-----------------------------------------------------------------*/ 554 function sfCheckSetTerm ( $start_year, $start_month, $start_day, $end_year, $end_month, $end_day 554 function sfCheckSetTerm ( $start_year, $start_month, $start_day, $end_year, $end_month, $end_day) { 555 555 556 556 // 期間指定 557 557 $error = 0; 558 558 if ($start_month || $start_day || $start_year) { 559 if ( ! checkdate($start_month, $start_day , $start_year) 559 if ( ! checkdate($start_month, $start_day , $start_year)) $error = 1; 560 560 } else { 561 561 $error = 1; 562 562 } 563 563 if ($end_month || $end_day || $end_year) { 564 if ( ! checkdate($end_month ,$end_day ,$end_year) 564 if ( ! checkdate($end_month ,$end_day ,$end_year)) $error = 2; 565 565 } 566 566 if (! $error) { … … 1038 1038 $vals = array_values($arrValues); 1039 1039 1040 $max = max( count( $keys ), count( $vals ) 1040 $max = max( count( $keys ), count( $vals )); 1041 1041 $combine_ary = array(); 1042 1042 for ($i=0; $i<$max; $i++) { … … 1145 1145 } 1146 1146 1147 $fileArray=glob( $src."*" 1147 $fileArray=glob( $src."*"); 1148 1148 if (is_array($fileArray)) { 1149 1149 foreach ($fileArray as $key => $data_) { … … 1161 1161 mb_ereg("^(.*[\/])(.*)",$data_, $matches); 1162 1162 $data=$matches[2]; 1163 if (is_dir( $data_ 1163 if (is_dir( $data_)) { 1164 1164 $mess = SC_Utils_Ex::sfCopyDir( $data_.'/', $des.$data.'/', $mess); 1165 1165 } else { … … 1173 1173 } 1174 1174 } 1175 $mod=stat($data_ 1175 $mod=stat($data_); 1176 1176 } 1177 1177 } … … 1590 1590 $str = ""; 1591 1591 // バイナリモードでオープン 1592 $fp = @fopen($filename, 'rb' 1592 $fp = @fopen($filename, 'rb'); 1593 1593 //ファイル内容を全て変数に読み込む 1594 1594 if ($fp) { … … 1610 1610 if (is_array($arrayIndex) && 0 < count($arrayIndex)) { 1611 1611 for ($j = 0; $j < count($arrayIndex); $j++) { 1612 if ( $j > 0 1612 if ( $j > 0) $return .= ","; 1613 1613 $return .= "\""; 1614 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]] 1614 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]])) ."\""; 1615 1615 } 1616 1616 } else { 1617 1617 for ($j = 0; $j < count($array[$i]); $j++) { 1618 if ( $j > 0 1618 if ( $j > 0) $return .= ","; 1619 1619 $return .= "\""; 1620 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j] 1620 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j])) ."\""; 1621 1621 } 1622 1622 }
Note: See TracChangeset
for help on using the changeset viewer.