prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $item_num = $row["num"]; $item_id = $row["id"]; $item_name = $row["name"]; $item_nick = $row["nick"]; $item_hit = $row["hit"]; $image_name[0] = $row["file_name_0"]; $image_name[1] = $row["file_name_1"]; $image_name[2] = $row["file_name_2"]; $image_copied[0] = $row["file_copied_0"]; $image_copied[1] = $row["file_copied_1"]; $image_copied[2] = $row["file_copied_2"]; $item_date = $row["regist_day"]; $item_date = substr($item_date,0,10); $item_subject = str_replace(" ", " ", $row["subject"]); $item_content = $row["content"]; $is_html = $row["is_html"]; $content=""; $sum=[]; $condate=$row["condate"]; $estimate1=$row["estimate1"]; $estimate2=$row["estimate2"]; $estimate3=$row["estimate3"]; $estimate4=$row["estimate4"]; $sum[0]=$row["estimate1"]; $sum[1]=$row["estimate2"]; $sum[2]=$row["estimate3"]; $sum[3]=$row["estimate4"]; for($i=0;$i<=3;$i++) { if($sum[$i]!="") $sumhap=preg_replace("/[^0-9]*/s","",$sum[$i]); } $bill1=$row["bill1"]; $bill2=$row["bill2"]; $bill3=$row["bill3"]; $bill4=$row["bill4"]; $bill5=$row["bill5"]; $bill6=$row["bill6"]; $billdate1=$row["billdate1"]; $billdate2=$row["billdate2"]; $billdate3=$row["billdate3"]; $billdate4=$row["billdate4"]; $billdate5=$row["billdate5"]; $billdate6=$row["billdate6"]; $deposit1=$row["deposit1"]; $deposit2=$row["deposit2"]; $deposit3=$row["deposit3"]; $deposit4=$row["deposit4"]; $deposit5=$row["deposit5"]; $deposit6=$row["deposit6"]; $depositdate1=$row["depositdate1"]; $depositdate2=$row["depositdate2"]; $depositdate3=$row["depositdate3"]; $depositdate4=$row["depositdate4"]; $depositdate5=$row["depositdate5"]; $depositdate6=$row["depositdate6"]; $claimamount1=$row["claimamount1"]; $claimamount2=$row["claimamount2"]; $claimamount3=$row["claimamount3"]; $claimamount4=$row["claimamount4"]; $claimamount5=$row["claimamount5"]; $claimamount6=$row["claimamount6"]; $claimamount7=$row["claimamount7"]; $claimdate1=$row["claimdate1"]; $claimdate2=$row["claimdate2"]; $claimdate3=$row["claimdate3"]; $claimdate4=$row["claimdate4"]; $claimdate5=$row["claimdate5"]; $claimdate6=$row["claimdate6"]; $claimbalance1=$row["claimbalance1"]; $claimbalance2=$row["claimbalance2"]; $claimbalance3=$row["claimbalance3"]; $claimbalance4=$row["claimbalance4"]; $claimbalance5=$row["claimbalance5"]; $claimbalance6=$row["claimbalance6"]; $claimbalance7=$row["claimbalance7"]; $claimperson=$row["claimperson"]; $claimtel=$row["claimtel"]; $receivable=$row["receivable"]; $totalbill=$row["totalbill"]; $asman=$row["asman"]; $asendday=$row["asendday"]; $asproday=$row["asproday"]; $accountnote =$row["accountnote"]; $workplacename=$row["workplacename"]; $chargedperson=$row["chargedperson"]; $address=$row["address"]; $firstord=$row["firstord"]; $firstordman=$row["firstordman"]; $firstordmantel=$row["firstordmantel"]; $secondord=$row["secondord"]; $secondordman=$row["secondordman"]; $secondordmantel=$row["secondordmantel"]; $worklist=$row["worklist"]; $motormaker=$row["motormaker"]; $power=$row["power"]; $workday=$row["workday"]; $worker=$row["worker"]; $endworkday=$row["endworkday"]; $cableday=$row["cableday"]; $cablestaff=$row["cablestaff"]; $endcableday=$row["endcableday"]; $asday=$row["asday"]; $asorderman=$row["asorderman"]; $asordermantel=$row["asordermantel"]; $aslist=nl2br($row["aslist"]); $asresult=nl2br($row["asresult"]); $ashistory=nl2br($row["ashistory"]); $comment=$row["comment"]; $work_state=$row["work_state"]; $as_refer=nl2br($row["as_refer"]); $asfee=$row["asfee"]; $asfee_estimate=$row["asfee_estimate"]; $as_checkboxvalue1=$row["as_checkboxvalue1"]; $as_checkboxvalue2=$row["as_checkboxvalue2"]; $as_checkboxvalue3=$row["as_checkboxvalue3"]; $as_checkboxvalue4=$row["as_checkboxvalue4"]; $subject=$workplacename; if(strlen($workplacename)>80) $workplacename=substr($workplacename, 0, 78) . ".." ; $sumbill=[]; $sumdeposit=[]; $sumbill[0]=preg_replace("/[^0-9]*/s","",$bill1); $sumbill[1]=preg_replace("/[^0-9]*/s","",$bill2); $sumbill[2]=preg_replace("/[^0-9]*/s","",$bill3); $sumbill[3]=preg_replace("/[^0-9]*/s","",$bill4); $sumbill[4]=preg_replace("/[^0-9]*/s","",$bill5); $sumbill[5]=preg_replace("/[^0-9]*/s","",$bill6); $sumdeposit[0]=preg_replace("/[^0-9]*/s","",$deposit1); $sumdeposit[1]=preg_replace("/[^0-9]*/s","",$deposit2); $sumdeposit[2]=preg_replace("/[^0-9]*/s","",$deposit3); $sumdeposit[3]=preg_replace("/[^0-9]*/s","",$deposit4); $sumdeposit[4]=preg_replace("/[^0-9]*/s","",$deposit5); $sumdeposit[5]=preg_replace("/[^0-9]*/s","",$deposit6); $total_bill=0; $total_deposit=0; for($i=0;$i<=5;$i++) { $total_bill +=$sumbill[$i]; $total_deposit +=$sumdeposit[$i]; } $total_receivable=$sumhap-$total_deposit; $total_receivable=number_format($total_receivable); $total_bill=number_format($total_bill); $total_deposit=number_format($total_deposit); if($workday!="0000-00-00") $workday = date("Y-m-d", strtotime( $workday) ); // date형태로 저장된 것들만 이렇게 표시함. else $workday=""; if($cableday!="0000-00-00") $cableday = date("Y-m-d", strtotime( $cableday) ); else $cableday=""; if($asday!="0000-00-00") $asday = date("Y-m-d", strtotime( $asday) ); else $asday=""; if($condate!="0000-00-00") $condate = date("Y-m-d", strtotime($condate) ); else $condate=""; if($billdate1!="0000-00-00") $billdate1 = date("Y-m-d", strtotime($billdate1) ); else $billdate1=""; if($billdate2!="0000-00-00") $billdate2 = date("Y-m-d", strtotime($billdate2) ); else $billdate2=""; if($billdate3!="0000-00-00") $billdate3 = date("Y-m-d", strtotime($billdate3) ); else $billdate3=""; if($billdate4!="0000-00-00") $billdate4 = date("Y-m-d", strtotime($billdate4) ); else $billdate4=""; if($billdate5!="0000-00-00") $billdate5 = date("Y-m-d", strtotime($billdate5) ); else $billdate5=""; if($billdate6!="0000-00-00") $billdate6 = date("Y-m-d", strtotime($billdate6) ); else $billdate6=""; if($depositdate1!="0000-00-00") $depositdate1 = date("Y-m-d", strtotime($depositdate1) ); else $depositdate1=""; if($depositdate2!="0000-00-00") $depositdate2 = date("Y-m-d", strtotime($depositdate2) ); else $depositdate2=""; if($depositdate3!="0000-00-00") $depositdate3 = date("Y-m-d", strtotime($depositdate3) ); else $depositdate3=""; if($depositdate4!="0000-00-00") $depositdate4 = date("Y-m-d", strtotime($depositdate4) ); else $depositdate4=""; if($depositdate5!="0000-00-00") $depositdate5 = date("Y-m-d", strtotime($depositdate5) ); else $depositdate5=""; if($depositdate6!="0000-00-00") $depositdate6 = date("Y-m-d", strtotime($depositdate6) ); else $depositdate6=""; if($claimdate1!="0000-00-00")$claimdate1 = date("Y-m-d", strtotime($claimdate1) ); else $claimdate1=""; if($claimdate2!="0000-00-00") $claimdate2 = date("Y-m-d", strtotime($claimdate2) ); else $claimdate2=""; if($claimdate3!="0000-00-00") $claimdate3 = date("Y-m-d", strtotime($claimdate3) ); else $claimdate3=""; if($claimdate4!="0000-00-00") $claimdate4 = date("Y-m-d", strtotime($claimdate4) ); else $claimdate4=""; if($claimdate5!="0000-00-00") $claimdate5 = date("Y-m-d", strtotime($claimdate5) ); else $claimdate5=""; if($claimdate6!="0000-00-00") $claimdate6 = date("Y-m-d", strtotime($claimdate6) ); else $claimdate6=""; if($asproday!="0000-00-00") $asproday = date("Y-m-d", strtotime($asproday) ); else $asproday=""; if($asendday!="0000-00-00") $asendday = date("Y-m-d", strtotime($asendday) ); else $asendday=""; if($endworkday!="0000-00-00") $endworkday = date("Y-m-d", strtotime($endworkday) ); else $endworkday=""; if($endcableday!="0000-00-00") $endcableday = date("Y-m-d", strtotime($endcableday) ); else $endcableday=""; $asrequiredperson=$asorderman . " " . $asordermantel; if($asproday!="") { $week = array("(일)" , "(월)" , "(화)" , "(수)" , "(목)" , "(금)" ,"(토)") ; $asproday = $asproday . $week[ date('w', strtotime($asproday) ) ] ; } $as_tmp="구분 : "; if($as_checkboxvalue1==null && $as_checkboxvalue2==null && $as_checkboxvalue3==null && $as_checkboxvalue4==null) $as_tmp=$as_step; else { if($as_checkboxvalue1=='Y') $as_tmp .= "AS "; if($as_checkboxvalue2=='Y') $as_tmp .= "결선 "; if($as_checkboxvalue3=='Y') $as_tmp .= "입결선 "; if($as_checkboxvalue4=='Y') $as_tmp .= "셔터시공"; } ?> AS 작업지시서 출력
getMessage(); } ?>