=8) { echo ""; sleep(2); header ("Location:/login/logout.php"); exit; } if(isset($_REQUEST["mode"])) //수정 버튼을 클릭해서 호출했는지 체크 $mode=$_REQUEST["mode"]; else $mode="not"; $outputnum=$_REQUEST["outputnum"]; // 출고현황에서 넘어온 출고번호 $callback=$_REQUEST["callback"]; // 출고현황에서 체크번호 if((int)$outputnum>=1) { require_once("../lib/mydb.php"); $pdo = db_connect(); try{ $sql = "select * from chandj.bendinglist where outputnum = ? "; $stmh = $pdo->prepare($sql); $stmh->bindValue(1,$outputnum,PDO::PARAM_STR); $stmh->execute(); $counter = $stmh->rowCount(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // $row 배열로 DB 정보를 불러온다. if($counter>=1) { $mode="modify"; //수정모드로 전환 $num=$row["num"]; // print "번호를 찾았습니다.
" . $num; } } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } } else { if(isset($_REQUEST["num"])) //수정 버튼을 클릭해서 호출했는지 체크 출고현황에서 부르지 않았을때 $num=$_REQUEST["num"]; else $num=1; } $upnum=$num; // 번호를 부모번호로 넣음 if(isset($_REQUEST["page"])) //수정 버튼을 클릭해서 호출했는지 체크 $page=$_REQUEST["page"]; else $page=1; if(isset($_REQUEST["search"])) //수정 버튼을 클릭해서 호출했는지 체크 $search=$_REQUEST["search"]; else $search=""; if(isset($_REQUEST["find"])) //수정 버튼을 클릭해서 호출했는지 체크 $find=$_REQUEST["find"]; else $find=""; if(isset($_REQUEST["process"])) //수정 버튼을 클릭해서 호출했는지 체크 $process=$_REQUEST["process"]; else $process="전체"; if(isset($_REQUEST["sort"])) //수정 버튼을 클릭해서 호출했는지 체크 $sort=$_REQUEST["sort"]; else $sort="1"; if(isset($_REQUEST["outdate"])) //수정 버튼을 클릭해서 호출했는지 체크 $outdate=$_REQUEST["outdate"]; else $outdate=""; if(isset($_REQUEST["item_indate"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_indate=$_REQUEST["item_indate"]; else $item_indate=""; if(isset($_REQUEST["item_outworkplace"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_outworkplace=$_REQUEST["item_outworkplace"]; else $item_outworkplace=""; if(isset($_REQUEST["item_receiver"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_receiver=$_REQUEST["item_receiver"]; else $item_receiver=""; if(isset($_REQUEST["item_orderman"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_orderman=$_REQUEST["item_orderman"]; else $item_orderman=""; if(isset($_REQUEST["item_outputplace"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_outputplace=$_REQUEST["item_outputplace"]; else $item_outputplace=""; if(isset($_REQUEST["item_phone"])) //수정 버튼을 클릭해서 호출했는지 체크 $item_phone=$_REQUEST["item_phone"]; else $item_phone=""; if(isset($_REQUEST["item_comment"])) $item_comment=$_REQUEST["item_comment"]; else $item_comment=""; if(isset($_REQUEST["delivery"])) $item_delivery=$_REQUEST["delivery"]; else $item_delivery=""; $modify="0"; // 정렬모드 초기화 $fromdate=$_REQUEST["fromdate"]; $todate=$_REQUEST["todate"]; $outputnumint=(int)$outputnum; require_once("../lib/mydb.php"); $pdo = db_connect(); if ($mode=="modify"){ try{ $sql = "select * from chandj.bendinglist where num = ? "; $stmh = $pdo->prepare($sql); $stmh->bindValue(1,$num,PDO::PARAM_STR); $stmh->execute(); $count = $stmh->rowCount(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // $row 배열로 DB 정보를 불러온다. if($count<1){ print "검색결과가 없습니다.
"; }else{ if($callback==1) { $outputnum=$row["outputnum"]; $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"]; $item_delivery=$row["delivery"]; if($item_indate!="0000-00-00") $item_indate = date("Y-m-d", strtotime( $item_indate) ); else $item_indate=""; if($outdate!="0000-00-00") $outdate = date("Y-m-d", strtotime( $outdate) ); else $outdate=""; } } }catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } } if ($mode=="not"){ // 수정모드가 아닐때 신규 자료일때는 변수 초기화 한다. $outdate=date("Y-m-d"); $outputnum=null; $item_indate=date("Y-m-d"); $item_orderman=$_SESSION["name"]; $item_outworkplace=null; $item_outputplace=null; $item_receiver=null; $item_phone=null; $item_comment=null; $item_delivery=null; if($_SESSION["name"] =="안미희") $root="경동"; } ?> query($sql); // 검색조건에 맞는글 stmh $counter=0; $m2=0; $sum=0; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $upnum=$row["upnum"]; } } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } $m2=number_format((float)$m2, 2, '.', ''); ?> 주일기업 통합정보시스템


    절곡원가분석     발주번호:      출고 고유번호:     

출 고 일 :
접 수 일 :
발주처현장 :
수신처 :
발주자 :
수신처주소 :
연락처 :
비 고 :
       
번호
품명
세부사항
절곡면적 내역
query($sql); // 검색조건에 맞는글 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 = $stmh->fetch(PDO::FETCH_ASSOC)) { $upnum=$row["upnum"]; $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; ?>