5) { /* alert("관리자 승인이 필요합니다."); */ sleep(2); header ("Location:/login/logout.php"); exit; } header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 header("Expires: 0"); // rfc2616 - Section 14.21 //header("Refresh:0"); // reload refresh $parentnum=$_REQUEST["parentnum"]; // 리스트번호 $upnum=$_REQUEST["upnum"]; // 발주서 번호 $tempnum=$_REQUEST["upnum"]; // 발주서 번호 비교를 위해 임시변수 만듦 $num=$_REQUEST["num"]; // 발주서 번호 비교를 위해 임시변수 만듦 $outputnum=$_REQUEST["outputnum"]; // 출고고유번호 $datanum=$_REQUEST["datanum"]; //절곡데이터 번호 기억 $callback=$_REQUEST["callback"]; // 출고현황에서 넘어온 자료인지 체크 $sort=$_REQUEST["sort"]; $recallcal=$_REQUEST["recallcal"]; $total_text=$_REQUEST["total_text"]; $modify=$_REQUEST["modify"]; if($modify=="update") { $steeltype=$_REQUEST["steeltype"]; $tmp_steeltype=$steeltype; $steel_alias=$_REQUEST["steel_alias"]; $tmp_steel_alias=$steel_alias; $copied_file_name=$_REQUEST["copied_file_name"]; $tmp_copied_file_name=$copied_file_name; $uploaded_file=$_REQUEST["uploaded_file"]; $tmp_uploaded_file=$uploaded_file; $tmp_length1=$_REQUEST["length1"]; $tmp_length2=$_REQUEST["length2"]; $tmp_length3=$_REQUEST["length3"]; $tmp_length4=$_REQUEST["length4"]; $tmp_length5=$_REQUEST["length5"]; $tmp_amount1=$_REQUEST["amount1"]; $tmp_amount2=$_REQUEST["amount2"]; $tmp_amount3=$_REQUEST["amount3"]; $tmp_amount4=$_REQUEST["amount4"]; $tmp_amount5=$_REQUEST["amount5"]; $tmp_material1=$_REQUEST["material1"]; $tmp_material2=$_REQUEST["material2"]; $tmp_material3=$_REQUEST["material3"]; $tmp_material4=$_REQUEST["material4"]; $tmp_material5=$_REQUEST["material5"]; $tmp_material6=$_REQUEST["material6"]; $tmp_material7=$_REQUEST["material7"]; $tmp_material8=$_REQUEST["material8"]; require_once("../lib/mydb.php"); $pdo = db_connect(); $sql="select * from chandj.atbending where num='$datanum' order by num desc"; // 처음 내림차순 try{ $stmh = $pdo->query($sql); // 검색조건에 맞는글 stmh $counter=0; $sum=0; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $a1=$row["a1"]; $a2=$row["a2"]; $a3=$row["a3"]; $a4=$row["a4"]; $a5=$row["a5"]; $a6=$row["a6"]; $a7=$row["a7"]; $a8=$row["a8"]; $a9=$row["a9"]; $a10=$row["a10"]; $a11=$row["a11"]; $a12=$row["a12"]; $a13=$row["a13"]; $a14=$row["a14"]; $a15=$row["a15"]; $a16=$row["a16"]; $a17=$row["a17"]; $a18=$row["a18"]; $a19=$row["a19"]; $a20=$row["a20"]; $a21=$row["a21"]; $a22=$row["a22"]; $a23=$row["a23"]; $a24=$row["a24"]; $a25=$row["a25"]; $b1=$row["b1"]; $b2=$row["b2"]; $b3=$row["b3"]; $b4=$row["b4"]; $b5=$row["b5"]; $b6=$row["b6"]; $b7=$row["b7"]; $b8=$row["b8"]; $b9=$row["b9"]; $b10=$row["b10"]; $b11=$row["b11"]; $b12=$row["b12"]; $b13=$row["b13"]; $b14=$row["b14"]; $b15=$row["b15"]; $b16=$row["b16"]; $b17=$row["b17"]; $b18=$row["b18"]; $b19=$row["b19"]; $b20=$row["b20"]; $b21=$row["b21"]; $b22=$row["b22"]; $b23=$row["b23"]; $b24=$row["b24"]; $b25=$row["b25"]; $c1=$row["c1"]; $c2=$row["c2"]; $c3=$row["c3"]; $c4=$row["c4"]; $c5=$row["c5"]; $c6=$row["c6"]; $c7=$row["c7"]; $c8=$row["c8"]; $c9=$row["c9"]; $c10=$row["c10"]; $c11=$row["c11"]; $c12=$row["c12"]; $c13=$row["c13"]; $c14=$row["c14"]; $c15=$row["c15"]; $c16=$row["c16"]; $c17=$row["c17"]; $c18=$row["c18"]; $c19=$row["c19"]; $c20=$row["c20"]; $c21=$row["c21"]; $c22=$row["c22"]; $c23=$row["c23"]; $c24=$row["c24"]; $c25=$row["c25"]; $d1=$row["d1"]; $d2=$row["d2"]; $d3=$row["d3"]; $d4=$row["d4"]; $d5=$row["d5"]; $d6=$row["d6"]; $d7=$row["d7"]; $d8=$row["d8"]; $d9=$row["d9"]; $d10=$row["d10"]; $d11=$row["d11"]; $d12=$row["d12"]; $d13=$row["d13"]; $d14=$row["d14"]; $d15=$row["d15"]; $d16=$row["d16"]; $d17=$row["d17"]; $d18=$row["d18"]; $d19=$row["d19"]; $d20=$row["d20"]; $d21=$row["d21"]; $d22=$row["d22"]; $d23=$row["d23"]; $d24=$row["d24"]; $d25=$row["d25"]; $e1=$row["e1"]; $e2=$row["e2"]; $e3=$row["e3"]; $e4=$row["e4"]; $e5=$row["e5"]; $e6=$row["e6"]; $e7=$row["e7"]; $e8=$row["e8"]; $e9=$row["e9"]; $e10=$row["e10"]; $e11=$row["e11"]; $e12=$row["e12"]; $e13=$row["e13"]; $e14=$row["e14"]; $e15=$row["e15"]; $e16=$row["e16"]; $e17=$row["e17"]; $e18=$row["e18"]; $e19=$row["e19"]; $e20=$row["e20"]; $e21=$row["e21"]; $e22=$row["e22"]; $e23=$row["e23"]; $e24=$row["e24"]; $e25=$row["e25"]; $f1=$row["f1"]; $f2=$row["f2"]; $f3=$row["f3"]; $f4=$row["f4"]; $f5=$row["f5"]; $f6=$row["f6"]; $f7=$row["f7"]; $f8=$row["f8"]; $f9=$row["f9"]; $f10=$row["f10"]; $f11=$row["f11"]; $f12=$row["f12"]; $f13=$row["f13"]; $f14=$row["f14"]; $f15=$row["f15"]; $f16=$row["f16"]; $f17=$row["f17"]; $f18=$row["f18"]; $f19=$row["f19"]; $f20=$row["f20"]; $f21=$row["f21"]; $f22=$row["f22"]; $f23=$row["f23"]; $f24=$row["f24"]; $f25=$row["f25"]; $g1=$row["g1"]; $g2=$row["g2"]; $g3=$row["g3"]; $g4=$row["g4"]; $g5=$row["g5"]; $g6=$row["g6"]; $g7=$row["g7"]; $g8=$row["g8"]; $g9=$row["g9"]; $g10=$row["g10"]; $g11=$row["g11"]; $g12=$row["g12"]; $g13=$row["g13"]; $g14=$row["g14"]; $g15=$row["g15"]; $g16=$row["g16"]; $g17=$row["g17"]; $g18=$row["g18"]; $g19=$row["g19"]; $g20=$row["g20"]; $g21=$row["g21"]; $g22=$row["g22"]; $g23=$row["g23"]; $g24=$row["g24"]; $g25=$row["g25"]; $h1=$row["h1"]; $h2=$row["h2"]; $h3=$row["h3"]; $h4=$row["h4"]; $h5=$row["h5"]; $h6=$row["h6"]; $h7=$row["h7"]; $h8=$row["h8"]; $h9=$row["h9"]; $h10=$row["h10"]; $h11=$row["h11"]; $h12=$row["h12"]; $h13=$row["h13"]; $h14=$row["h14"]; $h15=$row["h15"]; $h16=$row["h16"]; $h17=$row["h17"]; $h18=$row["h18"]; $h19=$row["h19"]; $h20=$row["h20"]; $h21=$row["h21"]; $h22=$row["h22"]; $h23=$row["h23"]; $h24=$row["h24"]; $h25=$row["h25"]; $arr_sum=compact("a_sum","b_sum","c_sum","d_sum","e_sum","f_sum","g_sum","h_sum","total_sum"); for ($j=0;$j<8;$j++) { switch ($j) { case 0: $str='A'; break; case 1: $str='B'; break; case 2: $str='C'; break; case 3: $str='D'; break; case 4: $str='E'; break; case 5: $str='F'; break; case 6: $str='G'; break; case 7: $str='H'; break; } $str=strtolower($str); $arr=compact($str."1",$str."2",$str."3",$str."4",$str."5",$str."6",$str."7",$str."8",$str."9",$str."10",$str."11",$str."12",$str."13",$str."14",$str."15",$str."16",$str."17",$str."18",$str."19",$str."20",$str."21",$str."21",$str."22",$str."23",$str."24",$str."25"); $arr_row_tmp=$str."_sum"; for($i=0;$i<25;$i++) { $temp= $str . ($i+1); $cc=($j*25)+$i+4; $arr_sum[$arr_row_tmp] += $arr[$temp]; // print $arr_sum[$arr_row_tmp]; } $arr_sum["total_sum"] += $arr_sum[$arr_row_tmp]; } $tmp_sum1=$arr_sum["a_sum"]; $tmp_sum2=$arr_sum["b_sum"]; $tmp_sum3=$arr_sum["c_sum"]; $tmp_sum4=$arr_sum["d_sum"]; $tmp_sum5=$arr_sum["e_sum"]; $tmp_sum6=$arr_sum["f_sum"]; $tmp_sum7=$arr_sum["g_sum"]; $tmp_sum8=$arr_sum["h_sum"]; } } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } } $ordercompany=$_REQUEST["ordercompany"]; if($sort=='' || $sort=='0') $sort='1'; require_once("../lib/mydb.php"); $pdo = db_connect(); if($sort=='1') $sql="select * from chandj.bending_write where upnum='$parentnum' order by num desc"; // 처음 내림차순 else $sql="select * from chandj.bending_write where upnum='$parentnum' order by num asc"; // 처음 오름차순 try{ $stmh = $pdo->query($sql); // 검색조건에 맞는글 stmh $counter=0; $sum=0; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $upnum=$row["upnum"]; if((int)$upnum==(int)$parentnum) { $counter++; $sum+=(int)$row["sum1"]; } } } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } if($modify!="update") $modify="0"; // 신규등록을 위한 설정 ?> query($sql); // 검색조건에 맞는글 stmh $temp=$stmh->rowCount(); $total_row = $temp; // 전체 글수 $total_page = ceil($total_row / $scale); // 검색 전체 페이지 블록 수 $current_page = ceil($page/$page_scale); //현재 페이지 블록 위치계산 if ($page<=1) $start_num=$total_row; // 페이지당 표시되는 첫번째 글순번 else $start_num=$total_row-($page-1) * $scale; $steel_arr = array(); $steel_arr_sum = array(); $arr_count=0; for($j=1;$j<=9;$j++) // 합계 배열 초기화 $steel_arr_sum[$j]=0; $display_text=""; ?> 주일기업 통합정보시스템



절곡원가 계산    절곡발주 접수번호 :   ,    레코드 수 :  
발주처(현장명) :
품목 :
'; print ''; } else print ''; ?>

                 
번호
품명
세부사항
절곡면적 내역
fetch(PDO::FETCH_ASSOC)) { $upnum=$row["upnum"]; if((int)$upnum==(int)$tempnum) { $counter++; $num=$row["num"]; $steeltype=$row["steeltype"]; $steel_alias=$row["steel_alias"]; // print $steeltype; // print $upnum . " " . $tempnum; $parentnum=$row["parentnum"]; // 리스트번호 $num=$row["num"]; // 전달인수가 변수명과 겹치면 오류가 발생해서 받아들이지 않는다. $outputnum=$row["outputnum"]; $length1=$row["length1"]; $length2=$row["length2"]; $length3=$row["length3"]; $length4=$row["length4"]; $length5=$row["length5"]; $amount1=$row["amount1"]; $amount2=$row["amount2"]; $amount3=$row["amount3"]; $amount4=$row["amount4"]; $amount5=$row["amount5"]; $material1=$row["material1"]; $material2=$row["material2"]; $material3=$row["material3"]; $material4=$row["material4"]; $material5=$row["material5"]; $material6=$row["material6"]; $material7=$row["material7"]; $material8=$row["material8"]; $sum1=$row["sum1"]; $sum2=$row["sum2"]; $sum3=$row["sum3"]; $sum4=$row["sum4"]; $sum5=$row["sum5"]; $sum6=$row["sum6"]; $sum7=$row["sum7"]; $sum8=$row["sum8"]; $total_text=$row["total_text"]; $datanum=$row["datanum"]; $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]; } } } //print "--->" . (count($jbexplode)-1); // echo ''; ?>
 
getMessage(); } // 페이지 구분 블럭의 첫 페이지 수 계산 ($start_page) $start_page = ($current_page - 1) * $page_scale + 1; // 페이지 구분 블럭의 마지막 페이지 수 계산 ($end_page) $end_page = $start_page + $page_scale - 1; ?>

' . $steel_arr_sum[$j] . '(㎡), '; } } // print '
'; // print $display_text; ?>