Changeset 21446 for branches/version-2_12-dev/data/class/util/SC_Utils.php
- Timestamp:
- 2012/02/06 21:38:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/util/SC_Utils.php
r21445 r21446 552 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)) $error = 1;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)) $error = 2;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_)) {1164 $mess = SC_Utils_Ex::sfCopyDir( $data_.'/', $des.$data.'/', $mess);1163 if (is_dir($data_)) { 1164 $mess = SC_Utils_Ex::sfCopyDir($data_.'/', $des.$data.'/', $mess); 1165 1165 } else { 1166 1166 if (!$override && file_exists($des.$data)) { 1167 1167 $mess.= $des.$data . ":ファイルが存在します\n"; 1168 1168 } else { 1169 if (@copy( $data_, $des.$data)) {1169 if (@copy($data_, $des.$data)) { 1170 1170 $mess.= $des.$data . ":コピー成功\n"; 1171 1171 } else { … … 1610 1610 if (is_array($arrayIndex) && 0 < count($arrayIndex)) { 1611 1611 for ($j = 0; $j < count($arrayIndex); $j++) { 1612 if ( $j > 0) $return .= ",";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) $return .= ",";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.
