ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/erp_231024/ |
Upload File : |
<? include "../include/top_proc.html"; //공통파일 인클루드 include "_common.php"; //테이블 $TABLE = 'TB_EASY_ERP'; function convertInt($num) { return (int)str_replace(",", "", $num); } if ($SqlType == 'insert') { $SQL = "INSERT INTO {$TABLE} SET "; $SQL .= "title='{$title}', "; if($schedule_date){ $SQL .= "schedule_date = '{$schedule_date}', "; } if($schedule_contents){ $SQL .= "schedule_contents = '{$schedule_contents}', "; } if ($deposit_title1 || $deposit_cnt1 || $deposit_unit_price1 || $deposit_total_price1) { $deposit_cnt1 = convertInt($deposit_cnt1); $deposit_unit_price1 = convertInt($deposit_unit_price1); $deposit_total_price1 = convertInt($deposit_total_price1); $SQL .= "deposit_title1 = '{$deposit_title1}',"; $SQL .= "deposit_cnt1 = '{$deposit_cnt1}',"; $SQL .= "deposit_unit_price1 = '{$deposit_unit_price1}',"; $SQL .= "deposit_total_price1 = '{$deposit_total_price1}',"; } if ($deposit_title2 || $deposit_cnt2 || $deposit_unit_price2 || $deposit_total_price2) { $deposit_cnt2 = convertInt($deposit_cnt2); $deposit_unit_price2 = convertInt($deposit_unit_price2); $deposit_total_price2 = convertInt($deposit_total_price2); $SQL .= "deposit_title2 = '{$deposit_title2}',"; $SQL .= "deposit_cnt2 = '{$deposit_cnt2}',"; $SQL .= "deposit_unit_price2 = '{$deposit_unit_price2}',"; $SQL .= "deposit_total_price2 = '{$deposit_total_price2}',"; } if ($deposit_title3 || $deposit_cnt3 || $deposit_unit_price3 || $deposit_total_price3) { $deposit_cnt3 = convertInt($deposit_cnt3); $deposit_unit_price3 = convertInt($deposit_unit_price3); $deposit_total_price3 = convertInt($deposit_total_price3); $SQL .= "deposit_title3 = '{$deposit_title3}',"; $SQL .= "deposit_cnt3 = '{$deposit_cnt3}',"; $SQL .= "deposit_unit_price3 = '{$deposit_unit_price3}',"; $SQL .= "deposit_total_price3 = '{$deposit_total_price3}',"; } if ($deposit_title4 || $deposit_cnt4 || $deposit_unit_price4 || $deposit_total_price4) { $deposit_cnt4 = convertInt($deposit_cnt4); $deposit_unit_price4 = convertInt($deposit_unit_price4); $deposit_total_price4 = convertInt($deposit_total_price4); $SQL .= "deposit_title4 = '{$deposit_title4}',"; $SQL .= "deposit_cnt4 = '{$deposit_cnt4}',"; $SQL .= "deposit_unit_price4 = '{$deposit_unit_price4}',"; $SQL .= "deposit_total_price4 = '{$deposit_total_price4}',"; } if ($deposit_title5 || $deposit_cnt5 || $deposit_unit_price5 || $deposit_total_price5) { $deposit_cnt5 = convertInt($deposit_cnt5); $deposit_unit_price5 = convertInt($deposit_unit_price5); $deposit_total_price5 = convertInt($deposit_total_price5); $SQL .= "deposit_title5 = '{$deposit_title5}',"; $SQL .= "deposit_cnt5 = '{$deposit_cnt5}',"; $SQL .= "deposit_unit_price5 = '{$deposit_unit_price5}',"; $SQL .= "deposit_total_price5 = '{$deposit_total_price5}',"; } if ($deposit_title6 || $deposit_cnt6 || $deposit_unit_price6 || $deposit_total_price6) { $deposit_cnt6 = convertInt($deposit_cnt6); $deposit_unit_price6 = convertInt($deposit_unit_price6); $deposit_total_price6 = convertInt($deposit_total_price6); $SQL .= "deposit_title6 = '{$deposit_title6}',"; $SQL .= "deposit_cnt6 = '{$deposit_cnt6}',"; $SQL .= "deposit_unit_price6 = '{$deposit_unit_price6}',"; $SQL .= "deposit_total_price6 = '{$deposit_total_price6}',"; } if ($deposit_title7 || $deposit_cnt7 || $deposit_unit_price7 || $deposit_total_price7) { $deposit_cnt7 = convertInt($deposit_cnt7); $deposit_unit_price7 = convertInt($deposit_unit_price7); $deposit_total_price7 = convertInt($deposit_total_price7); $SQL .= "deposit_title7 = '{$deposit_title7}',"; $SQL .= "deposit_cnt7 = '{$deposit_cnt7}',"; $SQL .= "deposit_unit_price7 = '{$deposit_unit_price7}',"; $SQL .= "deposit_total_price7 = '{$deposit_total_price7}',"; } if ($deposit_title8 || $deposit_cnt8 || $deposit_unit_price8 || $deposit_total_price8) { $deposit_cnt8 = convertInt($deposit_cnt8); $deposit_unit_price8 = convertInt($deposit_unit_price8); $deposit_total_price8 = convertInt($deposit_total_price8); $SQL .= "deposit_title8 = '{$deposit_title8}',"; $SQL .= "deposit_cnt8 = '{$deposit_cnt8}',"; $SQL .= "deposit_unit_price8 = '{$deposit_unit_price8}',"; $SQL .= "deposit_total_price8 = '{$deposit_total_price8}',"; } if ($deposit_title9 || $deposit_cnt9 || $deposit_unit_price9 || $deposit_total_price9) { $deposit_cnt9 = convertInt($deposit_cnt9); $deposit_unit_price9 = convertInt($deposit_unit_price9); $deposit_total_price9 = convertInt($deposit_total_price9); $SQL .= "deposit_title9 = '{$deposit_title9}',"; $SQL .= "deposit_cnt9 = '{$deposit_cnt9}',"; $SQL .= "deposit_unit_price9 = '{$deposit_unit_price9}',"; $SQL .= "deposit_total_price9 = '{$deposit_total_price9}',"; } if ($deposit_title10 || $deposit_cnt10 || $deposit_unit_price10 || $deposit_total_price10) { $deposit_cnt10 = convertInt($deposit_cnt10); $deposit_unit_price10 = convertInt($deposit_unit_price10); $deposit_total_price10 = convertInt($deposit_total_price10); $SQL .= "deposit_title10 = '{$deposit_title10}',"; $SQL .= "deposit_cnt10 = '{$deposit_cnt10}',"; $SQL .= "deposit_unit_price10 = '{$deposit_unit_price10}',"; $SQL .= "deposit_total_price10 = '{$deposit_total_price10}',"; } if ($deposit_title11 || $deposit_cnt11 || $deposit_unit_price11 || $deposit_total_price11) { $deposit_cnt11 = convertInt($deposit_cnt11); $deposit_unit_price11 = convertInt($deposit_unit_price11); $deposit_total_price11 = convertInt($deposit_total_price11); $SQL .= "deposit_title11 = '{$deposit_title11}',"; $SQL .= "deposit_cnt11 = '{$deposit_cnt11}',"; $SQL .= "deposit_unit_price11 = '{$deposit_unit_price11}',"; $SQL .= "deposit_total_price11 = '{$deposit_total_price11}',"; } if ($deposit_title12 || $deposit_cnt12 || $deposit_unit_price12 || $deposit_total_price12) { $deposit_cnt12 = convertInt($deposit_cnt12); $deposit_unit_price12 = convertInt($deposit_unit_price12); $deposit_total_price12 = convertInt($deposit_total_price12); $SQL .= "deposit_title12 = '{$deposit_title12}',"; $SQL .= "deposit_cnt12 = '{$deposit_cnt12}',"; $SQL .= "deposit_unit_price12 = '{$deposit_unit_price12}',"; $SQL .= "deposit_total_price12 = '{$deposit_total_price12}',"; } if ($deposit_title13 || $deposit_cnt13 || $deposit_unit_price13 || $deposit_total_price13) { $deposit_cnt13 = convertInt($deposit_cnt13); $deposit_unit_price13 = convertInt($deposit_unit_price13); $deposit_total_price13 = convertInt($deposit_total_price13); $SQL .= "deposit_title13 = '{$deposit_title13}',"; $SQL .= "deposit_cnt13 = '{$deposit_cnt13}',"; $SQL .= "deposit_unit_price13 = '{$deposit_unit_price13}',"; $SQL .= "deposit_total_price13 = '{$deposit_total_price13}',"; } if ($deposit_title14 || $deposit_cnt14 || $deposit_unit_price14 || $deposit_total_price14) { $deposit_cnt14 = convertInt($deposit_cnt14); $deposit_unit_price14 = convertInt($deposit_unit_price14); $deposit_total_price14 = convertInt($deposit_total_price14); $SQL .= "deposit_title14 = '{$deposit_title14}',"; $SQL .= "deposit_cnt14 = '{$deposit_cnt14}',"; $SQL .= "deposit_unit_price14 = '{$deposit_unit_price14}',"; $SQL .= "deposit_total_price14 = '{$deposit_total_price14}',"; } if ($deposit_title15 || $deposit_cnt15 || $deposit_unit_price15 || $deposit_total_price15) { $deposit_cnt15 = convertInt($deposit_cnt15); $deposit_unit_price15 = convertInt($deposit_unit_price15); $deposit_total_price15 = convertInt($deposit_total_price15); $SQL .= "deposit_title15 = '{$deposit_title15}',"; $SQL .= "deposit_cnt15 = '{$deposit_cnt15}',"; $SQL .= "deposit_unit_price15 = '{$deposit_unit_price15}',"; $SQL .= "deposit_total_price15 = '{$deposit_total_price15}',"; } if ($deposit_title16 || $deposit_cnt16 || $deposit_unit_price16 || $deposit_total_price16) { $deposit_cnt16 = convertInt($deposit_cnt16); $deposit_unit_price16 = convertInt($deposit_unit_price16); $deposit_total_price16 = convertInt($deposit_total_price16); $SQL .= "deposit_title16 = '{$deposit_title16}',"; $SQL .= "deposit_cnt16 = '{$deposit_cnt16}',"; $SQL .= "deposit_unit_price16 = '{$deposit_unit_price16}',"; $SQL .= "deposit_total_price16 = '{$deposit_total_price16}',"; } if ($deposit_title17 || $deposit_cnt17 || $deposit_unit_price17 || $deposit_total_price17) { $deposit_cnt17 = convertInt($deposit_cnt17); $deposit_unit_price17 = convertInt($deposit_unit_price17); $deposit_total_price17 = convertInt($deposit_total_price17); $SQL .= "deposit_title17 = '{$deposit_title17}',"; $SQL .= "deposit_cnt17 = '{$deposit_cnt17}',"; $SQL .= "deposit_unit_price17 = '{$deposit_unit_price17}',"; $SQL .= "deposit_total_price17 = '{$deposit_total_price17}',"; } if ($deposit_title18 || $deposit_cnt18 || $deposit_unit_price18 || $deposit_total_price18) { $deposit_cnt18 = convertInt($deposit_cnt18); $deposit_unit_price18 = convertInt($deposit_unit_price18); $deposit_total_price18 = convertInt($deposit_total_price18); $SQL .= "deposit_title18 = '{$deposit_title18}',"; $SQL .= "deposit_cnt18 = '{$deposit_cnt18}',"; $SQL .= "deposit_unit_price18 = '{$deposit_unit_price18}',"; $SQL .= "deposit_total_price18 = '{$deposit_total_price18}',"; } if ($deposit_title19 || $deposit_cnt19 || $deposit_unit_price19 || $deposit_total_price19) { $deposit_cnt19 = convertInt($deposit_cnt19); $deposit_unit_price19 = convertInt($deposit_unit_price19); $deposit_total_price19 = convertInt($deposit_total_price19); $SQL .= "deposit_title19 = '{$deposit_title19}',"; $SQL .= "deposit_cnt19 = '{$deposit_cnt19}',"; $SQL .= "deposit_unit_price19 = '{$deposit_unit_price19}',"; $SQL .= "deposit_total_price19 = '{$deposit_total_price19}',"; } if ($deposit_title20 || $deposit_cnt20 || $deposit_unit_price20 || $deposit_total_price20) { $deposit_cnt20 = convertInt($deposit_cnt20); $deposit_unit_price20 = convertInt($deposit_unit_price20); $deposit_total_price20 = convertInt($deposit_total_price20); $SQL .= "deposit_title20 = '{$deposit_title20}',"; $SQL .= "deposit_cnt20 = '{$deposit_cnt20}',"; $SQL .= "deposit_unit_price20 = '{$deposit_unit_price20}',"; $SQL .= "deposit_total_price20 = '{$deposit_total_price20}',"; } if ($deposit_title21 || $deposit_cnt21 || $deposit_unit_price21 || $deposit_total_price21) { $deposit_cnt21 = convertInt($deposit_cnt21); $deposit_unit_price21 = convertInt($deposit_unit_price21); $deposit_total_price21 = convertInt($deposit_total_price21); $SQL .= "deposit_title21 = '{$deposit_title21}',"; $SQL .= "deposit_cnt21 = '{$deposit_cnt21}',"; $SQL .= "deposit_unit_price21 = '{$deposit_unit_price21}',"; $SQL .= "deposit_total_price21 = '{$deposit_total_price21}',"; } if ($deposit_title22 || $deposit_cnt22 || $deposit_unit_price22 || $deposit_total_price22) { $deposit_cnt22 = convertInt($deposit_cnt22); $deposit_unit_price22 = convertInt($deposit_unit_price22); $deposit_total_price22 = convertInt($deposit_total_price22); $SQL .= "deposit_title22 = '{$deposit_title22}',"; $SQL .= "deposit_cnt22 = '{$deposit_cnt22}',"; $SQL .= "deposit_unit_price22 = '{$deposit_unit_price22}',"; $SQL .= "deposit_total_price22 = '{$deposit_total_price22}',"; } if ($deposit_title23 || $deposit_cnt23 || $deposit_unit_price23 || $deposit_total_price23) { $deposit_cnt23 = convertInt($deposit_cnt23); $deposit_unit_price23 = convertInt($deposit_unit_price23); $deposit_total_price23 = convertInt($deposit_total_price23); $SQL .= "deposit_title23 = '{$deposit_title23}',"; $SQL .= "deposit_cnt23 = '{$deposit_cnt23}',"; $SQL .= "deposit_unit_price23 = '{$deposit_unit_price23}',"; $SQL .= "deposit_total_price23 = '{$deposit_total_price23}',"; } if ($deposit_title24 || $deposit_cnt24 || $deposit_unit_price24 || $deposit_total_price24) { $deposit_cnt24 = convertInt($deposit_cnt24); $deposit_unit_price24 = convertInt($deposit_unit_price24); $deposit_total_price24 = convertInt($deposit_total_price24); $SQL .= "deposit_title24 = '{$deposit_title24}',"; $SQL .= "deposit_cnt24 = '{$deposit_cnt24}',"; $SQL .= "deposit_unit_price24 = '{$deposit_unit_price24}',"; $SQL .= "deposit_total_price24 = '{$deposit_total_price24}',"; } if ($deposit_title25 || $deposit_cnt25 || $deposit_unit_price25 || $deposit_total_price25) { $deposit_cnt25 = convertInt($deposit_cnt25); $deposit_unit_price25 = convertInt($deposit_unit_price25); $deposit_total_price25 = convertInt($deposit_total_price25); $SQL .= "deposit_title25 = '{$deposit_title25}',"; $SQL .= "deposit_cnt25 = '{$deposit_cnt25}',"; $SQL .= "deposit_unit_price25 = '{$deposit_unit_price25}',"; $SQL .= "deposit_total_price25 = '{$deposit_total_price25}',"; } if ($deposit_title26 || $deposit_cnt26 || $deposit_unit_price26 || $deposit_total_price26) { $deposit_cnt26 = convertInt($deposit_cnt26); $deposit_unit_price26 = convertInt($deposit_unit_price26); $deposit_total_price26 = convertInt($deposit_total_price26); $SQL .= "deposit_title26 = '{$deposit_title26}',"; $SQL .= "deposit_cnt26 = '{$deposit_cnt26}',"; $SQL .= "deposit_unit_price26 = '{$deposit_unit_price26}',"; $SQL .= "deposit_total_price26 = '{$deposit_total_price26}',"; } if ($deposit_title27 || $deposit_cnt27 || $deposit_unit_price27 || $deposit_total_price27) { $deposit_cnt27 = convertInt($deposit_cnt27); $deposit_unit_price27 = convertInt($deposit_unit_price27); $deposit_total_price27 = convertInt($deposit_total_price27); $SQL .= "deposit_title27 = '{$deposit_title27}',"; $SQL .= "deposit_cnt27 = '{$deposit_cnt27}',"; $SQL .= "deposit_unit_price27 = '{$deposit_unit_price27}',"; $SQL .= "deposit_total_price27 = '{$deposit_total_price27}',"; } if ($deposit_title28 || $deposit_cnt28 || $deposit_unit_price28 || $deposit_total_price28) { $deposit_cnt28 = convertInt($deposit_cnt28); $deposit_unit_price28 = convertInt($deposit_unit_price28); $deposit_total_price28 = convertInt($deposit_total_price28); $SQL .= "deposit_title28 = '{$deposit_title28}',"; $SQL .= "deposit_cnt28 = '{$deposit_cnt28}',"; $SQL .= "deposit_unit_price28 = '{$deposit_unit_price28}',"; $SQL .= "deposit_total_price28 = '{$deposit_total_price28}',"; } if ($deposit_title29 || $deposit_cnt29 || $deposit_unit_price29 || $deposit_total_price29) { $deposit_cnt29 = convertInt($deposit_cnt29); $deposit_unit_price29 = convertInt($deposit_unit_price29); $deposit_total_price29 = convertInt($deposit_total_price29); $SQL .= "deposit_title29 = '{$deposit_title29}',"; $SQL .= "deposit_cnt29 = '{$deposit_cnt29}',"; $SQL .= "deposit_unit_price29 = '{$deposit_unit_price29}',"; $SQL .= "deposit_total_price29 = '{$deposit_total_price29}',"; } if ($deposit_title30 || $deposit_cnt30 || $deposit_unit_price30 || $deposit_total_price30) { $deposit_cnt30 = convertInt($deposit_cnt30); $deposit_unit_price30 = convertInt($deposit_unit_price30); $deposit_total_price30 = convertInt($deposit_total_price30); $SQL .= "deposit_title30 = '{$deposit_title30}',"; $SQL .= "deposit_cnt30 = '{$deposit_cnt30}',"; $SQL .= "deposit_unit_price30 = '{$deposit_unit_price30}',"; $SQL .= "deposit_total_price30 = '{$deposit_total_price30}',"; } if ($expenditure_title1 || $expenditure_cnt1 || $expenditure_unit_price1 || $expenditure_total_price1) { $expenditure_cnt1 = convertInt($expenditure_cnt1); $expenditure_unit_price1 = convertInt($expenditure_unit_price1); $expenditure_total_price1 = convertInt($expenditure_total_price1); $SQL .= "expenditure_title1 = '{$expenditure_title1}',"; $SQL .= "expenditure_cnt1 = '{$expenditure_cnt1}',"; $SQL .= "expenditure_unit_price1 = '{$expenditure_unit_price1}',"; $SQL .= "expenditure_total_price1 = '{$expenditure_total_price1}',"; } if ($expenditure_title2 || $expenditure_cnt2 || $expenditure_unit_price2 || $expenditure_total_price2) { $expenditure_cnt2 = convertInt($expenditure_cnt2); $expenditure_unit_price2 = convertInt($expenditure_unit_price2); $expenditure_total_price2 = convertInt($expenditure_total_price2); $SQL .= "expenditure_title2 = '{$expenditure_title2}',"; $SQL .= "expenditure_cnt2 = '{$expenditure_cnt2}',"; $SQL .= "expenditure_unit_price2 = '{$expenditure_unit_price2}',"; $SQL .= "expenditure_total_price2 = '{$expenditure_total_price2}',"; } if ($expenditure_title3 || $expenditure_cnt3 || $expenditure_unit_price3 || $expenditure_total_price3) { $expenditure_cnt3 = convertInt($expenditure_cnt3); $expenditure_unit_price3 = convertInt($expenditure_unit_price3); $expenditure_total_price3 = convertInt($expenditure_total_price3); $SQL .= "expenditure_title3 = '{$expenditure_title3}',"; $SQL .= "expenditure_cnt3 = '{$expenditure_cnt3}',"; $SQL .= "expenditure_unit_price3 = '{$expenditure_unit_price3}',"; $SQL .= "expenditure_total_price3 = '{$expenditure_total_price3}',"; } if ($expenditure_title4 || $expenditure_cnt4 || $expenditure_unit_price4 || $expenditure_total_price4) { $expenditure_cnt4 = convertInt($expenditure_cnt4); $expenditure_unit_price4 = convertInt($expenditure_unit_price4); $expenditure_total_price4 = convertInt($expenditure_total_price4); $SQL .= "expenditure_title4 = '{$expenditure_title4}',"; $SQL .= "expenditure_cnt4 = '{$expenditure_cnt4}',"; $SQL .= "expenditure_unit_price4 = '{$expenditure_unit_price4}',"; $SQL .= "expenditure_total_price4 = '{$expenditure_total_price4}',"; } if ($expenditure_title5 || $expenditure_cnt5 || $expenditure_unit_price5 || $expenditure_total_price5) { $expenditure_cnt5 = convertInt($expenditure_cnt5); $expenditure_unit_price5 = convertInt($expenditure_unit_price5); $expenditure_total_price5 = convertInt($expenditure_total_price5); $SQL .= "expenditure_title5 = '{$expenditure_title5}',"; $SQL .= "expenditure_cnt5 = '{$expenditure_cnt5}',"; $SQL .= "expenditure_unit_price5 = '{$expenditure_unit_price5}',"; $SQL .= "expenditure_total_price5 = '{$expenditure_total_price5}',"; } if ($expenditure_title6 || $expenditure_cnt6 || $expenditure_unit_price6 || $expenditure_total_price6) { $expenditure_cnt6 = convertInt($expenditure_cnt6); $expenditure_unit_price6 = convertInt($expenditure_unit_price6); $expenditure_total_price6 = convertInt($expenditure_total_price6); $SQL .= "expenditure_title6 = '{$expenditure_title6}',"; $SQL .= "expenditure_cnt6 = '{$expenditure_cnt6}',"; $SQL .= "expenditure_unit_price6 = '{$expenditure_unit_price6}',"; $SQL .= "expenditure_total_price6 = '{$expenditure_total_price6}',"; } if ($expenditure_title7 || $expenditure_cnt7 || $expenditure_unit_price7 || $expenditure_total_price7) { $expenditure_cnt7 = convertInt($expenditure_cnt7); $expenditure_unit_price7 = convertInt($expenditure_unit_price7); $expenditure_total_price7 = convertInt($expenditure_total_price7); $SQL .= "expenditure_title7 = '{$expenditure_title7}',"; $SQL .= "expenditure_cnt7 = '{$expenditure_cnt7}',"; $SQL .= "expenditure_unit_price7 = '{$expenditure_unit_price7}',"; $SQL .= "expenditure_total_price7 = '{$expenditure_total_price7}',"; } if ($expenditure_title8 || $expenditure_cnt8 || $expenditure_unit_price8 || $expenditure_total_price8) { $expenditure_cnt8 = convertInt($expenditure_cnt8); $expenditure_unit_price8 = convertInt($expenditure_unit_price8); $expenditure_total_price8 = convertInt($expenditure_total_price8); $SQL .= "expenditure_title8 = '{$expenditure_title8}',"; $SQL .= "expenditure_cnt8 = '{$expenditure_cnt8}',"; $SQL .= "expenditure_unit_price8 = '{$expenditure_unit_price8}',"; $SQL .= "expenditure_total_price8 = '{$expenditure_total_price8}',"; } if ($expenditure_title9 || $expenditure_cnt9 || $expenditure_unit_price9 || $expenditure_total_price9) { $expenditure_cnt9 = convertInt($expenditure_cnt9); $expenditure_unit_price9 = convertInt($expenditure_unit_price9); $expenditure_total_price9 = convertInt($expenditure_total_price9); $SQL .= "expenditure_title9 = '{$expenditure_title9}',"; $SQL .= "expenditure_cnt9 = '{$expenditure_cnt9}',"; $SQL .= "expenditure_unit_price9 = '{$expenditure_unit_price9}',"; $SQL .= "expenditure_total_price9 = '{$expenditure_total_price9}',"; } if ($expenditure_title10 || $expenditure_cnt10 || $expenditure_unit_price10 || $expenditure_total_price10) { $expenditure_cnt10 = convertInt($expenditure_cnt10); $expenditure_unit_price10 = convertInt($expenditure_unit_price10); $expenditure_total_price10 = convertInt($expenditure_total_price10); $SQL .= "expenditure_title10 = '{$expenditure_title10}',"; $SQL .= "expenditure_cnt10 = '{$expenditure_cnt10}',"; $SQL .= "expenditure_unit_price10 = '{$expenditure_unit_price10}',"; $SQL .= "expenditure_total_price10 = '{$expenditure_total_price10}',"; } if ($expenditure_title11 || $expenditure_cnt11 || $expenditure_unit_price11 || $expenditure_total_price11) { $expenditure_cnt11 = convertInt($expenditure_cnt11); $expenditure_unit_price11 = convertInt($expenditure_unit_price11); $expenditure_total_price11 = convertInt($expenditure_total_price11); $SQL .= "expenditure_title11 = '{$expenditure_title11}',"; $SQL .= "expenditure_cnt11 = '{$expenditure_cnt11}',"; $SQL .= "expenditure_unit_price11 = '{$expenditure_unit_price11}',"; $SQL .= "expenditure_total_price11 = '{$expenditure_total_price11}',"; } if ($expenditure_title12 || $expenditure_cnt12 || $expenditure_unit_price12 || $expenditure_total_price12) { $expenditure_cnt12 = convertInt($expenditure_cnt12); $expenditure_unit_price12 = convertInt($expenditure_unit_price12); $expenditure_total_price12 = convertInt($expenditure_total_price12); $SQL .= "expenditure_title12 = '{$expenditure_title12}',"; $SQL .= "expenditure_cnt12 = '{$expenditure_cnt12}',"; $SQL .= "expenditure_unit_price12 = '{$expenditure_unit_price12}',"; $SQL .= "expenditure_total_price12 = '{$expenditure_total_price12}',"; } if ($expenditure_title13 || $expenditure_cnt13 || $expenditure_unit_price13 || $expenditure_total_price13) { $expenditure_cnt13 = convertInt($expenditure_cnt13); $expenditure_unit_price13 = convertInt($expenditure_unit_price13); $expenditure_total_price13 = convertInt($expenditure_total_price13); $SQL .= "expenditure_title13 = '{$expenditure_title13}',"; $SQL .= "expenditure_cnt13 = '{$expenditure_cnt13}',"; $SQL .= "expenditure_unit_price13 = '{$expenditure_unit_price13}',"; $SQL .= "expenditure_total_price13 = '{$expenditure_total_price13}',"; } if ($expenditure_title14 || $expenditure_cnt14 || $expenditure_unit_price14 || $expenditure_total_price14) { $expenditure_cnt14 = convertInt($expenditure_cnt14); $expenditure_unit_price14 = convertInt($expenditure_unit_price14); $expenditure_total_price14 = convertInt($expenditure_total_price14); $SQL .= "expenditure_title14 = '{$expenditure_title14}',"; $SQL .= "expenditure_cnt14 = '{$expenditure_cnt14}',"; $SQL .= "expenditure_unit_price14 = '{$expenditure_unit_price14}',"; $SQL .= "expenditure_total_price14 = '{$expenditure_total_price14}',"; } if ($expenditure_title15 || $expenditure_cnt15 || $expenditure_unit_price15 || $expenditure_total_price15) { $expenditure_cnt15 = convertInt($expenditure_cnt15); $expenditure_unit_price15 = convertInt($expenditure_unit_price15); $expenditure_total_price15 = convertInt($expenditure_total_price15); $SQL .= "expenditure_title15 = '{$expenditure_title15}',"; $SQL .= "expenditure_cnt15 = '{$expenditure_cnt15}',"; $SQL .= "expenditure_unit_price15 = '{$expenditure_unit_price15}',"; $SQL .= "expenditure_total_price15 = '{$expenditure_total_price15}',"; } if ($expenditure_title16 || $expenditure_cnt16 || $expenditure_unit_price16 || $expenditure_total_price16) { $expenditure_cnt16 = convertInt($expenditure_cnt16); $expenditure_unit_price16 = convertInt($expenditure_unit_price16); $expenditure_total_price16 = convertInt($expenditure_total_price16); $SQL .= "expenditure_title16 = '{$expenditure_title16}',"; $SQL .= "expenditure_cnt16 = '{$expenditure_cnt16}',"; $SQL .= "expenditure_unit_price16 = '{$expenditure_unit_price16}',"; $SQL .= "expenditure_total_price16 = '{$expenditure_total_price16}',"; } if ($expenditure_title17 || $expenditure_cnt17 || $expenditure_unit_price17 || $expenditure_total_price17) { $expenditure_cnt17 = convertInt($expenditure_cnt17); $expenditure_unit_price17 = convertInt($expenditure_unit_price17); $expenditure_total_price17 = convertInt($expenditure_total_price17); $SQL .= "expenditure_title17 = '{$expenditure_title17}',"; $SQL .= "expenditure_cnt17 = '{$expenditure_cnt17}',"; $SQL .= "expenditure_unit_price17 = '{$expenditure_unit_price17}',"; $SQL .= "expenditure_total_price17 = '{$expenditure_total_price17}',"; } if ($expenditure_title18 || $expenditure_cnt18 || $expenditure_unit_price18 || $expenditure_total_price18) { $expenditure_cnt18 = convertInt($expenditure_cnt18); $expenditure_unit_price18 = convertInt($expenditure_unit_price18); $expenditure_total_price18 = convertInt($expenditure_total_price18); $SQL .= "expenditure_title18 = '{$expenditure_title18}',"; $SQL .= "expenditure_cnt18 = '{$expenditure_cnt18}',"; $SQL .= "expenditure_unit_price18 = '{$expenditure_unit_price18}',"; $SQL .= "expenditure_total_price18 = '{$expenditure_total_price18}',"; } if ($expenditure_title19 || $expenditure_cnt19 || $expenditure_unit_price19 || $expenditure_total_price19) { $expenditure_cnt19 = convertInt($expenditure_cnt19); $expenditure_unit_price19 = convertInt($expenditure_unit_price19); $expenditure_total_price19 = convertInt($expenditure_total_price19); $SQL .= "expenditure_title19 = '{$expenditure_title19}',"; $SQL .= "expenditure_cnt19 = '{$expenditure_cnt19}',"; $SQL .= "expenditure_unit_price19 = '{$expenditure_unit_price19}',"; $SQL .= "expenditure_total_price19 = '{$expenditure_total_price19}',"; } if ($expenditure_title20 || $expenditure_cnt20 || $expenditure_unit_price20 || $expenditure_total_price20) { $expenditure_cnt20 = convertInt($expenditure_cnt20); $expenditure_unit_price20 = convertInt($expenditure_unit_price20); $expenditure_total_price20 = convertInt($expenditure_total_price20); $SQL .= "expenditure_title20 = '{$expenditure_title20}',"; $SQL .= "expenditure_cnt20 = '{$expenditure_cnt20}',"; $SQL .= "expenditure_unit_price20 = '{$expenditure_unit_price20}',"; $SQL .= "expenditure_total_price20 = '{$expenditure_total_price20}',"; } if ($expenditure_title21 || $expenditure_cnt21 || $expenditure_unit_price21 || $expenditure_total_price21) { $expenditure_cnt21 = convertInt($expenditure_cnt21); $expenditure_unit_price21 = convertInt($expenditure_unit_price21); $expenditure_total_price21 = convertInt($expenditure_total_price21); $SQL .= "expenditure_title21 = '{$expenditure_title21}',"; $SQL .= "expenditure_cnt21 = '{$expenditure_cnt21}',"; $SQL .= "expenditure_unit_price21 = '{$expenditure_unit_price21}',"; $SQL .= "expenditure_total_price21 = '{$expenditure_total_price21}',"; } if ($expenditure_title22 || $expenditure_cnt22 || $expenditure_unit_price22 || $expenditure_total_price22) { $expenditure_cnt22 = convertInt($expenditure_cnt22); $expenditure_unit_price22 = convertInt($expenditure_unit_price22); $expenditure_total_price22 = convertInt($expenditure_total_price22); $SQL .= "expenditure_title22 = '{$expenditure_title22}',"; $SQL .= "expenditure_cnt22 = '{$expenditure_cnt22}',"; $SQL .= "expenditure_unit_price22 = '{$expenditure_unit_price22}',"; $SQL .= "expenditure_total_price22 = '{$expenditure_total_price22}',"; } if ($expenditure_title23 || $expenditure_cnt23 || $expenditure_unit_price23 || $expenditure_total_price23) { $expenditure_cnt23 = convertInt($expenditure_cnt23); $expenditure_unit_price23 = convertInt($expenditure_unit_price23); $expenditure_total_price23 = convertInt($expenditure_total_price23); $SQL .= "expenditure_title23 = '{$expenditure_title23}',"; $SQL .= "expenditure_cnt23 = '{$expenditure_cnt23}',"; $SQL .= "expenditure_unit_price23 = '{$expenditure_unit_price23}',"; $SQL .= "expenditure_total_price23 = '{$expenditure_total_price23}',"; } if ($expenditure_title24 || $expenditure_cnt24 || $expenditure_unit_price24 || $expenditure_total_price24) { $expenditure_cnt24 = convertInt($expenditure_cnt24); $expenditure_unit_price24 = convertInt($expenditure_unit_price24); $expenditure_total_price24 = convertInt($expenditure_total_price24); $SQL .= "expenditure_title24 = '{$expenditure_title24}',"; $SQL .= "expenditure_cnt24 = '{$expenditure_cnt24}',"; $SQL .= "expenditure_unit_price24 = '{$expenditure_unit_price24}',"; $SQL .= "expenditure_total_price24 = '{$expenditure_total_price24}',"; } if ($expenditure_title25 || $expenditure_cnt25 || $expenditure_unit_price25 || $expenditure_total_price25) { $expenditure_cnt25 = convertInt($expenditure_cnt25); $expenditure_unit_price25 = convertInt($expenditure_unit_price25); $expenditure_total_price25 = convertInt($expenditure_total_price25); $SQL .= "expenditure_title25 = '{$expenditure_title25}',"; $SQL .= "expenditure_cnt25 = '{$expenditure_cnt25}',"; $SQL .= "expenditure_unit_price25 = '{$expenditure_unit_price25}',"; $SQL .= "expenditure_total_price25 = '{$expenditure_total_price25}',"; } if ($expenditure_title26 || $expenditure_cnt26 || $expenditure_unit_price26 || $expenditure_total_price26) { $expenditure_cnt26 = convertInt($expenditure_cnt26); $expenditure_unit_price26 = convertInt($expenditure_unit_price26); $expenditure_total_price26 = convertInt($expenditure_total_price26); $SQL .= "expenditure_title26 = '{$expenditure_title26}',"; $SQL .= "expenditure_cnt26 = '{$expenditure_cnt26}',"; $SQL .= "expenditure_unit_price26 = '{$expenditure_unit_price26}',"; $SQL .= "expenditure_total_price26 = '{$expenditure_total_price26}',"; } if ($expenditure_title27 || $expenditure_cnt27 || $expenditure_unit_price27 || $expenditure_total_price27) { $expenditure_cnt27 = convertInt($expenditure_cnt27); $expenditure_unit_price27 = convertInt($expenditure_unit_price27); $expenditure_total_price27 = convertInt($expenditure_total_price27); $SQL .= "expenditure_title27 = '{$expenditure_title27}',"; $SQL .= "expenditure_cnt27 = '{$expenditure_cnt27}',"; $SQL .= "expenditure_unit_price27 = '{$expenditure_unit_price27}',"; $SQL .= "expenditure_total_price27 = '{$expenditure_total_price27}',"; } if ($expenditure_title28 || $expenditure_cnt28 || $expenditure_unit_price28 || $expenditure_total_price28) { $expenditure_cnt28 = convertInt($expenditure_cnt28); $expenditure_unit_price28 = convertInt($expenditure_unit_price28); $expenditure_total_price28 = convertInt($expenditure_total_price28); $SQL .= "expenditure_title28 = '{$expenditure_title28}',"; $SQL .= "expenditure_cnt28 = '{$expenditure_cnt28}',"; $SQL .= "expenditure_unit_price28 = '{$expenditure_unit_price28}',"; $SQL .= "expenditure_total_price28 = '{$expenditure_total_price28}',"; } if ($expenditure_title29 || $expenditure_cnt29 || $expenditure_unit_price29 || $expenditure_total_price29) { $expenditure_cnt29 = convertInt($expenditure_cnt29); $expenditure_unit_price29 = convertInt($expenditure_unit_price29); $expenditure_total_price29 = convertInt($expenditure_total_price29); $SQL .= "expenditure_title29 = '{$expenditure_title29}',"; $SQL .= "expenditure_cnt29 = '{$expenditure_cnt29}',"; $SQL .= "expenditure_unit_price29 = '{$expenditure_unit_price29}',"; $SQL .= "expenditure_total_price29 = '{$expenditure_total_price29}',"; } if ($expenditure_title30 || $expenditure_cnt30 || $expenditure_unit_price30 || $expenditure_total_price30) { $expenditure_cnt30 = convertInt($expenditure_cnt30); $expenditure_unit_price30 = convertInt($expenditure_unit_price30); $expenditure_total_price30 = convertInt($expenditure_total_price30); $SQL .= "expenditure_title30 = '{$expenditure_title30}',"; $SQL .= "expenditure_cnt30 = '{$expenditure_cnt30}',"; $SQL .= "expenditure_unit_price30 = '{$expenditure_unit_price30}',"; $SQL .= "expenditure_total_price30 = '{$expenditure_total_price30}',"; } $SQL .= "ins_dt= now(),"; $SQL .= "ins_id = '" . $TK_MEMBER['mb_id'] . "'"; $completedMessage = "등록되었습니다"; // echo $SQL; // exit; $Result = db_query($SQL); if ($Result) { error_msg("alert('{$completedMessage}');location.href='/admin/erp/erp_easy_list.php'", "script"); } else { error_msg("alert('등록 실패');", "script"); } } else if($SqlType == 'modify'){ $SQL = "UPDATE {$TABLE} SET "; $SQL .= "title='{$title}', "; $SQL .= "schedule_date = '{$schedule_date}', "; $SQL .= "schedule_contents = '{$schedule_contents}', "; $deposit_cnt1 = convertInt($deposit_cnt1); $deposit_unit_price1 = convertInt($deposit_unit_price1); $deposit_total_price1 = convertInt($deposit_total_price1); $SQL .= "deposit_title1 = '{$deposit_title1}',"; $SQL .= "deposit_cnt1 = '{$deposit_cnt1}',"; $SQL .= "deposit_unit_price1 = '{$deposit_unit_price1}',"; $SQL .= "deposit_total_price1 = '{$deposit_total_price1}',"; $deposit_cnt2 = convertInt($deposit_cnt2); $deposit_unit_price2 = convertInt($deposit_unit_price2); $deposit_total_price2 = convertInt($deposit_total_price2); $SQL .= "deposit_title2 = '{$deposit_title2}',"; $SQL .= "deposit_cnt2 = '{$deposit_cnt2}',"; $SQL .= "deposit_unit_price2 = '{$deposit_unit_price2}',"; $SQL .= "deposit_total_price2 = '{$deposit_total_price2}',"; $deposit_cnt3 = convertInt($deposit_cnt3); $deposit_unit_price3 = convertInt($deposit_unit_price3); $deposit_total_price3 = convertInt($deposit_total_price3); $SQL .= "deposit_title3 = '{$deposit_title3}',"; $SQL .= "deposit_cnt3 = '{$deposit_cnt3}',"; $SQL .= "deposit_unit_price3 = '{$deposit_unit_price3}',"; $SQL .= "deposit_total_price3 = '{$deposit_total_price3}',"; $deposit_cnt4 = convertInt($deposit_cnt4); $deposit_unit_price4 = convertInt($deposit_unit_price4); $deposit_total_price4 = convertInt($deposit_total_price4); $SQL .= "deposit_title4 = '{$deposit_title4}',"; $SQL .= "deposit_cnt4 = '{$deposit_cnt4}',"; $SQL .= "deposit_unit_price4 = '{$deposit_unit_price4}',"; $SQL .= "deposit_total_price4 = '{$deposit_total_price4}',"; $deposit_cnt5 = convertInt($deposit_cnt5); $deposit_unit_price5 = convertInt($deposit_unit_price5); $deposit_total_price5 = convertInt($deposit_total_price5); $SQL .= "deposit_title5 = '{$deposit_title5}',"; $SQL .= "deposit_cnt5 = '{$deposit_cnt5}',"; $SQL .= "deposit_unit_price5 = '{$deposit_unit_price5}',"; $SQL .= "deposit_total_price5 = '{$deposit_total_price5}',"; $deposit_cnt6 = convertInt($deposit_cnt6); $deposit_unit_price6 = convertInt($deposit_unit_price6); $deposit_total_price6 = convertInt($deposit_total_price6); $SQL .= "deposit_title6 = '{$deposit_title6}',"; $SQL .= "deposit_cnt6 = '{$deposit_cnt6}',"; $SQL .= "deposit_unit_price6 = '{$deposit_unit_price6}',"; $SQL .= "deposit_total_price6 = '{$deposit_total_price6}',"; $deposit_cnt7 = convertInt($deposit_cnt7); $deposit_unit_price7 = convertInt($deposit_unit_price7); $deposit_total_price7 = convertInt($deposit_total_price7); $SQL .= "deposit_title7 = '{$deposit_title7}',"; $SQL .= "deposit_cnt7 = '{$deposit_cnt7}',"; $SQL .= "deposit_unit_price7 = '{$deposit_unit_price7}',"; $SQL .= "deposit_total_price7 = '{$deposit_total_price7}',"; $deposit_cnt8 = convertInt($deposit_cnt8); $deposit_unit_price8 = convertInt($deposit_unit_price8); $deposit_total_price8 = convertInt($deposit_total_price8); $SQL .= "deposit_title8 = '{$deposit_title8}',"; $SQL .= "deposit_cnt8 = '{$deposit_cnt8}',"; $SQL .= "deposit_unit_price8 = '{$deposit_unit_price8}',"; $SQL .= "deposit_total_price8 = '{$deposit_total_price8}',"; $deposit_cnt9 = convertInt($deposit_cnt9); $deposit_unit_price9 = convertInt($deposit_unit_price9); $deposit_total_price9 = convertInt($deposit_total_price9); $SQL .= "deposit_title9 = '{$deposit_title9}',"; $SQL .= "deposit_cnt9 = '{$deposit_cnt9}',"; $SQL .= "deposit_unit_price9 = '{$deposit_unit_price9}',"; $SQL .= "deposit_total_price9 = '{$deposit_total_price9}',"; $deposit_cnt10 = convertInt($deposit_cnt10); $deposit_unit_price10 = convertInt($deposit_unit_price10); $deposit_total_price10 = convertInt($deposit_total_price10); $SQL .= "deposit_title10 = '{$deposit_title10}',"; $SQL .= "deposit_cnt10 = '{$deposit_cnt10}',"; $SQL .= "deposit_unit_price10 = '{$deposit_unit_price10}',"; $SQL .= "deposit_total_price10 = '{$deposit_total_price10}',"; $deposit_cnt11 = convertInt($deposit_cnt11); $deposit_unit_price11 = convertInt($deposit_unit_price11); $deposit_total_price11 = convertInt($deposit_total_price11); $SQL .= "deposit_title11 = '{$deposit_title11}',"; $SQL .= "deposit_cnt11 = '{$deposit_cnt11}',"; $SQL .= "deposit_unit_price11 = '{$deposit_unit_price11}',"; $SQL .= "deposit_total_price11 = '{$deposit_total_price11}',"; $deposit_cnt12 = convertInt($deposit_cnt12); $deposit_unit_price12 = convertInt($deposit_unit_price12); $deposit_total_price12 = convertInt($deposit_total_price12); $SQL .= "deposit_title12 = '{$deposit_title12}',"; $SQL .= "deposit_cnt12 = '{$deposit_cnt12}',"; $SQL .= "deposit_unit_price12 = '{$deposit_unit_price12}',"; $SQL .= "deposit_total_price12 = '{$deposit_total_price12}',"; $deposit_cnt13 = convertInt($deposit_cnt13); $deposit_unit_price13 = convertInt($deposit_unit_price13); $deposit_total_price13 = convertInt($deposit_total_price13); $SQL .= "deposit_title13 = '{$deposit_title13}',"; $SQL .= "deposit_cnt13 = '{$deposit_cnt13}',"; $SQL .= "deposit_unit_price13 = '{$deposit_unit_price13}',"; $SQL .= "deposit_total_price13 = '{$deposit_total_price13}',"; $deposit_cnt14 = convertInt($deposit_cnt14); $deposit_unit_price14 = convertInt($deposit_unit_price14); $deposit_total_price14 = convertInt($deposit_total_price14); $SQL .= "deposit_title14 = '{$deposit_title14}',"; $SQL .= "deposit_cnt14 = '{$deposit_cnt14}',"; $SQL .= "deposit_unit_price14 = '{$deposit_unit_price14}',"; $SQL .= "deposit_total_price14 = '{$deposit_total_price14}',"; $deposit_cnt15 = convertInt($deposit_cnt15); $deposit_unit_price15 = convertInt($deposit_unit_price15); $deposit_total_price15 = convertInt($deposit_total_price15); $SQL .= "deposit_title15 = '{$deposit_title15}',"; $SQL .= "deposit_cnt15 = '{$deposit_cnt15}',"; $SQL .= "deposit_unit_price15 = '{$deposit_unit_price15}',"; $SQL .= "deposit_total_price15 = '{$deposit_total_price15}',"; $deposit_cnt16 = convertInt($deposit_cnt16); $deposit_unit_price16 = convertInt($deposit_unit_price16); $deposit_total_price16 = convertInt($deposit_total_price16); $SQL .= "deposit_title16 = '{$deposit_title16}',"; $SQL .= "deposit_cnt16 = '{$deposit_cnt16}',"; $SQL .= "deposit_unit_price16 = '{$deposit_unit_price16}',"; $SQL .= "deposit_total_price16 = '{$deposit_total_price16}',"; $deposit_cnt17 = convertInt($deposit_cnt17); $deposit_unit_price17 = convertInt($deposit_unit_price17); $deposit_total_price17 = convertInt($deposit_total_price17); $SQL .= "deposit_title17 = '{$deposit_title17}',"; $SQL .= "deposit_cnt17 = '{$deposit_cnt17}',"; $SQL .= "deposit_unit_price17 = '{$deposit_unit_price17}',"; $SQL .= "deposit_total_price17 = '{$deposit_total_price17}',"; $deposit_cnt18 = convertInt($deposit_cnt18); $deposit_unit_price18 = convertInt($deposit_unit_price18); $deposit_total_price18 = convertInt($deposit_total_price18); $SQL .= "deposit_title18 = '{$deposit_title18}',"; $SQL .= "deposit_cnt18 = '{$deposit_cnt18}',"; $SQL .= "deposit_unit_price18 = '{$deposit_unit_price18}',"; $SQL .= "deposit_total_price18 = '{$deposit_total_price18}',"; $deposit_cnt19 = convertInt($deposit_cnt19); $deposit_unit_price19 = convertInt($deposit_unit_price19); $deposit_total_price19 = convertInt($deposit_total_price19); $SQL .= "deposit_title19 = '{$deposit_title19}',"; $SQL .= "deposit_cnt19 = '{$deposit_cnt19}',"; $SQL .= "deposit_unit_price19 = '{$deposit_unit_price19}',"; $SQL .= "deposit_total_price19 = '{$deposit_total_price19}',"; $deposit_cnt20 = convertInt($deposit_cnt20); $deposit_unit_price20 = convertInt($deposit_unit_price20); $deposit_total_price20 = convertInt($deposit_total_price20); $SQL .= "deposit_title20 = '{$deposit_title20}',"; $SQL .= "deposit_cnt20 = '{$deposit_cnt20}',"; $SQL .= "deposit_unit_price20 = '{$deposit_unit_price20}',"; $SQL .= "deposit_total_price20 = '{$deposit_total_price20}',"; $deposit_cnt21 = convertInt($deposit_cnt21); $deposit_unit_price21 = convertInt($deposit_unit_price21); $deposit_total_price21 = convertInt($deposit_total_price21); $SQL .= "deposit_title21 = '{$deposit_title21}',"; $SQL .= "deposit_cnt21 = '{$deposit_cnt21}',"; $SQL .= "deposit_unit_price21 = '{$deposit_unit_price21}',"; $SQL .= "deposit_total_price21 = '{$deposit_total_price21}',"; $deposit_cnt22 = convertInt($deposit_cnt22); $deposit_unit_price22 = convertInt($deposit_unit_price22); $deposit_total_price22 = convertInt($deposit_total_price22); $SQL .= "deposit_title22 = '{$deposit_title22}',"; $SQL .= "deposit_cnt22 = '{$deposit_cnt22}',"; $SQL .= "deposit_unit_price22 = '{$deposit_unit_price22}',"; $SQL .= "deposit_total_price22 = '{$deposit_total_price22}',"; $deposit_cnt23 = convertInt($deposit_cnt23); $deposit_unit_price23 = convertInt($deposit_unit_price23); $deposit_total_price23 = convertInt($deposit_total_price23); $SQL .= "deposit_title23 = '{$deposit_title23}',"; $SQL .= "deposit_cnt23 = '{$deposit_cnt23}',"; $SQL .= "deposit_unit_price23 = '{$deposit_unit_price23}',"; $SQL .= "deposit_total_price23 = '{$deposit_total_price23}',"; $deposit_cnt24 = convertInt($deposit_cnt24); $deposit_unit_price24 = convertInt($deposit_unit_price24); $deposit_total_price24 = convertInt($deposit_total_price24); $SQL .= "deposit_title24 = '{$deposit_title24}',"; $SQL .= "deposit_cnt24 = '{$deposit_cnt24}',"; $SQL .= "deposit_unit_price24 = '{$deposit_unit_price24}',"; $SQL .= "deposit_total_price24 = '{$deposit_total_price24}',"; $deposit_cnt25 = convertInt($deposit_cnt25); $deposit_unit_price25 = convertInt($deposit_unit_price25); $deposit_total_price25 = convertInt($deposit_total_price25); $SQL .= "deposit_title25 = '{$deposit_title25}',"; $SQL .= "deposit_cnt25 = '{$deposit_cnt25}',"; $SQL .= "deposit_unit_price25 = '{$deposit_unit_price25}',"; $SQL .= "deposit_total_price25 = '{$deposit_total_price25}',"; $deposit_cnt26 = convertInt($deposit_cnt26); $deposit_unit_price26 = convertInt($deposit_unit_price26); $deposit_total_price26 = convertInt($deposit_total_price26); $SQL .= "deposit_title26 = '{$deposit_title26}',"; $SQL .= "deposit_cnt26 = '{$deposit_cnt26}',"; $SQL .= "deposit_unit_price26 = '{$deposit_unit_price26}',"; $SQL .= "deposit_total_price26 = '{$deposit_total_price26}',"; $deposit_cnt27 = convertInt($deposit_cnt27); $deposit_unit_price27 = convertInt($deposit_unit_price27); $deposit_total_price27 = convertInt($deposit_total_price27); $SQL .= "deposit_title27 = '{$deposit_title27}',"; $SQL .= "deposit_cnt27 = '{$deposit_cnt27}',"; $SQL .= "deposit_unit_price27 = '{$deposit_unit_price27}',"; $SQL .= "deposit_total_price27 = '{$deposit_total_price27}',"; $deposit_cnt28 = convertInt($deposit_cnt28); $deposit_unit_price28 = convertInt($deposit_unit_price28); $deposit_total_price28 = convertInt($deposit_total_price28); $SQL .= "deposit_title28 = '{$deposit_title28}',"; $SQL .= "deposit_cnt28 = '{$deposit_cnt28}',"; $SQL .= "deposit_unit_price28 = '{$deposit_unit_price28}',"; $SQL .= "deposit_total_price28 = '{$deposit_total_price28}',"; $deposit_cnt29 = convertInt($deposit_cnt29); $deposit_unit_price29 = convertInt($deposit_unit_price29); $deposit_total_price29 = convertInt($deposit_total_price29); $SQL .= "deposit_title29 = '{$deposit_title29}',"; $SQL .= "deposit_cnt29 = '{$deposit_cnt29}',"; $SQL .= "deposit_unit_price29 = '{$deposit_unit_price29}',"; $SQL .= "deposit_total_price29 = '{$deposit_total_price29}',"; $deposit_cnt30 = convertInt($deposit_cnt30); $deposit_unit_price30 = convertInt($deposit_unit_price30); $deposit_total_price30 = convertInt($deposit_total_price30); $SQL .= "deposit_title30 = '{$deposit_title30}',"; $SQL .= "deposit_cnt30 = '{$deposit_cnt30}',"; $SQL .= "deposit_unit_price30 = '{$deposit_unit_price30}',"; $SQL .= "deposit_total_price30 = '{$deposit_total_price30}',"; $expenditure_cnt1 = convertInt($expenditure_cnt1); $expenditure_unit_price1 = convertInt($expenditure_unit_price1); $expenditure_total_price1 = convertInt($expenditure_total_price1); $SQL .= "expenditure_title1 = '{$expenditure_title1}',"; $SQL .= "expenditure_cnt1 = '{$expenditure_cnt1}',"; $SQL .= "expenditure_unit_price1 = '{$expenditure_unit_price1}',"; $SQL .= "expenditure_total_price1 = '{$expenditure_total_price1}',"; $expenditure_cnt2 = convertInt($expenditure_cnt2); $expenditure_unit_price2 = convertInt($expenditure_unit_price2); $expenditure_total_price2 = convertInt($expenditure_total_price2); $SQL .= "expenditure_title2 = '{$expenditure_title2}',"; $SQL .= "expenditure_cnt2 = '{$expenditure_cnt2}',"; $SQL .= "expenditure_unit_price2 = '{$expenditure_unit_price2}',"; $SQL .= "expenditure_total_price2 = '{$expenditure_total_price2}',"; $expenditure_cnt3 = convertInt($expenditure_cnt3); $expenditure_unit_price3 = convertInt($expenditure_unit_price3); $expenditure_total_price3 = convertInt($expenditure_total_price3); $SQL .= "expenditure_title3 = '{$expenditure_title3}',"; $SQL .= "expenditure_cnt3 = '{$expenditure_cnt3}',"; $SQL .= "expenditure_unit_price3 = '{$expenditure_unit_price3}',"; $SQL .= "expenditure_total_price3 = '{$expenditure_total_price3}',"; $expenditure_cnt4 = convertInt($expenditure_cnt4); $expenditure_unit_price4 = convertInt($expenditure_unit_price4); $expenditure_total_price4 = convertInt($expenditure_total_price4); $SQL .= "expenditure_title4 = '{$expenditure_title4}',"; $SQL .= "expenditure_cnt4 = '{$expenditure_cnt4}',"; $SQL .= "expenditure_unit_price4 = '{$expenditure_unit_price4}',"; $SQL .= "expenditure_total_price4 = '{$expenditure_total_price4}',"; $expenditure_cnt5 = convertInt($expenditure_cnt5); $expenditure_unit_price5 = convertInt($expenditure_unit_price5); $expenditure_total_price5 = convertInt($expenditure_total_price5); $SQL .= "expenditure_title5 = '{$expenditure_title5}',"; $SQL .= "expenditure_cnt5 = '{$expenditure_cnt5}',"; $SQL .= "expenditure_unit_price5 = '{$expenditure_unit_price5}',"; $SQL .= "expenditure_total_price5 = '{$expenditure_total_price5}',"; $expenditure_cnt6 = convertInt($expenditure_cnt6); $expenditure_unit_price6 = convertInt($expenditure_unit_price6); $expenditure_total_price6 = convertInt($expenditure_total_price6); $SQL .= "expenditure_title6 = '{$expenditure_title6}',"; $SQL .= "expenditure_cnt6 = '{$expenditure_cnt6}',"; $SQL .= "expenditure_unit_price6 = '{$expenditure_unit_price6}',"; $SQL .= "expenditure_total_price6 = '{$expenditure_total_price6}',"; $expenditure_cnt7 = convertInt($expenditure_cnt7); $expenditure_unit_price7 = convertInt($expenditure_unit_price7); $expenditure_total_price7 = convertInt($expenditure_total_price7); $SQL .= "expenditure_title7 = '{$expenditure_title7}',"; $SQL .= "expenditure_cnt7 = '{$expenditure_cnt7}',"; $SQL .= "expenditure_unit_price7 = '{$expenditure_unit_price7}',"; $SQL .= "expenditure_total_price7 = '{$expenditure_total_price7}',"; $expenditure_cnt8 = convertInt($expenditure_cnt8); $expenditure_unit_price8 = convertInt($expenditure_unit_price8); $expenditure_total_price8 = convertInt($expenditure_total_price8); $SQL .= "expenditure_title8 = '{$expenditure_title8}',"; $SQL .= "expenditure_cnt8 = '{$expenditure_cnt8}',"; $SQL .= "expenditure_unit_price8 = '{$expenditure_unit_price8}',"; $SQL .= "expenditure_total_price8 = '{$expenditure_total_price8}',"; $expenditure_cnt9 = convertInt($expenditure_cnt9); $expenditure_unit_price9 = convertInt($expenditure_unit_price9); $expenditure_total_price9 = convertInt($expenditure_total_price9); $SQL .= "expenditure_title9 = '{$expenditure_title9}',"; $SQL .= "expenditure_cnt9 = '{$expenditure_cnt9}',"; $SQL .= "expenditure_unit_price9 = '{$expenditure_unit_price9}',"; $SQL .= "expenditure_total_price9 = '{$expenditure_total_price9}',"; $expenditure_cnt10 = convertInt($expenditure_cnt10); $expenditure_unit_price10 = convertInt($expenditure_unit_price10); $expenditure_total_price10 = convertInt($expenditure_total_price10); $SQL .= "expenditure_title10 = '{$expenditure_title10}',"; $SQL .= "expenditure_cnt10 = '{$expenditure_cnt10}',"; $SQL .= "expenditure_unit_price10 = '{$expenditure_unit_price10}',"; $SQL .= "expenditure_total_price10 = '{$expenditure_total_price10}',"; $expenditure_cnt11 = convertInt($expenditure_cnt11); $expenditure_unit_price11 = convertInt($expenditure_unit_price11); $expenditure_total_price11 = convertInt($expenditure_total_price11); $SQL .= "expenditure_title11 = '{$expenditure_title11}',"; $SQL .= "expenditure_cnt11 = '{$expenditure_cnt11}',"; $SQL .= "expenditure_unit_price11 = '{$expenditure_unit_price11}',"; $SQL .= "expenditure_total_price11 = '{$expenditure_total_price11}',"; $expenditure_cnt12 = convertInt($expenditure_cnt12); $expenditure_unit_price12 = convertInt($expenditure_unit_price12); $expenditure_total_price12 = convertInt($expenditure_total_price12); $SQL .= "expenditure_title12 = '{$expenditure_title12}',"; $SQL .= "expenditure_cnt12 = '{$expenditure_cnt12}',"; $SQL .= "expenditure_unit_price12 = '{$expenditure_unit_price12}',"; $SQL .= "expenditure_total_price12 = '{$expenditure_total_price12}',"; $expenditure_cnt13 = convertInt($expenditure_cnt13); $expenditure_unit_price13 = convertInt($expenditure_unit_price13); $expenditure_total_price13 = convertInt($expenditure_total_price13); $SQL .= "expenditure_title13 = '{$expenditure_title13}',"; $SQL .= "expenditure_cnt13 = '{$expenditure_cnt13}',"; $SQL .= "expenditure_unit_price13 = '{$expenditure_unit_price13}',"; $SQL .= "expenditure_total_price13 = '{$expenditure_total_price13}',"; $expenditure_cnt14 = convertInt($expenditure_cnt14); $expenditure_unit_price14 = convertInt($expenditure_unit_price14); $expenditure_total_price14 = convertInt($expenditure_total_price14); $SQL .= "expenditure_title14 = '{$expenditure_title14}',"; $SQL .= "expenditure_cnt14 = '{$expenditure_cnt14}',"; $SQL .= "expenditure_unit_price14 = '{$expenditure_unit_price14}',"; $SQL .= "expenditure_total_price14 = '{$expenditure_total_price14}',"; $expenditure_cnt15 = convertInt($expenditure_cnt15); $expenditure_unit_price15 = convertInt($expenditure_unit_price15); $expenditure_total_price15 = convertInt($expenditure_total_price15); $SQL .= "expenditure_title15 = '{$expenditure_title15}',"; $SQL .= "expenditure_cnt15 = '{$expenditure_cnt15}',"; $SQL .= "expenditure_unit_price15 = '{$expenditure_unit_price15}',"; $SQL .= "expenditure_total_price15 = '{$expenditure_total_price15}',"; $expenditure_cnt16 = convertInt($expenditure_cnt16); $expenditure_unit_price16 = convertInt($expenditure_unit_price16); $expenditure_total_price16 = convertInt($expenditure_total_price16); $SQL .= "expenditure_title16 = '{$expenditure_title16}',"; $SQL .= "expenditure_cnt16 = '{$expenditure_cnt16}',"; $SQL .= "expenditure_unit_price16 = '{$expenditure_unit_price16}',"; $SQL .= "expenditure_total_price16 = '{$expenditure_total_price16}',"; $expenditure_cnt17 = convertInt($expenditure_cnt17); $expenditure_unit_price17 = convertInt($expenditure_unit_price17); $expenditure_total_price17 = convertInt($expenditure_total_price17); $SQL .= "expenditure_title17 = '{$expenditure_title17}',"; $SQL .= "expenditure_cnt17 = '{$expenditure_cnt17}',"; $SQL .= "expenditure_unit_price17 = '{$expenditure_unit_price17}',"; $SQL .= "expenditure_total_price17 = '{$expenditure_total_price17}',"; $expenditure_cnt18 = convertInt($expenditure_cnt18); $expenditure_unit_price18 = convertInt($expenditure_unit_price18); $expenditure_total_price18 = convertInt($expenditure_total_price18); $SQL .= "expenditure_title18 = '{$expenditure_title18}',"; $SQL .= "expenditure_cnt18 = '{$expenditure_cnt18}',"; $SQL .= "expenditure_unit_price18 = '{$expenditure_unit_price18}',"; $SQL .= "expenditure_total_price18 = '{$expenditure_total_price18}',"; $expenditure_cnt19 = convertInt($expenditure_cnt19); $expenditure_unit_price19 = convertInt($expenditure_unit_price19); $expenditure_total_price19 = convertInt($expenditure_total_price19); $SQL .= "expenditure_title19 = '{$expenditure_title19}',"; $SQL .= "expenditure_cnt19 = '{$expenditure_cnt19}',"; $SQL .= "expenditure_unit_price19 = '{$expenditure_unit_price19}',"; $SQL .= "expenditure_total_price19 = '{$expenditure_total_price19}',"; $expenditure_cnt20 = convertInt($expenditure_cnt20); $expenditure_unit_price20 = convertInt($expenditure_unit_price20); $expenditure_total_price20 = convertInt($expenditure_total_price20); $SQL .= "expenditure_title20 = '{$expenditure_title20}',"; $SQL .= "expenditure_cnt20 = '{$expenditure_cnt20}',"; $SQL .= "expenditure_unit_price20 = '{$expenditure_unit_price20}',"; $SQL .= "expenditure_total_price20 = '{$expenditure_total_price20}',"; $expenditure_cnt21 = convertInt($expenditure_cnt21); $expenditure_unit_price21 = convertInt($expenditure_unit_price21); $expenditure_total_price21 = convertInt($expenditure_total_price21); $SQL .= "expenditure_title21 = '{$expenditure_title21}',"; $SQL .= "expenditure_cnt21 = '{$expenditure_cnt21}',"; $SQL .= "expenditure_unit_price21 = '{$expenditure_unit_price21}',"; $SQL .= "expenditure_total_price21 = '{$expenditure_total_price21}',"; $expenditure_cnt22 = convertInt($expenditure_cnt22); $expenditure_unit_price22 = convertInt($expenditure_unit_price22); $expenditure_total_price22 = convertInt($expenditure_total_price22); $SQL .= "expenditure_title22 = '{$expenditure_title22}',"; $SQL .= "expenditure_cnt22 = '{$expenditure_cnt22}',"; $SQL .= "expenditure_unit_price22 = '{$expenditure_unit_price22}',"; $SQL .= "expenditure_total_price22 = '{$expenditure_total_price22}',"; $expenditure_cnt23 = convertInt($expenditure_cnt23); $expenditure_unit_price23 = convertInt($expenditure_unit_price23); $expenditure_total_price23 = convertInt($expenditure_total_price23); $SQL .= "expenditure_title23 = '{$expenditure_title23}',"; $SQL .= "expenditure_cnt23 = '{$expenditure_cnt23}',"; $SQL .= "expenditure_unit_price23 = '{$expenditure_unit_price23}',"; $SQL .= "expenditure_total_price23 = '{$expenditure_total_price23}',"; $expenditure_cnt24 = convertInt($expenditure_cnt24); $expenditure_unit_price24 = convertInt($expenditure_unit_price24); $expenditure_total_price24 = convertInt($expenditure_total_price24); $SQL .= "expenditure_title24 = '{$expenditure_title24}',"; $SQL .= "expenditure_cnt24 = '{$expenditure_cnt24}',"; $SQL .= "expenditure_unit_price24 = '{$expenditure_unit_price24}',"; $SQL .= "expenditure_total_price24 = '{$expenditure_total_price24}',"; $expenditure_cnt25 = convertInt($expenditure_cnt25); $expenditure_unit_price25 = convertInt($expenditure_unit_price25); $expenditure_total_price25 = convertInt($expenditure_total_price25); $SQL .= "expenditure_title25 = '{$expenditure_title25}',"; $SQL .= "expenditure_cnt25 = '{$expenditure_cnt25}',"; $SQL .= "expenditure_unit_price25 = '{$expenditure_unit_price25}',"; $SQL .= "expenditure_total_price25 = '{$expenditure_total_price25}',"; $expenditure_cnt26 = convertInt($expenditure_cnt26); $expenditure_unit_price26 = convertInt($expenditure_unit_price26); $expenditure_total_price26 = convertInt($expenditure_total_price26); $SQL .= "expenditure_title26 = '{$expenditure_title26}',"; $SQL .= "expenditure_cnt26 = '{$expenditure_cnt26}',"; $SQL .= "expenditure_unit_price26 = '{$expenditure_unit_price26}',"; $SQL .= "expenditure_total_price26 = '{$expenditure_total_price26}',"; $expenditure_cnt27 = convertInt($expenditure_cnt27); $expenditure_unit_price27 = convertInt($expenditure_unit_price27); $expenditure_total_price27 = convertInt($expenditure_total_price27); $SQL .= "expenditure_title27 = '{$expenditure_title27}',"; $SQL .= "expenditure_cnt27 = '{$expenditure_cnt27}',"; $SQL .= "expenditure_unit_price27 = '{$expenditure_unit_price27}',"; $SQL .= "expenditure_total_price27 = '{$expenditure_total_price27}',"; $expenditure_cnt28 = convertInt($expenditure_cnt28); $expenditure_unit_price28 = convertInt($expenditure_unit_price28); $expenditure_total_price28 = convertInt($expenditure_total_price28); $SQL .= "expenditure_title28 = '{$expenditure_title28}',"; $SQL .= "expenditure_cnt28 = '{$expenditure_cnt28}',"; $SQL .= "expenditure_unit_price28 = '{$expenditure_unit_price28}',"; $SQL .= "expenditure_total_price28 = '{$expenditure_total_price28}',"; $expenditure_cnt29 = convertInt($expenditure_cnt29); $expenditure_unit_price29 = convertInt($expenditure_unit_price29); $expenditure_total_price29 = convertInt($expenditure_total_price29); $SQL .= "expenditure_title29 = '{$expenditure_title29}',"; $SQL .= "expenditure_cnt29 = '{$expenditure_cnt29}',"; $SQL .= "expenditure_unit_price29 = '{$expenditure_unit_price29}',"; $SQL .= "expenditure_total_price29 = '{$expenditure_total_price29}',"; $expenditure_cnt30 = convertInt($expenditure_cnt30); $expenditure_unit_price30 = convertInt($expenditure_unit_price30); $expenditure_total_price30 = convertInt($expenditure_total_price30); $SQL .= "expenditure_title30 = '{$expenditure_title30}',"; $SQL .= "expenditure_cnt30 = '{$expenditure_cnt30}',"; $SQL .= "expenditure_unit_price30 = '{$expenditure_unit_price30}',"; $SQL .= "expenditure_total_price30 = '{$expenditure_total_price30}'"; // $SQL = substr($SQL , 0, -1); $SQL .= " WHERE seq = {$seq}"; $completedMessage = "변경되었습니다"; $Result = db_query($SQL); if ($Result) { if($srch_month){ error_msg("alert('{$completedMessage}');location.href='/admin/erp/erp_easy_list.php?srch_month={$srch_month}&srch_year={$srch_year}&ins_id={$ins_id}&srch_title={$srch_title}'", "script"); }else{ error_msg("alert('{$completedMessage}');location.href='/admin/erp/erp_easy_list.php'", "script"); } } else { error_msg("alert('변경 실패');", "script"); } } else if($SqlType == 'copy'){ $sql = "SELECT * FROM {$TABLE} WHERE seq = {$seq}"; $data = db_fetch($sql); $sql = "INSERT INTO {$TABLE} SET "; foreach($data as $key => $value){ if($key == 'seq') { $seq = $value; continue; } if($key == 'title'){ $value .= ' [복사본]'; } if($key == 'ins_id'){ $value = $TK_MEMBER['mb_id']; } if($key == 'ins_dt'){ $value = date("Y-m-d H:i:s",time()); } $sql .= "{$key} = '{$value}',"; } $sql = substr($sql , 0, -1); $Result = db_query($sql); if ($Result) { error_msg("alert('복사가 완료되었습니다.');location.href='/admin/erp/erp_easy_list.php'", "script"); } else { error_msg("alert('복사 실패');", "script"); } }else if($SqlType == 'del'){ $seq = (int) $seq; if(!$seq){ error_msg("alert('삭제 실패');", "script"); } $sql = "UPDATE {$TABLE} SET isShow = 'N' WHERE seq = {$seq}"; if(db_query($sql)){ error_msg("alert('삭제가 완료되었습니다.');location.href='/admin/erp/erp_easy_list.php?del={$seq}'", "script"); }else{ error_msg("alert('삭제 실패 2');", "script"); } }else if($SqlType == 'recovery'){ $seq = (int) $seq; if(!$seq){ error_msg("alert('복원 실패');", "script"); } $sql = "UPDATE {$TABLE} SET isShow = 'Y' WHERE seq = {$seq}"; if(db_query($sql)){ error_msg("alert('복원이 완료되었습니다.');location.href='/admin/erp/erp_easy_list.php'", "script"); }else{ error_msg("alert('복원 실패 2');", "script"); } } ?>