fetch(PDO::FETCH_ASSOC)) {
$item_num=$row["num"];
$outdate=$row["outdate"];
$item_indate=$row["indate"];
$item_orderman=$row["orderman"];
$item_outworkplace=$row["outworkplace"];
$item_outputplace=$row["outputplace"];
$item_receiver=$row["receiver"];
$item_phone=$row["phone"];
$item_comment=$row["comment"];
$date_font="black"; // 현재일자 Red 색상으로 표기
if($nowday==$outdate) {
$date_font="red";
}
if($outdate!="") {
$week = array("(일)" , "(월)" , "(화)" , "(수)" , "(목)" , "(금)" ,"(토)") ;
$outdate = $outdate . $week[ date('w', strtotime($outdate) ) ] ;
}
// 면적구하는 부분
$parentnum=$item_num;
$sqlTemp="select * from chandj.bending_write where upnum='$item_num' order by num desc"; // 처음 내림차순
try{
$m_array=array();
$stmh_temp = $pdo->query($sqlTemp); // 검색조건에 맞는글 stmh
$sum=0;
$counter=0;
$display_text="";
$options = array();
$options[1] = 'EGI1.6T';
$options[2] = 'EGI1.2T';
$options[3] = 'EGI0.8T';
$options[4] = 'SUS H/L 1.5T';
$options[5] = 'SUS H/L 1.2T';
$options[6] = 'GI0.45T';
$options[7] = 'GI0.8T';
$options[8] = 'Mirror 1.5';
$options[9] = 'Mirror 1.2';
while($row_temp = $stmh_temp->fetch(PDO::FETCH_ASSOC)) {
$counter++;
$total_text=$row_temp["total_text"];
$arr_count++;
$jb = explode( ',', $total_text );
// print $jb[0] . " " . $jb[1]; // 분할된 것 화면에 보여주기 테스트용
$total_count=count($jb); // 배열의 수를 파악해서 반복문을 만든다.
for($i=1;$i<=$total_count;$i++)
{
$tmp = explode( '=', $jb[$i-1] );
for($j=1;$j<=9;$j++) // 합계 배열에 누적
{
if($tmp[0]==$options[$j]) {
$steel_arr_sum[$j] = $steel_arr_sum[$j] + (float)$tmp[1];
}
}
}
}
} catch (PDOException $Exception) {
print "오류: ".$Exception->getMessage();
}
// $m2=number_format((float)$m2, 2, '.', '');
?>
=substr($outdate,0,15)?>
';
print '
';
}
else
{
print '
';
}
?>
=substr($item_indate,0,10)?>
=iconv_substr($item_outworkplace,0,14,"utf-8")?>
=iconv_substr($item_receiver,0,15,"utf-8")?>
=iconv_substr($item_outputplace,0,22,"utf-8")?>
=substr($item_phone,0,25)?>
=substr($item_orderman,0,10)?>
=$steel_arr_sum[1]?>
=$steel_arr_sum[2]?>
=$steel_arr_sum[3]?>
=$steel_arr_sum[4]?>
=$steel_arr_sum[5]?>
=$steel_arr_sum[6]?>
=$steel_arr_sum[7]?>
getMessage();
}
// 페이지 구분 블럭의 첫 페이지 수 계산 ($start_page)
$start_page = ($current_page - 1) * $page_scale + 1;
// 페이지 구분 블럭의 마지막 페이지 수 계산 ($end_page)
$end_page = $start_page + $page_scale - 1;
?>
$page_scale)
{
$prev_page = $page - $page_scale;
// 이전 페이지값은 해당 페이지 수에서 리스트에 표시될 페이지수 만큼 감소
if($prev_page <= 0)
$prev_page = 1; // 만약 감소한 값이 0보다 작거나 같으면 1로 고정
print "
◀ ";
}
for($i=$start_page; $i<=$end_page && $i<= $total_page; $i++)
{ // [1][2][3] 페이지 번호 목록 출력
if($page==$i) // 현재 위치한 페이지는 링크 출력을 하지 않도록 설정.
print "
[$i]";
else
print "
[$i]";
}
if($page<$total_page)
{
$next_page = $page + $page_scale;
if($next_page > $total_page)
$next_page = $total_page;
// netx_page 값이 전체 페이지수 보다 크면 맨 뒤 페이지로 이동시킴
print "
▶";
}
?>